l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem closedComplemented_bot : ClosedComplemented (⊥ : Submodule R M) :=
  ⟨0, fun x => by 

Proof state:
R : Type u_1
inst✝⁶ : Ring R
M : Type u_2
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M₂ : Type u_3
inst✝² : TopologicalSpace M₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R M₂
x : ↥⊥
⊢ 0 ↑x = x

Next tactic:
simp only [zero_apply, eq_zero_of_bot_submodule x]
@[simp]
theorem closedComplemented_top : ClosedComplemented (⊤ : Submodule R M) :=
  ⟨(id R M).codRestrict ⊤ fun _x => trivial, fun x => Subtype.ext_iff_val.2 <| by 

Proof state:
R : Type u_1
inst✝⁶ : Ring R
M : Type u_2
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M₂ : Type u_3
inst✝² : TopologicalSpace M₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R M₂
x : ↥⊤
⊢ ↑((codRestrict (ContinuousLinearMap.id R M) ⊤ (_ : M → True)) ↑x) = ↑x

Next tactic:
simp
/-- If `p` is a closed complemented submodule,
then there exists a submodule `q` and a continuous linear equivalence `M ≃L[R] (p × q)` such that
`e (x : p) = (x, 0)`, `e (y : q) = (0, y)`, and `e.symm x = x.1 + x.2`.

In fact, the properties of `e` imply the properties of `e.symm` and vice versa,
but we provide both for convenience. -/
lemma ClosedComplemented.exists_submodule_equiv_prod [TopologicalAddGroup M]
    {p : Submodule R M} (hp : p.ClosedComplemented) :
    ∃ (q : Submodule R M) (e : M ≃L[R] (p × q)),
      (∀ x : p, e x = (x, 0)) ∧ (∀ y : q, e y = (0, y)) ∧ (∀ x, e.symm x = x.1 + x.2) :=
  let ⟨f, hf⟩ := hp
  ⟨LinearMap.ker f, .equivOfRightInverse _ p.subtypeL hf,
    fun _ ↦ by 

Proof state:
R : Type u_1
inst✝⁷ : Ring R
M : Type u_2
inst✝⁶ : TopologicalSpace M
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M₂ : Type u_3
inst✝³ : TopologicalSpace M₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R M₂
inst✝ : TopologicalAddGroup M
p : Submodule R M
hp : ClosedComplemented p
f : M →L[R] ↥p
hf : ∀ (x : ↥p), f ↑x = x
x✝ : ↥p
⊢ (ContinuousLinearEquiv.equivOfRightInverse f (subtypeL p) hf) ↑x✝ = (x✝, 0)

Next tactic:
ext
/-- If `p` is a closed complemented submodule,
then there exists a submodule `q` and a continuous linear equivalence `M ≃L[R] (p × q)` such that
`e (x : p) = (x, 0)`, `e (y : q) = (0, y)`, and `e.symm x = x.1 + x.2`.

In fact, the properties of `e` imply the properties of `e.symm` and vice versa,
but we provide both for convenience. -/
lemma ClosedComplemented.exists_submodule_equiv_prod [TopologicalAddGroup M]
    {p : Submodule R M} (hp : p.ClosedComplemented) :
    ∃ (q : Submodule R M) (e : M ≃L[R] (p × q)),
      (∀ x : p, e x = (x, 0)) ∧ (∀ y : q, e y = (0, y)) ∧ (∀ x, e.symm x = x.1 + x.2) :=
  let ⟨f, hf⟩ := hp
  ⟨LinearMap.ker f, .equivOfRightInverse _ p.subtypeL hf,
    fun _ ↦ by ext <;> 

Proof state:
case a.a
R : Type u_1
inst✝⁷ : Ring R
M : Type u_2
inst✝⁶ : TopologicalSpace M
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M₂ : Type u_3
inst✝³ : TopologicalSpace M₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R M₂
inst✝ : TopologicalAddGroup M
p : Submodule R M
hp : ClosedComplemented p
f : M →L[R] ↥p
hf : ∀ (x : ↥p), f ↑x = x
x✝ : ↥p
⊢ ↑((ContinuousLinearEquiv.equivOfRightInverse f (subtypeL p) hf) ↑x✝).1 = ↑(x✝, 0).1

Next tactic:
simp [hf]
/-- If `p` is a closed complemented submodule,
then there exists a submodule `q` and a continuous linear equivalence `M ≃L[R] (p × q)` such that
`e (x : p) = (x, 0)`, `e (y : q) = (0, y)`, and `e.symm x = x.1 + x.2`.

In fact, the properties of `e` imply the properties of `e.symm` and vice versa,
but we provide both for convenience. -/
lemma ClosedComplemented.exists_submodule_equiv_prod [TopologicalAddGroup M]
    {p : Submodule R M} (hp : p.ClosedComplemented) :
    ∃ (q : Submodule R M) (e : M ≃L[R] (p × q)),
      (∀ x : p, e x = (x, 0)) ∧ (∀ y : q, e y = (0, y)) ∧ (∀ x, e.symm x = x.1 + x.2) :=
  let ⟨f, hf⟩ := hp
  ⟨LinearMap.ker f, .equivOfRightInverse _ p.subtypeL hf,
    fun _ ↦ by ext <;> 

Proof state:
case a.a
R : Type u_1
inst✝⁷ : Ring R
M : Type u_2
inst✝⁶ : TopologicalSpace M
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M₂ : Type u_3
inst✝³ : TopologicalSpace M₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R M₂
inst✝ : TopologicalAddGroup M
p : Submodule R M
hp : ClosedComplemented p
f : M →L[R] ↥p
hf : ∀ (x : ↥p), f ↑x = x
x✝ : ↥p
⊢ ↑((ContinuousLinearEquiv.equivOfRightInverse f (subtypeL p) hf) ↑x✝).2 = ↑(x✝, 0).2

Next tactic:
simp [hf]
/-- If `p` is a closed complemented submodule,
then there exists a submodule `q` and a continuous linear equivalence `M ≃L[R] (p × q)` such that
`e (x : p) = (x, 0)`, `e (y : q) = (0, y)`, and `e.symm x = x.1 + x.2`.

In fact, the properties of `e` imply the properties of `e.symm` and vice versa,
but we provide both for convenience. -/
lemma ClosedComplemented.exists_submodule_equiv_prod [TopologicalAddGroup M]
    {p : Submodule R M} (hp : p.ClosedComplemented) :
    ∃ (q : Submodule R M) (e : M ≃L[R] (p × q)),
      (∀ x : p, e x = (x, 0)) ∧ (∀ y : q, e y = (0, y)) ∧ (∀ x, e.symm x = x.1 + x.2) :=
  let ⟨f, hf⟩ := hp
  ⟨LinearMap.ker f, .equivOfRightInverse _ p.subtypeL hf,
    fun _ ↦ by ext <;> simp [hf], fun _ ↦ by 

Proof state:
R : Type u_1
inst✝⁷ : Ring R
M : Type u_2
inst✝⁶ : TopologicalSpace M
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M₂ : Type u_3
inst✝³ : TopologicalSpace M₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R M₂
inst✝ : TopologicalAddGroup M
p : Submodule R M
hp : ClosedComplemented p
f : M →L[R] ↥p
hf : ∀ (x : ↥p), f ↑x = x
x✝ : ↥(LinearMap.ker f)
⊢ (ContinuousLinearEquiv.equivOfRightInverse f (subtypeL p) hf) ↑x✝ = (0, x✝)

Next tactic:
ext
/-- If `p` is a closed complemented submodule,
then there exists a submodule `q` and a continuous linear equivalence `M ≃L[R] (p × q)` such that
`e (x : p) = (x, 0)`, `e (y : q) = (0, y)`, and `e.symm x = x.1 + x.2`.

In fact, the properties of `e` imply the properties of `e.symm` and vice versa,
but we provide both for convenience. -/
lemma ClosedComplemented.exists_submodule_equiv_prod [TopologicalAddGroup M]
    {p : Submodule R M} (hp : p.ClosedComplemented) :
    ∃ (q : Submodule R M) (e : M ≃L[R] (p × q)),
      (∀ x : p, e x = (x, 0)) ∧ (∀ y : q, e y = (0, y)) ∧ (∀ x, e.symm x = x.1 + x.2) :=
  let ⟨f, hf⟩ := hp
  ⟨LinearMap.ker f, .equivOfRightInverse _ p.subtypeL hf,
    fun _ ↦ by ext <;> simp [hf], fun _ ↦ by ext <;> 

Proof state:
case a.a
R : Type u_1
inst✝⁷ : Ring R
M : Type u_2
inst✝⁶ : TopologicalSpace M
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M₂ : Type u_3
inst✝³ : TopologicalSpace M₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R M₂
inst✝ : TopologicalAddGroup M
p : Submodule R M
hp : ClosedComplemented p
f : M →L[R] ↥p
hf : ∀ (x : ↥p), f ↑x = x
x✝ : ↥(LinearMap.ker f)
⊢ ↑((ContinuousLinearEquiv.equivOfRightInverse f (subtypeL p) hf) ↑x✝).1 = ↑(0, x✝).1

Next tactic:
simp [hf]
/-- If `p` is a closed complemented submodule,
then there exists a submodule `q` and a continuous linear equivalence `M ≃L[R] (p × q)` such that
`e (x : p) = (x, 0)`, `e (y : q) = (0, y)`, and `e.symm x = x.1 + x.2`.

In fact, the properties of `e` imply the properties of `e.symm` and vice versa,
but we provide both for convenience. -/
lemma ClosedComplemented.exists_submodule_equiv_prod [TopologicalAddGroup M]
    {p : Submodule R M} (hp : p.ClosedComplemented) :
    ∃ (q : Submodule R M) (e : M ≃L[R] (p × q)),
      (∀ x : p, e x = (x, 0)) ∧ (∀ y : q, e y = (0, y)) ∧ (∀ x, e.symm x = x.1 + x.2) :=
  let ⟨f, hf⟩ := hp
  ⟨LinearMap.ker f, .equivOfRightInverse _ p.subtypeL hf,
    fun _ ↦ by ext <;> simp [hf], fun _ ↦ by ext <;> 

Proof state:
case a.a
R : Type u_1
inst✝⁷ : Ring R
M : Type u_2
inst✝⁶ : TopologicalSpace M
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M₂ : Type u_3
inst✝³ : TopologicalSpace M₂
inst✝² : AddCommGroup M₂
inst✝¹ : Module R M₂
inst✝ : TopologicalAddGroup M
p : Submodule R M
hp : ClosedComplemented p
f : M →L[R] ↥p
hf : ∀ (x : ↥p), f ↑x = x
x✝ : ↥(LinearMap.ker f)
⊢ ↑((ContinuousLinearEquiv.equivOfRightInverse f (subtypeL p) hf) ↑x✝).2 = ↑(0, x✝).2

Next tactic:
simp [hf]
instance continuousSMul_quotient [TopologicalSpace R] [TopologicalAddGroup M] [ContinuousSMul R M] :
    ContinuousSMul R (M ⧸ S) := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : TopologicalSpace M
S : Submodule R M
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalAddGroup M
inst✝ : ContinuousSMul R M
⊢ ContinuousSMul R (M ⧸ S)

Next tactic:
constructor
instance continuousSMul_quotient [TopologicalSpace R] [TopologicalAddGroup M] [ContinuousSMul R M] :
    ContinuousSMul R (M ⧸ S) := by
  constructor
  

Proof state:
case continuous_smul
R : Type u_1
M : Type u_2
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : TopologicalSpace M
S : Submodule R M
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalAddGroup M
inst✝ : ContinuousSMul R M
⊢ Continuous fun p => p.1 • p.2

Next tactic:
have quot : QuotientMap fun au : R × M => (au.1, S.mkQ au.2) :=
    IsOpenMap.to_quotientMap (IsOpenMap.id.prod S.isOpenMap_mkQ)
      (continuous_id.prod_map continuous_quot_mk)
      (Function.surjective_id.Prod_map <| surjective_quot_mk _)
instance continuousSMul_quotient [TopologicalSpace R] [TopologicalAddGroup M] [ContinuousSMul R M] :
    ContinuousSMul R (M ⧸ S) := by
  constructor
  have quot : QuotientMap fun au : R × M => (au.1, S.mkQ au.2) :=
    IsOpenMap.to_quotientMap (IsOpenMap.id.prod S.isOpenMap_mkQ)
      (continuous_id.prod_map continuous_quot_mk)
      (Function.surjective_id.Prod_map <| surjective_quot_mk _)
  

Proof state:
case continuous_smul
R : Type u_1
M : Type u_2
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : TopologicalSpace M
S : Submodule R M
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalAddGroup M
inst✝ : ContinuousSMul R M
quot : QuotientMap fun au => (au.1, (mkQ S) au.2)
⊢ Continuous fun p => p.1 • p.2

Next tactic:
rw [quot.continuous_iff]
instance continuousSMul_quotient [TopologicalSpace R] [TopologicalAddGroup M] [ContinuousSMul R M] :
    ContinuousSMul R (M ⧸ S) := by
  constructor
  have quot : QuotientMap fun au : R × M => (au.1, S.mkQ au.2) :=
    IsOpenMap.to_quotientMap (IsOpenMap.id.prod S.isOpenMap_mkQ)
      (continuous_id.prod_map continuous_quot_mk)
      (Function.surjective_id.Prod_map <| surjective_quot_mk _)
  rw [quot.continuous_iff]
  

Proof state:
case continuous_smul
R : Type u_1
M : Type u_2
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : TopologicalSpace M
S : Submodule R M
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalAddGroup M
inst✝ : ContinuousSMul R M
quot : QuotientMap fun au => (au.1, (mkQ S) au.2)
⊢ Continuous ((fun p => p.1 • p.2) ∘ fun au => (au.1, (mkQ S) au.2))

Next tactic:
exact continuous_quot_mk.comp continuous_smul
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x : PiLp 2 f
⊢ ‖x‖ ^ 2 = re (inner x x)

Next tactic:
simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
⊢ ∀ (x y : PiLp 2 f), (starRingEnd 𝕜) (inner y x) = inner x y

Next tactic:
intro x y
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y : PiLp 2 f
⊢ (starRingEnd 𝕜) (inner y x) = inner x y

Next tactic:
unfold inner
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    unfold inner
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y : PiLp 2 f
⊢ (starRingEnd 𝕜) ({ inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 y x) =
    { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 x y

Next tactic:
rw [map_sum]
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    unfold inner
    rw [map_sum]
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y : PiLp 2 f
⊢ ∑ x_1 : ι, (starRingEnd 𝕜) (InnerProductSpace.toInner.1 (y x_1) (x x_1)) =
    { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 x y

Next tactic:
apply Finset.sum_congr rfl
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    unfold inner
    rw [map_sum]
    apply Finset.sum_congr rfl
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y : PiLp 2 f
⊢ ∀ x_1 ∈ Finset.univ,
    (starRingEnd 𝕜) (InnerProductSpace.toInner.1 (y x_1) (x x_1)) = InnerProductSpace.toInner.1 (x x_1) (y x_1)

Next tactic:
rintro z -
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    unfold inner
    rw [map_sum]
    apply Finset.sum_congr rfl
    rintro z -
    

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y : PiLp 2 f
z : ι
⊢ (starRingEnd 𝕜) (InnerProductSpace.toInner.1 (y z) (x z)) = InnerProductSpace.toInner.1 (x z) (y z)

Next tactic:
apply inner_conj_symm
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    unfold inner
    rw [map_sum]
    apply Finset.sum_congr rfl
    rintro z -
    apply inner_conj_symm
  add_left x y z :=
    show (∑ i, inner (x i + y i) (z i)) = (∑ i, inner (x i) (z i)) + ∑ i, inner (y i) (z i) by
      

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y z : PiLp 2 f
⊢ ∑ i : ι, inner (x i + y i) (z i) = ∑ i : ι, inner (x i) (z i) + ∑ i : ι, inner (y i) (z i)

Next tactic:
simp only [inner_add_left, Finset.sum_add_distrib]
instance PiLp.innerProductSpace {ι : Type*} [Fintype ι] (f : ι → Type*)
    [∀ i, NormedAddCommGroup (f i)] [∀ i, InnerProductSpace 𝕜 (f i)] :
    InnerProductSpace 𝕜 (PiLp 2 f) where
  inner x y := ∑ i, inner (x i) (y i)
  norm_sq_eq_inner x := by
    simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]
  conj_symm := by
    intro x y
    unfold inner
    rw [map_sum]
    apply Finset.sum_congr rfl
    rintro z -
    apply inner_conj_symm
  add_left x y z :=
    show (∑ i, inner (x i + y i) (z i)) = (∑ i, inner (x i) (z i)) + ∑ i, inner (y i) (z i) by
      simp only [inner_add_left, Finset.sum_add_distrib]
  smul_left x y r :=
    show (∑ i : ι, inner (r • x i) (y i)) = conj r * ∑ i, inner (x i) (y i) by
      

Proof state:
ι✝ : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝¹¹ : IsROrC 𝕜
E : Type u_4
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁸ : NormedAddCommGroup E'
inst✝⁷ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace ℝ F
F' : Type u_7
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : InnerProductSpace ℝ F'
ι : Type u_8
inst✝² : Fintype ι
f : ι → Type u_9
inst✝¹ : (i : ι) → NormedAddCommGroup (f i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)
x y : PiLp 2 f
r : 𝕜
⊢ ∑ i : ι, inner (r • x i) (y i) = (starRingEnd 𝕜) r * ∑ i : ι, inner (x i) (y i)

Next tactic:
simp only [Finset.mul_sum, inner_smul_left]
theorem EuclideanSpace.norm_eq {𝕜 : Type*} [IsROrC 𝕜] {n : Type*} [Fintype n]
    (x : EuclideanSpace 𝕜 n) : ‖x‖ = Real.sqrt (∑ i, ‖x i‖ ^ 2) := by
  

Proof state:
ι : Type u_1
ι' : Type u_2
𝕜✝ : Type u_3
inst✝¹⁰ : IsROrC 𝕜✝
E : Type u_4
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜✝ E
E' : Type u_5
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜✝ E'
F : Type u_6
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type u_7
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
𝕜 : Type u_8
inst✝¹ : IsROrC 𝕜
n : Type u_9
inst✝ : Fintype n
x : EuclideanSpace 𝕜 n
⊢ ‖x‖ = Real.sqrt (∑ i : n, ‖x i‖ ^ 2)

Next tactic:
simpa only [Real.coe_sqrt, NNReal.coe_sum] using congr_arg ((↑) : ℝ≥0 → ℝ) x.nnnorm_eq
theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
    Metric.ball (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 < r ^ 2} := by
  

Proof state:
ι : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝⁹ : IsROrC 𝕜
E : Type u_4
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type u_7
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
n : Type u_8
inst✝ : Fintype n
r : ℝ
hr : 0 ≤ r
⊢ Metric.ball 0 r = {x | ∑ i : n, x i ^ 2 < r ^ 2}

Next tactic:
ext x
theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
    Metric.ball (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 < r ^ 2} := by
  ext x
  

Proof state:
case h
ι : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝⁹ : IsROrC 𝕜
E : Type u_4
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type u_7
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
n : Type u_8
inst✝ : Fintype n
r : ℝ
hr : 0 ≤ r
x : EuclideanSpace ℝ n
⊢ x ∈ Metric.ball 0 r ↔ x ∈ {x | ∑ i : n, x i ^ 2 < r ^ 2}

Next tactic:
have : (0 : ℝ) ≤ ∑ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _
theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
    Metric.ball (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 < r ^ 2} := by
  ext x
  have : (0 : ℝ) ≤ ∑ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _
  

Proof state:
case h
ι : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝⁹ : IsROrC 𝕜
E : Type u_4
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type u_7
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
n : Type u_8
inst✝ : Fintype n
r : ℝ
hr : 0 ≤ r
x : EuclideanSpace ℝ n
this : 0 ≤ ∑ i : n, x i ^ 2
⊢ x ∈ Metric.ball 0 r ↔ x ∈ {x | ∑ i : n, x i ^ 2 < r ^ 2}

Next tactic:
simp_rw [mem_setOf, mem_ball_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_lt this hr]
theorem EuclideanSpace.closedBall_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
    Metric.closedBall (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 ≤ r ^ 2} := by
  

Proof state:
ι : Type u_1
ι' : Type u_2
𝕜 : Type u_3
inst✝⁹ : IsROrC 𝕜
E : Type u_4
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type u_5
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type u_6
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type u_7
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
n : Type u_8
inst✝ : Fintype n
r : ℝ
hr : 0 ≤ r
⊢ Metric.closedBall 0 r = {x | ∑ i : n, x i ^ 2 ≤ r ^ 2}

Next tactic:
ext