Buckets:
| import OAI.Geometry.Convex.GeneralMahler.Matrix | |
| namespace OAI | |
| /-! Order and functional calculus for real symmetric matrices. -/ | |
| noncomputable section | |
| open Set Filter Matrix Real | |
| open scoped Topology ENNReal NNReal RealInnerProductSpace Matrix.Norms.L2Operator MatrixOrder | |
| namespace GeneralMahler | |
| variable {m : β} {A B : Mat m} | |
| lemma op_eigen (h : A.IsHermitian) (i : Fin m) : | |
| op A (h.eigenvectorBasis i) = h.eigenvalues i β’ (h.eigenvectorBasis i) := by | |
| apply WithLp.ofLp_injective | |
| rw [show op = _ from (rfl : op = Matrix.toEuclideanCLM (n := Fin m) (π := β)), | |
| Matrix.ofLp_toEuclideanCLM] | |
| exact h.mulVec_eigenvectorBasis i | |
| theorem cfc_eigen' (f : β β β) (h : A.IsHermitian) (i : Fin m) : | |
| op (cfc f A) (h.eigenvectorBasis i) = (f (h.eigenvalues i)) β’ h.eigenvectorBasis i := by | |
| open Unitary in | |
| rw [Matrix.IsHermitian.cfc_eq h,Matrix.IsHermitian.cfc,conjStarAlgAut_apply] | |
| apply WithLp.ofLp_injective | |
| rw [show op = _ from (rfl : op = Matrix.toEuclideanCLM (n := Fin m) (π := β)), | |
| Matrix.ofLp_toEuclideanCLM] | |
| simp only [β mulVec_mulVec, h.star_eigenvectorUnitary_mulVec, Matrix.diagonal_mulVec_single, | |
| Function.comp_apply,mul_one] | |
| ext j; simp [dotProduct,mulVec, Pi.single_apply,mul_comm] | |
| lemma neg_eigen {A : Mat m} (h : A.IsHermitian) (hn : Β¬ 0 β€ A) : | |
| β v : Rn m, β c : β, c < 0 β§ βvβ = 1 β§ op A v = c β’ v := by | |
| by_contra! hu | |
| apply hn; apply Matrix.PosSemidef.nonneg | |
| apply h.posSemidef_iff_eigenvalues_nonneg.mpr | |
| intro i | |
| by_contra! he | |
| exact hu _ _ he (h.eigenvectorBasis.orthonormal.1 i) (op_eigen h i) | |
| /-- Square root order, by testing an eigenvector of A-B. -/ | |
| lemma sq_order_cancel (ha : 0 β€ A) (hb : 0 β€ B) | |
| (hh : A*A β€ B*B) : A β€ B := by | |
| have ha' := ha.posSemidef | |
| have hb' := hb.posSemidef | |
| by_contra hn | |
| have hv : Β¬ 0 β€ B-A := by rwa [sub_nonneg] | |
| obtain β¨v,c,hc,hv,heβ© := neg_eigen (hb'.1.sub ha'.1) hv | |
| have hf (D : Mat m) (hd : D.IsHermitian) : | |
| (D*D).IsHermitian β§ βͺv,op (D*D) vβ« = βop D vβ^2 := by | |
| constructor | |
| Β· change IsSelfAdjoint (D*D) | |
| show star (D*D)=D*D | |
| simp only [star_mul, (show star D = D from hd)] | |
| rw [_root_.map_mul,mul_apply_eq_comp, β op_iff_hermitian.mp hd, | |
| real_inner_self_eq_norm_sq] | |
| obtain β¨H,H'β© := hf _ ha'.1 | |
| obtain β¨G,G'β© := hf _ hb'.1 | |
| have hm := (op_order_iff H G).mp hh v | |
| rw [H',G'] at hm | |
| rw [_root_.map_sub,_root_.sub_apply] at he | |
| have hh := (op_posSemidef_iff.mp hb').2 v | |
| have he : op A v = op B v + (-c) β’ v := by rw [neg_smul, β he]; abel | |
| rw [he,norm_add_sq_real,real_inner_smul_right,real_inner_comm v, | |
| norm_smul,hv,Real.norm_eq_abs,abs_of_pos (neg_pos.mpr hc)] at hm | |
| nlinarith | |
| lemma sqrt_monotone (ha : 0 β€ A) (hb : 0 β€ B) (hh:A β€ B) : | |
| CFC.sqrt A β€ CFC.sqrt B := by | |
| apply sq_order_cancel (CFC.sqrt_nonneg _) (CFC.sqrt_nonneg _) | |
| rwa [CFC.sqrt_mul_sqrt_self _ ha,CFC.sqrt_mul_sqrt_self _ hb] | |
| variable {l r : β} | |
| abbrev scalar (m : β) (l : β) : Mat m := l β’ (1:Mat m) | |
| lemma scalar_eq (m : β) (l : β) : scalar m l = algebraMap β _ l := by rw [Algebra.algebraMap_eq_smul_one] | |
| lemma scalar_sym (m : β) (l : β) : (scalar m l).IsHermitian := | |
| isHermitian_one.smul (show IsSelfAdjoint l by simp [IsSelfAdjoint]) | |
| lemma cfc_herm (f : βββ) (A : Mat m) : (cfc f A).IsHermitian := | |
| (cfc_predicate _ _ : IsSelfAdjoint _) | |
| lemma scalar_cfc_order (f : βββ) (A : Mat m) (hA : A.IsHermitian) : | |
| (scalar m l β€ cfc f A β β xβspectrum β A, l β€ f x) β§ | |
| (cfc f A β€ scalar m r β β xβspectrum β A, f x β€ r) := by | |
| rw [scalar_eq,scalar_eq] | |
| have hi : IsSelfAdjoint A := hA | |
| have hf : ContinuousOn f (spectrum β A) := A.finite_real_spectrum.continuousOn f | |
| exact β¨algebraMap_le_cfc_iff .., cfc_le_algebraMap_iff ..β© | |
| lemma spectrum_order (A : Mat m) (hA:A.IsHermitian) : | |
| (scalar m l β€ A β β xβspectrum β A, l β€ x) β§ | |
| (A β€ scalar m r β β xβspectrum β A, x β€ r) := by | |
| have hi : IsSelfAdjoint A := hA | |
| have h := scalar_cfc_order (l := l) (r := r) id A hA | |
| rw [cfc_id β A] at h | |
| exact h | |
| lemma spectrum_norm_box {K : β} (hk : 0 β€ K) (ha : A.IsHermitian) | |
| (hb : scalar m (-K) β€ A) (ht : A β€ scalar m K) : βAβ β€ K := by | |
| have hi : IsSelfAdjoint A := ha | |
| conv_lhs => rw [β cfc_id β A] | |
| apply norm_cfc_le hk | |
| intro x hx | |
| rw [Real.norm_eq_abs,abs_le]; exact β¨(spectrum_order (l := -K) (r := K) _ ha).1.mp hb x hx, | |
| (spectrum_order (l := -K) (r := K) _ ha).2.mp ht x hxβ© | |
| lemma spectrum_poly_le (f : β β β) {C : β} {n : β} (hc : 0 β€ C) | |
| (hf : β x, βf xβ β€ C*(1+βxβ)^n) (ha : A.IsHermitian) : | |
| βcfc f Aβ β€ C*(1+βAβ)^n := by | |
| have hi : IsSelfAdjoint A := ha | |
| apply norm_cfc_le (by positivity) | |
| intro x hx | |
| apply (hf _).trans | |
| have he := norm_apply_le_norm_cfc (id : β β β) A hx | |
| rw [cfc_id β A] at he | |
| change βxβ β€ βAβ at he | |
| gcongr | |
| lemma cfc_continuous_herm (f : β β β) (hf : Continuous f) : | |
| ContinuousOn (cfc f) {x : Mat m | x.IsHermitian} := | |
| (continuousOn_id.cfc_of_mem_nhdsSet (s := univ) f Filter.univ_mem | |
| (fun _ h => (h : IsSelfAdjoint _)) hf.continuousOn) | |
| end GeneralMahler | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 5.26 kB
- Xet hash:
- 9dbd043db65787d1cbbfc50d675df3327f543d3a3ac3b23a091b5283e95fb411
Β·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.