File size: 5,443 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | import Mathlib
import OAI.Geometry.PrescribedPotential.FrameCompactBounds
namespace OAI
/-! Bounded Normal Frames. -/
section
noncomputable section
open Set Metric Filter Topology Matrix
open scoped ContDiff ComplexOrder Matrix.Norms.Elementwise
namespace KaehlerCalculus
variable {n : β}
lemma frameGram_compact_lower {X : Type*} [TopologicalSpace X]
{L : Set X} (hL : IsCompact L) (G : X β Matrix (Fin n) (Fin n) β)
(hG : ContinuousOn G L) (hp : β x β L, (G x).PosDef) :
β Ξ΄ : β, 0 < Ξ΄ β§ β x β L, β B, Ξ΄*βBβ^2 β€ frameGram (G x) B := by
apply compact_homogeneous_positive hL (fun x B => frameGram (G x) B)
Β· apply continuousOn_trace_re
exact ((continuousOn_matrix_star continuous_snd.continuousOn).mul
(hG.comp continuous_fst.continuousOn (fun _ h => h.1))).mul continuous_snd.continuousOn
Β· exact fun x hx B hB => frameGram_pos (hp x hx) hB
Β· exact fun x _ r B => frameGram_smul (G x) B r
lemma unnormalize_matrix {C D M : Matrix (Fin n) (Fin n) β}
(hCD : C*D = 1) (hM : Cα΄΄*M*C = 1) : M = Dα΄΄*D := by
calc
M = (C*D)α΄΄*M*(C*D) := by rw [hCD]; simp
_ = Dα΄΄*(Cα΄΄*M*C)*D := by simp only [Matrix.conjTranspose_mul,mul_assoc]
_ = Dα΄΄*D := by rw [hM,mul_one]
lemma normalizing_frame_gram_le {C G M : Matrix (Fin n) (Fin n) β}
{R : β} (h : ((R:β) β’ M-G).PosSemidef) (hNorm : Cα΄΄*M*C = 1) :
frameGram G C β€ R*n := by
have hh := (Complex.nonneg_iff.mp (h.conjTranspose_mul_mul_same C).trace_nonneg).1
rw [mul_sub,sub_mul,Matrix.mul_smul,Matrix.smul_mul,hNorm,Matrix.trace_sub,Matrix.trace_smul] at hh
simpa only [Complex.sub_re,smul_eq_mul,Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im,
zero_mul,sub_zero,Matrix.trace_one,Fintype.card_fin,Complex.natCast_re,sub_nonneg,frameGram] using hh
lemma metric_trace_le {G M : Matrix (Fin n) (Fin n) β} {K : β}
(h : ((K:β) β’ G-M).PosSemidef) : M.trace.re β€ K*G.trace.re := by
have hh := (Complex.nonneg_iff.mp h.trace_nonneg).1
rw [Matrix.trace_sub,Matrix.trace_smul] at hh
simpa only [Complex.sub_re,smul_eq_mul,Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im,
zero_mul,sub_zero,sub_nonneg] using hh
lemma compact_normalizing_frames {X : Type*} [TopologicalSpace X]
{L : Set X} (hL : IsCompact L) (G : X β Matrix (Fin n) (Fin n) β)
(hG : ContinuousOn G L) (hp : β x β L, (G x).PosDef)
{R K : β} (hR : 0 β€ R) (hK : 0 β€ K) :
β B : β, 0 β€ B β§ β x β L, β M C D : Matrix (Fin n) (Fin n) β,
((R:β) β’ M-G x).PosSemidef β ((K:β) β’ G x-M).PosSemidef β
C*D = 1 β Cα΄΄*M*C = 1 β βCβ β€ B β§ βDβ β€ B := by
obtain β¨a,ha,hGaβ© := frameGram_compact_lower hL G hG hp
obtain β¨b,hb,hIbβ© := frameGram_compact_lower (n := n)
(X := Unit) (L := univ) isCompact_univ (fun _ => 1) continuousOn_const (fun _ _ => Matrix.PosDef.one)
obtain β¨T,hTβ© := hL.exists_bound_of_continuousOn (continuousOn_trace_re hG)
let Tc := max T 0
let B := max (R*n/a+1) (K*Tc/b+1)
have htc : 0 β€ Tc := le_max_right _ _
refine β¨B,?_,?_β©
Β· exact (by dsimp [B]; exact (by positivity : 0 β€ R*n/a+1).trans (le_max_left _ _))
intro x hx M C D hlow hupp hCD hNorm
have htr : (G x).trace.re β€ Tc := by
exact (le_abs_self _).trans ((hT x hx).trans (le_max_left _ _))
have hc := (hGa x hx C).trans (normalizing_frame_gram_le hlow hNorm)
have hc2 : βCβ^2 β€ R*n/a := (le_div_iffβ ha).mpr (by simpa only [mul_comm] using hc)
have hc1 : βCβ β€ R*n/a+1 := by nlinarith [sq_nonneg (βCβ-1)]
have hd := hIb () (mem_univ _) D
have hDgram : frameGram 1 D = M.trace.re := by
rw [unnormalize_matrix hCD hNorm]
simp only [frameGram,mul_one]
rw [hDgram] at hd
have hd2 : βDβ^2 β€ K*Tc/b := (le_div_iffβ hb).mpr (by
have hm := (metric_trace_le hupp).trans (mul_le_mul_of_nonneg_left htr hK)
exact (by simpa only [mul_comm] using hd.trans hm))
have hd1 : βDβ β€ K*Tc/b+1 := by nlinarith [sq_nonneg (βDβ-1)]
exact β¨hc1.trans (le_max_left _ _),hd1.trans (le_max_right _ _)β©
def boundedFramePairs (B : β) : Set (Matrix (Fin n) (Fin n) β Γ Matrix (Fin n) (Fin n) β) :=
{p | βp.1β β€ B β§ βp.2β β€ B β§ p.1*p.2 = 1 β§ p.2*p.1 = 1}
lemma boundedFramePairs_compact (B : β) : IsCompact (boundedFramePairs (n := n) B) := by
have he : boundedFramePairs (n := n) B =
(closedBall (0:Matrix (Fin n) (Fin n) β) B ΓΛ’ closedBall 0 B) β©
{p | p.1*p.2 = 1 β§ p.2*p.1 = 1} := by
ext p
simp only [boundedFramePairs,mem_ofPred_eq,mem_inter_iff,mem_prod,mem_closedBall,dist_zero_right]
tauto
rw [he]
apply (isCompact_closedBall _ _ |>.prod (isCompact_closedBall _ _)).inter_right
have hc : Continuous (fun p : Matrix (Fin n) (Fin n) β Γ Matrix (Fin n) (Fin n) β => p.1*p.2) :=
continuous_fst.matrix_mul continuous_snd
have hd : Continuous (fun p : Matrix (Fin n) (Fin n) β Γ Matrix (Fin n) (Fin n) β => p.2*p.1) :=
continuous_snd.matrix_mul continuous_fst
exact (isClosed_eq hc continuous_const).inter (isClosed_eq hd continuous_const)
lemma boundedFramePairs_units {B : β} {p : Matrix (Fin n) (Fin n) β Γ Matrix (Fin n) (Fin n) β}
(hp : p β boundedFramePairs B) : IsUnit p.1 β§ IsUnit p.2 := by
exact β¨β¨β¨p.1,p.2,hp.2.2.1,hp.2.2.2β©,rflβ©,β¨β¨p.2,p.1,hp.2.2.2,hp.2.2.1β©,rflβ©β©
end KaehlerCalculus
end
end
end OAI
|