ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Fermat42.mul
File: Mathlib/NumberTheory/FLT/Four.lean

Proof steps:
state_before: a b c k : ℤ
hk0 : k ≠ 0
⊢ Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)
state_after: a b c k : ℤ
hk0 : k ≠ 0
⊢ a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a ≠ 0 ∧ k * b ≠ 0 ∧ (k * a) ^ 4 + (k * b) ^ 4 = (k ^ 2 * c) ^ 2
tactic: delta Fermat42
state_before: a b c k : ℤ
hk0 : k ≠ 0
⊢ a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a ≠ 0 ∧ k * b ≠ 0 ∧ (k * a) ^ 4 + (k * b) ^ 4 = (k ^ 2 * c) ^ 2
state_after: case mp
a b c k : ℤ
hk0 : k ≠ 0
⊢ a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 → k * a ≠ 0 ∧ k * b ≠ 0 ∧ (k * a) ^ 4 + (k * b) ^ 4 = (k ^ 2 * c) ^ 2

case mpr
a b c k : ℤ
hk0 : k ≠ 0
⊢ k * a ≠ 0 ∧ k * b ≠ 0 ∧ (k * a) ^ 4 + (k * b) ^ 4 = (k ^ 2 * c) ^ 2 → a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2
tactic: constructor
Theorem: eq_mul_inv_of_mul_eq
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Group G
a b c d : G
n : ℤ
h : a * c = b
⊢ a = b * c⁻¹
state_after: no goals
tactic: simp [h.symm]
Theorem: CategoryTheory.Sieve.pullback_comp
File: Mathlib/CategoryTheory/Sites/Sieves.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : Y ⟶ X
S✝ R : Sieve X
f : Y ⟶ X
g : Z ⟶ Y
S : Sieve X
⊢ pullback (g ≫ f) S = pullback g (pullback f S)
state_after: no goals
tactic: simp [Sieve.ext_iff]
Theorem: UpperHalfPlane.isometry_pos_mul
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

Proof steps:
state_before: z w : ℍ
r R : ℝ
a : { x // 0 < x }
⊢ Isometry fun x => a • x
state_after: z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ dist (a • y₁) (a • y₂) = dist y₁ y₂
tactic: refine Isometry.of_dist_eq fun y₁ y₂ => ?_
state_before: z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ dist (a • y₁) (a • y₂) = dist y₁ y₂
state_after: z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ 2 * arsinh (dist (↑a • ↑y₁) (↑a • ↑y₂) / (2 * √(↑a * y₁.im * (↑a * y₂.im)))) =
    2 * arsinh (dist ↑y₁ ↑y₂ / (2 * √(y₁.im * y₂.im)))
tactic: simp only [dist_eq, coe_pos_real_smul, pos_real_im]
state_before: z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ 2 * arsinh (dist (↑a • ↑y₁) (↑a • ↑y₂) / (2 * √(↑a * y₁.im * (↑a * y₂.im)))) =
    2 * arsinh (dist ↑y₁ ↑y₂ / (2 * √(y₁.im * y₂.im)))
state_after: case e_a.e_x
z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ dist (↑a • ↑y₁) (↑a • ↑y₂) / (2 * √(↑a * y₁.im * (↑a * y₂.im))) = dist ↑y₁ ↑y₂ / (2 * √(y₁.im * y₂.im))
tactic: congr 2
state_before: case e_a.e_x
z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ dist (↑a • ↑y₁) (↑a • ↑y₂) / (2 * √(↑a * y₁.im * (↑a * y₂.im))) = dist ↑y₁ ↑y₂ / (2 * √(y₁.im * y₂.im))
state_after: case e_a.e_x
z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ |↑a| * dist ↑y₁ ↑y₂ / (|↑a| * (2 * √(y₁.im * y₂.im))) = dist ↑y₁ ↑y₂ / (2 * √(y₁.im * y₂.im))
tactic: rw [dist_smul₀, mul_mul_mul_comm, Real.sqrt_mul (mul_self_nonneg _), Real.sqrt_mul_self_eq_abs,
    Real.norm_eq_abs, mul_left_comm]
state_before: case e_a.e_x
z w : ℍ
r R : ℝ
a : { x // 0 < x }
y₁ y₂ : ℍ
⊢ |↑a| * dist ↑y₁ ↑y₂ / (|↑a| * (2 * √(y₁.im * y₂.im))) = dist ↑y₁ ↑y₂ / (2 * √(y₁.im * y₂.im))
state_after: no goals
tactic: exact mul_div_mul_left _ _ (mt _root_.abs_eq_zero.1 a.2.ne')
Theorem: Nat.count_injective
File: Mathlib/Data/Nat/Count.lean

Proof steps:
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
m n : ℕ
hm : p m
hn : p n
heq : count p m = count p n
⊢ m = n
state_after: p : ℕ → Prop
inst✝ : DecidablePred p
m n : ℕ
hm : p m
hn : p n
heq : count p m = count p n
h : m ≠ n
⊢ False
tactic: by_contra! h : m ≠ n
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
m n : ℕ
hm : p m
hn : p n
heq : count p m = count p n
h : m ≠ n
⊢ False
state_after: case inr
p : ℕ → Prop
inst✝ : DecidablePred p
m n : ℕ
hm : p m
hn : p n
heq : count p m = count p n
h : m ≠ n
this : ∀ {p : ℕ → Prop} [inst : DecidablePred p] {m n : ℕ}, p m → p n → count p m = count p n → m ≠ n → m < n → False
hmn : ¬m < n
⊢ False

p✝ : ℕ → Prop
inst✝¹ : DecidablePred p✝
p : ℕ → Prop
inst✝ : DecidablePred p
m n : ℕ
hm : p m
hn : p n
heq : count p m = count p n
h : m ≠ n
hmn : m < n
⊢ False
tactic: wlog hmn : m < n
Theorem: CategoryTheory.ShortComplex.LeftHomologyMapData.unop_φQ
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{?u.151938, u_1} C
inst✝ : HasZeroMorphisms C
S S₁✝ S₂✝ S₃ : ShortComplex C
S₁ S₂ : ShortComplex Cᵒᵖ
φ : S₁ ⟶ S₂
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
ψ : LeftHomologyMapData φ h₁ h₂
⊢ (h₂.unop.p ≫ ψ.φK.unop).op = ((unopMap φ).τ₂ ≫ h₁.unop.p).op
state_after: no goals
tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{?u.151938, u_1} C
inst✝ : HasZeroMorphisms C
S S₁✝ S₂✝ S₃ : ShortComplex C
S₁ S₂ : ShortComplex Cᵒᵖ
φ : S₁ ⟶ S₂
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
ψ : LeftHomologyMapData φ h₁ h₂
⊢ (ψ.φK.unop ≫ h₁.unop.g').op = (h₂.unop.g' ≫ (unopMap φ).τ₃).op
state_after: no goals
tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{?u.151938, u_1} C
inst✝ : HasZeroMorphisms C
S S₁✝ S₂✝ S₃ : ShortComplex C
S₁ S₂ : ShortComplex Cᵒᵖ
φ : S₁ ⟶ S₂
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
ψ : LeftHomologyMapData φ h₁ h₂
⊢ (ψ.φH.unop ≫ h₁.unop.ι).op = (h₂.unop.ι ≫ ψ.φK.unop).op
state_after: no goals
tactic: simp
Theorem: Polynomial.support_binomial
File: Mathlib/Algebra/Polynomial/Coeff.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
k m : ℕ
hkm : k ≠ m
x y : R
hx : x ≠ 0
hy : y ≠ 0
⊢ (C x * X ^ k + C y * X ^ m).support = {k, m}
state_after: R : Type u
S : Type v
a b : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
k m : ℕ
hkm : k ≠ m
x y : R
hx : x ≠ 0
hy : y ≠ 0
⊢ {k, m} ⊆ (C x * X ^ k + C y * X ^ m).support
tactic: apply subset_antisymm (support_binomial' k m x y)
state_before: R : Type u
S : Type v
a b : R
n m✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
k m : ℕ
hkm : k ≠ m
x y : R
hx : x ≠ 0
hy : y ≠ 0
⊢ {k, m} ⊆ (C x * X ^ k + C y * X ^ m).support
state_after: no goals
tactic: simp_rw [insert_subset_iff, singleton_subset_iff, mem_support_iff, coeff_add, coeff_C_mul,
    coeff_X_pow_self, mul_one, coeff_X_pow, if_neg hkm, if_neg hkm.symm, mul_zero, zero_add,
    add_zero, Ne, hx, hy, not_false_eq_true, and_true]
Theorem: LinearPMap.right_le_sup
File: Mathlib/LinearAlgebra/LinearPMap.lean

Proof steps:
state_before: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
⊢ g ≤ f.sup g h
state_after: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
z₁ : ↥g.domain
z₂ : ↥(f.sup g h).domain
hz : ↑z₁ = ↑z₂
⊢ ↑g z₁ = ↑(f.sup g h) z₂
tactic: refine ⟨le_sup_right, fun z₁ z₂ hz => ?_⟩
state_before: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
z₁ : ↥g.domain
z₂ : ↥(f.sup g h).domain
hz : ↑z₁ = ↑z₂
⊢ ↑g z₁ = ↑(f.sup g h) z₂
state_after: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
z₁ : ↥g.domain
z₂ : ↥(f.sup g h).domain
hz : ↑z₁ = ↑z₂
⊢ ↑f 0 + ↑g z₁ = ↑(f.sup g h) z₂
tactic: rw [← zero_add (g _), ← f.map_zero]
state_before: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
z₁ : ↥g.domain
z₂ : ↥(f.sup g h).domain
hz : ↑z₁ = ↑z₂
⊢ ↑f 0 + ↑g z₁ = ↑(f.sup g h) z₂
state_after: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
z₁ : ↥g.domain
z₂ : ↥(f.sup g h).domain
hz : ↑z₁ = ↑z₂
⊢ ↑0 + ↑z₁ = ↑z₂
tactic: refine (sup_apply h _ _ _ ?_).symm
state_before: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f g : E →ₗ.[R] F
h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y
z₁ : ↥g.domain
z₂ : ↥(f.sup g h).domain
hz : ↑z₁ = ↑z₂
⊢ ↑0 + ↑z₁ = ↑z₂
state_after: no goals
tactic: simpa
Theorem: Fin.card_Ico
File: Mathlib/Order/Interval/Finset/Fin.lean

Proof steps:
state_before: n : ℕ
a b : Fin n
⊢ (Ico a b).card = ↑b - ↑a
state_after: no goals
tactic: rw [← Nat.card_Ico, ← map_valEmbedding_Ico, card_map]
Theorem: Nat.closedEmbedding_coe_rat
File: Mathlib/Topology/Instances/Rat.lean

Proof steps:
state_before: ⊢ Pairwise fun x y => 1 ≤ dist ↑x ↑y
state_after: no goals
tactic: simpa using Nat.pairwise_one_le_dist
Theorem: EqvGen.mono
File: Mathlib/Logic/Relation.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r✝ : α → α → Prop
a b : α
r p : α → α → Prop
hrp : ∀ (a b : α), r a b → p a b
h : EqvGen r a b
⊢ EqvGen p a b
state_after: no goals
tactic: induction h with
  | rel a b h => exact EqvGen.rel _ _ (hrp _ _ h)
  | refl => exact EqvGen.refl _
  | symm a b _ ih => exact EqvGen.symm _ _ ih
  | trans a b c _ _ hab hbc => exact EqvGen.trans _ _ _ hab hbc
Theorem: List.leftpad_eq_leftpadTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

Proof steps:
state_before: ⊢ @leftpad = @leftpadTR
state_after: case h.h.h.h
α : Type u_1
n : Nat
a : α
l : List α
⊢ leftpad n a l = leftpadTR n a l
tactic: funext α n a l
state_before: case h.h.h.h
α : Type u_1
n : Nat
a : α
l : List α
⊢ leftpad n a l = leftpadTR n a l
state_after: no goals
tactic: simp [leftpad, leftpadTR, replicateTR_loop_eq]
Theorem: Mathlib.Meta.NormNum.IsRat.of_raw
File: Mathlib/Tactic/NormNum/Result.lean

Proof steps:
state_before: α✝ : Type u
u : Level
α : Type u_1
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : ↑d ≠ 0
this : Invertible ↑d
⊢ Rat.rawCast n d = ↑n * ⅟↑d
state_after: no goals
tactic: simp [div_eq_mul_inv]
Theorem: AEMeasurable.prod_swap
File: Mathlib/MeasureTheory/Constructions/Prod/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
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite μ
inst✝ : SFinite ν
f : β × α → γ
hf : AEMeasurable f (ν.prod μ)
⊢ AEMeasurable (fun z => f z.swap) (μ.prod ν)
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite μ
inst✝ : SFinite ν
f : β × α → γ
hf : AEMeasurable f (map Prod.swap (μ.prod ν))
⊢ AEMeasurable (fun z => f z.swap) (μ.prod ν)
tactic: rw [← Measure.prod_swap] at hf
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MeasurableSpace α'
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace β'
inst✝³ : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝² : NormedAddCommGroup E
inst✝¹ : SFinite μ
inst✝ : SFinite ν
f : β × α → γ
hf : AEMeasurable f (map Prod.swap (μ.prod ν))
⊢ AEMeasurable (fun z => f z.swap) (μ.prod ν)
state_after: no goals
tactic: exact hf.comp_measurable measurable_swap
Theorem: CategoryTheory.ShortComplex.RightHomologyData.homologyIso_hom_comp_rightHomologyIso_inv
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

Proof steps:
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
h : S.RightHomologyData
⊢ h.homologyIso.hom ≫ h.rightHomologyIso.inv = S.rightHomologyIso.inv
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
h : S.RightHomologyData
⊢ (S.rightHomologyIso.symm ≪≫ h.rightHomologyIso).hom ≫ h.rightHomologyIso.inv = S.rightHomologyIso.inv
tactic: dsimp only [homologyIso]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
h : S.RightHomologyData
⊢ (S.rightHomologyIso.symm ≪≫ h.rightHomologyIso).hom ≫ h.rightHomologyIso.inv = S.rightHomologyIso.inv
state_after: no goals
tactic: simp only [Iso.trans_hom, Iso.symm_hom, assoc, Iso.hom_inv_id, comp_id]
Theorem: List.kunion_kerase
File: Mathlib/Data/List/Sigma.lean

Proof steps:
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
s : Sigma β
tail✝ : List (Sigma β)
l : List (Sigma β)
⊢ (kerase a (s :: tail✝)).kunion (kerase a l) = kerase a ((s :: tail✝).kunion l)
state_after: no goals
tactic: by_cases h : a = s.1 <;> simp [h, kerase_comm a s.1 l, kunion_kerase]
Theorem: Path.refl_reparam
File: Mathlib/Topology/Connected/PathConnected.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
f : ↑I → ↑I
hfcont : Continuous f
hf₀ : f 0 = 0
hf₁ : f 1 = 1
⊢ (refl x).reparam f hfcont hf₀ hf₁ = refl x
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
f : ↑I → ↑I
hfcont : Continuous f
hf₀ : f 0 = 0
hf₁ : f 1 = 1
x✝ : ↑I
⊢ ((refl x).reparam f hfcont hf₀ hf₁) x✝ = (refl x) x✝
tactic: ext
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
f : ↑I → ↑I
hfcont : Continuous f
hf₀ : f 0 = 0
hf₁ : f 1 = 1
x✝ : ↑I
⊢ ((refl x).reparam f hfcont hf₀ hf₁) x✝ = (refl x) x✝
state_after: no goals
tactic: simp
Theorem: dite_dite_comm
File: Mathlib/Logic/Basic.lean

Proof steps:
state_before: α : Sort u_1
σ : α → Sort u_2
P Q R : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
p : P
⊢ A p = if q : Q then B q else if p : P then A p else C p q
state_after: no goals
tactic: rw [dif_neg (h p), dif_pos p]
state_before: α : Sort u_1
σ : α → Sort u_2
P Q R : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
⊢ (if q : Q then B q else C np q) = if q : Q then B q else if p : P then A p else C p q
state_after: case e_e
α : Sort u_1
σ : α → Sort u_2
P Q R : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
⊢ (fun q => C np q) = fun q => if p : P then A p else C p q
tactic: congr
state_before: case e_e
α : Sort u_1
σ : α → Sort u_2
P Q R : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
⊢ (fun q => C np q) = fun q => if p : P then A p else C p q
state_after: case e_e.h
α : Sort u_1
σ : α → Sort u_2
P Q R : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
x✝ : ¬Q
⊢ C np x✝ = if p : P then A p else C p x✝
tactic: funext _
state_before: case e_e.h
α : Sort u_1
σ : α → Sort u_2
P Q R : Prop
inst✝¹ : Decidable P
inst✝ : Decidable Q
a b c : α
A : P → α
B✝ : ¬P → α
B : Q → α
C : ¬P → ¬Q → α
h : P → ¬Q
np : ¬P
x✝ : ¬Q
⊢ C np x✝ = if p : P then A p else C p x✝
state_after: no goals
tactic: rw [dif_neg np]
Theorem: BoxIntegral.Prepartition.isPartition_single_iff
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

Proof steps:
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
h : J ≤ I
⊢ (single I J h).IsPartition ↔ J = I
state_after: no goals
tactic: simp [isPartition_iff_iUnion_eq]
Theorem: Matroid.map_val_restrictSubtype_ground_eq
File: Mathlib/Data/Matroid/Map.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M✝¹ : Matroid α
N : Matroid β
E X I : Set α
M✝ M : Matroid α
⊢ (M.restrictSubtype M.E).map Subtype.val ⋯ = M
state_after: no goals
tactic: simp
Theorem: LinearMap.finrank_range_of_inj
File: Mathlib/LinearAlgebra/Dimension/Finrank.lean

Proof steps:
state_before: R : Type u
M : Type v
N : Type w
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Injective ⇑f
⊢ finrank R ↥(range f) = finrank R M
state_after: no goals
tactic: rw [(LinearEquiv.ofInjective f hf).finrank_eq]
Theorem: Part.toFinset_none
File: Mathlib/Data/Finset/PImage.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : Decidable none.Dom
⊢ none.toFinset = ∅
state_after: no goals
tactic: simp [toFinset]
Theorem: Polynomial.Monic.nextCoeff_multiset_prod
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : CommSemiring R
p : R[X]
t : Multiset ι
f : ι → R[X]
h : ∀ i ∈ t, (f i).Monic
⊢ (Multiset.map f t).prod.nextCoeff = (Multiset.map (fun i => (f i).nextCoeff) t).sum
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : CommSemiring R
p : R[X]
t : Multiset ι
f : ι → R[X]
⊢ (∀ i ∈ t, (f i).Monic) → (Multiset.map f t).prod.nextCoeff = (Multiset.map (fun i => (f i).nextCoeff) t).sum
tactic: revert h
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : CommSemiring R
p : R[X]
t : Multiset ι
f : ι → R[X]
⊢ (∀ i ∈ t, (f i).Monic) → (Multiset.map f t).prod.nextCoeff = (Multiset.map (fun i => (f i).nextCoeff) t).sum
state_after: case refine_1
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : CommSemiring R
p : R[X]
t : Multiset ι
f : ι → R[X]
⊢ (∀ i ∈ 0, (f i).Monic) → (Multiset.map f 0).prod.nextCoeff = (Multiset.map (fun i => (f i).nextCoeff) 0).sum

case refine_2
R : Type u
S : Type v
a✝ b : R
m n : ℕ
ι : Type y
inst✝ : CommSemiring R
p : R[X]
t✝ : Multiset ι
f : ι → R[X]
a : ι
t : Multiset ι
ih : (∀ i ∈ t, (f i).Monic) → (Multiset.map f t).prod.nextCoeff = (Multiset.map (fun i => (f i).nextCoeff) t).sum
ht : ∀ i ∈ a ::ₘ t, (f i).Monic
⊢ (Multiset.map f (a ::ₘ t)).prod.nextCoeff = (Multiset.map (fun i => (f i).nextCoeff) (a ::ₘ t)).sum
tactic: refine Multiset.induction_on t ?_ fun a t ih ht => ?_
Theorem: CategoryTheory.Limits.Multicofork.fst_app_right
File: Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
a : I.L
⊢ K.ι.app (WalkingMultispan.left a) = I.fst a ≫ K.π (I.fstFrom a)
state_after: C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
a : I.L
⊢ I.multispan.map (WalkingMultispan.Hom.fst a) ≫ K.ι.app (WalkingMultispan.right (I.fstFrom a)) =
    I.fst a ≫ K.π (I.fstFrom a)
tactic: rw [← K.w (WalkingMultispan.Hom.fst a)]
state_before: C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
a : I.L
⊢ I.multispan.map (WalkingMultispan.Hom.fst a) ≫ K.ι.app (WalkingMultispan.right (I.fstFrom a)) =
    I.fst a ≫ K.π (I.fstFrom a)
state_after: no goals
tactic: rfl
Theorem: Pell.xn_modEq_x2n_add_lem
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
tactic: have h1 : d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j =
      (d a1 * yn a1 n * yn a1 n + 1) * xn a1 j := by
    simp [add_mul, mul_assoc]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
tactic: have h2 : d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n := by
    zify at *
    apply add_eq_of_eq_sub' (Eq.symm (pell_eqz a1 n))
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
tactic: rw [h2] at h1
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j
state_after: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ xn a1 n * (xn a1 n * xn a1 j)
tactic: rw [h1, mul_assoc]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j
h2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n
⊢ xn a1 n ∣ xn a1 n * (xn a1 n * xn a1 j)
state_after: no goals
tactic: exact dvd_mul_right _ _
Theorem: Matrix.Fin.conjTranspose_circulant
File: Mathlib/LinearAlgebra/Matrix/Circulant.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
R : Type u_5
inst✝ : Star α
⊢ ∀ (v : Fin 0 → α), (circulant v)ᴴ = circulant (star fun i => v (-i))
state_after: no goals
tactic: simp [Injective, eq_iff_true_of_subsingleton]
Theorem: Batteries.HashMap.Imp.Buckets.WF.mk'
File: .lake/packages/batteries/Batteries/Data/HashMap/WF.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
n : Nat
inst✝¹ : BEq α
inst✝ : Hashable α
h : 0 < n
⊢ (Buckets.mk n h).WF
state_after: case refine_1
α : Type u_1
β : Type u_2
n : Nat
inst✝³ : BEq α
inst✝² : Hashable α
h✝ : 0 < n
inst✝¹ : LawfulHashable α
inst✝ : PartialEquivBEq α
x✝ : AssocList α β
h : x✝ ∈ (Buckets.mk n h✝).val.data
⊢ List.Pairwise (fun a b => ¬(a.fst == b.fst) = true) x✝.toList

case refine_2
α : Type u_1
β : Type u_2
n : Nat
inst✝¹ : BEq α
inst✝ : Hashable α
h✝ : 0 < n
i : Nat
h : i < (Buckets.mk n h✝).val.size
⊢ AssocList.All (fun k x => ((hash k).toUSize % (Buckets.mk n h✝).val.size).toNat = i) (Buckets.mk n h✝).val[i]
tactic: refine ⟨fun _ h => ?_, fun i h => ?_⟩