ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: isProperMap_iff_ultrafilter
File: Mathlib/Topology/Maps/Proper/Basic.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
⊢ IsProperMap f ↔ Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
⊢ (Continuous f ∧ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) ↔
    Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x
tactic: rw [isProperMap_iff_clusterPt]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
⊢ (Continuous f ∧ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) ↔
    Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
x✝ : Continuous f
⊢ (∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) ↔
    ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x
tactic: refine and_congr_right (fun _ ↦ ?_)
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
x✝ : Continuous f
⊢ (∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) ↔
    ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x
state_after: case mp
X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
x✝ : Continuous f
H : ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ
⊢ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x

case mpr
X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
x✝ : Continuous f
H : ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x
⊢ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ
tactic: constructor <;> intro H
Theorem: AddUnits.neg_add_of_eq
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝ : Monoid α
a✝ b c u : αˣ
a : α
h : ↑u = a
⊢ ↑u⁻¹ * a = 1
state_after: no goals
tactic: rw [← h, u.inv_mul]
Theorem: PartENat.lt_def
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: x y : PartENat
⊢ x < y ↔ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) ↔
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
tactic: rw [lt_iff_le_not_le, le_def, le_def, not_exists]
state_before: x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) ↔
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case mp
x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) →
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

case mpr
x y : PartENat
⊢ (∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy) →
    (∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
tactic: constructor
Theorem: TopCat.sigmaIsoSigma_inv_apply
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

Proof steps:
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(α i)
⊢ (sigmaIsoSigma α).inv ⟨i, x⟩ = (Sigma.ι α i) x
state_after: no goals
tactic: rw [← sigmaIsoSigma_hom_ι_apply, ← comp_app, ← comp_app, Iso.hom_inv_id,
    Category.comp_id]
Theorem: exists_nhds_half_neg
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Set G
hs : s ∈ 𝓝 1
⊢ ∃ V ∈ 𝓝 1, ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Set G
hs : s ∈ 𝓝 1
this : (fun p => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 (1, 1)
⊢ ∃ V ∈ 𝓝 1, ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s
tactic: have : (fun p : G × G => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 ((1, 1) : G × G) :=
    continuousAt_fst.mul continuousAt_snd.inv (by simpa)
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x : α
s : Set G
hs : s ∈ 𝓝 1
this : (fun p => p.1 * p.2⁻¹) ⁻¹' s ∈ 𝓝 (1, 1)
⊢ ∃ V ∈ 𝓝 1, ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s
state_after: no goals
tactic: simpa only [div_eq_mul_inv, nhds_prod_eq, mem_prod_self_iff, prod_subset_iff, mem_preimage] using
    this
Theorem: Fin.castSucc_pred_lt_iff
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
a b : Fin (n + 1)
ha : a ≠ 0
⊢ (a.pred ha).castSucc < b ↔ a ≤ b
state_after: no goals
tactic: rw [castSucc_pred_eq_pred_castSucc, pred_castSucc_lt_iff]
Theorem: Profinite.NobelingProof.contained_eq_proj
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

Proof steps:
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
h : contained C o
this : (∀ (i : I), ∀ x ∈ C, x i ≠ false → ord I i < o) → (π C fun x => ord I x < o) = C
⊢ C = π C fun x => ord I x < o
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
h : contained C o
this : (∀ (i : I), ∀ x ∈ C, x i = true → ord I i < o) → (Proj fun x => ord I x < o) '' C = C
⊢ C = π C fun x => ord I x < o
tactic: simp [π, Bool.not_eq_false] at this
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
h : contained C o
this : (∀ (i : I), ∀ x ∈ C, x i = true → ord I i < o) → (Proj fun x => ord I x < o) '' C = C
⊢ C = π C fun x => ord I x < o
state_after: no goals
tactic: exact (this (fun i x hx ↦ h x hx i)).symm
Theorem: intervalIntegral.integral_deriv_comp_mul_deriv'
File: Mathlib/MeasureTheory/Integral/FundThmCalculus.lean

Proof steps:
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝¹ : ℝ → E
g'✝ g✝ φ : ℝ → ℝ
a b : ℝ
inst✝ : CompleteSpace E
f✝ f'✝ : ℝ → E
f f' g g' : ℝ → ℝ
hf : ContinuousOn f [[a, b]]
hff' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivWithinAt f (f' x) (Ioi x) x
hf' : ContinuousOn f' [[a, b]]
hg : ContinuousOn g [[f a, f b]]
hgg' : ∀ x ∈ Ioo (min (f a) (f b)) (max (f a) (f b)), HasDerivWithinAt g (g' x) (Ioi x) x
hg' : ContinuousOn g' (f '' [[a, b]])
⊢ ∫ (x : ℝ) in a..b, (g' ∘ f) x * f' x = (g ∘ f) b - (g ∘ f) a
state_after: no goals
tactic: simpa [mul_comm] using integral_deriv_comp_smul_deriv' hf hff' hf' hg hgg' hg'
Theorem: WeakFEPair.hf_modif_int
File: Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean

Proof steps:
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : WeakFEPair E
⊢ LocallyIntegrableOn P.f_modif (Ioi 0) volume
state_after: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : WeakFEPair E
this : LocallyIntegrableOn (fun x => (P.ε * ↑(x ^ (-P.k))) • P.g₀) (Ioi 0) volume
⊢ LocallyIntegrableOn P.f_modif (Ioi 0) volume
tactic: have : LocallyIntegrableOn (fun x : ℝ ↦ (P.ε * ↑(x ^ (-P.k))) • P.g₀) (Ioi 0) := by
    refine ContinuousOn.locallyIntegrableOn ?_ measurableSet_Ioi
    refine ContinuousAt.continuousOn (fun x (hx : 0 < x) ↦ ?_)
    refine (continuousAt_const.mul ?_).smul continuousAt_const
    exact continuous_ofReal.continuousAt.comp (continuousAt_rpow_const _ _ (Or.inl hx.ne'))
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : WeakFEPair E
this : LocallyIntegrableOn (fun x => (P.ε * ↑(x ^ (-P.k))) • P.g₀) (Ioi 0) volume
⊢ LocallyIntegrableOn P.f_modif (Ioi 0) volume
state_after: case refine_1
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : WeakFEPair E
this : LocallyIntegrableOn (fun x => (P.ε * ↑(x ^ (-P.k))) • P.g₀) (Ioi 0) volume
x : ℝ
hx : x ∈ Ioi 0
⊢ IntegrableAtFilter ((Ioi 1).indicator fun x => P.f x - P.f₀) (𝓝[Ioi 0] x) volume

case refine_2
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
P : WeakFEPair E
this : LocallyIntegrableOn (fun x => (P.ε * ↑(x ^ (-P.k))) • P.g₀) (Ioi 0) volume
x : ℝ
hx : x ∈ Ioi 0
⊢ IntegrableAtFilter ((Ioo 0 1).indicator fun x => P.f x - (P.ε * ↑(x ^ (-P.k))) • P.g₀) (𝓝[Ioi 0] x) volume
tactic: refine LocallyIntegrableOn.add (fun x hx ↦ ?_) (fun x hx ↦ ?_)
Theorem: LieSubmodule.Quotient.map_mk'_eq_bot_le
File: Mathlib/Algebra/Lie/Quotient.lean

Proof steps:
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
⊢ map (mk' N) N' = ⊥ ↔ N' ≤ N
state_after: no goals
tactic: rw [← LieModuleHom.le_ker_iff_map, mk'_ker]
Theorem: AkraBazziRecurrence.asympBound_def'
File: Mathlib/Computability/AkraBazzi/AkraBazzi.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
n : ℕ
⊢ asympBound g a b n = ↑n ^ p a b * (1 + ∑ u ∈ range n, g ↑u / ↑u ^ (p a b + 1))
state_after: no goals
tactic: simp [asympBound_def, sumTransform, mul_add, mul_one, Finset.sum_Ico_eq_sum_range]
Theorem: HahnSeries.order_C
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
r : R
⊢ (C r).order = 0
state_after: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
V : Type u_4
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
r : R
h : r = 0
⊢ (C r).order = 0

case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
V : Type u_4
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
r : R
h : ¬r = 0
⊢ (C r).order = 0
tactic: by_cases h : r = 0
Theorem: Commute.exists_orderOf_eq_lcm
File: Mathlib/GroupTheory/Exponent.lean

Proof steps:
state_before: G : Type u
inst✝ : Monoid G
x y : G
h : Commute x y
⊢ ∃ z ∈ closure {x, y}, orderOf z = (orderOf x).lcm (orderOf y)
state_after: case pos
G : Type u
inst✝ : Monoid G
x y : G
h : Commute x y
hx : orderOf x = 0
hy : orderOf y = 0
⊢ ∃ z ∈ closure {x, y}, orderOf z = (orderOf x).lcm (orderOf y)

case neg
G : Type u
inst✝ : Monoid G
x y : G
h : Commute x y
hx : orderOf x = 0
hy : ¬orderOf y = 0
⊢ ∃ z ∈ closure {x, y}, orderOf z = (orderOf x).lcm (orderOf y)

case pos
G : Type u
inst✝ : Monoid G
x y : G
h : Commute x y
hx : ¬orderOf x = 0
hy : orderOf y = 0
⊢ ∃ z ∈ closure {x, y}, orderOf z = (orderOf x).lcm (orderOf y)

case neg
G : Type u
inst✝ : Monoid G
x y : G
h : Commute x y
hx : ¬orderOf x = 0
hy : ¬orderOf y = 0
⊢ ∃ z ∈ closure {x, y}, orderOf z = (orderOf x).lcm (orderOf y)
tactic: by_cases hx : orderOf x = 0 <;> by_cases hy : orderOf y = 0
Theorem: Codisjoint.ne_bot_of_ne_top'
File: Mathlib/Order/Disjoint.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : BoundedOrder α
a b : α
h : Codisjoint a b
hb : b ≠ ⊤
⊢ a ≠ ⊥
state_after: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : BoundedOrder α
b : α
hb : b ≠ ⊤
h : Codisjoint ⊥ b
⊢ False
tactic: rintro rfl
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : BoundedOrder α
b : α
hb : b ≠ ⊤
h : Codisjoint ⊥ b
⊢ False
state_after: no goals
tactic: exact hb <| by simpa using h
Theorem: ConvexOn.congr
File: Mathlib/Analysis/Convex/Function.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
α : Type u_4
β : Type u_5
ι : Type u_6
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : SMul 𝕜 α
inst✝ : SMul 𝕜 β
s : Set E
f : E → β
g✝ : β → α
g : E → β
hf : ConvexOn 𝕜 s f
hfg : EqOn f g s
x : E
hx : x ∈ s
y : E
hy : y ∈ s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ g (a • x + b • y) ≤ a • g x + b • g y
state_after: no goals
tactic: simpa only [← hfg hx, ← hfg hy, ← hfg (hf.1 hx hy ha hb hab)] using hf.2 hx hy ha hb hab
Theorem: HNNExtension.NormalWord.empty_head
File: Mathlib/GroupTheory/HNNExtension.lean

Proof steps:
state_before: G : Type u_1
inst✝² : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝¹ : Group H
M : Type u_3
inst✝ : Monoid M
d : TransversalPair G A B
⊢ ∀ (u : ℤˣ) (g : G), (u, g) ∈ { head := 1, toList := [], chain := ⋯ }.toList → g ∈ d.set u
state_after: no goals
tactic: simp
Theorem: continuous_iff_lower_upperSemicontinuous
File: Mathlib/Topology/Semicontinuous.lean

Proof steps:
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
β : Type u_2
inst✝³ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_3
inst✝² : LinearOrder γ
inst✝¹ : TopologicalSpace γ
inst✝ : OrderTopology γ
f : α → γ
⊢ Continuous f ↔ LowerSemicontinuous f ∧ UpperSemicontinuous f
state_after: no goals
tactic: simp_rw [continuous_iff_continuousOn_univ, continuousOn_iff_lower_upperSemicontinuousOn,
    lowerSemicontinuousOn_univ_iff, upperSemicontinuousOn_univ_iff]
Theorem: Polynomial.degree_divByMonic_lt
File: Mathlib/Algebra/Polynomial/Div.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : p.degree < q.degree
⊢ (p /ₘ q).degree < p.degree
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : p.degree < q.degree
this : Nontrivial R
⊢ (p /ₘ q).degree < p.degree
tactic: haveI := Nontrivial.of_polynomial_ne hp0
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : p.degree < q.degree
this : Nontrivial R
⊢ (p /ₘ q).degree < p.degree
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : p.degree < q.degree
this : Nontrivial R
⊢ degree 0 < ↑p.natDegree
tactic: rw [(divByMonic_eq_zero_iff hq).2 hpq, degree_eq_natDegree hp0]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : p.degree < q.degree
this : Nontrivial R
⊢ degree 0 < ↑p.natDegree
state_after: no goals
tactic: exact WithBot.bot_lt_coe _
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : ¬p.degree < q.degree
⊢ (p /ₘ q).degree < p.degree
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : ¬p.degree < q.degree
this : Nontrivial R
⊢ (p /ₘ q).degree < p.degree
tactic: haveI := Nontrivial.of_polynomial_ne hp0
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : ¬p.degree < q.degree
this : Nontrivial R
⊢ (p /ₘ q).degree < p.degree
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : ¬p.degree < q.degree
this : Nontrivial R
⊢ ↑(p /ₘ q).natDegree < ↑q.natDegree + ↑(p /ₘ q).natDegree
tactic: rw [← degree_add_divByMonic hq (not_lt.1 hpq), degree_eq_natDegree hq.ne_zero,
      degree_eq_natDegree (mt (divByMonic_eq_zero_iff hq).1 hpq)]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q✝ p q : R[X]
hq : q.Monic
hp0 : p ≠ 0
h0q : 0 < q.degree
hpq : ¬p.degree < q.degree
this : Nontrivial R
⊢ ↑(p /ₘ q).natDegree < ↑q.natDegree + ↑(p /ₘ q).natDegree
state_after: no goals
tactic: exact
      Nat.cast_lt.2
        (Nat.lt_add_of_pos_left (Nat.cast_lt.1 <|
          by simpa [degree_eq_natDegree hq.ne_zero] using h0q))
Theorem: inner_sub_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 z : E
⊢ ⟪x, y - z⟫_𝕜 = ⟪x, y⟫_𝕜 - ⟪x, z⟫_𝕜
state_after: no goals
tactic: simp [sub_eq_add_neg, inner_add_right]
Theorem: FreeSemigroup.traverse_mul
File: Mathlib/Algebra/Free.lean

Proof steps:
state_before: α β : Type u
m : Type u → Type u
inst✝¹ : Applicative m
F : α → m β
inst✝ : LawfulApplicative m
x✝¹ y✝ : FreeSemigroup α
x✝ : α
L1 : List α
y : α
L2 : List α
hd : α
tl : List α
ih :
  ∀ (x : α),
    traverse F ({ head := x, tail := tl } * { head := y, tail := L2 }) =
      Seq.seq ((fun x x_1 => x * x_1) <$> traverse F { head := x, tail := tl }) fun x =>
        traverse F { head := y, tail := L2 }
x : α
⊢ (Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x =>
      traverse F ({ head := hd, tail := tl } * { head := y, tail := L2 })) =
    Seq.seq
      ((fun x x_1 => x * x_1) <$>
        Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x => traverse F { head := hd, tail := tl })
      fun x => traverse F { head := y, tail := L2 }
state_after: α β : Type u
m : Type u → Type u
inst✝¹ : Applicative m
F : α → m β
inst✝ : LawfulApplicative m
x✝¹ y✝ : FreeSemigroup α
x✝ : α
L1 : List α
y : α
L2 : List α
hd : α
tl : List α
ih :
  ∀ (x : α),
    traverse F ({ head := x, tail := tl } * { head := y, tail := L2 }) =
      Seq.seq ((fun x x_1 => x * x_1) <$> traverse F { head := x, tail := tl }) fun x =>
        traverse F { head := y, tail := L2 }
x : α
⊢ (Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x =>
      Seq.seq ((fun x x_1 => x * x_1) <$> traverse F { head := hd, tail := tl }) fun x =>
        traverse F { head := y, tail := L2 }) =
    Seq.seq
      ((fun x x_1 => x * x_1) <$>
        Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x => traverse F { head := hd, tail := tl })
      fun x => traverse F { head := y, tail := L2 }
tactic: rw [ih]
Theorem: IsLowerSet.not_bddBelow
File: Mathlib/Order/UpperLower/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
⊢ s.Nonempty → ¬BddBelow s
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a✝ : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
a : α
ha : a ∈ s
b : α
hb : b ∈ lowerBounds s
⊢ False
tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a✝ : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
a : α
ha : a ∈ s
b : α
hb : b ∈ lowerBounds s
⊢ False
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a✝ : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
a : α
ha : a ∈ s
b : α
hb : b ∈ lowerBounds s
c : α
hc : c < b
⊢ False
tactic: obtain ⟨c, hc⟩ := exists_lt b
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a✝ : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
a : α
ha : a ∈ s
b : α
hb : b ∈ lowerBounds s
c : α
hc : c < b
⊢ False
state_after: no goals
tactic: exact hc.not_le (hb <| hs (hc.le.trans <| hb ha) ha)
Theorem: Metric.exists_subseq_summable_dist_of_cauchySeq
File: Mathlib/Analysis/Normed/Group/Completeness.lean

Proof steps:
state_before: α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
⊢ ∃ f, StrictMono f ∧ Summable fun i => dist (u (f (i + 1))) (u (f i))
state_after: case intro.intro
α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
f : ℕ → ℕ
hf₁ : StrictMono f
hf₂ : ∀ (n m : ℕ), m ≥ f n → dist (u m) (u (f n)) < (1 / 2) ^ n
⊢ ∃ f, StrictMono f ∧ Summable fun i => dist (u (f (i + 1))) (u (f i))
tactic: obtain ⟨f, hf₁, hf₂⟩ := Metric.exists_subseq_bounded_of_cauchySeq u hu
    (fun n => (1 / (2 : ℝ))^n) (fun n => by positivity)
state_before: case intro.intro
α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
f : ℕ → ℕ
hf₁ : StrictMono f
hf₂ : ∀ (n m : ℕ), m ≥ f n → dist (u m) (u (f n)) < (1 / 2) ^ n
⊢ ∃ f, StrictMono f ∧ Summable fun i => dist (u (f (i + 1))) (u (f i))
state_after: case intro.intro
α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
f : ℕ → ℕ
hf₁ : StrictMono f
hf₂ : ∀ (n m : ℕ), m ≥ f n → dist (u m) (u (f n)) < (1 / 2) ^ n
⊢ Summable fun i => dist (u (f (i + 1))) (u (f i))
tactic: refine ⟨f, hf₁, ?_⟩
state_before: case intro.intro
α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
f : ℕ → ℕ
hf₁ : StrictMono f
hf₂ : ∀ (n m : ℕ), m ≥ f n → dist (u m) (u (f n)) < (1 / 2) ^ n
⊢ Summable fun i => dist (u (f (i + 1))) (u (f i))
state_after: case intro.intro
α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
f : ℕ → ℕ
hf₁ : StrictMono f
hf₂ : ∀ (n m : ℕ), m ≥ f n → dist (u m) (u (f n)) < (1 / 2) ^ n
⊢ ∀ (b : ℕ), dist (u (f (b + 1))) (u (f b)) ≤ (1 / 2) ^ b
tactic: refine Summable.of_nonneg_of_le (fun n => by positivity) ?_ summable_geometric_two
state_before: case intro.intro
α : Type u_1
inst✝ : PseudoMetricSpace α
u : ℕ → α
hu : CauchySeq u
f : ℕ → ℕ
hf₁ : StrictMono f
hf₂ : ∀ (n m : ℕ), m ≥ f n → dist (u m) (u (f n)) < (1 / 2) ^ n
⊢ ∀ (b : ℕ), dist (u (f (b + 1))) (u (f b)) ≤ (1 / 2) ^ b
state_after: no goals
tactic: exact fun n => le_of_lt <| hf₂ n (f (n+1)) <| hf₁.monotone (Nat.le_add_right n 1)