l3lab/ntp-mathlib huggingface dataset:
/-- seminormed group instance on the product of finitely many normed groups, using the `L^p`
norm. -/
instance seminormedAddCommGroup [∀ i, SeminormedAddCommGroup (β i)] :
    SeminormedAddCommGroup (PiLp p β) :=
  { Pi.addCommGroup with
    dist_eq := fun x y => by
      rcases p.dichotomy with (rfl | h)
      · simp only [dist_eq_iSup, norm_eq_ciSup, dist_eq_norm]
        -- Porting note: added
        congr
      · have : p ≠ ∞ := by
          intro hp
          rw [hp, ENNReal.top_toReal] at h
          linarith
        simp only [dist_eq_sum (zero_lt_one.trans_le h), norm_eq_sum (zero_lt_one.trans_le h),
          dist_eq_norm]
        -- Porting note: added
        

Proof state:
case inr
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
x y : PiLp p β
h : 1 ≤ ENNReal.toReal p
this : p ≠ ⊤
⊢ (∑ x_1 : ι, ‖x x_1 - y x_1‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p) =
    (∑ i : ι, ‖(x - y) i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
congr
theorem nnnorm_eq_sum {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*} (hp : p ≠ ∞)
    [∀ i, SeminormedAddCommGroup (β i)] (f : PiLp p β) :
    ‖f‖₊ = (∑ i, ‖f i‖₊ ^ p.toReal) ^ (1 / p.toReal) := by
  

Proof state:
p✝ : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
hp : p ≠ ⊤
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
f : PiLp p β
⊢ ‖f‖₊ = (∑ i : ι, ‖f i‖₊ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
ext
theorem nnnorm_eq_sum {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*} (hp : p ≠ ∞)
    [∀ i, SeminormedAddCommGroup (β i)] (f : PiLp p β) :
    ‖f‖₊ = (∑ i, ‖f i‖₊ ^ p.toReal) ^ (1 / p.toReal) := by
  ext
  

Proof state:
case a
p✝ : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
hp : p ≠ ⊤
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
f : PiLp p β
⊢ ↑‖f‖₊ = ↑((∑ i : ι, ‖f i‖₊ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p))

Next tactic:
simp [NNReal.coe_sum, norm_eq_sum (p.toReal_pos_iff_ne_top.mpr hp)]
theorem nnnorm_eq_ciSup {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (f : PiLp ∞ β) :
    ‖f‖₊ = ⨆ i, ‖f i‖₊ := by
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
f : PiLp ⊤ β
⊢ ‖f‖₊ = ⨆ i, ‖f i‖₊

Next tactic:
ext
theorem nnnorm_eq_ciSup {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (f : PiLp ∞ β) :
    ‖f‖₊ = ⨆ i, ‖f i‖₊ := by
  ext
  

Proof state:
case a
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
f : PiLp ⊤ β
⊢ ↑‖f‖₊ = ↑(⨆ i, ‖f i‖₊)

Next tactic:
simp [NNReal.coe_iSup, norm_eq_ciSup]
theorem norm_eq_of_nat {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*}
    [∀ i, SeminormedAddCommGroup (β i)] (n : ℕ) (h : p = n) (f : PiLp p β) :
    ‖f‖ = (∑ i, ‖f i‖ ^ n) ^ (1 / (n : ℝ)) := by
  

Proof state:
p✝ : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
n : ℕ
h : p = ↑n
f : PiLp p β
⊢ ‖f‖ = (∑ i : ι, ‖f i‖ ^ n) ^ (1 / ↑n)

Next tactic:
have := p.toReal_pos_iff_ne_top.mpr (ne_of_eq_of_ne h <| ENNReal.nat_ne_top n)
theorem norm_eq_of_nat {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*}
    [∀ i, SeminormedAddCommGroup (β i)] (n : ℕ) (h : p = n) (f : PiLp p β) :
    ‖f‖ = (∑ i, ‖f i‖ ^ n) ^ (1 / (n : ℝ)) := by
  have := p.toReal_pos_iff_ne_top.mpr (ne_of_eq_of_ne h <| ENNReal.nat_ne_top n)
  

Proof state:
p✝ : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
n : ℕ
h : p = ↑n
f : PiLp p β
this : 0 < ENNReal.toReal p
⊢ ‖f‖ = (∑ i : ι, ‖f i‖ ^ n) ^ (1 / ↑n)

Next tactic:
simp only [one_div, h, Real.rpow_nat_cast, ENNReal.toReal_nat, eq_self_iff_true, Finset.sum_congr,
    norm_eq_sum this]
theorem norm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2) := by
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ ‖x‖ = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2)

Next tactic:
rw [norm_eq_of_nat 2 (by norm_cast) _]
theorem norm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2) := by
  rw [norm_eq_of_nat 2 (by 

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ 2 = ↑2

Next tactic:
norm_cast
theorem norm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2) := by
  rw [norm_eq_of_nat 2 (by norm_cast) _] -- Porting note: was `convert`
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ (∑ i : ι, ‖x i‖ ^ 2) ^ (1 / ↑2) = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2)

Next tactic:
rw [Real.sqrt_eq_rpow]
theorem norm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ = Real.sqrt (∑ i : ι, ‖x i‖ ^ 2) := by
  rw [norm_eq_of_nat 2 (by norm_cast) _] -- Porting note: was `convert`
  rw [Real.sqrt_eq_rpow]
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ (∑ i : ι, ‖x i‖ ^ 2) ^ (1 / ↑2) = (∑ i : ι, ‖x i‖ ^ 2) ^ (1 / 2)

Next tactic:
norm_cast
theorem nnnorm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖₊ = NNReal.sqrt (∑ i : ι, ‖x i‖₊ ^ 2) :=
  -- Porting note: was `Subtype.ext`
  NNReal.eq <| by
    

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ ↑‖x‖₊ = ↑(NNReal.sqrt (∑ i : ι, ‖x i‖₊ ^ 2))

Next tactic:
push_cast
theorem nnnorm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖₊ = NNReal.sqrt (∑ i : ι, ‖x i‖₊ ^ 2) :=
  -- Porting note: was `Subtype.ext`
  NNReal.eq <| by
    push_cast
    

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ ‖x‖ = Real.sqrt (∑ x_1 : ι, ‖x x_1‖ ^ 2)

Next tactic:
exact norm_eq_of_L2 x
theorem norm_sq_eq_of_L2 (β : ι → Type*) [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ ^ 2 = ∑ i : ι, ‖x i‖ ^ 2 := by
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ ‖x‖ ^ 2 = ∑ i : ι, ‖x i‖ ^ 2

Next tactic:
suffices ‖x‖₊ ^ 2 = ∑ i : ι, ‖x i‖₊ ^ 2 by
    simpa only [NNReal.coe_sum] using congr_arg ((↑) : ℝ≥0 → ℝ) this
theorem norm_sq_eq_of_L2 (β : ι → Type*) [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ ^ 2 = ∑ i : ι, ‖x i‖ ^ 2 := by
  suffices ‖x‖₊ ^ 2 = ∑ i : ι, ‖x i‖₊ ^ 2 by
    

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
this : ‖x‖₊ ^ 2 = ∑ i : ι, ‖x i‖₊ ^ 2
⊢ ‖x‖ ^ 2 = ∑ i : ι, ‖x i‖ ^ 2

Next tactic:
simpa only [NNReal.coe_sum] using congr_arg ((↑) : ℝ≥0 → ℝ) this
theorem norm_sq_eq_of_L2 (β : ι → Type*) [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ ^ 2 = ∑ i : ι, ‖x i‖ ^ 2 := by
  suffices ‖x‖₊ ^ 2 = ∑ i : ι, ‖x i‖₊ ^ 2 by
    simpa only [NNReal.coe_sum] using congr_arg ((↑) : ℝ≥0 → ℝ) this
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x : PiLp 2 β
⊢ ‖x‖₊ ^ 2 = ∑ i : ι, ‖x i‖₊ ^ 2

Next tactic:
rw [nnnorm_eq_of_L2, NNReal.sq_sqrt]
theorem dist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    dist x y = (∑ i, dist (x i) (y i) ^ 2).sqrt := by
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ dist x y = Real.sqrt (∑ i : ι, dist (x i) (y i) ^ 2)

Next tactic:
simp_rw [dist_eq_norm, norm_eq_of_L2]
theorem dist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    dist x y = (∑ i, dist (x i) (y i) ^ 2).sqrt := by
  simp_rw [dist_eq_norm, norm_eq_of_L2]
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ Real.sqrt (∑ i : ι, ‖(x - y) i‖ ^ 2) = Real.sqrt (∑ x_1 : ι, ‖x x_1 - y x_1‖ ^ 2)

Next tactic:
rfl
theorem nndist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    nndist x y = NNReal.sqrt (∑ i, nndist (x i) (y i) ^ 2) :=
  -- Porting note: was `Subtype.ext`
  NNReal.eq <| by
    

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ ↑(nndist x y) = ↑(NNReal.sqrt (∑ i : ι, nndist (x i) (y i) ^ 2))

Next tactic:
push_cast
theorem nndist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    nndist x y = NNReal.sqrt (∑ i, nndist (x i) (y i) ^ 2) :=
  -- Porting note: was `Subtype.ext`
  NNReal.eq <| by
    push_cast
    

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ dist x y = Real.sqrt (∑ x_1 : ι, dist (x x_1) (y x_1) ^ 2)

Next tactic:
exact dist_eq_of_L2 _ _
theorem edist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    edist x y = (∑ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ) := by 

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β✝ : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ edist x y = (∑ i : ι, edist (x i) (y i) ^ 2) ^ (1 / 2)

Next tactic:
simp [PiLp.edist_eq_sum]
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
f : PiLp p β
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
rcases p.dichotomy with (rfl | hp)
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · 

Proof state:
case inl
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedField 𝕜'
inst✝² : (i : ι) → SeminormedAddCommGroup (β i)
inst✝¹ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
inst✝ : Fact (1 ≤ ⊤)
f : PiLp ⊤ β
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        

Proof state:
case inl
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedField 𝕜'
inst✝² : (i : ι) → SeminormedAddCommGroup (β i)
inst✝¹ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
inst✝ : Fact (1 ≤ ⊤)
f : PiLp ⊤ β
this : Module 𝕜 (PiLp ⊤ β) := Pi.module ι β 𝕜
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        

Proof state:
case inl
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedField 𝕜'
inst✝² : (i : ι) → SeminormedAddCommGroup (β i)
inst✝¹ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
inst✝ : Fact (1 ≤ ⊤)
f : PiLp ⊤ β
this : Module 𝕜 (PiLp ⊤ β) := Pi.module ι β 𝕜
⊢ ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊

Next tactic:
simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
        -- Porting note: added
        

Proof state:
case inl
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedField 𝕜'
inst✝² : (i : ι) → SeminormedAddCommGroup (β i)
inst✝¹ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
inst✝ : Fact (1 ≤ ⊤)
f : PiLp ⊤ β
this : Module 𝕜 (PiLp ⊤ β) := Pi.module ι β 𝕜
⊢ ⨆ i, ‖(c • f) i‖₊ = ⨆ i, ‖c • f i‖₊

Next tactic:
congr
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
        -- Porting note: added
        congr
      · 

Proof state:
case inr
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
f : PiLp p β
hp : 1 ≤ ENNReal.toReal p
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
have : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (zero_lt_one.trans_le hp).ne'
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
        -- Porting note: added
        congr
      · have : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (zero_lt_one.trans_le hp).ne'
        -- Porting note: added to replace Pi.smul_apply
        

Proof state:
case inr
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
f : PiLp p β
hp : 1 ≤ ENNReal.toReal p
this : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
have smul_apply : ∀ i : ι, (c • f) i = c • (f i) := fun i => rfl
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
        -- Porting note: added
        congr
      · have : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (zero_lt_one.trans_le hp).ne'
        -- Porting note: added to replace Pi.smul_apply
        have smul_apply : ∀ i : ι, (c • f) i = c • (f i) := fun i => rfl
        

Proof state:
case inr
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
f : PiLp p β
hp : 1 ≤ ENNReal.toReal p
this : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
smul_apply : ∀ (i : ι), (c • f) i = c • f i
⊢ ‖c • f‖ ≤ ‖c‖ * ‖f‖

Next tactic:
simp only [norm_eq_sum (zero_lt_one.trans_le hp), norm_smul, Real.mul_rpow, norm_nonneg, ←
          Finset.mul_sum, smul_apply]
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
        -- Porting note: added
        congr
      · have : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (zero_lt_one.trans_le hp).ne'
        -- Porting note: added to replace Pi.smul_apply
        have smul_apply : ∀ i : ι, (c • f) i = c • (f i) := fun i => rfl
        simp only [norm_eq_sum (zero_lt_one.trans_le hp), norm_smul, Real.mul_rpow, norm_nonneg, ←
          Finset.mul_sum, smul_apply]
        

Proof state:
case inr
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
f : PiLp p β
hp : 1 ≤ ENNReal.toReal p
this : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
smul_apply : ∀ (i : ι), (c • f) i = c • f i
⊢ (‖c‖ ^ ENNReal.toReal p * ∑ x : ι, ‖f x‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p) ≤
    ‖c‖ * (∑ x : ι, ‖f x‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
rw [mul_rpow (rpow_nonneg_of_nonneg (norm_nonneg _) _), ← rpow_mul (norm_nonneg _), this,
          Real.rpow_one]
/-- The product of finitely many normed spaces is a normed space, with the `L^p` norm. -/
instance normedSpace [∀ i, SeminormedAddCommGroup (β i)] [∀ i, NormedSpace 𝕜 (β i)] :
    NormedSpace 𝕜 (PiLp p β) :=
  { norm_smul_le := fun c f => by
      rcases p.dichotomy with (rfl | hp)
      · letI : Module 𝕜 (PiLp ∞ β) := Pi.module ι β 𝕜
        suffices ‖c • f‖₊ = ‖c‖₊ * ‖f‖₊ from mod_cast NNReal.coe_mono this.le
        simp only [nnnorm_eq_ciSup, NNReal.mul_iSup, ← nnnorm_smul]
        -- Porting note: added
        congr
      · have : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (zero_lt_one.trans_le hp).ne'
        -- Porting note: added to replace Pi.smul_apply
        have smul_apply : ∀ i : ι, (c • f) i = c • (f i) := fun i => rfl
        simp only [norm_eq_sum (zero_lt_one.trans_le hp), norm_smul, Real.mul_rpow, norm_nonneg, ←
          Finset.mul_sum, smul_apply]
        rw [mul_rpow (rpow_nonneg_of_nonneg (norm_nonneg _) _), ← rpow_mul (norm_nonneg _), this,
          Real.rpow_one]
        

Proof state:
case inr
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
f : PiLp p β
hp : 1 ≤ ENNReal.toReal p
this : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
smul_apply : ∀ (i : ι), (c • f) i = c • f i
⊢ 0 ≤ ∑ x : ι, ‖f x‖ ^ ENNReal.toReal p

Next tactic:
exact Finset.sum_nonneg fun i _ => rpow_nonneg_of_nonneg (norm_nonneg _) _
/-- The canonical map `WithLp.equiv` between `PiLp ∞ β` and `Π i, β i` as a linear isometric
equivalence. -/
def equivₗᵢ : PiLp ∞ β ≃ₗᵢ[𝕜] ∀ i, β i :=
  { WithLp.equiv ∞ (∀ i, β i) with
    map_add' := fun f g => rfl
    map_smul' := fun c f => rfl
    norm_map' := fun f => by
      

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝⁵ : Fintype ι
inst✝⁴ : Fact (1 ≤ p)
inst✝³ : NormedField 𝕜
inst✝² : NormedField 𝕜'
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
inst✝ : (i : ι) → NormedSpace 𝕜 (β i)
c : 𝕜
x y : PiLp p β
x' y' : (i : ι) → β i
i : ι
src✝ : WithLp ⊤ ((i : ι) → β i) ≃ ((i : ι) → β i) := WithLp.equiv ⊤ ((i : ι) → β i)
f : PiLp ⊤ β
⊢ ‖{
          toLinearMap :=
            {
              toAddHom :=
                { toFun := src✝.toFun,
                  map_add' := (_ : ∀ (f g : PiLp ⊤ β), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ (f + g)) },
              map_smul' :=
                (_ :
                  ∀ (c : 𝕜) (f : PiLp ⊤ β),
                    AddHom.toFun
                        { toFun := src✝.toFun,
                          map_add' := (_ : ∀ (f g : PiLp ⊤ β), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ (f + g)) }
                        (c • f) =
                      AddHom.toFun
                        { toFun := src✝.toFun,
                          map_add' := (_ : ∀ (f g : PiLp ⊤ β), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ (f + g)) }
                        (c • f)) },
          invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        f‖ =
    ‖f‖

Next tactic:
suffices (Finset.univ.sup fun i => ‖f i‖₊) = ⨆ i, ‖f i‖₊ by
        simpa only [NNReal.coe_iSup] using congr_arg ((↑) : ℝ≥0 → ℝ) this