ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: ZMod.isSquare_neg_one_of_eq_sq_add_sq_of_isCoprime
File: Mathlib/NumberTheory/SumTwoSquares.lean

Proof steps:
state_before: n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
⊢ IsSquare (-1)
state_after: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
⊢ IsSquare (-1)
tactic: obtain ⟨u, v, huv⟩ : IsCoprime x n := by
    have hc2 : IsCoprime (x ^ 2) (y ^ 2) := hc.pow
    rw [show y ^ 2 = n + -1 * x ^ 2 by rw [h]; ring] at hc2
    exact (IsCoprime.pow_left_iff zero_lt_two).mp hc2.of_add_mul_right_right
state_before: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
⊢ IsSquare (-1)
state_after: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ IsSquare (-1)
tactic: have H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v) := by
    linear_combination -u ^ 2 * h + (n * v - u * x - 1) * huv
state_before: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ IsSquare (-1)
state_after: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ -1 = ↑u * ↑y * (↑u * ↑y)
tactic: refine ⟨u * y, ?_⟩
state_before: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ -1 = ↑u * ↑y * (↑u * ↑y)
state_after: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ -1 = ↑(u * y * (u * y))
tactic: conv_rhs => tactic => norm_cast
state_before: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ -1 = ↑(u * y * (u * y))
state_after: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ ↑(-1) = ↑(u * y * (u * y))
tactic: rw [(by norm_cast : (-1 : ZMod n.natAbs) = (-1 : ℤ))]
state_before: case intro.intro
n x y : ℤ
h : n = x ^ 2 + y ^ 2
hc : IsCoprime x y
u v : ℤ
huv : u * x + v * n = 1
H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)
⊢ ↑(-1) = ↑(u * y * (u * y))
state_after: no goals
tactic: exact (ZMod.intCast_eq_intCast_iff_dvd_sub _ _ _).mpr (Int.natAbs_dvd.mpr ⟨_, H⟩)
Theorem: CategoryTheory.Idempotents.KaroubiKaroubi.idem_f
File: Mathlib/CategoryTheory/Idempotents/KaroubiKaroubi.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
P : Karoubi (Karoubi C)
⊢ P.p.f ≫ P.p.f = P.p.f
state_after: no goals
tactic: simpa only [hom_ext_iff, comp_f] using P.idem
Theorem: CategoryTheory.Limits.biproduct.mapBiproduct_hom_desc
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Biproducts.lean

Proof steps:
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : HasZeroMorphisms C
inst✝³ : HasZeroMorphisms D
F : C ⥤ D
inst✝² : F.PreservesZeroMorphisms
J : Type w₁
f : J → C
inst✝¹ : HasBiproduct f
inst✝ : PreservesBiproduct f F
W : C
g : (j : J) → f j ⟶ W
⊢ ((F.mapBiproduct f).hom ≫ desc fun j => F.map (g j)) = F.map (desc g)
state_after: no goals
tactic: rw [← biproduct.mapBiproduct_inv_map_desc, Iso.hom_inv_id_assoc]
Theorem: AlgebraicTopology.DoldKan.Γ₀.Obj.map_epi_on_summand_id
File: Mathlib/AlgebraicTopology/DoldKan/FunctorGamma.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ✝ Δ'✝ Δ'' : SimplexCategory
inst✝¹ : HasFiniteCoproducts C
Δ Δ' : SimplexCategory
e : Δ' ⟶ Δ
inst✝ : Epi e
⊢ ((splitting K).cofan (op Δ)).inj (Splitting.IndexSet.id (op Δ)) ≫ (obj K).map e.op =
    ((splitting K).cofan (op Δ')).inj (Splitting.IndexSet.mk e)
state_after: no goals
tactic: simpa only [Γ₀.Obj.map_on_summand K (Splitting.IndexSet.id (op Δ)) e.op
      (rfl : e ≫ 𝟙 Δ = e ≫ 𝟙 Δ),
    Γ₀.Obj.Termwise.mapMono_id] using id_comp _
Theorem: LieModule.weightSpace_chainTopCoeff_add_one_nsmul_add
File: Mathlib/Algebra/Lie/Weights/Chain.lean

Proof steps:
state_before: R : Type u_1
L : Type u_2
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
M : Type u_3
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : LieAlgebra.IsNilpotent R L
inst✝² : NoZeroSMulDivisors ℤ R
inst✝¹ : NoZeroSMulDivisors R M
inst✝ : IsNoetherian R M
α : L → R
β : Weight R L M
hα : α ≠ 0
⊢ weightSpace M ((chainTopCoeff α β + 1) • α + ⇑β) = ⊥
state_after: no goals
tactic: classical
  rw [chainTopCoeff_add_one _ _ hα]
  exact Nat.find_spec (eventually_weightSpace_smul_add_eq_bot M α β hα).exists
Theorem: Polynomial.leadingCoeff_comp
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
inst✝ : NoZeroDivisors R
p q : R[X]
a : R
hq : q.natDegree ≠ 0
⊢ (p.comp q).leadingCoeff = p.leadingCoeff * q.leadingCoeff ^ p.natDegree
state_after: no goals
tactic: rw [← coeff_comp_degree_mul_degree hq, ← natDegree_comp, coeff_natDegree]
Theorem: Matrix.isUnit_fromBlocks_iff_of_invertible₁₁
File: Mathlib/LinearAlgebra/Matrix/SchurComplement.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
α : Type u_4
inst✝⁷ : Fintype l
inst✝⁶ : Fintype m
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : CommRing α
A : Matrix m m α
B : Matrix m n α
C : Matrix n m α
D : Matrix n n α
inst✝ : Invertible A
⊢ IsUnit (fromBlocks A B C D) ↔ IsUnit (D - C * ⅟A * B)
state_after: no goals
tactic: simp only [← nonempty_invertible_iff_isUnit,
    (invertibleEquivFromBlocks₁₁Invertible A B C D).nonempty_congr]
Theorem: IsCoprime.intCast
File: Mathlib/RingTheory/Coprime/Basic.lean

Proof steps:
state_before: R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b : ℤ
h : IsCoprime a b
⊢ IsCoprime ↑a ↑b
state_after: case intro.intro
R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b u v : ℤ
H : u * a + v * b = 1
⊢ IsCoprime ↑a ↑b
tactic: rcases h with ⟨u, v, H⟩
state_before: case intro.intro
R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b u v : ℤ
H : u * a + v * b = 1
⊢ IsCoprime ↑a ↑b
state_after: case h
R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b u v : ℤ
H : u * a + v * b = 1
⊢ ↑u * ↑a + ↑v * ↑b = 1
tactic: use u, v
state_before: case h
R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b u v : ℤ
H : u * a + v * b = 1
⊢ ↑u * ↑a + ↑v * ↑b = 1
state_after: case h
R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b u v : ℤ
H : u * a + v * b = 1
⊢ ↑1 = 1
tactic: rw_mod_cast [H]
state_before: case h
R✝ : Type u
inst✝¹ : CommSemiring R✝
x y z : R✝
R : Type u_1
inst✝ : CommRing R
a b u v : ℤ
H : u * a + v * b = 1
⊢ ↑1 = 1
state_after: no goals
tactic: exact Int.cast_one
Theorem: CategoryTheory.Functor.Full.of_comp_faithful_iso
File: Mathlib/CategoryTheory/Functor/FullyFaithful.lean

Proof steps:
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F✝ F' : C ⥤ D
G✝ : D ⥤ E
F : C ⥤ D
G : D ⥤ E
H : C ⥤ E
inst✝¹ : H.Full
inst✝ : G.Faithful
h : F ⋙ G ≅ H
⊢ F.Full
state_after: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F✝ F' : C ⥤ D
G✝ : D ⥤ E
F : C ⥤ D
G : D ⥤ E
H : C ⥤ E
inst✝¹ : H.Full
inst✝ : G.Faithful
h : F ⋙ G ≅ H
this : (F ⋙ G).Full
⊢ F.Full
tactic: have := Full.of_iso h.symm
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u₃
inst✝² : Category.{v₃, u₃} E
F✝ F' : C ⥤ D
G✝ : D ⥤ E
F : C ⥤ D
G : D ⥤ E
H : C ⥤ E
inst✝¹ : H.Full
inst✝ : G.Faithful
h : F ⋙ G ≅ H
this : (F ⋙ G).Full
⊢ F.Full
state_after: no goals
tactic: exact Full.of_comp_faithful F G
Theorem: LieSubmodule.ucs_mono
File: Mathlib/Algebra/Lie/Nilpotent.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
k✝ : ℕ
N N₁ N₂ : LieSubmodule R L M
k : ℕ
h : N₁ ≤ N₂
⊢ ucs k N₁ ≤ ucs k N₂
state_after: case zero
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
k : ℕ
N N₁ N₂ : LieSubmodule R L M
h : N₁ ≤ N₂
⊢ ucs 0 N₁ ≤ ucs 0 N₂

case succ
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
k✝ : ℕ
N N₁ N₂ : LieSubmodule R L M
h : N₁ ≤ N₂
k : ℕ
ih : ucs k N₁ ≤ ucs k N₂
⊢ ucs (k + 1) N₁ ≤ ucs (k + 1) N₂
tactic: induction' k with k ih
state_before: case succ
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
k✝ : ℕ
N N₁ N₂ : LieSubmodule R L M
h : N₁ ≤ N₂
k : ℕ
ih : ucs k N₁ ≤ ucs k N₂
⊢ ucs (k + 1) N₁ ≤ ucs (k + 1) N₂
state_after: case succ
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
k✝ : ℕ
N N₁ N₂ : LieSubmodule R L M
h : N₁ ≤ N₂
k : ℕ
ih : ucs k N₁ ≤ ucs k N₂
⊢ (ucs k N₁).normalizer ≤ (ucs k N₂).normalizer
tactic: simp only [ucs_succ]
state_before: case succ
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
k✝ : ℕ
N N₁ N₂ : LieSubmodule R L M
h : N₁ ≤ N₂
k : ℕ
ih : ucs k N₁ ≤ ucs k N₂
⊢ (ucs k N₁).normalizer ≤ (ucs k N₂).normalizer
state_after: no goals
tactic: gcongr
Theorem: Matrix.sub_mul
File: Mathlib/Data/Matrix/Basic.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : NonUnitalNonAssocRing α
inst✝ : Fintype n
M M' : Matrix m n α
N : Matrix n o α
⊢ (M - M') * N = M * N - M' * N
state_after: no goals
tactic: rw [sub_eq_add_neg, Matrix.add_mul, Matrix.neg_mul, sub_eq_add_neg]
Theorem: Polynomial.disjoint_ker_aeval_of_coprime
File: Mathlib/RingTheory/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
hpq : IsCoprime p q
⊢ Disjoint (LinearMap.ker ((aeval f) p)) (LinearMap.ker ((aeval f) q))
state_after: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
hpq : IsCoprime p q
⊢ LinearMap.ker ((aeval f) p) ⊓ LinearMap.ker ((aeval f) q) ≤ ⊥
tactic: rw [disjoint_iff_inf_le]
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
hpq : IsCoprime p q
⊢ LinearMap.ker ((aeval f) p) ⊓ LinearMap.ker ((aeval f) q) ≤ ⊥
state_after: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
hpq : IsCoprime p q
v : M
hv : v ∈ LinearMap.ker ((aeval f) p) ⊓ LinearMap.ker ((aeval f) q)
⊢ v ∈ ⊥
tactic: intro v hv
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
hpq : IsCoprime p q
v : M
hv : v ∈ LinearMap.ker ((aeval f) p) ⊓ LinearMap.ker ((aeval f) q)
⊢ v ∈ ⊥
state_after: case intro.intro
R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
v : M
hv : v ∈ LinearMap.ker ((aeval f) p) ⊓ LinearMap.ker ((aeval f) q)
p' q' : R[X]
hpq' : p' * p + q' * q = 1
⊢ v ∈ ⊥
tactic: rcases hpq with ⟨p', q', hpq'⟩
state_before: case intro.intro
R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
p q : R[X]
v : M
hv : v ∈ LinearMap.ker ((aeval f) p) ⊓ LinearMap.ker ((aeval f) q)
p' q' : R[X]
hpq' : p' * p + q' * q = 1
⊢ v ∈ ⊥
state_after: no goals
tactic: simpa [LinearMap.mem_ker.1 (Submodule.mem_inf.1 hv).1,
    LinearMap.mem_ker.1 (Submodule.mem_inf.1 hv).2] using
    congr_arg (fun p : R[X] => aeval f p v) hpq'.symm
Theorem: Real.sinh_arsinh
File: Mathlib/Analysis/SpecialFunctions/Arsinh.lean

Proof steps:
state_before: x✝ y x : ℝ
⊢ sinh (arsinh x) = x
state_after: x✝ y x : ℝ
⊢ (x + √(1 + x ^ 2) - (-x + √(1 + x ^ 2))) / 2 = x
tactic: rw [sinh_eq, ← arsinh_neg, exp_arsinh, exp_arsinh, neg_sq]
state_before: x✝ y x : ℝ
⊢ (x + √(1 + x ^ 2) - (-x + √(1 + x ^ 2))) / 2 = x
state_after: no goals
tactic: field_simp
Theorem: CategoryTheory.Limits.diagonal_pullback_fst
File: Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean

Proof steps:
state_before: C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
X✝ Y✝ Z✝ : C
inst✝⁴ : HasPullbacks C
S T : C
f✝ : X✝ ⟶ T
g✝ : Y✝ ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f✝ g✝
inst✝¹ : HasPullback (f✝ ≫ i) (g✝ ≫ i)
inst✝ : HasPullback (diagonal i) (map (f✝ ≫ i) (g✝ ≫ i) i i f✝ g✝ (𝟙 S) ⋯ ⋯)
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ diagonal (fst f g) =
    (pullbackSymmetry f (Over.mk g).hom).hom ≫
      ((Over.pullback f).map (Over.homMk (diagonal g) ⋯)).left ≫ (diagonalObjPullbackFstIso f g).inv
state_after: no goals
tactic: ext <;> dsimp <;> simp
Theorem: Real.arccos_of_one_le
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

Proof steps:
state_before: x✝ y x : ℝ
hx : 1 ≤ x
⊢ arccos x = 0
state_after: no goals
tactic: rw [arccos, arcsin_of_one_le hx, sub_self]
Theorem: Field.primitive_element_iff_minpoly_degree_eq
File: Mathlib/FieldTheory/PrimitiveElement.lean

Proof steps:
state_before: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : Algebra.IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
⊢ F⟮α⟯ = ⊤ ↔ (minpoly F α).degree = ↑(finrank F E)
state_after: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : Algebra.IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
⊢ minpoly F α ≠ 0
tactic: rw [degree_eq_iff_natDegree_eq, primitive_element_iff_minpoly_natDegree_eq]
state_before: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : Algebra.IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
⊢ minpoly F α ≠ 0
state_after: no goals
tactic: exact minpoly.ne_zero_of_finite F α
Theorem: Ordinal.le_sub_of_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal.{u_4}
h : b ≤ a
⊢ c ≤ a - b ↔ b + c ≤ a
state_after: no goals
tactic: rw [← add_le_add_iff_left b, Ordinal.add_sub_cancel_of_le h]
Theorem: Surreal.Multiplication.ih4
File: Mathlib/SetTheory/Surreal/Multiplication.lean

Proof steps:
state_before: x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
⊢ IH4 x₁ x₂ y
state_after: case refine_1
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
z w : PGame
h : w.IsOption y
⊢ z.IsOption x₁ → P2 z x₂ w

case refine_2
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
z w : PGame
h : w.IsOption y
⊢ z.IsOption x₂ → P2 x₁ z w
tactic: refine fun z w h ↦ ⟨?_, ?_⟩
state_before: case refine_1
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
z w : PGame
h : w.IsOption y
⊢ z.IsOption x₁ → P2 z x₂ w

case refine_2
x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
ih' : ∀ (a : Args), ArgsRel a (Args.P24 x₁ x₂ y) → P124 a
z w : PGame
h : w.IsOption y
⊢ z.IsOption x₂ → P2 x₁ z w
state_after: no goals
tactic: all_goals
    intro h'
    apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|
      (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1
    try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'
    try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'
Theorem: NonAssocRing.toNonUnitalNonAssocring_injective
File: Mathlib/Algebra/Ring/Ext.lean

Proof steps:
state_before: R : Type u
⊢ Function.Injective (@toNonUnitalNonAssocRing R)
state_after: R : Type u
a₁✝ a₂✝ : NonAssocRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝
tactic: intro _ _ _
state_before: R : Type u
a₁✝ a₂✝ : NonAssocRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝
state_after: no goals
tactic: ext <;> congr
Theorem: FirstOrder.Language.Substructure.closure_withConstants_eq
File: Mathlib/ModelTheory/Substructures.lean

Proof steps:
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ (closure (L[[↑A]])).toFun s = ((closure L).toFun (A ∪ s)).withConstants ⋯
state_after: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ ((closure L).toFun (A ∪ s)).withConstants ⋯ ≤ (closure (L[[↑A]])).toFun s
tactic: refine closure_eq_of_le ((A.subset_union_right).trans subset_closure) ?_
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ ((closure L).toFun (A ∪ s)).withConstants ⋯ ≤ (closure (L[[↑A]])).toFun s
state_after: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ (L.lhomWithConstants ↑A).substructureReduct (((closure L).toFun (A ∪ s)).withConstants ⋯) ≤
    (L.lhomWithConstants ↑A).substructureReduct ((closure (L[[↑A]])).toFun s)
tactic: rw [← (L.lhomWithConstants A).substructureReduct.le_iff_le]
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ (L.lhomWithConstants ↑A).substructureReduct (((closure L).toFun (A ∪ s)).withConstants ⋯) ≤
    (L.lhomWithConstants ↑A).substructureReduct ((closure (L[[↑A]])).toFun s)
state_after: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ A ⊆ ↑((closure (L[[↑A]])).toFun s)
tactic: simp only [subset_closure, reduct_withConstants, closure_le, LHom.coe_substructureReduct,
    Set.union_subset_iff, and_true_iff]
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
A s : Set M
h : A ⊆ ↑S
⊢ A ⊆ ↑((closure (L[[↑A]])).toFun s)
state_after: no goals
tactic: exact subset_closure_withConstants
Theorem: CategoryTheory.ShortComplex.hasHomology_of_isIsoLeftRightHomologyComparison
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
inst✝¹ : S.HasLeftHomology
inst✝ : S.HasRightHomology
h : IsIso S.leftRightHomologyComparison
⊢ S.HasHomology
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
inst✝¹ : S.HasLeftHomology
inst✝ : S.HasRightHomology
h : IsIso S.leftRightHomologyComparison
this : IsIso (leftRightHomologyComparison' S.leftHomologyData S.rightHomologyData)
⊢ S.HasHomology
tactic: haveI : IsIso (leftRightHomologyComparison' S.leftHomologyData S.rightHomologyData) := h
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
inst✝¹ : S.HasLeftHomology
inst✝ : S.HasRightHomology
h : IsIso S.leftRightHomologyComparison
this : IsIso (leftRightHomologyComparison' S.leftHomologyData S.rightHomologyData)
⊢ S.HasHomology
state_after: no goals
tactic: exact hasHomology_of_isIso_leftRightHomologyComparison' S.leftHomologyData S.rightHomologyData
Theorem: CochainComplex.HomComplex.δ_zero_cochain_v
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.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
F G K L : CochainComplex C ℤ
n m : ℤ
z : Cochain F G 0
p q : ℤ
hpq : p + 1 = q
⊢ (δ 0 1 z).v p q hpq = z.v p p ⋯ ≫ G.d p q - F.d p q ≫ z.v q q ⋯
state_after: no goals
tactic: simp only [δ_v 0 1 (zero_add 1) z p q hpq p q (by omega) hpq, zero_add,
    Int.negOnePow_one, Units.neg_smul, one_smul, sub_eq_add_neg]
Theorem: ringExpChar.eq
File: Mathlib/Algebra/CharP/ExpChar.lean

Proof steps:
state_before: R : Type u
inst✝ : Semiring R
q : ℕ
h : ExpChar R q
⊢ ringExpChar R = q
state_after: case zero
R : Type u
inst✝¹ : Semiring R
inst✝ : CharZero R
⊢ ringExpChar R = 1

case prime
R : Type u
inst✝ : Semiring R
q : ℕ
h : Nat.Prime q
hchar✝ : CharP R q
⊢ ringExpChar R = q
tactic: cases' h with _ _ h _
state_before: case prime
R : Type u
inst✝ : Semiring R
q : ℕ
h : Nat.Prime q
hchar✝ : CharP R q
⊢ ringExpChar R = q
state_after: case prime
R : Type u
inst✝ : Semiring R
q : ℕ
h : Nat.Prime q
hchar✝ : CharP R q
⊢ max q 1 = q
tactic: rw [ringExpChar, ringChar.eq R q]
state_before: case prime
R : Type u
inst✝ : Semiring R
q : ℕ
h : Nat.Prime q
hchar✝ : CharP R q
⊢ max q 1 = q
state_after: no goals
tactic: exact Nat.max_eq_left h.one_lt.le
Theorem: AddAction.orbitRel.Quotient.orbit_nonempty
File: Mathlib/GroupTheory/GroupAction/Basic.lean

Proof steps:
state_before: G : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Group G
inst✝¹ : MulAction G α
inst✝ : MulAction G β
x : Quotient G α
⊢ x.orbit.Nonempty
state_after: G : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Group G
inst✝¹ : MulAction G α
inst✝ : MulAction G β
x : Quotient G α
⊢ (MulAction.orbit G (Quotient.out' x)).Nonempty
tactic: rw [orbitRel.Quotient.orbit_eq_orbit_out x Quotient.out_eq']
state_before: G : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Group G
inst✝¹ : MulAction G α
inst✝ : MulAction G β
x : Quotient G α
⊢ (MulAction.orbit G (Quotient.out' x)).Nonempty
state_after: no goals
tactic: exact orbit_nonempty _