Absolute value, sign, inversion and division on extended real numbers #
This file defines an absolute value and sign function on EReal and uses them to provide a
CommMonoidWithZero instance, based on the absolute value and sign characterising all EReals.
Then it defines the inverse of an EReal as ⊤⁻¹ = ⊥⁻¹ = 0, which leads to a
DivInvMonoid instance and division.
Absolute value #
Sign #
@[simp]
theorem
EReal.sign_eq_and_abs_eq_iff_eq
{x y : EReal}
:
x.abs = y.abs ∧ SignType.sign x = SignType.sign y ↔ x = y
theorem
EReal.le_iff_sign
{x y : EReal}
:
x ≤ y ↔ SignType.sign x < SignType.sign y ∨ SignType.sign x = SignType.neg ∧ SignType.sign y = SignType.neg ∧ y.abs ≤ x.abs ∨ SignType.sign x = SignType.zero ∧ SignType.sign y = SignType.zero ∨ SignType.sign x = SignType.pos ∧ SignType.sign y = SignType.pos ∧ x.abs ≤ y.abs
@[implicit_reducible]
Min and Max #
Inverse #
@[implicit_reducible]
@[implicit_reducible]
Inversion and Absolute Value #
Inversion and Positivity #
Division #
Division and Multiplication #
theorem
EReal.mul_div_mul_cancel
{a b c : EReal}
(h₁ : c ≠ ⊥)
(h₂ : c ≠ ⊤)
(h₃ : c ≠ 0)
:
a * c / (b * c) = a / b
theorem
EReal.div_eq_iff
{a b c : EReal}
(hbot : b ≠ ⊥)
(htop : b ≠ ⊤)
(hzero : b ≠ 0)
:
c / b = a ↔ c = a * b
Division and Order #
theorem
EReal.strictMono_div_right_of_pos
{b : EReal}
(h : 0 < b)
(h' : b ≠ ⊤)
:
StrictMono fun (a : EReal) => a / b
theorem
EReal.strictAnti_div_right_of_neg
{b : EReal}
(h : b < 0)
(h' : b ≠ ⊥)
:
StrictAnti fun (a : EReal) => a / b
Division Distributivity #
theorem
EReal.div_right_distrib_of_nonneg
{a b c : EReal}
(h : 0 ≤ a)
(h' : 0 ≤ b)
:
(a + b) / c = a / c + b / c
Extension for the positivity tactic: inverse of an EReal.
Instances For
Extension for the positivity tactic: ratio of two EReals.