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.Operations

157 declarations and 1 deprecated aliases. Mathlib docs · Source

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

Negation

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.

Addition and order

Multiplication

theorem EReal.add_bot E0 #

∀ (x : EReal), x + ⊥ = ⊥

theorem EReal.bot_add E0 #

∀ (x : EReal), ⊥ + x = ⊥

theorem EReal.add_eq_bot_iff E0 #

∀ {x y : EReal}, x + y = ⊥ ↔ x = ⊥ ∨ y = ⊥

theorem EReal.add_ne_bot_iff E0 #

∀ {x y : EReal}, x + y ≠ ⊥ ↔ x ≠ ⊥ ∧ y ≠ ⊥

theorem EReal.bot_lt_add_iff E0 #

∀ {x y : EReal}, ⊥ < x + y ↔ ⊥ < x ∧ ⊥ < y

theorem EReal.top_add_top E0 #

⊤ + ⊤ = ⊤

theorem EReal.top_add_coe E0 #

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

theorem EReal.top_add_of_ne_bot E0 #

∀ {x : EReal}, x ≠ ⊥ → ⊤ + x = ⊤

For any extended real number x which is not ⊥, the sum of ⊤ and x is equal to ⊤.

theorem EReal.add_top_of_ne_bot E0 #

∀ {x : EReal}, x ≠ ⊥ → x + ⊤ = ⊤

For any extended real number x which is not ⊥, the sum of x and ⊤ is equal to ⊤.

theorem EReal.add_eq_top_iff E0 #

∀ {x y : EReal}, x + y = ⊤ ↔ x = ⊤ ∧ y ≠ ⊥ ∨ x ≠ ⊥ ∧ y = ⊤

theorem EReal.top_add_iff_ne_bot E1 #

∀ {x : EReal}, ⊤ + x = ⊤ ↔ x ≠ ⊥

For any extended real number x, the sum of ⊤ and x is equal to ⊤ if and only if x is not ⊥.

theorem EReal.add_top_iff_ne_bot E1 #

∀ {x : EReal}, x + ⊤ = ⊤ ↔ x ≠ ⊥

For any extended real number x, the sum of x and ⊤ is equal to ⊤ if and only if x is not ⊥.

theorem EReal.add_pos_of_pos_of_nonneg E1 #

∀ {a b : EReal}, 0 < a → 0 ≤ b → 0 < a + b

theorem EReal.add_pos E1 #

∀ {a b : EReal}, 0 < a → 0 < b → 0 < a + b

For any two extended real numbers a and b, if both a and b are greater than 0, then their sum is also greater than 0.

theorem EReal.coe_add_top E0 #

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

theorem EReal.toReal_add E1 #

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

theorem EReal.toENNReal_add E1 #

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

theorem EReal.toENNReal_add_le E1 #

∀ {x y : EReal}, (x + y).toENNReal ≤ x.toENNReal + y.toENNReal

theorem EReal.addLECancellable_coe E0 #

∀ (x : ℝ), AddLECancellable ↑x

theorem EReal.add_lt_add_right_coe E0 #

∀ {x y : EReal}, x < y → ∀ (z : ℝ), x + ↑z < y + ↑z

theorem EReal.add_lt_add_left_coe E0 #

∀ {x y : EReal}, x < y → ∀ (z : ℝ), ↑z + x < ↑z + y

theorem EReal.add_lt_add E1 #

∀ {x y z t : EReal}, x < y → z < t → x + z < y + t

theorem EReal.add_lt_add_of_lt_of_le' E1 #

∀ {x y z t : EReal}, x < y → z ≤ t → t ≠ ⊥ → (t = ⊤ → z = ⊤ → x = ⊥) → x + z < y + t

theorem EReal.add_lt_add_of_lt_of_le E1 #

∀ {x y z t : EReal}, x < y → z ≤ t → z ≠ ⊥ → t ≠ ⊤ → x + z < y + t

See also EReal.add_lt_add_of_lt_of_le' for a version with weaker but less convenient assumptions.

theorem EReal.add_lt_top E1 #

∀ {x y : EReal}, x ≠ ⊤ → y ≠ ⊤ → x + y < ⊤

theorem EReal.add_ne_top E1 #

∀ {x y : EReal}, x ≠ ⊤ → y ≠ ⊤ → x + y ≠ ⊤

theorem EReal.add_ne_top_iff_ne_top₂ E1 #

∀ {x y : EReal}, x ≠ ⊥ → y ≠ ⊥ → (x + y ≠ ⊤ ↔ x ≠ ⊤ ∧ y ≠ ⊤)

theorem EReal.add_eq_top_iff_eq_top_left E1 #

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

theorem EReal.add_ne_top_iff_ne_top_left E1 #

∀ {x y : EReal}, y ≠ ⊥ → y ≠ ⊤ → (x + y ≠ ⊤ ↔ x ≠ ⊤)

theorem EReal.add_eq_top_iff_eq_top_right E1 #

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

theorem EReal.add_ne_top_iff_ne_top_right E1 #

∀ {x y : EReal}, x ≠ ⊥ → x ≠ ⊤ → (x + y ≠ ⊤ ↔ y ≠ ⊤)

theorem EReal.add_coe_eq_top_iff E0 #

∀ {x : EReal} {y : ℝ}, x + ↑y = ⊤ ↔ x = ⊤

theorem EReal.coe_add_eq_top_iff E0 #

∀ {x : ℝ} {y : EReal}, ↑x + y = ⊤ ↔ y = ⊤

def EReal.neg E1 #

EReal → EReal

negation on EReal

instance EReal.instNeg E0 #

Neg EReal

instance EReal.instSubNegZeroMonoid E0 #

SubNegZeroMonoid EReal

theorem EReal.neg_top E0 #

-⊤ = ⊥

theorem EReal.neg_bot E0 #

-⊥ = ⊤

theorem EReal.coe_neg E0 #

∀ (x : ℝ), ↑(-x) = -↑x

theorem EReal.coe_sub E0 #

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

theorem EReal.coe_zsmul E0 #

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

instance EReal.instInvolutiveNeg E0 #

InvolutiveNeg EReal

theorem EReal.toReal_neg_eq E0 #

∀ {a : EReal}, (-a).toReal = -a.toReal

theorem EReal.neg_eq_top_iff E0 #

∀ {x : EReal}, -x = ⊤ ↔ x = ⊥

theorem EReal.neg_eq_bot_iff E0 #

∀ {x : EReal}, -x = ⊥ ↔ x = ⊤

theorem EReal.neg_eq_zero_iff E0 #

∀ {x : EReal}, -x = 0 ↔ x = 0

theorem EReal.neg_strictAnti E1 #

StrictAnti fun x ↦ -x

theorem EReal.neg_le_neg_iff E0 #

∀ {a b : EReal}, -a ≤ -b ↔ b ≤ a

theorem EReal.neg_lt_neg_iff E0 #

∀ {a b : EReal}, -a < -b ↔ b < a

theorem EReal.neg_le E1 #

∀ {a b : EReal}, -a ≤ b ↔ -b ≤ a

-a ≤ b if and only if -b ≤ a on EReal.

theorem EReal.neg_le_of_neg_le E1 #

∀ {a b : EReal}, -a ≤ b → -b ≤ a

If -a ≤ b then -b ≤ a on EReal.

theorem EReal.le_neg E1 #

∀ {a b : EReal}, a ≤ -b ↔ b ≤ -a

a ≤ -b if and only if b ≤ -a on EReal.

theorem EReal.le_neg_of_le_neg E1 #

∀ {a b : EReal}, a ≤ -b → b ≤ -a

If a ≤ -b then b ≤ -a on EReal.

theorem EReal.neg_lt_comm E1 #

∀ {a b : EReal}, -a < b ↔ -b < a

-a < b if and only if -b < a on EReal.

theorem EReal.neg_lt_of_neg_lt E1 #

∀ {a b : EReal}, -a < b → -b < a

If -a < b then -b < a on EReal.

theorem EReal.lt_neg_comm E1 #

∀ {a b : EReal}, a < -b ↔ b < -a

-a < b if and only if -b < a on EReal.

theorem EReal.neg_lt_zero E0 #

∀ {a : EReal}, -a < 0 ↔ 0 < a

theorem EReal.neg_le_zero E0 #

∀ {a : EReal}, -a ≤ 0 ↔ 0 ≤ a

theorem EReal.neg_pos E0 #

∀ {a : EReal}, 0 < -a ↔ a < 0

theorem EReal.neg_nonneg E0 #

∀ {a : EReal}, 0 ≤ -a ↔ a ≤ 0

theorem EReal.lt_neg_of_lt_neg E1 #

∀ {a b : EReal}, a < -b → b < -a

If a < -b then b < -a on EReal.

def EReal.negOrderIso E1 #

EReal ≃o ERealᵒᵈ

Negation as an order reversing isomorphism on EReal.

theorem EReal.neg_add E1 #

∀ {x y : EReal}, x ≠ ⊥ ∨ y ≠ ⊤ → x ≠ ⊤ ∨ y ≠ ⊥ → -(x + y) = -x - y

theorem EReal.neg_sub E1 #

∀ {x y : EReal}, x ≠ ⊥ ∨ y ≠ ⊥ → x ≠ ⊤ ∨ y ≠ ⊤ → -(x - y) = -x + y

def EReal.recENNReal E1 #

{motive : EReal → Sort u_1} →
  ((x : ENNReal) → motive ↑x) → ((x : ENNReal) → 0 < x → motive (-↑x)) → (x : EReal) → motive x

Induction principle for EReals splitting into cases ↑(x : ℝ≥0∞) and -↑(x : ℝ≥0∞). In the latter case, we additionally assume 0 < x.

theorem EReal.recENNReal_coe_ennreal E0 #

∀ {motive : EReal → Sort u_1} (coe : (x : ENNReal) → motive ↑x) (neg_coe : (x : ENNReal) → 0 < x → motive (-↑x))
  (x : ENNReal), EReal.recENNReal coe neg_coe ↑x = coe x

theorem EReal.recENNReal_neg_coe_ennreal E0 #

∀ {motive : EReal → Sort u_1} (coe : (x : ENNReal) → motive ↑x) (neg_coe : (x : ENNReal) → 0 < x → motive (-↑x))
  {x : ENNReal} (hx : 0 < x), EReal.recENNReal coe neg_coe (-↑x) = neg_coe x hx

theorem EReal.bot_sub E0 #

∀ (x : EReal), ⊥ - x = ⊥

theorem EReal.sub_top E0 #

∀ (x : EReal), x - ⊤ = ⊥

theorem EReal.top_sub_bot E0 #

⊤ - ⊥ = ⊤

theorem EReal.top_sub_coe E0 #

∀ (x : ℝ), ⊤ - ↑x = ⊤

theorem EReal.coe_sub_bot E0 #

∀ (x : ℝ), ↑x - ⊥ = ⊤

theorem EReal.sub_bot E0 #

∀ {x : EReal}, x ≠ ⊥ → x - ⊥ = ⊤

theorem EReal.top_sub E0 #

∀ {x : EReal}, x ≠ ⊤ → ⊤ - x = ⊤

theorem EReal.sub_self E0 #

∀ {x : EReal}, x ≠ ⊤ → x ≠ ⊥ → x - x = 0

theorem EReal.sub_self_le_zero E1 #

∀ {x : EReal}, x - x ≤ 0

theorem EReal.sub_nonneg E1 #

∀ {x y : EReal}, x ≠ ⊤ ∨ y ≠ ⊤ → x ≠ ⊥ ∨ y ≠ ⊥ → (0 ≤ x - y ↔ y ≤ x)

theorem EReal.sub_nonpos E1 #

∀ {x y : EReal}, x - y ≤ 0 ↔ x ≤ y

theorem EReal.sub_pos E1 #

∀ {x y : EReal}, 0 < x - y ↔ y < x

theorem EReal.sub_neg E1 #

∀ {x y : EReal}, x ≠ ⊤ ∨ y ≠ ⊤ → x ≠ ⊥ ∨ y ≠ ⊥ → (x - y < 0 ↔ x < y)

theorem EReal.sub_le_sub E1 #

∀ {x y z t : EReal}, x ≤ y → t ≤ z → x - z ≤ y - t

theorem EReal.sub_lt_sub_of_lt_of_le E1 #

∀ {x y z t : EReal}, x < y → z ≤ t → z ≠ ⊥ → t ≠ ⊤ → x - t < y - z

theorem EReal.coe_real_ereal_eq_coe_toNNReal_sub_coe_toNNReal E0 #

∀ (x : ℝ), ↑x = ↑↑x.toNNReal - ↑↑(-x).toNNReal

theorem EReal.toReal_sub E1 #

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

theorem EReal.toENNReal_sub E1 #

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

theorem EReal.add_sub_add_comm E1 #

∀ {a b c d : EReal}, c ≠ ⊥ ∨ d ≠ ⊤ → c ≠ ⊤ ∨ d ≠ ⊥ → a + b - (c + d) = a - c + (b - d)

theorem EReal.add_sub_cancel_right E1 #

∀ {a : EReal} {b : ℝ}, a + ↑b - ↑b = a

theorem EReal.add_sub_cancel_left E1 #

∀ {a : EReal} {b : ℝ}, ↑b + a - ↑b = a

theorem EReal.sub_add_cancel E1 #

∀ {a : EReal} {b : ℝ}, a - ↑b + ↑b = a

theorem EReal.sub_add_cancel_right E1 #

∀ {a : EReal} {b : ℝ}, ↑b - (a + ↑b) = -a

theorem EReal.sub_add_cancel_left E1 #

∀ {a : EReal} {b : ℝ}, ↑b - (↑b + a) = -a

theorem EReal.le_sub_iff_add_le E1 #

∀ {a b c : EReal}, b ≠ ⊥ ∨ c ≠ ⊥ → b ≠ ⊤ ∨ c ≠ ⊤ → (a ≤ c - b ↔ a + b ≤ c)

theorem EReal.sub_le_iff_le_add E1 #

∀ {a b c : EReal}, b ≠ ⊥ ∨ c ≠ ⊤ → b ≠ ⊤ ∨ c ≠ ⊥ → (a - b ≤ c ↔ a ≤ c + b)

theorem EReal.lt_sub_iff_add_lt E1 #

∀ {a b c : EReal}, b ≠ ⊥ ∨ c ≠ ⊤ → b ≠ ⊤ ∨ c ≠ ⊥ → (c < a - b ↔ c + b < a)

theorem EReal.sub_le_of_le_add E1 #

∀ {a b c : EReal}, a ≤ b + c → a - c ≤ b

theorem EReal.sub_le_of_le_add' E1 #

∀ {a b c : EReal}, a ≤ b + c → a - b ≤ c

See also EReal.sub_le_of_le_add.

theorem EReal.add_le_of_le_sub E1 #

∀ {a b c : EReal}, a ≤ b - c → a + c ≤ b

theorem EReal.sub_lt_iff E0 #

∀ {a b c : EReal}, b ≠ ⊥ ∨ c ≠ ⊥ → b ≠ ⊤ ∨ c ≠ ⊤ → (c - b < a ↔ c < a + b)

theorem EReal.add_lt_of_lt_sub E1 #

∀ {a b c : EReal}, a < b - c → a + c < b

theorem EReal.sub_lt_of_lt_add E1 #

∀ {a b c : EReal}, a < b + c → a - c < b

theorem EReal.sub_lt_of_lt_add' E1 #

∀ {a b c : EReal}, a < b + c → a - b < c

See also EReal.sub_lt_of_lt_add.

theorem EReal.sub_lt_sub_of_le_of_gt E1 #

∀ {x y z t : EReal}, x ≤ y → z < t → x ≠ ⊤ → y ≠ ⊥ → x - t < y - z

theorem EReal.le_of_forall_lt_iff_le E1 #

∀ {x y : EReal}, (∀ (z : ℝ), x < ↑z → y ≤ ↑z) ↔ y ≤ x

theorem EReal.ge_of_forall_gt_iff_ge E1 #

∀ {x y : EReal}, (∀ (z : ℝ), ↑z < y → ↑z ≤ x) ↔ y ≤ x

theorem EReal.add_le_of_forall_lt E1 #

∀ {a b c : EReal}, (∀ a' < a, ∀ b' < b, a' + b' ≤ c) → a + b ≤ c

theorem EReal.le_add_of_forall_gt E1 #

∀ {a b c : EReal}, a ≠ ⊥ ∨ b ≠ ⊤ → a ≠ ⊤ ∨ b ≠ ⊥ → (∀ a' > a, ∀ b' > b, c ≤ a' + b') → c ≤ a + b

theorem ENNReal.toEReal_sub E1 #

∀ {x y : ENNReal}, y ≠ ⊤ → y ≤ x → ↑(x - y) = ↑x - ↑y

theorem EReal.top_mul_top E0 #

⊤ * ⊤ = ⊤

theorem EReal.top_mul_bot E0 #

⊤ * ⊥ = ⊥

theorem EReal.bot_mul_top E0 #

⊥ * ⊤ = ⊥

theorem EReal.bot_mul_bot E0 #

⊥ * ⊥ = ⊤

theorem EReal.coe_mul_top_of_pos E0 #

∀ {x : ℝ}, 0 < x → ↑x * ⊤ = ⊤

theorem EReal.coe_mul_top_of_neg E0 #

∀ {x : ℝ}, x < 0 → ↑x * ⊤ = ⊥

theorem EReal.top_mul_coe_of_pos E1 #

∀ {x : ℝ}, 0 < x → ⊤ * ↑x = ⊤

theorem EReal.top_mul_coe_of_neg E1 #

∀ {x : ℝ}, x < 0 → ⊤ * ↑x = ⊥

theorem EReal.mul_top_of_pos E1 #

∀ {x : EReal}, 0 < x → x * ⊤ = ⊤

theorem EReal.mul_top_of_neg E1 #

∀ {x : EReal}, x < 0 → x * ⊤ = ⊥

theorem EReal.top_mul_of_pos E1 #

∀ {x : EReal}, 0 < x → ⊤ * x = ⊤

theorem EReal.top_mul_of_neg E1 #

∀ {x : EReal}, x < 0 → ⊤ * x = ⊥

theorem EReal.top_mul_coe_ennreal E1 #

∀ {x : ENNReal}, x ≠ 0 → ⊤ * ↑x = ⊤

theorem EReal.coe_ennreal_mul_top E0 #

∀ {x : ENNReal}, x ≠ 0 → ↑x * ⊤ = ⊤

theorem EReal.coe_mul_bot_of_pos E0 #

∀ {x : ℝ}, 0 < x → ↑x * ⊥ = ⊥

theorem EReal.coe_mul_bot_of_neg E0 #

∀ {x : ℝ}, x < 0 → ↑x * ⊥ = ⊤

theorem EReal.bot_mul_coe_of_pos E1 #

∀ {x : ℝ}, 0 < x → ⊥ * ↑x = ⊥

theorem EReal.bot_mul_coe_of_neg E1 #

∀ {x : ℝ}, x < 0 → ⊥ * ↑x = ⊤

theorem EReal.mul_bot_of_pos E1 #

∀ {x : EReal}, 0 < x → x * ⊥ = ⊥

theorem EReal.mul_bot_of_neg E1 #

∀ {x : EReal}, x < 0 → x * ⊥ = ⊤

theorem EReal.bot_mul_of_pos E1 #

∀ {x : EReal}, 0 < x → ⊥ * x = ⊥

theorem EReal.bot_mul_of_neg E1 #

∀ {x : EReal}, x < 0 → ⊥ * x = ⊤

theorem EReal.toReal_mul E1 #

∀ {x y : EReal}, (x * y).toReal = x.toReal * y.toReal

instance EReal.instNoZeroDivisors E0 #

NoZeroDivisors EReal

theorem EReal.mul_pos_iff E0 #

∀ {a b : EReal}, 0 < a * b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0

theorem EReal.mul_nonneg_iff E0 #

∀ {a b : EReal}, 0 ≤ a * b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0

theorem EReal.mul_nonneg E1 #

∀ {a b : EReal}, 0 ≤ a → 0 ≤ b → 0 ≤ a * b

theorem EReal.mul_pos E1 #

∀ {a b : EReal}, 0 < a → 0 < b → 0 < a * b

The product of two positive extended real numbers is positive.

theorem EReal.induction₂_neg_left E1 #

∀ {P : EReal → EReal → Prop},
  (∀ {x y : EReal}, P x y → P (-x) y) →
    P ⊤ ⊤ →
      (∀ (x : ℝ), 0 < x → P ⊤ ↑x) →
        P ⊤ 0 →
          (∀ x < 0, P ⊤ ↑x) →
            P ⊤ ⊥ →
              P 0 ⊤ →
                P 0 ⊥ →
                  (∀ (x : ℝ), 0 < x → P ↑x ⊤) →
                    (∀ (x : ℝ), 0 < x → P ↑x ⊥) → (∀ (x y : ℝ), P ↑x ↑y) → ∀ (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 P x y implies P (-x) y for all x, y.

theorem EReal.induction₂_symm_neg E1 #

∀ {P : EReal → EReal → Prop},
  (∀ {x y : EReal}, P x y → P y x) →
    (∀ {x y : EReal}, P x y → P (-x) y) →
      P ⊤ ⊤ → (∀ (x : ℝ), 0 < x → P ⊤ ↑x) → P ⊤ 0 → (∀ (x y : ℝ), P ↑x ↑y) → ∀ (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 P is symmetric and P x y implies P (-x) y for all x, y.

theorem EReal.neg_mul E1 #

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

instance EReal.instHasDistribNeg E0 #

HasDistribNeg EReal

theorem EReal.mul_neg_iff E0 #

∀ {a b : EReal}, a * b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b

theorem EReal.mul_nonpos_iff E0 #

∀ {a b : EReal}, a * b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b

theorem EReal.mul_eq_top E1 #

∀ (a b : EReal), a * b = ⊤ ↔ a = ⊥ ∧ b < 0 ∨ a < 0 ∧ b = ⊥ ∨ a = ⊤ ∧ 0 < b ∨ 0 < a ∧ b = ⊤

theorem EReal.mul_ne_top E1 #

∀ (a b : EReal), a * b ≠ ⊤ ↔ (a ≠ ⊥ ∨ 0 ≤ b) ∧ (0 ≤ a ∨ b ≠ ⊥) ∧ (a ≠ ⊤ ∨ b ≤ 0) ∧ (a ≤ 0 ∨ b ≠ ⊤)

theorem EReal.mul_eq_bot E1 #

∀ (a b : EReal), a * b = ⊥ ↔ a = ⊥ ∧ 0 < b ∨ 0 < a ∧ b = ⊥ ∨ a = ⊤ ∧ b < 0 ∨ a < 0 ∧ b = ⊤

theorem EReal.mul_ne_bot E1 #

∀ (a b : EReal), a * b ≠ ⊥ ↔ (a ≠ ⊥ ∨ b ≤ 0) ∧ (a ≤ 0 ∨ b ≠ ⊥) ∧ (a ≠ ⊤ ∨ 0 ≤ b) ∧ (0 ≤ a ∨ b ≠ ⊤)

theorem EReal.toENNReal_mul E1 #

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

EReal.toENNReal is multiplicative. For the version with the nonnegativity hypothesis on the second variable, see EReal.toENNReal_mul'.

theorem EReal.toENNReal_mul' E1 #

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

EReal.toENNReal is multiplicative. For the version with the nonnegativity hypothesis on the first variable, see EReal.toENNReal_mul.

theorem EReal.right_distrib_of_nonneg E1 #

∀ {a b c : EReal}, 0 ≤ a → 0 ≤ b → (a + b) * c = a * c + b * c

theorem EReal.left_distrib_of_nonneg E1 #

∀ {a b c : EReal}, 0 ≤ a → 0 ≤ b → c * (a + b) = c * a + c * b

theorem EReal.mul_sub_of_nonneg_of_nonpos E1 #

∀ {a b c : EReal}, 0 ≤ b → c ≤ 0 → a * (b - c) = a * b - a * c

theorem EReal.left_distrib_of_nonneg_of_ne_top E1 #

∀ {x : EReal}, 0 ≤ x → x ≠ ⊤ → ∀ (y z : EReal), x * (y + z) = x * y + x * z

theorem EReal.right_distrib_of_nonneg_of_ne_top E1 #

∀ {x : EReal}, 0 ≤ x → x ≠ ⊤ → ∀ (y z : EReal), (y + z) * x = y * x + z * x

theorem EReal.mul_sub_of_nonneg_of_ne_top E1 #

∀ {a b c : EReal}, 0 ≤ a → a ≠ ⊤ → a * (b - c) = a * b - a * c

theorem EReal.sub_mul_of_nonneg_of_ne_top E1 #

∀ {a b c : EReal}, 0 ≤ a → a ≠ ⊤ → (b - c) * a = b * a - c * a

theorem EReal.nsmul_eq_mul E0 #

∀ (n : ℕ) (x : EReal), n • x = ↑n * x

def Mathlib.Meta.Positivity.evalERealAdd E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: sum of two EReals.

def Mathlib.Meta.Positivity.evalERealMul E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: product of two EReals.

Deprecated aliases

NameNew nameSince
EReal.add_ne_top_iff_of_ne_bot_of_ne_topEReal.add_ne_top_iff_ne_top_left2026-07-02