ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Polynomial.geom_sum_X_comp_X_add_one_eq_sum
File: Mathlib/RingTheory/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
S : Type u_1
inst✝ : Semiring R
n : ℕ
⊢ (∑ i ∈ range n, X ^ i).comp (X + 1) = ∑ i ∈ range n, ↑(n.choose (i + 1)) * X ^ i
state_after: case a
R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = (∑ i ∈ range n, ↑(n.choose (i + 1)) * X ^ i).coeff i
tactic: ext i
state_before: case a
R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = (∑ i ∈ range n, ↑(n.choose (i + 1)) * X ^ i).coeff i
state_after: R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = ↑(n.choose (i + 1))

R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ↑(n.choose (i + 1)) = (∑ i ∈ range n, ↑(n.choose (i + 1)) * X ^ i).coeff i
tactic: trans (n.choose (i + 1) : R)
state_before: R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = ↑(n.choose (i + 1))

R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ↑(n.choose (i + 1)) = (∑ i ∈ range n, ↑(n.choose (i + 1)) * X ^ i).coeff i
state_after: R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ↑(n.choose (i + 1)) = (∑ i ∈ range n, ↑(n.choose (i + 1)) * X ^ i).coeff i

R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = ↑(n.choose (i + 1))
tactic: swap
state_before: R : Type u
S : Type u_1
inst✝ : Semiring R
n i : ℕ
⊢ ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = ↑(n.choose (i + 1))
state_after: case zero
R : Type u
S : Type u_1
inst✝ : Semiring R
i : ℕ
⊢ ((∑ i ∈ range 0, X ^ i).comp (X + 1)).coeff i = ↑(Nat.choose 0 (i + 1))

case succ
R : Type u
S : Type u_1
inst✝ : Semiring R
n : ℕ
ih : ∀ (i : ℕ), ((∑ i ∈ range n, X ^ i).comp (X + 1)).coeff i = ↑(n.choose (i + 1))
i : ℕ
⊢ ((∑ i ∈ range (n + 1), X ^ i).comp (X + 1)).coeff i = ↑((n + 1).choose (i + 1))
tactic: induction' n with n ih generalizing i
Theorem: Polynomial.hasseDeriv_monomial
File: Mathlib/Algebra/Polynomial/HasseDeriv.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
⊢ (hasseDeriv k) ((monomial n) r) = (monomial (n - k)) (↑(n.choose k) * r)
state_after: case a
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
⊢ ((hasseDeriv k) ((monomial n) r)).coeff i = ((monomial (n - k)) (↑(n.choose k) * r)).coeff i
tactic: ext i
state_before: case a
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
⊢ ((hasseDeriv k) ((monomial n) r)).coeff i = ((monomial (n - k)) (↑(n.choose k) * r)).coeff i
state_after: case a
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
⊢ (↑((i + k).choose k) * if n = i + k then r else 0) = if n - k = i then ↑(n.choose k) * r else 0
tactic: simp only [hasseDeriv_coeff, coeff_monomial]
state_before: case a
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
⊢ (↑((i + k).choose k) * if n = i + k then r else 0) = if n - k = i then ↑(n.choose k) * r else 0
state_after: case pos
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : n = i + k
⊢ (↑((i + k).choose k) * if n = i + k then r else 0) = if n - k = i then ↑(n.choose k) * r else 0

case neg
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n = i + k
⊢ (↑((i + k).choose k) * if n = i + k then r else 0) = if n - k = i then ↑(n.choose k) * r else 0
tactic: by_cases hnik : n = i + k
Theorem: CategoryTheory.yonedaEquiv_naturality
File: Mathlib/CategoryTheory/Yoneda.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ F.map g.op (yonedaEquiv f) = yonedaEquiv (yoneda.map g ≫ f)
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ (f.app (op X) ≫ F.map g.op) (𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
tactic: change (f.app (op X) ≫ F.map g.op) (𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ (f.app (op X) ≫ F.map g.op) (𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ ((yoneda.obj X).map g.op ≫ f.app (op Y)) (𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
tactic: rw [← f.naturality]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ ((yoneda.obj X).map g.op ≫ f.app (op Y)) (𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ f.app (op Y) (g ≫ 𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
tactic: dsimp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ f.app (op Y) (g ≫ 𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
state_after: no goals
tactic: simp
Theorem: MeasureTheory.lintegral_singleton'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : Measurable f
a : α
⊢ ∫⁻ (x : α) in {a}, f x ∂μ = f a * μ {a}
state_after: no goals
tactic: simp only [restrict_singleton, lintegral_smul_measure, lintegral_dirac' _ hf, mul_comm]
Theorem: Ico_subset_closure_interior
File: Mathlib/Topology/Order/DenselyOrdered.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b✝ : α
s : Set α
a b : α
⊢ Ico a b ⊆ closure (interior (Ico a b))
state_after: no goals
tactic: simpa only [dual_Ioc] using Ioc_subset_closure_interior (OrderDual.toDual b) (OrderDual.toDual a)
Theorem: IsLocalization.sec_fst_ne_zero
File: Mathlib/RingTheory/Localization/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
⊢ (sec M x).1 ≠ 0
state_after: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
hsec : x * (algebraMap R S) ↑(sec M x).2 = (algebraMap R S) (sec M x).1
⊢ (sec M x).1 ≠ 0
tactic: have hsec := sec_spec M x
state_before: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
hsec : x * (algebraMap R S) ↑(sec M x).2 = (algebraMap R S) (sec M x).1
⊢ (sec M x).1 ≠ 0
state_after: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
hsec : x * (algebraMap R S) ↑(sec M x).2 = (algebraMap R S) (sec M x).1
hfst : (sec M x).1 = 0
⊢ False
tactic: intro hfst
state_before: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
hsec : x * (algebraMap R S) ↑(sec M x).2 = (algebraMap R S) (sec M x).1
hfst : (sec M x).1 = 0
⊢ False
state_after: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
hsec : x = 0 ∨ ↑(sec M x).2 = 0
hfst : (sec M x).1 = 0
⊢ False

case hf
R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommRing P
K : Type u_4
inst✝² : IsLocalization M S
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors S
hM : M ≤ nonZeroDivisors R
x : S
hx : x ≠ 0
hsec : x = 0 ∨ (algebraMap R S) ↑(sec M x).2 = 0
hfst : (sec M x).1 = 0
⊢ Injective ⇑(algebraMap R S)
tactic: rw [hfst, map_zero, mul_eq_zero, _root_.map_eq_zero_iff] at hsec
Theorem: lowerCentralSeries_isDescendingCentralSeries
File: Mathlib/GroupTheory/Nilpotent.lean

Proof steps:
state_before: G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
⊢ IsDescendingCentralSeries (lowerCentralSeries G)
state_after: case left
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
⊢ lowerCentralSeries G 0 = ⊤

case right
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
⊢ ∀ (x : G) (n : ℕ), x ∈ lowerCentralSeries G n → ∀ (g : G), x * g * x⁻¹ * g⁻¹ ∈ lowerCentralSeries G (n + 1)
tactic: constructor
state_before: case right
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
⊢ ∀ (x : G) (n : ℕ), x ∈ lowerCentralSeries G n → ∀ (g : G), x * g * x⁻¹ * g⁻¹ ∈ lowerCentralSeries G (n + 1)
state_after: case right
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
x : G
n : ℕ
hxn : x ∈ lowerCentralSeries G n
g : G
⊢ x * g * x⁻¹ * g⁻¹ ∈ lowerCentralSeries G (n + 1)
tactic: intro x n hxn g
state_before: case right
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
x : G
n : ℕ
hxn : x ∈ lowerCentralSeries G n
g : G
⊢ x * g * x⁻¹ * g⁻¹ ∈ lowerCentralSeries G (n + 1)
state_after: no goals
tactic: exact commutator_mem_commutator hxn (mem_top g)
Theorem: derivedSeries_normal
File: Mathlib/GroupTheory/Solvable.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
f : G →* G'
n : ℕ
⊢ (derivedSeries G n).Normal
state_after: case zero
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
f : G →* G'
⊢ (derivedSeries G 0).Normal

case succ
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
f : G →* G'
n : ℕ
ih : (derivedSeries G n).Normal
⊢ (derivedSeries G (n + 1)).Normal
tactic: induction' n with n ih
Theorem: Nat.le_of_mem_primeFactorsList
File: Mathlib/Data/Nat/Factors.lean

Proof steps:
state_before: n p : ℕ
h : p ∈ n.primeFactorsList
⊢ p ≤ n
state_after: case inl
p : ℕ
h : p ∈ primeFactorsList 0
⊢ p ≤ 0

case inr
n p : ℕ
h : p ∈ n.primeFactorsList
hn : n > 0
⊢ p ≤ n
tactic: rcases n.eq_zero_or_pos with (rfl | hn)
Theorem: Units.mul_inv_cancel_right
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝ : Monoid α
a✝ b✝ c u : αˣ
a : α
b : αˣ
⊢ a * ↑b * ↑b⁻¹ = a
state_after: no goals
tactic: rw [mul_assoc, mul_inv, mul_one]
Theorem: Fin.sum_univ_two
File: Mathlib/Algebra/BigOperators/Fin.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : CommMonoid β
f : Fin 2 → β
⊢ ∏ i : Fin 2, f i = f 0 * f 1
state_after: no goals
tactic: simp [prod_univ_succ]
Theorem: EReal.bot_mul_of_neg
File: Mathlib/Data/Real/EReal.lean

Proof steps:
state_before: x : EReal
h : x < 0
⊢ ⊥ * x = ⊤
state_after: x : EReal
h : x < 0
⊢ x * ⊥ = ⊤
tactic: rw [EReal.mul_comm]
state_before: x : EReal
h : x < 0
⊢ x * ⊥ = ⊤
state_after: no goals
tactic: exact mul_bot_of_neg h
Theorem: Complex.Gamma_one
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

Proof steps:
state_before: ⊢ Gamma 1 = 1
state_after: no goals
tactic: rw [Gamma_eq_integral] <;> simp
Theorem: CategoryTheory.Iso.unop_hom
File: Mathlib/CategoryTheory/Opposites.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X✝ Y✝ : C
X Y : Cᵒᵖ
f : X ≅ Y
⊢ f.hom.unop ≫ f.inv.unop = 𝟙 (Opposite.unop Y)
state_after: no goals
tactic: simp only [← unop_comp, f.inv_hom_id, unop_id]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X✝ Y✝ : C
X Y : Cᵒᵖ
f : X ≅ Y
⊢ f.inv.unop ≫ f.hom.unop = 𝟙 (Opposite.unop X)
state_after: no goals
tactic: simp only [← unop_comp, f.hom_inv_id, unop_id]
Theorem: LucasLehmer.Int.coe_nat_two_pow_pred
File: Mathlib/NumberTheory/LucasLehmer.lean

Proof steps:
state_before: p : ℕ
⊢ 0 < 2
state_after: no goals
tactic: decide
Theorem: MvPFunctor.map_objAppend1
File: Mathlib/Data/PFunctor/Multivariate/W.lean

Proof steps:
state_before: n : ℕ
P : MvPFunctor.{u} (n + 1)
α γ : TypeVec.{u} n
g : α ⟹ γ
a : P.A
f' : P.drop.B a ⟹ α
f : P.last.B a → P.W α
⊢ (g ::: P.wMap g) <$$> P.objAppend1 a f' f = P.objAppend1 a (g ⊚ f') fun x => P.wMap g (f x)
state_after: n : ℕ
P : MvPFunctor.{u} (n + 1)
α γ : TypeVec.{u} n
g : α ⟹ γ
a : P.A
f' : P.drop.B a ⟹ α
f : P.last.B a → P.W α
⊢ ⟨a, splitFun (g ⊚ f') (P.wMap g ∘ f)⟩ = ⟨a, splitFun (g ⊚ f') fun x => P.wMap g (f x)⟩
tactic: rw [objAppend1, objAppend1, map_eq, appendFun, ← splitFun_comp]
state_before: n : ℕ
P : MvPFunctor.{u} (n + 1)
α γ : TypeVec.{u} n
g : α ⟹ γ
a : P.A
f' : P.drop.B a ⟹ α
f : P.last.B a → P.W α
⊢ ⟨a, splitFun (g ⊚ f') (P.wMap g ∘ f)⟩ = ⟨a, splitFun (g ⊚ f') fun x => P.wMap g (f x)⟩
state_after: no goals
tactic: rfl
Theorem: hasLineDerivAt_iff_tendsto_slope_zero
File: Mathlib/Analysis/Calculus/LineDeriv/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
f f₁ : E → F
f' f₀' f₁' : F
s t : Set E
x v : E
⊢ HasLineDerivAt 𝕜 f f' x v ↔ Tendsto (fun t => t⁻¹ • (f (x + t • v) - f x)) (𝓝[≠] 0) (𝓝 f')
state_after: no goals
tactic: simp only [HasLineDerivAt, hasDerivAt_iff_tendsto_slope_zero, zero_add,
    zero_smul, add_zero]
Theorem: SimpleGraph.edgeSet_nonempty
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

Proof steps:
state_before: ι : Sort u_1
V : Type u
G : SimpleGraph V
a b c u v w : V
e : Sym2 V
G₁ G₂ : SimpleGraph V
⊢ G.edgeSet.Nonempty ↔ G ≠ ⊥
state_after: no goals
tactic: rw [Set.nonempty_iff_ne_empty, edgeSet_eq_empty.ne]
Theorem: CategoryTheory.GradedObject.mapMap_id
File: Mathlib/CategoryTheory/GradedObject.lean

Proof steps:
state_before: I : Type u_1
J : Type u_2
K : Type u_3
C : Type u_4
inst✝³ : Category.{u_5, u_4} C
X Y Z : GradedObject I C
φ : X ⟶ Y
e : X ≅ Y
ψ : Y ⟶ Z
p : I → J
j : J
inst✝² : X.HasMap p
inst✝¹ : Y.HasMap p
inst✝ : Z.HasMap p
⊢ mapMap (𝟙 X) p = 𝟙 (X.mapObj p)
state_after: no goals
tactic: aesop_cat
Theorem: FiniteField.sum_pow_lt_card_sub_one
File: Mathlib/FieldTheory/Finite/Basic.lean

Proof steps:
state_before: K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
h : i < q - 1
⊢ ∑ x : K, x ^ i = 0
state_after: case pos
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
h : i < q - 1
hi : i = 0
⊢ ∑ x : K, x ^ i = 0

case neg
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
h : i < q - 1
hi : ¬i = 0
⊢ ∑ x : K, x ^ i = 0
tactic: by_cases hi : i = 0
state_before: case neg
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
h : i < q - 1
hi : ¬i = 0
⊢ ∑ x : K, x ^ i = 0
state_after: no goals
tactic: classical
    have hiq : ¬q - 1 ∣ i := by contrapose! h; exact Nat.le_of_dvd (Nat.pos_of_ne_zero hi) h
    let φ : Kˣ ↪ K := ⟨fun x ↦ x, Units.ext⟩
    have : univ.map φ = univ \ {0} := by
      ext x
      simpa only [mem_map, mem_univ, Function.Embedding.coeFn_mk, true_and_iff, mem_sdiff,
        mem_singleton, φ] using isUnit_iff_ne_zero
    calc
      ∑ x : K, x ^ i = ∑ x ∈ univ \ {(0 : K)}, x ^ i := by
        rw [← sum_sdiff ({0} : Finset K).subset_univ, sum_singleton, zero_pow hi, add_zero]
      _ = ∑ x : Kˣ, (x ^ i : K) := by simp [φ, ← this, univ.sum_map φ]
      _ = 0 := by rw [sum_pow_units K i, if_neg]; exact hiq
Theorem: Submonoid.mem_iSup_of_directed
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i
state_after: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
tactic: refine ⟨?_, fun ⟨i, hi⟩ ↦ le_iSup S i hi⟩
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ ⨆ i, S i → ∃ i, x ∈ S i
state_after: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i
tactic: suffices x ∈ closure (⋃ i, (S i : Set M)) → ∃ i, x ∈ S i by
    simpa only [closure_iUnion, closure_eq (S _)] using this
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i
state_after: case refine_1
M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
hx : x ∈ closure (⋃ i, ↑(S i))
⊢ ∃ i, 1 ∈ S i

case refine_2
M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
ι : Sort u_4
hι : Nonempty ι
S : ι → Submonoid M
hS : Directed (fun x x_1 => x ≤ x_1) S
x : M
hx : x ∈ closure (⋃ i, ↑(S i))
⊢ ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i
tactic: refine fun hx ↦ closure_induction hx (fun _ ↦ mem_iUnion.1) ?_ ?_
Theorem: exists_associated_mem_of_dvd_prod
File: Mathlib/Algebra/BigOperators/Associated.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s : Multiset α
⊢ (∀ r ∈ 0, Prime r) → p ∣ Multiset.prod 0 → ∃ q ∈ 0, p ~ᵤ q
state_after: no goals
tactic: simp [mt isUnit_iff_dvd_one.2 hp.not_unit]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ r ∈ s, Prime r) → p ∣ s.prod → ∃ q ∈ s, p ~ᵤ q
hs : ∀ r ∈ a ::ₘ s, Prime r
hps : p ∣ (a ::ₘ s).prod
⊢ ∃ q ∈ a ::ₘ s, p ~ᵤ q
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ r ∈ s, Prime r) → p ∣ s.prod → ∃ q ∈ s, p ~ᵤ q
hs : ∀ r ∈ a ::ₘ s, Prime r
hps : p ∣ a * s.prod
⊢ ∃ q ∈ a ::ₘ s, p ~ᵤ q
tactic: rw [Multiset.prod_cons] at hps
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ r ∈ s, Prime r) → p ∣ s.prod → ∃ q ∈ s, p ~ᵤ q
hs : ∀ r ∈ a ::ₘ s, Prime r
hps : p ∣ a * s.prod
⊢ ∃ q ∈ a ::ₘ s, p ~ᵤ q
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ r ∈ s, Prime r) → p ∣ s.prod → ∃ q ∈ s, p ~ᵤ q
hs : ∀ r ∈ a ::ₘ s, Prime r
hps : p ∣ a * s.prod
h : p ∣ a
⊢ ∃ q ∈ a ::ₘ s, p ~ᵤ q

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ r ∈ s, Prime r) → p ∣ s.prod → ∃ q ∈ s, p ~ᵤ q
hs : ∀ r ∈ a ::ₘ s, Prime r
hps : p ∣ a * s.prod
h : p ∣ s.prod
⊢ ∃ q ∈ a ::ₘ s, p ~ᵤ q
tactic: cases' hp.dvd_or_dvd hps with h h
Theorem: Subgroup.Normal.comap
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁴ : Group G
inst✝³ : Group G'
inst✝² : Group G''
A : Type u_4
inst✝¹ : AddGroup A
N : Type u_5
inst✝ : Group N
H : Subgroup N
hH : H.Normal
f : G →* N
x✝ : G
⊢ x✝ ∈ Subgroup.comap f H → ∀ (g : G), g * x✝ * g⁻¹ ∈ Subgroup.comap f H
state_after: no goals
tactic: simp (config := { contextual := true }) [Subgroup.mem_comap, hH.conj_mem]
Theorem: List.suffix_insert
File: Mathlib/Data/List/Infix.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
⊢ l <:+ List.insert a l
state_after: case pos
α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
h : a ∈ l
⊢ l <:+ List.insert a l

case neg
α : Type u_1
β : Type u_2
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
inst✝ : DecidableEq α
a : α
l : List α
h : ¬a ∈ l
⊢ l <:+ List.insert a l
tactic: by_cases h : a ∈ l
Theorem: HurwitzZeta.sinKernel_def
File: Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean

Proof steps:
state_before: a x : ℝ
⊢ ↑(sinKernel (↑a) x) = jacobiTheta₂' (↑a) (I * ↑x) / (-2 * ↑π)
state_after: a x : ℝ
⊢ (jacobiTheta₂' (↑a) (I * ↑x) / (-2 * ↑π) +
        jacobiTheta₂' ((starRingEnd ℂ) ↑a) (-(starRingEnd ℂ) (I * ↑x)) / (starRingEnd ℂ) (-2 * ↑π)) /
      2 =
    jacobiTheta₂' (↑a) (I * ↑x) / (-2 * ↑π)
tactic: rw [sinKernel, Function.Periodic.lift_coe, re_eq_add_conj, map_div₀, jacobiTheta₂'_conj]
state_before: a x : ℝ
⊢ (jacobiTheta₂' (↑a) (I * ↑x) / (-2 * ↑π) +
        jacobiTheta₂' ((starRingEnd ℂ) ↑a) (-(starRingEnd ℂ) (I * ↑x)) / (starRingEnd ℂ) (-2 * ↑π)) /
      2 =
    jacobiTheta₂' (↑a) (I * ↑x) / (-2 * ↑π)
state_after: no goals
tactic: simp_rw [map_mul, conj_I, conj_ofReal, map_neg, map_ofNat, neg_mul, neg_neg, add_self_div_two]
Theorem: Fintype.sum_dite_eq'
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι✝ : Type u_1
κ✝ : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α✝
a : α✝
f✝ g : α✝ → β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝³ : Fintype ι
inst✝² : Fintype κ
inst✝¹ : CommMonoid α
inst✝ : DecidableEq ι
i : ι
f : (j : ι) → j = i → α
⊢ (∏ j : ι, if h : j = i then f j h else 1) = f i ⋯
state_after: no goals
tactic: rw [Finset.prod_dite_eq', if_pos (mem_univ _)]
Theorem: Finsupp.card_support_eq_zero
File: Mathlib/Data/Finsupp/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α →₀ M
⊢ f.support.card = 0 ↔ f = 0
state_after: no goals
tactic: simp