l3lab/ntp-mathlib huggingface dataset:
/-- Hölder inequality -/
protected theorem tsum_mul_le_mul_norm {p q : ℝ≥0∞} (hpq : p.toReal.IsConjugateExponent q.toReal)
    (f : lp E p) (g : lp E q) :
    (Summable fun i => ‖f i‖ * ‖g i‖) ∧ ∑' i, ‖f i‖ * ‖g i‖ ≤ ‖f‖ * ‖g‖ := by
  have hf₁ : ∀ i, 0 ≤ ‖f i‖ := fun i => norm_nonneg _
  have hg₁ : ∀ i, 0 ≤ ‖g i‖ := fun i => norm_nonneg _
  have hf₂ := lp.hasSum_norm hpq.pos f
  have hg₂ := lp.hasSum_norm hpq.symm.pos g
  obtain ⟨C, -, hC', hC⟩ :=
    Real.inner_le_Lp_mul_Lq_hasSum_of_nonneg hpq (norm_nonneg' _) (norm_nonneg' _) hf₁ hg₁ hf₂ hg₂
  rw [← hC.tsum_eq] at hC'
  

Proof state:
case intro.intro.intro
α : Type u_1
E : α → Type u_2
p✝ q✝ : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
p q : ℝ≥0∞
hpq : Real.IsConjugateExponent (ENNReal.toReal p) (ENNReal.toReal q)
f : ↥(lp E p)
g : ↥(lp E q)
hf₁ : ∀ (i : α), 0 ≤ ‖↑f i‖
hg₁ : ∀ (i : α), 0 ≤ ‖↑g i‖
hf₂ : HasSum (fun i => ‖↑f i‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p)
hg₂ : HasSum (fun i => ‖↑g i‖ ^ ENNReal.toReal q) (‖g‖ ^ ENNReal.toReal q)
C : ℝ
hC' : ∑' (b : α), ‖↑f b‖ * ‖↑g b‖ ≤ ‖f‖ * ‖g‖
hC : HasSum (fun i => ‖↑f i‖ * ‖↑g i‖) C
⊢ (Summable fun i => ‖↑f i‖ * ‖↑g i‖) ∧ ∑' (i : α), ‖↑f i‖ * ‖↑g i‖ ≤ ‖f‖ * ‖g‖

Next tactic:
exact ⟨hC.summable, hC'⟩
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : p ≠ 0
f : ↥(lp E p)
i : α
⊢ ‖↑f i‖ ≤ ‖f‖

Next tactic:
rcases eq_or_ne p ∞ with (rfl | hp')
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  rcases eq_or_ne p ∞ with (rfl | hp')
  · 

Proof state:
case inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
i : α
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
⊢ ‖↑f i‖ ≤ ‖f‖

Next tactic:
haveI : Nonempty α := ⟨i⟩
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  rcases eq_or_ne p ∞ with (rfl | hp')
  · haveI : Nonempty α := ⟨i⟩
    

Proof state:
case inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
i : α
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
this : Nonempty α
⊢ ‖↑f i‖ ≤ ‖f‖

Next tactic:
exact (isLUB_norm f).1 ⟨i, rfl⟩
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  rcases eq_or_ne p ∞ with (rfl | hp')
  · haveI : Nonempty α := ⟨i⟩
    exact (isLUB_norm f).1 ⟨i, rfl⟩
  

Proof state:
case inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : p ≠ 0
f : ↥(lp E p)
i : α
hp' : p ≠ ⊤
⊢ ‖↑f i‖ ≤ ‖f‖

Next tactic:
have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp hp'
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  rcases eq_or_ne p ∞ with (rfl | hp')
  · haveI : Nonempty α := ⟨i⟩
    exact (isLUB_norm f).1 ⟨i, rfl⟩
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp hp'
  

Proof state:
case inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : p ≠ 0
f : ↥(lp E p)
i : α
hp' : p ≠ ⊤
hp'' : 0 < ENNReal.toReal p
⊢ ‖↑f i‖ ≤ ‖f‖

Next tactic:
have : ∀ i, 0 ≤ ‖f i‖ ^ p.toReal := fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  rcases eq_or_ne p ∞ with (rfl | hp')
  · haveI : Nonempty α := ⟨i⟩
    exact (isLUB_norm f).1 ⟨i, rfl⟩
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp hp'
  have : ∀ i, 0 ≤ ‖f i‖ ^ p.toReal := fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
  

Proof state:
case inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : p ≠ 0
f : ↥(lp E p)
i : α
hp' : p ≠ ⊤
hp'' : 0 < ENNReal.toReal p
this : ∀ (i : α), 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p
⊢ ‖↑f i‖ ≤ ‖f‖

Next tactic:
rw [← Real.rpow_le_rpow_iff (norm_nonneg _) (norm_nonneg' _) hp'']
theorem norm_apply_le_norm (hp : p ≠ 0) (f : lp E p) (i : α) : ‖f i‖ ≤ ‖f‖ := by
  rcases eq_or_ne p ∞ with (rfl | hp')
  · haveI : Nonempty α := ⟨i⟩
    exact (isLUB_norm f).1 ⟨i, rfl⟩
  have hp'' : 0 < p.toReal := ENNReal.toReal_pos hp hp'
  have : ∀ i, 0 ≤ ‖f i‖ ^ p.toReal := fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
  rw [← Real.rpow_le_rpow_iff (norm_nonneg _) (norm_nonneg' _) hp'']
  

Proof state:
case inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : p ≠ 0
f : ↥(lp E p)
i : α
hp' : p ≠ ⊤
hp'' : 0 < ENNReal.toReal p
this : ∀ (i : α), 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p
⊢ ‖↑f i‖ ^ ENNReal.toReal p ≤ ‖f‖ ^ ENNReal.toReal p

Next tactic:
convert le_hasSum (hasSum_norm hp'' f) i fun i _ => this i
theorem sum_rpow_le_norm_rpow (hp : 0 < p.toReal) (f : lp E p) (s : Finset α) :
    ∑ i in s, ‖f i‖ ^ p.toReal ≤ ‖f‖ ^ p.toReal := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : ↥(lp E p)
s : Finset α
⊢ ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p ≤ ‖f‖ ^ ENNReal.toReal p

Next tactic:
rw [lp.norm_rpow_eq_tsum hp f]
theorem sum_rpow_le_norm_rpow (hp : 0 < p.toReal) (f : lp E p) (s : Finset α) :
    ∑ i in s, ‖f i‖ ^ p.toReal ≤ ‖f‖ ^ p.toReal := by
  rw [lp.norm_rpow_eq_tsum hp f]
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : ↥(lp E p)
s : Finset α
⊢ ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p ≤ ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
have : ∀ i, 0 ≤ ‖f i‖ ^ p.toReal := fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
theorem sum_rpow_le_norm_rpow (hp : 0 < p.toReal) (f : lp E p) (s : Finset α) :
    ∑ i in s, ‖f i‖ ^ p.toReal ≤ ‖f‖ ^ p.toReal := by
  rw [lp.norm_rpow_eq_tsum hp f]
  have : ∀ i, 0 ≤ ‖f i‖ ^ p.toReal := fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : ↥(lp E p)
s : Finset α
this : ∀ (i : α), 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p
⊢ ∑ i in s, ‖↑f i‖ ^ ENNReal.toReal p ≤ ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
refine' sum_le_tsum _ (fun i _ => this i) _
theorem sum_rpow_le_norm_rpow (hp : 0 < p.toReal) (f : lp E p) (s : Finset α) :
    ∑ i in s, ‖f i‖ ^ p.toReal ≤ ‖f‖ ^ p.toReal := by
  rw [lp.norm_rpow_eq_tsum hp f]
  have : ∀ i, 0 ≤ ‖f i‖ ^ p.toReal := fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
  refine' sum_le_tsum _ (fun i _ => this i) _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : ↥(lp E p)
s : Finset α
this : ∀ (i : α), 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p
⊢ Summable fun i => ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
exact (lp.memℓp f).summable hp
theorem norm_le_of_forall_le' [Nonempty α] {f : lp E ∞} (C : ℝ) (hCf : ∀ i, ‖f i‖ ≤ C) :
    ‖f‖ ≤ C := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Nonempty α
f : ↥(lp E ⊤)
C : ℝ
hCf : ∀ (i : α), ‖↑f i‖ ≤ C
⊢ ‖f‖ ≤ C

Next tactic:
refine' (isLUB_norm f).2 _
theorem norm_le_of_forall_le' [Nonempty α] {f : lp E ∞} (C : ℝ) (hCf : ∀ i, ‖f i‖ ≤ C) :
    ‖f‖ ≤ C := by
  refine' (isLUB_norm f).2 _
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Nonempty α
f : ↥(lp E ⊤)
C : ℝ
hCf : ∀ (i : α), ‖↑f i‖ ≤ C
⊢ C ∈ upperBounds (Set.range fun i => ‖↑f i‖)

Next tactic:
rintro - ⟨i, rfl⟩
theorem norm_le_of_forall_le' [Nonempty α] {f : lp E ∞} (C : ℝ) (hCf : ∀ i, ‖f i‖ ≤ C) :
    ‖f‖ ≤ C := by
  refine' (isLUB_norm f).2 _
  rintro - ⟨i, rfl⟩
  

Proof state:
case intro
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Nonempty α
f : ↥(lp E ⊤)
C : ℝ
hCf : ∀ (i : α), ‖↑f i‖ ≤ C
i : α
⊢ (fun i => ‖↑f i‖) i ≤ C

Next tactic:
exact hCf i
theorem norm_le_of_forall_le {f : lp E ∞} {C : ℝ} (hC : 0 ≤ C) (hCf : ∀ i, ‖f i‖ ≤ C) :
    ‖f‖ ≤ C := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
C : ℝ
hC : 0 ≤ C
hCf : ∀ (i : α), ‖↑f i‖ ≤ C
⊢ ‖f‖ ≤ C

Next tactic:
cases isEmpty_or_nonempty α
theorem norm_le_of_forall_le {f : lp E ∞} {C : ℝ} (hC : 0 ≤ C) (hCf : ∀ i, ‖f i‖ ≤ C) :
    ‖f‖ ≤ C := by
  cases isEmpty_or_nonempty α
  · 

Proof state:
case inl
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
C : ℝ
hC : 0 ≤ C
hCf : ∀ (i : α), ‖↑f i‖ ≤ C
h✝ : IsEmpty α
⊢ ‖f‖ ≤ C

Next tactic:
simpa [eq_zero' f] using hC
theorem norm_le_of_forall_le {f : lp E ∞} {C : ℝ} (hC : 0 ≤ C) (hCf : ∀ i, ‖f i‖ ≤ C) :
    ‖f‖ ≤ C := by
  cases isEmpty_or_nonempty α
  · simpa [eq_zero' f] using hC
  · 

Proof state:
case inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
C : ℝ
hC : 0 ≤ C
hCf : ∀ (i : α), ‖↑f i‖ ≤ C
h✝ : Nonempty α
⊢ ‖f‖ ≤ C

Next tactic:
exact norm_le_of_forall_le' C hCf
theorem norm_le_of_tsum_le (hp : 0 < p.toReal) {C : ℝ} (hC : 0 ≤ C) {f : lp E p}
    (hf : ∑' i, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal) : ‖f‖ ≤ C := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
C : ℝ
hC : 0 ≤ C
f : ↥(lp E p)
hf : ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p
⊢ ‖f‖ ≤ C

Next tactic:
rw [← Real.rpow_le_rpow_iff (norm_nonneg' _) hC hp, norm_rpow_eq_tsum hp]
theorem norm_le_of_tsum_le (hp : 0 < p.toReal) {C : ℝ} (hC : 0 ≤ C) {f : lp E p}
    (hf : ∑' i, ‖f i‖ ^ p.toReal ≤ C ^ p.toReal) : ‖f‖ ≤ C := by
  rw [← Real.rpow_le_rpow_iff (norm_nonneg' _) hC hp, norm_rpow_eq_tsum hp]
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
C : ℝ
hC : 0 ≤ C
f : ↥(lp E p)
hf : ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p
⊢ ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p ≤ C ^ ENNReal.toReal p

Next tactic:
exact hf
/-- The `𝕜`-submodule of elements of `∀ i : α, E i` whose `lp` norm is finite. This is `lp E p`,
with extra structure. -/
def _root_.lpSubmodule : Submodule 𝕜 (PreLp E) :=
  { lp E p with smul_mem' := fun c f hf => by 

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
src✝ : AddSubgroup (PreLp E) := lp E p
c : 𝕜
f : PreLp E
hf : f ∈ src✝.carrier
⊢ c • f ∈ src✝.carrier

Next tactic:
simpa using mem_lp_const_smul c ⟨f, hf⟩
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
hp : p ≠ 0
c : 𝕜
f : ↥(lp E p)
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
rcases p.trichotomy with (rfl | rfl | hp)
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := 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
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : 0 ≠ 0
f : ↥(lp E 0)
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
exact absurd rfl hp
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
cases isEmpty_or_nonempty α
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · 

Proof state:
case inr.inl.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : IsEmpty α
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
simp [lp.eq_zero' f]
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
have hcf := lp.isLUB_norm (c • f)
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
hfc : IsLUB ((fun b => ‖c‖ * b) '' Set.range fun i => ‖↑f i‖) (‖c‖ * ‖f‖)
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
simp_rw [← Set.range_comp, Function.comp] at hfc
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
hfc : IsLUB (Set.range fun x => ‖c‖ * ‖↑f x‖) (‖c‖ * ‖f‖)
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
refine' hcf.right _
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    refine' hcf.right _
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
hfc : IsLUB (Set.range fun x => ‖c‖ * ‖↑f x‖) (‖c‖ * ‖f‖)
⊢ ‖c‖ * ‖f‖ ∈ upperBounds (Set.range fun i => ‖↑(c • f) i‖)

Next tactic:
have := hfc.left
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    refine' hcf.right _
    have := hfc.left
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
hfc : IsLUB (Set.range fun x => ‖c‖ * ‖↑f x‖) (‖c‖ * ‖f‖)
this : ‖c‖ * ‖f‖ ∈ upperBounds (Set.range fun x => ‖c‖ * ‖↑f x‖)
⊢ ‖c‖ * ‖f‖ ∈ upperBounds (Set.range fun i => ‖↑(c • f) i‖)

Next tactic:
simp_rw [mem_upperBounds, Set.mem_range,
      forall_exists_index, forall_apply_eq_imp_iff] at this ⊢
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    refine' hcf.right _
    have := hfc.left
    simp_rw [mem_upperBounds, Set.mem_range,
      forall_exists_index, forall_apply_eq_imp_iff] at this ⊢
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
hfc : IsLUB (Set.range fun x => ‖c‖ * ‖↑f x‖) (‖c‖ * ‖f‖)
this : ∀ (a : α), ‖c‖ * ‖↑f a‖ ≤ ‖c‖ * ‖f‖
⊢ ∀ (a : α), ‖↑(c • f) a‖ ≤ ‖c‖ * ‖f‖

Next tactic:
intro a
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    refine' hcf.right _
    have := hfc.left
    simp_rw [mem_upperBounds, Set.mem_range,
      forall_exists_index, forall_apply_eq_imp_iff] at this ⊢
    intro a
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
c : 𝕜
hp : ⊤ ≠ 0
f : ↥(lp E ⊤)
h✝ : Nonempty α
hcf : IsLUB (Set.range fun i => ‖↑(c • f) i‖) ‖c • f‖
hfc : IsLUB (Set.range fun x => ‖c‖ * ‖↑f x‖) (‖c‖ * ‖f‖)
this : ∀ (a : α), ‖c‖ * ‖↑f a‖ ≤ ‖c‖ * ‖f‖
a : α
⊢ ‖↑(c • f) a‖ ≤ ‖c‖ * ‖f‖

Next tactic:
exact (norm_smul_le _ _).trans (this a)
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    refine' hcf.right _
    have := hfc.left
    simp_rw [mem_upperBounds, Set.mem_range,
      forall_exists_index, forall_apply_eq_imp_iff] at this ⊢
    intro a
    exact (norm_smul_le _ _).trans (this a)
  · 

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
hp✝ : p ≠ 0
c : 𝕜
f : ↥(lp E p)
hp : 0 < ENNReal.toReal p
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
letI inst : NNNorm (lp E p) := ⟨fun f => ⟨‖f‖, norm_nonneg' _⟩⟩
theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · exact absurd rfl hp
  · cases isEmpty_or_nonempty α
    · simp [lp.eq_zero' f]
    have hcf := lp.isLUB_norm (c • f)
    have hfc := (lp.isLUB_norm f).mul_left (norm_nonneg c)
    simp_rw [← Set.range_comp, Function.comp] at hfc
    -- TODO: some `IsLUB` API should make it a one-liner from here.
    refine' hcf.right _
    have := hfc.left
    simp_rw [mem_upperBounds, Set.mem_range,
      forall_exists_index, forall_apply_eq_imp_iff] at this ⊢
    intro a
    exact (norm_smul_le _ _).trans (this a)
  · letI inst : NNNorm (lp E p) := ⟨fun f => ⟨‖f‖, norm_nonneg' _⟩⟩
    

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁶ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
𝕜' : Type u_4
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : (i : α) → Module 𝕜 (E i)
inst✝² : (i : α) → Module 𝕜' (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜' (E i)
hp✝ : p ≠ 0
c : 𝕜
f : ↥(lp E p)
hp : 0 < ENNReal.toReal p
inst : NNNorm ↥(lp E p) := { nnnorm := fun f => { val := ‖f‖, property := (_ : 0 ≤ ‖f‖) } }
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl