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
The type of extended real numbers [-∞, ∞], constructed as WithBot (WithTop ℝ).
Instances For
The canonical inclusion from reals to ereals. Registered as a coercion.
Instances For
Alias of the reverse direction of EReal.coe_le_coe_iff.
Alias of the reverse direction of EReal.coe_lt_coe_iff.
The canonical map from nonnegative extended reals to extended reals.
Instances For
A recursor for EReal in terms of the coercion.
When working in term mode, note that pattern matching can be used directly,
although this is prone to leaking the implementation details in terms of Option.
Instances For
Induct on two EReals by performing case splits on the sign of one whenever the other is
infinite.
Induct on two EReals 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.
Instances For
Intervals and coercion from reals #
ennreal coercion #
toENNReal #
x.toENNReal returns x if it is nonnegative, 0 otherwise.
Instances For
nat coercion #
Miscellaneous lemmas #
The set of numbers in EReal that are not equal to ±∞ is equivalent to ℝ.
Instances For
Extension for the positivity tactic: cast from ℝ to EReal.
Instances For
Extension for the positivity tactic: cast from ℝ≥0∞ to EReal.
Instances For
Extension for the positivity tactic: projection from EReal to ℝ.
We prove that EReal.toReal x is nonnegative whenever x is nonnegative.
Since EReal.toReal ⊤ = 0, we cannot prove a stronger statement,
at least without relying on a tactic like finiteness.
Instances For
Extension for the positivity tactic: projection from EReal to ℝ≥0∞.
We show that EReal.toENNReal x is positive whenever x is positive,
and it is nonnegative otherwise.
We cannot deduce any corollaries from x ≠ 0, since EReal.toENNReal x = 0 for x < 0.