Download data/lean/OAI/Geometry/PrescribedPotential/BoundedNormalFrames.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.44 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PrescribedPotential/BoundedNormalFrames.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PrescribedPotential/BoundedNormalFrames.lean
-
curl -L -o BoundedNormalFrames.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PrescribedPotential/BoundedNormalFrames.lean
5.44 kB
| 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 | |