import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Basic import Mathlib.Geometry.Manifold.ContMDiffMFDeriv import Mathlib.Topology.Separation.Hausdorff /-! # The actual tangent phase of a smooth curve The phase retains the ambient manifold derivative. Its regularity and Hausdorff target allow local geometric uniqueness to propagate. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle Topology universe u namespace PoincareMT.ReducedLength variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] local notation "V" => EuclideanSpace โ„ (Fin n) noncomputable def curvePhase (ฮณ : โ„ โ†’ M) (s : โ„) : TangentBundle (๐“ก n) M := โŸจฮณ s, curveVelocity ฮณ sโŸฉ set_option backward.isDefEq.respectTransparency false in theorem curvePhase_contMDiffOn (ฮณ : โ„ โ†’ M) (I : Set โ„) (hI : IsOpen I) (hฮณ : ContMDiffOn (๐“˜(โ„, โ„)) (๐“ก n) โˆž ฮณ I) : ContMDiffOn (๐“˜(โ„, โ„)) ((๐“ก n).prod (๐“ก n)) โˆž (curvePhase (n := n) ฮณ) I := by have hmodel : ContMDiff ((๐“˜(โ„, โ„)).prod (๐“˜(โ„, โ„))) ((๐“˜(โ„, โ„)).prod (๐“˜(โ„, โ„))) โˆž (fun q : โ„ ร— โ„ โ†ฆ (โŸจq.1, q.2โŸฉ : TangentBundle (๐“˜(โ„, โ„)) โ„)) := by convert! (contMDiff_tangentBundleModelSpaceHomeomorph_symm (I := ๐“˜(โ„, โ„)) (n := โˆž)) using 1 rw [chartedSpaceSelf_prod] rfl have ht : ContMDiff (๐“˜(โ„, โ„)) ((๐“˜(โ„, โ„)).prod (๐“˜(โ„, โ„))) โˆž (fun s : โ„ โ†ฆ (โŸจs, 1โŸฉ : TangentBundle (๐“˜(โ„, โ„)) โ„)) := hmodel.comp (contMDiff_id.prodMk contMDiff_const) have h := (hฮณ.contMDiffOn_tangentMapWithin (m := โˆž) (by simp) hI.uniqueMDiffOn).comp ht.contMDiffOn (fun s hs โ†ฆ hs) apply h.congr intro s hs change Bundle.TotalSpace.mk' V (ฮณ s) ((mfderiv (๐“˜(โ„, โ„)) (๐“ก n) ฮณ s) 1) = Bundle.TotalSpace.mk' V (ฮณ s) ((mfderivWithin (๐“˜(โ„, โ„)) (๐“ก n) ฮณ I s) 1) rw [mfderivWithin_of_isOpen hI hs] theorem tangentBundle_t2Space [T2Space M] : T2Space (TangentBundle (๐“ก n) M) := by apply t2Space_iff_disjoint_nhds.mpr intro x y hxy by_cases hbase : x.proj = y.proj ยท let e := trivializationAt V (TangentSpace (๐“ก n) : M โ†’ Type _) x.proj have hx : x โˆˆ e.source := e.mem_source.mpr (FiberBundle.mem_baseSet_trivializationAt' x.proj) have hy : y โˆˆ e.source := by apply e.mem_source.mpr rw [โ† hbase] exact FiberBundle.mem_baseSet_trivializationAt' x.proj have hne : e x โ‰  e y := fun h โ†ฆ hxy (e.toOpenPartialHomeomorph.injOn hx hy h) exact (e.toOpenPartialHomeomorph.continuousAt hx).disjoint (disjoint_nhds_nhds.mpr hne) (e.toOpenPartialHomeomorph.continuousAt hy) ยท exact (FiberBundle.continuous_proj V (TangentSpace (๐“ก n))).continuousAt.disjoint (disjoint_nhds_nhds.mpr hbase) (FiberBundle.continuous_proj V (TangentSpace (๐“ก n))).continuousAt theorem curvePhase_eventuallyEq {ฮณ ฮด : โ„ โ†’ M} {s : โ„} (h : ฮณ =แถ [๐“ s] ฮด) : curvePhase (n := n) ฮณ =แถ [๐“ s] curvePhase (n := n) ฮด := by filter_upwards [eventually_eventuallyEq_nhds.2 h] with t ht apply Bundle.TotalSpace.ext ht.self_of_nhds exact heq_of_eq (congrArg (fun L : โ„ โ†’L[โ„] V โ†ฆ L 1) (ht.mfderiv_eq (I := ๐“˜(โ„, โ„)) (I' := ๐“ก n))) end PoincareMT.ReducedLength