l3lab/ntp-mathlib huggingface dataset:
theorem antilipschitzWith_equiv_aux :
    AntilipschitzWith ((Fintype.card ι : ℝ≥0) ^ (1 / p).toReal) (WithLp.equiv p (∀ i, β i)) := by
  intro x y
  rcases p.dichotomy with (rfl | h)
  · simp only [edist_eq_iSup, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero,
      ENNReal.coe_one, one_mul, iSup_le_iff]
    -- Porting note: `Finset.le_sup` needed some help
    exact fun i => Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
  · have pos : 0 < p.toReal := zero_lt_one.trans_le h
    have nonneg : 0 ≤ 1 / p.toReal := one_div_nonneg.2 (le_of_lt pos)
    have cancel : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (ne_of_gt pos)
    rw [edist_eq_sum pos, ENNReal.toReal_div 1 p]
    simp only [edist, ← one_div, ENNReal.one_toReal]
    calc
      (∑ i, edist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) ≤
          (∑ _i, edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) ^ 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✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
x y : WithLp p ((i : ι) → β i)
h : 1 ≤ ENNReal.toReal p
pos : 0 < ENNReal.toReal p
nonneg : 0 ≤ 1 / ENNReal.toReal p
cancel : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
⊢ (∑ i : ι, edist (x i) (y i) ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p) ≤
    (∑ _i : ?m.73374,
        edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y) ^ ENNReal.toReal p) ^
      (1 / ENNReal.toReal p)

Next tactic:
gcongr with i
theorem antilipschitzWith_equiv_aux :
    AntilipschitzWith ((Fintype.card ι : ℝ≥0) ^ (1 / p).toReal) (WithLp.equiv p (∀ i, β i)) := by
  intro x y
  rcases p.dichotomy with (rfl | h)
  · simp only [edist_eq_iSup, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero,
      ENNReal.coe_one, one_mul, iSup_le_iff]
    -- Porting note: `Finset.le_sup` needed some help
    exact fun i => Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
  · have pos : 0 < p.toReal := zero_lt_one.trans_le h
    have nonneg : 0 ≤ 1 / p.toReal := one_div_nonneg.2 (le_of_lt pos)
    have cancel : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (ne_of_gt pos)
    rw [edist_eq_sum pos, ENNReal.toReal_div 1 p]
    simp only [edist, ← one_div, ENNReal.one_toReal]
    calc
      (∑ i, edist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) ≤
          (∑ _i, edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) ^ p.toReal) ^ (1 / p.toReal) := by
        gcongr with i
        

Proof state:
case h₁.h.h₁
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
x y : WithLp p ((i : ι) → β i)
h : 1 ≤ ENNReal.toReal p
pos : 0 < ENNReal.toReal p
nonneg : 0 ≤ 1 / ENNReal.toReal p
cancel : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
i : ι
a✝ : i ∈ Finset.univ
⊢ edist (x i) (y i) ≤ edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y)

Next tactic:
exact Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
theorem antilipschitzWith_equiv_aux :
    AntilipschitzWith ((Fintype.card ι : ℝ≥0) ^ (1 / p).toReal) (WithLp.equiv p (∀ i, β i)) := by
  intro x y
  rcases p.dichotomy with (rfl | h)
  · simp only [edist_eq_iSup, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero,
      ENNReal.coe_one, one_mul, iSup_le_iff]
    -- Porting note: `Finset.le_sup` needed some help
    exact fun i => Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
  · have pos : 0 < p.toReal := zero_lt_one.trans_le h
    have nonneg : 0 ≤ 1 / p.toReal := one_div_nonneg.2 (le_of_lt pos)
    have cancel : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (ne_of_gt pos)
    rw [edist_eq_sum pos, ENNReal.toReal_div 1 p]
    simp only [edist, ← one_div, ENNReal.one_toReal]
    calc
      (∑ i, edist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) ≤
          (∑ _i, edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) ^ p.toReal) ^ (1 / p.toReal) := by
        gcongr with i
        exact Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
      _ =
          ((Fintype.card ι : ℝ≥0) ^ (1 / p.toReal) : ℝ≥0) *
            edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) := by
        

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
x y : WithLp p ((i : ι) → β i)
h : 1 ≤ ENNReal.toReal p
pos : 0 < ENNReal.toReal p
nonneg : 0 ≤ 1 / ENNReal.toReal p
cancel : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
⊢ (∑ _i : ι, edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y) ^ ENNReal.toReal p) ^
      (1 / ENNReal.toReal p) =
    ↑(↑(Fintype.card ι) ^ (1 / ENNReal.toReal p)) *
      edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y)

Next tactic:
simp only [nsmul_eq_mul, Finset.card_univ, ENNReal.rpow_one, Finset.sum_const,
          ENNReal.mul_rpow_of_nonneg _ _ nonneg, ← ENNReal.rpow_mul, cancel]
theorem antilipschitzWith_equiv_aux :
    AntilipschitzWith ((Fintype.card ι : ℝ≥0) ^ (1 / p).toReal) (WithLp.equiv p (∀ i, β i)) := by
  intro x y
  rcases p.dichotomy with (rfl | h)
  · simp only [edist_eq_iSup, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero,
      ENNReal.coe_one, one_mul, iSup_le_iff]
    -- Porting note: `Finset.le_sup` needed some help
    exact fun i => Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
  · have pos : 0 < p.toReal := zero_lt_one.trans_le h
    have nonneg : 0 ≤ 1 / p.toReal := one_div_nonneg.2 (le_of_lt pos)
    have cancel : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (ne_of_gt pos)
    rw [edist_eq_sum pos, ENNReal.toReal_div 1 p]
    simp only [edist, ← one_div, ENNReal.one_toReal]
    calc
      (∑ i, edist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) ≤
          (∑ _i, edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) ^ p.toReal) ^ (1 / p.toReal) := by
        gcongr with i
        exact Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
      _ =
          ((Fintype.card ι : ℝ≥0) ^ (1 / p.toReal) : ℝ≥0) *
            edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) := by
        simp only [nsmul_eq_mul, Finset.card_univ, ENNReal.rpow_one, Finset.sum_const,
          ENNReal.mul_rpow_of_nonneg _ _ nonneg, ← ENNReal.rpow_mul, cancel]
        

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
x y : WithLp p ((i : ι) → β i)
h : 1 ≤ ENNReal.toReal p
pos : 0 < ENNReal.toReal p
nonneg : 0 ≤ 1 / ENNReal.toReal p
cancel : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
⊢ ↑(Fintype.card ι) ^ (1 / ENNReal.toReal p) *
      edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y) =
    ↑(↑(Fintype.card ι) ^ (1 / ENNReal.toReal p)) *
      edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y)

Next tactic:
have : (Fintype.card ι : ℝ≥0∞) = (Fintype.card ι : ℝ≥0) :=
          (ENNReal.coe_nat (Fintype.card ι)).symm
theorem antilipschitzWith_equiv_aux :
    AntilipschitzWith ((Fintype.card ι : ℝ≥0) ^ (1 / p).toReal) (WithLp.equiv p (∀ i, β i)) := by
  intro x y
  rcases p.dichotomy with (rfl | h)
  · simp only [edist_eq_iSup, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero,
      ENNReal.coe_one, one_mul, iSup_le_iff]
    -- Porting note: `Finset.le_sup` needed some help
    exact fun i => Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
  · have pos : 0 < p.toReal := zero_lt_one.trans_le h
    have nonneg : 0 ≤ 1 / p.toReal := one_div_nonneg.2 (le_of_lt pos)
    have cancel : p.toReal * (1 / p.toReal) = 1 := mul_div_cancel' 1 (ne_of_gt pos)
    rw [edist_eq_sum pos, ENNReal.toReal_div 1 p]
    simp only [edist, ← one_div, ENNReal.one_toReal]
    calc
      (∑ i, edist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) ≤
          (∑ _i, edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) ^ p.toReal) ^ (1 / p.toReal) := by
        gcongr with i
        exact Finset.le_sup (f := fun i => edist (x i) (y i)) (Finset.mem_univ i)
      _ =
          ((Fintype.card ι : ℝ≥0) ^ (1 / p.toReal) : ℝ≥0) *
            edist (WithLp.equiv p _ x) (WithLp.equiv p _ y) := by
        simp only [nsmul_eq_mul, Finset.card_univ, ENNReal.rpow_one, Finset.sum_const,
          ENNReal.mul_rpow_of_nonneg _ _ nonneg, ← ENNReal.rpow_mul, cancel]
        have : (Fintype.card ι : ℝ≥0∞) = (Fintype.card ι : ℝ≥0) :=
          (ENNReal.coe_nat (Fintype.card ι)).symm
        

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
x y : WithLp p ((i : ι) → β i)
h : 1 ≤ ENNReal.toReal p
pos : 0 < ENNReal.toReal p
nonneg : 0 ≤ 1 / ENNReal.toReal p
cancel : ENNReal.toReal p * (1 / ENNReal.toReal p) = 1
this : ↑(Fintype.card ι) = ↑↑(Fintype.card ι)
⊢ ↑(Fintype.card ι) ^ (1 / ENNReal.toReal p) *
      edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y) =
    ↑(↑(Fintype.card ι) ^ (1 / ENNReal.toReal p)) *
      edist ((WithLp.equiv p ((i : ι) → β i)) x) ((WithLp.equiv p ((i : ι) → β i)) y)

Next tactic:
rw [this, ENNReal.coe_rpow_of_nonneg _ nonneg]
theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _] := by
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
⊢ 𝓤 (PiLp p β) = 𝓤 ((i : ι) → β i)

Next tactic:
have A : UniformInducing (WithLp.equiv p (∀ i, β i)) :=
    (antilipschitzWith_equiv_aux p β).uniformInducing
      (lipschitzWith_equiv_aux p β).uniformContinuous
theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _] := by
  have A : UniformInducing (WithLp.equiv p (∀ i, β i)) :=
    (antilipschitzWith_equiv_aux p β).uniformInducing
      (lipschitzWith_equiv_aux p β).uniformContinuous
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
A : UniformInducing ⇑(WithLp.equiv p ((i : ι) → β i))
⊢ 𝓤 (PiLp p β) = 𝓤 ((i : ι) → β i)

Next tactic:
have : (fun x : PiLp p β × PiLp p β => (WithLp.equiv p _ x.fst, WithLp.equiv p _ x.snd)) = id :=
    by ext i <;> rfl
theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _] := by
  have A : UniformInducing (WithLp.equiv p (∀ i, β i)) :=
    (antilipschitzWith_equiv_aux p β).uniformInducing
      (lipschitzWith_equiv_aux p β).uniformContinuous
  have : (fun x : PiLp p β × PiLp p β => (WithLp.equiv p _ x.fst, WithLp.equiv p _ x.snd)) = id :=
    by 

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
A : UniformInducing ⇑(WithLp.equiv p ((i : ι) → β i))
⊢ (fun x => ((WithLp.equiv p ((i : ι) → β i)) x.1, (WithLp.equiv p ((i : ι) → β i)) x.2)) = id

Next tactic:
ext i
theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _] := by
  have A : UniformInducing (WithLp.equiv p (∀ i, β i)) :=
    (antilipschitzWith_equiv_aux p β).uniformInducing
      (lipschitzWith_equiv_aux p β).uniformContinuous
  have : (fun x : PiLp p β × PiLp p β => (WithLp.equiv p _ x.fst, WithLp.equiv p _ x.snd)) = id :=
    by ext i <;> 

Proof state:
case h.a.h
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
A : UniformInducing ⇑(WithLp.equiv p ((i : ι) → β i))
i : PiLp p β × PiLp p β
x✝ : ι
⊢ ((WithLp.equiv p ((i : ι) → β i)) i.1, (WithLp.equiv p ((i : ι) → β i)) i.2).1 x✝ = (id i).1 x✝

Next tactic:
rfl
theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _] := by
  have A : UniformInducing (WithLp.equiv p (∀ i, β i)) :=
    (antilipschitzWith_equiv_aux p β).uniformInducing
      (lipschitzWith_equiv_aux p β).uniformContinuous
  have : (fun x : PiLp p β × PiLp p β => (WithLp.equiv p _ x.fst, WithLp.equiv p _ x.snd)) = id :=
    by ext i <;> 

Proof state:
case h.a.h
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
A : UniformInducing ⇑(WithLp.equiv p ((i : ι) → β i))
i : PiLp p β × PiLp p β
x✝ : ι
⊢ ((WithLp.equiv p ((i : ι) → β i)) i.1, (WithLp.equiv p ((i : ι) → β i)) i.2).2 x✝ = (id i).2 x✝

Next tactic:
rfl
theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _] := by
  have A : UniformInducing (WithLp.equiv p (∀ i, β i)) :=
    (antilipschitzWith_equiv_aux p β).uniformInducing
      (lipschitzWith_equiv_aux p β).uniformContinuous
  have : (fun x : PiLp p β × PiLp p β => (WithLp.equiv p _ x.fst, WithLp.equiv p _ x.snd)) = id :=
    by ext i <;> rfl
  

Proof state:
p : ℝ≥0∞
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝³ : Fact (1 ≤ p)
inst✝² : (i : ι) → PseudoMetricSpace (α i)
inst✝¹ : (i : ι) → PseudoEMetricSpace (β i)
inst✝ : Fintype ι
A : UniformInducing ⇑(WithLp.equiv p ((i : ι) → β i))
this : (fun x => ((WithLp.equiv p ((i : ι) → β i)) x.1, (WithLp.equiv p ((i : ι) → β i)) x.2)) = id
⊢ 𝓤 (PiLp p β) = 𝓤 ((i : ι) → β i)

Next tactic:
rw [← A.comap_uniformity, this, comap_id]
theorem nndist_eq_sum {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*} [∀ i, PseudoMetricSpace (β i)]
    (hp : p ≠ ∞) (x y : PiLp p β) :
    nndist x y = (∑ i : ι, nndist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) :=
  -- 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✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → PseudoMetricSpace (β i)
hp : p ≠ ⊤
x y : PiLp p β
⊢ ↑(nndist x y) = ↑((∑ i : ι, nndist (x i) (y i) ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p))

Next tactic:
push_cast
theorem nndist_eq_sum {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*} [∀ i, PseudoMetricSpace (β i)]
    (hp : p ≠ ∞) (x y : PiLp p β) :
    nndist x y = (∑ i : ι, nndist (x i) (y i) ^ p.toReal) ^ (1 / p.toReal) :=
  -- 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✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_6
inst✝ : (i : ι) → PseudoMetricSpace (β i)
hp : p ≠ ⊤
x y : PiLp p β
⊢ dist x y = (∑ x_1 : ι, dist (x x_1) (y x_1) ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
exact dist_eq_sum (p.toReal_pos_iff_ne_top.mpr hp) _ _
theorem nndist_eq_iSup {β : ι → Type*} [∀ i, PseudoMetricSpace (β i)] (x y : PiLp ∞ β) :
    nndist x y = ⨆ i, nndist (x i) (y i) :=
  -- 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 : ι) → PseudoMetricSpace (β i)
x y : PiLp ⊤ β
⊢ ↑(nndist x y) = ↑(⨆ i, nndist (x i) (y i))

Next tactic:
push_cast
theorem nndist_eq_iSup {β : ι → Type*} [∀ i, PseudoMetricSpace (β i)] (x y : PiLp ∞ β) :
    nndist x y = ⨆ i, nndist (x i) (y i) :=
  -- 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 : ι) → PseudoMetricSpace (β i)
x y : PiLp ⊤ β
⊢ dist x y = ⨆ i, dist (x i) (y i)

Next tactic:
exact dist_eq_iSup _ _
theorem infty_equiv_isometry [∀ i, PseudoEMetricSpace (β i)] :
    Isometry (WithLp.equiv ∞ (∀ i, β i)) :=
  fun x y =>
  le_antisymm (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✝ : (i : ι) → PseudoEMetricSpace (β i)
x y : WithLp ⊤ ((i : ι) → β i)
⊢ edist ((WithLp.equiv ⊤ ((i : ι) → β i)) x) ((WithLp.equiv ⊤ ((i : ι) → β i)) y) ≤ edist x y

Next tactic:
simpa only [ENNReal.coe_one, one_mul] using lipschitzWith_equiv ∞ β x y
theorem infty_equiv_isometry [∀ i, PseudoEMetricSpace (β i)] :
    Isometry (WithLp.equiv ∞ (∀ i, β i)) :=
  fun x y =>
  le_antisymm (by simpa only [ENNReal.coe_one, one_mul] using lipschitzWith_equiv ∞ β x y)
    (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✝ : (i : ι) → PseudoEMetricSpace (β i)
x y : WithLp ⊤ ((i : ι) → β i)
⊢ edist x y ≤ edist ((WithLp.equiv ⊤ ((i : ι) → β i)) x) ((WithLp.equiv ⊤ ((i : ι) → β i)) y)

Next tactic:
simpa only [ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero, ENNReal.coe_one,
        one_mul] using antilipschitzWith_equiv ∞ β x y
/-- 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
      

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✝ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
x y : PiLp p β
⊢ dist x y = ‖x - y‖

Next tactic:
rcases p.dichotomy with (rfl | h)
/-- 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)
      · 

Proof state:
case inl
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
inst✝ : Fact (1 ≤ ⊤)
x y : PiLp ⊤ β
⊢ dist x y = ‖x - y‖

Next tactic:
simp only [dist_eq_iSup, norm_eq_ciSup, dist_eq_norm]
/-- 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
        

Proof state:
case inl
𝕜 : Type u_1
𝕜' : Type u_2
ι : Type u_3
α : ι → Type u_4
β : ι → Type u_5
inst✝² : Fintype ι
inst✝¹ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
inst✝ : Fact (1 ≤ ⊤)
x y : PiLp ⊤ β
⊢ ⨆ i, ‖x i - y i‖ = ⨆ i, ‖(x - y) i‖

Next tactic:
congr
/-- 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
      · 

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
⊢ dist x y = ‖x - y‖

Next tactic:
have : p ≠ ∞ := by
          intro hp
          rw [hp, ENNReal.top_toReal] at h
          linarith
/-- 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
          

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✝ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
x y : PiLp p β
h : 1 ≤ ENNReal.toReal p
⊢ p ≠ ⊤

Next tactic:
intro hp
/-- 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
          

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✝ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
x y : PiLp p β
h : 1 ≤ ENNReal.toReal p
hp : p = ⊤
⊢ False

Next tactic:
rw [hp, ENNReal.top_toReal] at h
/-- 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
          

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✝ : (i : ι) → SeminormedAddCommGroup (β i)
src✝ : AddCommGroup ((i : ι) → β i) := Pi.addCommGroup
x y : PiLp p β
h : 1 ≤ 0
hp : p = ⊤
⊢ False

Next tactic:
linarith
/-- 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
        

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 ≠ ⊤
⊢ dist x y = ‖x - y‖

Next tactic:
simp only [dist_eq_sum (zero_lt_one.trans_le h), norm_eq_sum (zero_lt_one.trans_le h),
          dist_eq_norm]