ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Function.Surjective.tsum_eq_tsum_of_hasSum_iff_hasSum
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : CommMonoid α
inst✝³ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
inst✝² : T2Space α
α' : Type u_5
inst✝¹ : CommMonoid α'
inst✝ : TopologicalSpace α'
e : α' → α
hes : Surjective e
h1 : e 1 = 1
f : β → α
g : γ → α'
h : ∀ {a : α'}, HasProd f (e a) ↔ HasProd g a
hg : ¬Multipliable g
⊢ ∏' (b : β), f b = e (∏' (c : γ), g c)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : CommMonoid α
inst✝³ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
inst✝² : T2Space α
α' : Type u_5
inst✝¹ : CommMonoid α'
inst✝ : TopologicalSpace α'
e : α' → α
hes : Surjective e
h1 : e 1 = 1
f : β → α
g : γ → α'
h : ∀ {a : α'}, HasProd f (e a) ↔ HasProd g a
hg : ¬Multipliable g
hf : ¬Multipliable f
⊢ ∏' (b : β), f b = e (∏' (c : γ), g c)
tactic: have hf : ¬Multipliable f := mt (hes.multipliable_iff_of_hasProd_iff @h).1 hg
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : CommMonoid α
inst✝³ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
inst✝² : T2Space α
α' : Type u_5
inst✝¹ : CommMonoid α'
inst✝ : TopologicalSpace α'
e : α' → α
hes : Surjective e
h1 : e 1 = 1
f : β → α
g : γ → α'
h : ∀ {a : α'}, HasProd f (e a) ↔ HasProd g a
hg : ¬Multipliable g
hf : ¬Multipliable f
⊢ ∏' (b : β), f b = e (∏' (c : γ), g c)
state_after: no goals
tactic: simp [tprod_def, hf, hg, h1]
Theorem: SkyscraperPresheafFunctor.map'_id
File: Mathlib/Topology/Sheaves/Skyscraper.lean

Proof steps:
state_before: X : TopCat
p₀ : ↑X
inst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝¹ : Category.{w, v} C
inst✝ : HasTerminal C
A a : C
⊢ map' p₀ (𝟙 a) = 𝟙 (skyscraperPresheaf p₀ a)
state_after: case w
X : TopCat
p₀ : ↑X
inst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝¹ : Category.{w, v} C
inst✝ : HasTerminal C
A a : C
U : Opens ↑X
⊢ (map' p₀ (𝟙 a)).app (op U) = (𝟙 (skyscraperPresheaf p₀ a)).app (op U)
tactic: ext U
state_before: case w
X : TopCat
p₀ : ↑X
inst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝¹ : Category.{w, v} C
inst✝ : HasTerminal C
A a : C
U : Opens ↑X
⊢ (map' p₀ (𝟙 a)).app (op U) = (𝟙 (skyscraperPresheaf p₀ a)).app (op U)
state_after: case w
X : TopCat
p₀ : ↑X
inst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝¹ : Category.{w, v} C
inst✝ : HasTerminal C
A a : C
U : Opens ↑X
⊢ (if h : p₀ ∈ U then eqToHom ⋯ ≫ 𝟙 a ≫ eqToHom ⋯
    else (⋯ ▸ terminalIsTerminal).from ((skyscraperPresheaf p₀ a).obj (op U))) =
    (𝟙 (skyscraperPresheaf p₀ a)).app (op U)
tactic: simp only [SkyscraperPresheafFunctor.map'_app, NatTrans.id_app]
state_before: case w
X : TopCat
p₀ : ↑X
inst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝¹ : Category.{w, v} C
inst✝ : HasTerminal C
A a : C
U : Opens ↑X
⊢ (if h : p₀ ∈ U then eqToHom ⋯ ≫ 𝟙 a ≫ eqToHom ⋯
    else (⋯ ▸ terminalIsTerminal).from ((skyscraperPresheaf p₀ a).obj (op U))) =
    (𝟙 (skyscraperPresheaf p₀ a)).app (op U)
state_after: no goals
tactic: split_ifs <;> aesop_cat
Theorem: Monoid.ExponentExists.isOfFinOrder
File: Mathlib/GroupTheory/Exponent.lean

Proof steps:
state_before: G : Type u
inst✝ : Monoid G
h : ExponentExists G
g : G
⊢ ∃ n, 0 < n ∧ g ^ n = 1
state_after: case h.h
G : Type u
inst✝ : Monoid G
h : ExponentExists G
g : G
n✝ : ℕ
p✝ : 0 < n✝
this : ∀ (g : G), g ^ n✝ = 1
⊢ g ^ n✝ = 1
tactic: peel 2 h
state_before: case h.h
G : Type u
inst✝ : Monoid G
h : ExponentExists G
g : G
n✝ : ℕ
p✝ : 0 < n✝
this : ∀ (g : G), g ^ n✝ = 1
⊢ g ^ n✝ = 1
state_after: no goals
tactic: exact this g
Theorem: IsMulFreimanHom.div
File: Mathlib/Combinatorics/Additive/FreimanHom.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β✝ : Type u_3
γ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : DivisionCommMonoid β✝
A : Set α
B : Set β✝
f : α → β✝
m n : ℕ
β : Type u_5
inst✝ : DivisionCommMonoid β
B₁ B₂ : Set β
f₁ f₂ : α → β
h₁ : IsMulFreimanHom n A B₁ f₁
h₂ : IsMulFreimanHom n A B₂ f₂
s t : Multiset α
hsA : ∀ ⦃x : α⦄, x ∈ s → x ∈ A
htA : ∀ ⦃x : α⦄, x ∈ t → x ∈ A
hs : card s = n
ht : card t = n
h : s.prod = t.prod
⊢ (map (f₁ / f₂) s).prod = (map (f₁ / f₂) t).prod
state_after: no goals
tactic: rw [Pi.div_def, prod_map_div, prod_map_div, h₁.map_prod_eq_map_prod hsA htA hs ht h,
      h₂.map_prod_eq_map_prod hsA htA hs ht h]
Theorem: Finset.preimage_add_right_zero'
File: Mathlib/Data/Finset/Pointwise.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Finset α
a b : α
⊢ preimage 1 (fun x => x * b⁻¹) ⋯ = {b}
state_after: no goals
tactic: rw [preimage_mul_right_one, inv_inv]
Theorem: UniformSpace.hasBasis_nhds
File: Mathlib/Topology/UniformSpace/Basic.lean

Proof steps:
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
t : Set α
⊢ t ∈ 𝓝 x ↔ ∃ i, (i ∈ 𝓤 α ∧ SymmetricRel i) ∧ ball x i ⊆ t
state_after: no goals
tactic: simp [UniformSpace.mem_nhds_iff_symm, and_assoc]
Theorem: _private.Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds.0.HurwitzKernelBounds.isBigO_one_aux
File: Mathlib/NumberTheory/ModularForms/JacobiTheta/Bounds.lean

Proof steps:
state_before: ⊢ (fun t => (1 - rexp (-π * t))⁻¹) =O[atTop] fun x => 1
state_after: ⊢ Tendsto (fun x => rexp (-π * x)) atTop (𝓝 0)
tactic: refine ((Tendsto.const_sub _ ?_).inv₀ (by norm_num)).isBigO_one ℝ (c := ((1 - 0)⁻¹ : ℝ))
state_before: ⊢ Tendsto (fun x => rexp (-π * x)) atTop (𝓝 0)
state_after: no goals
tactic: simpa only [neg_mul, tendsto_exp_comp_nhds_zero, tendsto_neg_atBot_iff]
    using tendsto_id.const_mul_atTop pi_pos
Theorem: Set.ncard_lt_ncard_iff_ncard_diff_lt_ncard_diff
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hs : autoParam s.Finite _auto✝
ht : autoParam t.Finite _auto✝
⊢ s.ncard < t.ncard ↔ (s \ t).ncard < (t \ s).ncard
state_after: no goals
tactic: rw [← ncard_inter_add_ncard_diff_eq_ncard s t hs, ← ncard_inter_add_ncard_diff_eq_ncard t s ht,
    inter_comm, add_lt_add_iff_left]
Theorem: Nat.add_div_eq_of_le_mod_add_mod
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc : c ≤ a % c + b % c
hc0 : 0 < c
⊢ (a + b) / c = a / c + b / c + 1
state_after: no goals
tactic: rw [add_div hc0, if_pos hc]
Theorem: SimpleGraph.Walk.toSubgraph_le_induce_support
File: Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean

Proof steps:
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
u v w : V
p : G.Walk u v
⊢ p.toSubgraph ≤ ⊤.induce {v_1 | v_1 ∈ p.support}
state_after: case h.e'_4.h.e'_4
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
u v w : V
p : G.Walk u v
⊢ {v_1 | v_1 ∈ p.support} = p.toSubgraph.verts
tactic: convert Subgraph.le_induce_top_verts
state_before: case h.e'_4.h.e'_4
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
u v w : V
p : G.Walk u v
⊢ {v_1 | v_1 ∈ p.support} = p.toSubgraph.verts
state_after: no goals
tactic: exact p.verts_toSubgraph.symm
Theorem: padicValRat.neg
File: Mathlib/NumberTheory/Padics/PadicVal.lean

Proof steps:
state_before: p : ℕ
q : ℚ
⊢ padicValRat p (-q) = padicValRat p q
state_after: no goals
tactic: simp [padicValRat, padicValInt]
Theorem: CochainComplex.HomComplex.Cochain.rightShift_v
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n' = q
p' : ℤ
hp' : p + n = p'
⊢ p' = q + a
state_after: no goals
tactic: rw [← hp', ← hpq, ← hn', add_assoc]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n' = q
p' : ℤ
hp' : p + n = p'
⊢ (γ.rightShift a n' hn').v p q hpq = γ.v p p' hp' ≫ (L.shiftFunctorObjXIso a q p' ⋯).inv
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n' = q
⊢ (γ.rightShift a n' hn').v p q hpq = γ.v p (p + n) ⋯ ≫ (L.shiftFunctorObjXIso a q (p + n) ⋯).inv
tactic: subst hp'
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n' = q
⊢ (γ.rightShift a n' hn').v p q hpq = γ.v p (p + n) ⋯ ≫ (L.shiftFunctorObjXIso a q (p + n) ⋯).inv
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n' = q
⊢ (mk fun p q hpq => γ.v p (p + n) ⋯ ≫ (L.shiftFunctorObjXIso a q (p + n) ⋯).inv).v p q hpq =
    γ.v p (p + n) ⋯ ≫ (L.shiftFunctorObjXIso a q (p + n) ⋯).inv
tactic: dsimp only [rightShift]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n' = q
⊢ (mk fun p q hpq => γ.v p (p + n) ⋯ ≫ (L.shiftFunctorObjXIso a q (p + n) ⋯).inv).v p q hpq =
    γ.v p (p + n) ⋯ ≫ (L.shiftFunctorObjXIso a q (p + n) ⋯).inv
state_after: no goals
tactic: simp only [mk_v]
Theorem: Fin.lt_iff_le_and_ne
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
a b c : Fin n
⊢ a < b ↔ a ≤ b ∧ a ≠ b
state_after: n m : ℕ
a b c : Fin n
⊢ a < b ↔ a ≤ b ∧ ↑a ≠ ↑b
tactic: rw [← val_ne_iff]
state_before: n m : ℕ
a b c : Fin n
⊢ a < b ↔ a ≤ b ∧ ↑a ≠ ↑b
state_after: no goals
tactic: exact Nat.lt_iff_le_and_ne
Theorem: AddAction.zsmul_vadd_eq_iff_minimalPeriod_dvd
File: Mathlib/Dynamics/PeriodicPts.lean

Proof steps:
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
a : G
b : α
n : ℤ
⊢ a ^ n • b = b ↔ ↑(minimalPeriod (fun x => a • x) b) ∣ n
state_after: no goals
tactic: rw [← period_eq_minimalPeriod, zpow_smul_eq_iff_period_dvd]
Theorem: Polynomial.monic_of_isUnit_leadingCoeff_inv_smul
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ (h.unit⁻¹ • p).Monic
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ ↑h.unit⁻¹ • p.leadingCoeff = 1
tactic: rw [Monic.def, leadingCoeff_smul_of_smul_regular _ (isSMulRegular_of_group _), Units.smul_def]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ ↑h.unit⁻¹ • p.leadingCoeff = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ ↑(IsUnit.unit ⋯)⁻¹ • p.leadingCoeff = 1
tactic: obtain ⟨k, hk⟩ := h
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ ↑(IsUnit.unit ⋯)⁻¹ • p.leadingCoeff = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ k = ⋯.unit * 1
tactic: simp only [← hk, smul_eq_mul, ← Units.val_mul, Units.val_eq_one, inv_mul_eq_iff_eq_mul]
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ k = ⋯.unit * 1
state_after: no goals
tactic: simp [Units.ext_iff, IsUnit.unit_spec]
Theorem: CategoryTheory.Limits.IsZero.of_epi_eq_zero
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : Epi f
h : f = 0
⊢ IsZero Y
state_after: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : Epi 0
⊢ IsZero Y
tactic: subst h
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : Epi 0
⊢ IsZero Y
state_after: no goals
tactic: apply of_epi_zero X Y
Theorem: Real.sin_pi_div_six
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: x : ℝ
⊢ sin (π / 6) = 1 / 2
state_after: x : ℝ
⊢ cos (π / 2 - π / 6) = cos (π / 3)
tactic: rw [← cos_pi_div_two_sub, ← cos_pi_div_three]
state_before: x : ℝ
⊢ cos (π / 2 - π / 6) = cos (π / 3)
state_after: case e_x
x : ℝ
⊢ π / 2 - π / 6 = π / 3
tactic: congr
state_before: case e_x
x : ℝ
⊢ π / 2 - π / 6 = π / 3
state_after: no goals
tactic: ring
Theorem: Mathlib.Tactic.Ring.coeff_one
File: Mathlib/Tactic/Ring/Basic.lean

Proof steps:
state_before: u✝ : Lean.Level
arg : Q(Type u✝)
sα✝ : Q(CommSemiring «$arg»)
u : Lean.Level
α : Q(Type u)
sα : Q(CommSemiring «$α»)
R : Type u_1
inst✝ : CommSemiring R
a a' a₁ a₂ a₃ b b' b₁ b₂ b₃ c c₁ c₂ : R
k : ℕ
⊢ k.rawCast = Nat.rawCast 1 * k
state_after: no goals
tactic: simp
Theorem: Polynomial.natDegree_C_mul_le
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

Proof steps:
state_before: R : Type u
S : Type v
ι : Type w
a✝ b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
a : R
f : R[X]
⊢ (C a).natDegree + f.natDegree = 0 + f.natDegree
state_after: no goals
tactic: rw [natDegree_C a]
Theorem: IsAlgClosed.of_exists_root
File: Mathlib/FieldTheory/IsAlgClosed/Basic.lean

Proof steps:
state_before: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
⊢ IsAlgClosed k
state_after: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p : k[X]
⊢ ∀ {g : k[X]}, Irreducible g → g ∣ map (RingHom.id k) p → g.degree = 1
tactic: refine ⟨fun p ↦ Or.inr ?_⟩
state_before: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p : k[X]
⊢ ∀ {g : k[X]}, Irreducible g → g ∣ map (RingHom.id k) p → g.degree = 1
state_after: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p q : k[X]
hq : Irreducible q
a✝ : q ∣ map (RingHom.id k) p
⊢ q.degree = 1
tactic: intro q hq _
state_before: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p q : k[X]
hq : Irreducible q
a✝ : q ∣ map (RingHom.id k) p
⊢ q.degree = 1
state_after: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p q : k[X]
hq : Irreducible q
a✝ : q ∣ map (RingHom.id k) p
this : Irreducible (q * C q.leadingCoeff⁻¹)
⊢ q.degree = 1
tactic: have : Irreducible (q * C (leadingCoeff q)⁻¹) := by
    rw [← coe_normUnit_of_ne_zero hq.ne_zero]
    exact (associated_normalize _).irreducible hq
state_before: k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p q : k[X]
hq : Irreducible q
a✝ : q ∣ map (RingHom.id k) p
this : Irreducible (q * C q.leadingCoeff⁻¹)
⊢ q.degree = 1
state_after: case intro
k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p q : k[X]
hq : Irreducible q
a✝ : q ∣ map (RingHom.id k) p
this : Irreducible (q * C q.leadingCoeff⁻¹)
x : k
hx : eval x (q * C q.leadingCoeff⁻¹) = 0
⊢ q.degree = 1
tactic: obtain ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.ne_zero) this
state_before: case intro
k : Type u
inst✝ : Field k
H : ∀ (p : k[X]), p.Monic → Irreducible p → ∃ x, eval x p = 0
p q : k[X]
hq : Irreducible q
a✝ : q ∣ map (RingHom.id k) p
this : Irreducible (q * C q.leadingCoeff⁻¹)
x : k
hx : eval x (q * C q.leadingCoeff⁻¹) = 0
⊢ q.degree = 1
state_after: no goals
tactic: exact degree_mul_leadingCoeff_inv q hq.ne_zero ▸ degree_eq_one_of_irreducible_of_root this hx
Theorem: Fin.univ_val_map
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : Fin n → α
⊢ Multiset.map f univ.val = ↑(List.ofFn f)
state_after: no goals
tactic: simp [List.ofFn_eq_map, univ_def]
Theorem: Associates.prime_pow_le_iff_le_bcount
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : DecidableEq (Associates α)
m p : Associates α
h₁ : m ≠ 0
h₂ : Irreducible p
k : ℕ
⊢ p ^ k ≤ m ↔ k ≤ bcount ⟨p, h₂⟩ m.factors
state_after: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : DecidableEq (Associates α)
p : Associates α
h₂ : Irreducible p
k : ℕ
m : α
hm : m ≠ 0
h₁ : Associates.mk m ≠ 0
⊢ p ^ k ≤ Associates.mk m ↔ k ≤ bcount ⟨p, h₂⟩ (Associates.mk m).factors
tactic: rcases Associates.exists_non_zero_rep h₁ with ⟨m, hm, rfl⟩
state_before: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : DecidableEq (Associates α)
p : Associates α
h₂ : Irreducible p
k : ℕ
m : α
hm : m ≠ 0
h₁ : Associates.mk m ≠ 0
⊢ p ^ k ≤ Associates.mk m ↔ k ≤ bcount ⟨p, h₂⟩ (Associates.mk m).factors
state_after: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : DecidableEq (Associates α)
p : Associates α
h₂ : Irreducible p
k : ℕ
m : α
hm : m ≠ 0
h₁ : Associates.mk m ≠ 0
this : Nontrivial α
⊢ p ^ k ≤ Associates.mk m ↔ k ≤ bcount ⟨p, h₂⟩ (Associates.mk m).factors
tactic: have := nontrivial_of_ne _ _ hm
state_before: case intro.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : DecidableEq (Associates α)
p : Associates α
h₂ : Irreducible p
k : ℕ
m : α
hm : m ≠ 0
h₁ : Associates.mk m ≠ 0
this : Nontrivial α
⊢ p ^ k ≤ Associates.mk m ↔ k ≤ bcount ⟨p, h₂⟩ (Associates.mk m).factors
state_after: no goals
tactic: rw [bcount, factors_mk, Multiset.le_count_iff_replicate_le, ← factors_le, factors_prime_pow,
    factors_mk, WithTop.coe_le_coe] <;> assumption
Theorem: Set.sInter_eq_iInter
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
s : Set (Set α)
⊢ ⋂₀ s = ⋂ i, ↑i
state_after: no goals
tactic: simp only [← sInter_range, Subtype.range_coe]
Theorem: QuaternionAlgebra.equivTuple_symm_apply
File: Mathlib/Algebra/Quaternion.lean

Proof steps:
state_before: R : Type u_1
c₁ c₂ : R
f : Fin 4 → R
⊢ (fun a => ![a.re, a.imI, a.imJ, a.imK]) ((fun a => { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }) f) = f
state_after: no goals
tactic: ext ⟨_, _ | _ | _ | _ | _ | ⟨⟩⟩ <;> rfl
Theorem: Matrix.SpecialLinearGroup.scalar_eq_self_of_mem_center
File: Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean

Proof steps:
state_before: n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
R : Type v
inst✝¹ : CommRing R
S : Type u_1
inst✝ : CommRing S
A : SpecialLinearGroup n R
hA : A ∈ center (SpecialLinearGroup n R)
i : n
⊢ (scalar n) (↑A i i) = ↑A
state_after: case intro
n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
R : Type v
inst✝¹ : CommRing R
S : Type u_1
inst✝ : CommRing S
A : SpecialLinearGroup n R
hA : A ∈ center (SpecialLinearGroup n R)
i : n
r : R
hr : (scalar n) r = ↑A
⊢ (scalar n) (↑A i i) = ↑A
tactic: obtain ⟨r : R, hr : scalar n r = A⟩ := mem_range_scalar_of_commute_transvectionStruct fun t ↦
    Subtype.ext_iff.mp <| Subgroup.mem_center_iff.mp hA ⟨t.toMatrix, by simp⟩
state_before: case intro
n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
R : Type v
inst✝¹ : CommRing R
S : Type u_1
inst✝ : CommRing S
A : SpecialLinearGroup n R
hA : A ∈ center (SpecialLinearGroup n R)
i : n
r : R
hr : (scalar n) r = ↑A
⊢ (scalar n) (↑A i i) = ↑A
state_after: no goals
tactic: simp [← congr_fun₂ hr i i, ← hr]
Theorem: Sym.erase_mk
File: Mathlib/Data/Sym/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
m : Multiset α
hc : Multiset.card m = n + 1
a : α
h : a ∈ m
⊢ Multiset.card (m.erase a) = n
state_after: no goals
tactic: rw [Multiset.card_erase_of_mem h, hc, Nat.add_one, Nat.pred_succ]
Theorem: WeierstrassCurve.Affine.CoordinateRing.basis_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
⊢ (CoordinateRing.basis W) 0 = 1
state_after: no goals
tactic: simpa only [basis_apply] using pow_zero _
Theorem: Filter.sInter_mem
File: Mathlib/Order/Filter/Basic.lean

Proof steps:
state_before: α : Type u
f g : Filter α
s✝ t : Set α
s : Set (Set α)
hfin : s.Finite
⊢ ⋂₀ s ∈ f ↔ ∀ U ∈ s, U ∈ f
state_after: no goals
tactic: rw [sInter_eq_biInter, biInter_mem hfin]
Theorem: CategoryTheory.Limits.Multifork.toPiFork_pt
File: Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

Proof steps:
state_before: C : Type u
inst✝² : Category.{v, u} C
I : MulticospanIndex C
K✝ : Multifork I
inst✝¹ : HasProduct I.left
inst✝ : HasProduct I.right
K : Multifork I
⊢ ∀ ⦃X Y : WalkingParallelPair⦄ (f : X ⟶ Y),
    ((Functor.const WalkingParallelPair).obj K.pt).map f ≫
        (fun x =>
            match x with
            | WalkingParallelPair.zero => Pi.lift K.ι
            | WalkingParallelPair.one => Pi.lift K.ι ≫ I.fstPiMap)
          Y =
      (fun x =>
            match x with
            | WalkingParallelPair.zero => Pi.lift K.ι
            | WalkingParallelPair.one => Pi.lift K.ι ≫ I.fstPiMap)
          X ≫
        (parallelPair I.fstPiMap I.sndPiMap).map f
state_after: no goals
tactic: rintro (_ | _) (_ | _) (_ | _ | _) <;>
          dsimp <;>
          simp only [Category.id_comp, Functor.map_id, parallelPair_obj_zero, Category.comp_id,
            pi_condition, parallelPair_obj_one]
Theorem: Set.encard_eq_two
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Set α
⊢ s.encard = 2 ↔ ∃ x y, x ≠ y ∧ s = {x, y}
state_after: α : Type u_1
β : Type u_2
s t : Set α
h : s.encard = 2
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
tactic: refine ⟨fun h ↦ ?_, fun ⟨x, y, hne, hs⟩ ↦ by rw [hs, encard_pair hne]⟩
state_before: α : Type u_1
β : Type u_2
s t : Set α
h : s.encard = 2
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case intro
α : Type u_1
β : Type u_2
s t : Set α
h : s.encard = 2
x : α
hx : x ∈ s
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
tactic: obtain ⟨x, hx⟩ := nonempty_of_encard_ne_zero (s := s) (by rw [h]; simp)
state_before: case intro
α : Type u_1
β : Type u_2
s t : Set α
h : s.encard = 2
x : α
hx : x ∈ s
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case intro
α : Type u_1
β : Type u_2
s t : Set α
x : α
h : ∃ x_1, s \ {x} = {x_1}
hx : x ∈ s
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
tactic: rw [← insert_eq_of_mem hx, ← insert_diff_singleton, encard_insert_of_not_mem (fun h ↦ h.2 rfl),
    ← one_add_one_eq_two, WithTop.add_right_cancel_iff (WithTop.one_ne_top), encard_eq_one] at h
state_before: case intro
α : Type u_1
β : Type u_2
s t : Set α
x : α
h : ∃ x_1, s \ {x} = {x_1}
hx : x ∈ s
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case intro.intro
α : Type u_1
β : Type u_2
s t : Set α
x : α
hx : x ∈ s
y : α
h : s \ {x} = {y}
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
tactic: obtain ⟨y, h⟩ := h
state_before: case intro.intro
α : Type u_1
β : Type u_2
s t : Set α
x : α
hx : x ∈ s
y : α
h : s \ {x} = {y}
⊢ ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case intro.intro
α : Type u_1
β : Type u_2
s t : Set α
x : α
hx : x ∈ s
y : α
h : s \ {x} = {y}
⊢ s = {x, y}
tactic: refine ⟨x, y, by rintro rfl; exact (h.symm.subset rfl).2 rfl, ?_⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
s t : Set α
x : α
hx : x ∈ s
y : α
h : s \ {x} = {y}
⊢ s = {x, y}
state_after: no goals
tactic: rw [← h, insert_diff_singleton, insert_eq_of_mem hx]