import Mathlib import OAI.Analysis.BiholderTransport.Geodesics.SprayDistanceBound namespace OAI noncomputable section open Set Filter Manifold Bundle open scoped Topology ContDiff namespace WeakMTWTransport variable {n : β„•} {M : Type*} [MetricSpace M] [ChartedSpace (Model n) M] [IsManifold π“˜(ℝ,Model n) ∞ M] lemma tangent_chart_trivialization {a x : M} (hx : x∈(extChartAt π“˜(ℝ,Model n) a).source) (p : TangentSpace π“˜(ℝ,Model n) x) : extChartAt (π“˜(ℝ,Model n).prod π“˜(ℝ,Model n)) (⟨a,0⟩ : TangentBundle π“˜(ℝ,Model n) M) ⟨x,p⟩= (extChartAt π“˜(ℝ,Model n) a x, (trivializationAt (Model n) (TangentSpace π“˜(ℝ,Model n)) a).continuousLinearMapAt ℝ x p) := by rw [tangent_chart_apply,TangentBundle.continuousLinearMapAt_trivializationAt_eq_core (by simpa only [extChartAt_source] using hx)] rfl lemma tangent_chart_symm_trivialization {a : M} {q : Model nΓ—Model n} (hq : q.1∈(extChartAt π“˜(ℝ,Model n) a).target) : (extChartAt (π“˜(ℝ,Model n).prod π“˜(ℝ,Model n)) (⟨a,0⟩ : TangentBundle π“˜(ℝ,Model n) M)).symm q= (⟨(extChartAt π“˜(ℝ,Model n) a).symm q.1, (trivializationAt (Model n) (TangentSpace π“˜(ℝ,Model n)) a).symmL ℝ ((extChartAt π“˜(ℝ,Model n) a).symm q.1) q.2⟩ : TangentBundle π“˜(ℝ,Model n) M) := by have hx : (extChartAt π“˜(ℝ,Model n) a).symm q.1∈(chartAt (Model n) a).source := by simpa only [extChartAt_source] using (extChartAt π“˜(ℝ,Model n) a).map_target hq rw [TangentBundle.symmL_trivializationAt_eq_core hx] rfl variable [RiemannianBundle (fun x : M => TangentSpace π“˜(ℝ,Model n) x)] def minimizingChartParameters (a : M) (K : Set M) : Set (Model nΓ—Model n) := (extChartAt (π“˜(ℝ,Model n).prod π“˜(ℝ,Model n)) (⟨a,0⟩ : TangentBundle π“˜(ℝ,Model n) M)) '' {z : TangentBundle π“˜(ℝ,Model n) M | z.2∈minimizingVectors z.1 ∧ z.1∈K} section variable [CompactSpace M] [IsContMDiffRiemannianBundle π“˜(ℝ,Model n) ∞ (Model n) (fun x : M => TangentSpace π“˜(ℝ,Model n) x)] [IsRiemannianManifold π“˜(ℝ,Model n) M] lemma isCompact_minimizingChartParameters {a : M} {K : Set M} (hK : IsCompact K) (hKs : KβŠ†(extChartAt π“˜(ℝ,Model n) a).source) : IsCompact (minimizingChartParameters (n := n) a K) := by have hc : IsCompact {z : TangentBundle π“˜(ℝ,Model n) M | z.2∈minimizingVectors z.1 ∧ z.1∈K} := (isCompact_total_minimizingVectors (n := n) (M := M)).inter_right (hK.isClosed.preimage (FiberBundle.continuous_proj _ _)) exact hc.image_of_continuousOn ((continuousOn_extChartAt _).mono (fun z hz => (tangent_chart_source_iff _ z).mpr (hKs hz.2))) end lemma mem_minimizingChartParameters {a : M} {K : Set M} (hKs : KβŠ†(extChartAt π“˜(ℝ,Model n) a).source) {q : Model nΓ—Model n} (hq : q∈minimizingChartParameters (n := n) a K) : q.1∈(extChartAt π“˜(ℝ,Model n) a).target ∧ ((extChartAt π“˜(ℝ,Model n) a).symm q.1∈K ∧ (trivializationAt (Model n) (TangentSpace π“˜(ℝ,Model n)) a).symmL ℝ ((extChartAt π“˜(ℝ,Model n) a).symm q.1) q.2∈ minimizingVectors ((extChartAt π“˜(ℝ,Model n) a).symm q.1)) := by obtain ⟨z,hz,rfl⟩ := hq let Ο‡ := extChartAt (π“˜(ℝ,Model n).prod π“˜(ℝ,Model n)) (⟨a,0⟩ : TangentBundle π“˜(ℝ,Model n) M) have hzs : zβˆˆΟ‡.source := (tangent_chart_source_iff _ z).mpr (hKs hz.2) have hb : (Ο‡ z).1∈(extChartAt π“˜(ℝ,Model n) a).target := (tangent_chart_target_iff _ _).mp (Ο‡.map_source hzs) refine ⟨hb,?_⟩ have H : (Ο‡.symm (Ο‡ z)).1∈K ∧ (Ο‡.symm (Ο‡ z)).2∈minimizingVectors (Ο‡.symm (Ο‡ z)).1 := by rw [Ο‡.left_inv hzs] exact ⟨hz.2,hz.1⟩ rw [tangent_chart_symm_trivialization hb] at H exact H lemma trivialization_mem_minimizingChartParameters {a x : M} {K : Set M} (hKs : KβŠ†(extChartAt π“˜(ℝ,Model n) a).source) (hx : x∈K) {p : TangentSpace π“˜(ℝ,Model n) x} (hp : p∈minimizingVectors x) : (extChartAt π“˜(ℝ,Model n) a x, (trivializationAt (Model n) (TangentSpace π“˜(ℝ,Model n)) a).continuousLinearMapAt ℝ x p)∈ minimizingChartParameters (n := n) a K := ⟨⟨x,p⟩,⟨hp,hx⟩,tangent_chart_trivialization (hKs hx) p⟩ end WeakMTWTransport end end OAI