ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.Limits.kernel_map_comp_preserves_kernel_iso_inv
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Kernels.lean

Proof steps:
state_before: C : Type u₁
inst✝¹⁰ : Category.{v₁, u₁} C
inst✝⁹ : HasZeroMorphisms C
D : Type u₂
inst✝⁸ : Category.{v₂, u₂} D
inst✝⁷ : HasZeroMorphisms D
G : C ⥤ D
inst✝⁶ : G.PreservesZeroMorphisms
X Y Z : C
f : X ⟶ Y
h : Z ⟶ X
w : h ≫ f = 0
inst✝⁵ : HasKernel f
inst✝⁴ : HasKernel (G.map f)
inst✝³ : PreservesLimit (parallelPair f 0) G
X' Y' : C
g : X' ⟶ Y'
inst✝² : HasKernel g
inst✝¹ : HasKernel (G.map g)
inst✝ : PreservesLimit (parallelPair g 0) G
p : X ⟶ X'
q : Y ⟶ Y'
hpq : f ≫ q = p ≫ g
⊢ G.map f ≫ G.map q = G.map p ≫ G.map g
state_after: no goals
tactic: rw [← G.map_comp, hpq, G.map_comp]
state_before: C : Type u₁
inst✝¹⁰ : Category.{v₁, u₁} C
inst✝⁹ : HasZeroMorphisms C
D : Type u₂
inst✝⁸ : Category.{v₂, u₂} D
inst✝⁷ : HasZeroMorphisms D
G : C ⥤ D
inst✝⁶ : G.PreservesZeroMorphisms
X Y Z : C
f : X ⟶ Y
h : Z ⟶ X
w : h ≫ f = 0
inst✝⁵ : HasKernel f
inst✝⁴ : HasKernel (G.map f)
inst✝³ : PreservesLimit (parallelPair f 0) G
X' Y' : C
g : X' ⟶ Y'
inst✝² : HasKernel g
inst✝¹ : HasKernel (G.map g)
inst✝ : PreservesLimit (parallelPair g 0) G
p : X ⟶ X'
q : Y ⟶ Y'
hpq : f ≫ q = p ≫ g
⊢ kernel.map (G.map f) (G.map g) (G.map p) (G.map q) ⋯ ≫ (PreservesKernel.iso G g).inv =
    (PreservesKernel.iso G f).inv ≫ G.map (kernel.map f g p q hpq)
state_after: no goals
tactic: rw [Iso.comp_inv_eq, Category.assoc, PreservesKernel.iso_hom, Iso.eq_inv_comp,
    PreservesKernel.iso_hom, kernelComparison_comp_kernel_map]
Theorem: CategoryTheory.Limits.cokernelIsoOfEq_hom_comp_desc
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

Proof steps:
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f g : X ⟶ Y
inst✝¹ : HasCokernel f
inst✝ : HasCokernel g
h : f = g
e : Y ⟶ Z
he : g ≫ e = 0
⊢ f ≫ e = 0
state_after: no goals
tactic: simp [h, he]
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f g : X ⟶ Y
inst✝¹ : HasCokernel f
inst✝ : HasCokernel g
h : f = g
e : Y ⟶ Z
he : g ≫ e = 0
⊢ (cokernelIsoOfEq h).hom ≫ cokernel.desc g e he = cokernel.desc f e ⋯
state_after: case refl
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
e : Y ⟶ Z
inst✝ : HasCokernel f
he : f ≫ e = 0
⊢ (cokernelIsoOfEq ⋯).hom ≫ cokernel.desc f e he = cokernel.desc f e ⋯
tactic: cases h
state_before: case refl
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
e : Y ⟶ Z
inst✝ : HasCokernel f
he : f ≫ e = 0
⊢ (cokernelIsoOfEq ⋯).hom ≫ cokernel.desc f e he = cokernel.desc f e ⋯
state_after: no goals
tactic: simp
Theorem: AffineSubspace.sSameSide_smul_vsub_vadd_left
File: Mathlib/Analysis/Convex/Side.lean

Proof steps:
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x p₁ p₂ : P
hx : x ∉ s
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
t : R
ht : 0 < t
⊢ s.SSameSide (t • (x -ᵥ p₁) +ᵥ p₂) x
state_after: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x p₁ p₂ : P
hx : x ∉ s
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
t : R
ht : 0 < t
h : t • (x -ᵥ p₁) +ᵥ p₂ ∈ s
⊢ x ∈ s
tactic: refine ⟨wSameSide_smul_vsub_vadd_left x hp₁ hp₂ ht.le, fun h => hx ?_, hx⟩
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : LinearOrderedField R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x p₁ p₂ : P
hx : x ∉ s
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
t : R
ht : 0 < t
h : t • (x -ᵥ p₁) +ᵥ p₂ ∈ s
⊢ x ∈ s
state_after: no goals
tactic: rwa [vadd_mem_iff_mem_direction _ hp₂, s.direction.smul_mem_iff ht.ne.symm,
    vsub_right_mem_direction_iff_mem hp₁] at h
Theorem: IsCoprime.of_mul_add_left_left
File: Mathlib/RingTheory/Coprime/Basic.lean

Proof steps:
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
h : IsCoprime (y * z + x) y
⊢ IsCoprime x y
state_after: R : Type u
inst✝ : CommSemiring R
x y z : R
h : IsCoprime (x + y * z) y
⊢ IsCoprime x y
tactic: rw [add_comm] at h
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
h : IsCoprime (x + y * z) y
⊢ IsCoprime x y
state_after: no goals
tactic: exact h.of_add_mul_left_left
Theorem: Filter.frequently_curry_prod_iff
File: Mathlib/Order/Filter/Curry.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
l : Filter α
m : Filter β
s : Set α
t : Set β
⊢ (∃ᶠ (x : α × β) in l.curry m, x ∈ s ×ˢ t) ↔ sᶜ ∉ l ∧ tᶜ ∉ m
state_after: case refine_1
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
l : Filter α
m : Filter β
s : Set α
t : Set β
h : ∃ᶠ (x : α × β) in l.curry m, x ∈ s ×ˢ t
⊢ sᶜ ∉ l ∧ tᶜ ∉ m

case refine_2
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
l : Filter α
m : Filter β
s : Set α
t : Set β
x✝ : sᶜ ∉ l ∧ tᶜ ∉ m
hs : sᶜ ∉ l
ht : tᶜ ∉ m
⊢ ∃ᶠ (x : α × β) in l.curry m, x ∈ s ×ˢ t
tactic: refine ⟨fun h => ?_, fun ⟨hs, ht⟩ => ?_⟩
state_before: case refine_2
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
l : Filter α
m : Filter β
s : Set α
t : Set β
x✝ : sᶜ ∉ l ∧ tᶜ ∉ m
hs : sᶜ ∉ l
ht : tᶜ ∉ m
⊢ ∃ᶠ (x : α × β) in l.curry m, x ∈ s ×ˢ t
state_after: case refine_2
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
l : Filter α
m : Filter β
s : Set α
t : Set β
x✝ : sᶜ ∉ l ∧ tᶜ ∉ m
hs : sᶜ ∉ l
ht : tᶜ ∉ m
⊢ ∃ᶠ (x : α) in l, ∃ᶠ (y : β) in m, (x, y) ∈ s ×ˢ t
tactic: rw [frequently_curry_iff]
state_before: case refine_2
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
l : Filter α
m : Filter β
s : Set α
t : Set β
x✝ : sᶜ ∉ l ∧ tᶜ ∉ m
hs : sᶜ ∉ l
ht : tᶜ ∉ m
⊢ ∃ᶠ (x : α) in l, ∃ᶠ (y : β) in m, (x, y) ∈ s ×ˢ t
state_after: no goals
tactic: exact Frequently.mono hs $ fun x hx => Frequently.mono ht (by simp[hx])
Theorem: Units.pow_ofPowEqOne
File: Mathlib/Algebra/Group/Commute/Units.lean

Proof steps:
state_before: M : Type u_1
inst✝ : Monoid M
n : ℕ
a b : M
u u₁ u₂ : Mˣ
ha : a ^ n = 1
hn : n ≠ 0
⊢ ↑(ofPowEqOne a n ha hn ^ n) = ↑1
state_after: no goals
tactic: simp [ha]
Theorem: dslope_sub_smul_of_ne
File: Mathlib/Analysis/Calculus/Dslope.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f✝ : 𝕜 → E
a b : 𝕜
s : Set 𝕜
f : 𝕜 → E
h : b ≠ a
⊢ dslope (fun x => (x - a) • f x) a b = f b
state_after: no goals
tactic: rw [dslope_of_ne _ h, slope_sub_smul _ h.symm]
Theorem: Set.iUnion_iUnion_eq'
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : ι → α
g : α → Set β
⊢ ⋃ x, ⋃ y, ⋃ (_ : f y = x), g x = ⋃ y, g (f y)
state_after: no goals
tactic: simpa using biUnion_range
Theorem: mul_mem_closedBall_iff_norm
File: Mathlib/Analysis/Normed/Group/Basic.lean

Proof steps:
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ a * b ∈ closedBall a r ↔ ‖b‖ ≤ r
state_after: no goals
tactic: rw [mem_closedBall_iff_norm'', mul_div_cancel_left]
Theorem: Polynomial.comp_one
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
⊢ p.comp 1 = C (eval 1 p)
state_after: no goals
tactic: rw [← C_1, comp_C]
Theorem: Submodule.exists_dual_map_eq_bot_of_lt_top
File: Mathlib/LinearAlgebra/Dual.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p : Submodule R M
hp : p < ⊤
hp' : Free R (M ⧸ p)
⊢ ∃ f, f ≠ 0 ∧ map f p = ⊥
state_after: case intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p : Submodule R M
hp : p < ⊤
hp' : Free R (M ⧸ p)
x : M
hx : x ∉ p
⊢ ∃ f, f ≠ 0 ∧ map f p = ⊥
tactic: obtain ⟨x, hx⟩ : ∃ x : M, x ∉ p := by rw [lt_top_iff_ne_top] at hp; contrapose! hp; ext; simp [hp]
state_before: case intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p : Submodule R M
hp : p < ⊤
hp' : Free R (M ⧸ p)
x : M
hx : x ∉ p
⊢ ∃ f, f ≠ 0 ∧ map f p = ⊥
state_after: case intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p : Submodule R M
hp : p < ⊤
hp' : Free R (M ⧸ p)
x : M
hx : x ∉ p
f : Dual R M
hf : f x ≠ 0
hf' : map f p = ⊥
⊢ ∃ f, f ≠ 0 ∧ map f p = ⊥
tactic: obtain ⟨f, hf, hf'⟩ := p.exists_dual_map_eq_bot_of_nmem hx hp'
state_before: case intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p : Submodule R M
hp : p < ⊤
hp' : Free R (M ⧸ p)
x : M
hx : x ∉ p
f : Dual R M
hf : f x ≠ 0
hf' : map f p = ⊥
⊢ ∃ f, f ≠ 0 ∧ map f p = ⊥
state_after: no goals
tactic: exact ⟨f, by aesop, hf'⟩
Theorem: PadicInt.zmod_cast_comp_toZModPow
File: Mathlib/NumberTheory/Padics/RingHoms.lean

Proof steps:
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
m n : ℕ
h : m ≤ n
⊢ (ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n) = toZModPow m
state_after: case h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
m n : ℕ
h : m ≤ n
⊢ RingHom.ker ((ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n)) = RingHom.ker (toZModPow m)
tactic: apply ZMod.ringHom_eq_of_ker_eq
state_before: case h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
m n : ℕ
h : m ≤ n
⊢ RingHom.ker ((ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n)) = RingHom.ker (toZModPow m)
state_after: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ x ∈ RingHom.ker ((ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n)) ↔ x ∈ RingHom.ker (toZModPow m)
tactic: ext x
state_before: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ x ∈ RingHom.ker ((ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n)) ↔ x ∈ RingHom.ker (toZModPow m)
state_after: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ((ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n)) x = 0 ↔ (toZModPow m) x = 0
tactic: rw [RingHom.mem_ker, RingHom.mem_ker]
state_before: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ((ZMod.castHom ⋯ (ZMod (p ^ m))).comp (toZModPow n)) x = 0 ↔ (toZModPow m) x = 0
state_after: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ((toZModPow n) x).cast = 0 ↔ (toZModPow m) x = 0
tactic: simp only [Function.comp_apply, ZMod.castHom_apply, RingHom.coe_comp]
state_before: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ((toZModPow n) x).cast = 0 ↔ (toZModPow m) x = 0
state_after: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ({ toFun := fun x => ↑(x.appr n), map_one' := ⋯, map_mul' := ⋯ } x).cast = 0 ↔
    { toFun := fun x => ↑(x.appr m), map_one' := ⋯, map_mul' := ⋯ } x = 0
tactic: simp only [toZModPow, toZModHom, RingHom.coe_mk]
state_before: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ({ toFun := fun x => ↑(x.appr n), map_one' := ⋯, map_mul' := ⋯ } x).cast = 0 ↔
    { toFun := fun x => ↑(x.appr m), map_one' := ⋯, map_mul' := ⋯ } x = 0
state_after: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ (↑(x.appr n)).cast = 0 ↔ ↑(x.appr m) = 0
tactic: dsimp
state_before: case h.h
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ (↑(x.appr n)).cast = 0 ↔ ↑(x.appr m) = 0
state_after: case h.h.ha
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ↑(x.appr n) - ↑(x.appr n) ∈ Ideal.span {↑p ^ m}

case h.h.hb
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x✝ : ℤ_[p]
m n : ℕ
h : m ≤ n
x : ℤ_[p]
⊢ ↑(x.appr n) - ↑(x.appr m) ∈ Ideal.span {↑p ^ m}
tactic: rw [ZMod.cast_natCast (pow_dvd_pow p h),
    zmod_congr_of_sub_mem_span m (x.appr n) (x.appr n) (x.appr m)]
Theorem: Set.relatively_discrete_of_finite
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : EMetricSpace α
x y z : α
s t : Set α
C : ℝ≥0∞
sC : Set ℝ≥0∞
inst✝ : Finite ↑s
⊢ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y
state_after: α : Type u_1
β : Type u_2
inst✝¹ : EMetricSpace α
x y z : α
s t : Set α
C : ℝ≥0∞
sC : Set ℝ≥0∞
inst✝ : Finite ↑s
⊢ 0 < s.einfsep
tactic: rw [← einfsep_pos]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : EMetricSpace α
x y z : α
s t : Set α
C : ℝ≥0∞
sC : Set ℝ≥0∞
inst✝ : Finite ↑s
⊢ 0 < s.einfsep
state_after: no goals
tactic: exact einfsep_pos_of_finite
Theorem: Int.existsUnique_mem_box
File: Mathlib/Order/Interval/Finset/Box.lean

Proof steps:
state_before: n : ℕ
x✝ x : ℤ × ℤ
⊢ ∃! n, x ∈ box n
state_after: case h
n : ℕ
x✝ x : ℤ × ℤ
⊢ (fun n => x ∈ box n) (max x.1.natAbs x.2.natAbs) ∧ ∀ (y : ℕ), (fun n => x ∈ box n) y → y = max x.1.natAbs x.2.natAbs
tactic: use max x.1.natAbs x.2.natAbs
state_before: case h
n : ℕ
x✝ x : ℤ × ℤ
⊢ (fun n => x ∈ box n) (max x.1.natAbs x.2.natAbs) ∧ ∀ (y : ℕ), (fun n => x ∈ box n) y → y = max x.1.natAbs x.2.natAbs
state_after: no goals
tactic: simp only [mem_box, and_self_iff, forall_eq']
Theorem: Finpartition.card_parts_equitabilise
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Equitabilise.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = s.card
hm : m ≠ 0
⊢ (equitabilise h).parts.card = a + b
state_after: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = s.card
hm : m ≠ 0
⊢ Disjoint (filter (fun x => x.card = m) (equitabilise h).parts)
    (filter (fun x => x.card = m + 1) (equitabilise h).parts)
tactic: rw [← filter_true_of_mem fun x => card_eq_of_mem_parts_equitabilise, filter_or,
    card_union_of_disjoint, P.card_filter_equitabilise_small _ hm, P.card_filter_equitabilise_big]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = s.card
hm : m ≠ 0
⊢ Disjoint (filter (fun x => x.card = m) (equitabilise h).parts)
    (filter (fun x => x.card = m + 1) (equitabilise h).parts)
state_after: no goals
tactic: exact disjoint_filter.2 fun x _ h₀ h₁ => Nat.succ_ne_self m <| h₁.symm.trans h₀
Theorem: CategoryTheory.StructuredArrow.IsUniversal.existsUnique
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

Proof steps:
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
A : Type u₃
inst✝¹ : Category.{v₃, u₃} A
B : Type u₄
inst✝ : Category.{v₄, u₄} B
f✝ g✝ : StructuredArrow S T
h : f✝.IsUniversal
g : StructuredArrow S T
f : f✝.right ⟶ g.right
w : (fun η => f✝.hom ≫ T.map η = g.hom) f
⊢ f✝.hom ≫ T.map f = f✝.hom ≫ T.map (h.desc g)
state_after: no goals
tactic: simp [w]
Theorem: ENNReal.sub_mul
File: Mathlib/Data/ENNReal/Operations.lean

Proof steps:
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ ⊤
⊢ (a - b) * c = a * c - b * c
state_after: case inl
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ ⊤
hab : a ≤ b
⊢ (a - b) * c = a * c - b * c

case inr
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ ⊤
hab : b < a
⊢ (a - b) * c = a * c - b * c
tactic: rcases le_or_lt a b with hab | hab
state_before: case inr
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ ⊤
hab : b < a
⊢ (a - b) * c = a * c - b * c
state_after: case inr.inl
a c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < 0 → 0 < a → c ≠ ⊤
hab : 0 < a
⊢ (a - 0) * c = a * c - 0 * c

case inr.inr
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ ⊤
hab : b < a
hb : 0 < b
⊢ (a - b) * c = a * c - b * c
tactic: rcases eq_or_lt_of_le (zero_le b) with (rfl | hb)
state_before: case inr.inr
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ ⊤
hab : b < a
hb : 0 < b
⊢ (a - b) * c = a * c - b * c
state_after: no goals
tactic: exact (cancel_of_ne <| mul_ne_top hab.ne_top (h hb hab)).tsub_mul
Theorem: Sum.elim_zero_single
File: Mathlib/Algebra/Group/Pi/Basic.lean

Proof steps:
state_before: I : Type u
α : Type u_1
β : Type u_2
γ : Type u_3
f : I → Type v₁
g : I → Type v₂
h : I → Type v₃
x y : (i : I) → f i
i✝ : I
a a' : α → γ
b b' : β → γ
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : One γ
i : β
c : γ
⊢ Sum.elim 1 (Pi.mulSingle i c) = Pi.mulSingle (inr i) c
state_after: no goals
tactic: simp only [Pi.mulSingle, Sum.elim_update_right, elim_one_one]
Theorem: Bool.and_elim_left
File: Mathlib/Data/Bool/Basic.lean

Proof steps:
state_before: ⊢ ∀ {a b : Bool}, (a && b) = true → a = true
state_after: no goals
tactic: decide
Theorem: Set.Ioc_disjoint_Ioc
File: Mathlib/Order/Interval/Set/Disjoint.lean

Proof steps:
state_before: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
⊢ Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁
state_after: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
h :
  Disjoint (Ico (toDual a₂) (toDual a₁)) (Ico (toDual b₂) (toDual b₁)) ↔
    min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂)
⊢ Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁
tactic: have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico
state_before: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
h :
  Disjoint (Ico (toDual a₂) (toDual a₁)) (Ico (toDual b₂) (toDual b₁)) ↔
    min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂)
⊢ Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁
state_after: no goals
tactic: simpa only [dual_Ico] using h
Theorem: Nat.prod_pow_factorization_eq_self
File: Mathlib/Data/Nat/Factorization/Defs.lean

Proof steps:
state_before: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
⊢ (f.prod fun x x_1 => x ^ x_1).factorization = f
state_after: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
h : ∀ x ∈ f.support, x ^ f x ≠ 0
⊢ (f.prod fun x x_1 => x ^ x_1).factorization = f
tactic: have h : ∀ x : ℕ, x ∈ f.support → x ^ f x ≠ 0 := fun p hp =>
    pow_ne_zero _ (Prime.ne_zero (hf p hp))
state_before: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
h : ∀ x ∈ f.support, x ^ f x ≠ 0
⊢ (f.prod fun x x_1 => x ^ x_1).factorization = f
state_after: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
h : ∀ x ∈ f.support, x ^ f x ≠ 0
⊢ ∑ x ∈ f.support, (x ^ f x).factorization = f
tactic: simp only [Finsupp.prod, factorization_prod h]
state_before: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
h : ∀ x ∈ f.support, x ^ f x ≠ 0
⊢ ∑ x ∈ f.support, (x ^ f x).factorization = f
state_after: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
h : ∀ x ∈ f.support, x ^ f x ≠ 0
⊢ ∑ x ∈ f.support, (x ^ f x).factorization = f.sum single
tactic: conv =>
    rhs
    rw [(sum_single f).symm]
state_before: a b m n p : ℕ
f : ℕ →₀ ℕ
hf : ∀ p ∈ f.support, Prime p
h : ∀ x ∈ f.support, x ^ f x ≠ 0
⊢ ∑ x ∈ f.support, (x ^ f x).factorization = f.sum single
state_after: no goals
tactic: exact sum_congr rfl fun p hp => Prime.factorization_pow (hf p hp)
Theorem: PresheafOfModules.toSheafify_hom
File: Mathlib/Algebra/Category/ModuleCat/Presheaf/Sheafify.lean

Proof steps:
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
J : GrothendieckTopology C
R₀ : Cᵒᵖ ⥤ RingCat
R : Sheaf J RingCat
α : R₀ ⟶ R.val
inst✝³ : Presheaf.IsLocallyInjective J α
inst✝² : Presheaf.IsLocallySurjective J α
M₀ : PresheafOfModules R₀
A : Sheaf J AddCommGrp
φ : M₀.presheaf ⟶ A.val
inst✝¹ : Presheaf.IsLocallyInjective J φ
inst✝ : Presheaf.IsLocallySurjective J φ
X : Cᵒᵖ
r₀ : ↑(R₀.obj X)
m₀ : ↑(M₀.presheaf.obj X)
⊢ (φ.app X) (r₀ • m₀) = r₀ • (φ.app X) m₀
state_after: no goals
tactic: simpa using (Sheafify.map_smul_eq α φ (α.app _ r₀) (φ.app _ m₀) (𝟙 _)
      r₀ (by aesop) m₀ (by simp)).symm
Theorem: CategoryTheory.Localization.essSurj_mapArrow_of_hasRightCalculusOfFractions
File: Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasRightCalculusOfFractions
f : Arrow D
⊢ f ∈ L.mapArrow.essImage
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasRightCalculusOfFractions
f : Arrow D
this : L.op.mapArrow.EssSurj
⊢ f ∈ L.mapArrow.essImage
tactic: have := Localization.essSurj_mapArrow L.op W.op
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasRightCalculusOfFractions
f : Arrow D
this : L.op.mapArrow.EssSurj
⊢ f ∈ L.mapArrow.essImage
state_after: case intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasRightCalculusOfFractions
f : Arrow D
this : L.op.mapArrow.EssSurj
g : Arrow Cᵒᵖ
e : L.op.mapArrow.obj g ≅ Arrow.mk f.hom.op
⊢ f ∈ L.mapArrow.essImage
tactic: obtain ⟨g, ⟨e⟩⟩ : ∃ (g : _), Nonempty (L.op.mapArrow.obj g ≅ Arrow.mk f.hom.op) :=
      ⟨_, ⟨Functor.objObjPreimageIso _ _⟩⟩
state_before: case intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasRightCalculusOfFractions
f : Arrow D
this : L.op.mapArrow.EssSurj
g : Arrow Cᵒᵖ
e : L.op.mapArrow.obj g ≅ Arrow.mk f.hom.op
⊢ f ∈ L.mapArrow.essImage
state_after: no goals
tactic: exact ⟨Arrow.mk g.hom.unop, ⟨Arrow.isoMk (Arrow.rightFunc.mapIso e.symm).unop
      (Arrow.leftFunc.mapIso e.symm).unop (Quiver.Hom.op_inj e.inv.w.symm)⟩⟩
Theorem: MeasureTheory.addContent_mono
File: Mathlib/MeasureTheory/Measure/AddContent.lean

Proof steps:
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ m s ≤ m t
state_after: case refine_4
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
h : ∑ u ∈ {s}, m u ≤ m t
⊢ m s ≤ m t

case refine_1
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ ↑{s} ⊆ C

case refine_2
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ (↑{s}).PairwiseDisjoint id

case refine_3
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ ∀ s_1 ∈ {s}, s_1 ⊆ t
tactic: have h := sum_addContent_le_of_subset (m := m) hC (I := {s}) ?_ ?_ ht ?_