Download lean/OAI/Analysis/BiholderTransport/Geodesics/ChartLipschitz.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 4.63 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/BiholderTransport/Geodesics/ChartLipschitz.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Analysis/BiholderTransport/Geodesics/ChartLipschitz.lean
-
curl -L -o ChartLipschitz.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/BiholderTransport/Geodesics/ChartLipschitz.lean
4.63 kB
| import Mathlib | |
| import OAI.Analysis.BiholderTransport.Geodesics.MinimizingSubinterval | |
| import OAI.Analysis.BiholderTransport.Geodesics.GlobalGauss | |
| namespace OAI | |
| noncomputable section | |
| open Set Filter Manifold Bundle Metric | |
| open scoped Topology ContDiff NNReal | |
| namespace WeakMTWTransport | |
| variable {n : ℕ} {M : Type*} [MetricSpace M] [CompactSpace M] | |
| [ChartedSpace (Model n) M] [IsManifold 𝓘(ℝ,Model n) ∞ M] | |
| [RiemannianBundle (fun x : M => TangentSpace 𝓘(ℝ,Model n) x)] | |
| [IsContMDiffRiemannianBundle 𝓘(ℝ,Model n) ∞ (Model n) | |
| (fun x : M => TangentSpace 𝓘(ℝ,Model n) x)] | |
| attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace | |
| normedSpaceTangentSpaceVectorSpace | |
| lemma chart_spray_hasDerivAt (a : M) (z : TangentBundle 𝓘(ℝ,Model n) M) {t : ℝ} | |
| (ht : (sprayFlow t z).1∈(extChartAt 𝓘(ℝ,Model n) a).source) : | |
| HasDerivAt (fun s => extChartAt 𝓘(ℝ,Model n) a (sprayFlow s z).1) | |
| (mfderiv 𝓘(ℝ,Model n) 𝓘(ℝ,Model n) (extChartAt 𝓘(ℝ,Model n) a) | |
| (sprayFlow t z).1 (sprayFlow t z).2) t := by | |
| have hsrc : (sprayFlow t z).1∈(chartAt (Model n) a).source := by | |
| simpa only [extChartAt_source] using ht | |
| have projectedDeriv := | |
| (ContinuousLinearMap.fst ℝ (Model n) (Model n)).hasFDerivAt.comp_hasDerivAt t | |
| (sprayFlow_chart_hasDerivAt (⟨a,0⟩ : TangentBundle 𝓘(ℝ,Model n) M) z ht) | |
| change HasDerivAt (fun s => extChartAt 𝓘(ℝ,Model n) a (sprayFlow s z).1) | |
| (tangentCoordChange 𝓘(ℝ,Model n) (sprayFlow t z).1 a | |
| (sprayFlow t z).1 (sprayFlow t z).2) t at projectedDeriv | |
| apply projectedDeriv.congr_deriv | |
| symm | |
| change (mfderiv 𝓘(ℝ,Model n) 𝓘(ℝ,Model n) (chartAt (Model n) a) | |
| (sprayFlow t z).1) (sprayFlow t z).2 = _ | |
| rw [mfderiv_chartAt_eq_tangentCoordChange hsrc] | |
| rfl | |
| variable [IsRiemannianManifold 𝓘(ℝ,Model n) M] | |
| lemma exists_lipschitzOn_chart (a : M) : | |
| ∃ C : ℝ≥0, ∃ r>0, ball a r⊆(extChartAt 𝓘(ℝ,Model n) a).source ∧ | |
| LipschitzOnWith C (extChartAt 𝓘(ℝ,Model n) a) (ball a r) := by | |
| have : IsContinuousRiemannianBundle (Model n) | |
| (fun x : M => TangentSpace 𝓘(ℝ,Model n) x) := | |
| continuousRiemannianBundle_of_smooth (IB := 𝓘(ℝ,Model n)) | |
| obtain ⟨C,hC,H⟩ := eventually_norm_mfderiv_extChartAt_lt 𝓘(ℝ,Model n) a | |
| obtain ⟨R,hR,hsub⟩ := Metric.mem_nhds_iff.mp | |
| (inter_mem (extChartAt_source_mem_nhds (I := 𝓘(ℝ,Model n)) a) H) | |
| let Cnn : ℝ≥0 := ⟨C,hC.le⟩ | |
| refine ⟨Cnn,R/3,by positivity,?_,?_⟩ | |
| · exact fun x hx => (hsub ((ball_subset_ball (by linarith : R/3≤R)) hx)).1 | |
| apply LipschitzOnWith.of_dist_le_mul | |
| intro x hx y hy | |
| obtain ⟨p,hp,he⟩ := exists_minimizing_vector (n := n) x y | |
| let z : TangentBundle 𝓘(ℝ,Model n) M := ⟨x,p⟩ | |
| have hpN : ‖p‖=dist x y := by rw [←he]; exact hp.symm | |
| have hpath : ∀ t∈Icc (0:ℝ) 1, (sprayFlow t z).1∈ball a R := by | |
| intro t ht | |
| have hD := dist_sprayFlow_le z 0 t | |
| simp only [sprayFlow_zero,zero_sub,abs_neg,abs_of_nonneg ht.1] at hD | |
| change dist x (sprayFlow t z).1≤t*‖p‖ at hD | |
| have hD' : dist x (sprayFlow t z).1≤dist x y := | |
| hD.trans (by rw [←hpN]; exact mul_le_of_le_one_left (norm_nonneg _) ht.2) | |
| have hxy := dist_triangle x a y | |
| have hax : dist x a<R/3 := hx | |
| have hay : dist y a<R/3 := hy | |
| have htri := dist_triangle (sprayFlow t z).1 x a | |
| rw [dist_comm (sprayFlow t z).1 x] at htri | |
| rw [dist_comm a y] at hxy | |
| change dist (sprayFlow t z).1 a<R | |
| linarith | |
| let γ := fun t : ℝ => extChartAt 𝓘(ℝ,Model n) a (sprayFlow t z).1 | |
| let dγ : ℝ → Model n := fun t => mfderiv 𝓘(ℝ,Model n) 𝓘(ℝ,Model n) | |
| (extChartAt 𝓘(ℝ,Model n) a) (sprayFlow t z).1 (sprayFlow t z).2 | |
| have hd : ∀ t∈Icc (0:ℝ) 1, HasDerivWithinAt γ (dγ t) (Icc 0 1) t := by | |
| intro t ht | |
| exact (chart_spray_hasDerivAt a z (hsub (hpath t ht)).1).hasDerivWithinAt | |
| have hb : ∀ t∈Icc (0:ℝ) 1, ‖dγ t‖≤C*‖p‖ := by | |
| intro t ht | |
| apply (ContinuousLinearMap.le_opNorm _ _).trans | |
| rw [sprayFlow_speed] | |
| exact mul_le_mul_of_nonneg_right (hsub (hpath t ht)).2.le (norm_nonneg _) | |
| have hfin := norm_image_sub_le_of_norm_deriv_le_segment_01' hd (fun t ht => hb t ⟨ht.1,ht.2.le⟩) | |
| have he1 : (sprayFlow 1 z).1=y := by | |
| simpa only [z,←riemannianExp_eq_sprayFlow] using he | |
| have he0 : (sprayFlow 0 z).1=x := by rw [sprayFlow_zero] | |
| change dist (extChartAt 𝓘(ℝ,Model n) a x) (extChartAt 𝓘(ℝ,Model n) a y)≤C*dist x y | |
| simpa only [γ,he1,he0,←dist_eq_norm,dist_comm,hpN] using hfin | |
| end WeakMTWTransport | |
| end | |
| end OAI | |