l3lab/ntp-mathlib huggingface dataset:
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    

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‖) } }
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] 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 ⊢
    intro a
    exact (norm_smul_le _ _).trans (this a)
  · letI inst : NNNorm (lp E p) := ⟨fun f => ⟨‖f‖, norm_nonneg' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal 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)
hp : 0 < ENNReal.toReal p
inst : NNNorm ↥(lp E p) := { nnnorm := fun f => { val := ‖f‖, property := (_ : 0 ≤ ‖f‖) } }
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
this : ‖c • f‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖f‖₊) ^ ENNReal.toReal p
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
rwa [NNReal.rpow_le_rpow_iff hp] 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 ⊢
    intro a
    exact (norm_smul_le _ _).trans (this a)
  · letI inst : NNNorm (lp E p) := ⟨fun f => ⟨‖f‖, norm_nonneg' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    

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‖) } }
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
⊢ ‖c • f‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖f‖₊) ^ ENNReal.toReal p

Next tactic:
clear_value inst
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
⊢ ‖c • f‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖f‖₊) ^ ENNReal.toReal p

Next tactic:
rw [NNReal.mul_rpow]
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
⊢ ‖c • f‖₊ ^ ENNReal.toReal p ≤ ‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p

Next tactic:
have hLHS := lp.hasSum_norm hp (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)
    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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hLHS : HasSum (fun i => ‖↑(c • f) i‖ ^ ENNReal.toReal p) (‖c • f‖ ^ ENNReal.toReal p)
⊢ ‖c • f‖₊ ^ ENNReal.toReal p ≤ ‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p

Next tactic:
have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hLHS : HasSum (fun i => ‖↑(c • f) i‖ ^ ENNReal.toReal p) (‖c • f‖ ^ ENNReal.toReal p)
hRHS :
  HasSum (fun i => ‖c‖ ^ ENNReal.toReal p * ‖↑f i‖ ^ ENNReal.toReal p) (‖c‖ ^ ENNReal.toReal p * ‖f‖ ^ ENNReal.toReal p)
⊢ ‖c • f‖₊ ^ ENNReal.toReal p ≤ ‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p

Next tactic:
simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hRHS :
  HasSum (fun a => ‖c‖₊ ^ ENNReal.toReal p * ‖↑f a‖₊ ^ ENNReal.toReal p)
    (‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p)
hLHS : HasSum (fun a => ‖↑(c • f) a‖₊ ^ ENNReal.toReal p) (‖c • f‖₊ ^ ENNReal.toReal p)
⊢ ‖c • f‖₊ ^ ENNReal.toReal p ≤ ‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p

Next tactic:
refine' hasSum_mono hLHS hRHS fun i => _
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
    refine' hasSum_mono hLHS hRHS fun i => _
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hRHS :
  HasSum (fun a => ‖c‖₊ ^ ENNReal.toReal p * ‖↑f a‖₊ ^ ENNReal.toReal p)
    (‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p)
hLHS : HasSum (fun a => ‖↑(c • f) a‖₊ ^ ENNReal.toReal p) (‖c • f‖₊ ^ ENNReal.toReal p)
i : α
⊢ ‖↑(c • f) i‖₊ ^ ENNReal.toReal p ≤ ‖c‖₊ ^ ENNReal.toReal p * ‖↑f i‖₊ ^ ENNReal.toReal p

Next tactic:
dsimp only
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
    refine' hasSum_mono hLHS hRHS fun i => _
    dsimp only
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hRHS :
  HasSum (fun a => ‖c‖₊ ^ ENNReal.toReal p * ‖↑f a‖₊ ^ ENNReal.toReal p)
    (‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p)
hLHS : HasSum (fun a => ‖↑(c • f) a‖₊ ^ ENNReal.toReal p) (‖c • f‖₊ ^ ENNReal.toReal p)
i : α
⊢ ‖↑(c • f) i‖₊ ^ ENNReal.toReal p ≤ ‖c‖₊ ^ ENNReal.toReal p * ‖↑f i‖₊ ^ ENNReal.toReal p

Next tactic:
rw [← NNReal.mul_rpow]
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
    refine' hasSum_mono hLHS hRHS fun i => _
    dsimp only
    rw [← NNReal.mul_rpow]
    -- Porting note: added
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hRHS :
  HasSum (fun a => ‖c‖₊ ^ ENNReal.toReal p * ‖↑f a‖₊ ^ ENNReal.toReal p)
    (‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p)
hLHS : HasSum (fun a => ‖↑(c • f) a‖₊ ^ ENNReal.toReal p) (‖c • f‖₊ ^ ENNReal.toReal p)
i : α
⊢ ‖↑(c • f) i‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖↑f i‖₊) ^ ENNReal.toReal p

Next tactic:
rw [lp.coeFn_smul, Pi.smul_apply]
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
    refine' hasSum_mono hLHS hRHS fun i => _
    dsimp only
    rw [← NNReal.mul_rpow]
    -- Porting note: added
    rw [lp.coeFn_smul, Pi.smul_apply]
    

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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hRHS :
  HasSum (fun a => ‖c‖₊ ^ ENNReal.toReal p * ‖↑f a‖₊ ^ ENNReal.toReal p)
    (‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p)
hLHS : HasSum (fun a => ‖↑(c • f) a‖₊ ^ ENNReal.toReal p) (‖c • f‖₊ ^ ENNReal.toReal p)
i : α
⊢ ‖c • ↑f i‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖↑f i‖₊) ^ ENNReal.toReal p

Next tactic:
gcongr
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' _⟩⟩
    have coe_nnnorm : ∀ f : lp E p, ↑‖f‖₊ = ‖f‖ := fun _ => rfl
    suffices ‖c • f‖₊ ^ p.toReal ≤ (‖c‖₊ * ‖f‖₊) ^ p.toReal by
      rwa [NNReal.rpow_le_rpow_iff hp] at this
    clear_value inst
    rw [NNReal.mul_rpow]
    have hLHS := lp.hasSum_norm hp (c • f)
    have hRHS := (lp.hasSum_norm hp f).mul_left (‖c‖ ^ p.toReal)
    simp_rw [← coe_nnnorm, ← _root_.coe_nnnorm, ← NNReal.coe_rpow, ← NNReal.coe_mul,
      NNReal.hasSum_coe] at hRHS hLHS
    refine' hasSum_mono hLHS hRHS fun i => _
    dsimp only
    rw [← NNReal.mul_rpow]
    -- Porting note: added
    rw [lp.coeFn_smul, Pi.smul_apply]
    gcongr
    

Proof state:
case inr.inr.h₁.h
α : 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)
coe_nnnorm : ∀ (f : ↥(lp E p)), ↑‖f‖₊ = ‖f‖
hRHS :
  HasSum (fun a => ‖c‖₊ ^ ENNReal.toReal p * ‖↑f a‖₊ ^ ENNReal.toReal p)
    (‖c‖₊ ^ ENNReal.toReal p * ‖f‖₊ ^ ENNReal.toReal p)
hLHS : HasSum (fun a => ‖↑(c • f) a‖₊ ^ ENNReal.toReal p) (‖c • f‖₊ ^ ENNReal.toReal p)
i : α
⊢ ‖c • ↑f i‖₊ ≤ ‖c‖₊ * ‖↑f i‖₊

Next tactic:
apply nnnorm_smul_le
theorem norm_const_smul (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
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
hp : p ≠ 0
c : 𝕜
f : ↥(lp E p)
⊢ ‖c • f‖ = ‖c‖ * ‖f‖

Next tactic:
obtain rfl | hc := eq_or_ne c 0
theorem norm_const_smul (hp : p ≠ 0) {c : 𝕜} (f : lp E p) : ‖c • f‖ = ‖c‖ * ‖f‖ := by
  obtain rfl | hc := eq_or_ne c 0
  · 

Proof state:
case inl
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝³ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type u_3
inst✝² : NormedDivisionRing 𝕜
inst✝¹ : (i : α) → Module 𝕜 (E i)
inst✝ : ∀ (i : α), BoundedSMul 𝕜 (E i)
hp : p ≠ 0
f : ↥(lp E p)
⊢ ‖0 • f‖ = ‖0‖ * ‖f‖

Next tactic:
simp