ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: smul_inv_smul
File: Mathlib/Algebra/Group/Action/Defs.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
G : Type u_3
H : Type u_4
A : Type u_5
B : Type u_6
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
inst✝³ : Monoid M
inst✝² : MulAction M α
inst✝¹ : Group G
inst✝ : MulAction G α
g✝ : G
a✝ b : α
g : G
a : α
⊢ g • g⁻¹ • a = a
state_after: no goals
tactic: rw [smul_smul, mul_right_inv, one_smul]
Theorem: Ordnode.dual_node4L
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
l : Ordnode α
x : α
m : Ordnode α
y : α
r : Ordnode α
⊢ (l.node4L x m y r).dual = r.dual.node4R y m.dual x l.dual
state_after: no goals
tactic: cases m <;> simp [node4L, node4R, node3R, dual_node3L, dual_node', add_comm]
Theorem: MeasureTheory.Measure.compProd_add_right
File: Mathlib/Probability/Kernel/MeasureCompProd.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ✝ : Measure α
κ✝ η✝ : Kernel α β
μ : Measure α
inst✝² : SFinite μ
κ η : Kernel α β
inst✝¹ : IsSFiniteKernel κ
inst✝ : IsSFiniteKernel η
⊢ μ ⊗ₘ (κ + η) = μ ⊗ₘ κ + μ ⊗ₘ η
state_after: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ✝ : Measure α
κ✝ η✝ : Kernel α β
μ : Measure α
inst✝² : SFinite μ
κ η : Kernel α β
inst✝¹ : IsSFiniteKernel κ
inst✝ : IsSFiniteKernel η
⊢ (Kernel.const Unit μ ⊗ₖ Kernel.prodMkLeft Unit κ + Kernel.const Unit μ ⊗ₖ Kernel.prodMkLeft Unit η) () =
    μ ⊗ₘ κ + μ ⊗ₘ η
tactic: rw [Measure.compProd, Kernel.prodMkLeft_add, Kernel.compProd_add_right]
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ✝ : Measure α
κ✝ η✝ : Kernel α β
μ : Measure α
inst✝² : SFinite μ
κ η : Kernel α β
inst✝¹ : IsSFiniteKernel κ
inst✝ : IsSFiniteKernel η
⊢ (Kernel.const Unit μ ⊗ₖ Kernel.prodMkLeft Unit κ + Kernel.const Unit μ ⊗ₖ Kernel.prodMkLeft Unit η) () =
    μ ⊗ₘ κ + μ ⊗ₘ η
state_after: no goals
tactic: rfl
Theorem: IntermediateField.neg_mem
File: Mathlib/FieldTheory/IntermediateField.lean

Proof steps:
state_before: K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : L
hx : x ∈ S
⊢ -x ∈ S
state_after: K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : L
hx : x ∈ S
⊢ -x ∈ S.toSubalgebra
tactic: show -x ∈S.toSubalgebra
state_before: K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S : IntermediateField K L
x : L
hx : x ∈ S
⊢ -x ∈ S.toSubalgebra
state_after: no goals
tactic: simpa
Theorem: Nat.le_log_of_pow_le
File: Mathlib/Data/Nat/Log.lean

Proof steps:
state_before: b x y : ℕ
hb : 1 < b
h : b ^ x ≤ y
⊢ x ≤ log b y
state_after: case inl
b x y : ℕ
hb : 1 < b
h : b ^ x ≤ y
hy : y ≠ 0
⊢ x ≤ log b y

case inr
b x : ℕ
hb : 1 < b
h : b ^ x ≤ 0
⊢ x ≤ log b 0
tactic: rcases ne_or_eq y 0 with (hy | rfl)
state_before: case inl
b x y : ℕ
hb : 1 < b
h : b ^ x ≤ y
hy : y ≠ 0
⊢ x ≤ log b y

case inr
b x : ℕ
hb : 1 < b
h : b ^ x ≤ 0
⊢ x ≤ log b 0
state_after: no goals
tactic: exacts [(pow_le_iff_le_log hb hy).1 h, (h.not_lt (Nat.pow_pos (Nat.zero_lt_one.trans hb))).elim]
Theorem: Finset.card_biUnion
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : DecidableEq β
s : Finset α
t : α → Finset β
h : ∀ x ∈ s, ∀ y ∈ s, x ≠ y → Disjoint (t x) (t y)
⊢ ∑ a ∈ s, ∑ _i ∈ t a, 1 = ∑ u ∈ s, (t u).card
state_after: no goals
tactic: simp_rw [card_eq_sum_ones]
Theorem: Filter.IsBasis.mem_filter_iff
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
p : ι → Prop
s : ι → Set α
h : IsBasis p s
U : Set α
⊢ U ∈ h.filter ↔ ∃ i, p i ∧ s i ⊆ U
state_after: no goals
tactic: simp only [IsBasis.filter, FilterBasis.mem_filter_iff, mem_filterBasis_iff,
    exists_exists_and_eq_and]
Theorem: Finset.prod_filter_of_ne
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ x ∈ s, f x ≠ 1 → p x
x : α
⊢ x ∈ s → x ∉ filter p s → f x = 1
state_after: no goals
tactic: classical
      rw [not_imp_comm, mem_filter]
      exact fun h₁ h₂ => ⟨h₁, by simpa using hp _ h₁ h₂⟩
Theorem: isMulFreimanIso_id
File: Mathlib/Combinatorics/Additive/FreimanHom.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : CommMonoid γ
A A₁ A₂ : Set α
B B₁ B₂ : Set β
C : Set γ
f f₁ f₂ : α → β
g : β → γ
m n : ℕ
s t : Multiset α
x✝³ : ∀ ⦃x : α⦄, x ∈ s → x ∈ A
x✝² : ∀ ⦃x : α⦄, x ∈ t → x ∈ A
x✝¹ : card s = n
x✝ : card t = n
⊢ (map id s).prod = (map id t).prod ↔ s.prod = t.prod
state_after: no goals
tactic: simp
Theorem: Finset.lt_geomSum_of_mem
File: Mathlib/Combinatorics/Colex.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Finset ℕ
n a : ℕ
hn : 2 ≤ n
hi : a ∈ s
⊢ ∀ i ∈ s, 0 ≤ n ^ i
state_after: no goals
tactic: simp
Theorem: ONote.omega_le_oadd
File: Mathlib/SetTheory/Ordinal/Notation.lean

Proof steps:
state_before: e : ONote
n : ℕ+
a : ONote
⊢ ω ^ e.repr ≤ (e.oadd n a).repr
state_after: e : ONote
n : ℕ+
a : ONote
⊢ ω ^ e.repr ≤ ω ^ e.repr * ↑↑n
tactic: refine le_trans ?_ (le_add_right _ _)
state_before: e : ONote
n : ℕ+
a : ONote
⊢ ω ^ e.repr ≤ ω ^ e.repr * ↑↑n
state_after: no goals
tactic: simpa using (Ordinal.mul_le_mul_iff_left <| opow_pos (repr e) omega_pos).2 (natCast_le.2 n.2)
Theorem: PowerSeries.normUnit_X
File: Mathlib/RingTheory/PowerSeries/Inverse.lean

Proof steps:
state_before: R : Type u_1
k : Type u_2
inst✝ : Field k
⊢ normUnit X = 1
state_after: no goals
tactic: simp [normUnit, ← Units.val_eq_one, Unit_of_divided_by_X_pow_order_nonzero]
Theorem: ThreeGPFree.smul_set
File: Mathlib/Combinatorics/Additive/AP/Three/Defs.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a : α
hs : ThreeGPFree s
⊢ ThreeGPFree (a • s)
state_after: case intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a : α
hs : ThreeGPFree s
b : α
hb : b ∈ s
c : α
hc : c ∈ s
d : α
hd : d ∈ s
h : (fun x => a • x) b * (fun x => a • x) d = (fun x => a • x) c * (fun x => a • x) c
⊢ (fun x => a • x) b = (fun x => a • x) c
tactic: rintro _ ⟨b, hb, rfl⟩ _ ⟨c, hc, rfl⟩ _ ⟨d, hd, rfl⟩ h
Theorem: cfc_const
File: Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : MetricSpace R
inst✝⁶ : TopologicalSemiring R
inst✝⁵ : ContinuousStar R
inst✝⁴ : TopologicalSpace A
inst✝³ : Ring A
inst✝² : StarRing A
inst✝¹ : Algebra R A
inst✝ : ContinuousFunctionalCalculus R p
f g : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a✝)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a✝)) _auto✝
r : R
a : A
ha : autoParam (p a) _auto✝
⊢ cfc (fun x => r) a = (algebraMap R A) r
state_after: R : Type u_1
A : Type u_2
p : A → Prop
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : MetricSpace R
inst✝⁶ : TopologicalSemiring R
inst✝⁵ : ContinuousStar R
inst✝⁴ : TopologicalSpace A
inst✝³ : Ring A
inst✝² : StarRing A
inst✝¹ : Algebra R A
inst✝ : ContinuousFunctionalCalculus R p
f g : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a✝)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a✝)) _auto✝
r : R
a : A
ha : autoParam (p a) _auto✝
⊢ (cfcHom ha) { toFun := (spectrum R a).restrict fun x => r, continuous_toFun := ⋯ } =
    (cfcHom ha) ((algebraMap R C(↑(spectrum R a), R)) r)
tactic: rw [cfc_apply (fun _ : R ↦ r) a, ← AlgHomClass.commutes (cfcHom ha (p := p)) r]
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : MetricSpace R
inst✝⁶ : TopologicalSemiring R
inst✝⁵ : ContinuousStar R
inst✝⁴ : TopologicalSpace A
inst✝³ : Ring A
inst✝² : StarRing A
inst✝¹ : Algebra R A
inst✝ : ContinuousFunctionalCalculus R p
f g : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a✝)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a✝)) _auto✝
r : R
a : A
ha : autoParam (p a) _auto✝
⊢ (cfcHom ha) { toFun := (spectrum R a).restrict fun x => r, continuous_toFun := ⋯ } =
    (cfcHom ha) ((algebraMap R C(↑(spectrum R a), R)) r)
state_after: no goals
tactic: congr
Theorem: AList.union_assoc
File: Mathlib/Data/List/AList.lean

Proof steps:
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : AList β
⊢ ∀ (x : α) (y : β x), y ∈ dlookup x (s₁ ∪ s₂ ∪ s₃).entries ↔ y ∈ dlookup x (s₁ ∪ (s₂ ∪ s₃)).entries
state_after: no goals
tactic: simp [not_or, or_assoc, and_or_left, and_assoc]
Theorem: negPart_add_posPart
File: Mathlib/Algebra/Order/Group/PosPart.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
a✝ : α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ a⁻ᵐ * a⁺ᵐ = mabs a
state_after: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
a✝ : α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ a ⊔ a⁻¹ ⊔ 1 = mabs a
tactic: rw [oneLePart, mul_sup, mul_one, leOnePart, sup_mul, one_mul, inv_mul_self, sup_assoc,
    ← @sup_assoc _ _ a, sup_eq_right.2 le_sup_right]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
a✝ : α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ a ⊔ a⁻¹ ⊔ 1 = mabs a
state_after: no goals
tactic: exact sup_eq_left.2 <| one_le_mabs a
Theorem: AdjoinRoot.isAdjoinRoot_root_eq_root
File: Mathlib/RingTheory/IsAdjoinRoot.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
⊢ (AdjoinRoot.isAdjoinRoot f).root = root f
state_after: no goals
tactic: simp only [IsAdjoinRoot.root, AdjoinRoot.root, AdjoinRoot.isAdjoinRoot_map_eq_mk]
Theorem: add_add_sub_cancel
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 c : G
⊢ a * c * (b / c) = a * b
state_after: no goals
tactic: rw [mul_assoc, mul_div_cancel]
Theorem: AntilipschitzWith.comp
File: Mathlib/Topology/MetricSpace/Antilipschitz.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
Kg : ℝ≥0
g : β → γ
hg : AntilipschitzWith Kg g
Kf : ℝ≥0
f : α → β
hf : AntilipschitzWith Kf f
x y : α
⊢ ↑Kf * (↑Kg * edist (g (f x)) (g (f y))) = ↑(Kf * Kg) * edist ((g ∘ f) x) ((g ∘ f) y)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
Kg : ℝ≥0
g : β → γ
hg : AntilipschitzWith Kg g
Kf : ℝ≥0
f : α → β
hf : AntilipschitzWith Kf f
x y : α
⊢ ↑Kf * (↑Kg * edist (g (f x)) (g (f y))) = ↑Kf * (↑Kg * edist ((g ∘ f) x) ((g ∘ f) y))
tactic: rw [ENNReal.coe_mul, mul_assoc]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
Kg : ℝ≥0
g : β → γ
hg : AntilipschitzWith Kg g
Kf : ℝ≥0
f : α → β
hf : AntilipschitzWith Kf f
x y : α
⊢ ↑Kf * (↑Kg * edist (g (f x)) (g (f y))) = ↑Kf * (↑Kg * edist ((g ∘ f) x) ((g ∘ f) y))
state_after: no goals
tactic: rfl
Theorem: PowerSeries.coeff_X
File: Mathlib/RingTheory/PowerSeries/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
⊢ (coeff R n) X = if n = 1 then 1 else 0
state_after: no goals
tactic: rw [X_eq, coeff_monomial]
Theorem: Finset.map_subtype_embedding_Iio
File: Mathlib/Order/Interval/Finset/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Iio a) = Iio ↑a
state_after: α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Iio ↑a)) = Iio ↑a
tactic: rw [subtype_Iio_eq]
state_before: α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Iio ↑a)) = Iio ↑a
state_after: no goals
tactic: exact Finset.subtype_map_of_mem fun x hx => hp (mem_Iio.1 hx).le a.prop
Theorem: MeasureTheory.Measure.integral_toReal_rnDeriv
File: Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
⊢ ∫ (x : α), (μ.rnDeriv ν x).toReal ∂ν = (μ Set.univ).toReal
state_after: no goals
tactic: rw [← integral_univ, setIntegral_toReal_rnDeriv hμν Set.univ]
Theorem: NNReal.rpow_inv_lt_iff
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

Proof steps:
state_before: w x✝ y✝ z✝ : ℝ
x y : ℝ≥0
z : ℝ
hz : 0 < z
⊢ x ^ z⁻¹ < y ↔ x < y ^ z
state_after: no goals
tactic: simp only [← not_le, le_rpow_inv_iff hz]
Theorem: LieAlgebra.IsKilling.ker_killingForm_eq_bot
File: Mathlib/Algebra/Lie/Killing.lean

Proof steps:
state_before: R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : Field K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : LieAlgebra K L
inst✝² : Module.Free R L
inst✝¹ : Module.Finite R L
inst✝ : IsKilling R L
⊢ LinearMap.ker (killingForm R L) = ⊥
state_after: no goals
tactic: simp [← LieIdeal.coe_killingCompl_top, killingCompl_top_eq_bot]
Theorem: Nat.geom_sum_Ico_le
File: Mathlib/Algebra/GeomSum.lean

Proof steps:
state_before: α : Type u
β : Type u_1
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ∑ i ∈ Ico 1 n, a / b ^ i ≤ a / (b - 1)
state_after: case zero
α : Type u
β : Type u_1
b : ℕ
hb : 2 ≤ b
a : ℕ
⊢ ∑ i ∈ Ico 1 0, a / b ^ i ≤ a / (b - 1)

case succ
α : Type u
β : Type u_1
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ∑ i ∈ Ico 1 (n + 1), a / b ^ i ≤ a / (b - 1)
tactic: cases' n with n
state_before: case succ
α : Type u
β : Type u_1
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ∑ i ∈ Ico 1 (n + 1), a / b ^ i ≤ a / (b - 1)
state_after: case succ
α : Type u
β : Type u_1
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ a + ∑ i ∈ Ico 1 (n + 1), a / b ^ i ≤ a + a / (b - 1)
tactic: rw [← add_le_add_iff_left a]
state_before: case succ
α : Type u
β : Type u_1
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ a + ∑ i ∈ Ico 1 (n + 1), a / b ^ i ≤ a + a / (b - 1)
state_after: no goals
tactic: calc
    (a + ∑ i ∈ Ico 1 n.succ, a / b ^ i) = a / b ^ 0 + ∑ i ∈ Ico 1 n.succ, a / b ^ i := by
      rw [pow_zero, Nat.div_one]
    _ = ∑ i ∈ range n.succ, a / b ^ i := by
      rw [range_eq_Ico, ← Nat.Ico_insert_succ_left (Nat.succ_pos _), sum_insert]
      exact fun h => zero_lt_one.not_le (mem_Ico.1 h).1
    _ ≤ a * b / (b - 1) := Nat.geom_sum_le hb a _
    _ = (a * 1 + a * (b - 1)) / (b - 1) := by
      rw [← mul_add, add_tsub_cancel_of_le (one_le_two.trans hb)]
    _ = a + a / (b - 1) := by rw [mul_one, Nat.add_mul_div_right _ _ (tsub_pos_of_lt hb), add_comm]
Theorem: sub_pos
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: CategoryTheory.MonoidalCategory.associator_naturality_right
File: Mathlib/CategoryTheory/Monoidal/Category.lean

Proof steps:
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z✝ X Y Z Z' : C
f : Z ⟶ Z'
⊢ (X ⊗ Y) ◁ f ≫ (α_ X Y Z').hom = (α_ X Y Z).hom ≫ X ◁ Y ◁ f
state_after: no goals
tactic: simp
Theorem: CircleDeg1Lift.commute_sub_nat
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Proof steps:
state_before: f g : CircleDeg1Lift
n : ℕ
⊢ Function.Commute ⇑f fun x => x - ↑n
state_after: no goals
tactic: simpa only [sub_eq_add_neg] using
    (f.commute_add_nat n).inverses_right (Equiv.addRight _).right_inv (Equiv.addRight _).left_inv
Theorem: Polynomial.isUnit_aeval_of_isUnit_aeval_of_isNilpotent_sub
File: Mathlib/RingTheory/Polynomial/Nilpotent.lean

Proof steps:
state_before: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsUnit ((aeval a) P)
state_after: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsUnit ((aeval b) P + ((aeval a) P - (aeval b) P))
tactic: rw [← add_sub_cancel (aeval b P) (aeval a P)]
state_before: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsUnit ((aeval b) P + ((aeval a) P - (aeval b) P))
state_after: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsNilpotent ((aeval a) P - (aeval b) P)
tactic: refine IsNilpotent.isUnit_add_left_of_commute ?_ hb (Commute.all _ _)
state_before: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsNilpotent ((aeval a) P - (aeval b) P)
state_after: no goals
tactic: exact isNilpotent_aeval_sub_of_isNilpotent_sub P hab
Theorem: List.foldl_argAux_eq_none
File: Mathlib/Data/List/MinMax.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
⊢ foldl (argAux r) o [] = none ↔ [] = [] ∧ o = none
state_after: no goals
tactic: simp
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd : α
⊢ (foldl (argAux r) o tl = none ↔ tl = [] ∧ o = none) →
    (foldl (argAux r) o (tl ++ [hd]) = none ↔ tl ++ [hd] = [] ∧ o = none)
state_after: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd : α
⊢ (foldl (argAux r) o tl = none ↔ tl = [] ∧ o = none) →
    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val) (foldl (argAux r) o tl) = none
tactic: simp only [foldl_append, foldl_cons, argAux, foldl_nil, append_eq_nil, and_false, false_and,
      iff_false]
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd : α
⊢ (foldl (argAux r) o tl = none ↔ tl = [] ∧ o = none) →
    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val) (foldl (argAux r) o tl) = none
state_after: case none
α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd : α
⊢ (none = none ↔ tl = [] ∧ o = none) →
    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val) none = none

case some
α : Type u_1
β : Type u_2
r : α → α → Prop
inst✝ : DecidableRel r
l : List α
o : Option α
a m : α
tl : List α
hd val✝ : α
⊢ (some val✝ = none ↔ tl = [] ∧ o = none) →
    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val) (some val✝) = none
tactic: cases foldl (argAux r) o tl
Theorem: Filter.eventually_forall_ge_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
⊢ (∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y) ↔ ∀ᶠ (x : α) in atTop, p x
state_after: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
⊢ ∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y
tactic: refine ⟨fun h ↦ h.mono fun x hx ↦ hx x le_rfl, fun h ↦ ?_⟩
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
⊢ ∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y
state_after: case intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : S.Finite
hS : ∀ ⦃x : α⦄, x ∈ ⋂ i ∈ S, Ici i → p x
⊢ ∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y
tactic: rcases (hasBasis_iInf_principal_finite _).eventually_iff.1 h with ⟨S, hSf, hS⟩
state_before: case intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : S.Finite
hS : ∀ ⦃x : α⦄, x ∈ ⋂ i ∈ S, Ici i → p x
⊢ ∀ᶠ (x : α) in atTop, ∀ (y : α), x ≤ y → p y
state_after: case intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : S.Finite
hS : ∀ ⦃x : α⦄, x ∈ ⋂ i ∈ S, Ici i → p x
x : α
hx : x ∈ ⋂ i, (fun x => Ici ↑x) i
y : α
hy : x ≤ y
⊢ p y
tactic: refine mem_iInf_of_iInter hSf (V := fun x ↦ Ici x.1) (fun _ ↦ Subset.rfl) fun x hx y hy ↦ ?_
state_before: case intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : S.Finite
hS : ∀ ⦃x : α⦄, x ∈ ⋂ i ∈ S, Ici i → p x
x : α
hx : x ∈ ⋂ i, (fun x => Ici ↑x) i
y : α
hy : x ≤ y
⊢ p y
state_after: case intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : S.Finite
x y : α
hy : x ≤ y
hS : ∀ ⦃x : α⦄, (∀ i ∈ S, x ∈ Ici i) → p x
hx : ∀ (i : ↑S), x ∈ Ici ↑i
⊢ p y
tactic: simp only [mem_iInter] at hS hx
state_before: case intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : Preorder α
p : α → Prop
h : ∀ᶠ (x : α) in atTop, p x
S : Set α
hSf : S.Finite
x y : α
hy : x ≤ y
hS : ∀ ⦃x : α⦄, (∀ i ∈ S, x ∈ Ici i) → p x
hx : ∀ (i : ↑S), x ∈ Ici ↑i
⊢ p y
state_after: no goals
tactic: exact hS fun z hz ↦ le_trans (hx ⟨z, hz⟩) hy
Theorem: Complex.sq_abs_sub_sq_im
File: Mathlib/Data/Complex/Abs.lean

Proof steps:
state_before: z : ℂ
⊢ abs z ^ 2 - z.im ^ 2 = z.re ^ 2
state_after: no goals
tactic: rw [← sq_abs_sub_sq_re, sub_sub_cancel]