The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V02. Numbers

Mathlib.Data.EReal.Basic

198 declarations. Mathlib docs · Source

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

Real coercion

Intervals and coercion from reals

ennreal coercion

toENNReal

nat coercion

Miscellaneous lemmas

def EReal E3 #

Type

The type of extended real numbers [-∞, ∞], constructed as WithBot (WithTop ℝ).

instance instNontrivialEReal E0 #

Nontrivial EReal

instance instAddCommMonoidWithOneEReal E0 #

AddCommMonoidWithOne EReal

instance instZeroEReal E0 #

Zero EReal

instance instAddCommMonoidEReal E0 #

AddCommMonoid EReal

instance instAddMonoidEReal E0 #

AddMonoid EReal

instance instCharZeroEReal E0 #

CharZero EReal

instance instOneEReal E0 #

One EReal

instance instInfSetEReal E0 #

InfSet EReal

instance instTopEReal E0 #

Top EReal

instance instCompleteLinearOrderEReal E0 #

CompleteLinearOrder EReal

instance instLinearOrderEReal E0 #

LinearOrder EReal

instance instSupSetEReal E0 #

SupSet EReal

instance instPartialOrderEReal E0 #

PartialOrder EReal

instance instBotEReal E0 #

Bot EReal

instance instDenselyOrderedEReal E0 #

DenselyOrdered EReal

instance instIsOrderedAddMonoidEReal E0 #

IsOrderedAddMonoid EReal

instance instZeroLEOneClassEReal E0 #

ZeroLEOneClass EReal

def Real.toEReal E1 #

ℝ → EReal

The canonical inclusion from reals to ereals. Registered as a coercion.

def Real.coeOrderEmbedding E1 #

ℝ ↪o EReal

The coercion ℝ → EReal bundled as a monotone map.

theorem Real.coeOrderEmbedding_apply E0 #

∀ (x : ℝ), Real.coeOrderEmbedding x = ↑x

instance EReal.instCoeReal E0 #

Coe ℝ EReal

theorem EReal.coe_strictMono E0 #

StrictMono Real.toEReal

theorem EReal.coe_injective E0 #

Function.Injective Real.toEReal

theorem EReal.coe_le_coe_iff E0 #

∀ {x y : ℝ}, ↑x ≤ ↑y ↔ x ≤ y

theorem EReal.coe_le_coe E0 #

∀ {x y : ℝ}, x ≤ y → ↑x ≤ ↑y

Alias of the reverse direction of EReal.coe_le_coe_iff.

theorem EReal.coe_lt_coe_iff E0 #

∀ {x y : ℝ}, ↑x < ↑y ↔ x < y

theorem EReal.coe_lt_coe E0 #

∀ {x y : ℝ}, x < y → ↑x < ↑y

Alias of the reverse direction of EReal.coe_lt_coe_iff.

theorem EReal.coe_eq_coe_iff E0 #

∀ {x y : ℝ}, ↑x = ↑y ↔ x = y

theorem EReal.coe_ne_coe_iff E0 #

∀ {x y : ℝ}, ↑x ≠ ↑y ↔ x ≠ y

theorem EReal.coe_natCast E0 #

∀ {n : ℕ}, ↑↑n = ↑n

def EReal.orderEmbedding E1 #

ℝ ↪o EReal

The order embedding of ℝ into EReal.

theorem EReal.coe_orderEmbedding E0 #

⇑EReal.orderEmbedding = Real.toEReal

def ENNReal.toEReal E1 #

ENNReal → EReal

The canonical map from nonnegative extended reals to extended reals.

instance EReal.instCoeENNReal E0 #

Coe ENNReal EReal

theorem ENNReal.toEReal_natCast E0 #

∀ (n : ℕ), ↑↑n = ↑n

theorem ENNReal.toEReal_zero E0 #

↑0 = 0

theorem ENNReal.toEReal_one E0 #

↑1 = 1

theorem ENNReal.toEReal_ofNat E1 #

∀ (n : ℕ) [inst : n.AtLeastTwo], ↑(OfNat.ofNat n) = OfNat.ofNat n

instance EReal.instInhabited E0 #

Inhabited EReal

theorem EReal.coe_zero E0 #

↑0 = 0

theorem EReal.coe_one E0 #

↑1 = 1

def EReal.rec E1 #

{motive : EReal → Sort u_1} → motive ⊥ → ((a : ℝ) → motive ↑a) → motive ⊤ → (a : EReal) → motive a

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.

theorem EReal.rec_bot E0 #

∀ {motive : EReal → Sort u_1} (bot : motive ⊥) (coe : (a : ℝ) → motive ↑a) (top : motive ⊤),
  EReal.rec bot coe top ⊥ = bot

theorem EReal.rec_top E0 #

∀ {motive : EReal → Sort u_1} (bot : motive ⊥) (coe : (a : ℝ) → motive ↑a) (top : motive ⊤),
  EReal.rec bot coe top ⊤ = top

theorem EReal.rec_coe E0 #

∀ {motive : EReal → Sort u_1} (bot : motive ⊥) (coe : (a : ℝ) → motive ↑a) (top : motive ⊤) (a : ℝ),
  EReal.rec bot coe top ↑a = coe a

theorem EReal.forall E1 #

∀ {p : EReal → Prop}, (∀ (r : EReal), p r) ↔ p ⊥ ∧ p ⊤ ∧ ∀ (r : ℝ), p ↑r

theorem EReal.exists E1 #

∀ {p : EReal → Prop}, (∃ r, p r) ↔ p ⊥ ∨ p ⊤ ∨ ∃ r, p ↑r

def EReal.mul E1 #

EReal → EReal → EReal

The multiplication on EReal. Our definition satisfies 0 * x = x * 0 = 0 for any x, and picks the only sensible value elsewhere.

instance EReal.instMul E0 #

Mul EReal

theorem EReal.coe_mul E0 #

∀ (x y : ℝ), ↑(x * y) = ↑x * ↑y

theorem EReal.induction₂ E1 #

∀ {P : EReal → EReal → Prop},
  P ⊤ ⊤ →
    (∀ (x : ℝ), 0 < x → P ⊤ ↑x) →
      P ⊤ 0 →
        (∀ x < 0, P ⊤ ↑x) →
          P ⊤ ⊥ →
            (∀ (x : ℝ), 0 < x → P ↑x ⊤) →
              (∀ (x : ℝ), 0 < x → P ↑x ⊥) →
                P 0 ⊤ →
                  (∀ (x y : ℝ), P ↑x ↑y) →
                    P 0 ⊥ →
                      (∀ x < 0, P ↑x ⊤) →
                        (∀ x < 0, P ↑x ⊥) →
                          P ⊥ ⊤ →
                            (∀ (x : ℝ), 0 < x → P ⊥ ↑x) → P ⊥ 0 → (∀ x < 0, P ⊥ ↑x) → P ⊥ ⊥ → ∀ (x y : EReal), P x y

Induct on two EReals by performing case splits on the sign of one whenever the other is infinite.

theorem EReal.induction₂_symm E1 #

∀ {P : EReal → EReal → Prop},
  (∀ {x y : EReal}, P x y → P y x) →
    P ⊤ ⊤ →
      (∀ (x : ℝ), 0 < x → P ⊤ ↑x) →
        P ⊤ 0 →
          (∀ x < 0, P ⊤ ↑x) →
            P ⊤ ⊥ →
              (∀ (x : ℝ), 0 < x → P ↑x ⊥) →
                (∀ (x y : ℝ), P ↑x ↑y) → P 0 ⊥ → (∀ x < 0, P ↑x ⊥) → P ⊥ ⊥ → ∀ (x y : EReal), P x y

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.

theorem EReal.mul_comm E1 #

∀ (x y : EReal), x * y = y * x

theorem EReal.one_mul E1 #

∀ (x : EReal), 1 * x = x

theorem EReal.zero_mul E1 #

∀ (x : EReal), 0 * x = 0

instance EReal.instMulZeroOneClass E0 #

MulZeroOneClass EReal

instance EReal.canLift E0 #

CanLift EReal ℝ Real.toEReal fun r ↦ r ≠ ⊤ ∧ r ≠ ⊥

def EReal.toReal E1 #

EReal → ℝ

The map from extended reals to reals sending infinities to zero.

theorem EReal.toReal_top E0 #

⊤.toReal = 0

theorem EReal.toReal_bot E0 #

⊥.toReal = 0

theorem EReal.toReal_zero E0 #

EReal.toReal 0 = 0

theorem EReal.toReal_one E0 #

EReal.toReal 1 = 1

theorem EReal.toReal_coe E0 #

∀ (x : ℝ), (↑x).toReal = x

theorem EReal.bot_lt_coe E0 #

∀ (x : ℝ), ⊥ < ↑x

theorem EReal.coe_ne_bot E0 #

∀ (x : ℝ), ↑x ≠ ⊥

theorem EReal.bot_ne_coe E0 #

∀ (x : ℝ), ⊥ ≠ ↑x

theorem EReal.coe_lt_top E0 #

∀ (x : ℝ), ↑x < ⊤

theorem EReal.coe_ne_top E0 #

∀ (x : ℝ), ↑x ≠ ⊤

theorem EReal.top_ne_coe E0 #

∀ (x : ℝ), ⊤ ≠ ↑x

theorem EReal.bot_lt_zero E0 #

⊥ < 0

theorem EReal.bot_ne_zero E0 #

⊥ ≠ 0

theorem EReal.zero_ne_bot E0 #

0 ≠ ⊥

theorem EReal.zero_lt_top E0 #

0 < ⊤

theorem EReal.zero_ne_top E0 #

0 ≠ ⊤

theorem EReal.top_ne_zero E0 #

⊤ ≠ 0

theorem EReal.range_coe E0 #

Set.range Real.toEReal = {⊥, ⊤}ᶜ

theorem EReal.range_coe_eq_Ioo E1 #

Set.range Real.toEReal = Set.Ioo ⊥ ⊤

theorem EReal.coe_add E0 #

∀ (x y : ℝ), ↑(x + y) = ↑x + ↑y

def Real.toERealAddHom E1 #

ℝ →+ EReal

The additive homomorphism from ℝ to EReal.

theorem Real.coe_toERealAddHom E0 #

⇑Real.toERealAddHom = Real.toEReal

theorem EReal.coe_nsmul E0 #

∀ (n : ℕ) (x : ℝ), ↑(n • x) = n • ↑x

theorem EReal.coe_eq_zero E0 #

∀ {x : ℝ}, ↑x = 0 ↔ x = 0

theorem EReal.coe_eq_one E0 #

∀ {x : ℝ}, ↑x = 1 ↔ x = 1

theorem EReal.coe_ne_zero E0 #

∀ {x : ℝ}, ↑x ≠ 0 ↔ x ≠ 0

theorem EReal.coe_ne_one E0 #

∀ {x : ℝ}, ↑x ≠ 1 ↔ x ≠ 1

theorem EReal.coe_nonneg E0 #

∀ {x : ℝ}, 0 ≤ ↑x ↔ 0 ≤ x

theorem EReal.coe_nonpos E0 #

∀ {x : ℝ}, ↑x ≤ 0 ↔ x ≤ 0

theorem EReal.coe_pos E0 #

∀ {x : ℝ}, 0 < ↑x ↔ 0 < x

theorem EReal.coe_neg' E0 #

∀ {x : ℝ}, ↑x < 0 ↔ x < 0

theorem EReal.toReal_eq_zero_iff E0 #

∀ {x : EReal}, x.toReal = 0 ↔ x = 0 ∨ x = ⊤ ∨ x = ⊥

theorem EReal.toReal_ne_zero_iff E0 #

∀ {x : EReal}, x.toReal ≠ 0 ↔ x ≠ 0 ∧ x ≠ ⊤ ∧ x ≠ ⊥

theorem EReal.toReal_eq_toReal E1 #

∀ {x y : EReal}, x ≠ ⊤ → x ≠ ⊥ → y ≠ ⊤ → y ≠ ⊥ → (x.toReal = y.toReal ↔ x = y)

theorem EReal.toReal_nonneg E1 #

∀ {x : EReal}, 0 ≤ x → 0 ≤ x.toReal

theorem EReal.toReal_nonpos E1 #

∀ {x : EReal}, x ≤ 0 → x.toReal ≤ 0

theorem EReal.toReal_pos E1 #

∀ {x : EReal}, 0 < x → x ≠ ⊤ → 0 < x.toReal

theorem EReal.toReal_neg E1 #

∀ {x : EReal}, x < 0 → x ≠ ⊥ → x.toReal < 0

theorem EReal.toReal_image_Ioo_zero_top E0 #

EReal.toReal '' Set.Ioo 0 ⊤ = Set.Ioi 0

theorem EReal.toReal_image_Ioo_bot_zero E0 #

EReal.toReal '' Set.Ioo ⊥ 0 = Set.Iio 0

theorem EReal.toReal_le_toReal E1 #

∀ {x y : EReal}, x ≤ y → x ≠ ⊥ → y ≠ ⊤ → x.toReal ≤ y.toReal

theorem EReal.coe_toReal E0 #

∀ {x : EReal}, x ≠ ⊤ → x ≠ ⊥ → ↑x.toReal = x

theorem EReal.le_coe_toReal E1 #

∀ {x : EReal}, x ≠ ⊤ → x ≤ ↑x.toReal

theorem EReal.coe_toReal_le E0 #

∀ {x : EReal}, x ≠ ⊥ → ↑x.toReal ≤ x

theorem EReal.exists_between_coe_real E1 #

∀ {x z : EReal}, x < z → ∃ y, x < ↑y ∧ ↑y < z

theorem EReal.image_coe_Icc E0 #

∀ (x y : ℝ), Real.toEReal '' Set.Icc x y = Set.Icc ↑x ↑y

theorem EReal.image_coe_Ico E0 #

∀ (x y : ℝ), Real.toEReal '' Set.Ico x y = Set.Ico ↑x ↑y

theorem EReal.image_coe_Ici E0 #

∀ (x : ℝ), Real.toEReal '' Set.Ici x = Set.Ico ↑x ⊤

theorem EReal.image_coe_Ioc E0 #

∀ (x y : ℝ), Real.toEReal '' Set.Ioc x y = Set.Ioc ↑x ↑y

theorem EReal.image_coe_Ioo E0 #

∀ (x y : ℝ), Real.toEReal '' Set.Ioo x y = Set.Ioo ↑x ↑y

theorem EReal.image_coe_Ioi E0 #

∀ (x : ℝ), Real.toEReal '' Set.Ioi x = Set.Ioo ↑x ⊤

theorem EReal.image_coe_Iic E0 #

∀ (x : ℝ), Real.toEReal '' Set.Iic x = Set.Ioc ⊥ ↑x

theorem EReal.image_coe_Iio E0 #

∀ (x : ℝ), Real.toEReal '' Set.Iio x = Set.Ioo ⊥ ↑x

theorem EReal.preimage_coe_Ici E0 #

∀ (x : ℝ), Real.toEReal ⁻¹' Set.Ici ↑x = Set.Ici x

theorem EReal.preimage_coe_Ioi E0 #

∀ (x : ℝ), Real.toEReal ⁻¹' Set.Ioi ↑x = Set.Ioi x

theorem EReal.preimage_coe_Ioi_bot E0 #

Real.toEReal ⁻¹' Set.Ioi ⊥ = Set.univ

theorem EReal.preimage_coe_Iic E0 #

∀ (y : ℝ), Real.toEReal ⁻¹' Set.Iic ↑y = Set.Iic y

theorem EReal.preimage_coe_Iio E0 #

∀ (y : ℝ), Real.toEReal ⁻¹' Set.Iio ↑y = Set.Iio y

theorem EReal.preimage_coe_Iio_top E0 #

Real.toEReal ⁻¹' Set.Iio ⊤ = Set.univ

theorem EReal.preimage_coe_Icc E0 #

∀ (x y : ℝ), Real.toEReal ⁻¹' Set.Icc ↑x ↑y = Set.Icc x y

theorem EReal.preimage_coe_Ico E0 #

∀ (x y : ℝ), Real.toEReal ⁻¹' Set.Ico ↑x ↑y = Set.Ico x y

theorem EReal.preimage_coe_Ioc E0 #

∀ (x y : ℝ), Real.toEReal ⁻¹' Set.Ioc ↑x ↑y = Set.Ioc x y

theorem EReal.preimage_coe_Ioo E0 #

∀ (x y : ℝ), Real.toEReal ⁻¹' Set.Ioo ↑x ↑y = Set.Ioo x y

theorem EReal.preimage_coe_Ico_top E0 #

∀ (x : ℝ), Real.toEReal ⁻¹' Set.Ico ↑x ⊤ = Set.Ici x

theorem EReal.preimage_coe_Ioo_top E0 #

∀ (x : ℝ), Real.toEReal ⁻¹' Set.Ioo ↑x ⊤ = Set.Ioi x

theorem EReal.preimage_coe_Ioc_bot E0 #

∀ (y : ℝ), Real.toEReal ⁻¹' Set.Ioc ⊥ ↑y = Set.Iic y

theorem EReal.preimage_coe_Ioo_bot E0 #

∀ (y : ℝ), Real.toEReal ⁻¹' Set.Ioo ⊥ ↑y = Set.Iio y

theorem EReal.preimage_coe_Ioo_bot_top E0 #

Real.toEReal ⁻¹' Set.Ioo ⊥ ⊤ = Set.univ

theorem EReal.toReal_coe_ennreal E0 #

∀ {x : ENNReal}, (↑x).toReal = x.toReal

theorem EReal.coe_ennreal_ofReal E0 #

∀ {x : ℝ}, ↑(ENNReal.ofReal x) = ↑(max x 0)

theorem EReal.coe_ennreal_toReal E0 #

∀ {x : ENNReal}, x ≠ ⊤ → ↑x.toReal = ↑x

theorem EReal.coe_nnreal_eq_coe_real E0 #

∀ (x : NNReal), ↑↑x = ↑↑x

theorem EReal.coe_ennreal_zero E0 #

↑0 = 0

theorem EReal.coe_ennreal_one E0 #

↑1 = 1

theorem EReal.coe_ennreal_top E0 #

↑⊤ = ⊤

theorem EReal.coe_ennreal_strictMono E0 #

StrictMono ENNReal.toEReal

theorem EReal.coe_ennreal_injective E0 #

Function.Injective ENNReal.toEReal

theorem EReal.coe_ennreal_eq_top_iff E0 #

∀ {x : ENNReal}, ↑x = ⊤ ↔ x = ⊤

theorem EReal.coe_nnreal_ne_top E0 #

∀ (x : NNReal), ↑↑x ≠ ⊤

theorem EReal.coe_nnreal_lt_top E0 #

∀ (x : NNReal), ↑↑x < ⊤

theorem EReal.coe_ennreal_le_coe_ennreal_iff E0 #

∀ {x y : ENNReal}, ↑x ≤ ↑y ↔ x ≤ y

theorem EReal.coe_ennreal_lt_coe_ennreal_iff E0 #

∀ {x y : ENNReal}, ↑x < ↑y ↔ x < y

theorem EReal.coe_ennreal_eq_coe_ennreal_iff E0 #

∀ {x y : ENNReal}, ↑x = ↑y ↔ x = y

theorem EReal.coe_ennreal_ne_coe_ennreal_iff E0 #

∀ {x y : ENNReal}, ↑x ≠ ↑y ↔ x ≠ y

theorem EReal.coe_ennreal_eq_zero E0 #

∀ {x : ENNReal}, ↑x = 0 ↔ x = 0

theorem EReal.coe_ennreal_eq_one E0 #

∀ {x : ENNReal}, ↑x = 1 ↔ x = 1

theorem EReal.coe_ennreal_ne_zero E0 #

∀ {x : ENNReal}, ↑x ≠ 0 ↔ x ≠ 0

theorem EReal.coe_ennreal_ne_one E0 #

∀ {x : ENNReal}, ↑x ≠ 1 ↔ x ≠ 1

theorem EReal.coe_ennreal_nonneg E0 #

∀ (x : ENNReal), 0 ≤ ↑x

theorem EReal.range_coe_ennreal E0 #

Set.range ENNReal.toEReal = Set.Ici 0

instance EReal.instCanLiftENNRealToERealLeOfNat E0 #

CanLift EReal ENNReal ENNReal.toEReal fun x ↦ 0 ≤ x

theorem EReal.coe_ennreal_pos E0 #

∀ {x : ENNReal}, 0 < ↑x ↔ 0 < x

theorem EReal.coe_ennreal_pos_iff_ne_zero E0 #

∀ {x : ENNReal}, 0 < ↑x ↔ x ≠ 0

theorem EReal.bot_lt_coe_ennreal E0 #

∀ (x : ENNReal), ⊥ < ↑x

theorem EReal.coe_ennreal_ne_bot E0 #

∀ (x : ENNReal), ↑x ≠ ⊥

theorem EReal.coe_ennreal_add E0 #

∀ (x y : ENNReal), ↑(x + y) = ↑x + ↑y

theorem EReal.coe_ennreal_mul E0 #

∀ (x y : ENNReal), ↑(x * y) = ↑x * ↑y

theorem EReal.coe_ennreal_nsmul E0 #

∀ (n : ℕ) (x : ENNReal), ↑(n • x) = n • ↑x

def EReal.toENNReal E1 #

EReal → ENNReal

x.toENNReal returns x if it is nonnegative, 0 otherwise.

theorem EReal.toENNReal_top E0 #

⊤.toENNReal = ⊤

theorem EReal.toENNReal_of_ne_top E0 #

∀ {x : EReal}, x ≠ ⊤ → x.toENNReal = ENNReal.ofReal x.toReal

theorem EReal.toENNReal_eq_top_iff E0 #

∀ {x : EReal}, x.toENNReal = ⊤ ↔ x = ⊤

theorem EReal.toENNReal_ne_top_iff E0 #

∀ {x : EReal}, x.toENNReal ≠ ⊤ ↔ x ≠ ⊤

theorem EReal.toENNReal_of_nonpos E0 #

∀ {x : EReal}, x ≤ 0 → x.toENNReal = 0

theorem EReal.toENNReal_bot E1 #

⊥.toENNReal = 0

theorem EReal.toENNReal_zero E1 #

EReal.toENNReal 0 = 0

theorem EReal.toENNReal_eq_zero_iff E0 #

∀ {x : EReal}, x.toENNReal = 0 ↔ x ≤ 0

theorem EReal.toENNReal_ne_zero_iff E0 #

∀ {x : EReal}, x.toENNReal ≠ 0 ↔ 0 < x

theorem EReal.toENNReal_pos_iff E0 #

∀ {x : EReal}, 0 < x.toENNReal ↔ 0 < x

theorem EReal.coe_toENNReal E0 #

∀ {x : EReal}, 0 ≤ x → ↑x.toENNReal = x

theorem EReal.coe_toENNReal_eq_max E0 #

∀ {x : EReal}, ↑x.toENNReal = max 0 x

theorem EReal.toENNReal_coe E0 #

∀ {x : ENNReal}, (↑x).toENNReal = x

theorem EReal.real_coe_toENNReal E0 #

∀ (x : ℝ), (↑x).toENNReal = ENNReal.ofReal x

theorem EReal.toReal_toENNReal E0 #

∀ {x : EReal}, 0 ≤ x → x.toENNReal.toReal = x.toReal

theorem EReal.toENNReal_eq_toENNReal E1 #

∀ {x y : EReal}, 0 ≤ x → 0 ≤ y → (x.toENNReal = y.toENNReal ↔ x = y)

theorem EReal.toENNReal_le_toENNReal E1 #

∀ {x y : EReal}, x ≤ y → x.toENNReal ≤ y.toENNReal

theorem EReal.toENNReal_lt_toENNReal E1 #

∀ {x y : EReal}, 0 ≤ x → x < y → x.toENNReal < y.toENNReal

theorem EReal.coe_coe_eq_natCast E0 #

∀ (n : ℕ), ↑↑n = ↑n

theorem EReal.natCast_ne_bot E0 #

∀ (n : ℕ), ↑n ≠ ⊥

theorem EReal.natCast_ne_top E0 #

∀ (n : ℕ), ↑n ≠ ⊤

theorem EReal.natCast_eq_iff E0 #

∀ {m n : ℕ}, ↑m = ↑n ↔ m = n

theorem EReal.natCast_ne_iff E0 #

∀ {m n : ℕ}, ↑m ≠ ↑n ↔ m ≠ n

theorem EReal.natCast_le_iff E0 #

∀ {m n : ℕ}, ↑m ≤ ↑n ↔ m ≤ n

theorem EReal.natCast_lt_iff E0 #

∀ {m n : ℕ}, ↑m < ↑n ↔ m < n

theorem EReal.natCast_mul E0 #

∀ (m n : ℕ), ↑(m * n) = ↑m * ↑n

theorem EReal.ennrealToEReal_le_natCast E0 #

∀ {r : ENNReal} {n : ℕ}, ↑r ≤ ↑n ↔ r ≤ ↑n

theorem EReal.natCast_le_ennrealToEReal E0 #

∀ {r : ENNReal} {n : ℕ}, ↑n ≤ ↑r ↔ ↑n ≤ r

theorem EReal.ennrealToEReal_lt_natCast E0 #

∀ {r : ENNReal} {n : ℕ}, ↑r < ↑n ↔ r < ↑n

theorem EReal.natCast_lt_ennrealToEReal E0 #

∀ {r : ENNReal} {n : ℕ}, ↑n < ↑r ↔ ↑n < r

theorem EReal.exists_rat_btwn_of_lt E1 #

∀ {a b : EReal}, a < b → ∃ x, a < ↑↑x ∧ ↑↑x < b

theorem EReal.lt_iff_exists_rat_btwn E1 #

∀ {a b : EReal}, a < b ↔ ∃ x, a < ↑↑x ∧ ↑↑x < b

theorem EReal.lt_iff_exists_real_btwn E1 #

∀ {a b : EReal}, a < b ↔ ∃ x, a < ↑x ∧ ↑x < b

theorem EReal.le_of_forall_lt_ratCast_imp_le E1 #

∀ {a b : EReal}, (∀ (q : ℚ), b < ↑↑q → a ≤ ↑↑q) → a ≤ b

theorem EReal.le_of_forall_ratCast_lt_imp_le E1 #

∀ {a b : EReal}, (∀ (q : ℚ), ↑↑q < a → ↑↑q ≤ b) → a ≤ b

def EReal.neTopBotEquivReal E1 #

↑{⊥, ⊤}ᶜ ≃ ℝ

The set of numbers in EReal that are not equal to ±∞ is equivalent to ℝ.

def Mathlib.Meta.Positivity.evalRealToEReal E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: cast from ℝ to EReal.

def Mathlib.Meta.Positivity.evalENNRealToEReal E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: cast from ℝ≥0∞ to EReal.

def Mathlib.Meta.Positivity.evalERealToReal E1 #

Mathlib.Meta.Positivity.PositivityExt

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.

def Mathlib.Meta.Positivity.evalERealToENNReal E1 #

Mathlib.Meta.Positivity.PositivityExt

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.