math / data /lean /OAI /Geometry /ComplexBundle /Orthonormal.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
11.4 kB
import OAI.Geometry.ComplexBundle.LineStage
import Mathlib.Analysis.InnerProductSpace.Projection.FiniteDimensional
namespace OAI
noncomputable section
/-! Continuous orthonormal frames and orthogonal complements. -/
section
open Bundle Topology
open scoped BigOperators
namespace Kaplansky
section
open ComplexGrassmann
variable {ฮน : Type*} {K : ฮน โ†’ โ„•} {d : โ„•}
structure ContinuousIndependentStageFrame (a : LineStage K) (d : โ„•) where
vector : โˆ€ y, Fin d โ†’ a.Fiber y
continuous_vector : โˆ€ i, Continuous (fun y => TotalSpace.mk' a.Model y (vector y i))
independent : โˆ€ y, LinearIndependent โ„‚ (vector y)
structure ContinuousOrthonormalStageFrame (a : LineStage K) (d : โ„•) where
vector : โˆ€ y, Fin d โ†’ a.Fiber y
continuous_vector : โˆ€ i, Continuous (fun y => TotalSpace.mk' a.Model y (vector y i))
orthonormal : โˆ€ y, Orthonormal โ„‚ (vector y)
namespace ContinuousIndependentStageFrame
variable {a : LineStage K}
theorem continuous_gram (f : ContinuousIndependentStageFrame a d) :
Continuous (fun y => Matrix.gram โ„‚ (f.vector y)) := by
apply continuous_pi
intro i
apply continuous_pi
intro j
exact continuous_lineStage_inner_over a id continuous_id (fun y => f.vector y i)
(fun y => f.vector y j) (f.continuous_vector i) (f.continuous_vector j)
def normalize (f : ContinuousIndependentStageFrame a d) : ContinuousOrthonormalStageFrame a d where
vector y := metricFrame (f.vector y)
orthonormal y := metricFrame_orthonormal _ (f.independent y)
continuous_vector j := by
have hc := continuous_metricFrame_coefficients _ f.continuous_gram
(fun y => Matrix.posDef_gram_of_linearIndependent (f.independent y))
apply continuousOn_univ.mp
unfold metricFrame frameMul
apply continuousOn_bundle_sum (๐•œ := โ„‚)
intro i _
apply continuousOn_bundle_smul
ยท exact ((continuous_apply j).comp ((continuous_apply i).comp hc)).continuousOn
ยท exact (f.continuous_vector i).continuousOn
theorem normalize_span (f : ContinuousIndependentStageFrame a d) (y : ProjectiveProduct K) :
Submodule.span โ„‚ (Set.range (f.normalize.vector y)) =
Submodule.span โ„‚ (Set.range (f.vector y)) :=
span_metricFrame _ (f.independent y)
end ContinuousIndependentStageFrame
end
open ComplexGrassmann
variable {ฮน : Type*} {K : ฮน โ†’ โ„•} {d : โ„•} {a : LineStage K}
namespace ContinuousOrthonormalStageFrame
variable (f : ContinuousOrthonormalStageFrame a d)
abbrev ImageTotal := {z : TotalSpace a.Model a.Fiber //
z.2 โˆˆ Submodule.span โ„‚ (Set.range (f.vector z.proj))}
theorem continuous_synthesis :
Continuous (fun z : ProjectiveProduct K ร— EuclideanSpace โ„‚ (Fin d) =>
TotalSpace.mk' a.Model z.1 (frameSynthesis (f.vector z.1) z.2)) := by
apply continuousOn_univ.mp
change ContinuousOn (fun z : ProjectiveProduct K ร— EuclideanSpace โ„‚ (Fin d) =>
TotalSpace.mk' a.Model z.1 (โˆ‘ i, z.2 i โ€ข f.vector z.1 i)) Set.univ
apply continuousOn_bundle_sum_over (๐•œ := โ„‚) _ continuous_fst.continuousOn
intro i _
apply continuousOn_bundle_smul_over _ continuous_fst.continuousOn
ยท exact ((continuous_apply i).comp ((EuclideanSpace.equiv _ โ„‚).continuous.comp continuous_snd)).continuousOn
ยท exact ((f.continuous_vector i).comp continuous_fst).continuousOn
theorem continuous_analysis :
Continuous (fun z : TotalSpace a.Model a.Fiber => frameAnalysis (f.vector z.proj) z.2) := by
have hc : Continuous (fun z : TotalSpace a.Model a.Fiber => fun i : Fin d =>
inner โ„‚ (f.vector z.proj i) z.2) := by
apply continuous_pi
intro i
exact continuous_lineStage_inner_over a _ (FiberBundle.continuous_proj _ _)
(fun z => f.vector z.proj i) (fun z => z.2)
((f.continuous_vector i).comp (FiberBundle.continuous_proj _ _)) continuous_id
exact (EuclideanSpace.equiv (Fin d) โ„‚).symm.continuous.comp hc
/-- A homeomorphism with the subspace topology inherited from the actual
ambient bundle, not a separately declared topology on an abstract image. -/
def imageTotalHomeomorph : ProjectiveProduct K ร— EuclideanSpace โ„‚ (Fin d) โ‰ƒโ‚œ f.ImageTotal where
toFun z := โŸจโŸจz.1,frameSynthesis (f.vector z.1) z.2โŸฉ,frameSynthesis_mem_span _ _โŸฉ
invFun z := (z.val.proj,frameAnalysis (f.vector z.val.proj) z.val.2)
left_inv z := Prod.ext rfl (frameAnalysis_synthesis _ (f.orthonormal z.1) z.2)
right_inv z := by
apply Subtype.ext
obtain โŸจโŸจy,vโŸฉ,hvโŸฉ := z
exact congrArg (TotalSpace.mk' a.Model y) (frameSynthesis_analysis _ (f.orthonormal y) hv)
continuous_toFun := f.continuous_synthesis.subtype_mk _
continuous_invFun :=
((FiberBundle.continuous_proj _ _).comp continuous_subtype_val).prodMk
(f.continuous_analysis.comp continuous_subtype_val)
@[simp] theorem imageTotalHomeomorph_base
(z : ProjectiveProduct K ร— EuclideanSpace โ„‚ (Fin d)) :
(f.imageTotalHomeomorph z).val.proj=z.1 := rfl
theorem imageTotalHomeomorph_fiber_linear (y : ProjectiveProduct K) :
โˆƒ L : EuclideanSpace โ„‚ (Fin d) โ†’โ‚—[โ„‚] a.Fiber y,
โˆ€ v, (f.imageTotalHomeomorph (y,v)).val.2=L v :=
โŸจframeSynthesis (f.vector y),fun _ => rflโŸฉ
def projection (y : ProjectiveProduct K) : a.Fiber y โ†’โ‚—[โ„‚] a.Fiber y :=
(frameSynthesis (f.vector y)).comp (frameAnalysis (f.vector y))
theorem projection_idempotent (y : ProjectiveProduct K) (v : a.Fiber y) :
f.projection y (f.projection y v)=f.projection y v := by
exact congrArg (frameSynthesis (f.vector y))
(frameAnalysis_synthesis _ (f.orthonormal y) (frameAnalysis (f.vector y) v))
theorem projection_mem (y : ProjectiveProduct K) (v : a.Fiber y) :
f.projection y v โˆˆ Submodule.span โ„‚ (Set.range (f.vector y)) := frameSynthesis_mem_span _ _
theorem projection_eq_self (y : ProjectiveProduct K) (v : a.Fiber y) :
f.projection y v = v โ†” v โˆˆ Submodule.span โ„‚ (Set.range (f.vector y)) := by
constructor
ยท intro h
rw [โ† h]
exact f.projection_mem y v
ยท exact frameSynthesis_analysis _ (f.orthonormal y)
theorem continuous_projection :
Continuous (fun z : TotalSpace a.Model a.Fiber =>
TotalSpace.mk' a.Model z.proj (f.projection z.proj z.2)) :=
f.continuous_synthesis.comp ((FiberBundle.continuous_proj _ _).prodMk f.continuous_analysis)
theorem image_finrank (y : ProjectiveProduct K) :
Module.finrank โ„‚ (Submodule.span โ„‚ (Set.range (f.vector y)))=d :=
frameSpan_finrank _ (f.orthonormal y)
end ContinuousOrthonormalStageFrame
end Kaplansky
end
section
open scoped BigOperators
namespace Kaplansky
variable {d : โ„•} {E : Type*} [NormedAddCommGroup E] [InnerProductSpace โ„‚ E]
theorem frameSynthesis_inner (v : Fin d โ†’ E) (hv : Orthonormal โ„‚ v)
(x y : EuclideanSpace โ„‚ (Fin d)) :
inner โ„‚ (frameSynthesis v x) (frameSynthesis v y)=inner โ„‚ x y := by
have h := hv.inner_sum (fun i => x i) (fun i => y i) Finset.univ
change inner โ„‚ (โˆ‘ i, x i โ€ข v i) (โˆ‘ i, y i โ€ข v i) = _
rw [h]
change (โˆ‘ i, star (x i)*y i) = โˆ‘ i, inner โ„‚ (x i) (y i)
simp only [RCLike.inner_apply,starRingEnd_apply,mul_comm]
def frameSynthesisIsometry (v : Fin d โ†’ E) (hv : Orthonormal โ„‚ v) :
EuclideanSpace โ„‚ (Fin d) โ†’โ‚—แตข[โ„‚] E where
toLinearMap := frameSynthesis v
norm_map' := (LinearMap.norm_map_iff_inner_map_map _).mpr (frameSynthesis_inner v hv)
open ComplexGrassmann
namespace ContinuousOrthonormalStageFrame
variable {ฮน : Type*} {K : ฮน โ†’ โ„•} {a : LineStage K}
theorem projection_error_inner (f : ContinuousOrthonormalStageFrame a d)
(y : ProjectiveProduct K) (v : a.Fiber y) (i : Fin d) :
inner โ„‚ (f.vector y i) (v-f.projection y v)=0 := by
have hi := congrArg (fun x : EuclideanSpace โ„‚ (Fin d) => x i)
(frameAnalysis_synthesis (f.vector y) (f.orthonormal y) (frameAnalysis (f.vector y) v))
change inner โ„‚ (f.vector y i) (f.projection y v)=inner โ„‚ (f.vector y i) v at hi
exact (inner_sub_right (๐•œ := โ„‚) (f.vector y i) v (f.projection y v)).trans
(sub_eq_zero.mpr hi.symm)
end ContinuousOrthonormalStageFrame
end Kaplansky
end
open Bundle Topology
open scoped BigOperators
namespace Kaplansky
open ComplexGrassmann
namespace ContinuousOrthonormalStageFrame
variable {ฮน : Type*} {K : ฮน โ†’ โ„•} {a : LineStage K} {d : โ„•}
variable (f : ContinuousOrthonormalStageFrame a d)
def complementProjection (y : ProjectiveProduct K) : a.Fiber y โ†’โ‚—[โ„‚] a.Fiber y :=
LinearMap.id - f.projection y
theorem complementProjection_mem (y : ProjectiveProduct K) (v : a.Fiber y) :
f.complementProjection y v โˆˆ (Submodule.span โ„‚ (Set.range (f.vector y)))แ—ฎ := by
apply (Submodule.mem_orthogonal _ _).mpr
intro u hu
induction hu using Submodule.span_induction with
| mem u hu =>
obtain โŸจi, rflโŸฉ := hu
exact f.projection_error_inner y v i
| zero => exact inner_zero_left _
| add u w hu hw ihu ihw =>
exact (inner_add_left u w _).trans (by rw [ihu, ihw, zero_add])
| smul c u hu ihu =>
exact (inner_smul_left u _ c).trans (by rw [ihu, mul_zero])
theorem projection_eq_zero_of_orthogonal (y : ProjectiveProduct K) (v : a.Fiber y)
(hv : v โˆˆ (Submodule.span โ„‚ (Set.range (f.vector y)))แ—ฎ) : f.projection y v=0 := by
have ha : frameAnalysis (f.vector y) v=0 := by
apply (EuclideanSpace.equiv (Fin d) โ„‚).injective
funext i
exact (Submodule.mem_orthogonal _ _).mp hv _ (Submodule.subset_span โŸจi,rflโŸฉ)
change frameSynthesis (f.vector y) (frameAnalysis (f.vector y) v)=0
exact (congrArg (frameSynthesis (f.vector y)) ha).trans
(frameSynthesis (f.vector y)).map_zero
theorem complementProjection_range (y : ProjectiveProduct K) :
LinearMap.range (f.complementProjection y) = (Submodule.span โ„‚ (Set.range (f.vector y)))แ—ฎ := by
apply le_antisymm
ยท rintro _ โŸจv,rflโŸฉ
exact f.complementProjection_mem y v
ยท intro v hv
refine โŸจv,?_โŸฉ
change v-f.projection y v=v
rw [f.projection_eq_zero_of_orthogonal y v hv,sub_zero]
theorem continuous_complementProjection :
Continuous (fun z : TotalSpace a.Model a.Fiber =>
TotalSpace.mk' a.Model z.proj (f.complementProjection z.proj z.2)) := by
apply continuous_iff_continuousAt.mpr
intro z
rw [FiberBundle.continuousAt_totalSpace]
refine โŸจ(FiberBundle.continuous_proj _ _).continuousAt,?_โŸฉ
let e := trivializationAt a.Model a.Fiber z.proj
have hc := ((FiberBundle.continuousAt_totalSpace a.Model _ (xโ‚€ := z)).mp (continuous_id (X := TotalSpace a.Model a.Fiber)).continuousAt).2
have hp := ((FiberBundle.continuousAt_totalSpace a.Model _ (xโ‚€ := z)).mp f.continuous_projection.continuousAt).2
apply (hc.sub hp).congr_of_eventuallyEq
have hn := e.open_baseSet.mem_nhds (mem_baseSet_trivializationAt a.Model a.Fiber z.proj)
filter_upwards [(FiberBundle.continuous_proj a.Model a.Fiber).continuousAt hn] with w hw
exact (e.linear โ„‚ hw).map_sub w.2 (f.projection w.proj w.2)
theorem complement_finrank (y : ProjectiveProduct K) :
Module.finrank โ„‚ (Submodule.span โ„‚ (Set.range (f.vector y)))แ—ฎ + d = Fintype.card a.Slot := by
let V : Fin d โ†’ EuclideanSpace โ„‚ a.Slot := f.vector y
have hV : Orthonormal โ„‚ V := f.orthonormal y
change Module.finrank โ„‚ (Submodule.span โ„‚ (Set.range V))แ—ฎ + d = _
have h := (Submodule.span โ„‚ (Set.range V)).finrank_add_finrank_orthogonal
rw [frameSpan_finrank V hV, finrank_euclideanSpace] at h
omega
end ContinuousOrthonormalStageFrame
end Kaplansky
end
end OAI