ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Submodule.mem_set_smul_of_mem_mem
File: Mathlib/Algebra/Module/Submodule/Pointwise.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
S : Type u_4
inst✝³ : Monoid S
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DistribMulAction S M
sR : Set R
s : Set S
N : Submodule R M
r : S
m : M
mem1 : r ∈ s
mem2 : m ∈ N
⊢ r • m ∈ s • N
state_after: α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
S : Type u_4
inst✝³ : Monoid S
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DistribMulAction S M
sR : Set R
s : Set S
N : Submodule R M
r : S
m : M
mem1 : r ∈ s
mem2 : m ∈ N
⊢ ∀ p ∈ {p | ∀ ⦃r : S⦄ {n : M}, r ∈ s → n ∈ N → r • n ∈ p}, r • m ∈ p
tactic: rw [mem_set_smul_def, mem_sInf]
state_before: α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
S : Type u_4
inst✝³ : Monoid S
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DistribMulAction S M
sR : Set R
s : Set S
N : Submodule R M
r : S
m : M
mem1 : r ∈ s
mem2 : m ∈ N
⊢ ∀ p ∈ {p | ∀ ⦃r : S⦄ {n : M}, r ∈ s → n ∈ N → r • n ∈ p}, r • m ∈ p
state_after: no goals
tactic: exact fun _ h => h mem1 mem2
Theorem: Nat.ascFactorial_eq_factorial_mul_choose'
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: n k : ℕ
⊢ n.ascFactorial k = k ! * (n + k - 1).choose k
state_after: case zero
k : ℕ
⊢ ascFactorial 0 k = k ! * (0 + k - 1).choose k

case succ
k n✝ : ℕ
⊢ (n✝ + 1).ascFactorial k = k ! * (n✝ + 1 + k - 1).choose k
tactic: cases n
state_before: case succ
k n✝ : ℕ
⊢ (n✝ + 1).ascFactorial k = k ! * (n✝ + 1 + k - 1).choose k
state_after: case succ
k n✝ : ℕ
⊢ k ! * (n✝ + k).choose k = k ! * (n✝ + 1 + k - 1).choose k
tactic: rw [ascFactorial_eq_factorial_mul_choose]
state_before: case succ
k n✝ : ℕ
⊢ k ! * (n✝ + k).choose k = k ! * (n✝ + 1 + k - 1).choose k
state_after: no goals
tactic: simp only [succ_add_sub_one]
Theorem: Part.bind_map
File: Mathlib/Data/Part.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ✝ : Type u_3
γ : Type u_4
f : α → β
x : Part α
g : β → Part γ
⊢ (map f x).bind g = x.bind fun y => g (f y)
state_after: α : Type u_1
β : Type u_2
γ✝ : Type u_3
γ : Type u_4
f : α → β
x : Part α
g : β → Part γ
⊢ (x.bind fun x => ((some ∘ f) x).bind g) = x.bind fun y => g (f y)
tactic: rw [← bind_some_eq_map, bind_assoc]
state_before: α : Type u_1
β : Type u_2
γ✝ : Type u_3
γ : Type u_4
f : α → β
x : Part α
g : β → Part γ
⊢ (x.bind fun x => ((some ∘ f) x).bind g) = x.bind fun y => g (f y)
state_after: no goals
tactic: simp
Theorem: Set.Icc_bot_top
File: Mathlib/Order/Interval/Set/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : PartialOrder α
inst✝ : BoundedOrder α
⊢ Icc ⊥ ⊤ = univ
state_after: no goals
tactic: simp
Theorem: Orientation.norm_div_cos_oangle_sub_right_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ ‖y‖ / (o.oangle y (y - x)).cos = ‖y - x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle y (y - x)).sign = 1
⊢ ‖y‖ / (o.oangle y (y - x)).cos = ‖y - x‖
tactic: have hs : (o.oangle y (y - x)).sign = 1 := by
    rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle y (y - x)).sign = 1
⊢ ‖y‖ / (o.oangle y (y - x)).cos = ‖y - x‖
state_after: no goals
tactic: rw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,
    InnerProductGeometry.norm_div_cos_angle_sub_of_inner_eq_zero
      (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)
      (Or.inl (o.right_ne_zero_of_oangle_eq_pi_div_two h))]
Theorem: MonoidHom.closure_preimage_le
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
s : Set N
x : G
hx : x ∈ ⇑f ⁻¹' s
⊢ x ∈ ↑(comap f (closure s))
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
s : Set N
x : G
hx : x ∈ ⇑f ⁻¹' s
⊢ f x ∈ closure s
tactic: rw [SetLike.mem_coe, mem_comap]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
N : Type u_5
P : Type u_6
inst✝¹ : Group N
inst✝ : Group P
K : Subgroup G
f : G →* N
s : Set N
x : G
hx : x ∈ ⇑f ⁻¹' s
⊢ f x ∈ closure s
state_after: no goals
tactic: exact subset_closure hx
Theorem: _private.Mathlib.Tactic.Peel.0.Mathlib.Tactic.Peel.eventually_congr
File: Mathlib/Tactic/Peel.lean

Proof steps:
state_before: α : Type u_1
p q : α → Prop
f : Filter α
hq : ∀ (x : α), p x ↔ q x
⊢ (∀ᶠ (x : α) in f, p x) ↔ ∀ᶠ (x : α) in f, q x
state_after: case a.h.e'_2.h.a
α : Type u_1
p q : α → Prop
f : Filter α
hq : ∀ (x : α), p x ↔ q x
x✝ : α
⊢ p x✝ ↔ q x✝
tactic: congr! 2
state_before: case a.h.e'_2.h.a
α : Type u_1
p q : α → Prop
f : Filter α
hq : ∀ (x : α), p x ↔ q x
x✝ : α
⊢ p x✝ ↔ q x✝
state_after: no goals
tactic: exact hq _
Theorem: Cardinal.toNat_apply_of_lt_aleph0
File: Mathlib/SetTheory/Cardinal/ToNat.lean

Proof steps:
state_before: α : Type u
c✝ d c : Cardinal.{u}
h : c < ℵ₀
⊢ ↑(toNat c) = ↑(Classical.choose ⋯)
state_after: no goals
tactic: rw [cast_toNat_of_lt_aleph0 h, ← Classical.choose_spec (lt_aleph0.1 h)]
Theorem: MeasureTheory.SimpleFunc.tendsto_approxOn_range_Lp
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : BorelSpace E
f : β → E
hp : Fact (1 ≤ p)
hp_ne_top : p ≠ ⊤
μ : Measure β
fmeas : Measurable f
inst✝ : SeparableSpace ↑(Set.range f ∪ {0})
hf : Memℒp f p μ
n : ℕ
⊢ 0 ∈ Set.range f ∪ {0}
state_after: no goals
tactic: simp
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : BorelSpace E
f : β → E
hp : Fact (1 ≤ p)
hp_ne_top : p ≠ ⊤
μ : Measure β
fmeas : Measurable f
inst✝ : SeparableSpace ↑(Set.range f ∪ {0})
hf : Memℒp f p μ
⊢ Tendsto (fun n => Memℒp.toLp ↑(approxOn f fmeas (Set.range f ∪ {0}) 0 ⋯ n) ⋯) atTop (𝓝 (Memℒp.toLp f hf))
state_after: no goals
tactic: simpa only [Lp.tendsto_Lp_iff_tendsto_ℒp''] using
    tendsto_approxOn_range_Lp_eLpNorm hp_ne_top fmeas hf.2
Theorem: Multiset.prod_singleton
File: Mathlib/Algebra/BigOperators/Group/Multiset.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : CommMonoid α
inst✝ : CommMonoid β
s t : Multiset α
a✝ : α
m : Multiset ι
f g : ι → α
a : α
⊢ {a}.prod = a
state_after: no goals
tactic: simp only [mul_one, prod_cons, ← cons_zero, eq_self_iff_true, prod_zero]
Theorem: SimpleGraph.Subgraph.verts_iSup
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

Proof steps:
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : G.Subgraph
a b : V
f : ι → G.Subgraph
⊢ (⨆ i, f i).verts = ⋃ i, (f i).verts
state_after: no goals
tactic: simp [iSup]
Theorem: Ordnode.Sized.balance'
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
⊢ (l.balance' x r).Sized
state_after: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
⊢ (if l.size + r.size ≤ 1 then l.node' x r
    else
      if r.size > delta * l.size then l.rotateL x r
      else if l.size > delta * r.size then l.rotateR x r else l.node' x r).Sized
tactic: unfold balance'
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
⊢ (if l.size + r.size ≤ 1 then l.node' x r
    else
      if r.size > delta * l.size then l.rotateL x r
      else if l.size > delta * r.size then l.rotateR x r else l.node' x r).Sized
state_after: case pos
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
h✝ : l.size + r.size ≤ 1
⊢ (l.node' x r).Sized

case pos
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
h✝¹ : ¬l.size + r.size ≤ 1
h✝ : r.size > delta * l.size
⊢ (l.rotateL x r).Sized

case pos
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
h✝² : ¬l.size + r.size ≤ 1
h✝¹ : ¬r.size > delta * l.size
h✝ : l.size > delta * r.size
⊢ (l.rotateR x r).Sized

case neg
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : l.Sized
hr : r.Sized
h✝² : ¬l.size + r.size ≤ 1
h✝¹ : ¬r.size > delta * l.size
h✝ : ¬l.size > delta * r.size
⊢ (l.node' x r).Sized
tactic: split_ifs
Theorem: Finset.filter_product_right
File: Mathlib/Data/Finset/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
q : β → Prop
inst✝ : DecidablePred q
⊢ filter (fun x => q x.2) (s ×ˢ t) = s ×ˢ filter q t
state_after: no goals
tactic: simpa using filter_product (fun _ : α => true) q
Theorem: WittVector.toPadicInt_comp_fromPadicInt
File: Mathlib/RingTheory/WittVector/Compare.lean

Proof steps:
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ (toPadicInt p).comp (fromPadicInt p) = RingHom.id ℤ_[p]
state_after: p : ℕ
hp : Fact (Nat.Prime p)
⊢ ∀ (n : ℕ),
    (PadicInt.toZModPow n).comp ((toPadicInt p).comp (fromPadicInt p)) = (PadicInt.toZModPow n).comp (RingHom.id ℤ_[p])
tactic: rw [← PadicInt.toZModPow_eq_iff_ext]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
⊢ ∀ (n : ℕ),
    (PadicInt.toZModPow n).comp ((toPadicInt p).comp (fromPadicInt p)) = (PadicInt.toZModPow n).comp (RingHom.id ℤ_[p])
state_after: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (PadicInt.toZModPow n).comp ((toPadicInt p).comp (fromPadicInt p)) = (PadicInt.toZModPow n).comp (RingHom.id ℤ_[p])
tactic: intro n
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (PadicInt.toZModPow n).comp ((toPadicInt p).comp (fromPadicInt p)) = (PadicInt.toZModPow n).comp (RingHom.id ℤ_[p])
state_after: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (toZModPow p n).comp (fromPadicInt p) = (PadicInt.toZModPow n).comp (RingHom.id ℤ_[p])
tactic: rw [← RingHom.comp_assoc, toPadicInt, PadicInt.lift_spec]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (toZModPow p n).comp (fromPadicInt p) = (PadicInt.toZModPow n).comp (RingHom.id ℤ_[p])
state_after: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ((zmodEquivTrunc p n).symm.toRingHom.comp (truncate n)).comp
      (lift (fun k => (zmodEquivTrunc p k).toRingHom.comp (PadicInt.toZModPow k)) ⋯) =
    PadicInt.toZModPow n
tactic: simp only [fromPadicInt, toZModPow, RingHom.comp_id]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ((zmodEquivTrunc p n).symm.toRingHom.comp (truncate n)).comp
      (lift (fun k => (zmodEquivTrunc p k).toRingHom.comp (PadicInt.toZModPow k)) ⋯) =
    PadicInt.toZModPow n
state_after: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ((zmodEquivTrunc p n).symm.toRingHom.comp (zmodEquivTrunc p n).toRingHom).comp (PadicInt.toZModPow n) =
    PadicInt.toZModPow n
tactic: rw [RingHom.comp_assoc, truncate_comp_lift, ← RingHom.comp_assoc]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ((zmodEquivTrunc p n).symm.toRingHom.comp (zmodEquivTrunc p n).toRingHom).comp (PadicInt.toZModPow n) =
    PadicInt.toZModPow n
state_after: no goals
tactic: simp only [RingEquiv.symm_toRingHom_comp_toRingHom, RingHom.id_comp]
Theorem: HomotopyCategory.quotient_obj_mem_subcategoryAcyclic_iff_exactAt
File: Mathlib/Algebra/Homology/DerivedCategory/Basic.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
⊢ (subcategoryAcyclic C).P ((quotient C (ComplexShape.up ℤ)).obj K) ↔ ∀ (n : ℤ), HomologicalComplex.ExactAt K n
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
⊢ (∀ (n : ℤ), IsZero ((homologyFunctor C (ComplexShape.up ℤ) n).obj ((quotient C (ComplexShape.up ℤ)).obj K))) ↔
    ∀ (n : ℤ), HomologicalComplex.ExactAt K n
tactic: rw [mem_subcategoryAcyclic_iff]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
⊢ (∀ (n : ℤ), IsZero ((homologyFunctor C (ComplexShape.up ℤ) n).obj ((quotient C (ComplexShape.up ℤ)).obj K))) ↔
    ∀ (n : ℤ), HomologicalComplex.ExactAt K n
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
n : ℤ
⊢ IsZero ((homologyFunctor C (ComplexShape.up ℤ) n).obj ((quotient C (ComplexShape.up ℤ)).obj K)) ↔
    HomologicalComplex.ExactAt K n
tactic: refine forall_congr' (fun n => ?_)
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
n : ℤ
⊢ IsZero ((homologyFunctor C (ComplexShape.up ℤ) n).obj ((quotient C (ComplexShape.up ℤ)).obj K)) ↔
    HomologicalComplex.ExactAt K n
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
n : ℤ
⊢ IsZero ((homologyFunctor C (ComplexShape.up ℤ) n).obj ((quotient C (ComplexShape.up ℤ)).obj K)) ↔
    IsZero (HomologicalComplex.homology K n)
tactic: simp only [HomologicalComplex.exactAt_iff_isZero_homology]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
K : CochainComplex C ℤ
n : ℤ
⊢ IsZero ((homologyFunctor C (ComplexShape.up ℤ) n).obj ((quotient C (ComplexShape.up ℤ)).obj K)) ↔
    IsZero (HomologicalComplex.homology K n)
state_after: no goals
tactic: exact ((homologyFunctorFactors C (ComplexShape.up ℤ) n).app K).isZero_iff
Theorem: coord_norm'
File: Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean

Proof steps:
state_before: 𝕜 : Type v
inst✝² : RCLike 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
h : x ≠ 0
⊢ ‖↑‖x‖ • coord 𝕜 x h‖ = 1
state_after: no goals
tactic: set_option maxSynthPendingDepth 2 in
  rw [norm_smul (α := 𝕜) (x := coord 𝕜 x h), RCLike.norm_coe_norm, coord_norm,
    mul_inv_cancel (mt norm_eq_zero.mp h)]
Theorem: pow_right_mono
File: Mathlib/Algebra/Order/Ring/Basic.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedSemiring R
a b x y : R
n✝ m : ℕ
h : 1 ≤ a
n : ℕ
⊢ a ^ n ≤ a ^ (n + 1)
state_after: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedSemiring R
a b x y : R
n✝ m : ℕ
h : 1 ≤ a
n : ℕ
⊢ a ^ n ≤ a * a ^ n
tactic: rw [pow_succ']
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedSemiring R
a b x y : R
n✝ m : ℕ
h : 1 ≤ a
n : ℕ
⊢ a ^ n ≤ a * a ^ n
state_after: no goals
tactic: exact le_mul_of_one_le_left (pow_nonneg (zero_le_one.trans h) _) h
Theorem: FirstOrder.Language.Term.encoding_encode
File: Mathlib/ModelTheory/Encoding.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
α : Type u'
β : Type v'
t : L.Term α
⊢ (fun l =>
        (do
            let a ← (listDecode l).head?
            pure (some a)).join)
      t.listEncode =
    some t
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
α : Type u'
β : Type v'
t : L.Term α
h : listDecode ([t].bind listEncode) = [t]
⊢ (fun l =>
        (do
            let a ← (listDecode l).head?
            pure (some a)).join)
      t.listEncode =
    some t
tactic: have h := listDecode_encode_list [t]
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
α : Type u'
β : Type v'
t : L.Term α
h : listDecode ([t].bind listEncode) = [t]
⊢ (fun l =>
        (do
            let a ← (listDecode l).head?
            pure (some a)).join)
      t.listEncode =
    some t
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
α : Type u'
β : Type v'
t : L.Term α
h : listDecode t.listEncode = [t]
⊢ (fun l =>
        (do
            let a ← (listDecode l).head?
            pure (some a)).join)
      t.listEncode =
    some t
tactic: rw [bind_singleton] at h
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
α : Type u'
β : Type v'
t : L.Term α
h : listDecode t.listEncode = [t]
⊢ (fun l =>
        (do
            let a ← (listDecode l).head?
            pure (some a)).join)
      t.listEncode =
    some t
state_after: no goals
tactic: simp only [Option.join, h, head?_cons, Option.pure_def, Option.bind_eq_bind, Option.some_bind,
      id_eq]
Theorem: Polynomial.isNilpotent_C_iff
File: Mathlib/RingTheory/Polynomial/Nilpotent.lean

Proof steps:
state_before: R : Type u_1
r : R
inst✝ : Semiring R
P : R[X]
k : ℕ
⊢ C r ^ k = 0 ↔ r ^ k = 0
state_after: no goals
tactic: simpa only [← C_pow] using C_eq_zero
Theorem: MeasureTheory.levyProkhorovEDist_self
File: Mathlib/MeasureTheory/Measure/LevyProkhorovMetric.lean

Proof steps:
state_before: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
⊢ levyProkhorovEDist μ μ = 0
state_after: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
⊢ levyProkhorovEDist μ μ ≤ sInf (Ioo 0 ⊤)
tactic: rw [← nonpos_iff_eq_zero, ← csInf_Ioo zero_lt_top]
state_before: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
⊢ levyProkhorovEDist μ μ ≤ sInf (Ioo 0 ⊤)
state_after: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
ε : ℝ≥0∞
x✝¹ : ε ∈ Ioo 0 ⊤
B : Set Ω
x✝ : MeasurableSet B
hε₀ : 0 < ε
hε_top : ε < ⊤
⊢ μ B ≤ μ (thickening ε.toReal B) + ε
tactic: refine sInf_le_sInf fun ε ⟨hε₀, hε_top⟩ B _ ↦ and_self_iff.2 ?_
state_before: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
ε : ℝ≥0∞
x✝¹ : ε ∈ Ioo 0 ⊤
B : Set Ω
x✝ : MeasurableSet B
hε₀ : 0 < ε
hε_top : ε < ⊤
⊢ μ B ≤ μ (thickening ε.toReal B) + ε
state_after: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
ε : ℝ≥0∞
x✝¹ : ε ∈ Ioo 0 ⊤
B : Set Ω
x✝ : MeasurableSet B
hε₀ : 0 < ε
hε_top : ε < ⊤
⊢ 0 < ε.toReal
tactic: refine le_add_right <| measure_mono <| self_subset_thickening ?_ _
state_before: ι : Type u_1
Ω : Type u_2
inst✝¹ : MeasurableSpace Ω
inst✝ : PseudoEMetricSpace Ω
μ : Measure Ω
ε : ℝ≥0∞
x✝¹ : ε ∈ Ioo 0 ⊤
B : Set Ω
x✝ : MeasurableSet B
hε₀ : 0 < ε
hε_top : ε < ⊤
⊢ 0 < ε.toReal
state_after: no goals
tactic: exact ENNReal.toReal_pos hε₀.ne' hε_top.ne
Theorem: SzemerediRegularity.card_aux₂
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Bound.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
P : Finpartition univ
u : Finset α
ε : ℝ
hP : P.IsEquipartition
hu : u ∈ P.parts
hucard : ¬u.card = m * 4 ^ P.parts.card + a
⊢ (4 ^ P.parts.card - (a + 1)) * m + (a + 1) * (m + 1) = u.card
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
P : Finpartition univ
u : Finset α
ε : ℝ
hP : P.IsEquipartition
hu : u ∈ P.parts
hucard : ¬u.card = m * 4 ^ P.parts.card + a
this : m * 4 ^ P.parts.card ≤ Fintype.card α / P.parts.card
⊢ (4 ^ P.parts.card - (a + 1)) * m + (a + 1) * (m + 1) = u.card
tactic: have : m * 4 ^ P.parts.card ≤ card α / P.parts.card := by
    rw [stepBound, ← Nat.div_div_eq_div_mul]
    exact Nat.div_mul_le_self _ _
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
P : Finpartition univ
u : Finset α
ε : ℝ
hP : P.IsEquipartition
hu : u ∈ P.parts
hucard : ¬u.card = m * 4 ^ P.parts.card + a
this : m * 4 ^ P.parts.card ≤ Fintype.card α / P.parts.card
⊢ (4 ^ P.parts.card - (a + 1)) * m + (a + 1) * (m + 1) = u.card
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
P : Finpartition univ
u : Finset α
ε : ℝ
hP : P.IsEquipartition
hu : u ∈ P.parts
hucard : ¬u.card = Fintype.card α / P.parts.card
this : m * 4 ^ P.parts.card ≤ Fintype.card α / P.parts.card
⊢ (4 ^ P.parts.card - (a + 1)) * m + (a + 1) * (m + 1) = u.card
tactic: rw [Nat.add_sub_of_le this] at hucard
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
P : Finpartition univ
u : Finset α
ε : ℝ
hP : P.IsEquipartition
hu : u ∈ P.parts
hucard : ¬u.card = Fintype.card α / P.parts.card
this : m * 4 ^ P.parts.card ≤ Fintype.card α / P.parts.card
⊢ (4 ^ P.parts.card - (a + 1)) * m + (a + 1) * (m + 1) = u.card
state_after: no goals
tactic: rw [(hP.card_parts_eq_average hu).resolve_left hucard, mul_add, mul_one, ← add_assoc, ← add_mul,
    Nat.sub_add_cancel a_add_one_le_four_pow_parts_card, ← add_assoc, mul_comm,
    Nat.add_sub_of_le this, card_univ]
Theorem: HahnSeries.C_apply
File: Mathlib/RingTheory/HahnSeries/Multiplication.lean

Proof steps:
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
V : Type u_4
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
x y : R
⊢ (↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun (x + y) =
    (↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun x +
      (↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun y
state_after: case coeff.h
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
V : Type u_4
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
x y : R
a : Γ
⊢ ((↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun (x + y)).coeff a =
    ((↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun x +
          (↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun y).coeff
      a
tactic: ext a
state_before: case coeff.h
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
V : Type u_4
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
x y : R
a : Γ
⊢ ((↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun (x + y)).coeff a =
    ((↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun x +
          (↑{ toFun := ⇑(single 0), map_one' := ⋯, map_mul' := ⋯ }).toFun y).coeff
      a
state_after: no goals
tactic: by_cases h : a = 0 <;> simp [h]
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
V : Type u_4
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
x y : R
⊢ { toFun := ⇑(single 0), map_one' := ⋯ }.toFun (x * y) =
    { toFun := ⇑(single 0), map_one' := ⋯ }.toFun x * { toFun := ⇑(single 0), map_one' := ⋯ }.toFun y
state_after: no goals
tactic: rw [single_mul_single, zero_add]