l3lab/ntp-mathlib huggingface dataset:
theorem coe_inv_le : (↑r⁻¹ : ℝ≥0∞) ≤ (↑r)⁻¹ :=
  le_sInf fun b (hb : 1 ≤ ↑r * b) =>
    coe_le_iff.2 <| by
      

Proof state:
α : Type u_1
β : Type u_2
a b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ≥0∞
hb : 1 ≤ ↑r * b
⊢ ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p

Next tactic:
rintro b rfl
theorem coe_inv_le : (↑r⁻¹ : ℝ≥0∞) ≤ (↑r)⁻¹ :=
  le_sInf fun b (hb : 1 ≤ ↑r * b) =>
    coe_le_iff.2 <| by
      rintro b rfl
      

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

Next tactic:
apply NNReal.inv_le_of_le_mul
theorem coe_inv_le : (↑r⁻¹ : ℝ≥0∞) ≤ (↑r)⁻¹ :=
  le_sInf fun b (hb : 1 ≤ ↑r * b) =>
    coe_le_iff.2 <| by
      rintro b rfl
      apply NNReal.inv_le_of_le_mul
      

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

Next tactic:
rwa [← coe_mul, ← coe_one, coe_le_coe] at hb
@[simp, norm_cast]
theorem coe_inv (hr : r ≠ 0) : (↑r⁻¹ : ℝ≥0∞) = (↑r)⁻¹ :=
  coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by 

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

Next tactic:
rw [← coe_mul, mul_inv_cancel hr, coe_one]
@[norm_cast]
theorem coe_inv_two : ((2⁻¹ : ℝ≥0) : ℝ≥0∞) = 2⁻¹ := by 

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

Next tactic:
rw [coe_inv _root_.two_ne_zero, coe_two]
@[simp, norm_cast]
theorem coe_div (hr : r ≠ 0) : (↑(p / r) : ℝ≥0∞) = p / r := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
hr : r ≠ 0
⊢ ↑(p / r) = ↑p / ↑r

Next tactic:
rw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr]
theorem div_zero (h : a ≠ 0) : a / 0 = ∞ := by 

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

Next tactic:
simp [div_eq_mul_inv, h]
instance : DivInvOneMonoid ℝ≥0∞ :=
  { inferInstanceAs (DivInvMonoid ℝ≥0∞) with
    inv_one := by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
src✝ : DivInvMonoid ℝ≥0∞ := inferInstanceAs (DivInvMonoid ℝ≥0∞)
⊢ 1⁻¹ = 1

Next tactic:
simpa only [coe_inv one_ne_zero, coe_one] using coe_eq_coe.2 inv_one
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ : ℝ≥0∞
⊢ (x✝ ^ 0)⁻¹ = x✝⁻¹ ^ 0

Next tactic:
simp only [pow_zero, inv_one]
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by simp only [pow_zero, inv_one]
  | ⊤, n + 1 => by 

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
n : ℕ
⊢ (⊤ ^ (n + 1))⁻¹ = ⊤⁻¹ ^ (n + 1)

Next tactic:
simp [top_pow]
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by simp only [pow_zero, inv_one]
  | ⊤, n + 1 => by simp [top_pow]
  | (a : ℝ≥0), n + 1 => by
    

Proof state:
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a : ℝ≥0
n : ℕ
⊢ (↑a ^ (n + 1))⁻¹ = (↑a)⁻¹ ^ (n + 1)

Next tactic:
rcases eq_or_ne a 0 with (rfl | ha)
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by simp only [pow_zero, inv_one]
  | ⊤, n + 1 => by simp [top_pow]
  | (a : ℝ≥0), n + 1 => by
    rcases eq_or_ne a 0 with (rfl | ha)
    · 

Proof state:
case inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
n : ℕ
⊢ (↑0 ^ (n + 1))⁻¹ = (↑0)⁻¹ ^ (n + 1)

Next tactic:
simp [top_pow]
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by simp only [pow_zero, inv_one]
  | ⊤, n + 1 => by simp [top_pow]
  | (a : ℝ≥0), n + 1 => by
    rcases eq_or_ne a 0 with (rfl | ha)
    · simp [top_pow]
    · 

Proof state:
case inr
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a : ℝ≥0
n : ℕ
ha : a ≠ 0
⊢ (↑a ^ (n + 1))⁻¹ = (↑a)⁻¹ ^ (n + 1)

Next tactic:
have := pow_ne_zero (n + 1) ha
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by simp only [pow_zero, inv_one]
  | ⊤, n + 1 => by simp [top_pow]
  | (a : ℝ≥0), n + 1 => by
    rcases eq_or_ne a 0 with (rfl | ha)
    · simp [top_pow]
    · have := pow_ne_zero (n + 1) ha
      

Proof state:
case inr
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a : ℝ≥0
n : ℕ
ha : a ≠ 0
this : a ^ (n + 1) ≠ 0
⊢ (↑a ^ (n + 1))⁻¹ = (↑a)⁻¹ ^ (n + 1)

Next tactic:
norm_cast
protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n
  | _, 0 => by simp only [pow_zero, inv_one]
  | ⊤, n + 1 => by simp [top_pow]
  | (a : ℝ≥0), n + 1 => by
    rcases eq_or_ne a 0 with (rfl | ha)
    · simp [top_pow]
    · have := pow_ne_zero (n + 1) ha
      norm_cast
      

Proof state:
case inr
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a : ℝ≥0
n : ℕ
ha : a ≠ 0
this : a ^ (n + 1) ≠ 0
⊢ (a ^ (n + 1))⁻¹ = a⁻¹ ^ (n + 1)

Next tactic:
rw [inv_pow]
protected theorem mul_inv_cancel (h0 : a ≠ 0) (ht : a ≠ ∞) : a * a⁻¹ = 1 := by
  

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

Next tactic:
lift a to ℝ≥0 using ht
protected theorem mul_inv_cancel (h0 : a ≠ 0) (ht : a ≠ ∞) : a * a⁻¹ = 1 := 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
h0 : ↑a ≠ 0
⊢ ↑a * (↑a)⁻¹ = 1

Next tactic:
norm_cast at h0
protected theorem mul_inv_cancel (h0 : a ≠ 0) (ht : a ≠ ∞) : a * a⁻¹ = 1 := by
  lift a to ℝ≥0 using ht
  norm_cast at h0; 

Proof state:
case intro
α : Type u_1
β : Type u_2
b c d : ℝ≥0∞
r p q a : ℝ≥0
h0 : ¬a = 0
⊢ ↑a * (↑a)⁻¹ = 1

Next tactic:
norm_cast
protected theorem mul_inv_cancel (h0 : a ≠ 0) (ht : a ≠ ∞) : a * a⁻¹ = 1 := by
  lift a to ℝ≥0 using ht
  norm_cast at h0; norm_cast
  

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

Next tactic:
exact mul_inv_cancel h0
protected theorem div_mul_cancel (h0 : a ≠ 0) (hI : a ≠ ∞) : b / a * a = b := by
  

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

Next tactic:
rw [div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel h0 hI, mul_one]
protected theorem mul_div_cancel' (h0 : a ≠ 0) (hI : a ≠ ∞) : a * (b / a) = b := by
  

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

Next tactic:
rw [mul_comm, ENNReal.div_mul_cancel h0 hI]
protected theorem mul_comm_div : a / b * c = a * (c / b) := by
  

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

Next tactic:
simp only [div_eq_mul_inv, mul_right_comm, ← mul_assoc]
protected theorem mul_div_right_comm : a * b / c = a / c * b := by
  

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

Next tactic:
simp only [div_eq_mul_inv, mul_right_comm]
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    

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

Next tactic:
by_cases a = 0
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    by_cases a = 0 <;> 

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

Next tactic:
cases a
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    by_cases a = 0 <;> 

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

Next tactic:
cases a
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    by_cases a = 0 <;> cases a <;> 

Proof state:
case pos.none
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h✝ : none = 0
⊢ none⁻¹⁻¹ = none

Next tactic:
simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    by_cases a = 0 <;> cases a <;> 

Proof state:
case pos.some
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q val✝ : ℝ≥0
h✝ : some val✝ = 0
⊢ (some val✝)⁻¹⁻¹ = some val✝

Next tactic:
simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    by_cases a = 0 <;> cases a <;> 

Proof state:
case neg.none
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h✝ : ¬none = 0
⊢ none⁻¹⁻¹ = none

Next tactic:
simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]
instance : InvolutiveInv ℝ≥0∞ where
  inv_inv a := by
    by_cases a = 0 <;> cases a <;> 

Proof state:
case neg.some
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q val✝ : ℝ≥0
h✝ : ¬some val✝ = 0
⊢ (some val✝)⁻¹⁻¹ = some val✝

Next tactic:
simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]
theorem inv_ne_top : a⁻¹ ≠ ∞ ↔ a ≠ 0 := by 

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

Next tactic:
simp
@[simp]
theorem inv_lt_top {x : ℝ≥0∞} : x⁻¹ < ∞ ↔ 0 < x := by
  

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

Next tactic:
simp only [lt_top_iff_ne_top, inv_ne_top, pos_iff_ne_zero]
protected theorem inv_ne_zero : a⁻¹ ≠ 0 ↔ a ≠ ∞ := by 

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

Next tactic:
simp
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  

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

Next tactic:
induction' b using recTopCoe with b
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · 

Proof state:
case top
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
ha : a ≠ 0 ∨ ⊤ ≠ ⊤
hb : a ≠ ⊤ ∨ ⊤ ≠ 0
⊢ (a * ⊤)⁻¹ = a⁻¹ * ⊤⁻¹

Next tactic:
replace ha : a ≠ 0 := ha.neg_resolve_right rfl
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    

Proof state:
case top
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
hb : a ≠ ⊤ ∨ ⊤ ≠ 0
ha : a ≠ 0
⊢ (a * ⊤)⁻¹ = a⁻¹ * ⊤⁻¹

Next tactic:
simp [ha]
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  

Proof state:
case coe
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
b : ℝ≥0
ha : a ≠ 0 ∨ ↑b ≠ ⊤
hb : a ≠ ⊤ ∨ ↑b ≠ 0
⊢ (a * ↑b)⁻¹ = a⁻¹ * (↑b)⁻¹

Next tactic:
induction' a using recTopCoe with a
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · 

Proof state:
case coe.top
α : Type u_1
β : Type u_2
a b✝ c d : ℝ≥0∞
r p q b : ℝ≥0
ha : ⊤ ≠ 0 ∨ ↑b ≠ ⊤
hb : ⊤ ≠ ⊤ ∨ ↑b ≠ 0
⊢ (⊤ * ↑b)⁻¹ = ⊤⁻¹ * (↑b)⁻¹

Next tactic:
replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    

Proof state:
case coe.top
α : Type u_1
β : Type u_2
a b✝ c d : ℝ≥0∞
r p q b : ℝ≥0
ha : ⊤ ≠ 0 ∨ ↑b ≠ ⊤
hb : b ≠ 0
⊢ (⊤ * ↑b)⁻¹ = ⊤⁻¹ * (↑b)⁻¹

Next tactic:
simp [hb]
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    simp [hb]
  

Proof state:
case coe.coe
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑a ≠ ⊤ ∨ ↑b ≠ 0
⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹

Next tactic:
by_cases h'a : a = 0
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    simp [hb]
  by_cases h'a : a = 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑a ≠ ⊤ ∨ ↑b ≠ 0
h'a : a = 0
⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹

Next tactic:
simp only [h'a, top_mul, ENNReal.inv_zero, ENNReal.coe_ne_top, zero_mul, Ne.def,
      not_false_iff, ENNReal.coe_zero, ENNReal.inv_eq_zero]
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    simp [hb]
  by_cases h'a : a = 0
  · simp only [h'a, top_mul, ENNReal.inv_zero, ENNReal.coe_ne_top, zero_mul, Ne.def,
      not_false_iff, ENNReal.coe_zero, ENNReal.inv_eq_zero]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑a ≠ ⊤ ∨ ↑b ≠ 0
h'a : ¬a = 0
⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹

Next tactic:
by_cases h'b : b = 0
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    simp [hb]
  by_cases h'a : a = 0
  · simp only [h'a, top_mul, ENNReal.inv_zero, ENNReal.coe_ne_top, zero_mul, Ne.def,
      not_false_iff, ENNReal.coe_zero, ENNReal.inv_eq_zero]
  by_cases h'b : b = 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑a ≠ ⊤ ∨ ↑b ≠ 0
h'a : ¬a = 0
h'b : b = 0
⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹

Next tactic:
simp only [h'b, ENNReal.inv_zero, ENNReal.coe_ne_top, mul_top, Ne.def, not_false_iff,
      mul_zero, ENNReal.coe_zero, ENNReal.inv_eq_zero]
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    simp [hb]
  by_cases h'a : a = 0
  · simp only [h'a, top_mul, ENNReal.inv_zero, ENNReal.coe_ne_top, zero_mul, Ne.def,
      not_false_iff, ENNReal.coe_zero, ENNReal.inv_eq_zero]
  by_cases h'b : b = 0
  · simp only [h'b, ENNReal.inv_zero, ENNReal.coe_ne_top, mul_top, Ne.def, not_false_iff,
      mul_zero, ENNReal.coe_zero, ENNReal.inv_eq_zero]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑a ≠ ⊤ ∨ ↑b ≠ 0
h'a : ¬a = 0
h'b : ¬b = 0
⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹

Next tactic:
rw [← ENNReal.coe_mul, ← ENNReal.coe_inv, ← ENNReal.coe_inv h'a, ← ENNReal.coe_inv h'b, ←
    ENNReal.coe_mul, mul_inv_rev, mul_comm]
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
    (a * b)⁻¹ = a⁻¹ * b⁻¹ := by
  induction' b using recTopCoe with b
  · replace ha : a ≠ 0 := ha.neg_resolve_right rfl
    simp [ha]
  induction' a using recTopCoe with a
  · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
    simp [hb]
  by_cases h'a : a = 0
  · simp only [h'a, top_mul, ENNReal.inv_zero, ENNReal.coe_ne_top, zero_mul, Ne.def,
      not_false_iff, ENNReal.coe_zero, ENNReal.inv_eq_zero]
  by_cases h'b : b = 0
  · simp only [h'b, ENNReal.inv_zero, ENNReal.coe_ne_top, mul_top, Ne.def, not_false_iff,
      mul_zero, ENNReal.coe_zero, ENNReal.inv_eq_zero]
  rw [← ENNReal.coe_mul, ← ENNReal.coe_inv, ← ENNReal.coe_inv h'a, ← ENNReal.coe_inv h'b, ←
    ENNReal.coe_mul, mul_inv_rev, mul_comm]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑a ≠ ⊤ ∨ ↑b ≠ 0
h'a : ¬a = 0
h'b : ¬b = 0
⊢ a * b ≠ 0

Next tactic:
simp [h'a, h'b]
protected theorem mul_div_mul_left (a b : ℝ≥0∞) (hc : c ≠ 0) (hc' : c ≠ ⊤) :
    c * a / (c * b) = a / b := by
  

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

Next tactic:
rw [div_eq_mul_inv, div_eq_mul_inv, ENNReal.mul_inv (Or.inl hc) (Or.inl hc'), mul_mul_mul_comm,
    ENNReal.mul_inv_cancel hc hc', one_mul]
protected theorem mul_div_mul_right (a b : ℝ≥0∞) (hc : c ≠ 0) (hc' : c ≠ ⊤) :
    a * c / (b * c) = a / b := by
  

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

Next tactic:
rw [div_eq_mul_inv, div_eq_mul_inv, ENNReal.mul_inv (Or.inr hc') (Or.inr hc), mul_mul_mul_comm,
    ENNReal.mul_inv_cancel hc hc', mul_one]
protected theorem sub_div (h : 0 < b → b < a → c ≠ 0) : (a - b) / c = a / c - b / c := by
  

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

Next tactic:
simp_rw [div_eq_mul_inv]
protected theorem sub_div (h : 0 < b → b < a → c ≠ 0) : (a - b) / c = a / c - b / c := by
  simp_rw [div_eq_mul_inv]
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ 0
⊢ (a - b) * c⁻¹ = a * c⁻¹ - b * c⁻¹

Next tactic:
exact ENNReal.sub_mul (by simpa using h)
protected theorem sub_div (h : 0 < b → b < a → c ≠ 0) : (a - b) / c = a / c - b / c := by
  simp_rw [div_eq_mul_inv]
  exact ENNReal.sub_mul (by 

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

Next tactic:
simpa using h
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  

Proof state:
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ StrictAnti Inv.inv

Next tactic:
intro a b h
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  

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

Next tactic:
lift a to ℝ≥0 using h.ne_top
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  

Proof state:
case intro
α : Type u_1
β : Type u_2
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ≥0∞
a : ℝ≥0
h : ↑a < b
⊢ b⁻¹ < (↑a)⁻¹

Next tactic:
induction b using recTopCoe
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  induction b using recTopCoe; · 

Proof state:
case intro.top
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a : ℝ≥0
h : ↑a < ⊤
⊢ ⊤⁻¹ < (↑a)⁻¹

Next tactic:
simp
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  induction b using recTopCoe; · simp
  

Proof state:
case intro.coe
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a x✝ : ℝ≥0
h : ↑a < ↑x✝
⊢ (↑x✝)⁻¹ < (↑a)⁻¹

Next tactic:
rw [coe_lt_coe] at h
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  induction b using recTopCoe; · simp
  rw [coe_lt_coe] at h
  

Proof state:
case intro.coe
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a x✝ : ℝ≥0
h : a < x✝
⊢ (↑x✝)⁻¹ < (↑a)⁻¹

Next tactic:
rcases eq_or_ne a 0 with (rfl | ha)
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  induction b using recTopCoe; · simp
  rw [coe_lt_coe] at h
  rcases eq_or_ne a 0 with (rfl | ha); · 

Proof state:
case intro.coe.inl
α : Type u_1
β : Type u_2
a b c d : ℝ≥0∞
r p q x✝ : ℝ≥0
h : 0 < x✝
⊢ (↑x✝)⁻¹ < (↑0)⁻¹

Next tactic:
simp [h]
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  induction b using recTopCoe; · simp
  rw [coe_lt_coe] at h
  rcases eq_or_ne a 0 with (rfl | ha); · simp [h]
  

Proof state:
case intro.coe.inr
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a x✝ : ℝ≥0
h : a < x✝
ha : a ≠ 0
⊢ (↑x✝)⁻¹ < (↑a)⁻¹

Next tactic:
rw [← coe_inv h.ne_bot, ← coe_inv ha, coe_lt_coe]
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞) := by
  intro a b h
  lift a to ℝ≥0 using h.ne_top
  induction b using recTopCoe; · simp
  rw [coe_lt_coe] at h
  rcases eq_or_ne a 0 with (rfl | ha); · simp [h]
  rw [← coe_inv h.ne_bot, ← coe_inv ha, coe_lt_coe]
  

Proof state:
case intro.coe.inr
α : Type u_1
β : Type u_2
a✝ b c d : ℝ≥0∞
r p q a x✝ : ℝ≥0
h : a < x✝
ha : a ≠ 0
⊢ x✝⁻¹ < a⁻¹

Next tactic:
exact NNReal.inv_lt_inv ha h
theorem inv_lt_iff_inv_lt : a⁻¹ < b ↔ b⁻¹ < a := by
  

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

Next tactic:
simpa only [inv_inv] using @ENNReal.inv_lt_inv a b⁻¹
theorem lt_inv_iff_lt_inv : a < b⁻¹ ↔ b < a⁻¹ := by
  

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

Next tactic:
simpa only [inv_inv] using @ENNReal.inv_lt_inv a⁻¹ b
theorem inv_le_iff_inv_le : a⁻¹ ≤ b ↔ b⁻¹ ≤ a := by
  

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

Next tactic:
simpa only [inv_inv] using @ENNReal.inv_le_inv a b⁻¹
theorem le_inv_iff_le_inv : a ≤ b⁻¹ ↔ b ≤ a⁻¹ := by
  

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

Next tactic:
simpa only [inv_inv] using @ENNReal.inv_le_inv a⁻¹ b
@[simp]
protected theorem inv_le_one : a⁻¹ ≤ 1 ↔ 1 ≤ a := by 

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

Next tactic:
rw [inv_le_iff_inv_le, inv_one]
protected theorem one_le_inv : 1 ≤ a⁻¹ ↔ a ≤ 1 := by 

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

Next tactic:
rw [le_inv_iff_le_inv, inv_one]
@[simp]
protected theorem inv_lt_one : a⁻¹ < 1 ↔ 1 < a := by 

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

Next tactic:
rw [inv_lt_iff_inv_lt, inv_one]
@[simp]
protected theorem one_lt_inv : 1 < a⁻¹ ↔ a < 1 := by 

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

Next tactic:
rw [lt_inv_iff_lt_inv, inv_one]
@[simp] theorem div_top : a / ∞ = 0 := by 

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

Next tactic:
rw [div_eq_mul_inv, inv_top, mul_zero]
theorem top_div : ∞ / a = if a = ∞ then 0 else ∞ := by 

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

Next tactic:
simp [div_eq_mul_inv, top_mul']
theorem top_div_of_ne_top (h : a ≠ ∞) : ∞ / a = ∞ := by 

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

Next tactic:
simp [top_div, h]
theorem div_eq_top : a / b = ∞ ↔ a ≠ 0 ∧ b = 0 ∨ a = ∞ ∧ b ≠ ∞ := by
  

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

Next tactic:
simp [div_eq_mul_inv, ENNReal.mul_eq_top]
protected theorem le_div_iff_mul_le (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) :
    a ≤ c / b ↔ a * b ≤ c := by
  

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

Next tactic:
induction' b using recTopCoe with b
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
  · 

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

Next tactic:
lift c to ℝ≥0 using ht.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
    

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 ≤ ↑c / ⊤ ↔ a * ⊤ ≤ ↑c

Next tactic:
rw [div_top, nonpos_iff_eq_zero]