Addition, negation, subtraction and multiplication on extended real numbers #
Addition and multiplication in EReal are problematic in the presence of ±∞, but negation has
a natural definition and satisfies the usual properties. In particular, it is an order-reversing
isomorphism.
The construction of EReal as WithBot (WithTop ℝ) endows a LinearOrderedAddCommMonoid structure
on it. However, addition is badly behaved at (⊥, ⊤) and (⊤, ⊥), so this cannot be upgraded to a
group structure. Our choice is that ⊥ + ⊤ = ⊤ + ⊥ = ⊥, to make sure that the exponential and
logarithm between EReal and ℝ≥0∞ respect the operations. Note that the convention 0 * ∞ = 0
on ℝ≥0∞ is enforced by measure theory. Subtraction, defined as x - y = x + (-y), does not have
nice properties but is sometimes convenient to have.
There is also a CommMonoidWithZero structure on EReal, but Mathlib/Data/EReal/Basic.lean only
provides MulZeroOneClass because a proof of associativity by hand would have 125 cases.
The CommMonoidWithZero instance is instead delivered in Mathlib/Data/EReal/Inv.lean.
We define 0 * x = x * 0 = 0 for any x, with the other cases defined non-ambiguously.
This does not distribute with addition, as ⊥ = ⊥ + ⊤ = 1 * ⊥ + (-1) * ⊥ ≠ (1 - 1) * ⊥ = 0 * ⊥ = 0.
Distributivity x * (y + z) = x * y + x * z is recovered in the case where either 0 ≤ x < ⊤,
see EReal.left_distrib_of_nonneg_of_ne_top, or 0 ≤ y, z. See EReal.left_distrib_of_nonneg
(similarly for right distributivity).
Addition #
Alias of Right.add_pos_of_nonneg_of_pos.
Assumes right covariance.
The lemma assuming left covariance is Left.add_pos_of_nonneg_of_pos.
We do not have a notion of LinearOrderedAddCommMonoidWithBot but we can at least make
the order dual of the extended reals into a LinearOrderedAddCommMonoidWithTop.
Equations
- One or more equations did not get rendered due to their size.
Negation #
Equations
- One or more equations did not get rendered due to their size.
Equations
- EReal.instInvolutiveNeg = { toNeg := EReal.instNeg, neg_neg := EReal.instInvolutiveNeg._proof_1 }
Negation as an order reversing isomorphism on EReal.
Equations
- EReal.negOrderIso = { toFun := fun (x : EReal) => OrderDual.toDual (-x), invFun := fun (x : ERealᵒᵈ) => -OrderDual.ofDual x, left_inv := ⋯, right_inv := ⋯, map_rel_iff' := ⋯ }
Instances For
Induction principle for EReals splitting into cases ↑(x : ℝ≥0∞) and -↑(x : ℝ≥0∞).
In the latter case, we additionally assume 0 < x.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Subtraction #
Subtraction on EReal is defined by x - y = x + (-y). Since addition is badly behaved at some
points, so is subtraction. There is no standard algebraic typeclass involving subtraction that is
registered on EReal, beyond SubNegZeroMonoid, because of this bad behavior.
See also EReal.sub_le_of_le_add.
See also EReal.sub_lt_of_lt_add.
Addition and order #
Multiplication #
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 P x y implies P (-x) y for all
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 P is symmetric and P x y implies
P (-x) y for all x, y.
Equations
- EReal.instHasDistribNeg = { toInvolutiveNeg := EReal.instInvolutiveNeg, neg_mul := EReal.neg_mul, mul_neg := EReal.instHasDistribNeg._proof_1 }
EReal.toENNReal is multiplicative. For the version with the nonnegativity
hypothesis on the second variable, see EReal.toENNReal_mul'.
EReal.toENNReal is multiplicative. For the version with the nonnegativity
hypothesis on the first variable, see EReal.toENNReal_mul.
Extension for the positivity tactic: sum of two EReals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extension for the positivity tactic: product of two EReals.
Equations
- One or more equations did not get rendered due to their size.