ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: IsSl2Triple.f_ne_zero
File: Mathlib/Algebra/Lie/Sl2.lean

Proof steps:
state_before: R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
h e f : L
t : IsSl2Triple h e f
⊢ f ≠ 0
state_after: R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
h e f : L
t : IsSl2Triple h e f
this : h ≠ 0
⊢ f ≠ 0
tactic: have := t.h_ne_zero
state_before: R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
h e f : L
t : IsSl2Triple h e f
this : h ≠ 0
⊢ f ≠ 0
state_after: R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
h e f : L
t : IsSl2Triple h e f
this : f = 0
⊢ h = 0
tactic: contrapose! this
state_before: R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
h e f : L
t : IsSl2Triple h e f
this : f = 0
⊢ h = 0
state_after: no goals
tactic: simpa [this] using t.lie_e_f.symm
Theorem: CategoryTheory.Under.mapForget_eq
File: Mathlib/CategoryTheory/Comma/Over.lean

Proof steps:
state_before: T : Type u₁
inst✝ : Category.{v₁, u₁} T
X✝ X Y : T
f : X ⟶ Y
⊢ map f ⋙ forget X = forget Y
state_after: case h_obj
T : Type u₁
inst✝ : Category.{v₁, u₁} T
X✝ X Y : T
f : X ⟶ Y
⊢ ∀ (X_1 : Under Y), (map f ⋙ forget X).obj X_1 = (forget Y).obj X_1

case h_map
T : Type u₁
inst✝ : Category.{v₁, u₁} T
X✝ X Y : T
f : X ⟶ Y
⊢ autoParam
    (∀ (X_1 Y_1 : Under Y) (f_1 : X_1 ⟶ Y_1), (map f ⋙ forget X).map f_1 = eqToHom ⋯ ≫ (forget Y).map f_1 ≫ eqToHom ⋯)
    _auto✝
tactic: fapply Functor.ext
Theorem: MonoidAlgebra.of_injective
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

Proof steps:
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
inst✝ : Nontrivial k
a b : G
h : (of k G) a = (of k G) b
⊢ a = b
state_after: no goals
tactic: simpa using (single_eq_single_iff _ _ _ _).mp h
Theorem: CategoryTheory.Functor.IsCoverDense.Types.appHom_valid_glue
File: Mathlib/CategoryTheory/Sites/DenseSubsite.lean

Proof steps:
state_before: C : Type u_1
inst✝⁵ : Category.{u_6, u_1} C
D : Type u_2
inst✝⁴ : Category.{u_5, u_2} D
E : Type u_3
inst✝³ : Category.{?u.50538, u_3} E
J : GrothendieckTopology C
K : GrothendieckTopology D
L : GrothendieckTopology E
A : Type u_4
inst✝² : Category.{?u.50590, u_4} A
G : C ⥤ D
inst✝¹ : G.IsCoverDense K
inst✝ : G.IsLocallyFull K
ℱ : Dᵒᵖ ⥤ Type v
ℱ' : SheafOfTypes K
α : G.op ⋙ ℱ ⟶ G.op ⋙ ℱ'.val
X : D
Y : C
f : op X ⟶ op (G.obj Y)
⊢ appHom α X ≫ ℱ'.val.map f = ℱ.map f ≫ α.app (op Y)
state_after: case h
C : Type u_1
inst✝⁵ : Category.{u_6, u_1} C
D : Type u_2
inst✝⁴ : Category.{u_5, u_2} D
E : Type u_3
inst✝³ : Category.{?u.50538, u_3} E
J : GrothendieckTopology C
K : GrothendieckTopology D
L : GrothendieckTopology E
A : Type u_4
inst✝² : Category.{?u.50590, u_4} A
G : C ⥤ D
inst✝¹ : G.IsCoverDense K
inst✝ : G.IsLocallyFull K
ℱ : Dᵒᵖ ⥤ Type v
ℱ' : SheafOfTypes K
α : G.op ⋙ ℱ ⟶ G.op ⋙ ℱ'.val
X : D
Y : C
f : op X ⟶ op (G.obj Y)
a✝ : ℱ.obj (op X)
⊢ (appHom α X ≫ ℱ'.val.map f) a✝ = (ℱ.map f ≫ α.app (op Y)) a✝
tactic: ext
state_before: case h
C : Type u_1
inst✝⁵ : Category.{u_6, u_1} C
D : Type u_2
inst✝⁴ : Category.{u_5, u_2} D
E : Type u_3
inst✝³ : Category.{?u.50538, u_3} E
J : GrothendieckTopology C
K : GrothendieckTopology D
L : GrothendieckTopology E
A : Type u_4
inst✝² : Category.{?u.50590, u_4} A
G : C ⥤ D
inst✝¹ : G.IsCoverDense K
inst✝ : G.IsLocallyFull K
ℱ : Dᵒᵖ ⥤ Type v
ℱ' : SheafOfTypes K
α : G.op ⋙ ℱ ⟶ G.op ⋙ ℱ'.val
X : D
Y : C
f : op X ⟶ op (G.obj Y)
a✝ : ℱ.obj (op X)
⊢ (appHom α X ≫ ℱ'.val.map f) a✝ = (ℱ.map f ≫ α.app (op Y)) a✝
state_after: no goals
tactic: apply appHom_restrict
Theorem: suffixLevenshtein_minimum_le_levenshtein_append
File: Mathlib/Data/List/EditDistance/Bounds.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
C : Levenshtein.Cost α β δ
inst✝ : CanonicallyLinearOrderedAddCommMonoid δ
xs : List α
ys₁ ys₂ : List β
⊢ (↑(suffixLevenshtein C xs ys₂)).minimum ≤ ↑(levenshtein C xs (ys₁ ++ ys₂))
state_after: no goals
tactic: cases ys₁ with
  | nil => exact List.minimum_le_of_mem' (List.get_mem _ _ _)
  | cons y ys₁ =>
      exact (le_suffixLevenshtein_append_minimum _ _ _).trans
        (suffixLevenshtein_minimum_le_levenshtein_cons _ _ _)
Theorem: ZNum.of_natCast
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ℕ
⊢ ↑↑n = ↑n
state_after: no goals
tactic: rw [← Int.cast_natCast, of_intCast, Int.cast_natCast]
Theorem: Rel.image_top
File: Mathlib/Data/Rel.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
h : s.Nonempty
x : β
⊢ h.some ∈ s ∧ ⊤ h.some x
state_after: no goals
tactic: simp [h.some_mem, Top.top]
Theorem: Submodule.fg_iff_exists_fin_generating_family
File: Mathlib/RingTheory/Finiteness.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ N.FG ↔ ∃ n s, span R (range s) = N
state_after: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ S, S.Finite ∧ span R S = N) ↔ ∃ n s, span R (range s) = N
tactic: rw [fg_def]
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ S, S.Finite ∧ span R S = N) ↔ ∃ n s, span R (range s) = N
state_after: case mp
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ S, S.Finite ∧ span R S = N) → ∃ n s, span R (range s) = N

case mpr
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ n s, span R (range s) = N) → ∃ S, S.Finite ∧ span R S = N
tactic: constructor
Theorem: FiniteDimensional.finrank_pi
File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

Proof steps:
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι✝ : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝¹³ : Ring R
inst✝¹² : CommRing S
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup M'
inst✝⁹ : AddCommGroup M₁
inst✝⁸ : Module R M
inst✝⁷ : Module R M'
inst✝⁶ : Module R M₁
inst✝⁵ : StrongRankCondition R
inst✝⁴ : Module.Free R M
inst✝³ : (i : η) → AddCommGroup (φ i)
inst✝² : (i : η) → Module R (φ i)
inst✝¹ : ∀ (i : η), Module.Free R (φ i)
ι : Type v
inst✝ : Fintype ι
⊢ finrank R (ι → R) = Fintype.card ι
state_after: no goals
tactic: simp [finrank]
Theorem: Submodule.biSup_eq_range_dfinsupp_lsum
File: Mathlib/LinearAlgebra/DFinsupp.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : DecidableEq ι
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
⊢ ⨆ i, ⨆ (_ : p i), S i = LinearMap.range (((lsum ℕ) fun i => (S i).subtype) ∘ₗ filterLinearMap R (fun i => ↥(S i)) p)
state_after: case a
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : DecidableEq ι
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
⊢ ⨆ i, ⨆ (_ : p i), S i ≤ LinearMap.range (((lsum ℕ) fun i => (S i).subtype) ∘ₗ filterLinearMap R (fun i => ↥(S i)) p)

case a
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : DecidableEq ι
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
⊢ LinearMap.range (((lsum ℕ) fun i => (S i).subtype) ∘ₗ filterLinearMap R (fun i => ↥(S i)) p) ≤ ⨆ i, ⨆ (_ : p i), S i
tactic: apply le_antisymm
Theorem: Pell.n_lt_a_pow
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ n + 1 < a ^ (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
⊢ n + 1 < a ^ (n + 1)
tactic: have IH := n_lt_a_pow n
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
⊢ n + 1 < a ^ (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ (n + 1)
tactic: have : a ^ n + a ^ n ≤ a ^ n * a := by
      rw [← mul_two]
      exact Nat.mul_le_mul_left _ a1
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ n * a
tactic: simp only [_root_.pow_succ, gt_iff_lt]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ n * a
state_after: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ n + a ^ n
tactic: refine lt_of_lt_of_le ?_ this
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ n + a ^ n
state_after: no goals
tactic: exact add_lt_add_of_lt_of_le IH (lt_of_le_of_lt (Nat.zero_le _) IH)
Theorem: toIocDiv_add_zsmul'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ toIocDiv hp (a + m • p) b = toIocDiv hp a b - m
state_after: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b - (toIocDiv hp a b - m) • p ∈ Set.Ioc (a + m • p) (a + m • p + p)
tactic: refine toIocDiv_eq_of_sub_zsmul_mem_Ioc _ ?_
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b - (toIocDiv hp a b - m) • p ∈ Set.Ioc (a + m • p) (a + m • p + p)
state_after: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b - toIocDiv hp a b • p + m • p ∈ Set.Ioc (a + m • p) (a + p + m • p)
tactic: rw [sub_smul, ← sub_add, add_right_comm]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b - toIocDiv hp a b • p + m • p ∈ Set.Ioc (a + m • p) (a + p + m • p)
state_after: no goals
tactic: simpa using sub_toIocDiv_zsmul_mem_Ioc hp a b
Theorem: LieSubmodule.codisjoint_iff_coe_toSubmodule
File: Mathlib/Algebra/Lie/Submodule.lean

Proof steps:
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
⊢ Codisjoint N N' ↔ Codisjoint ↑N ↑N'
state_after: no goals
tactic: rw [codisjoint_iff, codisjoint_iff, ← coe_toSubmodule_eq_iff, sup_coe_toSubmodule,
    top_coeSubmodule, ← codisjoint_iff]
Theorem: expNegInvGlue.contDiff
File: Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean

Proof steps:
state_before: n : ℕ∞
⊢ ContDiff ℝ n expNegInvGlue
state_after: no goals
tactic: simpa using contDiff_polynomial_eval_inv_mul 1
Theorem: CategoryTheory.regularTopology.eq_induced
File: Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.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
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
⊢ regularTopology C = F.inducedTopology (regularTopology D)
state_after: case h.h.h
C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{u_4, u_2} D
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
X : C
S : Sieve X
⊢ S ∈ (regularTopology C).sieves X ↔ S ∈ (F.inducedTopology (regularTopology D)).sieves X
tactic: ext X S
state_before: case h.h.h
C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{u_4, u_2} D
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
X : C
S : Sieve X
⊢ S ∈ (regularTopology C).sieves X ↔ S ∈ (F.inducedTopology (regularTopology D)).sieves X
state_after: case h.h.h
C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{u_4, u_2} D
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
X : C
S : Sieve X
this : Preregular C
⊢ S ∈ (regularTopology C).sieves X ↔ S ∈ (F.inducedTopology (regularTopology D)).sieves X
tactic: have := F.reflects_preregular
state_before: case h.h.h
C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{u_4, u_2} D
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
X : C
S : Sieve X
this : Preregular C
⊢ S ∈ (regularTopology C).sieves X ↔ S ∈ (F.inducedTopology (regularTopology D)).sieves X
state_after: case h.h.h
C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{u_4, u_2} D
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
X : C
S : Sieve X
this : Preregular C
⊢ S ∈ (regularTopology C).sieves X ↔ ∃ Y π, EffectiveEpi π ∧ S.arrows π
tactic: rw [← exists_effectiveEpi_iff_mem_induced F X]
state_before: case h.h.h
C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{u_4, u_2} D
F : C ⥤ D
inst✝⁵ : F.PreservesEffectiveEpis
inst✝⁴ : F.ReflectsEffectiveEpis
inst✝³ : F.Full
inst✝² : F.Faithful
inst✝¹ : F.EffectivelyEnough
inst✝ : Preregular D
X : C
S : Sieve X
this : Preregular C
⊢ S ∈ (regularTopology C).sieves X ↔ ∃ Y π, EffectiveEpi π ∧ S.arrows π
state_after: no goals
tactic: rw [← mem_sieves_iff_hasEffectiveEpi S]
Theorem: CategoryTheory.epi_of_epi
File: Mathlib/CategoryTheory/Category/Basic.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi (f ≫ g)
⊢ Epi g
state_after: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi (f ≫ g)
⊢ ∀ {Z_1 : C} (g_1 h : Z ⟶ Z_1), g ≫ g_1 = g ≫ h → g_1 = h
tactic: constructor
state_before: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi (f ≫ g)
⊢ ∀ {Z_1 : C} (g_1 h : Z ⟶ Z_1), g ≫ g_1 = g ≫ h → g_1 = h
state_after: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : g ≫ a = g ≫ b
⊢ a = b
tactic: intro Z a b w
state_before: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : g ≫ a = g ≫ b
⊢ a = b
state_after: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : (fun k => f ≫ k) (g ≫ a) = (fun k => f ≫ k) (g ≫ b)
⊢ a = b
tactic: replace w := congr_arg (fun k => f ≫ k) w
state_before: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : (fun k => f ≫ k) (g ≫ a) = (fun k => f ≫ k) (g ≫ b)
⊢ a = b
state_after: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : f ≫ g ≫ a = f ≫ g ≫ b
⊢ a = b
tactic: dsimp at w
state_before: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : f ≫ g ≫ a = f ≫ g ≫ b
⊢ a = b
state_after: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : (f ≫ g) ≫ a = (f ≫ g) ≫ b
⊢ a = b
tactic: rw [← Category.assoc, ← Category.assoc] at w
state_before: case left_cancellation
C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
g : Y ⟶ Z✝
inst✝ : Epi (f ≫ g)
Z : C
a b : Z✝ ⟶ Z
w : (f ≫ g) ≫ a = (f ≫ g) ≫ b
⊢ a = b
state_after: no goals
tactic: exact (cancel_epi _).1 w
Theorem: Real.ediam_eq
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Bornology.IsBounded s
⊢ EMetric.diam s = ENNReal.ofReal (sSup s - sInf s)
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
h : Bornology.IsBounded ∅
⊢ EMetric.diam ∅ = ENNReal.ofReal (sSup ∅ - sInf ∅)

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Bornology.IsBounded s
hne : s.Nonempty
⊢ EMetric.diam s = ENNReal.ofReal (sSup s - sInf s)
tactic: rcases eq_empty_or_nonempty s with (rfl | hne)
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Bornology.IsBounded s
hne : s.Nonempty
⊢ EMetric.diam s = ENNReal.ofReal (sSup s - sInf s)
state_after: case inr.refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Bornology.IsBounded s
hne : s.Nonempty
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
⊢ dist x y ≤ sSup s - sInf s

case inr.refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Bornology.IsBounded s
hne : s.Nonempty
⊢ ENNReal.ofReal (sSup s - sInf s) ≤ EMetric.diam s
tactic: refine le_antisymm (Metric.ediam_le_of_forall_dist_le fun x hx y hy => ?_) ?_
Theorem: UniqueFactorizationMonoid.normalizedFactors_irreducible
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
⊢ normalizedFactors a = {normalize a}
state_after: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
p : α
a_assoc : a ~ᵤ p
hp : normalizedFactors a = {p}
⊢ normalizedFactors a = {normalize a}
tactic: obtain ⟨p, a_assoc, hp⟩ :=
    prime_factors_irreducible ha ⟨prime_of_normalized_factor, normalizedFactors_prod ha.ne_zero⟩
state_before: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
p : α
a_assoc : a ~ᵤ p
hp : normalizedFactors a = {p}
⊢ normalizedFactors a = {normalize a}
state_after: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
p : α
a_assoc : a ~ᵤ p
hp : normalizedFactors a = {p}
p_mem : p ∈ normalizedFactors a
⊢ normalizedFactors a = {normalize a}
tactic: have p_mem : p ∈ normalizedFactors a := by
    rw [hp]
    exact Multiset.mem_singleton_self _
state_before: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
p : α
a_assoc : a ~ᵤ p
hp : normalizedFactors a = {p}
p_mem : p ∈ normalizedFactors a
⊢ normalizedFactors a = {normalize a}
state_after: case h.e'_3.h.e'_4
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
p : α
a_assoc : a ~ᵤ p
hp : normalizedFactors a = {p}
p_mem : p ∈ normalizedFactors a
⊢ normalize a = p
tactic: convert hp
state_before: case h.e'_3.h.e'_4
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : Irreducible a
p : α
a_assoc : a ~ᵤ p
hp : normalizedFactors a = {p}
p_mem : p ∈ normalizedFactors a
⊢ normalize a = p
state_after: no goals
tactic: rwa [← normalize_normalized_factor p p_mem, normalize_eq_normalize_iff, dvd_dvd_iff_associated]
Theorem: CompositionAsSet.boundary_zero
File: Mathlib/Combinatorics/Enumerative/Composition.lean

Proof steps:
state_before: n : ℕ
c : CompositionAsSet n
⊢ c.boundary ⟨0, ⋯⟩ = 0
state_after: n : ℕ
c : CompositionAsSet n
⊢ c.boundaries.min' ⋯ = 0
tactic: rw [boundary, Finset.orderEmbOfFin_zero rfl c.card_boundaries_pos]
state_before: n : ℕ
c : CompositionAsSet n
⊢ c.boundaries.min' ⋯ = 0
state_after: no goals
tactic: exact le_antisymm (Finset.min'_le _ _ c.zero_mem) (Fin.zero_le _)
Theorem: IsCoprime.mul_add_right_left
File: Mathlib/RingTheory/Coprime/Basic.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (z * y + x) y
state_after: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (x + z * y) y
tactic: rw [add_comm]
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (x + z * y) y
state_after: no goals
tactic: exact h.add_mul_right_left z
Theorem: Filter.EventuallyEq.hasDerivAtFilter_iff
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

Proof steps:
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
h₀ : f₀ =ᶠ[L] f₁
hx : f₀ x = f₁ x
h₁ : f₀' = f₁'
⊢ ∀ (x : 𝕜), (smulRight 1 f₀') x = (smulRight 1 f₁') x
state_after: no goals
tactic: simp [h₁]
Theorem: Int.isCoprime_iff_gcd_eq_one
File: Mathlib/RingTheory/Coprime/Lemmas.lean

Proof steps:
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℤ
⊢ IsCoprime m n ↔ m.gcd n = 1
state_after: case mp
R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℤ
⊢ IsCoprime m n → m.gcd n = 1

case mpr
R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℤ
⊢ m.gcd n = 1 → IsCoprime m n
tactic: constructor
Theorem: Commute.inv
File: Mathlib/Algebra/Group/Commute/Defs.lean

Proof steps:
state_before: G : Type u_1
M : Type u_2
S : Type u_3
inst✝ : DivisionMonoid G
a b c d : G
hab : Commute a b
⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹
state_after: no goals
tactic: rw [hab.eq, mul_inv_rev]
Theorem: WeierstrassCurve.Φ_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean

Proof steps:
state_before: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W : WeierstrassCurve R
⊢ W.Φ 0 = 1
state_after: no goals
tactic: rw [Φ, ΨSq_zero, mul_zero, zero_sub, zero_add, preΨ_one, one_mul, zero_sub, preΨ_neg, preΨ_one,
    neg_one_mul, neg_neg, if_pos even_zero]
Theorem: String.foldl_eq
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: α : Type u_1
f : α → Char → α
s : String
a : α
⊢ foldl f a s = List.foldl f a s.data
state_after: no goals
tactic: simpa using foldlAux_of_valid f [] s.1 [] a
Theorem: ExponentExists.is_add_torsion
File: Mathlib/GroupTheory/Torsion.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
inst✝¹ : Group G
N : Subgroup G
inst✝ : Group H
h : ExponentExists G
g : G
⊢ IsOfFinOrder g
state_after: case intro.intro
G : Type u_1
H : Type u_2
inst✝¹ : Group G
N : Subgroup G
inst✝ : Group H
g : G
n : ℕ
npos : 0 < n
hn : ∀ (g : G), g ^ n = 1
⊢ IsOfFinOrder g
tactic: obtain ⟨n, npos, hn⟩ := h
state_before: case intro.intro
G : Type u_1
H : Type u_2
inst✝¹ : Group G
N : Subgroup G
inst✝ : Group H
g : G
n : ℕ
npos : 0 < n
hn : ∀ (g : G), g ^ n = 1
⊢ IsOfFinOrder g
state_after: no goals
tactic: exact isOfFinOrder_iff_pow_eq_one.mpr ⟨n, npos, hn g⟩