ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Primrec₂.nat_iff
File: Mathlib/Computability/Primrec.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
f : α → β → σ
⊢ Primrec₂ f ↔ Nat.Primrec (Nat.unpaired fun m n => encode ((decode m).bind fun a => Option.map (f a) (decode n)))
state_after: α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
f : α → β → σ
this :
  ∀ (a : Option α) (b : Option β),
    Option.map (fun p => f p.1 p.2) (a.bind fun a => Option.map (Prod.mk a) b) = a.bind fun a => Option.map (f a) b
⊢ Primrec₂ f ↔ Nat.Primrec (Nat.unpaired fun m n => encode ((decode m).bind fun a => Option.map (f a) (decode n)))
tactic: have :
    ∀ (a : Option α) (b : Option β),
      Option.map (fun p : α × β => f p.1 p.2)
          (Option.bind a fun a : α => Option.map (Prod.mk a) b) =
        Option.bind a fun a => Option.map (f a) b := fun a b => by
          cases a <;> cases b <;> rfl
state_before: α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
f : α → β → σ
this :
  ∀ (a : Option α) (b : Option β),
    Option.map (fun p => f p.1 p.2) (a.bind fun a => Option.map (Prod.mk a) b) = a.bind fun a => Option.map (f a) b
⊢ Primrec₂ f ↔ Nat.Primrec (Nat.unpaired fun m n => encode ((decode m).bind fun a => Option.map (f a) (decode n)))
state_after: no goals
tactic: simp [Primrec₂, Primrec, this]
Theorem: injective_pow_iff_not_isOfFinOrder
File: Mathlib/GroupTheory/OrderOfElement.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m n : ℕ
⊢ (Injective fun n => x ^ n) ↔ ¬IsOfFinOrder x
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m✝ n✝ : ℕ
h : ¬IsOfFinOrder x
n m : ℕ
hnm : (fun n => x ^ n) n = (fun n => x ^ n) m
⊢ n = m
tactic: refine ⟨fun h => not_isOfFinOrder_of_injective_pow h, fun h n m hnm => ?_⟩
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LeftCancelMonoid G
x y a : G
m✝ n✝ : ℕ
h : ¬IsOfFinOrder x
n m : ℕ
hnm : (fun n => x ^ n) n = (fun n => x ^ n) m
⊢ n = m
state_after: no goals
tactic: rwa [pow_eq_pow_iff_modEq, orderOf_eq_zero_iff.mpr h, modEq_zero_iff] at hnm
Theorem: Real.sqrt_eq_one
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x y : ℝ
⊢ 1 * 1 = x ↔ x = 1
state_after: no goals
tactic: rw [eq_comm, mul_one]
Theorem: FirstOrder.Language.Theory.CompleteType.toList_foldr_inf_mem
File: Mathlib/ModelTheory/Types.lean

Proof steps:
state_before: L : Language
T : L.Theory
α : Type w
p : T.CompleteType α
t : Finset L[[α]].Sentence
⊢ List.foldr (fun x x_1 => x ⊓ x_1) ⊤ t.toList ∈ p ↔ ↑t ⊆ ↑p
state_after: L : Language
T : L.Theory
α : Type w
p : T.CompleteType α
t : Finset L[[α]].Sentence
⊢ (∀ (M : ModelType ↑p), ∀ φ ∈ t, φ.Realize default default) ↔
    ∀ x ∈ ↑t, ∀ (M : ModelType ↑p), BoundedFormula.Realize x default default
tactic: simp_rw [subset_def, ← SetLike.mem_coe, p.isMaximal.mem_iff_models, models_sentence_iff,
    Sentence.Realize, Formula.Realize, BoundedFormula.realize_foldr_inf, Finset.mem_toList]
state_before: L : Language
T : L.Theory
α : Type w
p : T.CompleteType α
t : Finset L[[α]].Sentence
⊢ (∀ (M : ModelType ↑p), ∀ φ ∈ t, φ.Realize default default) ↔
    ∀ x ∈ ↑t, ∀ (M : ModelType ↑p), BoundedFormula.Realize x default default
state_after: no goals
tactic: exact ⟨fun h φ hφ M => h _ _ hφ, fun h M φ hφ => h _ hφ _⟩
Theorem: EuclideanGeometry.angle_eq_zero_iff_ne_and_wbtw
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ ∠ p₁ p₂ p₃ = 0 ↔ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁
state_after: case mp
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ ∠ p₁ p₂ p₃ = 0 → p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁

case mpr
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁✝ p₂✝ p₁ p₂ p₃ : P
⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ → ∠ p₁ p₂ p₃ = 0
tactic: constructor
Theorem: iSup_eq_iSup_of_partialSups_eq_partialSups
File: Mathlib/Order/PartialSups.lean

Proof steps:
state_before: α : Type u_1
inst✝ : CompleteLattice α
f g : ℕ → α
h : partialSups f = partialSups g
⊢ ⨆ n, f n = ⨆ n, g n
state_after: no goals
tactic: simp_rw [← iSup_partialSups_eq f, ← iSup_partialSups_eq g, h]
Theorem: CategoryTheory.isSeparator_coprod_of_isSeparator_left
File: Mathlib/CategoryTheory/Generator.lean

Proof steps:
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
hG : IsSeparator G
⊢ {G} ⊆ {G, H}
state_after: no goals
tactic: simp
Theorem: LowerSet.coe_eq_empty
File: Mathlib/Order/UpperLower/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
⊢ ↑s = ∅ ↔ s = ⊥
state_after: no goals
tactic: simp [SetLike.ext'_iff]
Theorem: Complex.cos_two_mul
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℂ
⊢ cos (2 * x) = 2 * cos x ^ 2 - 1
state_after: no goals
tactic: rw [cos_two_mul', eq_sub_iff_add_eq.2 (sin_sq_add_cos_sq x), ← sub_add, sub_add_eq_add_sub,
    two_mul]
Theorem: Equiv.Perm.toList_nthLe_zero
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
h : x ∈ p.support
⊢ (p.toList x).nthLe 0 ⋯ = x
state_after: no goals
tactic: simp [toList]
Theorem: Polynomial.IsUnitTrinomial.card_support_eq_three
File: Mathlib/Algebra/Polynomial/UnitTrinomial.lean

Proof steps:
state_before: p q : ℤ[X]
hp : p.IsUnitTrinomial
⊢ p.support.card = 3
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
q : ℤ[X]
k m n : ℕ
hkm : k < m
hmn : m < n
u v w : ℤˣ
⊢ (trinomial k m n ↑u ↑v ↑w).support.card = 3
tactic: obtain ⟨k, m, n, hkm, hmn, u, v, w, rfl⟩ := hp
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
q : ℤ[X]
k m n : ℕ
hkm : k < m
hmn : m < n
u v w : ℤˣ
⊢ (trinomial k m n ↑u ↑v ↑w).support.card = 3
state_after: no goals
tactic: exact card_support_trinomial hkm hmn u.ne_zero v.ne_zero w.ne_zero
Theorem: Finset.coe_disjUnion
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s t : Finset α
h : _root_.Disjoint s t
⊢ ∀ (x : α), x ∈ ↑(s.disjUnion t h) ↔ x ∈ ↑s ∪ ↑t
state_after: no goals
tactic: simp
Theorem: Complex.circleIntegral_div_sub_of_differentiable_on_off_countable
File: Mathlib/Analysis/Complex/CauchyIntegral.lean

Proof steps:
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
s : Set ℂ
hs : s.Countable
hw : w ∈ ball c R
f : ℂ → ℂ
hc : ContinuousOn f (closedBall c R)
hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z
⊢ (∮ (z : ℂ) in C(c, R), f z / (z - w)) = 2 * ↑π * I * f w
state_after: no goals
tactic: simpa only [smul_eq_mul, div_eq_inv_mul] using
    circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd
Theorem: Finset.sized_shadow_iff
File: Mathlib/Combinatorics/SetFamily/Shadow.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
h : ∅ ∉ 𝒜
⊢ Set.Sized r ↑(∂ 𝒜) ↔ Set.Sized (r + 1) ↑𝒜
state_after: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a : α
k r : ℕ
h : ∅ ∉ 𝒜
h𝒜 : Set.Sized r ↑(∂ 𝒜)
s : Finset α
hs : s ∈ ↑𝒜
⊢ s.card = r + 1
tactic: refine ⟨fun h𝒜 s hs => ?_, Set.Sized.shadow⟩
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a : α
k r : ℕ
h : ∅ ∉ 𝒜
h𝒜 : Set.Sized r ↑(∂ 𝒜)
s : Finset α
hs : s ∈ ↑𝒜
⊢ s.card = r + 1
state_after: case intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a✝ : α
k r : ℕ
h : ∅ ∉ 𝒜
h𝒜 : Set.Sized r ↑(∂ 𝒜)
s : Finset α
hs : s ∈ ↑𝒜
a : α
ha : a ∈ s
⊢ s.card = r + 1
tactic: obtain ⟨a, ha⟩ := nonempty_iff_ne_empty.2 (ne_of_mem_of_not_mem hs h)
state_before: case intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a✝ : α
k r : ℕ
h : ∅ ∉ 𝒜
h𝒜 : Set.Sized r ↑(∂ 𝒜)
s : Finset α
hs : s ∈ ↑𝒜
a : α
ha : a ∈ s
⊢ s.card = r + 1
state_after: no goals
tactic: rw [← h𝒜 (erase_mem_shadow hs ha), card_erase_add_one ha]
Theorem: Matroid.eq_emptyOn
File: Mathlib/Data/Matroid/Constructions.lean

Proof steps:
state_before: α : Type u_1
M✝ : Matroid α
E B I X R J : Set α
inst✝ : IsEmpty α
M : Matroid α
⊢ M = emptyOn α
state_after: α : Type u_1
M✝ : Matroid α
E B I X R J : Set α
inst✝ : IsEmpty α
M : Matroid α
⊢ M.E = ∅
tactic: rw [← ground_eq_empty_iff]
state_before: α : Type u_1
M✝ : Matroid α
E B I X R J : Set α
inst✝ : IsEmpty α
M : Matroid α
⊢ M.E = ∅
state_after: no goals
tactic: exact M.E.eq_empty_of_isEmpty
Theorem: CategoryTheory.Monad.MonadicityInternal.unitCofork_pt
File: Mathlib/CategoryTheory/Monad/Monadicity.lean

Proof steps:
state_before: C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₁, u₂} D
G : D ⥤ C
F : C ⥤ D
adj : F ⊣ G
A : adj.toMonad.Algebra
inst✝ : HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))
⊢ G.map (F.map A.a) ≫ G.map (coequalizer.π (F.map A.a) (adj.counit.app (F.obj A.A))) =
    G.map (adj.counit.app (F.obj A.A)) ≫ G.map (coequalizer.π (F.map A.a) (adj.counit.app (F.obj A.A)))
state_after: no goals
tactic: rw [← G.map_comp, coequalizer.condition, G.map_comp]
Theorem: HahnSeries.ne_zero_iff_orderTop
File: Mathlib/RingTheory/HahnSeries/Basic.lean

Proof steps:
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : Zero R
a b : Γ
r : R
x : HahnSeries Γ R
⊢ x ≠ 0 ↔ x.orderTop ≠ ⊤
state_after: case mp
Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : Zero R
a b : Γ
r : R
x : HahnSeries Γ R
⊢ x ≠ 0 → x.orderTop ≠ ⊤

case mpr
Γ : Type u_1
R : Type u_2
inst✝¹ : PartialOrder Γ
inst✝ : Zero R
a b : Γ
r : R
x : HahnSeries Γ R
⊢ x.orderTop ≠ ⊤ → x ≠ 0
tactic: constructor
Theorem: String.Iterator.ValidFor.remainingBytes
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l r : List Char
⊢ { s := { data := l.reverseAux r }, i := { byteIdx := utf8Len l } }.remainingBytes = utf8Len r
state_after: no goals
tactic: simp [Iterator.remainingBytes, Nat.add_sub_cancel_left]
Theorem: CircleDeg1Lift.map_lt_add_translationNumber_add_one
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Proof steps:
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ x + ↑⌊τ f⌋ + 1 ≤ x + τ f + 1
state_after: case bc.bc
f g : CircleDeg1Lift
x : ℝ
⊢ ↑⌊τ f⌋ ≤ τ f
tactic: gcongr
state_before: case bc.bc
f g : CircleDeg1Lift
x : ℝ
⊢ ↑⌊τ f⌋ ≤ τ f
state_after: no goals
tactic: apply floor_le
Theorem: List.tails_cons
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 : ℕ
a : α
l : List α
⊢ (a :: l).tails = (a :: l) :: l.tails
state_after: no goals
tactic: simp
Theorem: ProbabilityTheory.mgf_nonneg
File: Mathlib/Probability/Moments.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ 0 ≤ mgf X μ t
state_after: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ 0 ≤ ∫ (x : Ω), (fun ω => rexp (t * X ω)) x ∂μ
tactic: unfold mgf
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ 0 ≤ ∫ (x : Ω), (fun ω => rexp (t * X ω)) x ∂μ
state_after: no goals
tactic: positivity
Theorem: locallyConvexSpace_inf
File: Mathlib/Topology/Algebra/Module/LocallyConvex.lean

Proof steps:
state_before: ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
⊢ LocallyConvexSpace 𝕜 E
state_after: ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
b : Bool
⊢ LocallyConvexSpace 𝕜 E
tactic: refine locallyConvexSpace_iInf fun b => ?_
state_before: ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : Module 𝕜 E
inst✝¹ : AddCommMonoid F
inst✝ : Module 𝕜 F
t₁ t₂ : TopologicalSpace E
h₁ : LocallyConvexSpace 𝕜 E
h₂ : LocallyConvexSpace 𝕜 E
b : Bool
⊢ LocallyConvexSpace 𝕜 E
state_after: no goals
tactic: cases b <;> assumption
Theorem: QuaternionGroup.exponent
File: Mathlib/GroupTheory/SpecificGroups/Quaternion.lean

Proof steps:
state_before: n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = 2 * lcm n 2
state_after: n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) (2 * 2)
tactic: rw [← normalize_eq 2, ← lcm_mul_left, normalize_eq]
state_before: n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) (2 * 2)
state_after: n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
tactic: norm_num
state_before: n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
state_after: case inl
n : ℕ
hn : n = 0
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4

case inr
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
tactic: cases' eq_zero_or_neZero n with hn hn
state_before: case inr
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
state_after: case inr.a
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) ∣ lcm (2 * n) 4

case inr.a
n : ℕ
hn : NeZero n
⊢ lcm (2 * n) 4 ∣ Monoid.exponent (QuaternionGroup n)
tactic: apply Nat.dvd_antisymm
Theorem: FractionalIdeal.count_ne_zero
File: Mathlib/RingTheory/DedekindDomain/Factorization.lean

Proof steps:
state_before: R : Type u_1
inst✝⁴ : CommRing R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : IsDedekindDomain R
v : HeightOneSpectrum R
I : FractionalIdeal R⁰ K
hI : I ≠ 0
⊢ count K v I =
    ↑((Associates.mk v.asIdeal).count (Associates.mk (choose ⋯)).factors) -
      ↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {choose ⋯})).factors)
state_after: no goals
tactic: simp only [count, dif_neg hI]
Theorem: Finset.inter_union_self
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α
a b : α
s t : Finset α
⊢ s ∩ (t ∪ s) = s
state_after: no goals
tactic: rw [inter_comm, union_inter_cancel_right]
Theorem: isNoetherian_iff_wellFounded
File: Mathlib/RingTheory/Noetherian.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
⊢ IsNoetherian R M ↔ WellFounded fun x x_1 => x > x_1
state_after: R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
this : (WellFounded fun x x_1 => x > x_1) ↔ ∀ (k : Submodule R M), CompleteLattice.IsCompactElement k
⊢ IsNoetherian R M ↔ WellFounded fun x x_1 => x > x_1
tactic: have := (CompleteLattice.wellFounded_characterisations <| Submodule R M).out 0 3
state_before: R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
this : (WellFounded fun x x_1 => x > x_1) ↔ ∀ (k : Submodule R M), CompleteLattice.IsCompactElement k
⊢ IsNoetherian R M ↔ WellFounded fun x x_1 => x > x_1
state_after: R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
this : (WellFounded fun x x_1 => x > x_1) ↔ ∀ (k : Submodule R M), CompleteLattice.IsCompactElement k
⊢ IsNoetherian R M ↔ ∀ (k : Submodule R M), CompleteLattice.IsCompactElement k
tactic: rw [this]
state_before: R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
this : (WellFounded fun x x_1 => x > x_1) ↔ ∀ (k : Submodule R M), CompleteLattice.IsCompactElement k
⊢ IsNoetherian R M ↔ ∀ (k : Submodule R M), CompleteLattice.IsCompactElement k
state_after: no goals
tactic: exact
    ⟨fun ⟨h⟩ => fun k => (fg_iff_compact k).mp (h k), fun h =>
      ⟨fun k => (fg_iff_compact k).mpr (h k)⟩⟩
Theorem: String.foldr_eq
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: α : Type u_1
f : Char → α → α
s : String
a : α
⊢ foldr f a s = List.foldr f a s.data
state_after: no goals
tactic: simpa using foldrAux_of_valid f [] s.1 [] a
Theorem: LinearMap.mulRight_one
File: Mathlib/Algebra/Algebra/Bilinear.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
⊢ mulRight R 1 = id
state_after: case h
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
x✝ : A
⊢ (mulRight R 1) x✝ = id x✝
tactic: ext
state_before: case h
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
x✝ : A
⊢ (mulRight R 1) x✝ = id x✝
state_after: no goals
tactic: simp
Theorem: Polynomial.Monic.eq_one_of_isUnit
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hm : p.Monic
hpu : IsUnit p
⊢ p = 1
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
⊢ p = 1
tactic: nontriviality R
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
⊢ p = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
⊢ p = 1
tactic: obtain ⟨q, h⟩ := hpu.exists_right_inv
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
⊢ p = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : (p * q).natDegree = p.natDegree + q.natDegree
⊢ p = 1
tactic: have := hm.natDegree_mul' (right_ne_zero_of_mul_eq_one h)
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : (p * q).natDegree = p.natDegree + q.natDegree
⊢ p = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : p.natDegree = 0 ∧ q.natDegree = 0
⊢ p = 1
tactic: rw [h, natDegree_one, eq_comm, add_eq_zero_iff] at this
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hm : p.Monic
hpu : IsUnit p
a✝ : Nontrivial R
q : R[X]
h : p * q = 1
this : p.natDegree = 0 ∧ q.natDegree = 0
⊢ p = 1
state_after: no goals
tactic: exact hm.natDegree_eq_zero_iff_eq_one.mp this.1
Theorem: Real.le_arcsin_iff_sin_le
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

Proof steps:
state_before: x✝ y✝ x y : ℝ
hx : x ∈ Icc (-(π / 2)) (π / 2)
hy : y ∈ Icc (-1) 1
⊢ x ≤ arcsin y ↔ sin x ≤ y
state_after: no goals
tactic: rw [← neg_le_neg_iff, ← arcsin_neg,
    arcsin_le_iff_le_sin ⟨neg_le_neg hy.2, neg_le.2 hy.1⟩ ⟨neg_le_neg hx.2, neg_le.2 hx.1⟩, sin_neg,
    neg_le_neg_iff]
Theorem: AddEquiv.op_apply_symm_apply
File: Mathlib/Algebra/Group/Opposite.lean

Proof steps:
state_before: α✝ : Type u_1
α : Type ?u.39365
β : Type ?u.39368
inst✝¹ : Mul α
inst✝ : Mul β
f : αᵐᵒᵖ ≃* βᵐᵒᵖ
x : α
⊢ (unop ∘ ⇑f.symm ∘ MulOpposite.op) ((unop ∘ ⇑f ∘ MulOpposite.op) x) = x
state_after: no goals
tactic: simp
state_before: α✝ : Type u_1
α : Type ?u.39365
β : Type ?u.39368
inst✝¹ : Mul α
inst✝ : Mul β
f : αᵐᵒᵖ ≃* βᵐᵒᵖ
x : β
⊢ (unop ∘ ⇑f ∘ MulOpposite.op) ((unop ∘ ⇑f.symm ∘ MulOpposite.op) x) = x
state_after: no goals
tactic: simp
Theorem: Polynomial.cyclotomic_eval_le_add_one_pow_totient
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean

Proof steps:
state_before: q : ℝ
hq' : 1 < q
⊢ eval q (cyclotomic 0 ℝ) ≤ (q + 1) ^ φ 0
state_after: no goals
tactic: simp
state_before: q : ℝ
hq' : 1 < q
⊢ eval q (cyclotomic 1 ℝ) ≤ (q + 1) ^ φ 1
state_after: no goals
tactic: simp [add_assoc, add_nonneg, zero_le_one]
state_before: q : ℝ
hq' : 1 < q
⊢ eval q (cyclotomic 2 ℝ) ≤ (q + 1) ^ φ 2
state_after: no goals
tactic: simp
Theorem: ZNum.of_to_int'
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
⊢ ofInt' ↑0 = 0
state_after: α : Type u_1
⊢ (Num.ofNat' 0).toZNum = 0
tactic: dsimp [ofInt', cast_zero]
state_before: α : Type u_1
⊢ (Num.ofNat' 0).toZNum = 0
state_after: no goals
tactic: erw [Num.ofNat'_zero, Num.toZNum]
state_before: α : Type u_1
a : PosNum
⊢ ofInt' ↑(pos a) = pos a
state_after: α : Type u_1
a : PosNum
⊢ (Num.pos a).toZNum = pos a
tactic: rw [cast_pos, ← PosNum.cast_to_nat, ← Num.ofInt'_toZNum, PosNum.of_to_nat]
state_before: α : Type u_1
a : PosNum
⊢ (Num.pos a).toZNum = pos a
state_after: no goals
tactic: rfl
state_before: α : Type u_1
a : PosNum
⊢ ofInt' ↑(neg a) = neg a
state_after: α : Type u_1
a : PosNum
⊢ -(Num.pos a).toZNum = neg a
tactic: rw [cast_neg, ofInt'_neg, ← PosNum.cast_to_nat, ← Num.ofInt'_toZNum, PosNum.of_to_nat]
state_before: α : Type u_1
a : PosNum
⊢ -(Num.pos a).toZNum = neg a
state_after: no goals
tactic: rfl
Theorem: Polynomial.derivative_X_add_C_sq
File: Mathlib/Algebra/Polynomial/Derivative.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : CommSemiring R
c : R
⊢ derivative ((X + C c) ^ 2) = C 2 * (X + C c)
state_after: no goals
tactic: rw [derivative_sq, derivative_X_add_C, mul_one]
Theorem: ContinuousLinearMap.coe_eq_id
File: Mathlib/Topology/Algebra/Module/Basic.lean

Proof steps:
state_before: R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝¹⁶ : Semiring R₁
inst✝¹⁵ : Semiring R₂
inst✝¹⁴ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
M₁ : Type u_4
inst✝¹³ : TopologicalSpace M₁
inst✝¹² : AddCommMonoid M₁
M'₁ : Type u_5
inst✝¹¹ : TopologicalSpace M'₁
inst✝¹⁰ : AddCommMonoid M'₁
M₂ : Type u_6
inst✝⁹ : TopologicalSpace M₂
inst✝⁸ : AddCommMonoid M₂
M₃ : Type u_7
inst✝⁷ : TopologicalSpace M₃
inst✝⁶ : AddCommMonoid M₃
M₄ : Type u_8
inst✝⁵ : TopologicalSpace M₄
inst✝⁴ : AddCommMonoid M₄
inst✝³ : Module R₁ M₁
inst✝² : Module R₁ M'₁
inst✝¹ : Module R₂ M₂
inst✝ : Module R₃ M₃
f : M₁ →L[R₁] M₁
⊢ ↑f = LinearMap.id ↔ f = id R₁ M₁
state_after: no goals
tactic: rw [← coe_id, coe_inj]
Theorem: LSeries.term_delta
File: Mathlib/NumberTheory/LSeries/Basic.lean

Proof steps:
state_before: s : ℂ
n : ℕ
⊢ term δ s n = if n = 1 then 1 else 0
state_after: case inl
s : ℂ
⊢ term δ s 0 = if 0 = 1 then 1 else 0

case inr
s : ℂ
n : ℕ
hn : n ≠ 0
⊢ term δ s n = if n = 1 then 1 else 0
tactic: rcases eq_or_ne n 0 with rfl | hn