l3lab/ntp-mathlib huggingface dataset:
/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f := by
  have hp₀ : 0 < p := zero_lt_one.trans_le Fact.out
  have hp' : 0 < p.toReal := ENNReal.toReal_pos hp₀.ne' hp
  have := lp.hasSum_norm hp' f
  rw [HasSum, Metric.tendsto_nhds] at this ⊢
  intro ε hε
  refine' (this _ (Real.rpow_pos_of_pos hε p.toReal)).mono _
  intro s hs
  rw [← Real.rpow_lt_rpow_iff dist_nonneg (le_of_lt hε) hp']
  rw [dist_comm] at hs
  simp only [dist_eq_norm, Real.norm_eq_abs] at hs ⊢
  have H : ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal =
      ‖f‖ ^ p.toReal - ∑ i in s, ‖f i‖ ^ p.toReal := by
    

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁵ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝⁴ : NormedRing 𝕜
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝¹ : DecidableEq α
inst✝ : Fact (1 ≤ p)
hp : p ≠ ⊤
f : ↥(lp E p)
hp₀ : 0 < p
hp' : 0 < ENNReal.toReal p
this :
  ∀ ε > 0, ∀ᶠ (x : Finset α) in Filter.atTop, dist (∑ b in x, ‖↑f b‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p) < ε
ε : ℝ
hε : ε > 0
s : Finset α
hs : |‖f‖ ^ ENNReal.toReal p - ∑ x in s, ‖↑f x‖ ^ ENNReal.toReal p| < ε ^ ENNReal.toReal p
⊢ ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p = ‖f‖ ^ ENNReal.toReal p - ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
simpa only [coeFn_neg, Pi.neg_apply, lp.single_neg, Finset.sum_neg_distrib, neg_sub_neg,
      norm_neg, _root_.norm_neg] using lp.norm_compl_sum_single hp' (-f) s
/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f := by
  have hp₀ : 0 < p := zero_lt_one.trans_le Fact.out
  have hp' : 0 < p.toReal := ENNReal.toReal_pos hp₀.ne' hp
  have := lp.hasSum_norm hp' f
  rw [HasSum, Metric.tendsto_nhds] at this ⊢
  intro ε hε
  refine' (this _ (Real.rpow_pos_of_pos hε p.toReal)).mono _
  intro s hs
  rw [← Real.rpow_lt_rpow_iff dist_nonneg (le_of_lt hε) hp']
  rw [dist_comm] at hs
  simp only [dist_eq_norm, Real.norm_eq_abs] at hs ⊢
  have H : ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal =
      ‖f‖ ^ p.toReal - ∑ i in s, ‖f i‖ ^ p.toReal := by
    simpa only [coeFn_neg, Pi.neg_apply, lp.single_neg, Finset.sum_neg_distrib, neg_sub_neg,
      norm_neg, _root_.norm_neg] using lp.norm_compl_sum_single hp' (-f) s
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁵ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝⁴ : NormedRing 𝕜
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝¹ : DecidableEq α
inst✝ : Fact (1 ≤ p)
hp : p ≠ ⊤
f : ↥(lp E p)
hp₀ : 0 < p
hp' : 0 < ENNReal.toReal p
this :
  ∀ ε > 0, ∀ᶠ (x : Finset α) in Filter.atTop, dist (∑ b in x, ‖↑f b‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p) < ε
ε : ℝ
hε : ε > 0
s : Finset α
hs : |‖f‖ ^ ENNReal.toReal p - ∑ x in s, ‖↑f x‖ ^ ENNReal.toReal p| < ε ^ ENNReal.toReal p
H :
  ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p = ‖f‖ ^ ENNReal.toReal p - ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p
⊢ ‖∑ x in s, lp.single p x (↑f x) - f‖ ^ ENNReal.toReal p < ε ^ ENNReal.toReal p

Next tactic:
rw [← H] at hs
/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f := by
  have hp₀ : 0 < p := zero_lt_one.trans_le Fact.out
  have hp' : 0 < p.toReal := ENNReal.toReal_pos hp₀.ne' hp
  have := lp.hasSum_norm hp' f
  rw [HasSum, Metric.tendsto_nhds] at this ⊢
  intro ε hε
  refine' (this _ (Real.rpow_pos_of_pos hε p.toReal)).mono _
  intro s hs
  rw [← Real.rpow_lt_rpow_iff dist_nonneg (le_of_lt hε) hp']
  rw [dist_comm] at hs
  simp only [dist_eq_norm, Real.norm_eq_abs] at hs ⊢
  have H : ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal =
      ‖f‖ ^ p.toReal - ∑ i in s, ‖f i‖ ^ p.toReal := by
    simpa only [coeFn_neg, Pi.neg_apply, lp.single_neg, Finset.sum_neg_distrib, neg_sub_neg,
      norm_neg, _root_.norm_neg] using lp.norm_compl_sum_single hp' (-f) s
  rw [← H] at hs
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁵ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝⁴ : NormedRing 𝕜
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝¹ : DecidableEq α
inst✝ : Fact (1 ≤ p)
hp : p ≠ ⊤
f : ↥(lp E p)
hp₀ : 0 < p
hp' : 0 < ENNReal.toReal p
this :
  ∀ ε > 0, ∀ᶠ (x : Finset α) in Filter.atTop, dist (∑ b in x, ‖↑f b‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p) < ε
ε : ℝ
hε : ε > 0
s : Finset α
hs : |‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p| < ε ^ ENNReal.toReal p
H :
  ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p = ‖f‖ ^ ENNReal.toReal p - ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p
⊢ ‖∑ x in s, lp.single p x (↑f x) - f‖ ^ ENNReal.toReal p < ε ^ ENNReal.toReal p

Next tactic:
have : |‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal| =
      ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal := by
    simp only [Real.abs_rpow_of_nonneg (norm_nonneg _), abs_norm]
/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f := by
  have hp₀ : 0 < p := zero_lt_one.trans_le Fact.out
  have hp' : 0 < p.toReal := ENNReal.toReal_pos hp₀.ne' hp
  have := lp.hasSum_norm hp' f
  rw [HasSum, Metric.tendsto_nhds] at this ⊢
  intro ε hε
  refine' (this _ (Real.rpow_pos_of_pos hε p.toReal)).mono _
  intro s hs
  rw [← Real.rpow_lt_rpow_iff dist_nonneg (le_of_lt hε) hp']
  rw [dist_comm] at hs
  simp only [dist_eq_norm, Real.norm_eq_abs] at hs ⊢
  have H : ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal =
      ‖f‖ ^ p.toReal - ∑ i in s, ‖f i‖ ^ p.toReal := by
    simpa only [coeFn_neg, Pi.neg_apply, lp.single_neg, Finset.sum_neg_distrib, neg_sub_neg,
      norm_neg, _root_.norm_neg] using lp.norm_compl_sum_single hp' (-f) s
  rw [← H] at hs
  have : |‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal| =
      ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal := by
    

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁵ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝⁴ : NormedRing 𝕜
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝¹ : DecidableEq α
inst✝ : Fact (1 ≤ p)
hp : p ≠ ⊤
f : ↥(lp E p)
hp₀ : 0 < p
hp' : 0 < ENNReal.toReal p
this :
  ∀ ε > 0, ∀ᶠ (x : Finset α) in Filter.atTop, dist (∑ b in x, ‖↑f b‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p) < ε
ε : ℝ
hε : ε > 0
s : Finset α
hs : |‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p| < ε ^ ENNReal.toReal p
H :
  ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p = ‖f‖ ^ ENNReal.toReal p - ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p
⊢ |‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p| = ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p

Next tactic:
simp only [Real.abs_rpow_of_nonneg (norm_nonneg _), abs_norm]
/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f := by
  have hp₀ : 0 < p := zero_lt_one.trans_le Fact.out
  have hp' : 0 < p.toReal := ENNReal.toReal_pos hp₀.ne' hp
  have := lp.hasSum_norm hp' f
  rw [HasSum, Metric.tendsto_nhds] at this ⊢
  intro ε hε
  refine' (this _ (Real.rpow_pos_of_pos hε p.toReal)).mono _
  intro s hs
  rw [← Real.rpow_lt_rpow_iff dist_nonneg (le_of_lt hε) hp']
  rw [dist_comm] at hs
  simp only [dist_eq_norm, Real.norm_eq_abs] at hs ⊢
  have H : ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal =
      ‖f‖ ^ p.toReal - ∑ i in s, ‖f i‖ ^ p.toReal := by
    simpa only [coeFn_neg, Pi.neg_apply, lp.single_neg, Finset.sum_neg_distrib, neg_sub_neg,
      norm_neg, _root_.norm_neg] using lp.norm_compl_sum_single hp' (-f) s
  rw [← H] at hs
  have : |‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal| =
      ‖(∑ i in s, lp.single p i (f i : E i)) - f‖ ^ p.toReal := by
    simp only [Real.abs_rpow_of_nonneg (norm_nonneg _), abs_norm]
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁵ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝⁴ : NormedRing 𝕜
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝¹ : DecidableEq α
inst✝ : Fact (1 ≤ p)
hp : p ≠ ⊤
f : ↥(lp E p)
hp₀ : 0 < p
hp' : 0 < ENNReal.toReal p
this✝ :
  ∀ ε > 0, ∀ᶠ (x : Finset α) in Filter.atTop, dist (∑ b in x, ‖↑f b‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p) < ε
ε : ℝ
hε : ε > 0
s : Finset α
hs : |‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p| < ε ^ ENNReal.toReal p
H :
  ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p = ‖f‖ ^ ENNReal.toReal p - ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p
this :
  |‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p| = ‖∑ i in s, lp.single p i (↑f i) - f‖ ^ ENNReal.toReal p
⊢ ‖∑ x in s, lp.single p x (↑f x) - f‖ ^ ENNReal.toReal p < ε ^ ENNReal.toReal p

Next tactic:
exact this ▸ hs
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
⊢ UniformContinuous Subtype.val

Next tactic:
have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
⊢ UniformContinuous Subtype.val

Next tactic:
rw [uniformContinuous_pi]
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
⊢ ∀ (i : α), UniformContinuous fun x => ↑x i

Next tactic:
intro i
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  intro i
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
⊢ UniformContinuous fun x => ↑x i

Next tactic:
rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
    NormedAddCommGroup.uniformity_basis_dist]
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  intro i
  rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
    NormedAddCommGroup.uniformity_basis_dist]
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
⊢ ∀ (i_1 : ℝ),
    0 < i_1 →
      ∃ j, 0 < j ∧ ∀ (x y : ↥(lp E p)), (x, y) ∈ {p_1 | ‖p_1.1 - p_1.2‖ < j} → (↑x i, ↑y i) ∈ {p | ‖p.1 - p.2‖ < i_1}

Next tactic:
intro ε hε
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  intro i
  rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
    NormedAddCommGroup.uniformity_basis_dist]
  intro ε hε
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
⊢ ∃ j, 0 < j ∧ ∀ (x y : ↥(lp E p)), (x, y) ∈ {p_1 | ‖p_1.1 - p_1.2‖ < j} → (↑x i, ↑y i) ∈ {p | ‖p.1 - p.2‖ < ε}

Next tactic:
refine' ⟨ε, hε, _⟩
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  intro i
  rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
    NormedAddCommGroup.uniformity_basis_dist]
  intro ε hε
  refine' ⟨ε, hε, _⟩
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
⊢ ∀ (x y : ↥(lp E p)), (x, y) ∈ {p_1 | ‖p_1.1 - p_1.2‖ < ε} → (↑x i, ↑y i) ∈ {p | ‖p.1 - p.2‖ < ε}

Next tactic:
rintro f g (hfg : ‖f - g‖ < ε)
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  intro i
  rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
    NormedAddCommGroup.uniformity_basis_dist]
  intro ε hε
  refine' ⟨ε, hε, _⟩
  rintro f g (hfg : ‖f - g‖ < ε)
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
f g : ↥(lp E p)
hfg : ‖f - g‖ < ε
⊢ (↑f i, ↑g i) ∈ {p | ‖p.1 - p.2‖ < ε}

Next tactic:
have : ‖f i - g i‖ ≤ ‖f - g‖ := norm_apply_le_norm hp (f - g) i
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i) := by
  have hp : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
  rw [uniformContinuous_pi]
  intro i
  rw [NormedAddCommGroup.uniformity_basis_dist.uniformContinuous_iff
    NormedAddCommGroup.uniformity_basis_dist]
  intro ε hε
  refine' ⟨ε, hε, _⟩
  rintro f g (hfg : ‖f - g‖ < ε)
  have : ‖f i - g i‖ ≤ ‖f - g‖ := norm_apply_le_norm hp (f - g) i
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
_i : Fact (1 ≤ p)
hp : p ≠ 0
i : α
ε : ℝ
hε : 0 < ε
f g : ↥(lp E p)
hfg : ‖f - g‖ < ε
this : ‖↑f i - ↑g i‖ ≤ ‖f - g‖
⊢ (↑f i, ↑g i) ∈ {p | ‖p.1 - p.2‖ < ε}

Next tactic:
exact this.trans_lt hfg
theorem norm_apply_le_of_tendsto {C : ℝ} {F : ι → lp E ∞} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (a : α) : ‖f a‖ ≤ 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
C : ℝ
F : ι → ↥(lp E ⊤)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
a : α
⊢ ‖f a‖ ≤ C

Next tactic:
have : Tendsto (fun k => ‖F k a‖) l (𝓝 ‖f a‖) :=
    (Tendsto.comp (continuous_apply a).continuousAt hf).norm
theorem norm_apply_le_of_tendsto {C : ℝ} {F : ι → lp E ∞} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (a : α) : ‖f a‖ ≤ C := by
  have : Tendsto (fun k => ‖F k a‖) l (𝓝 ‖f a‖) :=
    (Tendsto.comp (continuous_apply a).continuousAt hf).norm
  

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
C : ℝ
F : ι → ↥(lp E ⊤)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
a : α
this : Tendsto (fun k => ‖↑(F k) a‖) l (𝓝 ‖f a‖)
⊢ ‖f a‖ ≤ C

Next tactic:
refine' le_of_tendsto this (hCF.mono _)
theorem norm_apply_le_of_tendsto {C : ℝ} {F : ι → lp E ∞} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (a : α) : ‖f a‖ ≤ C := by
  have : Tendsto (fun k => ‖F k a‖) l (𝓝 ‖f a‖) :=
    (Tendsto.comp (continuous_apply a).continuousAt hf).norm
  refine' le_of_tendsto this (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
C : ℝ
F : ι → ↥(lp E ⊤)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
a : α
this : Tendsto (fun k => ‖↑(F k) a‖) l (𝓝 ‖f a‖)
⊢ ∀ (x : ι), ‖F x‖ ≤ C → ‖↑(F x) a‖ ≤ C

Next tactic:
intro k hCFk
theorem norm_apply_le_of_tendsto {C : ℝ} {F : ι → lp E ∞} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (a : α) : ‖f a‖ ≤ C := by
  have : Tendsto (fun k => ‖F k a‖) l (𝓝 ‖f a‖) :=
    (Tendsto.comp (continuous_apply a).continuousAt hf).norm
  refine' le_of_tendsto this (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
C : ℝ
F : ι → ↥(lp E ⊤)
hCF : ∀ᶠ (k : ι) in l, ‖F k‖ ≤ C
f : (a : α) → E a
hf : Tendsto (id fun i => ↑(F i)) l (𝓝 f)
a : α
this : Tendsto (fun k => ‖↑(F k) a‖) l (𝓝 ‖f a‖)
k : ι
hCFk : ‖F k‖ ≤ C
⊢ ‖↑(F k) a‖ ≤ C

Next tactic:
exact (norm_apply_le_norm ENNReal.top_ne_zero (F k) a).trans 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
  

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 α
⊢ ∑ i in s, ‖f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
have hp' : p ≠ 0 := (zero_lt_one.trans_le _i.elim).ne'
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'
  

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
⊢ ∑ i in s, ‖f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp' hp
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
  

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
⊢ ∑ i in s, ‖f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
let G : (∀ a, E a) → ℝ := fun f => ∑ a in s, ‖f a‖ ^ p.toReal
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
  

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
⊢ ∑ i in s, ‖f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
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
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
    

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
⊢ Continuous G

Next tactic:
refine' continuous_finset_sum s _
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 _
    

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
⊢ ∀ i ∈ s, Continuous fun f => ‖f i‖ ^ ENNReal.toReal p

Next tactic:
intro a _
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 _
    

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
⊢ Continuous fun f => ‖f a‖ ^ ENNReal.toReal p

Next tactic:
have : Continuous fun f : ∀ a, E a => f a := continuous_apply a