l3lab/ntp-mathlib huggingface dataset:
theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' (hf.finite_dsupport.union hg.finite_dsupport).subset fun i => _
    simp only [Pi.add_apply, Ne.def, Set.mem_union, Set.mem_setOf_eq]
    contrapose!
    rintro ⟨hf', hg'⟩
    simp [hf', hg']
  · apply memℓp_infty
    obtain ⟨A, hA⟩ := hf.bddAbove
    obtain ⟨B, hB⟩ := hg.bddAbove
    refine' ⟨A + B, _⟩
    rintro a ⟨i, rfl⟩
    exact le_trans (norm_add_le _ _) (add_le_add (hA ⟨i, rfl⟩) (hB ⟨i, rfl⟩))
  apply memℓp_gen
  let C : ℝ := if p.toReal < 1 then 1 else (2 : ℝ) ^ (p.toReal - 1)
  refine' .of_nonneg_of_le _ (fun i => _) (((hf.summable hp).add (hg.summable hp)).mul_left C)
  · intro; positivity
  · refine' (Real.rpow_le_rpow (norm_nonneg _) (norm_add_le _ _) hp.le).trans _
    

Proof state:
case inr.inr.hf.refine'_2
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
hp : 0 < ENNReal.toReal p
C : ℝ := if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)
i : α
⊢ (‖f i‖ + ‖g i‖) ^ ENNReal.toReal p ≤ C * (‖f i‖ ^ ENNReal.toReal p + ‖g i‖ ^ ENNReal.toReal p)

Next tactic:
dsimp only
theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' (hf.finite_dsupport.union hg.finite_dsupport).subset fun i => _
    simp only [Pi.add_apply, Ne.def, Set.mem_union, Set.mem_setOf_eq]
    contrapose!
    rintro ⟨hf', hg'⟩
    simp [hf', hg']
  · apply memℓp_infty
    obtain ⟨A, hA⟩ := hf.bddAbove
    obtain ⟨B, hB⟩ := hg.bddAbove
    refine' ⟨A + B, _⟩
    rintro a ⟨i, rfl⟩
    exact le_trans (norm_add_le _ _) (add_le_add (hA ⟨i, rfl⟩) (hB ⟨i, rfl⟩))
  apply memℓp_gen
  let C : ℝ := if p.toReal < 1 then 1 else (2 : ℝ) ^ (p.toReal - 1)
  refine' .of_nonneg_of_le _ (fun i => _) (((hf.summable hp).add (hg.summable hp)).mul_left C)
  · intro; positivity
  · refine' (Real.rpow_le_rpow (norm_nonneg _) (norm_add_le _ _) hp.le).trans _
    dsimp only
    

Proof state:
case inr.inr.hf.refine'_2
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
hp : 0 < ENNReal.toReal p
C : ℝ := if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)
i : α
⊢ (‖f i‖ + ‖g i‖) ^ ENNReal.toReal p ≤
    (if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)) *
      (‖f i‖ ^ ENNReal.toReal p + ‖g i‖ ^ ENNReal.toReal p)

Next tactic:
split_ifs with h
theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' (hf.finite_dsupport.union hg.finite_dsupport).subset fun i => _
    simp only [Pi.add_apply, Ne.def, Set.mem_union, Set.mem_setOf_eq]
    contrapose!
    rintro ⟨hf', hg'⟩
    simp [hf', hg']
  · apply memℓp_infty
    obtain ⟨A, hA⟩ := hf.bddAbove
    obtain ⟨B, hB⟩ := hg.bddAbove
    refine' ⟨A + B, _⟩
    rintro a ⟨i, rfl⟩
    exact le_trans (norm_add_le _ _) (add_le_add (hA ⟨i, rfl⟩) (hB ⟨i, rfl⟩))
  apply memℓp_gen
  let C : ℝ := if p.toReal < 1 then 1 else (2 : ℝ) ^ (p.toReal - 1)
  refine' .of_nonneg_of_le _ (fun i => _) (((hf.summable hp).add (hg.summable hp)).mul_left C)
  · intro; positivity
  · refine' (Real.rpow_le_rpow (norm_nonneg _) (norm_add_le _ _) hp.le).trans _
    dsimp only
    split_ifs with h
    · 

Proof state:
case pos
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
hp : 0 < ENNReal.toReal p
C : ℝ := if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)
i : α
h : ENNReal.toReal p < 1
⊢ (‖f i‖ + ‖g i‖) ^ ENNReal.toReal p ≤ 1 * (‖f i‖ ^ ENNReal.toReal p + ‖g i‖ ^ ENNReal.toReal p)

Next tactic:
simpa using NNReal.coe_le_coe.2 (NNReal.rpow_add_le_add_rpow ‖f i‖₊ ‖g i‖₊ hp.le h.le)
theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' (hf.finite_dsupport.union hg.finite_dsupport).subset fun i => _
    simp only [Pi.add_apply, Ne.def, Set.mem_union, Set.mem_setOf_eq]
    contrapose!
    rintro ⟨hf', hg'⟩
    simp [hf', hg']
  · apply memℓp_infty
    obtain ⟨A, hA⟩ := hf.bddAbove
    obtain ⟨B, hB⟩ := hg.bddAbove
    refine' ⟨A + B, _⟩
    rintro a ⟨i, rfl⟩
    exact le_trans (norm_add_le _ _) (add_le_add (hA ⟨i, rfl⟩) (hB ⟨i, rfl⟩))
  apply memℓp_gen
  let C : ℝ := if p.toReal < 1 then 1 else (2 : ℝ) ^ (p.toReal - 1)
  refine' .of_nonneg_of_le _ (fun i => _) (((hf.summable hp).add (hg.summable hp)).mul_left C)
  · intro; positivity
  · refine' (Real.rpow_le_rpow (norm_nonneg _) (norm_add_le _ _) hp.le).trans _
    dsimp only
    split_ifs with h
    · simpa using NNReal.coe_le_coe.2 (NNReal.rpow_add_le_add_rpow ‖f i‖₊ ‖g i‖₊ hp.le h.le)
    · 

Proof state:
case neg
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
hp : 0 < ENNReal.toReal p
C : ℝ := if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)
i : α
h : ¬ENNReal.toReal p < 1
⊢ (‖f i‖ + ‖g i‖) ^ ENNReal.toReal p ≤
    2 ^ (ENNReal.toReal p - 1) * (‖f i‖ ^ ENNReal.toReal p + ‖g i‖ ^ ENNReal.toReal p)

Next tactic:
let F : Fin 2 → ℝ≥0 := ![‖f i‖₊, ‖g i‖₊]
theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' (hf.finite_dsupport.union hg.finite_dsupport).subset fun i => _
    simp only [Pi.add_apply, Ne.def, Set.mem_union, Set.mem_setOf_eq]
    contrapose!
    rintro ⟨hf', hg'⟩
    simp [hf', hg']
  · apply memℓp_infty
    obtain ⟨A, hA⟩ := hf.bddAbove
    obtain ⟨B, hB⟩ := hg.bddAbove
    refine' ⟨A + B, _⟩
    rintro a ⟨i, rfl⟩
    exact le_trans (norm_add_le _ _) (add_le_add (hA ⟨i, rfl⟩) (hB ⟨i, rfl⟩))
  apply memℓp_gen
  let C : ℝ := if p.toReal < 1 then 1 else (2 : ℝ) ^ (p.toReal - 1)
  refine' .of_nonneg_of_le _ (fun i => _) (((hf.summable hp).add (hg.summable hp)).mul_left C)
  · intro; positivity
  · refine' (Real.rpow_le_rpow (norm_nonneg _) (norm_add_le _ _) hp.le).trans _
    dsimp only
    split_ifs with h
    · simpa using NNReal.coe_le_coe.2 (NNReal.rpow_add_le_add_rpow ‖f i‖₊ ‖g i‖₊ hp.le h.le)
    · let F : Fin 2 → ℝ≥0 := ![‖f i‖₊, ‖g i‖₊]
      

Proof state:
case neg
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
hp : 0 < ENNReal.toReal p
C : ℝ := if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)
i : α
h : ¬ENNReal.toReal p < 1
F : Fin 2 → ℝ≥0 := ![‖f i‖₊, ‖g i‖₊]
⊢ (‖f i‖ + ‖g i‖) ^ ENNReal.toReal p ≤
    2 ^ (ENNReal.toReal p - 1) * (‖f i‖ ^ ENNReal.toReal p + ‖g i‖ ^ ENNReal.toReal p)

Next tactic:
simp only [not_lt] at h
theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' (hf.finite_dsupport.union hg.finite_dsupport).subset fun i => _
    simp only [Pi.add_apply, Ne.def, Set.mem_union, Set.mem_setOf_eq]
    contrapose!
    rintro ⟨hf', hg'⟩
    simp [hf', hg']
  · apply memℓp_infty
    obtain ⟨A, hA⟩ := hf.bddAbove
    obtain ⟨B, hB⟩ := hg.bddAbove
    refine' ⟨A + B, _⟩
    rintro a ⟨i, rfl⟩
    exact le_trans (norm_add_le _ _) (add_le_add (hA ⟨i, rfl⟩) (hB ⟨i, rfl⟩))
  apply memℓp_gen
  let C : ℝ := if p.toReal < 1 then 1 else (2 : ℝ) ^ (p.toReal - 1)
  refine' .of_nonneg_of_le _ (fun i => _) (((hf.summable hp).add (hg.summable hp)).mul_left C)
  · intro; positivity
  · refine' (Real.rpow_le_rpow (norm_nonneg _) (norm_add_le _ _) hp.le).trans _
    dsimp only
    split_ifs with h
    · simpa using NNReal.coe_le_coe.2 (NNReal.rpow_add_le_add_rpow ‖f i‖₊ ‖g i‖₊ hp.le h.le)
    · let F : Fin 2 → ℝ≥0 := ![‖f i‖₊, ‖g i‖₊]
      simp only [not_lt] at h
      

Proof state:
case neg
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
hp : 0 < ENNReal.toReal p
C : ℝ := if ENNReal.toReal p < 1 then 1 else 2 ^ (ENNReal.toReal p - 1)
i : α
F : Fin 2 → ℝ≥0 := ![‖f i‖₊, ‖g i‖₊]
h : 1 ≤ ENNReal.toReal p
⊢ (‖f i‖ + ‖g i‖) ^ ENNReal.toReal p ≤
    2 ^ (ENNReal.toReal p - 1) * (‖f i‖ ^ ENNReal.toReal p + ‖g i‖ ^ ENNReal.toReal p)

Next tactic:
simpa [Fin.sum_univ_succ] using
        Real.rpow_sum_le_const_mul_sum_rpow_of_nonneg Finset.univ h fun i _ => (F i).coe_nonneg
theorem sub {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f - g) p := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
⊢ Memℓp (f - g) p

Next tactic:
rw [sub_eq_add_neg]
theorem sub {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f - g) p := by
  rw [sub_eq_add_neg]; 

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
⊢ Memℓp (f + -g) p

Next tactic:
exact hf.add hg.neg
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s : Finset ι
f : ι → (i : α) → E i
hf : ∀ i ∈ s, Memℓp (f i) p
⊢ Memℓp (fun a => ∑ i in s, f i a) p

Next tactic:
haveI : DecidableEq ι := Classical.decEq _
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  haveI : DecidableEq ι := Classical.decEq _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s : Finset ι
f : ι → (i : α) → E i
hf : ∀ i ∈ s, Memℓp (f i) p
this : DecidableEq ι
⊢ Memℓp (fun a => ∑ i in s, f i a) p

Next tactic:
revert hf
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  haveI : DecidableEq ι := Classical.decEq _
  revert hf
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s : Finset ι
f : ι → (i : α) → E i
this : DecidableEq ι
⊢ (∀ i ∈ s, Memℓp (f i) p) → Memℓp (fun a => ∑ i in s, f i a) p

Next tactic:
refine' Finset.induction_on s _ _
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  haveI : DecidableEq ι := Classical.decEq _
  revert hf
  refine' Finset.induction_on s _ _
  · 

Proof state:
case refine'_1
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s : Finset ι
f : ι → (i : α) → E i
this : DecidableEq ι
⊢ (∀ i ∈ ∅, Memℓp (f i) p) → Memℓp (fun a => ∑ i in ∅, f i a) p

Next tactic:
simp only [zero_mem_ℓp', Finset.sum_empty, imp_true_iff]
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  haveI : DecidableEq ι := Classical.decEq _
  revert hf
  refine' Finset.induction_on s _ _
  · simp only [zero_mem_ℓp', Finset.sum_empty, imp_true_iff]
  · 

Proof state:
case refine'_2
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s : Finset ι
f : ι → (i : α) → E i
this : DecidableEq ι
⊢ ∀ ⦃a : ι⦄ {s : Finset ι},
    a ∉ s →
      ((∀ i ∈ s, Memℓp (f i) p) → Memℓp (fun a => ∑ i in s, f i a) p) →
        (∀ i ∈ insert a s, Memℓp (f i) p) → Memℓp (fun a_3 => ∑ i in insert a s, f i a_3) p

Next tactic:
intro i s his ih hf
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  haveI : DecidableEq ι := Classical.decEq _
  revert hf
  refine' Finset.induction_on s _ _
  · simp only [zero_mem_ℓp', Finset.sum_empty, imp_true_iff]
  · intro i s his ih hf
    

Proof state:
case refine'_2
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s✝ : Finset ι
f : ι → (i : α) → E i
this : DecidableEq ι
i : ι
s : Finset ι
his : i ∉ s
ih : (∀ i ∈ s, Memℓp (f i) p) → Memℓp (fun a => ∑ i in s, f i a) p
hf : ∀ i_1 ∈ insert i s, Memℓp (f i_1) p
⊢ Memℓp (fun a => ∑ i in insert i s, f i a) p

Next tactic:
simp only [his, Finset.sum_insert, not_false_iff]
theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i in s, f i a) p := by
  haveI : DecidableEq ι := Classical.decEq _
  revert hf
  refine' Finset.induction_on s _ _
  · simp only [zero_mem_ℓp', Finset.sum_empty, imp_true_iff]
  · intro i s his ih hf
    simp only [his, Finset.sum_insert, not_false_iff]
    

Proof state:
case refine'_2
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
s✝ : Finset ι
f : ι → (i : α) → E i
this : DecidableEq ι
i : ι
s : Finset ι
his : i ∉ s
ih : (∀ i ∈ s, Memℓp (f i) p) → Memℓp (fun a => ∑ i in s, f i a) p
hf : ∀ i_1 ∈ insert i s, Memℓp (f i_1) p
⊢ Memℓp (fun a => f i a + ∑ i in s, f i a) p

Next tactic:
exact (hf i (s.mem_insert_self i)).add (ih fun j hj => hf j (Finset.mem_insert_of_mem hj))
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := 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)
f : (i : α) → E i
hf : Memℓp f p
c : 𝕜
⊢ Memℓp (c • f) p

Next tactic:
rcases p.trichotomy with (rfl | rfl | hp)
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · 

Proof state:
case inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f 0
⊢ Memℓp (c • f) 0

Next tactic:
apply memℓp_zero
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    

Proof state:
case inl.hf
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f 0
⊢ Set.Finite {i | (c • f) i ≠ 0}

Next tactic:
refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    

Proof state:
case inl.hf
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f 0
i : α
⊢ ¬c • f i = 0 → ¬f i = 0

Next tactic:
exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f ⊤
⊢ Memℓp (c • f) ⊤

Next tactic:
obtain ⟨A, hA⟩ := hf.bddAbove
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    

Proof state:
case inr.inl.intro
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f ⊤
A : ℝ
hA : A ∈ upperBounds (Set.range fun i => ‖f i‖)
⊢ Memℓp (c • f) ⊤

Next tactic:
refine' memℓp_infty ⟨‖c‖ * A, _⟩
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    

Proof state:
case inr.inl.intro
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f ⊤
A : ℝ
hA : A ∈ upperBounds (Set.range fun i => ‖f i‖)
⊢ ‖c‖ * A ∈ upperBounds (Set.range fun i => ‖(c • f) i‖)

Next tactic:
rintro a ⟨i, rfl⟩
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    

Proof state:
case inr.inl.intro.intro
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f ⊤
A : ℝ
hA : A ∈ upperBounds (Set.range fun i => ‖f i‖)
i : α
⊢ (fun i => ‖(c • f) i‖) i ≤ ‖c‖ * A

Next tactic:
refine' (norm_smul_le _ _).trans _
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    refine' (norm_smul_le _ _).trans _
    

Proof state:
case inr.inl.intro.intro
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f ⊤
A : ℝ
hA : A ∈ upperBounds (Set.range fun i => ‖f i‖)
i : α
⊢ ‖c‖ * ‖f i‖ ≤ ‖c‖ * A

Next tactic:
gcongr
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    refine' (norm_smul_le _ _).trans _
    gcongr
    

Proof state:
case inr.inl.intro.intro.h
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
f : (i : α) → E i
c : 𝕜
hf : Memℓp f ⊤
A : ℝ
hA : A ∈ upperBounds (Set.range fun i => ‖f i‖)
i : α
⊢ ‖f i‖ ≤ A

Next tactic:
exact hA ⟨i, rfl⟩
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    refine' (norm_smul_le _ _).trans _
    gcongr
    exact hA ⟨i, rfl⟩
  · 

Proof state:
case inr.inr
α : 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)
f : (i : α) → E i
hf : Memℓp f p
c : 𝕜
hp : 0 < ENNReal.toReal p
⊢ Memℓp (c • f) p

Next tactic:
apply memℓp_gen
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    refine' (norm_smul_le _ _).trans _
    gcongr
    exact hA ⟨i, rfl⟩
  · apply memℓp_gen
    

Proof state:
case inr.inr.hf
α : 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)
f : (i : α) → E i
hf : Memℓp f p
c : 𝕜
hp : 0 < ENNReal.toReal p
⊢ Summable fun i => ‖(c • f) i‖ ^ ENNReal.toReal p

Next tactic:
have := (hf.summable hp).mul_left (↑(‖c‖₊ ^ p.toReal) : ℝ)
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    refine' (norm_smul_le _ _).trans _
    gcongr
    exact hA ⟨i, rfl⟩
  · apply memℓp_gen
    have := (hf.summable hp).mul_left (↑(‖c‖₊ ^ p.toReal) : ℝ)
    

Proof state:
case inr.inr.hf
α : 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)
f : (i : α) → E i
hf : Memℓp f p
c : 𝕜
hp : 0 < ENNReal.toReal p
this : Summable fun i => ↑(‖c‖₊ ^ ENNReal.toReal p) * ‖f i‖ ^ ENNReal.toReal p
⊢ Summable fun i => ‖(c • f) i‖ ^ ENNReal.toReal p

Next tactic:
simp_rw [← coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul, NNReal.summable_coe,
      ← NNReal.mul_rpow] at this ⊢
theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · apply memℓp_zero
    refine' hf.finite_dsupport.subset fun i => (_ : ¬c • f i = 0 → ¬f i = 0)
    exact not_imp_not.mpr fun hf' => hf'.symm ▸ smul_zero c
  · obtain ⟨A, hA⟩ := hf.bddAbove
    refine' memℓp_infty ⟨‖c‖ * A, _⟩
    rintro a ⟨i, rfl⟩
    refine' (norm_smul_le _ _).trans _
    gcongr
    exact hA ⟨i, rfl⟩
  · apply memℓp_gen
    have := (hf.summable hp).mul_left (↑(‖c‖₊ ^ p.toReal) : ℝ)
    simp_rw [← coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul, NNReal.summable_coe,
      ← NNReal.mul_rpow] at this ⊢
    

Proof state:
case inr.inr.hf
α : 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)
f : (i : α) → E i
hf : Memℓp f p
c : 𝕜
hp : 0 < ENNReal.toReal p
this : Summable fun a => (‖c‖₊ * ‖f a‖₊) ^ ENNReal.toReal p
⊢ Summable fun a => ‖(c • f) a‖₊ ^ ENNReal.toReal p

Next tactic:
refine' NNReal.summable_of_le _ this