l3lab/ntp-mathlib huggingface dataset:
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => x - a := by
  by_cases a_infty : a = ∞
  · simp [a_infty, continuous_const]
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_infty : ¬a = ⊤
⊢ Continuous fun x => x - a

Next tactic:
rw [show (fun x => x - a) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨x, a⟩ by rfl]
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => x - a := by
  by_cases a_infty : a = ∞
  · simp [a_infty, continuous_const]
  · rw [show (fun x => x - a) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨x, a⟩ by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_infty : ¬a = ⊤
⊢ (fun x => x - a) = (fun p => p.1 - p.2) ∘ fun x => (x, a)

Next tactic:
rfl
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => x - a := by
  by_cases a_infty : a = ∞
  · simp [a_infty, continuous_const]
  · rw [show (fun x => x - a) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨x, a⟩ by rfl]
    

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_infty : ¬a = ⊤
⊢ Continuous ((fun p => p.1 - p.2) ∘ fun x => (x, a))

Next tactic:
apply ContinuousOn.comp_continuous continuousOn_sub (continuous_id'.prod_mk continuous_const)
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => x - a := by
  by_cases a_infty : a = ∞
  · simp [a_infty, continuous_const]
  · rw [show (fun x => x - a) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨x, a⟩ by rfl]
    apply ContinuousOn.comp_continuous continuousOn_sub (continuous_id'.prod_mk continuous_const)
    

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_infty : ¬a = ⊤
⊢ ∀ (x : ℝ≥0∞), (x, a) ∈ {p | p ≠ (⊤, ⊤)}

Next tactic:
intro x
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => x - a := by
  by_cases a_infty : a = ∞
  · simp [a_infty, continuous_const]
  · rw [show (fun x => x - a) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨x, a⟩ by rfl]
    apply ContinuousOn.comp_continuous continuousOn_sub (continuous_id'.prod_mk continuous_const)
    intro x
    

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_infty : ¬a = ⊤
x : ℝ≥0∞
⊢ (x, a) ∈ {p | p ≠ (⊤, ⊤)}

Next tactic:
simp only [a_infty, Ne.def, mem_setOf_eq, Prod.mk.inj_iff, and_false_iff, not_false_iff]
theorem le_of_forall_lt_one_mul_le {x y : ℝ≥0∞} (h : ∀ a < 1, a * x ≤ y) : x ≤ y := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y✝ z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
x y : ℝ≥0∞
h : ∀ a < 1, a * x ≤ y
⊢ x ≤ y

Next tactic:
have : Tendsto (· * x) (𝓝[<] 1) (𝓝 (1 * x)) :=
    (ENNReal.continuousAt_mul_const (Or.inr one_ne_zero)).mono_left inf_le_left
theorem le_of_forall_lt_one_mul_le {x y : ℝ≥0∞} (h : ∀ a < 1, a * x ≤ y) : x ≤ y := by
  have : Tendsto (· * x) (𝓝[<] 1) (𝓝 (1 * x)) :=
    (ENNReal.continuousAt_mul_const (Or.inr one_ne_zero)).mono_left inf_le_left
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y✝ z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
x y : ℝ≥0∞
h : ∀ a < 1, a * x ≤ y
this : Tendsto (fun x_1 => x_1 * x) (𝓝[<] 1) (𝓝 (1 * x))
⊢ x ≤ y

Next tactic:
rw [one_mul] at this
theorem le_of_forall_lt_one_mul_le {x y : ℝ≥0∞} (h : ∀ a < 1, a * x ≤ y) : x ≤ y := by
  have : Tendsto (· * x) (𝓝[<] 1) (𝓝 (1 * x)) :=
    (ENNReal.continuousAt_mul_const (Or.inr one_ne_zero)).mono_left inf_le_left
  rw [one_mul] at this
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y✝ z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
x y : ℝ≥0∞
h : ∀ a < 1, a * x ≤ y
this : Tendsto (fun x_1 => x_1 * x) (𝓝[<] 1) (𝓝 x)
⊢ x ≤ y

Next tactic:
exact le_of_tendsto this (eventually_nhdsWithin_iff.2 <| eventually_of_forall h)
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : a = ⊤ ∧ ⨅ i, f i = 0
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
rcases h H.1 H.2 with ⟨i, hi⟩
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : a = ⊤ ∧ ⨅ i, f i = 0
i : ι
hi : f i = 0
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : a = ⊤ ∧ ⨅ i, f i = 0
i : ι
hi : f i = 0
⊢ ∀ b > ⊥, ∃ i, a * f i < b

Next tactic:
exact fun b hb => ⟨i, by rwa [hi, mul_zero, ← bot_eq_zero]⟩
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    exact fun b hb => ⟨i, by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : a = ⊤ ∧ ⨅ i, f i = 0
i : ι
hi : f i = 0
b : ℝ≥0∞
hb : b > ⊥
⊢ a * f i < b

Next tactic:
rwa [hi, mul_zero, ← bot_eq_zero]
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    exact fun b hb => ⟨i, by rwa [hi, mul_zero, ← bot_eq_zero]⟩
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : ¬(a = ⊤ ∧ ⨅ i, f i = 0)
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
rw [not_and_or] at H
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    exact fun b hb => ⟨i, by rwa [hi, mul_zero, ← bot_eq_zero]⟩
  · rw [not_and_or] at H
    

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : ¬a = ⊤ ∨ ¬⨅ i, f i = 0
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
cases isEmpty_or_nonempty ι
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    exact fun b hb => ⟨i, by rwa [hi, mul_zero, ← bot_eq_zero]⟩
  · rw [not_and_or] at H
    cases isEmpty_or_nonempty ι
    · 

Proof state:
case neg.inl
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : ¬a = ⊤ ∨ ¬⨅ i, f i = 0
h✝ : IsEmpty ι
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
rw [iInf_of_empty, iInf_of_empty, mul_top]
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    exact fun b hb => ⟨i, by rwa [hi, mul_zero, ← bot_eq_zero]⟩
  · rw [not_and_or] at H
    cases isEmpty_or_nonempty ι
    · rw [iInf_of_empty, iInf_of_empty, mul_top]
      

Proof state:
case neg.inl
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : ¬a = ⊤ ∨ ¬⨅ i, f i = 0
h✝ : IsEmpty ι
⊢ a ≠ 0

Next tactic:
exact mt h0 (not_nonempty_iff.2 ‹_›)
theorem iInf_mul_left' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, a * f i = a * ⨅ i, f i := by
  by_cases H : a = ⊤ ∧ ⨅ i, f i = 0
  · rcases h H.1 H.2 with ⟨i, hi⟩
    rw [H.2, mul_zero, ← bot_eq_zero, iInf_eq_bot]
    exact fun b hb => ⟨i, by rwa [hi, mul_zero, ← bot_eq_zero]⟩
  · rw [not_and_or] at H
    cases isEmpty_or_nonempty ι
    · rw [iInf_of_empty, iInf_of_empty, mul_top]
      exact mt h0 (not_nonempty_iff.2 ‹_›)
    · 

Proof state:
case neg.inr
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
H : ¬a = ⊤ ∨ ¬⨅ i, f i = 0
h✝ : Nonempty ι
⊢ ⨅ i, a * f i = a * ⨅ i, f i

Next tactic:
exact (ENNReal.mul_left_mono.map_iInf_of_continuousAt'
        (ENNReal.continuousAt_const_mul H)).symm
theorem iInf_mul_right' {ι} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} (h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)
    (h0 : a = 0 → Nonempty ι) : ⨅ i, f i * a = (⨅ i, f i) * a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f : ι → ℝ≥0∞
a : ℝ≥0∞
h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0
h0 : a = 0 → Nonempty ι
⊢ ⨅ i, f i * a = (⨅ i, f i) * a

Next tactic:
simpa only [mul_comm a] using iInf_mul_left' h h0
@[simp] -- porting note: todo: generalize to `[InvolutiveInv _] [ContinuousInv _]`
protected theorem tendsto_inv_iff {f : Filter α} {m : α → ℝ≥0∞} {a : ℝ≥0∞} :
    Tendsto (fun x => (m x)⁻¹) f (𝓝 a⁻¹) ↔ Tendsto m f (𝓝 a) :=
  ⟨fun h => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
m : α → ℝ≥0∞
a : ℝ≥0∞
h : Tendsto (fun x => (m x)⁻¹) f (𝓝 a⁻¹)
⊢ Tendsto m f (𝓝 a)

Next tactic:
simpa only [inv_inv] using Tendsto.inv h
protected theorem Tendsto.div {f : Filter α} {ma : α → ℝ≥0∞} {mb : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hma : Tendsto ma f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ 0) (hmb : Tendsto mb f (𝓝 b))
    (hb : b ≠ ⊤ ∨ a ≠ ⊤) : Tendsto (fun a => ma a / mb a) f (𝓝 (a / b)) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
ma mb : α → ℝ≥0∞
a b : ℝ≥0∞
hma : Tendsto ma f (𝓝 a)
ha : a ≠ 0 ∨ b ≠ 0
hmb : Tendsto mb f (𝓝 b)
hb : b ≠ ⊤ ∨ a ≠ ⊤
⊢ Tendsto (fun a => ma a / mb a) f (𝓝 (a / b))

Next tactic:
apply Tendsto.mul hma _ (ENNReal.tendsto_inv_iff.2 hmb) _
protected theorem Tendsto.div {f : Filter α} {ma : α → ℝ≥0∞} {mb : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hma : Tendsto ma f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ 0) (hmb : Tendsto mb f (𝓝 b))
    (hb : b ≠ ⊤ ∨ a ≠ ⊤) : Tendsto (fun a => ma a / mb a) f (𝓝 (a / b)) := by
  apply Tendsto.mul hma _ (ENNReal.tendsto_inv_iff.2 hmb) _ <;> 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
ma mb : α → ℝ≥0∞
a b : ℝ≥0∞
hma : Tendsto ma f (𝓝 a)
ha : a ≠ 0 ∨ b ≠ 0
hmb : Tendsto mb f (𝓝 b)
hb : b ≠ ⊤ ∨ a ≠ ⊤
⊢ a ≠ 0 ∨ b⁻¹ ≠ ⊤

Next tactic:
simp [ha, hb]
protected theorem Tendsto.div {f : Filter α} {ma : α → ℝ≥0∞} {mb : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hma : Tendsto ma f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ 0) (hmb : Tendsto mb f (𝓝 b))
    (hb : b ≠ ⊤ ∨ a ≠ ⊤) : Tendsto (fun a => ma a / mb a) f (𝓝 (a / b)) := by
  apply Tendsto.mul hma _ (ENNReal.tendsto_inv_iff.2 hmb) _ <;> 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
ma mb : α → ℝ≥0∞
a b : ℝ≥0∞
hma : Tendsto ma f (𝓝 a)
ha : a ≠ 0 ∨ b ≠ 0
hmb : Tendsto mb f (𝓝 b)
hb : b ≠ ⊤ ∨ a ≠ ⊤
⊢ b⁻¹ ≠ 0 ∨ a ≠ ⊤

Next tactic:
simp [ha, hb]
protected theorem Tendsto.const_div {f : Filter α} {m : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hm : Tendsto m f (𝓝 b)) (hb : b ≠ ⊤ ∨ a ≠ ⊤) : Tendsto (fun b => a / m b) f (𝓝 (a / b)) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
m : α → ℝ≥0∞
a b : ℝ≥0∞
hm : Tendsto m f (𝓝 b)
hb : b ≠ ⊤ ∨ a ≠ ⊤
⊢ Tendsto (fun b => a / m b) f (𝓝 (a / b))

Next tactic:
apply Tendsto.const_mul (ENNReal.tendsto_inv_iff.2 hm)
protected theorem Tendsto.const_div {f : Filter α} {m : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hm : Tendsto m f (𝓝 b)) (hb : b ≠ ⊤ ∨ a ≠ ⊤) : Tendsto (fun b => a / m b) f (𝓝 (a / b)) := by
  apply Tendsto.const_mul (ENNReal.tendsto_inv_iff.2 hm)
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
m : α → ℝ≥0∞
a b : ℝ≥0∞
hm : Tendsto m f (𝓝 b)
hb : b ≠ ⊤ ∨ a ≠ ⊤
⊢ b⁻¹ ≠ 0 ∨ a ≠ ⊤

Next tactic:
simp [hb]
protected theorem Tendsto.div_const {f : Filter α} {m : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hm : Tendsto m f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => m x / b) f (𝓝 (a / b)) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
m : α → ℝ≥0∞
a b : ℝ≥0∞
hm : Tendsto m f (𝓝 a)
ha : a ≠ 0 ∨ b ≠ 0
⊢ Tendsto (fun x => m x / b) f (𝓝 (a / b))

Next tactic:
apply Tendsto.mul_const hm
protected theorem Tendsto.div_const {f : Filter α} {m : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hm : Tendsto m f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => m x / b) f (𝓝 (a / b)) := by
  apply Tendsto.mul_const hm
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
m : α → ℝ≥0∞
a b : ℝ≥0∞
hm : Tendsto m f (𝓝 a)
ha : a ≠ 0 ∨ b ≠ 0
⊢ a ≠ 0 ∨ b⁻¹ ≠ ⊤

Next tactic:
simp [ha]
theorem biSup_add' {ι : Sort*} {p : ι → Prop} (h : ∃ i, p i) {f : ι → ℝ≥0∞} :
    (⨆ (i) (_ : p i), f i) + a = ⨆ (i) (_ : p i), f i + a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
p : ι → Prop
h : ∃ i, p i
f : ι → ℝ≥0∞
⊢ (⨆ i, ⨆ (_ : p i), f i) + a = ⨆ i, ⨆ (_ : p i), f i + a

Next tactic:
haveI : Nonempty { i // p i } := nonempty_subtype.2 h
theorem biSup_add' {ι : Sort*} {p : ι → Prop} (h : ∃ i, p i) {f : ι → ℝ≥0∞} :
    (⨆ (i) (_ : p i), f i) + a = ⨆ (i) (_ : p i), f i + a := by
  haveI : Nonempty { i // p i } := nonempty_subtype.2 h
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
p : ι → Prop
h : ∃ i, p i
f : ι → ℝ≥0∞
this : Nonempty { i // p i }
⊢ (⨆ i, ⨆ (_ : p i), f i) + a = ⨆ i, ⨆ (_ : p i), f i + a

Next tactic:
simp only [iSup_subtype', iSup_add]
theorem add_biSup' {ι : Sort*} {p : ι → Prop} (h : ∃ i, p i) {f : ι → ℝ≥0∞} :
    (a + ⨆ (i) (_ : p i), f i) = ⨆ (i) (_ : p i), a + f i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p✝ q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
p : ι → Prop
h : ∃ i, p i
f : ι → ℝ≥0∞
⊢ a + ⨆ i, ⨆ (_ : p i), f i = ⨆ i, ⨆ (_ : p i), a + f i

Next tactic:
simp only [add_comm a, biSup_add' h]
theorem sSup_add {s : Set ℝ≥0∞} (hs : s.Nonempty) : sSup s + a = ⨆ b ∈ s, b + a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ s : Set ℝ≥0∞
hs : Set.Nonempty s
⊢ sSup s + a = ⨆ b ∈ s, b + a

Next tactic:
rw [sSup_eq_iSup, biSup_add hs]
theorem add_iSup {ι : Sort*} {s : ι → ℝ≥0∞} [Nonempty ι] : a + iSup s = ⨆ b, a + s b := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
ι : Sort u_4
s : ι → ℝ≥0∞
inst✝ : Nonempty ι
⊢ a + iSup s = ⨆ b, a + s b

Next tactic:
rw [add_comm, iSup_add]
theorem add_iSup {ι : Sort*} {s : ι → ℝ≥0∞} [Nonempty ι] : a + iSup s = ⨆ b, a + s b := by
  rw [add_comm, iSup_add]; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
ι : Sort u_4
s : ι → ℝ≥0∞
inst✝ : Nonempty ι
⊢ ⨆ b, s b + a = ⨆ b, a + s b

Next tactic:
simp [add_comm]
theorem iSup_add_iSup_le {ι ι' : Sort*} [Nonempty ι] [Nonempty ι'] {f : ι → ℝ≥0∞} {g : ι' → ℝ≥0∞}
    {a : ℝ≥0∞} (h : ∀ i j, f i + g j ≤ a) : iSup f + iSup g ≤ a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
ι' : Sort u_5
inst✝¹ : Nonempty ι
inst✝ : Nonempty ι'
f : ι → ℝ≥0∞
g : ι' → ℝ≥0∞
a : ℝ≥0∞
h : ∀ (i : ι) (j : ι'), f i + g j ≤ a
⊢ iSup f + iSup g ≤ a

Next tactic:
simp_rw [iSup_add, add_iSup]
theorem iSup_add_iSup_le {ι ι' : Sort*} [Nonempty ι] [Nonempty ι'] {f : ι → ℝ≥0∞} {g : ι' → ℝ≥0∞}
    {a : ℝ≥0∞} (h : ∀ i j, f i + g j ≤ a) : iSup f + iSup g ≤ a := by
  simp_rw [iSup_add, add_iSup]; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
ι' : Sort u_5
inst✝¹ : Nonempty ι
inst✝ : Nonempty ι'
f : ι → ℝ≥0∞
g : ι' → ℝ≥0∞
a : ℝ≥0∞
h : ∀ (i : ι) (j : ι'), f i + g j ≤ a
⊢ ⨆ b, ⨆ b_1, f b + g b_1 ≤ a

Next tactic:
exact iSup₂_le h
theorem biSup_add_biSup_le' {ι ι'} {p : ι → Prop} {q : ι' → Prop} (hp : ∃ i, p i) (hq : ∃ j, q j)
    {f : ι → ℝ≥0∞} {g : ι' → ℝ≥0∞} {a : ℝ≥0∞} (h : ∀ i, p i → ∀ j, q j → f i + g j ≤ a) :
    ((⨆ (i) (_ : p i), f i) + ⨆ (j) (_ : q j), g j) ≤ a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
ι' : Sort u_5
p : ι → Prop
q : ι' → Prop
hp : ∃ i, p i
hq : ∃ j, q j
f : ι → ℝ≥0∞
g : ι' → ℝ≥0∞
a : ℝ≥0∞
h : ∀ (i : ι), p i → ∀ (j : ι'), q j → f i + g j ≤ a
⊢ (⨆ i, ⨆ (_ : p i), f i) + ⨆ j, ⨆ (_ : q j), g j ≤ a

Next tactic:
simp_rw [biSup_add' hp, add_biSup' hq]
theorem biSup_add_biSup_le' {ι ι'} {p : ι → Prop} {q : ι' → Prop} (hp : ∃ i, p i) (hq : ∃ j, q j)
    {f : ι → ℝ≥0∞} {g : ι' → ℝ≥0∞} {a : ℝ≥0∞} (h : ∀ i, p i → ∀ j, q j → f i + g j ≤ a) :
    ((⨆ (i) (_ : p i), f i) + ⨆ (j) (_ : q j), g j) ≤ a := by
  simp_rw [biSup_add' hp, add_biSup' hq]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
ι' : Sort u_5
p : ι → Prop
q : ι' → Prop
hp : ∃ i, p i
hq : ∃ j, q j
f : ι → ℝ≥0∞
g : ι' → ℝ≥0∞
a : ℝ≥0∞
h : ∀ (i : ι), p i → ∀ (j : ι'), q j → f i + g j ≤ a
⊢ ⨆ i, ⨆ (_ : p i), ⨆ i_1, ⨆ (_ : q i_1), f i + g i_1 ≤ a

Next tactic:
exact iSup₂_le fun i hi => iSup₂_le (h i hi)
theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k, f i + g j ≤ f k + g k) :
    iSup f + iSup g = ⨆ a, f a + g a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f g : ι → ℝ≥0∞
h : ∀ (i j : ι), ∃ k, f i + g j ≤ f k + g k
⊢ iSup f + iSup g = ⨆ a, f a + g a

Next tactic:
cases isEmpty_or_nonempty ι
theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k, f i + g j ≤ f k + g k) :
    iSup f + iSup g = ⨆ a, f a + g a := by
  cases isEmpty_or_nonempty ι
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f g : ι → ℝ≥0∞
h : ∀ (i j : ι), ∃ k, f i + g j ≤ f k + g k
h✝ : IsEmpty ι
⊢ iSup f + iSup g = ⨆ a, f a + g a

Next tactic:
simp only [iSup_of_empty, bot_eq_zero, zero_add]
theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k, f i + g j ≤ f k + g k) :
    iSup f + iSup g = ⨆ a, f a + g a := by
  cases isEmpty_or_nonempty ι
  · simp only [iSup_of_empty, bot_eq_zero, zero_add]
  · 

Proof state:
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f g : ι → ℝ≥0∞
h : ∀ (i j : ι), ∃ k, f i + g j ≤ f k + g k
h✝ : Nonempty ι
⊢ iSup f + iSup g = ⨆ a, f a + g a

Next tactic:
refine' le_antisymm _ (iSup_le fun a => add_le_add (le_iSup _ _) (le_iSup _ _))
theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k, f i + g j ≤ f k + g k) :
    iSup f + iSup g = ⨆ a, f a + g a := by
  cases isEmpty_or_nonempty ι
  · simp only [iSup_of_empty, bot_eq_zero, zero_add]
  · refine' le_antisymm _ (iSup_le fun a => add_le_add (le_iSup _ _) (le_iSup _ _))
    

Proof state:
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f g : ι → ℝ≥0∞
h : ∀ (i j : ι), ∃ k, f i + g j ≤ f k + g k
h✝ : Nonempty ι
⊢ iSup f + iSup g ≤ ⨆ a, f a + g a

Next tactic:
refine' iSup_add_iSup_le fun i j => _
theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k, f i + g j ≤ f k + g k) :
    iSup f + iSup g = ⨆ a, f a + g a := by
  cases isEmpty_or_nonempty ι
  · simp only [iSup_of_empty, bot_eq_zero, zero_add]
  · refine' le_antisymm _ (iSup_le fun a => add_le_add (le_iSup _ _) (le_iSup _ _))
    refine' iSup_add_iSup_le fun i j => _
    

Proof state:
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f g : ι → ℝ≥0∞
h : ∀ (i j : ι), ∃ k, f i + g j ≤ f k + g k
h✝ : Nonempty ι
i j : ι
⊢ f i + g j ≤ ⨆ a, f a + g a

Next tactic:
rcases h i j with ⟨k, hk⟩
theorem iSup_add_iSup {ι : Sort*} {f g : ι → ℝ≥0∞} (h : ∀ i j, ∃ k, f i + g j ≤ f k + g k) :
    iSup f + iSup g = ⨆ a, f a + g a := by
  cases isEmpty_or_nonempty ι
  · simp only [iSup_of_empty, bot_eq_zero, zero_add]
  · refine' le_antisymm _ (iSup_le fun a => add_le_add (le_iSup _ _) (le_iSup _ _))
    refine' iSup_add_iSup_le fun i j => _
    rcases h i j with ⟨k, hk⟩
    

Proof state:
case inr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
ι : Sort u_4
f g : ι → ℝ≥0∞
h : ∀ (i j : ι), ∃ k, f i + g j ≤ f k + g k
h✝ : Nonempty ι
i j k : ι
hk : f i + g j ≤ f k + g k
⊢ f i + g j ≤ ⨆ a, f a + g a

Next tactic:
exact le_iSup_of_le k hk
theorem finset_sum_iSup_nat {α} {ι} [SemilatticeSup ι] {s : Finset α} {f : α → ι → ℝ≥0∞}
    (hf : ∀ a, Monotone (f a)) : (∑ a in s, iSup (f a)) = ⨆ n, ∑ a in s, f a n := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s✝ : Set ℝ≥0∞
α : Type u_4
ι : Type u_5
inst✝ : SemilatticeSup ι
s : Finset α
f : α → ι → ℝ≥0∞
hf : ∀ (a : α), Monotone (f a)
⊢ ∑ a in s, iSup (f a) = ⨆ n, ∑ a in s, f a n

Next tactic:
refine' Finset.induction_on s _ _