l3lab/ntp-mathlib huggingface dataset:
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 ⊢
    refine' NNReal.summable_of_le _ 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
⊢ ∀ (b : α), ‖(c • f) b‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖f b‖₊) ^ ENNReal.toReal p

Next tactic:
intro i
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 ⊢
    refine' NNReal.summable_of_le _ this
    intro i
    

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
i : α
⊢ ‖(c • f) i‖₊ ^ ENNReal.toReal p ≤ (‖c‖₊ * ‖f i‖₊) ^ ENNReal.toReal p

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
    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 ⊢
    refine' NNReal.summable_of_le _ this
    intro i
    gcongr
    

Proof state:
case inr.inr.hf.h₁.h
α : 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
i : α
⊢ ‖(c • f) i‖₊ ≤ ‖c‖₊ * ‖f i‖₊

Next tactic:
apply nnnorm_smul_le
theorem const_mul {f : α → 𝕜} (hf : Memℓp f p) (c : 𝕜) : Memℓp (fun x => c * f x) p :=
  @Memℓp.const_smul α (fun _ => 𝕜) _ _ 𝕜 _ _ (fun i => 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 : α → 𝕜
hf : Memℓp f p
c : 𝕜
i : α
⊢ BoundedSMul 𝕜 ((fun x => 𝕜) i)

Next tactic:
infer_instance
instance : AddCommGroup (PreLp E) := by 

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
⊢ AddCommGroup (PreLp E)

Next tactic:
unfold PreLp
instance : AddCommGroup (PreLp E) := by unfold PreLp; 

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
⊢ AddCommGroup ((i : α) → E i)

Next tactic:
infer_instance
theorem coeFn_sum {ι : Type*} (f : ι → lp E p) (s : Finset ι) :
    ⇑(∑ i in s, f i) = ∑ i in s, ⇑(f i) := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
ι : Type u_3
f : ι → ↥(lp E p)
s : Finset ι
⊢ ↑(∑ i in s, f i) = ∑ i in s, ↑(f i)

Next tactic:
simp
instance : Norm (lp E p) where
  norm f :=
    if hp : p = 0 then by
      

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

Next tactic:
subst hp
instance : Norm (lp E p) where
  norm f :=
    if hp : p = 0 then by
      subst hp
      

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

Next tactic:
exact ((lp.memℓp f).finite_dsupport.toFinset.card : ℝ)
theorem norm_eq_ciSup (f : lp E ∞) : ‖f‖ = ⨆ i, ‖f i‖ := by
  

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

Next tactic:
dsimp [norm]
theorem norm_eq_ciSup (f : lp E ∞) : ‖f‖ = ⨆ i, ‖f i‖ := by
  dsimp [norm]
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
⊢ (if hp : ⊤ = 0 then
      Eq.rec (motive := fun x x_1 => ↥(lp E x) → ℝ)
        (fun f => ↑(Finset.card (Set.Finite.toFinset (_ : Set.Finite {i | ↑f i ≠ 0})))) (_ : 0 = ⊤) f
    else if ⊤ = ⊤ then ⨆ i, ‖↑f i‖ else (∑' (i : α), ‖↑f i‖ ^ 0) ^ (1 / 0)) =
    ⨆ i, ‖↑f i‖

Next tactic:
rw [dif_neg ENNReal.top_ne_zero, if_pos rfl]
theorem isLUB_norm [Nonempty α] (f : lp E ∞) : IsLUB (Set.range fun i => ‖f i‖) ‖f‖ := by
  

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

Next tactic:
rw [lp.norm_eq_ciSup]
theorem isLUB_norm [Nonempty α] (f : lp E ∞) : IsLUB (Set.range fun i => ‖f i‖) ‖f‖ := by
  rw [lp.norm_eq_ciSup]
  

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

Next tactic:
exact isLUB_ciSup (lp.memℓp f)
theorem norm_eq_tsum_rpow (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ = (∑' i, ‖f i‖ ^ p.toReal) ^ (1 / 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)
⊢ ‖f‖ = (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
dsimp [norm]
theorem norm_eq_tsum_rpow (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ = (∑' i, ‖f i‖ ^ p.toReal) ^ (1 / p.toReal) := by
  dsimp [norm]
  

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)
⊢ (if hp : p = 0 then
      Eq.rec (motive := fun x x_1 => ↥(lp E x) → ℝ)
        (fun f => ↑(Finset.card (Set.Finite.toFinset (_ : Set.Finite {i | ↑f i ≠ 0})))) (_ : 0 = p) f
    else if p = ⊤ then ⨆ i, ‖↑f i‖ else (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)) =
    (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
rw [ENNReal.toReal_pos_iff] at hp
theorem norm_eq_tsum_rpow (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ = (∑' i, ‖f i‖ ^ p.toReal) ^ (1 / p.toReal) := by
  dsimp [norm]
  rw [ENNReal.toReal_pos_iff] at hp
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < p ∧ p < ⊤
f : ↥(lp E p)
⊢ (if hp : p = 0 then
      Eq.rec (motive := fun x x_1 => ↥(lp E x) → ℝ)
        (fun f => ↑(Finset.card (Set.Finite.toFinset (_ : Set.Finite {i | ↑f i ≠ 0})))) (_ : 0 = p) f
    else if p = ⊤ then ⨆ i, ‖↑f i‖ else (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)) =
    (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
rw [dif_neg hp.1.ne', if_neg hp.2.ne]
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ 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)
⊢ ‖f‖ ^ ENNReal.toReal p = ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · 

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)
⊢ (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p * ENNReal.toReal p) =
    ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
field_simp
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · field_simp
  

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

Next tactic:
apply tsum_nonneg
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · field_simp
  apply tsum_nonneg
  

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

Next tactic:
intro i
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · field_simp
  apply tsum_nonneg
  intro i
  

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

Next tactic:
calc
    (0 : ℝ) = (0 : ℝ) ^ p.toReal := by rw [Real.zero_rpow hp.ne']
    _ ≤ _ := by gcongr; apply norm_nonneg
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · field_simp
  apply tsum_nonneg
  intro i
  calc
    (0 : ℝ) = (0 : ℝ) ^ 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)
i : α
⊢ 0 = 0 ^ ENNReal.toReal p

Next tactic:
rw [Real.zero_rpow hp.ne']
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · field_simp
  apply tsum_nonneg
  intro i
  calc
    (0 : ℝ) = (0 : ℝ) ^ p.toReal := by rw [Real.zero_rpow hp.ne']
    _ ≤ _ := 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)
i : α
⊢ 0 ^ ENNReal.toReal p ≤ ‖↑f i‖ ^ ENNReal.toReal p

Next tactic:
gcongr
theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal := by
  rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
  · field_simp
  apply tsum_nonneg
  intro i
  calc
    (0 : ℝ) = (0 : ℝ) ^ p.toReal := by rw [Real.zero_rpow hp.ne']
    _ ≤ _ := by gcongr; 

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

Next tactic:
apply norm_nonneg
theorem hasSum_norm (hp : 0 < p.toReal) (f : lp E p) :
    HasSum (fun i => ‖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)
⊢ HasSum (fun i => ‖↑f i‖ ^ ENNReal.toReal p) (‖f‖ ^ ENNReal.toReal p)

Next tactic:
rw [norm_rpow_eq_tsum hp]
theorem hasSum_norm (hp : 0 < p.toReal) (f : lp E p) :
    HasSum (fun i => ‖f i‖ ^ p.toReal) (‖f‖ ^ p.toReal) := by
  rw [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
f : ↥(lp E p)
⊢ HasSum (fun i => ‖↑f i‖ ^ ENNReal.toReal p) (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p)

Next tactic:
exact ((lp.memℓp f).summable hp).hasSum
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  

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

Next tactic:
rcases p.trichotomy with (rfl | rfl | hp)
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖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)
f : ↥(lp E 0)
⊢ 0 ≤ ‖f‖

Next tactic:
simp [lp.norm_eq_card_dsupport f]
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · 

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

Next tactic:
cases' isEmpty_or_nonempty α with _i _i
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · 

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

Next tactic:
rw [lp.norm_eq_ciSup]
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · rw [lp.norm_eq_ciSup]
      

Proof state:
case inr.inl.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
_i : IsEmpty α
⊢ 0 ≤ ⨆ i, ‖↑f i‖

Next tactic:
simp [Real.ciSup_empty]
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · rw [lp.norm_eq_ciSup]
      simp [Real.ciSup_empty]
    

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

Next tactic:
inhabit α
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · rw [lp.norm_eq_ciSup]
      simp [Real.ciSup_empty]
    inhabit α
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
_i : Nonempty α
inhabited_h : Inhabited α
⊢ 0 ≤ ‖f‖

Next tactic:
exact (norm_nonneg (f default)).trans ((lp.isLUB_norm f).1 ⟨default, rfl⟩)
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · rw [lp.norm_eq_ciSup]
      simp [Real.ciSup_empty]
    inhabit α
    exact (norm_nonneg (f default)).trans ((lp.isLUB_norm f).1 ⟨default, rfl⟩)
  · 

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

Next tactic:
rw [lp.norm_eq_tsum_rpow hp f]
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · rw [lp.norm_eq_ciSup]
      simp [Real.ciSup_empty]
    inhabit α
    exact (norm_nonneg (f default)).trans ((lp.isLUB_norm f).1 ⟨default, rfl⟩)
  · rw [lp.norm_eq_tsum_rpow hp f]
    

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

Next tactic:
refine' Real.rpow_nonneg_of_nonneg (tsum_nonneg _) _
theorem norm_nonneg' (f : lp E p) : 0 ≤ ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport f]
  · cases' isEmpty_or_nonempty α with _i _i
    · rw [lp.norm_eq_ciSup]
      simp [Real.ciSup_empty]
    inhabit α
    exact (norm_nonneg (f default)).trans ((lp.isLUB_norm f).1 ⟨default, rfl⟩)
  · rw [lp.norm_eq_tsum_rpow hp f]
    refine' Real.rpow_nonneg_of_nonneg (tsum_nonneg _) _
    

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

Next tactic:
exact fun i => Real.rpow_nonneg_of_nonneg (norm_nonneg _) _
@[simp]
theorem norm_zero : ‖(0 : lp E p)‖ = 0 := by
  

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
⊢ ‖0‖ = 0

Next tactic:
rcases p.trichotomy with (rfl | rfl | hp)
@[simp]
theorem norm_zero : ‖(0 : lp E p)‖ = 0 := 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)
⊢ ‖0‖ = 0

Next tactic:
simp [lp.norm_eq_card_dsupport]
@[simp]
theorem norm_zero : ‖(0 : lp E p)‖ = 0 := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport]
  · 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
⊢ ‖0‖ = 0

Next tactic:
simp [lp.norm_eq_ciSup]
@[simp]
theorem norm_zero : ‖(0 : lp E p)‖ = 0 := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport]
  · simp [lp.norm_eq_ciSup]
  · 

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
⊢ ‖0‖ = 0

Next tactic:
rw [lp.norm_eq_tsum_rpow hp]
@[simp]
theorem norm_zero : ‖(0 : lp E p)‖ = 0 := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport]
  · simp [lp.norm_eq_ciSup]
  · rw [lp.norm_eq_tsum_rpow hp]
    

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
⊢ (∑' (i : α), ‖↑0 i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p) = 0

Next tactic:
have hp' : 1 / p.toReal ≠ 0 := one_div_ne_zero hp.ne'
@[simp]
theorem norm_zero : ‖(0 : lp E p)‖ = 0 := by
  rcases p.trichotomy with (rfl | rfl | hp)
  · simp [lp.norm_eq_card_dsupport]
  · simp [lp.norm_eq_ciSup]
  · rw [lp.norm_eq_tsum_rpow hp]
    have hp' : 1 / p.toReal ≠ 0 := one_div_ne_zero hp.ne'
    

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
hp' : 1 / ENNReal.toReal p ≠ 0
⊢ (∑' (i : α), ‖↑0 i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p) = 0

Next tactic:
simpa [Real.zero_rpow hp.ne'] using Real.zero_rpow hp'
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  

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

Next tactic:
refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by 

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

Next tactic:
rintro rfl
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; 

Proof state:
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
⊢ ‖0‖ = 0

Next tactic:
exact norm_zero
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  

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

Next tactic:
rcases p.trichotomy with (rfl | rfl | hp)
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  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)
f : ↥(lp E 0)
h : ‖f‖ = 0
⊢ f = 0

Next tactic:
ext i
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    

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

Next tactic:
have : { i : α | ¬f i = 0 } = ∅ := by simpa [lp.norm_eq_card_dsupport f] using h
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    have : { i : α | ¬f i = 0 } = ∅ := by 

Proof state:
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E 0)
h : ‖f‖ = 0
i : α
⊢ {i | ¬↑f i = 0} = ∅

Next tactic:
simpa [lp.norm_eq_card_dsupport f] using h
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    have : { i : α | ¬f i = 0 } = ∅ := by simpa [lp.norm_eq_card_dsupport f] using h
    

Proof state:
case inl.h.h
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E 0)
h : ‖f‖ = 0
i : α
this : {i | ¬↑f i = 0} = ∅
⊢ ↑f i = ↑0 i

Next tactic:
have : (¬f i = 0) = False := congr_fun this i
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    have : { i : α | ¬f i = 0 } = ∅ := by simpa [lp.norm_eq_card_dsupport f] using h
    have : (¬f i = 0) = False := congr_fun this i
    

Proof state:
case inl.h.h
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E 0)
h : ‖f‖ = 0
i : α
this✝ : {i | ¬↑f i = 0} = ∅
this : (¬↑f i = 0) = False
⊢ ↑f i = ↑0 i

Next tactic:
tauto
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    have : { i : α | ¬f i = 0 } = ∅ := by simpa [lp.norm_eq_card_dsupport f] using h
    have : (¬f i = 0) = False := congr_fun this i
    tauto
  · 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
h : ‖f‖ = 0
⊢ f = 0

Next tactic:
cases' isEmpty_or_nonempty α with _i _i
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    have : { i : α | ¬f i = 0 } = ∅ := by simpa [lp.norm_eq_card_dsupport f] using h
    have : (¬f i = 0) = False := congr_fun this i
    tauto
  · cases' isEmpty_or_nonempty α with _i _i
    · 

Proof state:
case inr.inl.inl
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
h : ‖f‖ = 0
_i : IsEmpty α
⊢ f = 0

Next tactic:
simp [eq_iff_true_of_subsingleton]
theorem norm_eq_zero_iff {f : lp E p} : ‖f‖ = 0 ↔ f = 0 := by
  refine' ⟨fun h => _, by rintro rfl; exact norm_zero⟩
  rcases p.trichotomy with (rfl | rfl | hp)
  · ext i
    have : { i : α | ¬f i = 0 } = ∅ := by simpa [lp.norm_eq_card_dsupport f] using h
    have : (¬f i = 0) = False := congr_fun this i
    tauto
  · cases' isEmpty_or_nonempty α with _i _i
    · simp [eq_iff_true_of_subsingleton]
    

Proof state:
case inr.inl.inr
α : Type u_1
E : α → Type u_2
q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f : ↥(lp E ⊤)
h : ‖f‖ = 0
_i : Nonempty α
⊢ f = 0

Next tactic:
have H : IsLUB (Set.range fun i => ‖f i‖) 0 := by simpa [h] using lp.isLUB_norm f