ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: EqualCharZero.of_algebraRat
File: Mathlib/Algebra/CharP/MixedCharZero.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
⊢ ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
hI : I ≠ ⊤
⊢ CharZero (R ⧸ I)
tactic: intro I hI
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
hI : I ≠ ⊤
⊢ CharZero (R ⧸ I)
state_after: case cast_injective
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
hI : I ≠ ⊤
⊢ Function.Injective Nat.cast
tactic: constructor
state_before: case cast_injective
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
hI : I ≠ ⊤
⊢ Function.Injective Nat.cast
state_after: case cast_injective
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
hI : I ≠ ⊤
a b : ℕ
h_ab : ↑a = ↑b
⊢ a = b
tactic: intro a b h_ab
state_before: case cast_injective
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
hI : I ≠ ⊤
a b : ℕ
h_ab : ↑a = ↑b
⊢ a = b
state_after: case cast_injective
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
a b : ℕ
h_ab : ↑a = ↑b
hI : a ≠ b
⊢ I = ⊤
tactic: contrapose! hI
state_before: case cast_injective
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
a b : ℕ
h_ab : ↑a = ↑b
hI : a ≠ b
⊢ I = ⊤
state_after: case cast_injective.refine_1
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
a b : ℕ
h_ab : ↑a = ↑b
hI : a ≠ b
⊢ (algebraMap ℚ R) (↑a - ↑b) ∈ I

case cast_injective.refine_2
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
a b : ℕ
h_ab : ↑a = ↑b
hI : a ≠ b
⊢ ↑a - ↑b ≠ 0
tactic: refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
state_before: case cast_injective.refine_2
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra ℚ R
I : Ideal R
a b : ℕ
h_ab : ↑a = ↑b
hI : a ≠ b
⊢ ↑a - ↑b ≠ 0
state_after: no goals
tactic: simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
Theorem: sub_neg
File: Mathlib/Algebra/Order/Group/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c d : α
⊢ a / b < 1 ↔ a < b
state_after: no goals
tactic: rw [← mul_lt_mul_iff_right b, one_mul, div_eq_mul_inv, inv_mul_cancel_right]
Theorem: ProbabilityTheory.iCondIndepFun.condIndepFun_prod_mk_prod_mk
File: Mathlib/Probability/Independence/Conditional.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
β✝ : Type u_3
β' : Type u_4
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
f✝ : Ω → β✝
g : Ω → β'
β : ι → Type u_5
m : (i : ι) → MeasurableSpace (β i)
f : (i : ι) → Ω → β i
h_indep : iCondIndepFun m' hm' m f μ
hf : ∀ (i : ι), Measurable (f i)
i j k l : ι
hik : i ≠ k
hil : i ≠ l
hjk : j ≠ k
hjl : j ≠ l
⊢ CondIndepFun m' hm' (fun a => (f i a, f j a)) (fun a => (f k a, f l a)) μ
state_after: no goals
tactic: classical
  let g (i j : ι) (v : Π x : ({i, j} : Finset ι), β x) : β i × β j :=
    ⟨v ⟨i, mem_insert_self _ _⟩, v ⟨j, mem_insert_of_mem <| mem_singleton_self _⟩⟩
  have hg (i j : ι) : Measurable (g i j) := by fun_prop
  exact (h_indep.indepFun_finset {i, j} {k, l} (by aesop) hf).comp (hg i j) (hg k l)
Theorem: div_div_self'
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✝ : CommGroup G
a✝ b✝ c d a b : G
⊢ a / (a / b) = b
state_after: no goals
tactic: simp
Theorem: one_lt_div'
File: Mathlib/Algebra/Order/Group/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c d : α
⊢ 1 < a / b ↔ b < a
state_after: no goals
tactic: rw [← mul_lt_mul_iff_right b, one_mul, div_eq_mul_inv, inv_mul_cancel_right]
Theorem: Real.ind_mk
File: Mathlib/Data/Real/Basic.lean

Proof steps:
state_before: x✝ y : ℝ
C : ℝ → Prop
x : ℝ
h : ∀ (y : CauSeq ℚ abs), C (mk y)
⊢ C x
state_after: case ofCauchy
x✝ y : ℝ
C : ℝ → Prop
h : ∀ (y : CauSeq ℚ abs), C (mk y)
x : Cauchy abs
⊢ C { cauchy := x }
tactic: cases' x with x
state_before: case ofCauchy
x✝ y : ℝ
C : ℝ → Prop
h : ∀ (y : CauSeq ℚ abs), C (mk y)
x : Cauchy abs
⊢ C { cauchy := x }
state_after: case ofCauchy.h
x✝ y : ℝ
C : ℝ → Prop
h : ∀ (y : CauSeq ℚ abs), C (mk y)
x : CauSeq ℚ abs
⊢ C { cauchy := Quot.mk Setoid.r x }
tactic: induction' x using Quot.induction_on with x
state_before: case ofCauchy.h
x✝ y : ℝ
C : ℝ → Prop
h : ∀ (y : CauSeq ℚ abs), C (mk y)
x : CauSeq ℚ abs
⊢ C { cauchy := Quot.mk Setoid.r x }
state_after: no goals
tactic: exact h x
Theorem: QuadraticMap.Isometry.proj_apply
File: Mathlib/LinearAlgebra/QuadraticForm/Prod.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁶ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁵ : AddCommMonoid P
inst✝⁴ : (i : ι) → Module R (Mᵢ i)
inst✝³ : (i : ι) → Module R (Nᵢ i)
inst✝² : Module R P
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
Q : QuadraticMap R (Mᵢ i) P
m : (i : ι) → Mᵢ i
⊢ Q ((LinearMap.proj i).toFun m) = (pi (Pi.single i Q)) m
state_after: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁶ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁵ : AddCommMonoid P
inst✝⁴ : (i : ι) → Module R (Mᵢ i)
inst✝³ : (i : ι) → Module R (Nᵢ i)
inst✝² : Module R P
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
Q : QuadraticMap R (Mᵢ i) P
m : (i : ι) → Mᵢ i
⊢ Q (m i) = (pi (Pi.single i Q)) m
tactic: dsimp
state_before: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁶ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁵ : AddCommMonoid P
inst✝⁴ : (i : ι) → Module R (Mᵢ i)
inst✝³ : (i : ι) → Module R (Nᵢ i)
inst✝² : Module R P
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
Q : QuadraticMap R (Mᵢ i) P
m : (i : ι) → Mᵢ i
⊢ Q (m i) = (pi (Pi.single i Q)) m
state_after: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁶ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁵ : AddCommMonoid P
inst✝⁴ : (i : ι) → Module R (Mᵢ i)
inst✝³ : (i : ι) → Module R (Nᵢ i)
inst✝² : Module R P
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
Q : QuadraticMap R (Mᵢ i) P
m : (i : ι) → Mᵢ i
j : ι
hij : j ≠ i
⊢ (Pi.single i Q j) (m j) = 0
tactic: rw [pi_apply, Fintype.sum_eq_single i (fun j hij => ?_), Pi.single_eq_same]
state_before: ι : Type u_1
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
N₁ : Type u_5
N₂ : Type u_6
P : Type u_7
Mᵢ : ι → Type u_8
Nᵢ : ι → Type u_9
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (Mᵢ i)
inst✝⁶ : (i : ι) → AddCommMonoid (Nᵢ i)
inst✝⁵ : AddCommMonoid P
inst✝⁴ : (i : ι) → Module R (Mᵢ i)
inst✝³ : (i : ι) → Module R (Nᵢ i)
inst✝² : Module R P
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
Q : QuadraticMap R (Mᵢ i) P
m : (i : ι) → Mᵢ i
j : ι
hij : j ≠ i
⊢ (Pi.single i Q j) (m j) = 0
state_after: no goals
tactic: rw [Pi.single_eq_of_ne hij, zero_apply]
Theorem: AddAction.vadd_fixedBy
File: Mathlib/GroupTheory/GroupAction/FixedPoints.lean

Proof steps:
state_before: α : Type u_1
G : Type u_2
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u_3
inst✝¹ : Monoid M
inst✝ : MulAction M α
g h : G
⊢ h • fixedBy α g = fixedBy α (h * g * h⁻¹)
state_after: case h
α : Type u_1
G : Type u_2
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u_3
inst✝¹ : Monoid M
inst✝ : MulAction M α
g h : G
a : α
⊢ a ∈ h • fixedBy α g ↔ a ∈ fixedBy α (h * g * h⁻¹)
tactic: ext a
state_before: case h
α : Type u_1
G : Type u_2
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u_3
inst✝¹ : Monoid M
inst✝ : MulAction M α
g h : G
a : α
⊢ a ∈ h • fixedBy α g ↔ a ∈ fixedBy α (h * g * h⁻¹)
state_after: no goals
tactic: simp_rw [Set.mem_smul_set_iff_inv_smul_mem, mem_fixedBy, mul_smul, smul_eq_iff_eq_inv_smul h]
Theorem: finprod_eq_one_of_forall_eq_one
File: Mathlib/Algebra/BigOperators/Finprod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f✝ g : α → M
a b : α
s t : Set α
f : α → M
h : ∀ (x : α), f x = 1
⊢ ∏ᶠ (i : α), f i = 1
state_after: no goals
tactic: simp (config := { contextual := true }) [h]
Theorem: Finset.ofColex_ne_ofColex
File: Mathlib/Combinatorics/Colex.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Colex α
⊢ s.ofColex ≠ t.ofColex ↔ s ≠ t
state_after: no goals
tactic: simp
Theorem: CochainComplex.HomComplex.Cochain.leftShift_comp_zero_cochain
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'
γ' : Cochain L M 0
⊢ (γ.comp γ' ⋯).leftShift a n' hn' = (γ.leftShift a n' hn').comp γ' ⋯
state_after: no goals
tactic: rw [leftShift_comp γ a n' hn' γ' (add_zero _) hn', mul_zero, Int.negOnePow_zero, one_smul]
Theorem: Set.image_update_Ico_left
File: Mathlib/Order/Interval/Set/Pi.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → PartialOrder (α i)
f : (i : ι) → α i
i : ι
a : α i
⊢ update f i '' Ico a (f i) = Ico (update f i a) f
state_after: no goals
tactic: simpa using image_update_Ico f i a (f i)
Theorem: realPart_smul
File: Mathlib/Data/Complex/Module.lean

Proof steps:
state_before: A : Type u_1
inst✝³ : AddCommGroup A
inst✝² : Module ℂ A
inst✝¹ : StarAddMonoid A
inst✝ : StarModule ℂ A
z : ℂ
a : A
⊢ ℜ (z • a) = z.re • ℜ a - z.im • ℑ a
state_after: A : Type u_1
inst✝³ : AddCommGroup A
inst✝² : Module ℂ A
inst✝¹ : StarAddMonoid A
inst✝ : StarModule ℂ A
z : ℂ
a : A
this : ℜ (z • a) = ℜ ((↑z.re + ↑z.im * I) • a)
⊢ ℜ (z • a) = z.re • ℜ a - z.im • ℑ a
tactic: have := by congrm (ℜ ($((re_add_im z).symm) • a))
state_before: A : Type u_1
inst✝³ : AddCommGroup A
inst✝² : Module ℂ A
inst✝¹ : StarAddMonoid A
inst✝ : StarModule ℂ A
z : ℂ
a : A
this : ℜ (z • a) = ℜ ((↑z.re + ↑z.im * I) • a)
⊢ ℜ (z • a) = z.re • ℜ a - z.im • ℑ a
state_after: no goals
tactic: simpa [-re_add_im, add_smul, ← smul_smul, sub_eq_add_neg]
Theorem: IntermediateField.induction_on_adjoin_fg
File: Mathlib/FieldTheory/Adjoin.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F (↥K)⟮x⟯)
K : IntermediateField F E
hK : K.FG
⊢ P K
state_after: case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F (↥K)⟮x⟯)
S : Finset E
⊢ P (adjoin F ↑S)
tactic: obtain ⟨S, rfl⟩ := hK
state_before: case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F (↥K)⟮x⟯)
S : Finset E
⊢ P (adjoin F ↑S)
state_after: no goals
tactic: exact induction_on_adjoin_finset S P base fun K x _ hK => ih K x hK
Theorem: Set.image_union
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s t : Set α
x : β
⊢ x ∈ f '' (s ∪ t) → x ∈ f '' s ∪ f '' t
state_after: no goals
tactic: rintro ⟨a, h | h, rfl⟩ <;> [left; right] <;> exact ⟨_, h, rfl⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s t : Set α
x : β
⊢ x ∈ f '' s ∪ f '' t → x ∈ f '' (s ∪ t)
state_after: case inl.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s t : Set α
a : α
h : a ∈ s
⊢ a ∈ s ∪ t

case inr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s t : Set α
a : α
h : a ∈ t
⊢ a ∈ s ∪ t
tactic: rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine ⟨_, ?_, rfl⟩
Theorem: MonoidHom.comp_inv
File: Mathlib/Algebra/Group/Hom/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
G : Type u_6
H : Type u_7
F : Type u_8
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : CommGroup G
inst✝ : CommGroup H
φ : G →* H
ψ : M →* G
⊢ φ.comp ψ⁻¹ = (φ.comp ψ)⁻¹
state_after: case h
α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
G : Type u_6
H : Type u_7
F : Type u_8
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : CommGroup G
inst✝ : CommGroup H
φ : G →* H
ψ : M →* G
x✝ : M
⊢ (φ.comp ψ⁻¹) x✝ = (φ.comp ψ)⁻¹ x✝
tactic: ext
state_before: case h
α : Type u_1
β : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
G : Type u_6
H : Type u_7
F : Type u_8
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : CommGroup G
inst✝ : CommGroup H
φ : G →* H
ψ : M →* G
x✝ : M
⊢ (φ.comp ψ⁻¹) x✝ = (φ.comp ψ)⁻¹ x✝
state_after: no goals
tactic: simp only [Function.comp_apply, inv_apply, map_inv, coe_comp]
Theorem: LowerAdjoint.closure_union_closure
File: Mathlib/Order/Closure.lean

Proof steps:
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
β : Type u_4
inst✝ : SetLike α β
l : LowerAdjoint SetLike.coe
x y : α
⊢ l.toFun (↑(l.toFun ↑x) ∪ ↑(l.toFun ↑y)) = l.toFun (↑x ∪ ↑y)
state_after: no goals
tactic: rw [closure_union_closure_right, closure_union_closure_left]
Theorem: Real.sqrt_eq_iff_mul_self_eq
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x y : ℝ
hx : 0 ≤ x
hy : 0 ≤ y
h : √x = y
⊢ y * y = x
state_after: no goals
tactic: rw [← h, mul_self_sqrt hx]
state_before: x y : ℝ
hx : 0 ≤ x
hy : 0 ≤ y
h : y * y = x
⊢ √x = y
state_after: no goals
tactic: rw [← h, sqrt_mul_self hy]
Theorem: Finset.Ioo_subset_Ioi_self
File: Mathlib/Order/Interval/Finset/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
inst✝ : LocallyFiniteOrderTop α
⊢ Ioo a b ⊆ Ioi a
state_after: no goals
tactic: simpa [← coe_subset] using Set.Ioo_subset_Ioi_self
Theorem: Polynomial.quadratic_dvd_of_aeval_eq_zero_im_ne_zero
File: Mathlib/Analysis/Complex/Polynomial/Basic.lean

Proof steps:
state_before: p : ℝ[X]
z : ℂ
h0 : (aeval z) p = 0
hz : z.im ≠ 0
⊢ X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2) ∣ p
state_after: p : ℝ[X]
z : ℂ
h0 : (aeval z) p = 0
hz : z.im ≠ 0
⊢ map (algebraMap ℝ ℂ) (X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2)) ∣ map (algebraMap ℝ ℂ) p
tactic: rw [← map_dvd_map' (algebraMap ℝ ℂ)]
state_before: p : ℝ[X]
z : ℂ
h0 : (aeval z) p = 0
hz : z.im ≠ 0
⊢ map (algebraMap ℝ ℂ) (X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2)) ∣ map (algebraMap ℝ ℂ) p
state_after: case h.e'_3
p : ℝ[X]
z : ℂ
h0 : (aeval z) p = 0
hz : z.im ≠ 0
⊢ map (algebraMap ℝ ℂ) (X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2)) = (X - C ((starRingEnd ℂ) z)) * (X - C z)
tactic: convert p.mul_star_dvd_of_aeval_eq_zero_im_ne_zero h0 hz
state_before: case h.e'_3
p : ℝ[X]
z : ℂ
h0 : (aeval z) p = 0
hz : z.im ≠ 0
⊢ map (algebraMap ℝ ℂ) (X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2)) = (X - C ((starRingEnd ℂ) z)) * (X - C z)
state_after: no goals
tactic: calc
    map (algebraMap ℝ ℂ) (X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2))
    _ = X ^ 2 - C (↑(2 * z.re) : ℂ) * X + C (‖z‖ ^ 2 : ℂ) := by simp
    _ = (X - C (conj z)) * (X - C z) := by
      rw [← add_conj, map_add, ← mul_conj', map_mul]
      ring
Theorem: RingQuot.mkRingHom_surjective
File: Mathlib/Algebra/RingQuot.lean

Proof steps:
state_before: R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
⊢ Function.Surjective ⇑(mkRingHom r)
state_after: R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
⊢ Function.Surjective fun x => { toQuot := Quot.mk (Rel r) x }
tactic: simp only [mkRingHom_def, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]
state_before: R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
⊢ Function.Surjective fun x => { toQuot := Quot.mk (Rel r) x }
state_after: case mk.mk
R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
toQuot✝ : Quot (Rel r)
a✝ : R
⊢ ∃ a, (fun x => { toQuot := Quot.mk (Rel r) x }) a = { toQuot := Quot.mk (Rel r) a✝ }
tactic: rintro ⟨⟨⟩⟩
state_before: case mk.mk
R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r✝ r : R → R → Prop
toQuot✝ : Quot (Rel r)
a✝ : R
⊢ ∃ a, (fun x => { toQuot := Quot.mk (Rel r) x }) a = { toQuot := Quot.mk (Rel r) a✝ }
state_after: no goals
tactic: simp
Theorem: Finset.image_add_left_Ioc
File: Mathlib/Algebra/Order/Interval/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => c + x) (Ioc a b) = Ioc (c + a) (c + b)
state_after: no goals
tactic: rw [← map_add_left_Ioc, map_eq_image, addLeftEmbedding, Embedding.coeFn_mk]
Theorem: Finsupp.sum_eq_single
File: Mathlib/Algebra/BigOperators/Finsupp.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁵ : AddCommMonoid A
inst✝⁴ : AddCommMonoid B
inst✝³ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝² : Zero M
inst✝¹ : Zero M'
inst✝ : CommMonoid N
f : α →₀ M
a : α
g : α → M → N
h₀ : ∀ (b : α), f b ≠ 0 → b ≠ a → g b (f b) = 1
h₁ : f a = 0 → g a 0 = 1
⊢ f.prod g = g a (f a)
state_after: case refine_1
α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁵ : AddCommMonoid A
inst✝⁴ : AddCommMonoid B
inst✝³ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝² : Zero M
inst✝¹ : Zero M'
inst✝ : CommMonoid N
f : α →₀ M
a : α
g : α → M → N
h₀ : ∀ (b : α), f b ≠ 0 → b ≠ a → g b (f b) = 1
h₁ : f a = 0 → g a 0 = 1
b : α
hb₁ : b ∈ f.support
hb₂ : b ≠ a
⊢ g b (f b) = 1

case refine_2
α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁵ : AddCommMonoid A
inst✝⁴ : AddCommMonoid B
inst✝³ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝² : Zero M
inst✝¹ : Zero M'
inst✝ : CommMonoid N
f : α →₀ M
a : α
g : α → M → N
h₀ : ∀ (b : α), f b ≠ 0 → b ≠ a → g b (f b) = 1
h₁ : f a = 0 → g a 0 = 1
h : a ∉ f.support
⊢ g a (f a) = 1
tactic: refine Finset.prod_eq_single a (fun b hb₁ hb₂ => ?_) (fun h => ?_)
Theorem: TensorAlgebra.ringQuot_mkAlgHom_freeAlgebra_ι_eq_ι
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
⊢ (RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m) = (ι R) m
state_after: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
⊢ (RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m) =
    { toFun := fun m => (RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m), map_add' := ⋯, map_smul' := ⋯ } m
tactic: rw [ι]
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
⊢ (RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m) =
    { toFun := fun m => (RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m), map_add' := ⋯, map_smul' := ⋯ } m
state_after: no goals
tactic: rfl
Theorem: Finset.pi_singletons
File: Mathlib/Data/Finset/Pi.lean

Proof steps:
state_before: α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
⊢ (s.pi fun a => {f a}) = {fun a x => f a}
state_after: α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
⊢ ((fun a x => f a) ∈ s.pi fun a => {f a}) ∧ ∀ x ∈ s.pi fun a => {f a}, x = fun a x => f a
tactic: rw [eq_singleton_iff_unique_mem]
state_before: α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
⊢ ((fun a x => f a) ∈ s.pi fun a => {f a}) ∧ ∀ x ∈ s.pi fun a => {f a}, x = fun a x => f a
state_after: case left
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
⊢ (fun a x => f a) ∈ s.pi fun a => {f a}

case right
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
⊢ ∀ x ∈ s.pi fun a => {f a}, x = fun a x => f a
tactic: constructor
state_before: case right
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
⊢ ∀ x ∈ s.pi fun a => {f a}, x = fun a x => f a
state_after: case right
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : a ∈ s.pi fun a => {f a}
⊢ a = fun a x => f a
tactic: intro a ha
state_before: case right
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : a ∈ s.pi fun a => {f a}
⊢ a = fun a x => f a
state_after: case right.h.h
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : a ∈ s.pi fun a => {f a}
i : α
hi : i ∈ s
⊢ a i hi = f i
tactic: ext i hi
state_before: case right.h.h
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : a ∈ s.pi fun a => {f a}
i : α
hi : i ∈ s
⊢ a i hi = f i
state_after: case right.h.h
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : ∀ (a_1 : α) (h : a_1 ∈ s), a a_1 h ∈ {f a_1}
i : α
hi : i ∈ s
⊢ a i hi = f i
tactic: rw [mem_pi] at ha
state_before: case right.h.h
α : Type u_1
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
s✝ : Finset α
t : (a : α) → Finset (β✝ a)
β : Type u_2
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : ∀ (a_1 : α) (h : a_1 ∈ s), a a_1 h ∈ {f a_1}
i : α
hi : i ∈ s
⊢ a i hi = f i
state_after: no goals
tactic: simpa using ha i hi
Theorem: WeierstrassCurve.leadingCoeff_Ψ₃
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
h : 3 ≠ 0
⊢ W.Ψ₃.leadingCoeff = 3
state_after: no goals
tactic: rw [leadingCoeff, W.natDegree_Ψ₃ h, coeff_Ψ₃]