l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem ofReal_le_ofReal_iff {p q : ℝ} (h : 0 ≤ q) : ENNReal.ofReal p ≤ ENNReal.ofReal q ↔ p ≤ q :=
  by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
h : 0 ≤ q
⊢ ENNReal.ofReal p ≤ ENNReal.ofReal q ↔ p ≤ q

Next tactic:
rw [ENNReal.ofReal, ENNReal.ofReal, coe_le_coe, Real.toNNReal_le_toNNReal_iff h]
@[simp]
theorem ofReal_eq_ofReal_iff {p q : ℝ} (hp : 0 ≤ p) (hq : 0 ≤ q) :
    ENNReal.ofReal p = ENNReal.ofReal q ↔ p = q := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hp : 0 ≤ p
hq : 0 ≤ q
⊢ ENNReal.ofReal p = ENNReal.ofReal q ↔ p = q

Next tactic:
rw [ENNReal.ofReal, ENNReal.ofReal, coe_eq_coe, Real.toNNReal_eq_toNNReal_iff hp hq]
@[simp]
theorem ofReal_lt_ofReal_iff {p q : ℝ} (h : 0 < q) : ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q :=
  by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
h : 0 < q
⊢ ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q

Next tactic:
rw [ENNReal.ofReal, ENNReal.ofReal, coe_lt_coe, Real.toNNReal_lt_toNNReal_iff h]
theorem ofReal_lt_ofReal_iff_of_nonneg {p q : ℝ} (hp : 0 ≤ p) :
    ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hp : 0 ≤ p
⊢ ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q

Next tactic:
rw [ENNReal.ofReal, ENNReal.ofReal, coe_lt_coe, Real.toNNReal_lt_toNNReal_iff_of_nonneg hp]
@[simp]
theorem ofReal_pos {p : ℝ} : 0 < ENNReal.ofReal p ↔ 0 < p := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ
⊢ 0 < ENNReal.ofReal p ↔ 0 < p

Next tactic:
simp [ENNReal.ofReal]
@[simp]
theorem ofReal_eq_zero {p : ℝ} : ENNReal.ofReal p = 0 ↔ p ≤ 0 := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ
⊢ ENNReal.ofReal p = 0 ↔ p ≤ 0

Next tactic:
simp [ENNReal.ofReal]
@[simp]
lemma ofReal_lt_nat_cast {p : ℝ} {n : ℕ} (hn : n ≠ 0) : ENNReal.ofReal p < n ↔ p < n := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ
n : ℕ
hn : n ≠ 0
⊢ ENNReal.ofReal p < ↑n ↔ p < ↑n

Next tactic:
exact mod_cast ofReal_lt_ofReal_iff (Nat.cast_pos.2 hn.bot_lt)
@[simp]
lemma ofReal_lt_one {p : ℝ} : ENNReal.ofReal p < 1 ↔ p < 1 := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ
⊢ ENNReal.ofReal p < 1 ↔ p < 1

Next tactic:
exact mod_cast ofReal_lt_nat_cast one_ne_zero
@[simp]
lemma nat_cast_le_ofReal {n : ℕ} {p : ℝ} (hn : n ≠ 0) : n ≤ ENNReal.ofReal p ↔ n ≤ p := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
n : ℕ
p : ℝ
hn : n ≠ 0
⊢ ↑n ≤ ENNReal.ofReal p ↔ ↑n ≤ p

Next tactic:
simp only [← not_lt, ofReal_lt_nat_cast hn]
@[simp]
lemma one_le_ofReal {p : ℝ} : 1 ≤ ENNReal.ofReal p ↔ 1 ≤ p := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ
⊢ 1 ≤ ENNReal.ofReal p ↔ 1 ≤ p

Next tactic:
exact mod_cast nat_cast_le_ofReal one_ne_zero
theorem ofReal_sub (p : ℝ) {q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hq : 0 ≤ q
⊢ ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q

Next tactic:
obtain h | h := le_total p q
theorem ofReal_sub (p : ℝ) {q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q := by
  obtain h | h := le_total p q
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hq : 0 ≤ q
h : p ≤ q
⊢ ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q

Next tactic:
rw [ofReal_of_nonpos (sub_nonpos_of_le h), tsub_eq_zero_of_le (ofReal_le_ofReal h)]
theorem ofReal_sub (p : ℝ) {q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q := by
  obtain h | h := le_total p q
  · rw [ofReal_of_nonpos (sub_nonpos_of_le h), tsub_eq_zero_of_le (ofReal_le_ofReal h)]
  

Proof state:
case inr
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hq : 0 ≤ q
h : q ≤ p
⊢ ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q

Next tactic:
refine' ENNReal.eq_sub_of_add_eq ofReal_ne_top _
theorem ofReal_sub (p : ℝ) {q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q := by
  obtain h | h := le_total p q
  · rw [ofReal_of_nonpos (sub_nonpos_of_le h), tsub_eq_zero_of_le (ofReal_le_ofReal h)]
  refine' ENNReal.eq_sub_of_add_eq ofReal_ne_top _
  

Proof state:
case inr
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hq : 0 ≤ q
h : q ≤ p
⊢ ENNReal.ofReal (p - q) + ENNReal.ofReal q = ENNReal.ofReal p

Next tactic:
rw [← ofReal_add (sub_nonneg_of_le h) hq, sub_add_cancel]
theorem ofReal_le_iff_le_toReal {a : ℝ} {b : ℝ≥0∞} (hb : b ≠ ∞) :
    ENNReal.ofReal a ≤ b ↔ a ≤ ENNReal.toReal b := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
b : ℝ≥0∞
hb : b ≠ ⊤
⊢ ENNReal.ofReal a ≤ b ↔ a ≤ ENNReal.toReal b

Next tactic:
lift b to ℝ≥0 using hb
theorem ofReal_le_iff_le_toReal {a : ℝ} {b : ℝ≥0∞} (hb : b ≠ ∞) :
    ENNReal.ofReal a ≤ b ↔ a ≤ ENNReal.toReal b := by
  lift b to ℝ≥0 using hb
  

Proof state:
case intro
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
b : ℝ≥0
⊢ ENNReal.ofReal a ≤ ↑b ↔ a ≤ ENNReal.toReal ↑b

Next tactic:
simpa [ENNReal.ofReal, ENNReal.toReal] using Real.toNNReal_le_iff_le_coe
theorem ofReal_lt_iff_lt_toReal {a : ℝ} {b : ℝ≥0∞} (ha : 0 ≤ a) (hb : b ≠ ∞) :
    ENNReal.ofReal a < b ↔ a < ENNReal.toReal b := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
b : ℝ≥0∞
ha : 0 ≤ a
hb : b ≠ ⊤
⊢ ENNReal.ofReal a < b ↔ a < ENNReal.toReal b

Next tactic:
lift b to ℝ≥0 using hb
theorem ofReal_lt_iff_lt_toReal {a : ℝ} {b : ℝ≥0∞} (ha : 0 ≤ a) (hb : b ≠ ∞) :
    ENNReal.ofReal a < b ↔ a < ENNReal.toReal b := by
  lift b to ℝ≥0 using hb
  

Proof state:
case intro
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
ha : 0 ≤ a
b : ℝ≥0
⊢ ENNReal.ofReal a < ↑b ↔ a < ENNReal.toReal ↑b

Next tactic:
simpa [ENNReal.ofReal, ENNReal.toReal] using Real.toNNReal_lt_iff_lt_coe ha
theorem ofReal_lt_coe_iff {a : ℝ} {b : ℝ≥0} (ha : 0 ≤ a) : ENNReal.ofReal a < b ↔ a < b :=
  (ofReal_lt_iff_lt_toReal ha coe_ne_top).trans <| by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ
b : ℝ≥0
ha : 0 ≤ a
⊢ a < ENNReal.toReal ↑b ↔ a < ↑b

Next tactic:
rw [coe_toReal]
theorem le_ofReal_iff_toReal_le {a : ℝ≥0∞} {b : ℝ} (ha : a ≠ ∞) (hb : 0 ≤ b) :
    a ≤ ENNReal.ofReal b ↔ ENNReal.toReal a ≤ b := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
b : ℝ
ha : a ≠ ⊤
hb : 0 ≤ b
⊢ a ≤ ENNReal.ofReal b ↔ ENNReal.toReal a ≤ b

Next tactic:
lift a to ℝ≥0 using ha
theorem le_ofReal_iff_toReal_le {a : ℝ≥0∞} {b : ℝ} (ha : a ≠ ∞) (hb : 0 ≤ b) :
    a ≤ ENNReal.ofReal b ↔ ENNReal.toReal a ≤ b := by
  lift a to ℝ≥0 using ha
  

Proof state:
case intro
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ
hb : 0 ≤ b
a : ℝ≥0
⊢ ↑a ≤ ENNReal.ofReal b ↔ ENNReal.toReal ↑a ≤ b

Next tactic:
simpa [ENNReal.ofReal, ENNReal.toReal] using Real.le_toNNReal_iff_coe_le hb
theorem lt_ofReal_iff_toReal_lt {a : ℝ≥0∞} {b : ℝ} (ha : a ≠ ∞) :
    a < ENNReal.ofReal b ↔ ENNReal.toReal a < b := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
b : ℝ
ha : a ≠ ⊤
⊢ a < ENNReal.ofReal b ↔ ENNReal.toReal a < b

Next tactic:
lift a to ℝ≥0 using ha
theorem lt_ofReal_iff_toReal_lt {a : ℝ≥0∞} {b : ℝ} (ha : a ≠ ∞) :
    a < ENNReal.ofReal b ↔ ENNReal.toReal a < b := by
  lift a to ℝ≥0 using ha
  

Proof state:
case intro
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ
a : ℝ≥0
⊢ ↑a < ENNReal.ofReal b ↔ ENNReal.toReal ↑a < b

Next tactic:
simpa [ENNReal.ofReal, ENNReal.toReal] using Real.lt_toNNReal_iff_coe_lt
theorem ofReal_mul {p q : ℝ} (hp : 0 ≤ p) :
    ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hp : 0 ≤ p
⊢ ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q

Next tactic:
simp only [ENNReal.ofReal, ← coe_mul, Real.toNNReal_mul hp]
theorem ofReal_mul' {p q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hq : 0 ≤ q
⊢ ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q

Next tactic:
rw [mul_comm, ofReal_mul hq, mul_comm]
theorem ofReal_pow {p : ℝ} (hp : 0 ≤ p) (n : ℕ) : ENNReal.ofReal (p ^ n) = ENNReal.ofReal p ^ n :=
  by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ
hp : 0 ≤ p
n : ℕ
⊢ ENNReal.ofReal (p ^ n) = ENNReal.ofReal p ^ n

Next tactic:
rw [ofReal_eq_coe_nnreal hp, ← coe_pow, ← ofReal_coe_nnreal, NNReal.coe_pow, NNReal.coe_mk]
theorem ofReal_nsmul {x : ℝ} {n : ℕ} : ENNReal.ofReal (n • x) = n • ENNReal.ofReal x := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ℝ
n : ℕ
⊢ ENNReal.ofReal (n • x) = n • ENNReal.ofReal x

Next tactic:
simp only [nsmul_eq_mul, ← ofReal_coe_nat n, ← ofReal_mul n.cast_nonneg]
theorem ofReal_inv_of_pos {x : ℝ} (hx : 0 < x) : (ENNReal.ofReal x)⁻¹ = ENNReal.ofReal x⁻¹ := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ℝ
hx : 0 < x
⊢ (ENNReal.ofReal x)⁻¹ = ENNReal.ofReal x⁻¹

Next tactic:
rw [ENNReal.ofReal, ENNReal.ofReal, ← @coe_inv (Real.toNNReal x) (by simp [hx]), coe_eq_coe,
    ← Real.toNNReal_inv]
theorem ofReal_inv_of_pos {x : ℝ} (hx : 0 < x) : (ENNReal.ofReal x)⁻¹ = ENNReal.ofReal x⁻¹ := by
  rw [ENNReal.ofReal, ENNReal.ofReal, ← @coe_inv (Real.toNNReal x) (by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ℝ
hx : 0 < x
⊢ Real.toNNReal x ≠ 0

Next tactic:
simp [hx]
theorem ofReal_div_of_pos {x y : ℝ} (hy : 0 < y) :
    ENNReal.ofReal (x / y) = ENNReal.ofReal x / ENNReal.ofReal y := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y : ℝ
hy : 0 < y
⊢ ENNReal.ofReal (x / y) = ENNReal.ofReal x / ENNReal.ofReal y

Next tactic:
rw [div_eq_mul_inv, div_eq_mul_inv, ofReal_mul' (inv_nonneg.2 hy.le), ofReal_inv_of_pos hy]
theorem toNNReal_mul_top (a : ℝ≥0∞) : ENNReal.toNNReal (a * ∞) = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ ENNReal.toNNReal (a * ⊤) = 0

Next tactic:
simp
theorem toNNReal_top_mul (a : ℝ≥0∞) : ENNReal.toNNReal (∞ * a) = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ ENNReal.toNNReal (⊤ * a) = 0

Next tactic:
simp
@[simp]
theorem smul_toNNReal (a : ℝ≥0) (b : ℝ≥0∞) : (a • b).toNNReal = a * b.toNNReal := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q a : ℝ≥0
b : ℝ≥0∞
⊢ ENNReal.toNNReal (a • b) = a * ENNReal.toNNReal b

Next tactic:
change ((a : ℝ≥0∞) * b).toNNReal = a * b.toNNReal
@[simp]
theorem smul_toNNReal (a : ℝ≥0) (b : ℝ≥0∞) : (a • b).toNNReal = a * b.toNNReal := by
  change ((a : ℝ≥0∞) * b).toNNReal = a * b.toNNReal
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q a : ℝ≥0
b : ℝ≥0∞
⊢ ENNReal.toNNReal (↑a * b) = a * ENNReal.toNNReal b

Next tactic:
simp only [ENNReal.toNNReal_mul, ENNReal.toNNReal_coe]
theorem toReal_nsmul (a : ℝ≥0∞) (n : ℕ) : (n • a).toReal = n • a.toReal := by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
n : ℕ
⊢ ENNReal.toReal (n • a) = n • ENNReal.toReal a

Next tactic:
simp
theorem toReal_ofReal_mul (c : ℝ) (a : ℝ≥0∞) (h : 0 ≤ c) :
    ENNReal.toReal (ENNReal.ofReal c * a) = c * ENNReal.toReal a := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
c : ℝ
a : ℝ≥0∞
h : 0 ≤ c
⊢ ENNReal.toReal (ENNReal.ofReal c * a) = c * ENNReal.toReal a

Next tactic:
rw [ENNReal.toReal_mul, ENNReal.toReal_ofReal h]
theorem toReal_mul_top (a : ℝ≥0∞) : ENNReal.toReal (a * ∞) = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ ENNReal.toReal (a * ⊤) = 0

Next tactic:
rw [toReal_mul, top_toReal, mul_zero]
theorem toReal_top_mul (a : ℝ≥0∞) : ENNReal.toReal (∞ * a) = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ ENNReal.toReal (⊤ * a) = 0

Next tactic:
rw [mul_comm]
theorem toReal_top_mul (a : ℝ≥0∞) : ENNReal.toReal (∞ * a) = 0 := by
  rw [mul_comm]
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ ENNReal.toReal (a * ⊤) = 0

Next tactic:
exact toReal_mul_top _
theorem toReal_eq_toReal (ha : a ≠ ∞) (hb : b ≠ ∞) : a.toReal = b.toReal ↔ a = b := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ ⊤
⊢ ENNReal.toReal a = ENNReal.toReal b ↔ a = b

Next tactic:
lift a to ℝ≥0 using ha
theorem toReal_eq_toReal (ha : a ≠ ∞) (hb : b ≠ ∞) : a.toReal = b.toReal ↔ a = b := by
  lift a to ℝ≥0 using ha
  

Proof state:
case intro
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q : ℝ≥0
hb : b ≠ ⊤
a : ℝ≥0
⊢ ENNReal.toReal ↑a = ENNReal.toReal b ↔ ↑a = b

Next tactic:
lift b to ℝ≥0 using hb
theorem toReal_eq_toReal (ha : a ≠ ∞) (hb : b ≠ ∞) : a.toReal = b.toReal ↔ a = b := by
  lift a to ℝ≥0 using ha
  lift b to ℝ≥0 using hb
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
c d : ℝ≥0∞
r p q a b : ℝ≥0
⊢ ENNReal.toReal ↑a = ENNReal.toReal ↑b ↔ ↑a = ↑b

Next tactic:
simp only [coe_eq_coe, NNReal.coe_eq, coe_toReal]
theorem toReal_smul (r : ℝ≥0) (s : ℝ≥0∞) : (r • s).toReal = r • s.toReal := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
s : ℝ≥0∞
⊢ ENNReal.toReal (r • s) = r • ENNReal.toReal s

Next tactic:
rw [ENNReal.smul_def, smul_eq_mul, toReal_mul, coe_toReal]
theorem toReal_smul (r : ℝ≥0) (s : ℝ≥0∞) : (r • s).toReal = r • s.toReal := by
  rw [ENNReal.smul_def, smul_eq_mul, toReal_mul, coe_toReal]
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
s : ℝ≥0∞
⊢ ↑r * ENNReal.toReal s = r • ENNReal.toReal s

Next tactic:
rfl
protected theorem trichotomy (p : ℝ≥0∞) : p = 0 ∨ p = ∞ ∨ 0 < p.toReal := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ≥0∞
⊢ p = 0 ∨ p = ⊤ ∨ 0 < ENNReal.toReal p

Next tactic:
simpa only [or_iff_not_imp_left] using toReal_pos
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
⊢ p = 0 ∧ q = 0 ∨
    p = 0 ∧ q = ⊤ ∨
      p = 0 ∧ 0 < ENNReal.toReal q ∨
        p = ⊤ ∧ q = ⊤ ∨
          0 < ENNReal.toReal p ∧ q = ⊤ ∨
            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q✝ : ℝ≥0
q : ℝ≥0∞
hpq : 0 ≤ q
⊢ 0 = 0 ∧ q = 0 ∨
    0 = 0 ∧ q = ⊤ ∨
      0 = 0 ∧ 0 < ENNReal.toReal q ∨
        0 = ⊤ ∧ q = ⊤ ∨
          0 < ENNReal.toReal 0 ∧ q = ⊤ ∨
            0 < ENNReal.toReal 0 ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal 0 ≤ ENNReal.toReal q

Next tactic:
simpa using q.trichotomy
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  

Proof state:
case inr
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
⊢ p = 0 ∧ q = 0 ∨
    p = 0 ∧ q = ⊤ ∨
      p = 0 ∧ 0 < ENNReal.toReal q ∨
        p = ⊤ ∧ q = ⊤ ∨
          0 < ENNReal.toReal p ∧ q = ⊤ ∨
            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · 

Proof state:
case inr.inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
p : ℝ≥0∞
hp : 0 < p
hpq : p ≤ ⊤
⊢ p = 0 ∧ ⊤ = 0 ∨
    p = 0 ∧ ⊤ = ⊤ ∨
      p = 0 ∧ 0 < ENNReal.toReal ⊤ ∨
        p = ⊤ ∧ ⊤ = ⊤ ∨
          0 < ENNReal.toReal p ∧ ⊤ = ⊤ ∨
            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal ⊤ ∧ ENNReal.toReal p ≤ ENNReal.toReal ⊤

Next tactic:
simpa using p.trichotomy
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  

Proof state:
case inr.inr
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ p = 0 ∧ q = 0 ∨
    p = 0 ∧ q = ⊤ ∨
      p = 0 ∧ 0 < ENNReal.toReal q ∨
        p = ⊤ ∧ q = ⊤ ∨
          0 < ENNReal.toReal p ∧ q = ⊤ ∨
            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
repeat' right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' 

Proof state:
case inr.inr
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ p = 0 ∧ q = 0 ∨
    p = 0 ∧ q = ⊤ ∨
      p = 0 ∧ 0 < ENNReal.toReal q ∨
        p = ⊤ ∧ q = ⊤ ∨
          0 < ENNReal.toReal p ∧ q = ⊤ ∨
            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' 

Proof state:
case inr.inr.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ p = 0 ∧ q = ⊤ ∨
    p = 0 ∧ 0 < ENNReal.toReal q ∨
      p = ⊤ ∧ q = ⊤ ∨
        0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' 

Proof state:
case inr.inr.h.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ p = 0 ∧ 0 < ENNReal.toReal q ∨
    p = ⊤ ∧ q = ⊤ ∨
      0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' 

Proof state:
case inr.inr.h.h.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ p = ⊤ ∧ q = ⊤ ∨
    0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' 

Proof state:
case inr.inr.h.h.h.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ 0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' 

Proof state:
case inr.inr.h.h.h.h.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
right
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' right
  

Proof state:
case inr.inr.h.h.h.h.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
have hq' : 0 < q := lt_of_lt_of_le hp hpq
protected theorem trichotomy₂ {p q : ℝ≥0∞} (hpq : p ≤ q) :
    p = 0 ∧ q = 0 ∨
      p = 0 ∧ q = ∞ ∨
        p = 0 ∧ 0 < q.toReal ∨
          p = ∞ ∧ q = ∞ ∨
            0 < p.toReal ∧ q = ∞ ∨ 0 < p.toReal ∧ 0 < q.toReal ∧ p.toReal ≤ q.toReal := by
  rcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))
  · simpa using q.trichotomy
  rcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)
  · simpa using p.trichotomy
  repeat' right
  have hq' : 0 < q := lt_of_lt_of_le hp hpq
  

Proof state:
case inr.inr.h.h.h.h.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ≥0∞
hpq : p ≤ q
hp : 0 < p
hq : q < ⊤
hq' : 0 < q
⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q

Next tactic:
have hp' : p < ∞ := lt_of_le_of_lt hpq hq