The extended real numbers #
This file defines EReal
, ℝ
with a top element ⊤
and a bottom element ⊥
, implemented as
WithBot (WithTop ℝ)
.
EReal
is a CompleteLinearOrder
, deduced by typeclass inference from the fact that
WithBot (WithTop L)
completes a conditionally complete linear order L
.
Coercions from ℝ
(called coe
in lemmas) and from ℝ≥0∞
(coe_ennreal
) are registered
and their basic properties proved. The latter takes up most of the rest of this file.
Tags #
real, ereal, complete lattice
Equations
Equations
Equations
The canonical inclusion from reals to ereals. Registered as a coercion.
Equations
Instances For
Equations
- EReal.hasCoeENNReal = { coe := ENNReal.toEReal }
The multiplication on EReal
. Our definition satisfies 0 * x = x * 0 = 0
for any x
, and
picks the only sensible value elsewhere.
Equations
- EReal.mul none none = ⊤
- EReal.mul none (some none) = ⊥
- EReal.mul none (some (some y)) = if 0 < y then ⊥ else if y = 0 then 0 else ⊤
- EReal.mul (some none) none = ⊥
- EReal.mul (some none) (some none) = ⊤
- EReal.mul (some none) (some (some y)) = if 0 < y then ⊤ else if y = 0 then 0 else ⊥
- EReal.mul (some (some x_2)) (some none) = if 0 < x_2 then ⊤ else if x_2 = 0 then 0 else ⊥
- EReal.mul (some (some x_2)) none = if 0 < x_2 then ⊥ else if x_2 = 0 then 0 else ⊤
- EReal.mul (some (some x_2)) (some (some y)) = ↑(x_2 * y)
Instances For
Induct on two EReal
s by performing case splits on the sign of one whenever the other is
infinite.
Induct on two EReal
s by performing case splits on the sign of one whenever the other is
infinite. This version eliminates some cases by assuming that the relation is symmetric.
Real coercion #
The map from extended reals to reals sending infinities to zero.
Equations
- EReal.toReal none = 0
- EReal.toReal (some none) = 0
- EReal.toReal (some (some x_1)) = x_1