Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Analysis/InnerProductSpace/Quotient): add the quotient InnerProductSpace by the null space #16707

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
58dbb79
put `Semi`
yoh-tanimoto Sep 6, 2024
cbe33c3
put `Semi`
yoh-tanimoto Sep 6, 2024
e973783
Create Quotient.lean
yoh-tanimoto Sep 8, 2024
01c83b1
Update Quotient.lean
yoh-tanimoto Sep 10, 2024
ef8ba7c
Update Quotient.lean
yoh-tanimoto Sep 10, 2024
57289ae
add line to `Mathlib.lean`
yoh-tanimoto Sep 10, 2024
795b1a3
add docstring
yoh-tanimoto Sep 10, 2024
b3d12f0
Update Mathlib/Analysis/InnerProductSpace/Quotient.lean
yoh-tanimoto Sep 12, 2024
5432128
Update Mathlib/Analysis/InnerProductSpace/Quotient.lean
yoh-tanimoto Sep 12, 2024
77411bd
Update Mathlib/Analysis/InnerProductSpace/Quotient.lean
yoh-tanimoto Sep 12, 2024
e9ded34
Update Mathlib/Analysis/InnerProductSpace/Quotient.lean
yoh-tanimoto Sep 12, 2024
130243e
Update Quotient.lean
yoh-tanimoto Sep 12, 2024
72dd13e
Merge remote-tracking branch 'origin/master' into yoh-tanimoto-innerp…
eric-wieser Sep 25, 2024
a1a093f
Merge pull request #17157 from leanprover-community/master
yoh-tanimoto Sep 26, 2024
1d99e4b
Update Quotient.lean
yoh-tanimoto Sep 26, 2024
9e29b5d
Merge remote-tracking branch 'origin/master' into yoh-tanimoto-innerp…
yoh-tanimoto Sep 30, 2024
1afcd2b
Create SeparationQuotient.lean
yoh-tanimoto Oct 2, 2024
3badb3f
Update SeparationQuotient.lean
yoh-tanimoto Oct 2, 2024
f39b370
Update Mathlib.lean
yoh-tanimoto Oct 2, 2024
89b7fd6
rename
yoh-tanimoto Oct 2, 2024
115541f
replace namespace
yoh-tanimoto Oct 2, 2024
5186e8a
add namespace
yoh-tanimoto Oct 2, 2024
358d5c8
Update Mathlib/Analysis/Normed/Group/SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
6233160
Update Mathlib/Analysis/Normed/Group/SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
b9e8354
Update Mathlib/Analysis/Normed/Group/SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
dceb20e
Update SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
a5f395a
use `SetLike.mem_coe`
yoh-tanimoto Oct 3, 2024
18b3510
Update Mathlib/Topology/Algebra/SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
a2dc60e
Update Mathlib/Topology/Algebra/SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
a80e621
Update Mathlib/Topology/Algebra/SeparationQuotient.lean
yoh-tanimoto Oct 3, 2024
cd58b59
Revert "Update Mathlib/Topology/Algebra/SeparationQuotient.lean"
yoh-tanimoto Oct 3, 2024
bfb096c
change names
yoh-tanimoto Oct 3, 2024
ce9ce50
add `liftCLM` and others
yoh-tanimoto Oct 3, 2024
cde0e53
Update Mathlib.lean
yoh-tanimoto Oct 3, 2024
006c9f8
add `liftCLM`
yoh-tanimoto Oct 4, 2024
b2a3322
done `InnerProductSpace`
yoh-tanimoto Oct 4, 2024
f06620b
Merge branch 'master' into yoh-tanimoto-innerproductspace-quotient
yoh-tanimoto Oct 5, 2024
a51f01b
modify namespaces, docstring
yoh-tanimoto Oct 5, 2024
467554a
remove unnecessary variables, add docstring
yoh-tanimoto Oct 5, 2024
6b2e073
Update SeparationQuotient.lean
yoh-tanimoto Oct 5, 2024
1ad7a36
Merge remote-tracking branch 'origin/master' into yoh-tanimoto-innerp…
yoh-tanimoto Oct 9, 2024
e85a785
Merge remote-tracking branch 'origin/master' into yoh-tanimoto-innerp…
yoh-tanimoto Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,7 @@ import Mathlib.Analysis.InnerProductSpace.Positive
import Mathlib.Analysis.InnerProductSpace.ProdL2
import Mathlib.Analysis.InnerProductSpace.Projection
import Mathlib.Analysis.InnerProductSpace.Rayleigh
import Mathlib.Analysis.InnerProductSpace.SeparationQuotient
import Mathlib.Analysis.InnerProductSpace.Spectrum
import Mathlib.Analysis.InnerProductSpace.StarOrder
import Mathlib.Analysis.InnerProductSpace.Symmetric
Expand Down Expand Up @@ -1226,6 +1227,7 @@ import Mathlib.Analysis.Normed.Group.SemiNormedGrp
import Mathlib.Analysis.Normed.Group.SemiNormedGrp.Completion
import Mathlib.Analysis.Normed.Group.SemiNormedGrp.Kernels
import Mathlib.Analysis.Normed.Group.Seminorm
import Mathlib.Analysis.Normed.Group.SeparationQuotient
import Mathlib.Analysis.Normed.Group.Submodule
import Mathlib.Analysis.Normed.Group.Tannery
import Mathlib.Analysis.Normed.Group.Uniform
Expand Down
19 changes: 17 additions & 2 deletions Mathlib/Analysis/InnerProductSpace/Dual.lean
eric-wieser marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ namespace InnerProductSpace

open RCLike ContinuousLinearMap

section Seminormed

variable (𝕜 : Type*)
variable (E : Type*) [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
variable (E : Type*) [RCLike 𝕜] [SeminormedAddCommGroup E] [InnerProductSpace 𝕜 E]

local notation "⟪" x ", " y "⟫" => @inner 𝕜 E _ x y

Expand All @@ -67,10 +69,21 @@ variable {E}
theorem toDualMap_apply {x y : E} : toDualMap 𝕜 E x y = ⟪x, y⟫ :=
rfl

end Seminormed

section Normed

variable (𝕜 : Type*)
variable (E : Type*) [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]

local notation "⟪" x ", " y "⟫" => @inner 𝕜 E _ x y

local postfix:90 "†" => starRingEnd _

theorem innerSL_norm [Nontrivial E] : ‖(innerSL 𝕜 : E →L⋆[𝕜] E →L[𝕜] 𝕜)‖ = 1 :=
show ‖(toDualMap 𝕜 E).toContinuousLinearMap‖ = 1 from LinearIsometry.norm_toContinuousLinearMap _

variable {𝕜}
variable {E 𝕜}

theorem ext_inner_left_basis {ι : Type*} {x y : E} (b : Basis ι 𝕜 E)
(h : ∀ i : ι, ⟪b i, x⟫ = ⟪b i, y⟫) : x = y := by
Expand Down Expand Up @@ -170,4 +183,6 @@ theorem unique_continuousLinearMapOfBilin {v f : E} (is_lax_milgram : ∀ w, ⟪
rw [continuousLinearMapOfBilin_apply]
exact is_lax_milgram w

end Normed

end InnerProductSpace
206 changes: 206 additions & 0 deletions Mathlib/Analysis/InnerProductSpace/SeparationQuotient.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
/-
Copyright (c) 2024 Yoh Tanimoto. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yoh Tanimoto
-/
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.Normed.Group.SeparationQuotient

/-!
# Canonial inner product space from Preinner product space

This file defines the inner product space from a preinner product space (the inner product
can be degenerate) by quotienting the null space.

## Main results

It is shown that ` ⟪x, y⟫_𝕜 = 0` for all `y : E` using the Cauchy-Schwarz inequality.
-/

noncomputable section

open RCLike Submodule Quotient LinearMap InnerProductSpace InnerProductSpace.Core

variable (𝕜 E : Type*) [k: RCLike 𝕜]

section NullSubmodule

open SeparationQuotient

variable [SeminormedAddCommGroup E] [InnerProductSpace 𝕜 E]

/-- The null space with respect to the norm. -/
instance nullSubmodule : Submodule 𝕜 E :=

Check failure on line 33 in Mathlib/Analysis/InnerProductSpace/SeparationQuotient.lean

View workflow job for this annotation

GitHub Actions / Build

nullSubmodule should not be an instance
{ nullSpace with
smul_mem' := by
intro c x hx
simp only [Set.mem_setOf_eq] at hx
simp only [Set.mem_setOf_eq]
simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
AddSubgroup.mem_toAddSubmonoid]
have : ‖c • x‖ = 0 := by
rw [norm_smul, hx, mul_zero]
exact this }

@[simp]
lemma mem_nullSubmodule_iff {x : E} : x ∈ nullSubmodule 𝕜 E ↔ ‖x‖ = 0 := Iff.rfl

lemma inner_eq_zero_of_left_mem_nullSubmodule (x y : E) (h : x ∈ nullSubmodule 𝕜 E) :
⟪x, y⟫_𝕜 = 0 := by
rw [← norm_eq_zero, ← sq_eq_zero_iff]
apply le_antisymm _ (sq_nonneg _)
rw [sq]
nth_rw 2 [← RCLike.norm_conj]
rw [_root_.inner_conj_symm]
calc ‖⟪x, y⟫_𝕜‖ * ‖⟪y, x⟫_𝕜‖ ≤ re ⟪x, x⟫_𝕜 * re ⟪y, y⟫_𝕜 := inner_mul_inner_self_le _ _
_ = (‖x‖ * ‖x‖) * re ⟪y, y⟫_𝕜 := by rw [inner_self_eq_norm_mul_norm x]
_ = (0 * 0) * re ⟪y, y⟫_𝕜 := by rw [(mem_nullSubmodule_iff 𝕜 E).mp h]
_ = 0 := by ring

lemma inner_nullSubmodule_right_eq_zero (x y : E) (h : y ∈ nullSpace) : ⟪x, y⟫_𝕜 = 0 := by
rw [inner_eq_zero_symm]
exact inner_eq_zero_of_left_mem_nullSubmodule 𝕜 E y x h

lemma inn_nullSubmodule_right_eq_zero (x y : E) (h : y ∈ (nullSubmodule 𝕜 E)) : ‖x - y‖ = ‖x‖ := by
rw [← sq_eq_sq (norm_nonneg _) (norm_nonneg _), sq, sq,
← @inner_self_eq_norm_mul_norm 𝕜 E _ _ _ x, ← @inner_self_eq_norm_mul_norm 𝕜 E _ _ _ (x-y),
inner_sub_sub_self, inner_nullSubmodule_right_eq_zero 𝕜 E x y h,
inner_eq_zero_of_left_mem_nullSubmodule 𝕜 E y x h,
inner_eq_zero_of_left_mem_nullSubmodule 𝕜 E y y h]
simp only [sub_zero, add_zero]

/-- For each `x : E`, the kernel of `⟪x, ⬝⟫` includes the null space. -/
lemma nullSubmodule_le_ker_toDualMap (x : E) : nullSubmodule 𝕜 E ≤ ker (toDualMap 𝕜 E x) := by
intro y hy
refine LinearMap.mem_ker.mpr ?_
simp only [toDualMap_apply]
exact inner_nullSubmodule_right_eq_zero 𝕜 E x y hy

/-- The kernel of the map `x ↦ ⟪x, ⬝⟫` includes the null space. -/
lemma nullSubmodule_le_ker_toDualMap' : nullSubmodule 𝕜 E ≤ ker (toDualMap 𝕜 E) := by
intro x hx
refine LinearMap.mem_ker.mpr ?_
ext y
simp only [toDualMap_apply, ContinuousLinearMap.zero_apply]
exact inner_eq_zero_of_left_mem_nullSubmodule 𝕜 E x y hx


-- TOD lift as linearmap
-- /-- An auxiliary map to define the inner product on the quotient. Only the first entry is
-- quotiented. -/
-- def preInnerQ : SeparationQuotient E →ₗ⋆[𝕜] (NormedSpace.Dual 𝕜 E) :=
-- lift (toDualMap 𝕜 E).toLinearMap
-- (by
-- intro x y
-- sorry)

-- lemma nullSubmodule_le_ker_preInnerQ (x : E ⧸ (nullSubmodule 𝕜 E)) : nullSubmodule 𝕜 E ≤
-- ker (preInnerQ 𝕜 E x) := by
-- intro y hy
-- simp only [LinearMap.mem_ker]
-- obtain ⟨z, hz⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) x
-- rw [preInnerQ, ← hz, mkQ_apply, Submodule.liftQ_apply]
-- simp only [LinearIsometry.coe_toLinearMap, toDualMap_apply]
-- exact inner_nullSubmodule_right_eq_zero 𝕜 E z y hy

-- /-- The inner product on the quotient, composed as the composition of two lifts to the quotients. -/
-- def innerQ : E ⧸ (nullSubmodule 𝕜 E) → E ⧸ (nullSubmodule 𝕜 E) → 𝕜 :=
-- fun x => liftQ (nullSubmodule 𝕜 E) (preInnerQ 𝕜 E x).toLinearMap (nullSubmodule_le_ker_preInnerQ 𝕜 E x)

-- instance : IsClosed ((nullSubmodule 𝕜 E) : Set E) := by
-- rw [← isOpen_compl_iff, isOpen_iff_nhds]
-- intro x hx
-- refine Filter.le_principal_iff.mpr ?_
-- rw [mem_nhds_iff]
-- use Metric.ball x (‖x‖/2)
-- have normxnezero : 0 < ‖x‖ := (lt_of_le_of_ne (norm_nonneg x) (Ne.symm hx))
-- refine ⟨?_, Metric.isOpen_ball, Metric.mem_ball_self <| half_pos normxnezero⟩
-- intro y hy
-- have normy : ‖x‖ / 2 ≤ ‖y‖ := by
-- rw [mem_ball_iff_norm, ← norm_neg] at hy
-- simp only [neg_sub] at hy
-- rw [← sub_half]
-- have hy' : ‖x‖ - ‖y‖ < ‖x‖ / 2 := lt_of_le_of_lt (norm_sub_norm_le _ _) hy
-- linarith
-- exact Ne.symm (ne_of_lt (lt_of_lt_of_le (half_pos normxnezero) normy))

-- end NullSubmodule

-- section InnerProductSpace

-- variable [SeminormedAddCommGroup E] [InnerProductSpace 𝕜 E]

-- instance : InnerProductSpace 𝕜 (E ⧸ (nullSubmodule 𝕜 E)) where
-- inner := innerQ 𝕜 E
-- conj_symm x y:= by
-- rw [inner]
-- simp only
-- rw [innerQ, innerQ]
-- obtain ⟨z, hz⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) x
-- obtain ⟨w, hw⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) y
-- rw [← hz, ← hw]
-- simp only [mkQ_apply, liftQ_apply, ContinuousLinearMap.coe_coe]
-- rw [preInnerQ, Submodule.liftQ_apply, Submodule.liftQ_apply]
-- simp only [LinearIsometry.coe_toLinearMap, toDualMap_apply]
-- exact conj_symm z w
-- norm_sq_eq_inner x := by
-- rw [AddSubgroup.quotient_norm_eq]
-- obtain ⟨z, hz⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) x
-- rw [← hz]
-- simp only [mkQ_apply]
-- rw [innerQ]
-- simp only [liftQ_apply, ContinuousLinearMap.coe_coe]
-- rw [preInnerQ]
-- simp only [liftQ_apply, LinearIsometry.coe_toLinearMap, toDualMap_apply]
-- rw [inner_self_eq_norm_sq_to_K, sq (ofReal ‖z‖)]
-- simp only [mul_re, ofReal_re, ofReal_im, mul_zero, sub_zero]
-- rw [← sq]
-- have : norm '' {m : E | (QuotientAddGroup.mk m) = (mk z : E ⧸ (nullSubmodule 𝕜 E))}
-- = norm '' {z} := by
-- ext x
-- constructor
-- · intro hx
-- obtain ⟨m, hm⟩ := hx
-- simp only [Set.image_singleton, Set.mem_singleton_iff]
-- simp only [Set.mem_setOf_eq] at hm
-- have hm' : (QuotientAddGroup.mk m) = (mk m : E ⧸ (nullSubmodule 𝕜 E)) := rfl
-- rw [hm', Submodule.Quotient.eq] at hm
-- have : ‖m‖ = ‖z‖ := by
-- rw [← inn_nullSubmodule_right_eq_zero 𝕜 E m (m-z) hm.1]
-- simp only [sub_sub_cancel]
-- rw [← this]
-- exact Eq.symm hm.2
-- · intro hx
-- rw [Set.image_singleton, Set.mem_singleton_iff] at hx
-- simp only [Set.mem_image, Set.mem_setOf_eq]
-- use z
-- refine ⟨rfl, (Eq.symm hx)⟩
-- simp_rw [this]
-- simp only [Set.image_singleton, csInf_singleton]
-- add_left x y z:= by
-- rw [inner]
-- simp only
-- rw [innerQ, innerQ, innerQ]
-- obtain ⟨a, ha⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) x
-- obtain ⟨b, hb⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) y
-- obtain ⟨c, hc⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) z
-- rw [← ha, ← hb, ← hc]
-- simp only [mkQ_apply, liftQ_apply, ContinuousLinearMap.coe_coe]
-- rw [preInnerQ, Submodule.liftQ_apply, Submodule.liftQ_apply, map_add, Submodule.liftQ_apply]
-- simp only [LinearIsometry.coe_toLinearMap, liftQ_apply, ContinuousLinearMap.add_apply,
-- toDualMap_apply]
-- smul_left x y r := by
-- rw [inner]
-- simp only
-- rw [innerQ, innerQ]
-- obtain ⟨a, ha⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) x
-- obtain ⟨b, hb⟩ := Submodule.mkQ_surjective (nullSubmodule 𝕜 E) y
-- rw [← ha, ← hb]
-- simp only [mkQ_apply, liftQ_apply, ContinuousLinearMap.coe_coe]
-- rw [preInnerQ, Submodule.liftQ_apply]
-- simp only [LinearMap.map_smulₛₗ, liftQ_apply, LinearIsometry.coe_toLinearMap,
-- ContinuousLinearMap.coe_smul', Pi.smul_apply, toDualMap_apply, smul_eq_mul]

-- end InnerProductSpace

-- end
Loading
Loading