ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Nat.gcdA_zero_left
File: Mathlib/Data/Int/GCD.lean

Proof steps:
state_before: s : ℕ
⊢ gcdA 0 s = 0
state_after: s : ℕ
⊢ (xgcd 0 s).1 = 0
tactic: unfold gcdA
state_before: s : ℕ
⊢ (xgcd 0 s).1 = 0
state_after: no goals
tactic: rw [xgcd, xgcd_zero_left]
Theorem: LightCondensed.hom_ext
File: Mathlib/Condensed/Light/Basic.lean

Proof steps:
state_before: C : Type w
inst✝ : Category.{v, w} C
X Y : LightCondensed C
f g : X ⟶ Y
h : ∀ (S : LightProfiniteᵒᵖ), f.val.app S = g.val.app S
⊢ f = g
state_after: case h
C : Type w
inst✝ : Category.{v, w} C
X Y : LightCondensed C
f g : X ⟶ Y
h : ∀ (S : LightProfiniteᵒᵖ), f.val.app S = g.val.app S
⊢ f.val = g.val
tactic: apply Sheaf.hom_ext
state_before: case h
C : Type w
inst✝ : Category.{v, w} C
X Y : LightCondensed C
f g : X ⟶ Y
h : ∀ (S : LightProfiniteᵒᵖ), f.val.app S = g.val.app S
⊢ f.val = g.val
state_after: case h.w.h
C : Type w
inst✝ : Category.{v, w} C
X Y : LightCondensed C
f g : X ⟶ Y
h : ∀ (S : LightProfiniteᵒᵖ), f.val.app S = g.val.app S
x✝ : LightProfiniteᵒᵖ
⊢ f.val.app x✝ = g.val.app x✝
tactic: ext
state_before: case h.w.h
C : Type w
inst✝ : Category.{v, w} C
X Y : LightCondensed C
f g : X ⟶ Y
h : ∀ (S : LightProfiniteᵒᵖ), f.val.app S = g.val.app S
x✝ : LightProfiniteᵒᵖ
⊢ f.val.app x✝ = g.val.app x✝
state_after: no goals
tactic: exact h _
Theorem: NNReal.coe_sub
File: Mathlib/Data/NNReal/Basic.lean

Proof steps:
state_before: r₁ r₂ : ℝ≥0
h : r₂ ≤ r₁
⊢ ↑r₂ ≤ ↑r₁ - 0
state_after: no goals
tactic: simp [show (r₂ : ℝ) ≤ r₁ from h]
Theorem: WithTop.preimage_coe_Ioo_top
File: Mathlib/Order/Interval/Set/WithBotTop.lean

Proof steps:
state_before: α : Type u_1
inst✝ : Preorder α
a b : α
⊢ some ⁻¹' Ioo ↑a ⊤ = Ioi a
state_after: no goals
tactic: simp [← Ioi_inter_Iio]
Theorem: CategoryTheory.Mat.id_apply_self
File: Mathlib/CategoryTheory/Preadditive/Mat.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Preadditive C
R : Type u
inst✝ : Semiring R
M : Mat R
i : ↑M
⊢ 𝟙 M i i = 1
state_after: no goals
tactic: simp [id_apply]
Theorem: Real.logb_neg_eq_logb
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

Proof steps:
state_before: b x✝ y x : ℝ
⊢ logb b (-x) = logb b x
state_after: no goals
tactic: rw [← logb_abs x, ← logb_abs (-x), abs_neg]
Theorem: MeasureTheory.lintegral_finset_sum'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Finset β
f : β → α → ℝ≥0∞
hf : ∀ b ∈ s, AEMeasurable (f b) μ
⊢ ∫⁻ (a : α), ∑ b ∈ s, f b a ∂μ = ∑ b ∈ s, ∫⁻ (a : α), f b a ∂μ
state_after: case empty
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : β → α → ℝ≥0∞
hf : ∀ b ∈ ∅, AEMeasurable (f b) μ
⊢ ∫⁻ (a : α), ∑ b ∈ ∅, f b a ∂μ = ∑ b ∈ ∅, ∫⁻ (a : α), f b a ∂μ

case insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : β → α → ℝ≥0∞
a : β
s : Finset β
has : a ∉ s
ih : (∀ b ∈ s, AEMeasurable (f b) μ) → ∫⁻ (a : α), ∑ b ∈ s, f b a ∂μ = ∑ b ∈ s, ∫⁻ (a : α), f b a ∂μ
hf : ∀ b ∈ insert a s, AEMeasurable (f b) μ
⊢ ∫⁻ (a_1 : α), ∑ b ∈ insert a s, f b a_1 ∂μ = ∑ b ∈ insert a s, ∫⁻ (a : α), f b a ∂μ
tactic: induction' s using Finset.induction_on with a s has ih
Theorem: Orientation.oangle_smul_right_of_neg
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

Proof steps:
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
r : ℝ
hr : r < 0
⊢ o.oangle x (r • y) = o.oangle x (-y)
state_after: no goals
tactic: rw [← neg_neg r, neg_smul, ← smul_neg, o.oangle_smul_right_of_pos _ _ (neg_pos_of_neg hr)]
Theorem: Nat.eleven_dvd_of_palindrome
File: Mathlib/Data/Nat/Digits.lean

Proof steps:
state_before: n : ℕ
p : (digits 10 n).Palindrome
h : Even (digits 10 n).length
⊢ 11 ∣ n
state_after: n : ℕ
p : (digits 10 n).Palindrome
h : Even (digits 10 n).length
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
⊢ 11 ∣ n
tactic: let dig := (digits 10 n).map fun n : ℕ => (n : ℤ)
state_before: n : ℕ
p : (digits 10 n).Palindrome
h : Even (digits 10 n).length
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
⊢ 11 ∣ n
state_after: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
⊢ 11 ∣ n
tactic: replace h : Even dig.length := by rwa [List.length_map]
state_before: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
⊢ 11 ∣ n
state_after: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
⊢ dig.alternatingSum = 0
tactic: refine eleven_dvd_iff.2 ⟨0, (?_ : dig.alternatingSum = 0)⟩
state_before: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
⊢ dig.alternatingSum = 0
state_after: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
this : dig.reverse.alternatingSum = (-1) ^ (dig.length + 1) • dig.alternatingSum
⊢ dig.alternatingSum = 0
tactic: have := dig.alternatingSum_reverse
state_before: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
this : dig.reverse.alternatingSum = (-1) ^ (dig.length + 1) • dig.alternatingSum
⊢ dig.alternatingSum = 0
state_after: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
this : (List.map (fun n => ↑n) (digits 10 n)).alternatingSum = -dig.alternatingSum
⊢ dig.alternatingSum = 0
tactic: rw [(p.map _).reverse_eq, _root_.pow_succ', h.neg_one_pow, mul_one, neg_one_zsmul] at this
state_before: n : ℕ
p : (digits 10 n).Palindrome
dig : List ℤ := List.map (fun n => ↑n) (digits 10 n)
h : Even dig.length
this : (List.map (fun n => ↑n) (digits 10 n)).alternatingSum = -dig.alternatingSum
⊢ dig.alternatingSum = 0
state_after: no goals
tactic: exact eq_zero_of_neg_eq this.symm
Theorem: Matrix.diagonal_neg
File: Mathlib/Data/Matrix/Basic.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : DecidableEq n
inst✝ : NegZeroClass α
d : n → α
⊢ -diagonal d = diagonal fun i => -d i
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : DecidableEq n
inst✝ : NegZeroClass α
d : n → α
i j : n
⊢ (-diagonal d) i j = diagonal (fun i => -d i) i j
tactic: ext i j
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : DecidableEq n
inst✝ : NegZeroClass α
d : n → α
i j : n
⊢ (-diagonal d) i j = diagonal (fun i => -d i) i j
state_after: no goals
tactic: by_cases h : i = j <;>
  simp [h]
Theorem: OrderIso.image_Iio
File: Mathlib/Order/Interval/Set/OrderIso.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
a : α
⊢ ⇑e '' Iio a = Iio (e a)
state_after: no goals
tactic: rw [e.image_eq_preimage, e.symm.preimage_Iio, e.symm_symm]
Theorem: finprod_mem_pair
File: Mathlib/Algebra/BigOperators/Finprod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : a ≠ b
⊢ ∏ᶠ (i : α) (_ : i ∈ {a, b}), f i = f a * f b
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : a ≠ b
⊢ a ∉ {b}

case hs
α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : a ≠ b
⊢ {b}.Finite
tactic: rw [finprod_mem_insert, finprod_mem_singleton]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : a ≠ b
⊢ a ∉ {b}

case hs
α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : a ≠ b
⊢ {b}.Finite
state_after: no goals
tactic: exacts [h, finite_singleton b]
Theorem: Cardinal.lt_one_iff_zero
File: Mathlib/SetTheory/Cardinal/Basic.lean

Proof steps:
state_before: α β : Type u
c : Cardinal.{u_1}
⊢ c < 1 ↔ c = 0
state_after: no goals
tactic: simpa using lt_succ_bot_iff (a := c)
Theorem: norm_sub_eq_zero_iff
File: Mathlib/Analysis/Normed/Group/Basic.lean

Proof steps:
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝¹ : NormedGroup E
inst✝ : NormedGroup F
a b : E
⊢ ‖a / b‖ = 0 ↔ a = b
state_after: no goals
tactic: rw [norm_eq_zero'', div_eq_one]
Theorem: MeasurableSpace.measurableSpace_iSup_eq
File: Mathlib/MeasureTheory/MeasurableSpace/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s t u : Set α
m : ι → MeasurableSpace α
⊢ ⨆ n, m n = generateFrom {s | ∃ n, MeasurableSet s}
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t u : Set α
m : ι → MeasurableSpace α
s : Set α
⊢ MeasurableSet s ↔ MeasurableSet s
tactic: ext s
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t u : Set α
m : ι → MeasurableSpace α
s : Set α
⊢ MeasurableSet s ↔ MeasurableSet s
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t u : Set α
m : ι → MeasurableSpace α
s : Set α
⊢ GenerateMeasurable {s | ∃ i, MeasurableSet s} s ↔ MeasurableSet s
tactic: rw [measurableSet_iSup]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s✝ t u : Set α
m : ι → MeasurableSpace α
s : Set α
⊢ GenerateMeasurable {s | ∃ i, MeasurableSet s} s ↔ MeasurableSet s
state_after: no goals
tactic: rfl
Theorem: Orientation.oangle_eq_two_zsmul_oangle_sub_of_norm_eq
File: Mathlib/Geometry/Euclidean/Angle/Sphere.lean

Proof steps:
state_before: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
state_after: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
hy : y ≠ 0
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
tactic: have hy : y ≠ 0 := by
    rintro rfl
    rw [norm_zero, norm_eq_zero] at hxy
    exact hxyne hxy
state_before: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
hy : y ≠ 0
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
state_after: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
hy : y ≠ 0
hx : x ≠ 0
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
tactic: have hx : x ≠ 0 := norm_ne_zero_iff.1 (hxy.symm ▸ norm_ne_zero_iff.2 hy)
state_before: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
hy : y ≠ 0
hx : x ≠ 0
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
state_after: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
hy : y ≠ 0
hx : x ≠ 0
hz : z ≠ 0
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
tactic: have hz : z ≠ 0 := norm_ne_zero_iff.1 (hxz ▸ norm_ne_zero_iff.2 hx)
state_before: V : Type u_1
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y z : V
hxyne : x ≠ y
hxzne : x ≠ z
hxy : ‖x‖ = ‖y‖
hxz : ‖x‖ = ‖z‖
hy : y ≠ 0
hx : x ≠ 0
hz : z ≠ 0
⊢ o.oangle y z = 2 • o.oangle (y - x) (z - x)
state_after: no goals
tactic: calc
    o.oangle y z = o.oangle x z - o.oangle x y := (o.oangle_sub_left hx hy hz).symm
    _ = π - (2 : ℤ) • o.oangle (x - z) x - (π - (2 : ℤ) • o.oangle (x - y) x) := by
      rw [o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq hxzne.symm hxz.symm,
        o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq hxyne.symm hxy.symm]
    _ = (2 : ℤ) • (o.oangle (x - y) x - o.oangle (x - z) x) := by abel
    _ = (2 : ℤ) • o.oangle (x - y) (x - z) := by
      rw [o.oangle_sub_right (sub_ne_zero_of_ne hxyne) (sub_ne_zero_of_ne hxzne) hx]
    _ = (2 : ℤ) • o.oangle (y - x) (z - x) := by rw [← oangle_neg_neg, neg_sub, neg_sub]
Theorem: WithTop.le_of_add_le_add_right
File: Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝² : Add α
a b c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
ha : a ≠ ⊤
h : b + a ≤ c + a
⊢ b ≤ c
state_after: case intro
α : Type u
β : Type v
inst✝² : Add α
b c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a : α
h : b + ↑a ≤ c + ↑a
⊢ b ≤ c
tactic: lift a to α using ha
state_before: case intro
α : Type u
β : Type v
inst✝² : Add α
b c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a : α
h : b + ↑a ≤ c + ↑a
⊢ b ≤ c
state_after: case intro.top
α : Type u
β : Type v
inst✝² : Add α
b d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a : α
h : b + ↑a ≤ ⊤ + ↑a
⊢ b ≤ ⊤

case intro.coe
α : Type u
β : Type v
inst✝² : Add α
b d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a a✝ : α
h : b + ↑a ≤ ↑a✝ + ↑a
⊢ b ≤ ↑a✝
tactic: cases c
Theorem: MvPolynomial.pderiv_pow
File: Mathlib/Algebra/MvPolynomial/PDeriv.lean

Proof steps:
state_before: R : Type u
σ : Type v
a a' a₁ a₂ : R
s : σ →₀ ℕ
inst✝ : CommSemiring R
i : σ
f : MvPolynomial σ R
n : ℕ
⊢ (pderiv i) (f ^ n) = ↑n * f ^ (n - 1) * (pderiv i) f
state_after: no goals
tactic: rw [(pderiv i).leibniz_pow f n, nsmul_eq_mul, smul_eq_mul, mul_assoc]
Theorem: Complex.cos_neg
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℂ
⊢ cos (-x) = cos x
state_after: no goals
tactic: simp [cos, sub_eq_add_neg, exp_neg, add_comm]
Theorem: Quiver.eq_nil_of_length_zero
File: Mathlib/Combinatorics/Quiver/Cast.lean

Proof steps:
state_before: U : Type u_1
inst✝ : Quiver U
u v : U
p : Path u v
hzero : p.length = 0
⊢ Path.cast ⋯ ⋯ p = nil
state_after: case nil
U : Type u_1
inst✝ : Quiver U
u : U
hzero : nil.length = 0
⊢ Path.cast ⋯ ⋯ nil = nil

case cons
U : Type u_1
inst✝ : Quiver U
u v b✝ : U
a✝¹ : Path u b✝
a✝ : b✝ ⟶ v
hzero : (a✝¹.cons a✝).length = 0
⊢ Path.cast ⋯ ⋯ (a✝¹.cons a✝) = nil
tactic: cases p
Theorem: abs_max_sub_max_le_abs
File: Mathlib/Algebra/Order/Group/MinMax.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c : α
⊢ |max a c - max b c| ≤ |a - b|
state_after: no goals
tactic: simpa only [sub_self, abs_zero, max_eq_left (abs_nonneg (a - b))]
    using abs_max_sub_max_le_max a c b c
Theorem: Real.le_log_iff_exp_le
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

Proof steps:
state_before: x y : ℝ
hy : 0 < y
⊢ x ≤ log y ↔ rexp x ≤ y
state_after: no goals
tactic: rw [← exp_le_exp, exp_log hy]
Theorem: Real.rpow_sub_nat'
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : y - ↑n ≠ 0
⊢ x ^ (y - ↑n) = x ^ y / x ^ n
state_after: no goals
tactic: rw [rpow_sub' hx h, rpow_natCast]
Theorem: Finset.dens_cons
File: Mathlib/Data/Finset/Density.lean

Proof steps:
state_before: 𝕜 : Type u_1
α : Type u_2
β : Type u_3
inst✝ : Fintype α
s t : Finset α
a b : α
h : a ∉ s
⊢ (cons a s h).dens = s.dens + (↑(Fintype.card α))⁻¹
state_after: no goals
tactic: simp [dens, add_div]
Theorem: List.reverse_infix
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
⊢ l₁.reverse <:+: l₂.reverse ↔ l₁ <:+: l₂
state_after: case refine_1
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁.reverse <:+: l₂.reverse
s t : List α✝
e : s ++ l₁.reverse ++ t = l₂.reverse
⊢ t.reverse ++ l₁ ++ s.reverse = l₂

case refine_2
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁ <:+: l₂
s t : List α✝
e : s ++ l₁ ++ t = l₂
⊢ t.reverse ++ l₁.reverse ++ s.reverse = l₂.reverse
tactic: refine ⟨fun ⟨s, t, e⟩ => ⟨reverse t, reverse s, ?_⟩, fun ⟨s, t, e⟩ => ⟨reverse t, reverse s, ?_⟩⟩
Theorem: List.Sublist.prod_dvd_prod
File: Mathlib/Algebra/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : CommMonoid M
l₁ l₂ : List M
h : l₁ <+ l₂
⊢ l₁.prod ∣ l₂.prod
state_after: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : CommMonoid M
l₁ l₂ : List M
h : l₁ <+ l₂
l : List M
hl : l₂ ~ l₁ ++ l
⊢ l₁.prod ∣ l₂.prod
tactic: obtain ⟨l, hl⟩ := h.exists_perm_append
state_before: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : CommMonoid M
l₁ l₂ : List M
h : l₁ <+ l₂
l : List M
hl : l₂ ~ l₁ ++ l
⊢ l₁.prod ∣ l₂.prod
state_after: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : CommMonoid M
l₁ l₂ : List M
h : l₁ <+ l₂
l : List M
hl : l₂ ~ l₁ ++ l
⊢ l₁.prod ∣ l₁.prod * l.prod
tactic: rw [hl.prod_eq, prod_append]
state_before: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : CommMonoid M
l₁ l₂ : List M
h : l₁ <+ l₂
l : List M
hl : l₂ ~ l₁ ++ l
⊢ l₁.prod ∣ l₁.prod * l.prod
state_after: no goals
tactic: exact dvd_mul_right _ _
Theorem: Zsqrtd.norm_mul
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

Proof steps:
state_before: d : ℤ
n m : ℤ√d
⊢ (n * m).norm = n.norm * m.norm
state_after: d : ℤ
n m : ℤ√d
⊢ (n.re * m.re + d * n.im * m.im) * (n.re * m.re + d * n.im * m.im) -
      d * (n.re * m.im + n.im * m.re) * (n.re * m.im + n.im * m.re) =
    (n.re * n.re - d * n.im * n.im) * (m.re * m.re - d * m.im * m.im)
tactic: simp only [norm, mul_im, mul_re]
state_before: d : ℤ
n m : ℤ√d
⊢ (n.re * m.re + d * n.im * m.im) * (n.re * m.re + d * n.im * m.im) -
      d * (n.re * m.im + n.im * m.re) * (n.re * m.im + n.im * m.re) =
    (n.re * n.re - d * n.im * n.im) * (m.re * m.re - d * m.im * m.im)
state_after: no goals
tactic: ring
Theorem: Finset.isCoatom_iff
File: Mathlib/Data/Finset/Grade.lean

Proof steps:
state_before: α : Type u_1
s t : Finset α
a : α
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ IsCoatom s ↔ ∃ a, s = {a}ᶜ
state_after: no goals
tactic: simp_rw [← isAtom_compl, Finset.isAtom_iff, compl_eq_iff_isCompl, eq_compl_iff_isCompl]
Theorem: HomogeneousIdeal.toIdeal_homogeneousCore_eq_self
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

Proof steps:
state_before: ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I✝ : Ideal A
I : HomogeneousIdeal 𝒜
⊢ Ideal.homogeneousCore 𝒜 I.toIdeal = I
state_after: case h
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I✝ : Ideal A
I : HomogeneousIdeal 𝒜
⊢ (Ideal.homogeneousCore 𝒜 I.toIdeal).toIdeal = I.toIdeal
tactic: ext1
state_before: case h
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : Semiring A
inst✝⁴ : SetLike σ A
inst✝³ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝² : DecidableEq ι
inst✝¹ : AddMonoid ι
inst✝ : GradedRing 𝒜
I✝ : Ideal A
I : HomogeneousIdeal 𝒜
⊢ (Ideal.homogeneousCore 𝒜 I.toIdeal).toIdeal = I.toIdeal
state_after: no goals
tactic: convert Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self I.isHomogeneous
Theorem: tendsto_mulIndicator_cthickening_mulIndicator_closure
File: Mathlib/Topology/MetricSpace/ThickenedIndicator.lean

Proof steps:
state_before: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
⊢ Tendsto (fun δ => (cthickening δ E).mulIndicator f) (𝓝 0) (𝓝 ((closure E).mulIndicator f))
state_after: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
⊢ ∀ (x : α), Tendsto (fun i => (cthickening i E).mulIndicator f x) (𝓝 0) (𝓝 ((closure E).mulIndicator f x))
tactic: rw [tendsto_pi_nhds]
state_before: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
⊢ ∀ (x : α), Tendsto (fun i => (cthickening i E).mulIndicator f x) (𝓝 0) (𝓝 ((closure E).mulIndicator f x))
state_after: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
x : α
⊢ Tendsto (fun i => (cthickening i E).mulIndicator f x) (𝓝 0) (𝓝 ((closure E).mulIndicator f x))
tactic: intro x
state_before: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
x : α
⊢ Tendsto (fun i => (cthickening i E).mulIndicator f x) (𝓝 0) (𝓝 ((closure E).mulIndicator f x))
state_after: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
x : α
⊢ Tendsto (fun x_1 => (closure E).mulIndicator f x) (𝓝 0) (𝓝 ((closure E).mulIndicator f x))
tactic: rw [tendsto_congr' (mulIndicator_cthickening_eventually_eq_mulIndicator_closure f E x)]
state_before: α : Type u_1
inst✝² : PseudoEMetricSpace α
β : Type u_2
inst✝¹ : One β
inst✝ : TopologicalSpace β
f : α → β
E : Set α
x : α
⊢ Tendsto (fun x_1 => (closure E).mulIndicator f x) (𝓝 0) (𝓝 ((closure E).mulIndicator f x))
state_after: no goals
tactic: apply tendsto_const_nhds
Theorem: FirstOrder.Language.Formula.realize_graph
File: Mathlib/ModelTheory/Semantics.lean

Proof steps:
state_before: L : Language
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'
γ : Type u_3
n : ℕ
φ ψ : L.Formula α
v : α → M
f : L.Functions n
x : Fin n → M
y : M
⊢ (graph f).Realize (cons y x) ↔ funMap f x = y
state_after: L : Language
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'
γ : Type u_3
n : ℕ
φ ψ : L.Formula α
v : α → M
f : L.Functions n
x : Fin n → M
y : M
⊢ (y = funMap f fun i => x i) ↔ funMap f x = y
tactic: simp only [Formula.graph, Term.realize, realize_equal, Fin.cons_zero, Fin.cons_succ]
state_before: L : Language
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'
γ : Type u_3
n : ℕ
φ ψ : L.Formula α
v : α → M
f : L.Functions n
x : Fin n → M
y : M
⊢ (y = funMap f fun i => x i) ↔ funMap f x = y
state_after: no goals
tactic: rw [eq_comm]