Download data/lean/OAI/Dynamics/SmoothObstruction/Splitting.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 23.7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/SmoothObstruction/Splitting.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Dynamics/SmoothObstruction/Splitting.lean
-
curl -L -o Splitting.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/SmoothObstruction/Splitting.lean
23.7 kB
| import OAI.Dynamics.SmoothObstruction.StationaryGauge | |
| import OAI.Dynamics.SmoothObstruction.ShearGauge | |
| namespace OAI | |
| section | |
| open MeasureTheory Filter Topology TopologicalSpace Set Finset | |
| open scoped ENNReal NNReal BoundedContinuousFunction | |
| open Finset MeasureTheory Filter Topology | |
| open scoped BigOperators | |
| open Finset Matrix | |
| open scoped Matrix.Norms.L2Operator | |
| open Matrix | |
| namespace SmoothObstruction.EuclideanSplitting | |
| variable {d : β} | |
| lemma norm_le_sum_coordinates (x : EuclideanSpace β (Fin d)) : | |
| βxβ β€ β i, βx iβ := by | |
| apply (sq_le_sqβ (norm_nonneg _) (Finset.sum_nonneg fun _ _ => norm_nonneg _)).mp | |
| rw [EuclideanSpace.norm_sq_eq] | |
| exact Finset.sum_sq_le_sq_sum_of_nonneg (fun _ _ => norm_nonneg _) | |
| /-- Entry bounds produce Euclidean operator bounds. The dimension factor is | |
| paid only at endpoints, never once per step. -/ | |
| lemma opNorm_le_entry (A : Matrix (Fin d) (Fin d) β) {B : β} (hB : 0 β€ B) | |
| (hA : β i j, |A i j| β€ B) : βAβ β€ (d : β)^2 * B := by | |
| rw [βMatrix.l2_opNorm_toEuclideanCLM] | |
| refine (Matrix.toEuclideanCLM (n:=Fin d) (π:=β) A).opNorm_le_bound (mul_nonneg (sq_nonneg _) hB) ?_ | |
| intro x | |
| calc | |
| _ β€ β i, β(Matrix.toEuclideanCLM (n:=Fin d) (π:=β) A x) iβ := norm_le_sum_coordinates _ | |
| _ β€ β _i : Fin d, β _j : Fin d, B*βxβ := by | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| change β(A *α΅₯ x) iβ β€ _ | |
| rw [Matrix.mulVec, dotProduct] | |
| calc | |
| _ β€ β j, βA i j*x jβ := norm_sum_le _ _ | |
| _ β€ _ := Finset.sum_le_sum fun j _ => by | |
| rw [norm_mul,Real.norm_eq_abs] | |
| exact mul_le_mul (hA i j) (PiLp.norm_apply_le x j) (norm_nonneg _) hB | |
| _ = _ := by simp; ring | |
| lemma opNorm_le_exp (A : Matrix (Fin d) (Fin d) β) {C E : β} | |
| (hE : 1 β€ E) (hA : β i j, |A i j| β€ Real.exp (C*E)) : | |
| βAβ β€ Real.exp ((C+(d:β)^2)*E) := by | |
| have hd : (d:β)^2 β€ Real.exp ((d:β)^2*E) := by | |
| calc | |
| _ β€ Real.exp ((d:β)^2) := by linarith [Real.add_one_le_exp ((d:β)^2)] | |
| _ β€ _ := Real.exp_le_exp.mpr (le_mul_of_one_le_right (sq_nonneg _) hE) | |
| calc | |
| _ β€ (d:β)^2*Real.exp (C*E) := opNorm_le_entry A (Real.exp_nonneg _) hA | |
| _ β€ Real.exp ((d:β)^2*E)*Real.exp (C*E) := | |
| mul_le_mul_of_nonneg_right hd (Real.exp_nonneg _) | |
| _ = _ := by rw [βReal.exp_add]; congr 1; ring | |
| noncomputable def rate (lam : Fin d β β) (l : β) : Matrix (Fin d) (Fin d) β := | |
| Matrix.diagonal (fun j => Real.exp (l*lam j)) | |
| noncomputable def mask (S : Finset (Fin d)) : Matrix (Fin d) (Fin d) β := | |
| Matrix.diagonal (fun j => if j β S then 1 else 0) | |
| @[simp] lemma rate_zero (lam : Fin d β β) : rate lam 0=1 := by | |
| simp [rate] | |
| lemma rate_add (lam : Fin d β β) (a b : β) : | |
| rate lam (a+b)=rate lam a*rate lam b := by | |
| rw [rate,rate,rate,Matrix.diagonal_mul_diagonal] | |
| congr 1 | |
| funext i | |
| rw [add_mul,Real.exp_add] | |
| lemma rate_mask_comm (lam : Fin d β β) (l : β) (S : Finset (Fin d)) : | |
| rate lam l*mask S=mask S*rate lam l := by | |
| simp only [rate,mask,Matrix.diagonal_mul_diagonal]; congr 1; funext i; ring | |
| @[simp] lemma mask_sq (S : Finset (Fin d)) : mask S*mask S=mask S := by | |
| simp only [mask,Matrix.diagonal_mul_diagonal] | |
| congr 1; funext i; split <;> simp | |
| lemma mask_compl_add (S : Finset (Fin d)) : mask S+mask SαΆ=1 := by | |
| rw [mask,mask,Matrix.diagonal_add] | |
| convert Matrix.diagonal_one (n:=Fin d) using 1 | |
| congr 1; funext i; simp; split <;> norm_num | |
| lemma mask_compl_mul (S : Finset (Fin d)) : mask S*mask SαΆ=0 := by | |
| rw [mask,mask,Matrix.diagonal_mul_diagonal] | |
| convert Matrix.diagonal_zero using 1 | |
| congr 1; funext i; simp | |
| lemma norm_mask (S : Finset (Fin d)) : βmask Sβ β€ 1 := by | |
| rw [mask,Matrix.l2_opNorm_diagonal] | |
| apply (pi_norm_le_iff_of_nonneg zero_le_one).mpr | |
| intro i; split <;> norm_num | |
| /-- Gauge-coordinate fundamental matrix; both time directions are encoded. -/ | |
| noncomputable def transition (U V : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β) (s t : β) : Matrix (Fin d) (Fin d) β := | |
| U t * rate lam ((t:β)-s) * V s | |
| noncomputable def projection (U V : β β Matrix (Fin d) (Fin d) β) | |
| (S : Finset (Fin d)) (t : β) : Matrix (Fin d) (Fin d) β := | |
| U t*mask S*V t | |
| lemma transition_self (U V : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β) (hUV : β t, U t*V t=1) (s : β) : transition U V lam s s=1 := by | |
| simp [transition,hUV] | |
| lemma transition_comp (U V : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β) (hVU : β t, V t*U t=1) (s t u : β) : | |
| transition U V lam t u*transition U V lam s t=transition U V lam s u := by | |
| simp only [transition] | |
| calc | |
| _ = U u*(rate lam ((u:β)-t)*(V t*U t)*rate lam ((t:β)-s))*V s := by noncomm_ring | |
| _ = _ := by rw [hVU,mul_one,βrate_add]; congr 3; ring | |
| lemma transition_projection (U V : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β) (hVU : β t, V t*U t=1) (S : Finset (Fin d)) (s t : β) : | |
| transition U V lam s t*projection U V S s=projection U V S t*transition U V lam s t := by | |
| dsimp [transition,projection] | |
| calc | |
| _ = U t*(rate lam ((t:β)-s)*(V s*U s)*mask S)*V s := by noncomm_ring | |
| _ = U t*(mask S*rate lam ((t:β)-s))*V s := by rw [hVU,mul_one,rate_mask_comm] | |
| _ = _ := by | |
| symm | |
| calc | |
| _ = U t*(mask S*(V t*U t)*rate lam ((t:β)-s))*V s := by noncomm_ring | |
| _ = _ := by rw [hVU,mul_one] | |
| lemma projection_idem (U V : β β Matrix (Fin d) (Fin d) β) | |
| (hVU : β t, V t*U t=1) (S : Finset (Fin d)) (t : β) : | |
| projection U V S t*projection U V S t=projection U V S t := by | |
| dsimp [projection] | |
| calc | |
| _ = U t*(mask S*(V t*U t)*mask S)*V t := by noncomm_ring | |
| _ = _ := by rw [hVU,mul_one,mask_sq] | |
| lemma projection_compl (U V : β β Matrix (Fin d) (Fin d) β) | |
| (hUV : β t, U t*V t=1) (S : Finset (Fin d)) (t : β) : | |
| projection U V S t+projection U V SαΆ t=1 := by | |
| dsimp [projection] | |
| rw [βadd_mul,βmul_add,mask_compl_add,mul_one,hUV] | |
| lemma norm_projection (U V : β β Matrix (Fin d) (Fin d) β) | |
| {K : β} (S : Finset (Fin d)) (t : β) | |
| (hU : βU tβ β€ Real.exp K) (hV : βV tβ β€ Real.exp K) : | |
| βprojection U V S tβ β€ Real.exp (2*K) := by | |
| calc | |
| _ β€ βU tβ * βmask Sβ * βV tβ := (norm_mul_le _ _).trans | |
| (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) | |
| _ β€ Real.exp K * 1 * Real.exp K := by gcongr; exact norm_mask S | |
| _ = _ := by rw [mul_one,βReal.exp_add]; congr 1; ring | |
| lemma norm_rate_mask {lam : Fin d β β} {l c : β} (hl : 0 β€ l) | |
| (S : Finset (Fin d)) (hc : β j β S, lam j β€ c) : | |
| βrate lam l*mask Sβ β€ Real.exp (c*l) := by | |
| simp only [rate,mask,Matrix.diagonal_mul_diagonal,Matrix.l2_opNorm_diagonal] | |
| apply (pi_norm_le_iff_of_nonneg (Real.exp_nonneg _)).mpr | |
| intro i | |
| by_cases hi : i β S | |
| Β· simp only [hi,ite_true,mul_one,Real.norm_eq_abs,abs_of_pos (Real.exp_pos _)] | |
| apply Real.exp_le_exp.mpr | |
| nlinarith [hc i hi] | |
| Β· simp only [hi,ite_false,mul_zero,norm_zero]; exact Real.exp_nonneg _ | |
| /-- Subinterval propagation on a selected group. The only conditioning | |
| loss is at the two endpoints. -/ | |
| lemma norm_transition_projection (U V : β β Matrix (Fin d) (Fin d) β) | |
| (hVU : β t, V t*U t=1) (lam : Fin d β β) {K c : β} | |
| (S : Finset (Fin d)) (s t : β) (hst : s β€ t) | |
| (hU : βU tβ β€ Real.exp K) (hV : βV sβ β€ Real.exp K) | |
| (hc : β j β S, lam j β€ c) : | |
| βtransition U V lam s t*projection U V S sβ β€ | |
| Real.exp (c*((t:β)-s)+2*K) := by | |
| have hr : 0 β€ (t:β)-s := sub_nonneg.mpr (by exact_mod_cast hst) | |
| have heq : transition U V lam s t*projection U V S s = | |
| U t*(rate lam ((t:β)-s)*mask S)*V s := by | |
| dsimp [transition,projection] | |
| calc | |
| _ = U t*(rate lam ((t:β)-s)*(V s*U s)*mask S)*V s := by noncomm_ring | |
| _ = _ := by rw [hVU,mul_one] | |
| rw [heq] | |
| calc | |
| _ β€ βU tβ * βrate lam ((t:β)-s)*mask Sβ * βV sβ := | |
| (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) | |
| _ β€ Real.exp K * Real.exp (c*((t:β)-s)) * Real.exp K := by | |
| gcongr; exact norm_rate_mask hr S hc | |
| _ = _ := by rw [βReal.exp_add,βReal.exp_add]; congr 1; ring | |
| /-- Conversion of the constructed finite triangular gauge to genuine | |
| Euclidean operator bounds. The constant is independent of the interval. -/ | |
| theorem exists_operator_gauge (d : β) (R : β) (hR : 0 β€ R) : | |
| β C : β, 0 β€ C β§ β (N : β) (E : β) (A : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β), 1 β€ E β Real.log (N+1) β€ E β | |
| (β t < N, (A t).IsUpperTriangular) β | |
| (β t < N, β j, 0 < A t j j) β | |
| (β t < N, β i j, |A t i j| β€ Real.exp R) β | |
| (β j, |lam j| β€ R) β | |
| (β t β€ N, β j, |NormalizedGauge.error A lam t j| β€ E) β | |
| β U V : β β Matrix (Fin d) (Fin d) β, | |
| (β t, U t*V t=1 β§ V t*U t=1) β§ | |
| (β t β€ N, βU tβ β€ Real.exp (C*E)) β§ | |
| (β t β€ N, βV tβ β€ Real.exp (C*E)) β§ | |
| (β t < N, A t*U t=U (t+1)*rate lam 1) := by | |
| obtain β¨C,hC,hβ© := NormalizedGauge.exists_exponential_gauge d R hR | |
| refine β¨C+(d:β)^2,add_nonneg hC (sq_nonneg _),?_β© | |
| intro N E A lam hE hlog htri hpos hA hlam he | |
| obtain β¨U,V,hUV,hU,hV,hEqβ© := h N E A lam hE hlog htri hpos hA hlam he | |
| refine β¨U,V,hUV,fun t ht => opNorm_le_exp _ hE (hU t ht), | |
| fun t ht => opNorm_le_exp _ hE (hV t ht),?_β© | |
| intro t ht | |
| simpa only [rate,one_mul] using hEq t ht | |
| /-- Actual later-on-the-left product used in the manuscript. -/ | |
| def propagator (A : β β Matrix (Fin d) (Fin d) β) (s : β) : β β Matrix (Fin d) (Fin d) β | |
| | 0 => 1 | |
| | n+1 => A (s+n)*propagator A s n | |
| lemma transition_one_step (A U V : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β) (hUV : β t, U t*V t=1) (t : β) | |
| (hA : A t*U t=U (t+1)*rate lam 1) : | |
| A t=transition U V lam t (t+1) := by | |
| have ht : ((t+1:β):β)-t=1 := by push_cast; ring | |
| dsimp [transition] | |
| rw [ht] | |
| calc | |
| _ = (A t*U t)*V t := by rw [mul_assoc,hUV,mul_one] | |
| _ = _ := by rw [hA] | |
| lemma propagator_eq_transition (A U V : β β Matrix (Fin d) (Fin d) β) | |
| (lam : Fin d β β) (hUV : β t, U t*V t=1) (hVU : β t, V t*U t=1) | |
| (N : β) (hA : β t < N, A t*U t=U (t+1)*rate lam 1) | |
| (s l : β) (hl : s+l β€ N) : | |
| propagator A s l=transition U V lam s (s+l) := by | |
| induction l with | |
| | zero => simpa only [Nat.add_zero,propagator] using (transition_self U V lam hUV s).symm | |
| | succ l ih => | |
| rw [propagator,ih (by omega),transition_one_step A U V lam hUV (s+l) (hA _ (by omega)), | |
| transition_comp U V lam hVU] | |
| rfl | |
| lemma norm_rate_mask_lower {lam : Fin d β β} {l c : β} (hl : l β€ 0) | |
| (S : Finset (Fin d)) (hc : β j β S, c β€ lam j) : | |
| βrate lam l*mask Sβ β€ Real.exp (c*l) := by | |
| simp only [rate,mask,Matrix.diagonal_mul_diagonal,Matrix.l2_opNorm_diagonal] | |
| apply (pi_norm_le_iff_of_nonneg (Real.exp_nonneg _)).mpr | |
| intro i | |
| by_cases hi : i β S | |
| Β· simp only [hi,ite_true,mul_one,Real.norm_eq_abs,abs_of_pos (Real.exp_pos _)] | |
| apply Real.exp_le_exp.mpr | |
| nlinarith [hc i hi] | |
| Β· simp only [hi,ite_false,mul_zero,norm_zero]; exact Real.exp_nonneg _ | |
| lemma norm_backward_projection (U V : β β Matrix (Fin d) (Fin d) β) | |
| (hVU : β t, V t*U t=1) (lam : Fin d β β) {K c : β} | |
| (S : Finset (Fin d)) (s t : β) (hst : s β€ t) | |
| (hU : βU sβ β€ Real.exp K) (hV : βV tβ β€ Real.exp K) | |
| (hc : β j β S, c β€ lam j) : | |
| βtransition U V lam t s*projection U V S tβ β€ | |
| Real.exp (-c*((t:β)-s)+2*K) := by | |
| have hr : (s:β)-t β€ 0 := sub_nonpos.mpr (by exact_mod_cast hst) | |
| have heq : transition U V lam t s*projection U V S t = | |
| U s*(rate lam ((s:β)-t)*mask S)*V t := by | |
| dsimp [transition,projection] | |
| calc | |
| _ = U s*(rate lam ((s:β)-t)*(V t*U t)*mask S)*V t := by noncomm_ring | |
| _ = _ := by rw [hVU,mul_one] | |
| rw [heq] | |
| calc | |
| _ β€ βU sβ * βrate lam ((s:β)-t)*mask Sβ * βV tβ := | |
| (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) | |
| _ β€ Real.exp K * Real.exp (c*((s:β)-t)) * Real.exp K := by | |
| gcongr; exact norm_rate_mask_lower hr S hc | |
| _ = _ := by rw [βReal.exp_add,βReal.exp_add]; congr 1; ring | |
| end SmoothObstruction.EuclideanSplitting | |
| namespace SmoothObstruction.QR | |
| open Matrix | |
| open scoped Matrix.Norms.L2Operator | |
| variable {d : β} | |
| noncomputable def frameMatrix (e : Frame d) : Matrix (Fin d) (Fin d) β := | |
| (Matrix.toEuclideanCLM (n:=Fin d) (π:=β)).symm (basis e).repr.symm.toContinuousLinearEquiv.toContinuousLinearMap | |
| noncomputable def frameInverse (e : Frame d) : Matrix (Fin d) (Fin d) β := | |
| (Matrix.toEuclideanCLM (n:=Fin d) (π:=β)).symm (basis e).repr.toContinuousLinearEquiv.toContinuousLinearMap | |
| lemma frameMatrix_inverse (e : Frame d) : frameMatrix e*frameInverse e=1 β§ frameInverse e*frameMatrix e=1 := by | |
| constructor <;> apply EquivLike.injective (Matrix.toEuclideanCLM (n:=Fin d) (π:=β)) <;> | |
| simp only [map_mul,map_one,frameMatrix,frameInverse,StarAlgEquiv.apply_symm_apply] | |
| Β· apply ContinuousLinearMap.ext | |
| intro x | |
| exact (basis e).repr.symm_apply_apply x | |
| Β· apply ContinuousLinearMap.ext | |
| intro x | |
| exact (basis e).repr.apply_symm_apply x | |
| lemma norm_frameMatrix (e : Frame d) : βframeMatrix eββ€1 := by | |
| rw [βMatrix.l2_opNorm_toEuclideanCLM,frameMatrix,StarAlgEquiv.apply_symm_apply] | |
| apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one | |
| intro x | |
| simp only [LinearIsometryEquiv.coe_toContinuousLinearEquiv,ContinuousLinearEquiv.coe_coe, | |
| LinearIsometryEquiv.norm_map,one_mul,le_refl] | |
| lemma norm_frameInverse (e : Frame d) : βframeInverse eββ€1 := by | |
| rw [βMatrix.l2_opNorm_toEuclideanCLM,frameInverse,StarAlgEquiv.apply_symm_apply] | |
| apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one | |
| intro x | |
| simp only [LinearIsometryEquiv.coe_toContinuousLinearEquiv,ContinuousLinearEquiv.coe_coe, | |
| LinearIsometryEquiv.norm_map,one_mul,le_refl] | |
| lemma triangular_bound (A : EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (e : Frame d) (i j : Fin d) : |triangular A e i j|β€βA.toContinuousLinearMapβ := by | |
| have h := norm_inner_le_norm (π:=β) ((step A e).val i) (A (e.val j)) | |
| rw [(step A e).property.norm_eq_one,one_mul] at h | |
| apply h.trans | |
| change βA.toContinuousLinearMap (e.val j)ββ€βA.toContinuousLinearMapβ | |
| simpa only [e.property.norm_eq_one,mul_one] using A.toContinuousLinearMap.le_opNorm (e.val j) | |
| lemma matrix_qr (A : EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (e : Frame d) : | |
| (Matrix.toEuclideanCLM (n:=Fin d) (π:=β)).symm A.toContinuousLinearMap*frameMatrix e= | |
| frameMatrix (step A e)*triangular A e := by | |
| apply EquivLike.injective (Matrix.toEuclideanCLM (n:=Fin d) (π:=β)) | |
| simp only [map_mul,StarAlgEquiv.apply_symm_apply,frameMatrix] | |
| apply ContinuousLinearMap.coe_injective | |
| apply (EuclideanSpace.basisFun (Fin d) β).toBasis.ext | |
| intro j | |
| change A ((basis e).repr.symm (EuclideanSpace.basisFun (Fin d) β j))= | |
| (basis (step A e)).repr.symm (Matrix.toEuclideanCLM (n:=Fin d) (π:=β) (triangular A e) (EuclideanSpace.basisFun (Fin d) β j)) | |
| have hcol : Matrix.toEuclideanCLM (n:=Fin d) (π:=β) (triangular A e) (EuclideanSpace.basisFun (Fin d) β j)= | |
| (basis (step A e)).repr (A (e.val j)) := by | |
| ext i | |
| simp only [Matrix.ofLp_toEuclideanCLM,EuclideanSpace.basisFun_apply,PiLp.ofLp_single, | |
| Matrix.mulVec_single,MulOpposite.op_one,one_smul,Matrix.col_apply, | |
| OrthonormalBasis.repr_apply_apply,basis_apply,triangular] | |
| rw [hcol,LinearIsometryEquiv.symm_apply_apply] | |
| congr 1 | |
| apply (basis e).repr.injective | |
| simp only [LinearIsometryEquiv.apply_symm_apply] | |
| simpa only [basis_apply,EuclideanSpace.basisFun_apply] using ((basis e).repr_self j).symm | |
| /-- The actual QR frame change transfers a triangular finite gauge to the | |
| original derivative matrices, at no loss in operator norm. -/ | |
| theorem transfer_gauge | |
| (A : β β EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (e : β β Frame d) (he : β t,e (t+1)=step (A t) (e t)) | |
| (U V : β β Matrix (Fin d) (Fin d) β) (lam : Fin d β β) (N : β) (K : β) | |
| (hUV : β t,U t*V t=1 β§ V t*U t=1) | |
| (hU : β tβ€N,βU tββ€Real.exp K) (hV : β tβ€N,βV tββ€Real.exp K) | |
| (hEq : β t<N,triangular (A t) (e t)*U t=U (t+1)*EuclideanSplitting.rate lam 1) : | |
| β P Q : β β Matrix (Fin d) (Fin d) β, | |
| (β t,P t*Q t=1 β§ Q t*P t=1) β§ | |
| (β tβ€N,βP tββ€Real.exp K) β§ (β tβ€N,βQ tββ€Real.exp K) β§ | |
| (β t<N,(Matrix.toEuclideanCLM (n:=Fin d) (π:=β)).symm (A t).toContinuousLinearMap*P t= | |
| P (t+1)*EuclideanSplitting.rate lam 1) := by | |
| let P := fun t => frameMatrix (e t)*U t | |
| let Q := fun t => V t*frameInverse (e t) | |
| refine β¨P,Q,fun t => ?_,fun t ht => ?_,fun t ht => ?_,fun t ht => ?_β© | |
| Β· constructor | |
| Β· dsimp [P,Q] | |
| calc | |
| _=frameMatrix (e t)*(U t*V t)*frameInverse (e t) := by noncomm_ring | |
| _=1 := by rw [(hUV t).1,mul_one,(frameMatrix_inverse _).1] | |
| Β· dsimp [P,Q] | |
| calc | |
| _=V t*(frameInverse (e t)*frameMatrix (e t))*U t := by noncomm_ring | |
| _=1 := by rw [(frameMatrix_inverse _).2,mul_one,(hUV t).2] | |
| Β· exact (norm_mul_le _ _).trans (by | |
| simpa only [one_mul] using mul_le_mul (norm_frameMatrix _) (hU t ht) (norm_nonneg _) zero_le_one) | |
| Β· exact (norm_mul_le _ _).trans (by | |
| simpa only [mul_one] using mul_le_mul (hV t ht) (norm_frameInverse _) (norm_nonneg _) (Real.exp_nonneg _)) | |
| Β· dsimp [P] | |
| rw [βmul_assoc,matrix_qr,mul_assoc,hEq t ht,βmul_assoc,he t] | |
| end SmoothObstruction.QR | |
| namespace SmoothObstruction.QR | |
| open MeasureTheory Filter Topology Finset | |
| open scoped Matrix.Norms.L2Operator | |
| variable {d : β} {X : Type*} [MetricSpace X] [CompactSpace X] | |
| /-- Compactness bounds both the actual derivative and every positive QR | |
| log-diagonal. The frame is arbitrary, so no measurable choice is hidden. -/ | |
| lemma exists_uniform_qr_bound | |
| (A : X β EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (hA : Continuous (fun x => (A x).toContinuousLinearMap)) : | |
| β R : β, 0β€R β§ (β x,β(A x).toContinuousLinearMapββ€Real.exp R) β§ | |
| β (x : X) (e : Frame d) j, |Real.log (triangular (A x) e j j)|β€R := by | |
| obtain β¨C,hCβ© := isCompact_univ.exists_bound_of_continuousOn hA.continuousOn | |
| have hb : β j : Fin d,β B : β,β z : X Γ Frame d, | |
| |Real.log (triangular (A z.1) z.2 j j)|β€B := by | |
| intro j | |
| obtain β¨B,hBβ© := isCompact_univ.exists_bound_of_continuousOn | |
| (continuous_log_diagonal A hA j).continuousOn | |
| exact β¨B,fun z => hB z (Set.mem_univ _)β© | |
| choose B hB using hb | |
| let R := |C|+β j,|B j|+1 | |
| have hR : 0β€R := by dsimp [R]; positivity | |
| have hCR : Cβ€R := by | |
| have hs : 0β€β j,|B j| := sum_nonneg (fun _ _ => abs_nonneg _) | |
| dsimp [R]; linarith [le_abs_self C] | |
| refine β¨R,hR,fun x => (hC x (Set.mem_univ _)).trans (hCR.trans ?_),?_β© | |
| Β· linarith [Real.add_one_le_exp R] | |
| Β· intro x e j | |
| have hj := single_le_sum (f:=fun j : Fin d => |B j|) (fun _ _ => abs_nonneg _) (mem_univ j) | |
| have hh := (hB j (x,e)).trans (le_abs_self (B j)) | |
| dsimp [R] | |
| linarith [abs_nonneg C] | |
| omit [MetricSpace X] [CompactSpace X] in | |
| lemma skew_iterate_fst (T : X β X) | |
| (A : X β EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (z : X Γ Frame d) (t : β) : ((skew T A)^[t] z).1=T^[t] z.1 := by | |
| induction t with | |
| | zero => rfl | |
| | succ t ih => simp only [Function.iterate_succ_apply',skew,ih] | |
| omit [MetricSpace X] [CompactSpace X] in | |
| lemma log_error_is_chord (T : X β X) | |
| (A : X β EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (z : X Γ Frame d) (N t : β) (j : Fin d) : | |
| NormalizedGauge.error | |
| (fun a => triangular (A ((skew T A)^[a] z).1) ((skew T A)^[a] z).2) | |
| (fun i => DyadicChord.average | |
| (DyadicChord.orbit (skew T A) (fun w => Real.log (triangular (A w.1) w.2 i i)) z) N) t j= | |
| DyadicChord.chord | |
| (DyadicChord.orbit (skew T A) (fun w => Real.log (triangular (A w.1) w.2 j j)) z) N t := by | |
| simp only [NormalizedGauge.error,DyadicChord.chord,DyadicChord.prefixSum, | |
| DyadicChord.orbit,sum_sub_distrib,sum_const,card_range,nsmul_eq_mul] | |
| lemma average_abs_le {f : β β β} {R : β} {N : β} (hN : 0<N) | |
| (hf : β t<N,|f t|β€R) : |DyadicChord.average f N|β€R := by | |
| rw [DyadicChord.average,abs_div,show |(N:β)|=(N:β) from abs_of_nonneg (Nat.cast_nonneg N)] | |
| apply (div_le_iffβ (Nat.cast_pos.mpr hN)).mpr | |
| calc | |
| |DyadicChord.prefixSum f N|β€β tβrange N,|f t| := by | |
| exact abs_sum_le_sum_abs _ _ | |
| _β€β tβrange N,R := sum_le_sum (fun t ht => hf t (mem_range.mp ht)) | |
| _=R*N := by simp only [sum_const,card_range,nsmul_eq_mul]; ring | |
| /-- Finite gauges for genuine good QR orbit segments. Positivity and | |
| triangularity come from the actual Gram--Schmidt process, and the chord | |
| errors are identified with the stationary quantities, not assumed anew. -/ | |
| theorem compact_good_gauge (T : X β X) | |
| (A : X β EuclideanSpace β (Fin d) βL[β] EuclideanSpace β (Fin d)) | |
| (hA : Continuous (fun x => (A x).toContinuousLinearMap)) : | |
| β R C : β,0β€R β§ 0β€C β§ β k b (z : X Γ Frame d), | |
| zβGoodStationary.Good (skew T A) | |
| (fun j w => Real.log (triangular (A w.1) w.2 j j)) k b β | |
| 1β€b*(2:β)^k β Real.log ((2^(k+1):β)+1)β€b*(2:β)^k β | |
| β (lam : Fin d β β) (P Q : β β Matrix (Fin d) (Fin d) β), | |
| (β j,|lam j|β€R) β§ (β t,P t*Q t=1 β§ Q t*P t=1) β§ | |
| (β tβ€2^(k+1),βP tββ€Real.exp (C*(b*2^k))) β§ | |
| (β tβ€2^(k+1),βQ tββ€Real.exp (C*(b*2^k))) β§ | |
| (β t<2^(k+1), | |
| (Matrix.toEuclideanCLM (n:=Fin d) (π:=β)).symm | |
| (A (T^[t] z.1)).toContinuousLinearMap*P t= | |
| P (t+1)*EuclideanSplitting.rate lam 1) := by | |
| obtain β¨R,hR,hAR,hlogRβ© := exists_uniform_qr_bound A hA | |
| obtain β¨C,hC,hgβ© := EuclideanSplitting.exists_operator_gauge d R hR | |
| refine β¨R,C,hR,hC,?_β© | |
| intro k b z hz hb hn | |
| let w := fun t => (skew T A)^[t] z | |
| let L := fun t => A (w t).1 | |
| let e := fun t => (w t).2 | |
| let B := fun t => triangular (L t) (e t) | |
| let lam := fun j => DyadicChord.average | |
| (DyadicChord.orbit (skew T A) (fun w => Real.log (triangular (A w.1) w.2 j j)) z) (2^(k+1)) | |
| have hlam : β j,|lam j|β€R := by | |
| intro j | |
| exact average_abs_le (pow_pos (by omega : 0<2) _) (fun t _ => hlogR _ _ j) | |
| have he : β t,e (t+1)=step (L t) (e t) := by | |
| intro t | |
| simp only [e,L,w,Function.iterate_succ_apply',skew] | |
| have herr : β tβ€2^(k+1),β j,|NormalizedGauge.error B lam t j|β€b*2^k := by | |
| intro t ht j | |
| rw [show NormalizedGauge.error B lam t j= | |
| DyadicChord.chord | |
| (DyadicChord.orbit (skew T A) (fun w => Real.log (triangular (A w.1) w.2 j j)) z) | |
| (2^(k+1)) t from log_error_is_chord T A z _ _ _] | |
| exact hz j t ht | |
| obtain β¨U,V,hUV,hU,hV,hEqβ© := hg (2^(k+1)) (b*2^k) B lam hb hn | |
| (fun t _ => triangular_upper _ _) (fun t _ => diagonal_pos _ _) | |
| (fun t _ i j => (triangular_bound _ _ i j).trans (hAR _)) hlam herr | |
| obtain β¨P,Q,hPQ,hP,hQ,hStepβ© := transfer_gauge L e he U V lam (2^(k+1)) (C*(b*2^k)) | |
| hUV hU hV hEq | |
| refine β¨lam,P,Q,hlam,hPQ,hP,hQ,?_β© | |
| intro t ht | |
| simpa only [L,w,skew_iterate_fst] using hStep t ht | |
| end SmoothObstruction.QR | |
| end | |
| end OAI | |