l3lab/ntp-mathlib huggingface dataset:
protected theorem tendsto_mul (ha : a ≠ 0 ∨ b ≠ ⊤) (hb : b ≠ 0 ∨ a ≠ ⊤) :
    Tendsto (fun p : ℝ≥0∞ × ℝ≥0∞ => p.1 * p.2) (𝓝 (a, b)) (𝓝 (a * b)) := by
  have ht : ∀ b : ℝ≥0∞, b ≠ 0 →
      Tendsto (fun p : ℝ≥0∞ × ℝ≥0∞ => p.1 * p.2) (𝓝 ((⊤ : ℝ≥0∞), b)) (𝓝 ⊤) := fun b hb => by
    refine' tendsto_nhds_top_iff_nnreal.2 fun n => _
    rcases lt_iff_exists_nnreal_btwn.1 (pos_iff_ne_zero.2 hb) with ⟨ε, hε, hεb⟩
    have : ∀ᶠ c : ℝ≥0∞ × ℝ≥0∞ in 𝓝 (∞, b), ↑n / ↑ε < c.1 ∧ ↑ε < c.2 :=
      (lt_mem_nhds <| div_lt_top coe_ne_top hε.ne').prod_nhds (lt_mem_nhds hεb)
    refine' this.mono fun c hc => _
    exact (ENNReal.div_mul_cancel hε.ne' coe_ne_top).symm.trans_lt (mul_lt_mul hc.1 hc.2)
  induction a using recTopCoe with
  | top => simp only [ne_eq, or_false, not_true_eq_false] at hb; simp [ht b hb, top_mul hb]
  | coe a =>
    induction b using recTopCoe with
    | top =>
      simp only [ne_eq, or_false, not_true_eq_false] at ha
      simpa [(· ∘ ·), mul_comm, mul_top ha]
        using (ht a ha).comp (continuous_swap.tendsto (ofNNReal a, ⊤))
    

Proof state:
case coe.coe
α : 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∞
ht : ∀ (b : ℝ≥0∞), b ≠ 0 → Tendsto (fun p => p.1 * p.2) (𝓝 (⊤, b)) (𝓝 ⊤)
a b : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑b ≠ 0 ∨ ↑a ≠ ⊤
⊢ Tendsto (fun p => p.1 * p.2) (𝓝 (↑a, ↑b)) (𝓝 (↑a * ↑b))

Next tactic:
| coe b =>
      simp only [nhds_coe_coe, ← coe_mul, tendsto_coe, tendsto_map'_iff, (· ∘ ·), tendsto_mul]
protected theorem tendsto_mul (ha : a ≠ 0 ∨ b ≠ ⊤) (hb : b ≠ 0 ∨ a ≠ ⊤) :
    Tendsto (fun p : ℝ≥0∞ × ℝ≥0∞ => p.1 * p.2) (𝓝 (a, b)) (𝓝 (a * b)) := by
  have ht : ∀ b : ℝ≥0∞, b ≠ 0 →
      Tendsto (fun p : ℝ≥0∞ × ℝ≥0∞ => p.1 * p.2) (𝓝 ((⊤ : ℝ≥0∞), b)) (𝓝 ⊤) := fun b hb => by
    refine' tendsto_nhds_top_iff_nnreal.2 fun n => _
    rcases lt_iff_exists_nnreal_btwn.1 (pos_iff_ne_zero.2 hb) with ⟨ε, hε, hεb⟩
    have : ∀ᶠ c : ℝ≥0∞ × ℝ≥0∞ in 𝓝 (∞, b), ↑n / ↑ε < c.1 ∧ ↑ε < c.2 :=
      (lt_mem_nhds <| div_lt_top coe_ne_top hε.ne').prod_nhds (lt_mem_nhds hεb)
    refine' this.mono fun c hc => _
    exact (ENNReal.div_mul_cancel hε.ne' coe_ne_top).symm.trans_lt (mul_lt_mul hc.1 hc.2)
  induction a using recTopCoe with
  | top => simp only [ne_eq, or_false, not_true_eq_false] at hb; simp [ht b hb, top_mul hb]
  | coe a =>
    induction b using recTopCoe with
    | top =>
      simp only [ne_eq, or_false, not_true_eq_false] at ha
      simpa [(· ∘ ·), mul_comm, mul_top ha]
        using (ht a ha).comp (continuous_swap.tendsto (ofNNReal a, ⊤))
    | coe b =>
      

Proof state:
case coe.coe
α : 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∞
ht : ∀ (b : ℝ≥0∞), b ≠ 0 → Tendsto (fun p => p.1 * p.2) (𝓝 (⊤, b)) (𝓝 ⊤)
a b : ℝ≥0
ha : ↑a ≠ 0 ∨ ↑b ≠ ⊤
hb : ↑b ≠ 0 ∨ ↑a ≠ ⊤
⊢ Tendsto (fun p => p.1 * p.2) (𝓝 (↑a, ↑b)) (𝓝 (↑a * ↑b))

Next tactic:
simp only [nhds_coe_coe, ← coe_mul, tendsto_coe, tendsto_map'_iff, (· ∘ ·), tendsto_mul]
protected theorem Tendsto.const_mul {f : Filter α} {m : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hm : Tendsto m f (𝓝 b)) (hb : b ≠ 0 ∨ a ≠ ⊤) : Tendsto (fun b => a * m b) f (𝓝 (a * b)) :=
  by_cases (fun (this : a = 0) => 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 ≠ 0 ∨ a ≠ ⊤
this : a = 0
⊢ Tendsto (fun b => a * m b) f (𝓝 (a * b))

Next tactic:
simp [this, tendsto_const_nhds]
protected theorem Tendsto.mul_const {f : Filter α} {m : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hm : Tendsto m f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ ⊤) : 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 ≠ ⊤
⊢ Tendsto (fun x => m x * b) f (𝓝 (a * b))

Next tactic:
simpa only [mul_comm] using ENNReal.Tendsto.const_mul hm ha
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := 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
f : ι → α → ℝ≥0∞
x : Filter α
a : ι → ℝ≥0∞
s : Finset ι
h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))
h' : ∀ i ∈ s, a i ≠ ⊤
⊢ Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c))

Next tactic:
induction' s using Finset.induction with a s has IH
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · 

Proof state:
case empty
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a : ι → ℝ≥0∞
h : ∀ i ∈ ∅, Tendsto (f i) x (𝓝 (a i))
h' : ∀ i ∈ ∅, a i ≠ ⊤
⊢ Tendsto (fun b => ∏ c in ∅, f c b) x (𝓝 (∏ c in ∅, a c))

Next tactic:
simp [tendsto_const_nhds]
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · simp [tendsto_const_nhds]
  

Proof state:
case insert
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a✝ : ι → ℝ≥0∞
a : ι
s : Finset ι
has : a ∉ s
IH :
  (∀ i ∈ s, Tendsto (f i) x (𝓝 (a✝ i))) →
    (∀ i ∈ s, a✝ i ≠ ⊤) → Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a✝ c))
h : ∀ i ∈ insert a s, Tendsto (f i) x (𝓝 (a✝ i))
h' : ∀ i ∈ insert a s, a✝ i ≠ ⊤
⊢ Tendsto (fun b => ∏ c in insert a s, f c b) x (𝓝 (∏ c in insert a s, a✝ c))

Next tactic:
simp only [Finset.prod_insert has]
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · simp [tendsto_const_nhds]
  simp only [Finset.prod_insert has]
  

Proof state:
case insert
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a✝ : ι → ℝ≥0∞
a : ι
s : Finset ι
has : a ∉ s
IH :
  (∀ i ∈ s, Tendsto (f i) x (𝓝 (a✝ i))) →
    (∀ i ∈ s, a✝ i ≠ ⊤) → Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a✝ c))
h : ∀ i ∈ insert a s, Tendsto (f i) x (𝓝 (a✝ i))
h' : ∀ i ∈ insert a s, a✝ i ≠ ⊤
⊢ Tendsto (fun b => f a b * ∏ c in s, f c b) x (𝓝 (a✝ a * ∏ c in s, a✝ c))

Next tactic:
apply Tendsto.mul (h _ (Finset.mem_insert_self _ _))
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · simp [tendsto_const_nhds]
  simp only [Finset.prod_insert has]
  apply Tendsto.mul (h _ (Finset.mem_insert_self _ _))
  · 

Proof state:
case insert.ha
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a✝ : ι → ℝ≥0∞
a : ι
s : Finset ι
has : a ∉ s
IH :
  (∀ i ∈ s, Tendsto (f i) x (𝓝 (a✝ i))) →
    (∀ i ∈ s, a✝ i ≠ ⊤) → Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a✝ c))
h : ∀ i ∈ insert a s, Tendsto (f i) x (𝓝 (a✝ i))
h' : ∀ i ∈ insert a s, a✝ i ≠ ⊤
⊢ a✝ a ≠ 0 ∨ ∏ c in s, a✝ c ≠ ⊤

Next tactic:
right
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · simp [tendsto_const_nhds]
  simp only [Finset.prod_insert has]
  apply Tendsto.mul (h _ (Finset.mem_insert_self _ _))
  · right
    

Proof state:
case insert.ha.h
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a✝ : ι → ℝ≥0∞
a : ι
s : Finset ι
has : a ∉ s
IH :
  (∀ i ∈ s, Tendsto (f i) x (𝓝 (a✝ i))) →
    (∀ i ∈ s, a✝ i ≠ ⊤) → Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a✝ c))
h : ∀ i ∈ insert a s, Tendsto (f i) x (𝓝 (a✝ i))
h' : ∀ i ∈ insert a s, a✝ i ≠ ⊤
⊢ ∏ c in s, a✝ c ≠ ⊤

Next tactic:
exact (prod_lt_top fun i hi => h' _ (Finset.mem_insert_of_mem hi)).ne
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · simp [tendsto_const_nhds]
  simp only [Finset.prod_insert has]
  apply Tendsto.mul (h _ (Finset.mem_insert_self _ _))
  · right
    exact (prod_lt_top fun i hi => h' _ (Finset.mem_insert_of_mem hi)).ne
  · 

Proof state:
case insert.hmb
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a✝ : ι → ℝ≥0∞
a : ι
s : Finset ι
has : a ∉ s
IH :
  (∀ i ∈ s, Tendsto (f i) x (𝓝 (a✝ i))) →
    (∀ i ∈ s, a✝ i ≠ ⊤) → Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a✝ c))
h : ∀ i ∈ insert a s, Tendsto (f i) x (𝓝 (a✝ i))
h' : ∀ i ∈ insert a s, a✝ i ≠ ⊤
⊢ Tendsto (fun a => ∏ c in s, f c a) x (𝓝 (∏ c in s, a✝ c))

Next tactic:
exact IH (fun i hi => h _ (Finset.mem_insert_of_mem hi)) fun i hi =>
      h' _ (Finset.mem_insert_of_mem hi)
theorem tendsto_finset_prod_of_ne_top {ι : Type*} {f : ι → α → ℝ≥0∞} {x : Filter α} {a : ι → ℝ≥0∞}
    (s : Finset ι) (h : ∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) (h' : ∀ i ∈ s, a i ≠ ∞) :
    Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a c)) := by
  induction' s using Finset.induction with a s has IH
  · simp [tendsto_const_nhds]
  simp only [Finset.prod_insert has]
  apply Tendsto.mul (h _ (Finset.mem_insert_self _ _))
  · right
    exact (prod_lt_top fun i hi => h' _ (Finset.mem_insert_of_mem hi)).ne
  · exact IH (fun i hi => h _ (Finset.mem_insert_of_mem hi)) fun i hi =>
      h' _ (Finset.mem_insert_of_mem hi)
  · 

Proof state:
case insert.hb
α : 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
f : ι → α → ℝ≥0∞
x : Filter α
a✝ : ι → ℝ≥0∞
a : ι
s : Finset ι
has : a ∉ s
IH :
  (∀ i ∈ s, Tendsto (f i) x (𝓝 (a✝ i))) →
    (∀ i ∈ s, a✝ i ≠ ⊤) → Tendsto (fun b => ∏ c in s, f c b) x (𝓝 (∏ c in s, a✝ c))
h : ∀ i ∈ insert a s, Tendsto (f i) x (𝓝 (a✝ i))
h' : ∀ i ∈ insert a s, a✝ i ≠ ⊤
⊢ ∏ c in s, a✝ c ≠ 0 ∨ a✝ a ≠ ⊤

Next tactic:
exact Or.inr (h' _ (Finset.mem_insert_self _ _))
protected theorem continuous_div_const (c : ℝ≥0∞) (c_ne_zero : c ≠ 0) :
    Continuous fun x : ℝ≥0∞ => x / c := 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∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ Continuous fun x => x / c

Next tactic:
simp_rw [div_eq_mul_inv, continuous_iff_continuousAt]
protected theorem continuous_div_const (c : ℝ≥0∞) (c_ne_zero : c ≠ 0) :
    Continuous fun x : ℝ≥0∞ => x / c := by
  simp_rw [div_eq_mul_inv, continuous_iff_continuousAt]
  

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∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ ∀ (x : ℝ≥0∞), ContinuousAt (fun x => x * c⁻¹) x

Next tactic:
intro x
protected theorem continuous_div_const (c : ℝ≥0∞) (c_ne_zero : c ≠ 0) :
    Continuous fun x : ℝ≥0∞ => x / c := by
  simp_rw [div_eq_mul_inv, continuous_iff_continuousAt]
  intro x
  

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∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
x : ℝ≥0∞
⊢ ContinuousAt (fun x => x * c⁻¹) x

Next tactic:
exact ENNReal.continuousAt_mul_const (Or.intro_left _ (inv_ne_top.mpr c_ne_zero))
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => 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∞
n : ℕ
⊢ Continuous fun a => a ^ n

Next tactic:
induction' n with n IH
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · 

Proof state:
case zero
α : 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∞
⊢ Continuous fun a => a ^ Nat.zero

Next tactic:
simp [continuous_const]
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  

Proof state:
case succ
α : 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∞
n : ℕ
IH : Continuous fun a => a ^ n
⊢ Continuous fun a => a ^ Nat.succ n

Next tactic:
simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  

Proof state:
case succ
α : 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∞
n : ℕ
IH : Continuous fun a => a ^ n
⊢ ∀ (x : ℝ≥0∞), ContinuousAt (fun a => a ^ n * a) x

Next tactic:
intro x
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  

Proof state:
case succ
α : 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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
⊢ ContinuousAt (fun a => a ^ n * a) x

Next tactic:
refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _ <;> 

Proof state:
case succ.refine'_1
α : 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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
⊢ x ^ n ≠ 0 ∨ x ≠ ⊤

Next tactic:
by_cases H : x = 0
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _ <;> 

Proof state:
case succ.refine'_2
α : 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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
⊢ x ≠ 0 ∨ x ^ n ≠ ⊤

Next tactic:
by_cases H : x = 0
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _ <;> by_cases H : x = 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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
H : x = 0
⊢ x ^ n ≠ 0 ∨ x ≠ ⊤

Next tactic:
simp only [H, zero_ne_top, Ne.def, or_true_iff, not_false_iff]
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _ <;> by_cases H : x = 0
  · simp only [H, zero_ne_top, Ne.def, or_true_iff, not_false_iff]
  · 

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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
H : ¬x = 0
⊢ x ^ n ≠ 0 ∨ x ≠ ⊤

Next tactic:
exact Or.inl fun h => H (pow_eq_zero h)
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _ <;> by_cases H : x = 0
  · simp only [H, zero_ne_top, Ne.def, or_true_iff, not_false_iff]
  · exact Or.inl fun h => H (pow_eq_zero h)
  · 

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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
H : x = 0
⊢ x ≠ 0 ∨ x ^ n ≠ ⊤

Next tactic:
simp only [H, pow_eq_top_iff, zero_ne_top, false_or_iff, eq_self_iff_true, not_true, Ne.def,
      not_false_iff, false_and_iff]
@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n := by
  induction' n with n IH
  · simp [continuous_const]
  simp_rw [Nat.succ_eq_add_one, pow_add, pow_one, continuous_iff_continuousAt]
  intro x
  refine' ENNReal.Tendsto.mul (IH.tendsto _) _ tendsto_id _ <;> by_cases H : x = 0
  · simp only [H, zero_ne_top, Ne.def, or_true_iff, not_false_iff]
  · exact Or.inl fun h => H (pow_eq_zero h)
  · simp only [H, pow_eq_top_iff, zero_ne_top, false_or_iff, eq_self_iff_true, not_true, Ne.def,
      not_false_iff, false_and_iff]
  · 

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∞
n : ℕ
IH : Continuous fun a => a ^ n
x : ℝ≥0∞
H : ¬x = 0
⊢ x ≠ 0 ∨ x ^ n ≠ ⊤

Next tactic:
simp only [H, true_or_iff, Ne.def, not_false_iff]
theorem continuousOn_sub :
    ContinuousOn (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) { p : ℝ≥0∞ × ℝ≥0∞ | p ≠ ⟨∞, ∞⟩ } := 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∞
⊢ ContinuousOn (fun p => p.1 - p.2) {p | p ≠ (⊤, ⊤)}

Next tactic:
rw [ContinuousOn]
theorem continuousOn_sub :
    ContinuousOn (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) { p : ℝ≥0∞ × ℝ≥0∞ | p ≠ ⟨∞, ∞⟩ } := by
  rw [ContinuousOn]
  

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 ∈ {p | p ≠ (⊤, ⊤)}, ContinuousWithinAt (fun p => p.1 - p.2) {p | p ≠ (⊤, ⊤)} x

Next tactic:
rintro ⟨x, y⟩ hp
theorem continuousOn_sub :
    ContinuousOn (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) { p : ℝ≥0∞ × ℝ≥0∞ | p ≠ ⟨∞, ∞⟩ } := by
  rw [ContinuousOn]
  rintro ⟨x, y⟩ hp
  

Proof state:
case mk
α : 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∞
hp : (x, y) ∈ {p | p ≠ (⊤, ⊤)}
⊢ ContinuousWithinAt (fun p => p.1 - p.2) {p | p ≠ (⊤, ⊤)} (x, y)

Next tactic:
simp only [Ne.def, Set.mem_setOf_eq, Prod.mk.inj_iff] at hp
theorem continuousOn_sub :
    ContinuousOn (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) { p : ℝ≥0∞ × ℝ≥0∞ | p ≠ ⟨∞, ∞⟩ } := by
  rw [ContinuousOn]
  rintro ⟨x, y⟩ hp
  simp only [Ne.def, Set.mem_setOf_eq, Prod.mk.inj_iff] at hp
  

Proof state:
case mk
α : 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∞
hp : ¬(x = ⊤ ∧ y = ⊤)
⊢ ContinuousWithinAt (fun p => p.1 - p.2) {p | p ≠ (⊤, ⊤)} (x, y)

Next tactic:
refine' tendsto_nhdsWithin_of_tendsto_nhds (tendsto_sub (not_and_or.mp hp))
theorem continuous_sub_left {a : ℝ≥0∞} (a_ne_top : a ≠ ⊤) : Continuous (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_ne_top : a ≠ ⊤
⊢ Continuous fun x => a - x

Next tactic:
change Continuous (Function.uncurry Sub.sub ∘ (a, ·))
theorem continuous_sub_left {a : ℝ≥0∞} (a_ne_top : a ≠ ⊤) : Continuous (a - ·) := by
  change Continuous (Function.uncurry Sub.sub ∘ (a, ·))
  

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_ne_top : a ≠ ⊤
⊢ Continuous (uncurry Sub.sub ∘ fun x => (a, x))

Next tactic:
refine continuousOn_sub.comp_continuous (Continuous.Prod.mk a) fun x => ?_
theorem continuous_sub_left {a : ℝ≥0∞} (a_ne_top : a ≠ ⊤) : Continuous (a - ·) := by
  change Continuous (Function.uncurry Sub.sub ∘ (a, ·))
  refine continuousOn_sub.comp_continuous (Continuous.Prod.mk a) fun x => ?_
  

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_ne_top : a ≠ ⊤
x : ℝ≥0∞
⊢ (a, x) ∈ {p | p ≠ (⊤, ⊤)}

Next tactic:
simp only [a_ne_top, Ne.def, mem_setOf_eq, Prod.mk.inj_iff, false_and_iff, not_false_iff]
theorem continuousOn_sub_left (a : ℝ≥0∞) : ContinuousOn (a - ·) { x : ℝ≥0∞ | x ≠ ∞ } := 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∞
⊢ ContinuousOn (fun x => a - x) {x | x ≠ ⊤}

Next tactic:
rw [show (fun x => a - x) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨a, x⟩ by rfl]
theorem continuousOn_sub_left (a : ℝ≥0∞) : ContinuousOn (a - ·) { x : ℝ≥0∞ | x ≠ ∞ } := by
  rw [show (fun x => a - x) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨a, x⟩ 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∞
⊢ (fun x => a - x) = (fun p => p.1 - p.2) ∘ fun x => (a, x)

Next tactic:
rfl
theorem continuousOn_sub_left (a : ℝ≥0∞) : ContinuousOn (a - ·) { x : ℝ≥0∞ | x ≠ ∞ } := by
  rw [show (fun x => a - x) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨a, x⟩ by rfl]
  

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∞
⊢ ContinuousOn ((fun p => p.1 - p.2) ∘ fun x => (a, x)) {x | x ≠ ⊤}

Next tactic:
apply ContinuousOn.comp continuousOn_sub (Continuous.continuousOn (Continuous.Prod.mk a))
theorem continuousOn_sub_left (a : ℝ≥0∞) : ContinuousOn (a - ·) { x : ℝ≥0∞ | x ≠ ∞ } := by
  rw [show (fun x => a - x) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨a, x⟩ by rfl]
  apply ContinuousOn.comp continuousOn_sub (Continuous.continuousOn (Continuous.Prod.mk a))
  

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∞
⊢ MapsTo (fun b => (a, b)) {x | x ≠ ⊤} {p | p ≠ (⊤, ⊤)}

Next tactic:
rintro _ h (_ | _)
theorem continuousOn_sub_left (a : ℝ≥0∞) : ContinuousOn (a - ·) { x : ℝ≥0∞ | x ≠ ∞ } := by
  rw [show (fun x => a - x) = (fun p : ℝ≥0∞ × ℝ≥0∞ => p.fst - p.snd) ∘ fun x => ⟨a, x⟩ by rfl]
  apply ContinuousOn.comp continuousOn_sub (Continuous.continuousOn (Continuous.Prod.mk a))
  rintro _ h (_ | _)
  

Proof state:
case refl
α : 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∞
h : ⊤ ∈ {x | x ≠ ⊤}
⊢ False

Next tactic:
exact h none_eq_top
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => 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∞
⊢ Continuous fun x => x - a

Next tactic:
by_cases a_infty : a = ∞
theorem continuous_sub_right (a : ℝ≥0∞) : Continuous fun x : ℝ≥0∞ => x - a := by
  by_cases a_infty : a = ∞
  · 

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∞
a : ℝ≥0∞
a_infty : a = ⊤
⊢ Continuous fun x => x - a

Next tactic:
simp [a_infty, continuous_const]