The areas / V15. Real analysis in one variable
Mathlib.Analysis.Real.Hyperreal
72 declarations and 1 deprecated aliases. Mathlib docs · Source
Construction of the hyperreal numbers as an ultraproduct of real sequences
We define the Hyperreal numbers as quotients of sequences ℕ → ℝ by an ultrafilter. These form
a field, and we prove some of their basic properties.
Note that most of the machinery that is usually defined for the specific purpose of non-standard analysis (infinitesimal and infinite elements, standard parts) has been generalized to other non-archimedean fields. In particular:
ArchimedeanClasscan be used to measure whether an element is infinitesimal (0 < mk x) or infinite (mk x < 0).ArchimedeanClass.stdPartgeneralizes the standard part function to a general ordered field.
TODO
Use Łoś's Theorem FirstOrder.Language.Ultraproduct.sentence_realize to formalize the transfer
principle on Hyperreal.
Basic constants
ω
ε
Some facts about Tendsto
theorem Filter.hyperfilter.congr_simp E1 #
∀ (α : Type u) [inst : Infinite α], Filter.hyperfilter α = Filter.hyperfilter α
def Hyperreal E3 #
Type
Hyperreal numbers on the ultrafilter extending the cofinite filter.
instance instInhabitedHyperreal E0 #
Inhabited ℝ*
def Hyperreal.«termℝ*» E1 #
Lean.ParserDescr
Hyperreal numbers on the ultrafilter extending the cofinite filter.
instance Hyperreal.instField E0 #
Field ℝ*
instance Hyperreal.instLinearOrder E0 #
LinearOrder ℝ*
instance Hyperreal.instIsStrictOrderedRing E0 #
IsStrictOrderedRing ℝ*
def Hyperreal.ofReal E1 #
ℝ → ℝ*
Natural embedding ℝ → ℝ*.
instance Hyperreal.instCoeTCReal E0 #
CoeTC ℝ ℝ*
theorem Hyperreal.coe_eq_coe E0 #
∀ {x y : ℝ}, ↑x = ↑y ↔ x = y
theorem Hyperreal.coe_ne_coe E0 #
∀ {x y : ℝ}, ↑x ≠ ↑y ↔ x ≠ y
theorem Hyperreal.coe_eq_zero E0 #
∀ {x : ℝ}, ↑x = 0 ↔ x = 0
theorem Hyperreal.coe_eq_one E0 #
∀ {x : ℝ}, ↑x = 1 ↔ x = 1
theorem Hyperreal.coe_ne_zero E0 #
∀ {x : ℝ}, ↑x ≠ 0 ↔ x ≠ 0
theorem Hyperreal.coe_ne_one E0 #
∀ {x : ℝ}, ↑x ≠ 1 ↔ x ≠ 1
theorem Hyperreal.coe_one E0 #
↑1 = 1
theorem Hyperreal.coe_zero E0 #
↑0 = 0
theorem Hyperreal.coe_inv E0 #
∀ (x : ℝ), ↑x⁻¹ = (↑x)⁻¹
theorem Hyperreal.coe_neg E0 #
∀ (x : ℝ), ↑(-x) = -↑x
theorem Hyperreal.coe_add E0 #
∀ (x y : ℝ), ↑(x + y) = ↑x + ↑y
theorem Hyperreal.coe_ofNat E0 #
∀ (n : ℕ) [inst : n.AtLeastTwo], ↑(OfNat.ofNat n) = OfNat.ofNat n
theorem Hyperreal.coe_mul E0 #
∀ (x y : ℝ), ↑(x * y) = ↑x * ↑y
theorem Hyperreal.coe_div E0 #
∀ (x y : ℝ), ↑(x / y) = ↑x / ↑y
theorem Hyperreal.coe_sub E0 #
∀ (x y : ℝ), ↑(x - y) = ↑x - ↑y
theorem Hyperreal.coe_le_coe E0 #
∀ {x y : ℝ}, ↑x ≤ ↑y ↔ x ≤ y
theorem Hyperreal.coe_lt_coe E0 #
∀ {x y : ℝ}, ↑x < ↑y ↔ x < y
theorem Hyperreal.coe_nonneg E0 #
∀ {x : ℝ}, 0 ≤ ↑x ↔ 0 ≤ x
theorem Hyperreal.coe_pos E0 #
∀ {x : ℝ}, 0 < ↑x ↔ 0 < x
theorem Hyperreal.coe_abs E0 #
∀ (x : ℝ), ↑|x| = |↑x|
theorem Hyperreal.coe_max E0 #
∀ (x y : ℝ), ↑(max x y) = max ↑x ↑y
theorem Hyperreal.coe_min E0 #
∀ (x y : ℝ), ↑(min x y) = min ↑x ↑y
def Hyperreal.coeRingHom E1 #
ℝ →+*o ℝ*
The canonical map ℝ → ℝ* as an OrderRingHom.
theorem Hyperreal.coeRingHom_toFun E0 #
∀ (x : ℝ), Hyperreal.coeRingHom x = ↑x
theorem Hyperreal.archimedeanClassMk_coe_nonneg E0 #
∀ (x : ℝ), 0 ≤ ArchimedeanClass.mk ↑x
theorem Hyperreal.archimedeanClassMk_coe E0 #
∀ {x : ℝ}, x ≠ 0 → ArchimedeanClass.mk ↑x = 0
theorem Hyperreal.stdPart_coe E0 #
∀ (x : ℝ), ArchimedeanClass.stdPart ↑x = x
def Hyperreal.ofSeq E1 #
(ℕ → ℝ) → ℝ*
Construct a hyperreal number from a sequence of real numbers.
theorem Hyperreal.ofSeq_surjective E1 #
Function.Surjective Hyperreal.ofSeq
theorem Hyperreal.ofSeq_lt_ofSeq E1 #
∀ {f g : ℕ → ℝ}, Hyperreal.ofSeq f < Hyperreal.ofSeq g ↔ ∀ᶠ (n : ℕ) in ↑(Filter.hyperfilter ℕ), f n < g n
theorem Hyperreal.ofSeq_le_ofSeq E1 #
∀ {f g : ℕ → ℝ}, Hyperreal.ofSeq f ≤ Hyperreal.ofSeq g ↔ ∀ᶠ (n : ℕ) in ↑(Filter.hyperfilter ℕ), f n ≤ g n
def Hyperreal.omega E1 #
ℝ*
A sample infinite hyperreal ω = ⟦(0, 1, 2, 3, ⋯)⟧.
Conventions for notations in identifiers:
- The recommended spelling of
ωin identifiers isomega.
def Hyperreal.termω E1 #
Lean.ParserDescr
A sample infinite hyperreal ω = ⟦(0, 1, 2, 3, ⋯)⟧.
Conventions for notations in identifiers:
- The recommended spelling of
ωin identifiers isomega.
theorem Hyperreal.coe_lt_omega E0 #
∀ (r : ℝ), ↑r < Hyperreal.omega
theorem Hyperreal.omega_pos E1 #
0 < Hyperreal.omega
theorem Hyperreal.omega_ne_zero E0 #
Hyperreal.omega ≠ 0
theorem Hyperreal.abs_omega E0 #
|Hyperreal.omega| = Hyperreal.omega
theorem Hyperreal.archimedeanClassMk_omega_neg E0 #
ArchimedeanClass.mk Hyperreal.omega < 0
theorem Hyperreal.stdPart_omega E0 #
ArchimedeanClass.stdPart Hyperreal.omega = 0
def Hyperreal.epsilon E1 #
ℝ*
A sample infinitesimal hyperreal ε = ⟦(0, 1, 1/2, 1/3, ⋯)⟧.
Conventions for notations in identifiers:
- The recommended spelling of
εin identifiers isepsilon.
def Hyperreal.termε E1 #
Lean.ParserDescr
A sample infinitesimal hyperreal ε = ⟦(0, 1, 1/2, 1/3, ⋯)⟧.
Conventions for notations in identifiers:
- The recommended spelling of
εin identifiers isepsilon.
theorem Hyperreal.inv_omega E0 #
Hyperreal.omega⁻¹ = Hyperreal.epsilon
theorem Hyperreal.inv_epsilon E0 #
Hyperreal.epsilon⁻¹ = Hyperreal.omega
theorem Hyperreal.epsilon_pos E0 #
0 < Hyperreal.epsilon
theorem Hyperreal.epsilon_ne_zero E0 #
Hyperreal.epsilon ≠ 0
theorem Hyperreal.epsilon_mul_omega E0 #
Hyperreal.epsilon * Hyperreal.omega = 1
theorem Hyperreal.archimedeanClassMk_epsilon_pos E0 #
0 < ArchimedeanClass.mk Hyperreal.epsilon
theorem Hyperreal.tendsto_ofSeq E0 #
∀ {f : ℕ → ℝ} {lb : Filter ℝ},
Filter.Germ.Tendsto (Hyperreal.ofSeq f) lb ↔ Filter.Tendsto f (↑(Filter.hyperfilter ℕ)) lb
theorem Hyperreal.stdPart_map E1 #
∀ {x : ℝ*} {r : ℝ} {f : ℝ → ℝ},
ContinuousAt f r → Filter.Germ.Tendsto x (nhds r) → (Filter.Germ.map f x).Tendsto (nhds (f r))
theorem Hyperreal.stdPart_map₂ E1 #
∀ {x y : ℝ*} {r s : ℝ} {f : ℝ → ℝ → ℝ},
Filter.Germ.Tendsto x (nhds r) →
Filter.Germ.Tendsto y (nhds s) →
ContinuousAt (Function.uncurry f) (r, s) → (Filter.Germ.map₂ f x y).Tendsto (nhds (f r s))
theorem Hyperreal.tendsto_iff_forall E1 #
∀ {x : ℝ*} {r : ℝ}, Filter.Germ.Tendsto x (nhds r) ↔ (∀ s < r, ↑s ≤ x) ∧ ∀ s > r, x ≤ ↑s
theorem Hyperreal.archimedeanClassMk_nonneg_of_tendsto E1 #
∀ {x : ℝ*} {r : ℝ}, Filter.Germ.Tendsto x (nhds r) → 0 ≤ ArchimedeanClass.mk x
theorem Hyperreal.stdPart_of_tendsto E1 #
∀ {x : ℝ*} {r : ℝ}, Filter.Germ.Tendsto x (nhds r) → ArchimedeanClass.stdPart x = r
theorem Hyperreal.archimedeanClassMk_pos_of_tendsto E1 #
∀ {x : ℝ*}, Filter.Germ.Tendsto x (nhds 0) → 0 < ArchimedeanClass.mk x
theorem Hyperreal.stdPart_epsilon E0 #
ArchimedeanClass.stdPart Hyperreal.epsilon = 0
theorem Hyperreal.epsilon_lt_of_pos E1 #
∀ {r : ℝ}, 0 < r → Hyperreal.epsilon < ↑r
theorem Hyperreal.epsilon_lt_of_neg E1 #
∀ {r : ℝ}, r < 0 → ↑r < Hyperreal.epsilon
theorem Hyperreal.lt_of_tendsto_atTop E1 #
∀ {x : ℝ*} (r : ℝ), Filter.Germ.Tendsto x Filter.atTop → ↑r < x
theorem Hyperreal.lt_of_tendsto_atBot E1 #
∀ {x : ℝ*} (r : ℝ), Filter.Germ.Tendsto x Filter.atBot → x < ↑r
theorem Hyperreal.archimedeanClassMk_neg_of_tendsto_atTop E1 #
∀ {x : ℝ*}, Filter.Germ.Tendsto x Filter.atTop → ArchimedeanClass.mk x < 0
theorem Hyperreal.archimedeanClassMk_neg_of_tendsto_atBot E1 #
∀ {x : ℝ*}, Filter.Germ.Tendsto x Filter.atBot → ArchimedeanClass.mk x < 0
theorem Hyperreal.tendsto_atTop_iff E0 #
∀ {x : ℝ*}, Filter.Germ.Tendsto x Filter.atTop ↔ 0 < x ∧ ArchimedeanClass.mk x < 0
theorem Hyperreal.tendsto_atBot_iff E0 #
∀ {x : ℝ*}, Filter.Germ.Tendsto x Filter.atBot ↔ x < 0 ∧ ArchimedeanClass.mk x < 0
Deprecated aliases
| Name | New name | Since |
|---|---|---|
Hyperreal.archimdeanClassMk_coe | Hyperreal.archimedeanClassMk_coe | 2026-09-17 |