ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: PythagoreanTriple.isPrimitiveClassified_of_coprime_of_pos
File: Mathlib/NumberTheory/PythagoreanTriples.lean

Proof steps:
state_before: x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hzpos : 0 < z
⊢ h.IsPrimitiveClassified
state_after: case inl
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hzpos : 0 < z
h1 : x % 2 = 0 ∧ y % 2 = 1
⊢ h.IsPrimitiveClassified

case inr
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
⊢ h.IsPrimitiveClassified
tactic: cases' h.even_odd_of_coprime hc with h1 h2
state_before: case inr
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
⊢ h.IsPrimitiveClassified
state_after: case inr
x y z : ℤ
h : PythagoreanTriple x y z
hc : y.gcd x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
⊢ h.IsPrimitiveClassified
tactic: rw [Int.gcd_comm] at hc
state_before: case inr
x y z : ℤ
h : PythagoreanTriple x y z
hc : y.gcd x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
⊢ h.IsPrimitiveClassified
state_after: case inr.intro.intro
x y z : ℤ
h : PythagoreanTriple x y z
hc : y.gcd x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
m n : ℤ
H :
  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧
    m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
⊢ h.IsPrimitiveClassified
tactic: obtain ⟨m, n, H⟩ := h.symm.isPrimitiveClassified_of_coprime_of_odd_of_pos hc h2.left hzpos
state_before: case inr.intro.intro
x y z : ℤ
h : PythagoreanTriple x y z
hc : y.gcd x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
m n : ℤ
H :
  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧
    m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
⊢ h.IsPrimitiveClassified
state_after: case h
x y z : ℤ
h : PythagoreanTriple x y z
hc : y.gcd x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
m n : ℤ
H :
  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧
    m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧
    m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
tactic: use m, n
state_before: case h
x y z : ℤ
h : PythagoreanTriple x y z
hc : y.gcd x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
m n : ℤ
H :
  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧
    m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧
    m.gcd n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
state_after: no goals
tactic: tauto
Theorem: HomologicalComplex₂.total.mapIso_hom
File: Mathlib/Algebra/Homology/TotalComplex.lean

Proof steps:
state_before: C : Type u_1
inst✝⁶ : Category.{?u.130934, u_1} C
inst✝⁵ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝⁴ : DecidableEq I₁₂
inst✝³ : TotalComplexShape c₁ c₂ c₁₂
inst✝² : K.HasTotal c₁₂
inst✝¹ : L.HasTotal c₁₂
inst✝ : M.HasTotal c₁₂
⊢ map e.hom c₁₂ ≫ map e.inv c₁₂ = 𝟙 (K.total c₁₂)
state_after: no goals
tactic: rw [← map_comp, e.hom_inv_id, map_id]
state_before: C : Type u_1
inst✝⁶ : Category.{?u.130934, u_1} C
inst✝⁵ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝⁴ : DecidableEq I₁₂
inst✝³ : TotalComplexShape c₁ c₂ c₁₂
inst✝² : K.HasTotal c₁₂
inst✝¹ : L.HasTotal c₁₂
inst✝ : M.HasTotal c₁₂
⊢ map e.inv c₁₂ ≫ map e.hom c₁₂ = 𝟙 (L.total c₁₂)
state_after: no goals
tactic: rw [← map_comp, e.inv_hom_id, map_id]
Theorem: map_sub_le_max
File: Mathlib/Analysis/Normed/Group/Seminorm.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : AddGroup E
inst✝¹ : FunLike F E ℝ
inst✝ : NonarchAddGroupSeminormClass F E
f : F
x y : E
⊢ f (x - y) ≤ max (f x) (f y)
state_after: ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : AddGroup E
inst✝¹ : FunLike F E ℝ
inst✝ : NonarchAddGroupSeminormClass F E
f : F
x y : E
⊢ f (x + -y) ≤ max (f x) (f (-y))
tactic: rw [sub_eq_add_neg, ← NonarchAddGroupSeminormClass.map_neg_eq_map' f y]
state_before: ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : AddGroup E
inst✝¹ : FunLike F E ℝ
inst✝ : NonarchAddGroupSeminormClass F E
f : F
x y : E
⊢ f (x + -y) ≤ max (f x) (f (-y))
state_after: no goals
tactic: exact map_add_le_max _ _ _
Theorem: zorn_preorder₀
File: Mathlib/Order/Zorn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
s : Set α
ih : ∀ c ⊆ s, IsChain (fun x x_1 => x ≤ x_1) c → ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub
c : Set ↑s
hc : IsChain (fun x x_1 => x ≤ x_1) c
⊢ IsChain (fun x x_1 => x ≤ x_1) (Subtype.val '' c)
state_after: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
s : Set α
ih : ∀ c ⊆ s, IsChain (fun x x_1 => x ≤ x_1) c → ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub
c : Set ↑s
hc : IsChain (fun x x_1 => x ≤ x_1) c
p : { x // x ∈ s }
hpc : p ∈ c
q : { x // x ∈ s }
hqc : q ∈ c
hpq : ↑p ≠ ↑q
⊢ (fun x x_1 => x ≤ x_1) ↑p ↑q ∨ (fun x x_1 => x ≤ x_1) ↑q ↑p
tactic: rintro _ ⟨p, hpc, rfl⟩ _ ⟨q, hqc, rfl⟩ hpq
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
r : α → α → Prop
c✝ : Set α
inst✝ : Preorder α
s : Set α
ih : ∀ c ⊆ s, IsChain (fun x x_1 => x ≤ x_1) c → ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub
c : Set ↑s
hc : IsChain (fun x x_1 => x ≤ x_1) c
p : { x // x ∈ s }
hpc : p ∈ c
q : { x // x ∈ s }
hqc : q ∈ c
hpq : ↑p ≠ ↑q
⊢ (fun x x_1 => x ≤ x_1) ↑p ↑q ∨ (fun x x_1 => x ≤ x_1) ↑q ↑p
state_after: no goals
tactic: exact hc hpc hqc fun t => hpq (Subtype.ext_iff.1 t)
Theorem: IsSelfAdjoint.dense_domain
File: Mathlib/Analysis/InnerProductSpace/LinearPMap.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : IsSelfAdjoint A
⊢ Dense ↑A.domain
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : IsSelfAdjoint A
h : ¬Dense ↑A.domain
⊢ False
tactic: by_contra h
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : IsSelfAdjoint A
h : ¬Dense ↑A.domain
⊢ False
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : A† = A
h : ¬Dense ↑A.domain
⊢ False
tactic: rw [isSelfAdjoint_def] at hA
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : A† = A
h : ¬Dense ↑A.domain
⊢ False
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : A† = A
h : ¬Dense ↑A.domain
h' : A.domain = ⊤
⊢ False
tactic: have h' : A.domain = ⊤ := by
    rw [← hA, Submodule.eq_top_iff']
    intro x
    rw [mem_adjoint_domain_iff, ← hA]
    refine (innerSL 𝕜 x).cont.comp ?_
    simp only [adjoint, h]
    exact continuous_const
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁵ : RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 F
inst✝ : CompleteSpace E
A : E →ₗ.[𝕜] E
hA : A† = A
h : ¬Dense ↑A.domain
h' : A.domain = ⊤
⊢ False
state_after: no goals
tactic: simp [h'] at h
Theorem: RootPairing.ne_zero'
File: Mathlib/LinearAlgebra/RootSystem/Defs.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
P : RootPairing ι R M N
i j : ι
inst✝ : CharZero R
h : P.coroot i = 0
⊢ False
state_after: no goals
tactic: simpa [h] using P.root_coroot_two i
Theorem: Ordinal.typein_le_typein
File: Mathlib/SetTheory/Ordinal/Basic.lean

Proof steps:
state_before: α : Type u
β : Type u_1
γ : Type u_2
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
x x' : α
⊢ typein r x ≤ typein r x' ↔ ¬r x' x
state_after: no goals
tactic: rw [← not_lt, typein_lt_typein]
Theorem: Ideal.fst_comp_quotientMulEquivQuotientProd
File: Mathlib/RingTheory/Ideal/QuotientOperations.lean

Proof steps:
state_before: R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
ι : Type u_1
I J : Ideal R
coprime : IsCoprime I J
⊢ (fst (R ⧸ I) (R ⧸ J)).comp ↑(I.quotientMulEquivQuotientProd J coprime) = factor (I * J) I ⋯
state_after: case h
R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
ι : Type u_1
I J : Ideal R
coprime : IsCoprime I J
⊢ ((fst (R ⧸ I) (R ⧸ J)).comp ↑(I.quotientMulEquivQuotientProd J coprime)).comp (Quotient.mk (I * J)) =
    (factor (I * J) I ⋯).comp (Quotient.mk (I * J))
tactic: apply Quotient.ringHom_ext
state_before: case h
R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
ι : Type u_1
I J : Ideal R
coprime : IsCoprime I J
⊢ ((fst (R ⧸ I) (R ⧸ J)).comp ↑(I.quotientMulEquivQuotientProd J coprime)).comp (Quotient.mk (I * J)) =
    (factor (I * J) I ⋯).comp (Quotient.mk (I * J))
state_after: case h.a
R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
ι : Type u_1
I J : Ideal R
coprime : IsCoprime I J
x✝ : R
⊢ (((fst (R ⧸ I) (R ⧸ J)).comp ↑(I.quotientMulEquivQuotientProd J coprime)).comp (Quotient.mk (I * J))) x✝ =
    ((factor (I * J) I ⋯).comp (Quotient.mk (I * J))) x✝
tactic: ext
state_before: case h.a
R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
ι : Type u_1
I J : Ideal R
coprime : IsCoprime I J
x✝ : R
⊢ (((fst (R ⧸ I) (R ⧸ J)).comp ↑(I.quotientMulEquivQuotientProd J coprime)).comp (Quotient.mk (I * J))) x✝ =
    ((factor (I * J) I ⋯).comp (Quotient.mk (I * J))) x✝
state_after: no goals
tactic: rfl
Theorem: EReal.exp_mul
File: Mathlib/Analysis/SpecialFunctions/Log/ENNRealLogExp.lean

Proof steps:
state_before: x : EReal
y : ℝ
⊢ (x * ↑y).exp = x.exp ^ y
state_after: no goals
tactic: rw [← log_eq_iff, log_rpow, log_exp, log_exp, mul_comm]
Theorem: ZFSet.toSet_image
File: Mathlib/SetTheory/ZFC/Basic.lean

Proof steps:
state_before: f : ZFSet → ZFSet
H : Definable 1 f
x : ZFSet
⊢ (image f x).toSet = f '' x.toSet
state_after: case h
f : ZFSet → ZFSet
H : Definable 1 f
x x✝ : ZFSet
⊢ x✝ ∈ (image f x).toSet ↔ x✝ ∈ f '' x.toSet
tactic: ext
state_before: case h
f : ZFSet → ZFSet
H : Definable 1 f
x x✝ : ZFSet
⊢ x✝ ∈ (image f x).toSet ↔ x✝ ∈ f '' x.toSet
state_after: no goals
tactic: simp
Theorem: Multiset.mem_join
File: Mathlib/Data/Multiset/Bind.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a : α
S : Multiset (Multiset α)
⊢ a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s
state_after: no goals
tactic: simp
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a : α
S : Multiset (Multiset α)
⊢ ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),
    (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)
state_after: no goals
tactic: simp (config := { contextual := true }) [or_and_right, exists_or]
Theorem: Submonoid.LocalizationMap.ofMulEquivOfLocalizations_comp
File: Mathlib/GroupTheory/MonoidLocalization/Basic.lean

Proof steps:
state_before: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
Q : Type u_4
inst✝ : CommMonoid Q
k : N ≃* P
j : P ≃* Q
⊢ (f.ofMulEquivOfLocalizations (k.trans j)).toMap = j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap
state_after: case h
M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
Q : Type u_4
inst✝ : CommMonoid Q
k : N ≃* P
j : P ≃* Q
x✝ : M
⊢ (f.ofMulEquivOfLocalizations (k.trans j)).toMap x✝ = (j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap) x✝
tactic: ext
state_before: case h
M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
Q : Type u_4
inst✝ : CommMonoid Q
k : N ≃* P
j : P ≃* Q
x✝ : M
⊢ (f.ofMulEquivOfLocalizations (k.trans j)).toMap x✝ = (j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap) x✝
state_after: no goals
tactic: rfl
Theorem: Polynomial.coprime_of_root_cyclotomic
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

Proof steps:
state_before: n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
⊢ a.Coprime p
state_after: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
⊢ p.Coprime a
tactic: apply Nat.Coprime.symm
state_before: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
⊢ p.Coprime a
state_after: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
⊢ ¬p ∣ a
tactic: rw [hprime.1.coprime_iff_not_dvd]
state_before: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
⊢ ¬p ∣ a
state_after: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
h : p ∣ a
⊢ False
tactic: intro h
state_before: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
h : p ∣ a
⊢ False
state_after: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
h : ↑a = 0
⊢ False
tactic: replace h := (ZMod.natCast_zmod_eq_zero_iff_dvd a p).2 h
state_before: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a)
h : ↑a = 0
⊢ False
state_after: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).coeff 0 = 0
h : ↑a = 0
⊢ False
tactic: rw [IsRoot.def, eq_natCast, h, ← coeff_zero_eq_eval_zero] at hroot
state_before: case a
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).coeff 0 = 0
h : ↑a = 0
⊢ False
state_after: case pos
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).coeff 0 = 0
h : ↑a = 0
hone : n = 1
⊢ False

case neg
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).coeff 0 = 0
h : ↑a = 0
hone : ¬n = 1
⊢ False
tactic: by_cases hone : n = 1
state_before: case neg
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : (cyclotomic n (ZMod p)).coeff 0 = 0
h : ↑a = 0
hone : ¬n = 1
⊢ False
state_after: case neg
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : 1 = 0
h : ↑a = 0
hone : ¬n = 1
⊢ False
tactic: rw [cyclotomic_coeff_zero (ZMod p) (Nat.succ_le_of_lt
    (lt_of_le_of_ne (Nat.succ_le_of_lt hpos) (Ne.symm hone)))] at hroot
state_before: case neg
n : ℕ
hpos : 0 < n
p : ℕ
hprime : Fact (Nat.Prime p)
a : ℕ
hroot : 1 = 0
h : ↑a = 0
hone : ¬n = 1
⊢ False
state_after: no goals
tactic: exact one_ne_zero hroot
Theorem: AddOreLocalization.oreSub_zero_vadd
File: Mathlib/RingTheory/OreLocalization/Basic.lean

Proof steps:
state_before: R : Type u_1
R' : Type u_2
M : Type u_3
X : Type u_4
inst✝¹² : Monoid M
S : Submonoid M
inst✝¹¹ : OreSet S
inst✝¹⁰ : MulAction M X
inst✝⁹ : SMul R X
inst✝⁸ : SMul R M
inst✝⁷ : IsScalarTower R M M
inst✝⁶ : IsScalarTower R M X
inst✝⁵ : SMul R' X
inst✝⁴ : SMul R' M
inst✝³ : IsScalarTower R' M M
inst✝² : IsScalarTower R' M X
inst✝¹ : SMul R R'
inst✝ : IsScalarTower R R' M
r : M
x : OreLocalization S X
⊢ (r /ₒ 1) • x = r • x
state_after: case c
R : Type u_1
R' : Type u_2
M : Type u_3
X : Type u_4
inst✝¹² : Monoid M
S : Submonoid M
inst✝¹¹ : OreSet S
inst✝¹⁰ : MulAction M X
inst✝⁹ : SMul R X
inst✝⁸ : SMul R M
inst✝⁷ : IsScalarTower R M M
inst✝⁶ : IsScalarTower R M X
inst✝⁵ : SMul R' X
inst✝⁴ : SMul R' M
inst✝³ : IsScalarTower R' M M
inst✝² : IsScalarTower R' M X
inst✝¹ : SMul R R'
inst✝ : IsScalarTower R R' M
r : M
r' : X
s : ↥S
⊢ (r /ₒ 1) • (r' /ₒ s) = r • (r' /ₒ s)
tactic: induction' x using OreLocalization.ind with r' s
state_before: case c
R : Type u_1
R' : Type u_2
M : Type u_3
X : Type u_4
inst✝¹² : Monoid M
S : Submonoid M
inst✝¹¹ : OreSet S
inst✝¹⁰ : MulAction M X
inst✝⁹ : SMul R X
inst✝⁸ : SMul R M
inst✝⁷ : IsScalarTower R M M
inst✝⁶ : IsScalarTower R M X
inst✝⁵ : SMul R' X
inst✝⁴ : SMul R' M
inst✝³ : IsScalarTower R' M M
inst✝² : IsScalarTower R' M X
inst✝¹ : SMul R R'
inst✝ : IsScalarTower R R' M
r : M
r' : X
s : ↥S
⊢ (r /ₒ 1) • (r' /ₒ s) = r • (r' /ₒ s)
state_after: no goals
tactic: rw [smul_oreDiv, oreDiv_smul_oreDiv, mul_one, smul_eq_mul, mul_one]
Theorem: Int.bodd_subNatNat
File: Mathlib/Data/Int/Bitwise.lean

Proof steps:
state_before: m n : ℕ
⊢ (subNatNat m n).bodd = xor m.bodd n.bodd
state_after: no goals
tactic: apply subNatNat_elim m n fun m n i => bodd i = xor m.bodd n.bodd <;>
  intros i j <;>
  simp only [Int.bodd, Int.bodd_coe, Nat.bodd_add] <;>
  cases Nat.bodd i <;> simp
Theorem: smul_le_smul_of_nonpos_left
File: Mathlib/Algebra/Order/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝³ : OrderedRing α
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulMono α β
h : b₁ ≤ b₂
ha : a ≤ 0
⊢ a • b₂ ≤ a • b₁
state_after: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝³ : OrderedRing α
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulMono α β
h : b₁ ≤ b₂
ha : a ≤ 0
⊢ -a • b₁ ≤ -a • b₂
tactic: rw [← neg_neg a, neg_smul, neg_smul (-a), neg_le_neg_iff]
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝³ : OrderedRing α
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulMono α β
h : b₁ ≤ b₂
ha : a ≤ 0
⊢ -a • b₁ ≤ -a • b₂
state_after: no goals
tactic: exact smul_le_smul_of_nonneg_left h (neg_nonneg_of_nonpos ha)
Theorem: LSeriesSummable_of_abscissaOfAbsConv_lt_re
File: Mathlib/NumberTheory/LSeries/Convergence.lean

Proof steps:
state_before: f : ℕ → ℂ
s : ℂ
hs : abscissaOfAbsConv f < ↑s.re
⊢ LSeriesSummable f s
state_after: f : ℕ → ℂ
s : ℂ
hs : ∃ a, LSeriesSummable f ↑a ∧ a < s.re
⊢ LSeriesSummable f s
tactic: simp only [abscissaOfAbsConv, sInf_lt_iff, Set.mem_image, Set.mem_setOf_eq,
    exists_exists_and_eq_and, EReal.coe_lt_coe_iff] at hs
state_before: f : ℕ → ℂ
s : ℂ
hs : ∃ a, LSeriesSummable f ↑a ∧ a < s.re
⊢ LSeriesSummable f s
state_after: case intro.intro
f : ℕ → ℂ
s : ℂ
y : ℝ
hy : LSeriesSummable f ↑y
hys : y < s.re
⊢ LSeriesSummable f s
tactic: obtain ⟨y, hy, hys⟩ := hs
state_before: case intro.intro
f : ℕ → ℂ
s : ℂ
y : ℝ
hy : LSeriesSummable f ↑y
hys : y < s.re
⊢ LSeriesSummable f s
state_after: no goals
tactic: exact hy.of_re_le_re <| ofReal_re y ▸ hys.le
Theorem: nhds_top_basis
File: Mathlib/Topology/Order/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : LinearOrder α
inst✝² : OrderTop α
inst✝¹ : OrderTopology α
inst✝ : Nontrivial α
⊢ (𝓝 ⊤).HasBasis (fun a => a < ⊤) fun a => Ioi a
state_after: α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : LinearOrder α
inst✝² : OrderTop α
inst✝¹ : OrderTopology α
inst✝ : Nontrivial α
this : ∃ x, x < ⊤
⊢ (𝓝 ⊤).HasBasis (fun a => a < ⊤) fun a => Ioi a
tactic: have : ∃ x : α, x < ⊤ := (exists_ne ⊤).imp fun x hx => hx.lt_top
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : LinearOrder α
inst✝² : OrderTop α
inst✝¹ : OrderTopology α
inst✝ : Nontrivial α
this : ∃ x, x < ⊤
⊢ (𝓝 ⊤).HasBasis (fun a => a < ⊤) fun a => Ioi a
state_after: no goals
tactic: simpa only [Iic_top, nhdsWithin_univ, Ioc_top] using nhdsWithin_Iic_basis' this
Theorem: IsLprojection.Lcomplement
File: Mathlib/Analysis/NormedSpace/MStructure.lean

Proof steps:
state_before: X : Type u_1
inst✝² : NormedAddCommGroup X
M : Type u_2
inst✝¹ : Ring M
inst✝ : Module M X
P : M
h : IsLprojection X P
x : X
⊢ ‖x‖ = ‖(1 - P) • x‖ + ‖(1 - (1 - P)) • x‖
state_after: X : Type u_1
inst✝² : NormedAddCommGroup X
M : Type u_2
inst✝¹ : Ring M
inst✝ : Module M X
P : M
h : IsLprojection X P
x : X
⊢ ‖x‖ = ‖P • x‖ + ‖(1 - P) • x‖
tactic: rw [add_comm, sub_sub_cancel]
state_before: X : Type u_1
inst✝² : NormedAddCommGroup X
M : Type u_2
inst✝¹ : Ring M
inst✝ : Module M X
P : M
h : IsLprojection X P
x : X
⊢ ‖x‖ = ‖P • x‖ + ‖(1 - P) • x‖
state_after: no goals
tactic: exact h.Lnorm x
Theorem: List.get_range
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: n i : Nat
H : i < (range n).length
⊢ (range n).get ⟨i, H⟩ = i
state_after: no goals
tactic: simp
Theorem: List.Sorted.gt_of_ge
File: Mathlib/Data/List/Sort.lean

Proof steps:
state_before: α : Type u
r : α → α → Prop
a : α
l✝ : List α
inst✝ : PartialOrder α
l : List α
h₁ : Sorted (fun x x_1 => x ≥ x_1) l
h₂ : l.Nodup
⊢ Pairwise (fun x x_1 => x_1 ≠ x) l
state_after: α : Type u
r : α → α → Prop
a : α
l✝ : List α
inst✝ : PartialOrder α
l : List α
h₁ : Sorted (fun x x_1 => x ≥ x_1) l
h₂ : l.Nodup
⊢ Pairwise (fun x x_1 => x ≠ x_1) l
tactic: simp_rw [ne_comm]
state_before: α : Type u
r : α → α → Prop
a : α
l✝ : List α
inst✝ : PartialOrder α
l : List α
h₁ : Sorted (fun x x_1 => x ≥ x_1) l
h₂ : l.Nodup
⊢ Pairwise (fun x x_1 => x ≠ x_1) l
state_after: no goals
tactic: exact h₂
Theorem: Finset.affineCombination_vsub
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

Proof steps:
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w₁ w₂ : ι → k
p : ι → P
⊢ (affineCombination k s p) w₁ -ᵥ (affineCombination k s p) w₂ = (s.weightedVSub p) (w₁ - w₂)
state_after: no goals
tactic: rw [← AffineMap.linearMap_vsub, affineCombination_linear, vsub_eq_sub]
Theorem: CategoryTheory.ShortComplex.FunctorEquivalence.inverse_map_τ₃
File: Mathlib/Algebra/Homology/ShortComplex/FunctorEquivalence.lean

Proof steps:
state_before: J : Type u_1
C : Type u_2
inst✝² : Category.{?u.17393, u_1} J
inst✝¹ : Category.{?u.17397, u_2} C
inst✝ : HasZeroMorphisms C
F : J ⥤ ShortComplex C
⊢ whiskerLeft F π₁Toπ₂ ≫ whiskerLeft F π₂Toπ₃ = 0
state_after: no goals
tactic: aesop_cat
state_before: J : Type u_1
C : Type u_2
inst✝² : Category.{?u.17393, u_1} J
inst✝¹ : Category.{?u.17397, u_2} C
inst✝ : HasZeroMorphisms C
X✝ Y✝ : J ⥤ ShortComplex C
φ : X✝ ⟶ Y✝
⊢ whiskerRight φ π₁ ≫ ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) ⋯) Y✝).f =
    ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) ⋯) X✝).f ≫ whiskerRight φ π₂
state_after: no goals
tactic: aesop_cat
state_before: J : Type u_1
C : Type u_2
inst✝² : Category.{?u.17393, u_1} J
inst✝¹ : Category.{?u.17397, u_2} C
inst✝ : HasZeroMorphisms C
X✝ Y✝ : J ⥤ ShortComplex C
φ : X✝ ⟶ Y✝
⊢ whiskerRight φ π₂ ≫ ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) ⋯) Y✝).g =
    ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) ⋯) X✝).g ≫ whiskerRight φ π₃
state_after: no goals
tactic: aesop_cat