l3lab/ntp-mathlib huggingface dataset:
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    

Proof state:
case top.intro
α : Type u_1
β : Type u_2
a b d : ℝ≥0∞
r p q c : ℝ≥0
h0 : ⊤ ≠ 0 ∨ ↑c ≠ 0
ht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤
⊢ a = 0 ↔ a * ⊤ ≤ ↑c

Next tactic:
rcases eq_or_ne a 0 with (rfl | ha)
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> 

Proof state:
case top.intro.inl
α : Type u_1
β : Type u_2
b d : ℝ≥0∞
r p q c : ℝ≥0
h0 : ⊤ ≠ 0 ∨ ↑c ≠ 0
ht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤
⊢ 0 = 0 ↔ 0 * ⊤ ≤ ↑c

Next tactic:
simp [*]
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> 

Proof state:
case top.intro.inr
α : Type u_1
β : Type u_2
a b d : ℝ≥0∞
r p q c : ℝ≥0
h0 : ⊤ ≠ 0 ∨ ↑c ≠ 0
ht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤
ha : a ≠ 0
⊢ a = 0 ↔ a * ⊤ ≤ ↑c

Next tactic:
simp [*]
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> simp [*]
  

Proof state:
case coe
α : Type u_1
β : Type u_2
a b✝ c d : ℝ≥0∞
r p q b : ℝ≥0
h0 : ↑b ≠ 0 ∨ c ≠ 0
ht : ↑b ≠ ⊤ ∨ c ≠ ⊤
⊢ a ≤ c / ↑b ↔ a * ↑b ≤ c

Next tactic:
rcases eq_or_ne b 0 with (rfl | hb)
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> simp [*]
  rcases eq_or_ne b 0 with (rfl | hb)
  · 

Proof state:
case coe.inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h0 : ↑0 ≠ 0 ∨ c ≠ 0
ht : ↑0 ≠ ⊤ ∨ c ≠ ⊤
⊢ a ≤ c / ↑0 ↔ a * ↑0 ≤ c

Next tactic:
have hc : c ≠ 0 := h0.neg_resolve_left rfl
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> simp [*]
  rcases eq_or_ne b 0 with (rfl | hb)
  · have hc : c ≠ 0 := h0.neg_resolve_left rfl
    

Proof state:
case coe.inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h0 : ↑0 ≠ 0 ∨ c ≠ 0
ht : ↑0 ≠ ⊤ ∨ c ≠ ⊤
hc : c ≠ 0
⊢ a ≤ c / ↑0 ↔ a * ↑0 ≤ c

Next tactic:
simp [div_zero hc]
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> simp [*]
  rcases eq_or_ne b 0 with (rfl | hb)
  · have hc : c ≠ 0 := h0.neg_resolve_left rfl
    simp [div_zero hc]
  · 

Proof state:
case coe.inr
α : Type u_1
β : Type u_2
a b✝ c d : ℝ≥0∞
r p q b : ℝ≥0
h0 : ↑b ≠ 0 ∨ c ≠ 0
ht : ↑b ≠ ⊤ ∨ c ≠ ⊤
hb : b ≠ 0
⊢ a ≤ c / ↑b ↔ a * ↑b ≤ c

Next tactic:
rw [← coe_ne_zero] at hb
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  induction' b using recTopCoe with b
  · lift c to ℝ≥0 using ht.neg_resolve_left rfl
    rw [div_top, nonpos_iff_eq_zero]
    rcases eq_or_ne a 0 with (rfl | ha) <;> simp [*]
  rcases eq_or_ne b 0 with (rfl | hb)
  · have hc : c ≠ 0 := h0.neg_resolve_left rfl
    simp [div_zero hc]
  · rw [← coe_ne_zero] at hb
    

Proof state:
case coe.inr
α : Type u_1
β : Type u_2
a b✝ c d : ℝ≥0∞
r p q b : ℝ≥0
h0 : ↑b ≠ 0 ∨ c ≠ 0
ht : ↑b ≠ ⊤ ∨ c ≠ ⊤
hb : ↑b ≠ 0
⊢ a ≤ c / ↑b ↔ a * ↑b ≤ c

Next tactic:
rw [← ENNReal.mul_le_mul_right hb coe_ne_top, ENNReal.div_mul_cancel hb coe_ne_top]
protected theorem div_le_iff_le_mul (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    a / b ≤ c ↔ a ≤ c * b := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hb0 : b ≠ 0 ∨ c ≠ ⊤
hbt : b ≠ ⊤ ∨ c ≠ 0
⊢ a / b ≤ c ↔ a ≤ c * b

Next tactic:
suffices a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹ by simpa [div_eq_mul_inv]
protected theorem div_le_iff_le_mul (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    a / b ≤ c ↔ a ≤ c * b := by
  suffices a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹ by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hb0 : b ≠ 0 ∨ c ≠ ⊤
hbt : b ≠ ⊤ ∨ c ≠ 0
this : a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹
⊢ a / b ≤ c ↔ a ≤ c * b

Next tactic:
simpa [div_eq_mul_inv]
protected theorem div_le_iff_le_mul (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    a / b ≤ c ↔ a ≤ c * b := by
  suffices a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹ by simpa [div_eq_mul_inv]
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hb0 : b ≠ 0 ∨ c ≠ ⊤
hbt : b ≠ ⊤ ∨ c ≠ 0
⊢ a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹

Next tactic:
refine' (ENNReal.le_div_iff_mul_le _ _).symm
protected theorem div_le_iff_le_mul (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    a / b ≤ c ↔ a ≤ c * b := by
  suffices a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹ by simpa [div_eq_mul_inv]
  refine' (ENNReal.le_div_iff_mul_le _ _).symm <;> 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hb0 : b ≠ 0 ∨ c ≠ ⊤
hbt : b ≠ ⊤ ∨ c ≠ 0
⊢ b⁻¹ ≠ 0 ∨ c ≠ 0

Next tactic:
simpa
protected theorem div_le_iff_le_mul (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    a / b ≤ c ↔ a ≤ c * b := by
  suffices a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹ by simpa [div_eq_mul_inv]
  refine' (ENNReal.le_div_iff_mul_le _ _).symm <;> 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hb0 : b ≠ 0 ∨ c ≠ ⊤
hbt : b ≠ ⊤ ∨ c ≠ 0
⊢ b⁻¹ ≠ ⊤ ∨ c ≠ ⊤

Next tactic:
simpa
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
⊢ a / c ≤ b

Next tactic:
by_cases h0 : c = 0
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  by_cases h0 : c = 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : c = 0
⊢ a / c ≤ b

Next tactic:
have : a = 0 := by simpa [h0] using h
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  by_cases h0 : c = 0
  · have : a = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : c = 0
⊢ a = 0

Next tactic:
simpa [h0] using h
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  by_cases h0 : c = 0
  · have : a = 0 := by simpa [h0] using h
    

Proof state:
case pos
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : c = 0
this : a = 0
⊢ a / c ≤ b

Next tactic:
simp [*]
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  by_cases h0 : c = 0
  · have : a = 0 := by simpa [h0] using h
    simp [*]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : ¬c = 0
⊢ a / c ≤ b

Next tactic:
by_cases hinf : c = ∞
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  by_cases h0 : c = 0
  · have : a = 0 := by simpa [h0] using h
    simp [*]
  by_cases hinf : c = ∞; · 

Proof state:
case pos
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : ¬c = 0
hinf : c = ⊤
⊢ a / c ≤ b

Next tactic:
simp [hinf]
theorem div_le_of_le_mul (h : a ≤ b * c) : a / c ≤ b := by
  by_cases h0 : c = 0
  · have : a = 0 := by simpa [h0] using h
    simp [*]
  by_cases hinf : c = ∞; · simp [hinf]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b * c
h0 : ¬c = 0
hinf : ¬c = ⊤
⊢ a / c ≤ b

Next tactic:
exact (ENNReal.div_le_iff_le_mul (Or.inl h0) (Or.inl hinf)).2 h
protected theorem div_self_le_one : a / a ≤ 1 := div_le_of_le_mul <| by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a ≤ 1 * a

Next tactic:
rw [one_mul]
theorem mul_le_of_le_div (h : a ≤ b / c) : a * c ≤ b := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b / c
⊢ a * c ≤ b

Next tactic:
rw [← inv_inv c]
theorem mul_le_of_le_div (h : a ≤ b / c) : a * c ≤ b := by
  rw [← inv_inv c]
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b / c
⊢ a * c⁻¹⁻¹ ≤ b

Next tactic:
exact div_le_of_le_mul h
theorem mul_lt_of_lt_div (h : a < b / c) : a * c < b := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a < b / c
⊢ a * c < b

Next tactic:
contrapose! h
theorem mul_lt_of_lt_div (h : a < b / c) : a * c < b := by
  contrapose! h
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : b ≤ a * c
⊢ b / c ≤ a

Next tactic:
exact ENNReal.div_le_of_le_mul h
theorem div_lt_of_lt_mul (h : a < b * c) : a / c < b :=
  mul_lt_of_lt_div <| by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a < b * c
⊢ a < b / c⁻¹

Next tactic:
rwa [div_eq_mul_inv, inv_inv]
theorem div_lt_of_lt_mul' (h : a < b * c) : a / b < c :=
  div_lt_of_lt_mul <| by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a < b * c
⊢ a < c * b

Next tactic:
rwa [mul_comm]
theorem inv_le_iff_le_mul (h₁ : b = ∞ → a ≠ 0) (h₂ : a = ∞ → b ≠ 0) : a⁻¹ ≤ b ↔ 1 ≤ a * b := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a⁻¹ ≤ b ↔ 1 ≤ a * b

Next tactic:
rw [← one_div, ENNReal.div_le_iff_le_mul, mul_comm]
theorem inv_le_iff_le_mul (h₁ : b = ∞ → a ≠ 0) (h₂ : a = ∞ → b ≠ 0) : a⁻¹ ≤ b ↔ 1 ≤ a * b := by
  rw [← one_div, ENNReal.div_le_iff_le_mul, mul_comm]
  

Proof state:
case hb0
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a ≠ 0 ∨ b ≠ ⊤
case hbt α : Type u_1 β : Type u_2 a b c d : ℝ≥0∞ r p q : ℝ≥0 h₁ : b = ⊤ → a ≠ 0 h₂ : a = ⊤ → b ≠ 0 ⊢ a ≠ ⊤ ∨ b ≠ 0

Next tactic:
exacts [or_not_of_imp h₁, not_or_of_imp h₂]
@[simp 900]
theorem le_inv_iff_mul_le : a ≤ b⁻¹ ↔ a * b ≤ 1 := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a ≤ b⁻¹ ↔ a * b ≤ 1

Next tactic:
rw [← one_div, ENNReal.le_div_iff_mul_le]
@[simp 900]
theorem le_inv_iff_mul_le : a ≤ b⁻¹ ↔ a * b ≤ 1 := by
  rw [← one_div, ENNReal.le_div_iff_mul_le] <;>
    · 

Proof state:
case h0
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ b ≠ 0 ∨ 1 ≠ 0

Next tactic:
right
@[simp 900]
theorem le_inv_iff_mul_le : a ≤ b⁻¹ ↔ a * b ≤ 1 := by
  rw [← one_div, ENNReal.le_div_iff_mul_le] <;>
    · right
      

Proof state:
case h0.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 1 ≠ 0

Next tactic:
simp
@[simp 900]
theorem le_inv_iff_mul_le : a ≤ b⁻¹ ↔ a * b ≤ 1 := by
  rw [← one_div, ENNReal.le_div_iff_mul_le] <;>
    · 

Proof state:
case ht
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ b ≠ ⊤ ∨ 1 ≠ ⊤

Next tactic:
right
@[simp 900]
theorem le_inv_iff_mul_le : a ≤ b⁻¹ ↔ a * b ≤ 1 := by
  rw [← one_div, ENNReal.le_div_iff_mul_le] <;>
    · right
      

Proof state:
case ht.h
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 1 ≠ ⊤

Next tactic:
simp
protected theorem eq_inv_of_mul_eq_one_left (h : a * b = 1) : a = b⁻¹ := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a * b = 1
⊢ a = b⁻¹

Next tactic:
rw [← mul_one a, ← ENNReal.mul_inv_cancel (right_ne_zero_of_mul_eq_one h), ← mul_assoc, h,
    one_mul]
protected theorem eq_inv_of_mul_eq_one_left (h : a * b = 1) : a = b⁻¹ := by
  rw [← mul_one a, ← ENNReal.mul_inv_cancel (right_ne_zero_of_mul_eq_one h), ← mul_assoc, h,
    one_mul]
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a * b = 1
⊢ b ≠ ⊤

Next tactic:
rintro rfl
protected theorem eq_inv_of_mul_eq_one_left (h : a * b = 1) : a = b⁻¹ := by
  rw [← mul_one a, ← ENNReal.mul_inv_cancel (right_ne_zero_of_mul_eq_one h), ← mul_assoc, h,
    one_mul]
  rintro rfl
  

Proof state:
α : Type u_1
β : Type u_2
a c d : ℝ≥0∞
r p q : ℝ≥0
h : a * ⊤ = 1
⊢ False

Next tactic:
simp [left_ne_zero_of_mul_eq_one h] at h
theorem mul_le_iff_le_inv {a b r : ℝ≥0∞} (hr₀ : r ≠ 0) (hr₁ : r ≠ ∞) : r * a ≤ b ↔ a ≤ r⁻¹ * b := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r✝ p q : ℝ≥0
a b r : ℝ≥0∞
hr₀ : r ≠ 0
hr₁ : r ≠ ⊤
⊢ r * a ≤ b ↔ a ≤ r⁻¹ * b

Next tactic:
rw [← @ENNReal.mul_le_mul_left _ a _ hr₀ hr₁, ← mul_assoc, ENNReal.mul_inv_cancel hr₀ hr₁,
    one_mul]
/-- A variant of `le_inv_smul_iff` that holds for `ENNReal`. -/
protected theorem le_inv_smul_iff {a b : ℝ≥0∞} {r : ℝ≥0} (hr₀ : r ≠ 0) : a ≤ r⁻¹ • b ↔ r • a ≤ b :=
  by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r✝ p q : ℝ≥0
a b : ℝ≥0∞
r : ℝ≥0
hr₀ : r ≠ 0
⊢ a ≤ r⁻¹ • b ↔ r • a ≤ b

Next tactic:
simpa [hr₀, ENNReal.smul_def] using (mul_le_iff_le_inv (coe_ne_zero.mpr hr₀) coe_ne_top).symm
/-- A variant of `inv_smul_le_iff` that holds for `ENNReal`. -/
protected theorem inv_smul_le_iff {a b : ℝ≥0∞} {r : ℝ≥0} (hr₀ : r ≠ 0) : r⁻¹ • a ≤ b ↔ a ≤ r • b :=
  by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r✝ p q : ℝ≥0
a b : ℝ≥0∞
r : ℝ≥0
hr₀ : r ≠ 0
⊢ r⁻¹ • a ≤ b ↔ a ≤ r • b

Next tactic:
simpa only [inv_inv] using (ENNReal.le_inv_smul_iff (inv_ne_zero hr₀)).symm
theorem le_of_forall_nnreal_lt {x y : ℝ≥0∞} (h : ∀ r : ℝ≥0, ↑r < x → ↑r ≤ y) : x ≤ y := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
⊢ x ≤ y

Next tactic:
refine' le_of_forall_ge_of_dense fun r hr => _
theorem le_of_forall_nnreal_lt {x y : ℝ≥0∞} (h : ∀ r : ℝ≥0, ↑r < x → ↑r ≤ y) : x ≤ y := by
  refine' le_of_forall_ge_of_dense fun r hr => _
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
r : ℝ≥0∞
hr : r < x
⊢ r ≤ y

Next tactic:
lift r to ℝ≥0 using ne_top_of_lt hr
theorem le_of_forall_nnreal_lt {x y : ℝ≥0∞} (h : ∀ r : ℝ≥0, ↑r < x → ↑r ≤ y) : x ≤ y := by
  refine' le_of_forall_ge_of_dense fun r hr => _
  lift r to ℝ≥0 using ne_top_of_lt hr
  

Proof state:
case intro
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
x y : ℝ≥0∞
h : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y
r : ℝ≥0
hr : ↑r < x
⊢ ↑r ≤ y

Next tactic:
exact h r hr
theorem eq_div_iff (ha : a ≠ 0) (ha' : a ≠ ∞) : b = c / a ↔ a * b = c :=
  ⟨fun h => by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
h : b = c / a
⊢ a * b = c

Next tactic:
rw [h, ENNReal.mul_div_cancel' ha ha']
theorem eq_div_iff (ha : a ≠ 0) (ha' : a ≠ ∞) : b = c / a ↔ a * b = c :=
  ⟨fun h => by rw [h, ENNReal.mul_div_cancel' ha ha'], fun h => by
    

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
h : a * b = c
⊢ b = c / a

Next tactic:
rw [← h, mul_div_assoc, ENNReal.mul_div_cancel' ha ha']
protected theorem div_eq_div_iff (ha : a ≠ 0) (ha' : a ≠ ∞) (hb : b ≠ 0) (hb' : b ≠ ∞) :
    c / b = d / a ↔ a * c = b * d := by
  

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

Next tactic:
rw [eq_div_iff ha ha']
protected theorem div_eq_div_iff (ha : a ≠ 0) (ha' : a ≠ ∞) (hb : b ≠ 0) (hb' : b ≠ ∞) :
    c / b = d / a ↔ a * c = b * d := by
  rw [eq_div_iff ha ha']
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ a * (c / b) = d ↔ a * c = b * d

Next tactic:
conv_rhs => rw [eq_comm]
protected theorem div_eq_div_iff (ha : a ≠ 0) (ha' : a ≠ ∞) (hb : b ≠ 0) (hb' : b ≠ ∞) :
    c / b = d / a ↔ a * c = b * d := by
  rw [eq_div_iff ha ha']
  conv_rhs => 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
| a * c = b * d

Next tactic:
rw [eq_comm]
protected theorem div_eq_div_iff (ha : a ≠ 0) (ha' : a ≠ ∞) (hb : b ≠ 0) (hb' : b ≠ ∞) :
    c / b = d / a ↔ a * c = b * d := by
  rw [eq_div_iff ha ha']
  conv_rhs => rw [eq_comm]
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ 0
ha' : a ≠ ⊤
hb : b ≠ 0
hb' : b ≠ ⊤
⊢ a * (c / b) = d ↔ b * d = a * c

Next tactic:
rw [← eq_div_iff hb hb', mul_div_assoc, eq_comm]
theorem div_eq_one_iff {a b : ℝ≥0∞} (hb₀ : b ≠ 0) (hb₁ : b ≠ ∞) : a / b = 1 ↔ a = b :=
  ⟨fun h => by 

Proof state:
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a b : ℝ≥0∞
hb₀ : b ≠ 0
hb₁ : b ≠ ⊤
h : a / b = 1
⊢ a = b

Next tactic:
rw [← (eq_div_iff hb₀ hb₁).mp h.symm, mul_one]
theorem inv_two_add_inv_two : (2 : ℝ≥0∞)⁻¹ + 2⁻¹ = 1 := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 2⁻¹ + 2⁻¹ = 1

Next tactic:
rw [← two_mul, ← div_eq_mul_inv, ENNReal.div_self two_ne_zero two_ne_top]
theorem inv_three_add_inv_three : (3 : ℝ≥0∞)⁻¹ + 3⁻¹ + 3⁻¹ = 1 :=
  calc (3 : ℝ≥0∞)⁻¹ + 3⁻¹ + 3⁻¹ = 3 * 3⁻¹ := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 3⁻¹ + 3⁻¹ + 3⁻¹ = 3 * 3⁻¹

Next tactic:
ring
theorem inv_three_add_inv_three : (3 : ℝ≥0∞)⁻¹ + 3⁻¹ + 3⁻¹ = 1 :=
  calc (3 : ℝ≥0∞)⁻¹ + 3⁻¹ + 3⁻¹ = 3 * 3⁻¹ := by ring
  _ = 1 := ENNReal.mul_inv_cancel (Nat.cast_ne_zero.2 <| by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 3 ≠ 0

Next tactic:
decide
@[simp]
protected theorem add_halves (a : ℝ≥0∞) : a / 2 + a / 2 = a := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ a / 2 + a / 2 = a

Next tactic:
rw [div_eq_mul_inv, ← mul_add, inv_two_add_inv_two, mul_one]
@[simp]
theorem add_thirds (a : ℝ≥0∞) : a / 3 + a / 3 + a / 3 = a := by
  

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ a / 3 + a / 3 + a / 3 = a

Next tactic:
rw [div_eq_mul_inv, ← mul_add, ← mul_add, inv_three_add_inv_three, mul_one]
@[simp] theorem div_eq_zero_iff : a / b = 0 ↔ a = 0 ∨ b = ∞ := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a / b = 0 ↔ a = 0 ∨ b = ⊤

Next tactic:
simp [div_eq_mul_inv]
@[simp] theorem div_pos_iff : 0 < a / b ↔ a ≠ 0 ∧ b ≠ ∞ := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 0 < a / b ↔ a ≠ 0 ∧ b ≠ ⊤

Next tactic:
simp [pos_iff_ne_zero, not_or]
protected theorem half_pos (h : a ≠ 0) : 0 < a / 2 := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≠ 0
⊢ 0 < a / 2

Next tactic:
simp only [div_pos_iff, ne_eq, h, not_false_eq_true, two_ne_top, and_self]
protected theorem half_lt_self (hz : a ≠ 0) (ht : a ≠ ∞) : a / 2 < a := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hz : a ≠ 0
ht : a ≠ ⊤
⊢ a / 2 < a

Next tactic:
lift a to ℝ≥0 using ht
protected theorem half_lt_self (hz : a ≠ 0) (ht : a ≠ ∞) : a / 2 < a := by
  lift a to ℝ≥0 using ht
  

Proof state:
case intro
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q a : ℝ≥0
hz : ↑a ≠ 0
⊢ ↑a / 2 < ↑a

Next tactic:
rw [coe_ne_zero] at hz
protected theorem half_lt_self (hz : a ≠ 0) (ht : a ≠ ∞) : a / 2 < a := by
  lift a to ℝ≥0 using ht
  rw [coe_ne_zero] at hz
  

Proof state:
case intro
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q a : ℝ≥0
hz : a ≠ 0
⊢ ↑a / 2 < ↑a

Next tactic:
rw [← coe_two, ← coe_div, coe_lt_coe]
protected theorem half_lt_self (hz : a ≠ 0) (ht : a ≠ ∞) : a / 2 < a := by
  lift a to ℝ≥0 using ht
  rw [coe_ne_zero] at hz
  rw [← coe_two, ← coe_div, coe_lt_coe]
  

Proof state:
case intro
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q a : ℝ≥0
hz : a ≠ 0
⊢ a / 2 < a
case intro α : Type u_1 β : Type u_2 b c d : ℝ≥0∞ r p q a : ℝ≥0 hz : a ≠ 0 ⊢ 2 ≠ 0

Next tactic:
exacts [NNReal.half_lt_self hz, two_ne_zero' _]
theorem sub_half (h : a ≠ ∞) : a - a / 2 = a / 2 := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≠ ⊤
⊢ a - a / 2 = a / 2

Next tactic:
lift a to ℝ≥0 using h
theorem sub_half (h : a ≠ ∞) : a - a / 2 = a / 2 := by
  lift a to ℝ≥0 using h
  

Proof state:
case intro
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q a : ℝ≥0
⊢ ↑a - ↑a / 2 = ↑a / 2

Next tactic:
exact sub_eq_of_add_eq (mul_ne_top coe_ne_top <| by simp) (ENNReal.add_halves a)
theorem sub_half (h : a ≠ ∞) : a - a / 2 = a / 2 := by
  lift a to ℝ≥0 using h
  exact sub_eq_of_add_eq (mul_ne_top coe_ne_top <| by 

Proof state:
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q a : ℝ≥0
⊢ 2⁻¹ ≠ ⊤

Next tactic:
simp
@[simp]
theorem one_sub_inv_two : (1 : ℝ≥0∞) - 2⁻¹ = 2⁻¹ := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 1 - 2⁻¹ = 2⁻¹

Next tactic:
simpa only [div_eq_mul_inv, one_mul] using sub_half one_ne_top
/-- The birational order isomorphism between `ℝ≥0∞` and the unit interval `Set.Iic (1 : ℝ≥0∞)`. -/
@[simps! apply_coe]
def orderIsoIicOneBirational : ℝ≥0∞ ≃o Iic (1 : ℝ≥0∞) := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ ℝ≥0∞ ≃o ↑(Iic 1)

Next tactic:
refine StrictMono.orderIsoOfRightInverse
    (fun x => ⟨(x⁻¹ + 1)⁻¹, ENNReal.inv_le_one.2 <| le_add_self⟩)
    (fun x y hxy => ?_) (fun x => (x.1⁻¹ - 1)⁻¹) fun x => Subtype.ext ?_
/-- The birational order isomorphism between `ℝ≥0∞` and the unit interval `Set.Iic (1 : ℝ≥0∞)`. -/
@[simps! apply_coe]
def orderIsoIicOneBirational : ℝ≥0∞ ≃o Iic (1 : ℝ≥0∞) := by
  refine StrictMono.orderIsoOfRightInverse
    (fun x => ⟨(x⁻¹ + 1)⁻¹, ENNReal.inv_le_one.2 <| le_add_self⟩)
    (fun x y hxy => ?_) (fun x => (x.1⁻¹ - 1)⁻¹) fun x => Subtype.ext ?_
  · 

Proof state:
case refine_1
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y : ℝ≥0∞
hxy : x < y
⊢ (fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) x <
    (fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) y

Next tactic:
simpa only [Subtype.mk_lt_mk, ENNReal.inv_lt_inv, ENNReal.add_lt_add_iff_right one_ne_top]
/-- The birational order isomorphism between `ℝ≥0∞` and the unit interval `Set.Iic (1 : ℝ≥0∞)`. -/
@[simps! apply_coe]
def orderIsoIicOneBirational : ℝ≥0∞ ≃o Iic (1 : ℝ≥0∞) := by
  refine StrictMono.orderIsoOfRightInverse
    (fun x => ⟨(x⁻¹ + 1)⁻¹, ENNReal.inv_le_one.2 <| le_add_self⟩)
    (fun x y hxy => ?_) (fun x => (x.1⁻¹ - 1)⁻¹) fun x => Subtype.ext ?_
  · simpa only [Subtype.mk_lt_mk, ENNReal.inv_lt_inv, ENNReal.add_lt_add_iff_right one_ne_top]
  · 

Proof state:
case refine_2
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ↑(Iic 1)
⊢ ↑((fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) ((fun x => ((↑x)⁻¹ - 1)⁻¹) x)) = ↑x

Next tactic:
have : (1 : ℝ≥0∞) ≤ x.1⁻¹ := ENNReal.one_le_inv.2 x.2
/-- The birational order isomorphism between `ℝ≥0∞` and the unit interval `Set.Iic (1 : ℝ≥0∞)`. -/
@[simps! apply_coe]
def orderIsoIicOneBirational : ℝ≥0∞ ≃o Iic (1 : ℝ≥0∞) := by
  refine StrictMono.orderIsoOfRightInverse
    (fun x => ⟨(x⁻¹ + 1)⁻¹, ENNReal.inv_le_one.2 <| le_add_self⟩)
    (fun x y hxy => ?_) (fun x => (x.1⁻¹ - 1)⁻¹) fun x => Subtype.ext ?_
  · simpa only [Subtype.mk_lt_mk, ENNReal.inv_lt_inv, ENNReal.add_lt_add_iff_right one_ne_top]
  · have : (1 : ℝ≥0∞) ≤ x.1⁻¹ := ENNReal.one_le_inv.2 x.2
    

Proof state:
case refine_2
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ↑(Iic 1)
this : 1 ≤ (↑x)⁻¹
⊢ ↑((fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) ((fun x => ((↑x)⁻¹ - 1)⁻¹) x)) = ↑x

Next tactic:
simp only [inv_inv, Subtype.coe_mk, tsub_add_cancel_of_le this]