ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: inner_smul_right
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
r : 𝕜
⊢ ⟪x, r • y⟫_𝕜 = r * ⟪x, y⟫_𝕜
state_after: no goals
tactic: rw [← inner_conj_symm, inner_smul_left, RingHom.map_mul, conj_conj, inner_conj_symm]
Theorem: Nat.add_modEq_right
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a b c d : ℕ
⊢ a + n ≡ a [MOD n]
state_after: no goals
tactic: rw [ModEq, add_mod_right]
Theorem: Nat.perm_primeFactorsList_mul_of_coprime
File: Mathlib/Data/Nat/Factors.lean

Proof steps:
state_before: a b : ℕ
hab : a.Coprime b
⊢ (a * b).primeFactorsList ~ a.primeFactorsList ++ b.primeFactorsList
state_after: case inl
b : ℕ
hab : Coprime 0 b
⊢ (0 * b).primeFactorsList ~ primeFactorsList 0 ++ b.primeFactorsList

case inr
a b : ℕ
hab : a.Coprime b
ha : a > 0
⊢ (a * b).primeFactorsList ~ a.primeFactorsList ++ b.primeFactorsList
tactic: rcases a.eq_zero_or_pos with (rfl | ha)
state_before: case inr
a b : ℕ
hab : a.Coprime b
ha : a > 0
⊢ (a * b).primeFactorsList ~ a.primeFactorsList ++ b.primeFactorsList
state_after: case inr.inl
a : ℕ
ha : a > 0
hab : a.Coprime 0
⊢ (a * 0).primeFactorsList ~ a.primeFactorsList ++ primeFactorsList 0

case inr.inr
a b : ℕ
hab : a.Coprime b
ha : a > 0
hb : b > 0
⊢ (a * b).primeFactorsList ~ a.primeFactorsList ++ b.primeFactorsList
tactic: rcases b.eq_zero_or_pos with (rfl | hb)
state_before: case inr.inr
a b : ℕ
hab : a.Coprime b
ha : a > 0
hb : b > 0
⊢ (a * b).primeFactorsList ~ a.primeFactorsList ++ b.primeFactorsList
state_after: no goals
tactic: exact perm_primeFactorsList_mul ha.ne' hb.ne'
Theorem: SimplexCategory.eq_σ_comp_of_not_injective
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

Proof steps:
state_before: n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ¬Function.Injective ⇑(Hom.toOrderHom θ)
⊢ ∃ i θ', θ = σ i ≫ θ'
state_after: n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
⊢ ∃ i θ', θ = σ i ≫ θ'
tactic: simp only [Function.Injective, exists_prop, not_forall] at hθ
state_before: n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
hθ₂ : ∃ x y, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y ∧ x < y
⊢ ∃ i θ', θ = σ i ≫ θ'
state_after: case intro.intro.intro
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ ∃ i θ', θ = σ i ≫ θ'
tactic: rcases hθ₂ with ⟨x, y, ⟨h₁, h₂⟩⟩
state_before: case intro.intro.intro
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ ∃ i θ', θ = σ i ≫ θ'
state_after: case h
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ ∃ θ', θ = σ (x.castPred ⋯) ≫ θ'
tactic: use x.castPred ((Fin.le_last _).trans_lt' h₂).ne
state_before: case h
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ ∃ θ', θ = σ (x.castPred ⋯) ≫ θ'
state_after: case h.hi
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ (Hom.toOrderHom θ) (x.castPred ⋯).castSucc = (Hom.toOrderHom θ) (x.castPred ⋯).succ
tactic: apply eq_σ_comp_of_not_injective'
state_before: case h.hi
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ (Hom.toOrderHom θ) (x.castPred ⋯).castSucc = (Hom.toOrderHom θ) (x.castPred ⋯).succ
state_after: case h.hi.a
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ (Hom.toOrderHom θ) (x.castPred ⋯).castSucc ≤ (Hom.toOrderHom θ) (x.castPred ⋯).succ

case h.hi.a
n : ℕ
Δ' : SimplexCategory
θ : [n + 1] ⟶ Δ'
hθ : ∃ x x_1, (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) x_1 ∧ ¬x = x_1
x y : Fin (n + 2)
h₁ : (Hom.toOrderHom θ) x = (Hom.toOrderHom θ) y
h₂ : x < y
⊢ (Hom.toOrderHom θ) (x.castPred ⋯).succ ≤ (Hom.toOrderHom θ) (x.castPred ⋯).castSucc
tactic: apply le_antisymm
Theorem: Real.dimH_univ_pi
File: Mathlib/Topology/MetricSpace/HausdorffDimension.lean

Proof steps:
state_before: ι✝ : Type u_1
X : Type u_2
Y : Type u_3
inst✝⁶ : EMetricSpace X
inst✝⁵ : EMetricSpace Y
C K r : ℝ≥0
f : X → Y
s t : Set X
E : Type u_4
inst✝⁴ : Fintype ι✝
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : FiniteDimensional ℝ E
ι : Type u_5
inst✝ : Fintype ι
⊢ dimH univ = ↑(Fintype.card ι)
state_after: no goals
tactic: simp only [← Metric.iUnion_ball_nat_succ (0 : ι → ℝ), dimH_iUnion,
    dimH_ball_pi _ (Nat.cast_add_one_pos _), iSup_const]
Theorem: Finite.Set.finite_biUnion
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι✝ : Sort w
γ : Type x
ι : Type u_1
s : Set ι
inst✝ : Finite ↑s
t : ι → Set α
H : ∀ i ∈ s, Finite ↑(t i)
⊢ Finite ↑(⋃ x ∈ s, t x)
state_after: α : Type u
β : Type v
ι✝ : Sort w
γ : Type x
ι : Type u_1
s : Set ι
inst✝ : Finite ↑s
t : ι → Set α
H : ∀ i ∈ s, Finite ↑(t i)
⊢ Finite ↑(⋃ x, t ↑x)
tactic: rw [biUnion_eq_iUnion]
state_before: α : Type u
β : Type v
ι✝ : Sort w
γ : Type x
ι : Type u_1
s : Set ι
inst✝ : Finite ↑s
t : ι → Set α
H : ∀ i ∈ s, Finite ↑(t i)
⊢ Finite ↑(⋃ x, t ↑x)
state_after: α : Type u
β : Type v
ι✝ : Sort w
γ : Type x
ι : Type u_1
s : Set ι
inst✝ : Finite ↑s
t : ι → Set α
H : ∀ i ∈ s, Finite ↑(t i)
this : ∀ (i : ↑s), Finite ↑(t ↑i)
⊢ Finite ↑(⋃ x, t ↑x)
tactic: haveI : ∀ i : s, Finite (t i) := fun i => H i i.property
state_before: α : Type u
β : Type v
ι✝ : Sort w
γ : Type x
ι : Type u_1
s : Set ι
inst✝ : Finite ↑s
t : ι → Set α
H : ∀ i ∈ s, Finite ↑(t i)
this : ∀ (i : ↑s), Finite ↑(t ↑i)
⊢ Finite ↑(⋃ x, t ↑x)
state_after: no goals
tactic: infer_instance
Theorem: CategoryTheory.Sieve.equalizer_apply
File: Mathlib/CategoryTheory/Sites/LocallyFullyFaithful.lean

Proof steps:
state_before: C : Type uC
inst✝¹ : Category.{vC, uC} C
D : Type uD
inst✝ : Category.{vD, uD} D
G : C ⥤ D
J : GrothendieckTopology C
K : GrothendieckTopology D
U V : C
f₁ f₂ : U ⟶ V
⊢ ∀ {Y Z : C} {f : Y ⟶ U}, (fun Y i => i ≫ f₁ = i ≫ f₂) Y f → ∀ (g : Z ⟶ Y), (fun Y i => i ≫ f₁ = i ≫ f₂) Z (g ≫ f)
state_after: no goals
tactic: aesop
Theorem: ENNReal.zpow_add
File: Mathlib/Data/ENNReal/Inv.lean

Proof steps:
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ℝ≥0∞
hx : x ≠ 0
h'x : x ≠ ⊤
m n : ℤ
⊢ x ^ (m + n) = x ^ m * x ^ n
state_after: case intro
a b c d : ℝ≥0∞
r p q : ℝ≥0
m n : ℤ
x : ℝ≥0
hx : ↑x ≠ 0
⊢ ↑x ^ (m + n) = ↑x ^ m * ↑x ^ n
tactic: lift x to ℝ≥0 using h'x
state_before: case intro
a b c d : ℝ≥0∞
r p q : ℝ≥0
m n : ℤ
x : ℝ≥0
hx : ↑x ≠ 0
⊢ ↑x ^ (m + n) = ↑x ^ m * ↑x ^ n
state_after: case intro
a b c d : ℝ≥0∞
r p q : ℝ≥0
m n : ℤ
x : ℝ≥0
hx : x ≠ 0
⊢ ↑x ^ (m + n) = ↑x ^ m * ↑x ^ n
tactic: replace hx : x ≠ 0 := by simpa only [Ne, coe_eq_zero] using hx
state_before: case intro
a b c d : ℝ≥0∞
r p q : ℝ≥0
m n : ℤ
x : ℝ≥0
hx : x ≠ 0
⊢ ↑x ^ (m + n) = ↑x ^ m * ↑x ^ n
state_after: no goals
tactic: simp only [← coe_zpow hx, zpow_add₀ hx, coe_mul]
Theorem: Filter.Tendsto.partialSups_apply
File: Mathlib/Topology/Order/PartialSups.lean

Proof steps:
state_before: L : Type u_1
inst✝² : SemilatticeSup L
inst✝¹ : TopologicalSpace L
inst✝ : ContinuousSup L
α : Type u_2
l : Filter α
f : ℕ → α → L
g : ℕ → L
n : ℕ
hf : ∀ k ≤ n, Tendsto (f k) l (𝓝 (g k))
⊢ Tendsto (fun a => (partialSups fun x => f x a) n) l (𝓝 ((partialSups g) n))
state_after: no goals
tactic: simpa only [← partialSups_apply] using Tendsto.partialSups hf
Theorem: List.right_mem_of_mk_mem_sym2
File: Mathlib/Data/List/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
xs : List α
a b : α
h : s(a, b) ∈ xs.sym2
⊢ b ∈ xs
state_after: α : Type u_1
β : Type u_2
xs : List α
a b : α
h : s(b, a) ∈ xs.sym2
⊢ b ∈ xs
tactic: rw [Sym2.eq_swap] at h
state_before: α : Type u_1
β : Type u_2
xs : List α
a b : α
h : s(b, a) ∈ xs.sym2
⊢ b ∈ xs
state_after: no goals
tactic: exact left_mem_of_mk_mem_sym2 h
Theorem: Metric.Sigma.dist_triangle
File: Mathlib/Topology/MetricSpace/Gluing.lean

Proof steps:
state_before: ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
x y z : (i : ι) × E i
⊢ dist x z ≤ dist x y + dist y z
state_after: case mk
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
y z : (i : ι) × E i
i : ι
x : E i
⊢ dist ⟨i, x⟩ z ≤ dist ⟨i, x⟩ y + dist y z
tactic: rcases x with ⟨i, x⟩
state_before: case mk
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
y z : (i : ι) × E i
i : ι
x : E i
⊢ dist ⟨i, x⟩ z ≤ dist ⟨i, x⟩ y + dist y z
state_after: case mk.mk
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
z : (i : ι) × E i
i : ι
x : E i
j : ι
y : E j
⊢ dist ⟨i, x⟩ z ≤ dist ⟨i, x⟩ ⟨j, y⟩ + dist ⟨j, y⟩ z
tactic: rcases y with ⟨j, y⟩
state_before: case mk.mk
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
z : (i : ι) × E i
i : ι
x : E i
j : ι
y : E j
⊢ dist ⟨i, x⟩ z ≤ dist ⟨i, x⟩ ⟨j, y⟩ + dist ⟨j, y⟩ z
state_after: case mk.mk.mk
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
i : ι
x : E i
j : ι
y : E j
k : ι
z : E k
⊢ dist ⟨i, x⟩ ⟨k, z⟩ ≤ dist ⟨i, x⟩ ⟨j, y⟩ + dist ⟨j, y⟩ ⟨k, z⟩
tactic: rcases z with ⟨k, z⟩
state_before: case mk.mk.mk
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
i : ι
x : E i
j : ι
y : E j
k : ι
z : E k
⊢ dist ⟨i, x⟩ ⟨k, z⟩ ≤ dist ⟨i, x⟩ ⟨j, y⟩ + dist ⟨j, y⟩ ⟨k, z⟩
state_after: case mk.mk.mk.inl
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
i : ι
x : E i
j : ι
y : E j
z : E i
⊢ dist ⟨i, x⟩ ⟨i, z⟩ ≤ dist ⟨i, x⟩ ⟨j, y⟩ + dist ⟨j, y⟩ ⟨i, z⟩

case mk.mk.mk.inr
ι : Type u_1
E : ι → Type u_2
inst✝ : (i : ι) → MetricSpace (E i)
i : ι
x : E i
j : ι
y : E j
k : ι
z : E k
hik : i ≠ k
⊢ dist ⟨i, x⟩ ⟨k, z⟩ ≤ dist ⟨i, x⟩ ⟨j, y⟩ + dist ⟨j, y⟩ ⟨k, z⟩
tactic: rcases eq_or_ne i k with (rfl | hik)
Theorem: Nat.even_mul
File: Mathlib/Algebra/Group/Nat.lean

Proof steps:
state_before: m n : ℕ
⊢ Even (m * n) ↔ Even m ∨ Even n
state_after: no goals
tactic: cases' mod_two_eq_zero_or_one m with h₁ h₁ <;> cases' mod_two_eq_zero_or_one n with h₂ h₂ <;>
    simp [even_iff, h₁, h₂, Nat.mul_mod]
Theorem: Polynomial.rootSet_maps_to'
File: Mathlib/Algebra/Polynomial/Roots.lean

Proof steps:
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
p✝ q : R[X]
inst✝⁶ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra T S
inst✝² : CommRing S'
inst✝¹ : IsDomain S'
inst✝ : Algebra T S'
hp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0
f : S →ₐ[T] S'
x : S
hx : x ∈ p.rootSet S
⊢ f x ∈ p.rootSet S'
state_after: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
p✝ q : R[X]
inst✝⁶ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra T S
inst✝² : CommRing S'
inst✝¹ : IsDomain S'
inst✝ : Algebra T S'
hp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0
f : S →ₐ[T] S'
x : S
hx : map (algebraMap T S) p ≠ 0 ∧ (aeval x) p = 0
⊢ map (algebraMap T S') p ≠ 0 ∧ (aeval (f x)) p = 0
tactic: rw [mem_rootSet'] at hx ⊢
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
p✝ q : R[X]
inst✝⁶ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra T S
inst✝² : CommRing S'
inst✝¹ : IsDomain S'
inst✝ : Algebra T S'
hp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0
f : S →ₐ[T] S'
x : S
hx : map (algebraMap T S) p ≠ 0 ∧ (aeval x) p = 0
⊢ map (algebraMap T S') p ≠ 0 ∧ (aeval (f x)) p = 0
state_after: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
p✝ q : R[X]
inst✝⁶ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra T S
inst✝² : CommRing S'
inst✝¹ : IsDomain S'
inst✝ : Algebra T S'
hp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0
f : S →ₐ[T] S'
x : S
hx : map (algebraMap T S) p ≠ 0 ∧ (aeval x) p = 0
⊢ map (algebraMap T S') p ≠ 0 ∧ 0 = 0
tactic: rw [aeval_algHom, AlgHom.comp_apply, hx.2, _root_.map_zero]
state_before: R : Type u
S✝ : Type v
T : Type w
a b : R
n : ℕ
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
p✝ q : R[X]
inst✝⁶ : CommRing T
p : T[X]
S : Type u_1
S' : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra T S
inst✝² : CommRing S'
inst✝¹ : IsDomain S'
inst✝ : Algebra T S'
hp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0
f : S →ₐ[T] S'
x : S
hx : map (algebraMap T S) p ≠ 0 ∧ (aeval x) p = 0
⊢ map (algebraMap T S') p ≠ 0 ∧ 0 = 0
state_after: no goals
tactic: exact ⟨mt hp hx.1, rfl⟩
Theorem: InnerProductGeometry.cos_angle_add_mul_norm_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
⊢ Real.cos (angle x (x + y)) * ‖x + y‖ = ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖
tactic: rw [cos_angle_add_of_inner_eq_zero h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖
state_after: case pos
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
hxy : ‖x + y‖ = 0
⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖

case neg
V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
hxy : ¬‖x + y‖ = 0
⊢ ‖x‖ / ‖x + y‖ * ‖x + y‖ = ‖x‖
tactic: by_cases hxy : ‖x + y‖ = 0
Theorem: MeasureTheory.setLIntegral_withDensity_eq_setLIntegral_mul_non_measurable₀
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

Proof steps:
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
s : Set α
hf : AEMeasurable f (μ.restrict s)
g : α → ℝ≥0∞
hs : MeasurableSet s
h'f : ∀ᵐ (x : α) ∂μ.restrict s, f x < ⊤
⊢ ∫⁻ (a : α) in s, g a ∂μ.withDensity f = ∫⁻ (a : α) in s, (f * g) a ∂μ
state_after: no goals
tactic: rw [restrict_withDensity hs, lintegral_withDensity_eq_lintegral_mul_non_measurable₀ _ hf h'f]
Theorem: RatFunc.laurent_at_zero
File: Mathlib/FieldTheory/Laurent.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
hdomain : IsDomain R
r s : R
p q : R[X]
f : RatFunc R
⊢ (laurent 0) f = f
state_after: case f
R : Type u
inst✝ : CommRing R
hdomain : IsDomain R
r s : R
p q : R[X]
f : RatFunc R
p✝ q✝ : R[X]
hq✝ : q✝ ≠ 0
⊢ (laurent 0) ((algebraMap R[X] (RatFunc R)) p✝ / (algebraMap R[X] (RatFunc R)) q✝) =
    (algebraMap R[X] (RatFunc R)) p✝ / (algebraMap R[X] (RatFunc R)) q✝
tactic: induction f using RatFunc.induction_on
state_before: case f
R : Type u
inst✝ : CommRing R
hdomain : IsDomain R
r s : R
p q : R[X]
f : RatFunc R
p✝ q✝ : R[X]
hq✝ : q✝ ≠ 0
⊢ (laurent 0) ((algebraMap R[X] (RatFunc R)) p✝ / (algebraMap R[X] (RatFunc R)) q✝) =
    (algebraMap R[X] (RatFunc R)) p✝ / (algebraMap R[X] (RatFunc R)) q✝
state_after: no goals
tactic: simp
Theorem: Relation.is_graph_iff
File: Mathlib/Data/Rel.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ (∃! f, Function.graph f = r) ↔ ∀ (x : α), ∃! y, r x y
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ (∃! f, (fun x y => f x = y) = r) ↔ ∀ (x : α), ∃! y, r x y
tactic: unfold Function.graph
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ (∃! f, (fun x y => f x = y) = r) ↔ ∀ (x : α), ∃! y, r x y
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ (∃! f, (fun x y => f x = y) = r) → ∀ (x : α), ∃! y, r x y

case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ (∀ (x : α), ∃! y, r x y) → ∃! f, (fun x y => f x = y) = r
tactic: constructor
Theorem: InnerProductGeometry.angle_sub_eq_arccos_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
⊢ angle x (x - y) = Real.arccos (‖x‖ / ‖x - y‖)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
⊢ angle x (x - y) = Real.arccos (‖x‖ / ‖x - y‖)
tactic: rw [← neg_eq_zero, ← inner_neg_right] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
⊢ angle x (x - y) = Real.arccos (‖x‖ / ‖x - y‖)
state_after: no goals
tactic: rw [sub_eq_add_neg, angle_add_eq_arccos_of_inner_eq_zero h]
Theorem: UniformOnFun.iInf_eq
File: Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
u : ι → UniformSpace γ
⊢ uniformSpace α γ 𝔖 = ⨅ i, uniformSpace α γ 𝔖
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
u : ι → UniformSpace γ
⊢ ⨅ s ∈ 𝔖, ⨅ i, UniformSpace.comap (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑s) γ) =
    ⨅ i, ⨅ s ∈ 𝔖, UniformSpace.comap (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑s) γ)
tactic: simp_rw [UniformOnFun.uniformSpace, UniformFun.iInf_eq, UniformSpace.comap_iInf]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
u : ι → UniformSpace γ
⊢ ⨅ s ∈ 𝔖, ⨅ i, UniformSpace.comap (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑s) γ) =
    ⨅ i, ⨅ s ∈ 𝔖, UniformSpace.comap (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑s) γ)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
u : ι → UniformSpace γ
⊢ ⨅ s ∈ 𝔖, ⨅ i, UniformSpace.comap (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑s) γ) =
    ⨅ j,
      ⨅ i,
        ⨅ (_ : j ∈ 𝔖), UniformSpace.comap (⇑UniformFun.ofFun ∘ j.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑j) γ)
tactic: rw [iInf_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
u : ι → UniformSpace γ
⊢ ⨅ s ∈ 𝔖, ⨅ i, UniformSpace.comap (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑s) γ) =
    ⨅ j,
      ⨅ i,
        ⨅ (_ : j ∈ 𝔖), UniformSpace.comap (⇑UniformFun.ofFun ∘ j.restrict ∘ ⇑(toFun 𝔖)) (UniformFun.uniformSpace (↑j) γ)
state_after: no goals
tactic: exact iInf_congr fun s => iInf_comm
Theorem: ENNReal.le_ofReal_iff_toReal_le
File: Mathlib/Data/ENNReal/Real.lean

Proof steps:
state_before: a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
b : ℝ
ha : a ≠ ⊤
hb : 0 ≤ b
⊢ a ≤ ENNReal.ofReal b ↔ a.toReal ≤ b
state_after: case intro
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ
hb : 0 ≤ b
a : ℝ≥0
⊢ ↑a ≤ ENNReal.ofReal b ↔ (↑a).toReal ≤ b
tactic: lift a to ℝ≥0 using ha
state_before: case intro
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ
hb : 0 ≤ b
a : ℝ≥0
⊢ ↑a ≤ ENNReal.ofReal b ↔ (↑a).toReal ≤ b
state_after: no goals
tactic: simpa [ENNReal.ofReal, ENNReal.toReal] using Real.le_toNNReal_iff_coe_le hb
Theorem: sign_mul
File: Mathlib/Data/Sign.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
a b x y : α
⊢ sign (x * y) = sign x * sign y
state_after: no goals
tactic: rcases lt_trichotomy x 0 with (hx | hx | hx) <;> rcases lt_trichotomy y 0 with (hy | hy | hy) <;>
    simp [hx, hy, mul_pos_of_neg_of_neg, mul_neg_of_neg_of_pos, mul_neg_of_pos_of_neg]
Theorem: add_eq_zero
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
a b : α
⊢ a = 1 ∧ b = 1 → a * b = 1
state_after: case intro
α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
⊢ 1 * 1 = 1
tactic: rintro ⟨rfl, rfl⟩
state_before: case intro
α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
⊢ 1 * 1 = 1
state_after: no goals
tactic: exact mul_one _
Theorem: strongRankCondition_iff_succ
File: Mathlib/LinearAlgebra/InvariantBasisNumber.lean

Proof steps:
state_before: R : Type u
inst✝ : Semiring R
⊢ StrongRankCondition R ↔ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ⇑f
state_after: case refine_1
R : Type u
inst✝ : Semiring R
h : StrongRankCondition R
n : ℕ
f : (Fin (n + 1) → R) →ₗ[R] Fin n → R
hf : Injective ⇑f
⊢ False

case refine_2
R : Type u
inst✝ : Semiring R
h : ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ⇑f
n m : ℕ
f : (Fin n → R) →ₗ[R] Fin m → R
hf : Injective ⇑f
⊢ n ≤ m
tactic: refine ⟨fun h n => fun f hf => ?_, fun h => ⟨@fun n m f hf => ?_⟩⟩
Theorem: ConcaveOn.le_slope_of_hasDerivWithinAt
File: Mathlib/Analysis/Convex/Deriv.lean

Proof steps:
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ f' ≤ slope f x y
state_after: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ S ∈ 𝓝[<] y
tactic: refine hfc.le_slope_of_hasDerivWithinAt_Iio hx hy hxy (hf'.mono_of_mem ?_)
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ S ∈ 𝓝[<] y
state_after: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ ∃ l ∈ Iio y, Ico l y ⊆ S
tactic: rw [mem_nhdsWithin_Iio_iff_exists_Ico_subset]
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hx : x ∈ S
hy : y ∈ S
hxy : x < y
hf' : HasDerivWithinAt f f' S y
⊢ ∃ l ∈ Iio y, Ico l y ⊆ S
state_after: no goals
tactic: exact ⟨x, hxy, Ico_subset_Icc_self.trans (hfc.1.ordConnected.out hx hy)⟩
Theorem: Prod.snd_eq_iff
File: Mathlib/Data/Prod/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b x : β
⊢ (a, b).snd = x ↔ (a, b) = ((a, b).fst, x)
state_after: no goals
tactic: simp
Theorem: PowerSeries.Unit_of_divided_by_X_pow_order_nonzero
File: Mathlib/RingTheory/PowerSeries/Inverse.lean

Proof steps:
state_before: R : Type u_1
k : Type u_2
inst✝ : Field k
f : k⟦X⟧
hf : f ≠ 0
⊢ ↑f.Unit_of_divided_by_X_pow_order = divided_by_X_pow_order hf
state_after: no goals
tactic: simp only [Unit_of_divided_by_X_pow_order, dif_neg hf, Units.val_mk]
Theorem: List.prev_cons_cons_of_ne'
File: Mathlib/Data/List/Cycle.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y z : α
h : x ∈ y :: z :: l
hy : x ≠ y
hz : x = z
⊢ (y :: z :: l).prev x h = y
state_after: case nil
α : Type u_1
inst✝ : DecidableEq α
x y z : α
hy : x ≠ y
hz : x = z
h : x ∈ [y, z]
⊢ [y, z].prev x h = y

case cons
α : Type u_1
inst✝ : DecidableEq α
x y z : α
hy : x ≠ y
hz : x = z
head✝ : α
tail✝ : List α
h : x ∈ y :: z :: head✝ :: tail✝
⊢ (y :: z :: head✝ :: tail✝).prev x h = y
tactic: cases l
Theorem: invOf_neg
File: Mathlib/Algebra/Ring/Invertible.lean

Proof steps:
state_before: α : Type u
inst✝³ : Monoid α
inst✝² : HasDistribNeg α
a : α
inst✝¹ : Invertible a
inst✝ : Invertible (-a)
⊢ -a * -⅟a = 1
state_after: no goals
tactic: simp
Theorem: disjoint_left_comm
File: Mathlib/Order/Disjoint.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : SemilatticeInf α
inst✝ : OrderBot α
a b c d : α
⊢ Disjoint a (b ⊓ c) ↔ Disjoint b (a ⊓ c)
state_after: no goals
tactic: simp_rw [disjoint_iff_inf_le, inf_left_comm]