l3lab/ntp-mathlib huggingface dataset:
theorem sum_rpow_le_of_tendsto (hp : p ≠ ∞) {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (s : Finset α) :
    ∑ i : α in s, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal := by
  have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
  let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
  have hG : Continuous G := by
    refine' continuous_finset_sum s _
    intro a _
    have : Continuous fun f : ∀ a, E a => f a := continuous_apply a
    

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
s : Finset α
hp' : p ≠ 0
hp'' : 0 < ENNReal.toReal p
G : ((a : α) → E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ ENNReal.toReal p
a : α
a✝ : a ∈ s
this : Continuous fun f => f a
⊢ Continuous fun f => ‖f a‖ ^ ENNReal.toReal p

Next tactic:
exact this.norm.rpow_const fun _ => Or.inr hp''.le
theorem sum_rpow_le_of_tendsto (hp : p ≠ ∞) {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (s : Finset α) :
    ∑ i : α in s, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal := by
  have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
  let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
  have hG : Continuous G := by
    refine' continuous_finset_sum s _
    intro a _
    have : Continuous fun f : ∀ a, E a => f a := continuous_apply a
    exact this.norm.rpow_const fun _ => Or.inr hp''.le
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
s : Finset α
hp' : p ≠ 0
hp'' : 0 < ENNReal.toReal p
G : ((a : α) → E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ ENNReal.toReal p
hG : Continuous G
⊢ ∑ i in s, ‖f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
refine' le_of_tendsto (hG.continuousAt.tendsto.comp hf) _
theorem sum_rpow_le_of_tendsto (hp : p ≠ ∞) {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (s : Finset α) :
    ∑ i : α in s, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal := by
  have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
  let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
  have hG : Continuous G := by
    refine' continuous_finset_sum s _
    intro a _
    have : Continuous fun f : ∀ a, E a => f a := continuous_apply a
    exact this.norm.rpow_const fun _ => Or.inr hp''.le
  refine' le_of_tendsto (hG.continuousAt.tendsto.comp hf) _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
s : Finset α
hp' : p ≠ 0
hp'' : 0 < ENNReal.toReal p
G : ((a : α) → E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ ENNReal.toReal p
hG : Continuous G
⊢ ∀ᶠ (c : ι) in l, (G ∘ id fun i => ↑(F i)) c ≤ C ^ ENNReal.toReal p

Next tactic:
refine' hCF.mono _
theorem sum_rpow_le_of_tendsto (hp : p ≠ ∞) {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (s : Finset α) :
    ∑ i : α in s, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal := by
  have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
  let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
  have hG : Continuous G := by
    refine' continuous_finset_sum s _
    intro a _
    have : Continuous fun f : ∀ a, E a => f a := continuous_apply a
    exact this.norm.rpow_const fun _ => Or.inr hp''.le
  refine' le_of_tendsto (hG.continuousAt.tendsto.comp hf) _
  refine' hCF.mono _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
s : Finset α
hp' : p ≠ 0
hp'' : 0 < ENNReal.toReal p
G : ((a : α) → E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ ENNReal.toReal p
hG : Continuous G
⊢ ∀ (x : ι), ‖F x‖ ≤ C → (G ∘ id fun i => ↑(F i)) x ≤ C ^ ENNReal.toReal p

Next tactic:
intro k hCFk
theorem sum_rpow_le_of_tendsto (hp : p ≠ ∞) {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (s : Finset α) :
    ∑ i : α in s, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal := by
  have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
  let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
  have hG : Continuous G := by
    refine' continuous_finset_sum s _
    intro a _
    have : Continuous fun f : ∀ a, E a => f a := continuous_apply a
    exact this.norm.rpow_const fun _ => Or.inr hp''.le
  refine' le_of_tendsto (hG.continuousAt.tendsto.comp hf) _
  refine' hCF.mono _
  intro k hCFk
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
s : Finset α
hp' : p ≠ 0
hp'' : 0 < ENNReal.toReal p
G : ((a : α) → E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ ENNReal.toReal p
hG : Continuous G
k : ι
hCFk : ‖F k‖ ≤ C
⊢ (G ∘ id fun i => ↑(F i)) k ≤ C ^ ENNReal.toReal p

Next tactic:
refine' (lp.sum_rpow_le_norm_rpow hp'' (F k) s).trans _
theorem sum_rpow_le_of_tendsto (hp : p ≠ ∞) {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (s : Finset α) :
    ∑ i : α in s, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal := by
  have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
  let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
  have hG : Continuous G := by
    refine' continuous_finset_sum s _
    intro a _
    have : Continuous fun f : ∀ a, E a => f a := continuous_apply a
    exact this.norm.rpow_const fun _ => Or.inr hp''.le
  refine' le_of_tendsto (hG.continuousAt.tendsto.comp hf) _
  refine' hCF.mono _
  intro k hCFk
  refine' (lp.sum_rpow_le_norm_rpow hp'' (F k) s).trans _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
s : Finset α
hp' : p ≠ 0
hp'' : 0 < ENNReal.toReal p
G : ((a : α) → E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ ENNReal.toReal p
hG : Continuous G
k : ι
hCFk : ‖F k‖ ≤ C
⊢ ‖F k‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
gcongr
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
⊢ ‖f‖ ≤ C

Next tactic:
obtain ⟨i, hi⟩ := hCF.exists
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  

Proof state:
case intro
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
i : ι
hi : ‖F i‖ ≤ C
⊢ ‖f‖ ≤ C

Next tactic:
have hC : 0 ≤ C := (norm_nonneg _).trans hi
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  

Proof state:
case intro
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
i : ι
hi : ‖F i‖ ≤ C
hC : 0 ≤ C
⊢ ‖f‖ ≤ C

Next tactic:
rcases eq_top_or_lt_top p with (rfl | hp)
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  rcases eq_top_or_lt_top p with (rfl | hp)
  · 

Proof state:
case intro.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
C : ℝ
i : ι
hC : 0 ≤ C
_i : Fact (1 ≤ ⊤)
F : ι → ↥(lp E ⊤)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E ⊤)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
hi : ‖F i‖ ≤ C
⊢ ‖f‖ ≤ C

Next tactic:
apply norm_le_of_forall_le hC
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply norm_le_of_forall_le hC
    

Proof state:
case intro.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
C : ℝ
i : ι
hC : 0 ≤ C
_i : Fact (1 ≤ ⊤)
F : ι → ↥(lp E ⊤)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E ⊤)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
hi : ‖F i‖ ≤ C
⊢ ∀ (i : α), ‖↑f i‖ ≤ C

Next tactic:
exact norm_apply_le_of_tendsto hCF hf
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply norm_le_of_forall_le hC
    exact norm_apply_le_of_tendsto hCF hf
  · 

Proof state:
case intro.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
i : ι
hi : ‖F i‖ ≤ C
hC : 0 ≤ C
hp : p < ⊤
⊢ ‖f‖ ≤ C

Next tactic:
have : 0 < p := zero_lt_one.trans_le _i.elim
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply norm_le_of_forall_le hC
    exact norm_apply_le_of_tendsto hCF hf
  · have : 0 < p := zero_lt_one.trans_le _i.elim
    

Proof state:
case intro.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
i : ι
hi : ‖F i‖ ≤ C
hC : 0 ≤ C
hp : p < ⊤
this : 0 < p
⊢ ‖f‖ ≤ C

Next tactic:
have hp' : 0 < p.toReal := ENNReal.toReal_pos this.ne' hp.ne
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply norm_le_of_forall_le hC
    exact norm_apply_le_of_tendsto hCF hf
  · have : 0 < p := zero_lt_one.trans_le _i.elim
    have hp' : 0 < p.toReal := ENNReal.toReal_pos this.ne' hp.ne
    

Proof state:
case intro.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
i : ι
hi : ‖F i‖ ≤ C
hC : 0 ≤ C
hp : p < ⊤
this : 0 < p
hp' : 0 < ENNReal.toReal p
⊢ ‖f‖ ≤ C

Next tactic:
apply norm_le_of_forall_sum_le hp' hC
/-- "Semicontinuity of the `lp` norm": If all sufficiently large elements of a sequence in `lp E p`
 have `lp` norm `≤ C`, then the pointwise limit, if it exists, also has `lp` norm `≤ C`. -/
theorem norm_le_of_tendsto {C : ℝ} {F : ι → lp E p} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : ‖f‖ ≤ C := by
  obtain ⟨i, hi⟩ := hCF.exists
  have hC : 0 ≤ C := (norm_nonneg _).trans hi
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply norm_le_of_forall_le hC
    exact norm_apply_le_of_tendsto hCF hf
  · have : 0 < p := zero_lt_one.trans_le _i.elim
    have hp' : 0 < p.toReal := ENNReal.toReal_pos this.ne' hp.ne
    apply norm_le_of_forall_sum_le hp' hC
    

Proof state:
case intro.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
C : ℝ
F : ι → ↥(lp E p)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : ↥(lp E p)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 ↑f)
i : ι
hi : ‖F i‖ ≤ C
hC : 0 ≤ C
hp : p < ⊤
this : 0 < p
hp' : 0 < ENNReal.toReal p
⊢ ∀ (s : Finset α), ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
exact sum_rpow_le_of_tendsto hp.ne hCF hf
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
F : ι → ↥(lp E p)
hF : Bornology.IsBounded (Set.range F)
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
⊢ Memℓp f p

Next tactic:
obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  

Proof state:
case intro.intro
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
F : ι → ↥(lp E p)
hF : Bornology.IsBounded (Set.range F)
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
C : ℝ
left✝ : C > 0
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
⊢ Memℓp f p

Next tactic:
have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  

Proof state:
case intro.intro
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
F : ι → ↥(lp E p)
hF : Bornology.IsBounded (Set.range F)
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
C : ℝ
left✝ : C > 0
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
⊢ Memℓp f p

Next tactic:
rcases eq_top_or_lt_top p with (rfl | hp)
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  rcases eq_top_or_lt_top p with (rfl | hp)
  · 

Proof state:
case intro.intro.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
f : (a : α) → E a
C : ℝ
left✝ : C > 0
_i : Fact (1 ≤ ⊤)
F : ι → ↥(lp E ⊤)
hF : Bornology.IsBounded (Set.range F)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
⊢ Memℓp f ⊤

Next tactic:
apply memℓp_infty
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply memℓp_infty
    

Proof state:
case intro.intro.inl.hf
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
f : (a : α) → E a
C : ℝ
left✝ : C > 0
_i : Fact (1 ≤ ⊤)
F : ι → ↥(lp E ⊤)
hF : Bornology.IsBounded (Set.range F)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
⊢ BddAbove (Set.range fun i => ‖f i‖)

Next tactic:
use C
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply memℓp_infty
    use C
    

Proof state:
case h
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
f : (a : α) → E a
C : ℝ
left✝ : C > 0
_i : Fact (1 ≤ ⊤)
F : ι → ↥(lp E ⊤)
hF : Bornology.IsBounded (Set.range F)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
⊢ C ∈ upperBounds (Set.range fun i => ‖f i‖)

Next tactic:
rintro _ ⟨a, rfl⟩
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply memℓp_infty
    use C
    rintro _ ⟨a, rfl⟩
    

Proof state:
case h.intro
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
f : (a : α) → E a
C : ℝ
left✝ : C > 0
_i : Fact (1 ≤ ⊤)
F : ι → ↥(lp E ⊤)
hF : Bornology.IsBounded (Set.range F)
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
a : α
⊢ (fun i => ‖f i‖) a ≤ C

Next tactic:
refine' norm_apply_le_of_tendsto (eventually_of_forall hCF) hf a
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply memℓp_infty
    use C
    rintro _ ⟨a, rfl⟩
    refine' norm_apply_le_of_tendsto (eventually_of_forall hCF) hf a
  · 

Proof state:
case intro.intro.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
F : ι → ↥(lp E p)
hF : Bornology.IsBounded (Set.range F)
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
C : ℝ
left✝ : C > 0
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
hp : p < ⊤
⊢ Memℓp f p

Next tactic:
apply memℓp_gen'
/-- If `f` is the pointwise limit of a bounded sequence in `lp E p`, then `f` is in `lp E p`. -/
theorem memℓp_of_tendsto {F : ι → lp E p} (hF : Bornology.IsBounded (Set.range F)) {f : ∀ a, E a}
    (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) : Memℓp f p := by
  obtain ⟨C, _, hCF'⟩ := hF.exists_pos_norm_le
  have hCF : ∀ k, ‖F k‖ ≤ C := fun k => hCF' _ ⟨k, rfl⟩
  rcases eq_top_or_lt_top p with (rfl | hp)
  · apply memℓp_infty
    use C
    rintro _ ⟨a, rfl⟩
    refine' norm_apply_le_of_tendsto (eventually_of_forall hCF) hf a
  · apply memℓp_gen'
    

Proof state:
case intro.intro.inr.hf
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
F : ι → ↥(lp E p)
hF : Bornology.IsBounded (Set.range F)
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
C : ℝ
left✝ : C > 0
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
hp : p < ⊤
⊢ ∀ (s : Finset α), ∑ i in s, ‖f i‖ ^ ENNReal.toReal p ≤ ?intro.intro.inr.C
case intro.intro.inr.C
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
l : Filter ι
inst✝ : NeBot l
_i : Fact (1 ≤ p)
F : ι → ↥(lp E p)
hF : Bornology.IsBounded (Set.range F)
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
C : ℝ
left✝ : C > 0
hCF' : ∀ x ∈ Set.range F, ‖x‖ ≤ C
hCF : ∀ (k : ι), ‖F k‖ ≤ C
hp : p < ⊤
⊢ ℝ

Next tactic:
exact sum_rpow_le_of_tendsto hp.ne (eventually_of_forall hCF) hf