ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: iInf_nat_gt_zero_eq
File: Mathlib/Order/CompleteLattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
f : ℕ → α
⊢ ⨅ i, ⨅ (_ : i > 0), f i = ⨅ i, f (i + 1)
state_after: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
f : ℕ → α
⊢ ⨅ i, ⨅ (_ : i > 0), f i = ⨅ b ∈ {i | 0 < i}, f b
tactic: rw [← iInf_range, Nat.range_succ]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
f : ℕ → α
⊢ ⨅ i, ⨅ (_ : i > 0), f i = ⨅ b ∈ {i | 0 < i}, f b
state_after: no goals
tactic: simp
Theorem: Primrec₂.natPair
File: Mathlib/Computability/Primrec.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
⊢ Primrec₂ Nat.pair
state_after: α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
⊢ Nat.Primrec fun n => n + 1
tactic: simp [Primrec₂, Primrec]
state_before: α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
⊢ Nat.Primrec fun n => n + 1
state_after: no goals
tactic: constructor
Theorem: CategoryTheory.Limits.IndObjectPresentation.extend_ℐ
File: Mathlib/CategoryTheory/Limits/Indization/IndObject.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
A✝ : Cᵒᵖ ⥤ Type v
P✝ : IndObjectPresentation A✝
A B : Cᵒᵖ ⥤ Type v
P : IndObjectPresentation A
η : A ⟶ B
inst✝ : IsIso η
⊢ P.cocone.pt ⟶ ?m.7956
state_after: no goals
tactic: exact η
Theorem: linearIndependent_monoidHom
File: Mathlib/LinearAlgebra/LinearIndependent.lean

Proof steps:
state_before: ι : Type u'
ι' : Type u_1
R : Type u_2
K : Type u_3
M : Type u_4
M' : Type u_5
M'' : Type u_6
V : Type u
V' : Type u_7
v : ι → M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M'
inst✝⁶ : AddCommGroup M''
inst✝⁵ : Module R M
inst✝⁴ : Module R M'
inst✝³ : Module R M''
a b : R
x y : M
G : Type u_8
inst✝² : Monoid G
L : Type u_9
inst✝¹ : CommRing L
inst✝ : NoZeroDivisors L
⊢ LinearIndependent L fun f => ⇑f
state_after: ι : Type u'
ι' : Type u_1
R : Type u_2
K : Type u_3
M : Type u_4
M' : Type u_5
M'' : Type u_6
V : Type u
V' : Type u_7
v : ι → M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M'
inst✝⁶ : AddCommGroup M''
inst✝⁵ : Module R M
inst✝⁴ : Module R M'
inst✝³ : Module R M''
a b : R
x y : M
G : Type u_8
inst✝² : Monoid G
L : Type u_9
inst✝¹ : CommRing L
inst✝ : NoZeroDivisors L
this : DecidableEq (G →* L) := Classical.decEq (G →* L)
⊢ LinearIndependent L fun f => ⇑f
tactic: letI := Classical.decEq (G →* L)
state_before: ι : Type u'
ι' : Type u_1
R : Type u_2
K : Type u_3
M : Type u_4
M' : Type u_5
M'' : Type u_6
V : Type u
V' : Type u_7
v : ι → M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M'
inst✝⁶ : AddCommGroup M''
inst✝⁵ : Module R M
inst✝⁴ : Module R M'
inst✝³ : Module R M''
a b : R
x y : M
G : Type u_8
inst✝² : Monoid G
L : Type u_9
inst✝¹ : CommRing L
inst✝ : NoZeroDivisors L
this : DecidableEq (G →* L) := Classical.decEq (G →* L)
⊢ LinearIndependent L fun f => ⇑f
state_after: ι : Type u'
ι' : Type u_1
R : Type u_2
K : Type u_3
M : Type u_4
M' : Type u_5
M'' : Type u_6
V : Type u
V' : Type u_7
v : ι → M
inst✝⁹ : Ring R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M'
inst✝⁶ : AddCommGroup M''
inst✝⁵ : Module R M
inst✝⁴ : Module R M'
inst✝³ : Module R M''
a b : R
x y : M
G : Type u_8
inst✝² : Monoid G
L : Type u_9
inst✝¹ : CommRing L
inst✝ : NoZeroDivisors L
this✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)
this : MulAction L L := DistribMulAction.toMulAction
⊢ LinearIndependent L fun f => ⇑f
tactic: letI : MulAction L L := DistribMulAction.toMulAction
Theorem: Pi.image_update_openSegment
File: Mathlib/Analysis/Convex/Segment.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝³ : OrderedSemiring 𝕜
inst✝² : (i : ι) → AddCommMonoid (π i)
inst✝¹ : (i : ι) → Module 𝕜 (π i)
s : Set ι
inst✝ : DecidableEq ι
i : ι
x₁ x₂ : π i
y : (i : ι) → π i
⊢ update y i '' openSegment 𝕜 x₁ x₂ = openSegment 𝕜 (update y i x₁) (update y i x₂)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝³ : OrderedSemiring 𝕜
inst✝² : (i : ι) → AddCommMonoid (π i)
inst✝¹ : (i : ι) → Module 𝕜 (π i)
s : Set ι
inst✝ : DecidableEq ι
i : ι
x₁ x₂ : π i
y : (i : ι) → π i
⊢ (fun x => update y i (x.1 • x₁ + x.2 • x₂)) '' {p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1} =
    (fun p => p.1 • update y i x₁ + p.2 • update y i x₂) '' {p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1}
tactic: rw [openSegment_eq_image₂, openSegment_eq_image₂, image_image]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝³ : OrderedSemiring 𝕜
inst✝² : (i : ι) → AddCommMonoid (π i)
inst✝¹ : (i : ι) → Module 𝕜 (π i)
s : Set ι
inst✝ : DecidableEq ι
i : ι
x₁ x₂ : π i
y : (i : ι) → π i
⊢ (fun x => update y i (x.1 • x₁ + x.2 • x₂)) '' {p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1} =
    (fun p => p.1 • update y i x₁ + p.2 • update y i x₂) '' {p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1}
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝³ : OrderedSemiring 𝕜
inst✝² : (i : ι) → AddCommMonoid (π i)
inst✝¹ : (i : ι) → Module 𝕜 (π i)
s : Set ι
inst✝ : DecidableEq ι
i : ι
x₁ x₂ : π i
y : (i : ι) → π i
a : 𝕜 × 𝕜
ha : a ∈ {p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1}
⊢ update y i (a.1 • x₁ + a.2 • x₂) = a.1 • update y i x₁ + a.2 • update y i x₂
tactic: refine EqOn.image_eq fun a ha ↦ ?_
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝³ : OrderedSemiring 𝕜
inst✝² : (i : ι) → AddCommMonoid (π i)
inst✝¹ : (i : ι) → Module 𝕜 (π i)
s : Set ι
inst✝ : DecidableEq ι
i : ι
x₁ x₂ : π i
y : (i : ι) → π i
a : 𝕜 × 𝕜
ha : a ∈ {p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1}
⊢ update y i (a.1 • x₁ + a.2 • x₂) = a.1 • update y i x₁ + a.2 • update y i x₂
state_after: no goals
tactic: simp only [← update_smul, ← update_add, Convex.combo_self ha.2.2]
Theorem: Set.exists_eq_singleton_iff_nonempty_subsingleton
File: Mathlib/Data/Set/Subsingleton.lean

Proof steps:
state_before: α : Type u
a : α
s t : Set α
⊢ (∃ a, s = {a}) ↔ s.Nonempty ∧ s.Subsingleton
state_after: case refine_1
α : Type u
a : α
s t : Set α
⊢ (∃ a, s = {a}) → s.Nonempty ∧ s.Subsingleton

case refine_2
α : Type u
a : α
s t : Set α
h : s.Nonempty ∧ s.Subsingleton
⊢ ∃ a, s = {a}
tactic: refine ⟨?_, fun h => ?_⟩
Theorem: ContinuousMultilinearMap.opNorm_add_le
File: Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean

Proof steps:
state_before: 𝕜 : Type u
ι : Type v
ι' : Type v'
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
G : Type wG
G' : Type wG'
inst✝¹² : Fintype ι
inst✝¹¹ : Fintype ι'
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝⁸ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝⁷ : (i : ι) → SeminormedAddCommGroup (E₁ i)
inst✝⁶ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁵ : (i : ι') → SeminormedAddCommGroup (E' i)
inst✝⁴ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝³ : SeminormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : SeminormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
c : 𝕜
f g : ContinuousMultilinearMap 𝕜 E G
m x : (i : ι) → E i
⊢ ‖(f + g) x‖ ≤ (‖f‖ + ‖g‖) * ∏ i : ι, ‖x i‖
state_after: 𝕜 : Type u
ι : Type v
ι' : Type v'
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
G : Type wG
G' : Type wG'
inst✝¹² : Fintype ι
inst✝¹¹ : Fintype ι'
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝⁸ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝⁷ : (i : ι) → SeminormedAddCommGroup (E₁ i)
inst✝⁶ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁵ : (i : ι') → SeminormedAddCommGroup (E' i)
inst✝⁴ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝³ : SeminormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : SeminormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
c : 𝕜
f g : ContinuousMultilinearMap 𝕜 E G
m x : (i : ι) → E i
⊢ ‖(f + g) x‖ ≤ ‖f‖ * ∏ i : ι, ‖x i‖ + ‖g‖ * ∏ i : ι, ‖x i‖
tactic: rw [add_mul]
state_before: 𝕜 : Type u
ι : Type v
ι' : Type v'
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
G : Type wG
G' : Type wG'
inst✝¹² : Fintype ι
inst✝¹¹ : Fintype ι'
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝⁸ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝⁷ : (i : ι) → SeminormedAddCommGroup (E₁ i)
inst✝⁶ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁵ : (i : ι') → SeminormedAddCommGroup (E' i)
inst✝⁴ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝³ : SeminormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : SeminormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
c : 𝕜
f g : ContinuousMultilinearMap 𝕜 E G
m x : (i : ι) → E i
⊢ ‖(f + g) x‖ ≤ ‖f‖ * ∏ i : ι, ‖x i‖ + ‖g‖ * ∏ i : ι, ‖x i‖
state_after: no goals
tactic: exact norm_add_le_of_le (le_opNorm _ _) (le_opNorm _ _)
Theorem: Filter.EventuallyEq.restrict
File: Mathlib/MeasureTheory/Measure/Restrict.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f g : α → δ
s : Set α
hfg : f =ᶠ[ae μ] g
⊢ f =ᶠ[ae (μ.restrict s)] g
state_after: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f g : α → δ
s : Set α
hfg : f =ᶠ[ae μ] g
⊢ ae (μ.restrict s) ≤ ae μ
tactic: refine hfg.filter_mono ?_
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f g : α → δ
s : Set α
hfg : f =ᶠ[ae μ] g
⊢ ae (μ.restrict s) ≤ ae μ
state_after: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f g : α → δ
s : Set α
hfg : f =ᶠ[ae μ] g
⊢ μ.restrict s ≪ μ
tactic: rw [Measure.ae_le_iff_absolutelyContinuous]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f g : α → δ
s : Set α
hfg : f =ᶠ[ae μ] g
⊢ μ.restrict s ≪ μ
state_after: no goals
tactic: exact Measure.absolutelyContinuous_of_le Measure.restrict_le_self
Theorem: Ordnode.dual_rotateL
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
⊢ (l.rotateL x r).dual = r.dual.rotateR x l.dual
state_after: case node
α : Type u_1
l : Ordnode α
x : α
size✝ : ℕ
l✝ : Ordnode α
x✝ : α
r✝ : Ordnode α
⊢ (if l✝.size < ratio * r✝.size then l.node3L x l✝ x✝ r✝ else l.node4L x l✝ x✝ r✝).dual =
    if l✝.size < ratio * r✝.size then r✝.dual.node3R x✝ l✝.dual x l.dual else r✝.dual.node4R x✝ l✝.dual x l.dual
tactic: cases r <;> simp [rotateL, rotateR, dual_node']
state_before: case node
α : Type u_1
l : Ordnode α
x : α
size✝ : ℕ
l✝ : Ordnode α
x✝ : α
r✝ : Ordnode α
⊢ (if l✝.size < ratio * r✝.size then l.node3L x l✝ x✝ r✝ else l.node4L x l✝ x✝ r✝).dual =
    if l✝.size < ratio * r✝.size then r✝.dual.node3R x✝ l✝.dual x l.dual else r✝.dual.node4R x✝ l✝.dual x l.dual
state_after: no goals
tactic: split_ifs <;>
    simp [dual_node3L, dual_node4L, node3R, add_comm]
Theorem: List.Ico.nodup
File: Mathlib/Data/List/Intervals.lean

Proof steps:
state_before: n m : ℕ
⊢ (Ico n m).Nodup
state_after: n m : ℕ
⊢ (range' n (m - n)).Nodup
tactic: dsimp [Ico]
state_before: n m : ℕ
⊢ (range' n (m - n)).Nodup
state_after: no goals
tactic: simp [nodup_range', autoParam]
Theorem: ENNReal.toReal_nat
File: Mathlib/Data/ENNReal/Basic.lean

Proof steps:
state_before: α : Type u_1
a b c d : ℝ≥0∞
r p q : ℝ≥0
n : ℕ
⊢ (↑n).toReal = ↑n
state_after: no goals
tactic: rw [← ENNReal.ofReal_natCast n, ENNReal.toReal_ofReal (Nat.cast_nonneg _)]
Theorem: ZNum.cmp_to_int
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
state_after: α : Type u_1
a b : PosNum
this : Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a)
⊢ Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
tactic: have := PosNum.cmp_to_nat a b
state_before: α : Type u_1
a b : PosNum
this : Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a)
⊢ Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a) →
    Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
tactic: revert this
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (a.cmp b) (↑a < ↑b) (a = b) (↑b < ↑a) →
    Ordering.casesOn ((pos a).cmp (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑a < ↑b) (a = b) (↑b < ↑a) (a.cmp b) → Ordering.rec (↑a < ↑b) (pos a = pos b) (↑b < ↑a) (a.cmp b)
tactic: dsimp [cmp]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑a < ↑b) (a = b) (↑b < ↑a) (a.cmp b) → Ordering.rec (↑a < ↑b) (pos a = pos b) (↑b < ↑a) (a.cmp b)
state_after: no goals
tactic: cases PosNum.cmp a b <;> dsimp <;> [simp; exact congr_arg pos; simp [GT.gt]]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
state_after: α : Type u_1
a b : PosNum
this : Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b)
⊢ Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
tactic: have := PosNum.cmp_to_nat b a
state_before: α : Type u_1
a b : PosNum
this : Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b)
⊢ Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b) →
    Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
tactic: revert this
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.casesOn (b.cmp a) (↑b < ↑a) (b = a) (↑a < ↑b) →
    Ordering.casesOn ((neg a).cmp (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))
state_after: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑b < ↑a) (b = a) (↑a < ↑b) (b.cmp a) → Ordering.rec (-↑a < -↑b) (neg a = neg b) (-↑b < -↑a) (b.cmp a)
tactic: dsimp [cmp]
state_before: α : Type u_1
a b : PosNum
⊢ Ordering.rec (↑b < ↑a) (b = a) (↑a < ↑b) (b.cmp a) → Ordering.rec (-↑a < -↑b) (neg a = neg b) (-↑b < -↑a) (b.cmp a)
state_after: no goals
tactic: cases PosNum.cmp b a <;> dsimp <;> [simp; simp (config := { contextual := true }); simp [GT.gt]]
Theorem: MeasureTheory.exists_not_mem_null_le_integral
File: Mathlib/MeasureTheory/Integral/Average.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ ν : Measure α
s t N : Set α
f : α → ℝ
inst✝ : IsProbabilityMeasure μ
hf : Integrable f μ
hN : μ N = 0
⊢ ∃ x ∉ N, f x ≤ ∫ (a : α), f a ∂μ
state_after: no goals
tactic: simpa only [average_eq_integral] using
    exists_not_mem_null_le_average (IsProbabilityMeasure.ne_zero μ) hf hN
Theorem: _private.Mathlib.Analysis.Complex.AbelLimit.0.Complex.stolzCone_subset_stolzSet_aux'
File: Mathlib/Analysis/Complex/AbelLimit.lean

Proof steps:
state_before: s : ℝ
⊢ ∃ M ε, 0 < M ∧ 0 < ε ∧ ∀ (x y : ℝ), 0 < x → x < ε → |y| < s * x → √(x ^ 2 + y ^ 2) < M * (1 - √((1 - x) ^ 2 + y ^ 2))
state_after: s x y : ℝ
hx₀ : 0 < x
hx₁ : x < 1 / (1 + s ^ 2)
hy : |y| < s * x
⊢ √(x ^ 2 + y ^ 2) < (2 * √(1 + s ^ 2) + 1) * (1 - √((1 - x) ^ 2 + y ^ 2))
tactic: refine ⟨2 * sqrt (1 + s ^ 2) + 1, 1 / (1 + s ^ 2), by positivity, by positivity,
    fun x y hx₀ hx₁ hy ↦ ?_⟩
state_before: s x y : ℝ
hx₀ : 0 < x
hx₁ : x < 1 / (1 + s ^ 2)
hy : |y| < s * x
⊢ √(x ^ 2 + y ^ 2) < (2 * √(1 + s ^ 2) + 1) * (1 - √((1 - x) ^ 2 + y ^ 2))
state_after: s x y : ℝ
hx₀ : 0 < x
hx₁ : x < 1 / (1 + s ^ 2)
hy : |y| < s * x
H : √((1 - x) ^ 2 + y ^ 2) ≤ 1 - x / 2
⊢ √(x ^ 2 + y ^ 2) < (2 * √(1 + s ^ 2) + 1) * (1 - √((1 - x) ^ 2 + y ^ 2))
tactic: have H : sqrt ((1 - x) ^ 2 + y ^ 2) ≤ 1 - x / 2 := by
    calc sqrt ((1 - x) ^ 2 + y ^ 2)
      _ ≤ sqrt ((1 - x) ^ 2 + (s * x) ^ 2) := sqrt_le_sqrt <| by rw [← _root_.sq_abs y]; gcongr
      _ = sqrt (1 - 2 * x + (1 + s ^ 2) * x * x) := by congr 1; ring
      _ ≤ sqrt (1 - 2 * x + (1 + s ^ 2) * (1 / (1 + s ^ 2)) * x) := sqrt_le_sqrt <| by gcongr
      _ = sqrt (1 - x) := by congr 1; field_simp; ring
      _ ≤ 1 - x / 2 := by
        simp_rw [sub_eq_add_neg, ← neg_div]
        refine sqrt_one_add_le <| neg_le_neg_iff.mpr (hx₁.trans_le ?_).le
        rw [div_le_one (by positivity)]
        exact le_add_of_nonneg_right <| sq_nonneg s
state_before: s x y : ℝ
hx₀ : 0 < x
hx₁ : x < 1 / (1 + s ^ 2)
hy : |y| < s * x
H : √((1 - x) ^ 2 + y ^ 2) ≤ 1 - x / 2
⊢ √(x ^ 2 + y ^ 2) < (2 * √(1 + s ^ 2) + 1) * (1 - √((1 - x) ^ 2 + y ^ 2))
state_after: no goals
tactic: calc sqrt (x ^ 2 + y ^ 2)
    _ ≤ sqrt (x ^ 2 + (s * x) ^ 2) := sqrt_le_sqrt <| by rw [← _root_.sq_abs y]; gcongr
    _ = sqrt ((1 + s ^ 2) * x ^ 2) := by congr; ring
    _ = sqrt (1 + s ^ 2) * x := by rw [sqrt_mul' _ (sq_nonneg x), sqrt_sq hx₀.le]
    _ = 2 * sqrt (1 + s ^ 2) * (x / 2) := by ring
    _ < (2 * sqrt (1 + s ^ 2) + 1) * (x / 2) := by gcongr; exact lt_add_one _
    _ ≤ _ := by gcongr; exact le_sub_comm.mpr H
Theorem: connectedComponentIn_nonempty_iff
File: Mathlib/Topology/Connected/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F : Set α
⊢ (connectedComponentIn F x).Nonempty ↔ x ∈ F
state_after: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F : Set α
⊢ (if h : x ∈ F then Subtype.val '' connectedComponent ⟨x, h⟩ else ∅).Nonempty ↔ x ∈ F
tactic: rw [connectedComponentIn]
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F : Set α
⊢ (if h : x ∈ F then Subtype.val '' connectedComponent ⟨x, h⟩ else ∅).Nonempty ↔ x ∈ F
state_after: no goals
tactic: split_ifs <;> simp [connectedComponent_nonempty, *]
Theorem: FirstOrder.Ring.card_ring
File: Mathlib/ModelTheory/Algebra/Ring/Basic.lean

Proof steps:
state_before: α : Type u_1
⊢ ring.card = 5
state_after: α : Type u_1
this : Fintype.card ring.Symbols = 5
⊢ ring.card = 5
tactic: have : Fintype.card Language.ring.Symbols = 5 := rfl
state_before: α : Type u_1
this : Fintype.card ring.Symbols = 5
⊢ ring.card = 5
state_after: no goals
tactic: simp [Language.card, this]
Theorem: Polynomial.monic_generator_eq_minpoly
File: Mathlib/LinearAlgebra/AnnihilatingPolynomial.lean

Proof steps:
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : p.Monic
p_gen : Ideal.span {p} = annIdeal 𝕜 a
⊢ annIdealGenerator 𝕜 a = p
state_after: case pos
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : p.Monic
p_gen : Ideal.span {p} = annIdeal 𝕜 a
h : p = 0
⊢ annIdealGenerator 𝕜 a = p

case neg
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : p.Monic
p_gen : Ideal.span {p} = annIdeal 𝕜 a
h : ¬p = 0
⊢ annIdealGenerator 𝕜 a = p
tactic: by_cases h : p = 0
Theorem: Composition.orderEmbOfFin_boundaries
File: Mathlib/Combinatorics/Enumerative/Composition.lean

Proof steps:
state_before: n : ℕ
c : Composition n
⊢ c.boundaries.orderEmbOfFin ⋯ = c.boundary
state_after: n : ℕ
c : Composition n
⊢ ∀ (x : Fin (c.length + 1)), c.boundary x ∈ c.boundaries
tactic: refine (Finset.orderEmbOfFin_unique' _ ?_).symm
state_before: n : ℕ
c : Composition n
⊢ ∀ (x : Fin (c.length + 1)), c.boundary x ∈ c.boundaries
state_after: no goals
tactic: exact fun i => (Finset.mem_map' _).2 (Finset.mem_univ _)
Theorem: ltByCases_congr
File: Mathlib/Order/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y x' y' : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
h₁' : x' < y' → P
h₂' : x' = y' → P
h₃' : y' < x' → P
ltc : x < y ↔ x' < y'
gtc : y < x ↔ y' < x'
hh'₁ : ∀ (h : x' < y'), h₁ ⋯ = h₁' h
hh'₂ : ∀ (h : x' = y'), h₂ ⋯ = h₂' h
hh'₃ : ∀ (h : y' < x'), h₃ ⋯ = h₃' h
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases x' y' h₁' h₂' h₃'
state_after: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y x' y' : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
h₁' : x' < y' → P
h₂' : x' = y' → P
h₃' : y' < x' → P
ltc : x < y ↔ x' < y'
gtc : y < x ↔ y' < x'
hh'₁ : ∀ (h : x' < y'), h₁ ⋯ = h₁' h
hh'₂ : ∀ (h : x' = y'), h₂ ⋯ = h₂' h
hh'₃ : ∀ (h : y' < x'), h₃ ⋯ = h₃' h
h : x < y
⊢ h₁ h = ltByCases x' y' h₁' h₂' h₃'

case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y x' y' : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
h₁' : x' < y' → P
h₂' : x' = y' → P
h₃' : y' < x' → P
ltc : x < y ↔ x' < y'
gtc : y < x ↔ y' < x'
hh'₁ : ∀ (h : x' < y'), h₁ ⋯ = h₁' h
hh'₂ : ∀ (h : x' = y'), h₂ ⋯ = h₂' h
hh'₃ : ∀ (h : y' < x'), h₃ ⋯ = h₃' h
h : x = y
⊢ h₂ h = ltByCases x' y' h₁' h₂' h₃'

case refine_3
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y x' y' : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
h₁' : x' < y' → P
h₂' : x' = y' → P
h₃' : y' < x' → P
ltc : x < y ↔ x' < y'
gtc : y < x ↔ y' < x'
hh'₁ : ∀ (h : x' < y'), h₁ ⋯ = h₁' h
hh'₂ : ∀ (h : x' = y'), h₂ ⋯ = h₂' h
hh'₃ : ∀ (h : y' < x'), h₃ ⋯ = h₃' h
h : y < x
⊢ h₃ h = ltByCases x' y' h₁' h₂' h₃'
tactic: refine ltByCases_rec _ (fun h => ?_) (fun h => ?_) (fun h => ?_)
Theorem: CategoryTheory.Limits.coneOfDiagramInitial_pt
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X : J
tX : IsInitial X
F : J ⥤ C
j j' : J
k : j ⟶ j'
⊢ ((Functor.const J).obj (F.obj X)).map k ≫ (fun j => F.map (tX.to j)) j' = (fun j => F.map (tX.to j)) j ≫ F.map k
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X : J
tX : IsInitial X
F : J ⥤ C
j j' : J
k : j ⟶ j'
⊢ 𝟙 (F.obj X) ≫ F.map (tX.to j') = F.map (tX.to j) ≫ F.map k
tactic: dsimp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X : J
tX : IsInitial X
F : J ⥤ C
j j' : J
k : j ⟶ j'
⊢ 𝟙 (F.obj X) ≫ F.map (tX.to j') = F.map (tX.to j) ≫ F.map k
state_after: no goals
tactic: rw [← F.map_comp, Category.id_comp, tX.hom_ext (tX.to j ≫ k) (tX.to j')]
Theorem: RCLike.normSq_add
File: Mathlib/Analysis/RCLike/Basic.lean

Proof steps:
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z✝ z w : K
⊢ normSq (z + w) = normSq z + normSq w + 2 * re (z * (starRingEnd K) w)
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z✝ z w : K
⊢ (re z + re w) * (re z + re w) + (im z + im w) * (im z + im w) =
    re z * re z + im z * im z + (re w * re w + im w * im w) + 2 * (re z * re w - im z * -im w)
tactic: simp only [normSq_apply, map_add, rclike_simps]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z✝ z w : K
⊢ (re z + re w) * (re z + re w) + (im z + im w) * (im z + im w) =
    re z * re z + im z * im z + (re w * re w + im w * im w) + 2 * (re z * re w - im z * -im w)
state_after: no goals
tactic: ring