import Mathlib.Geometry.Manifold.IntegralCurve.ExistUnique import Mathlib.Geometry.Manifold.ContMDiffMFDeriv import Mathlib.Geometry.Manifold.Instances.Real /-! # Uniqueness for time-dependent manifold integral curves Suspending the field to spacetime gives local uniqueness; connectedness extends equality over the whole common open time domain. -/ noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter Bundle open scoped Manifold ContDiff Bundle Topology namespace Poincare.Manifold variable {n : โ„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] /-- Local solutions of a jointly C1 time-dependent field with the same initial value agree on a neighborhood of the initial time. -/ theorem timeDependent_integralCurve_eventuallyEq {X : โ„ โ†’ (x : M) โ†’ TangentSpace (๐“ก n) x} {ฮณ ฮท : โ„ โ†’ M} {s : โ„} (hX : ContMDiffAt (๐“˜(โ„, โ„).prod (๐“ก n)) ((๐“ก n).prod (๐“ก n)) 1 (fun tx : โ„ ร— M => (โŸจtx.2, X tx.1 tx.2โŸฉ : TangentBundle (๐“ก n) M)) (s, ฮณ s)) (hฮณ : โˆ€แถ  t in ๐“ s, HasMFDerivAt ๐“˜(โ„, โ„) (๐“ก n) ฮณ t ((1 : โ„ โ†’L[โ„] โ„).smulRight (X t (ฮณ t)))) (hฮท : โˆ€แถ  t in ๐“ s, HasMFDerivAt ๐“˜(โ„, โ„) (๐“ก n) ฮท t ((1 : โ„ โ†’L[โ„] โ„).smulRight (X t (ฮท t)))) (he : ฮณ s = ฮท s) : ฮณ =แถ [๐“ s] ฮท := by let Y : (z : โ„ ร— M) โ†’ TangentSpace (๐“˜(โ„, โ„).prod (๐“ก n)) z := fun z => (1, X z.1 z.2) have hY : ContMDiffAt (๐“˜(โ„, โ„).prod (๐“ก n)) (๐“˜(โ„, โ„).prod (๐“ก n)).tangent 1 (fun z => (โŸจz, Y zโŸฉ : TangentBundle (๐“˜(โ„, โ„).prod (๐“ก n)) (โ„ ร— M))) (s, ฮณ s) := by have htime : ContMDiffAt (๐“˜(โ„, โ„).prod (๐“ก n)) (๐“˜(โ„, โ„).tangent) 1 (fun z : โ„ ร— M => (โŸจz.1, (1 : โ„)โŸฉ : TangentBundle ๐“˜(โ„, โ„) โ„)) (s, ฮณ s) := by exact ((contMDiffAt_vectorSpace_iff_contDiffAt).mpr (contDiffAt_const (c := (1 : โ„)))).comp (s, ฮณ s) contMDiffAt_fst exact (contMDiff_equivTangentBundleProd_symm (I := ๐“˜(โ„, โ„)) (M := โ„) (I' := ๐“ก n) (M' := M)).contMDiffAt.comp (s, ฮณ s) (htime.prodMk hX) have hcurve {f : โ„ โ†’ M} (hf : โˆ€แถ  t in ๐“ s, HasMFDerivAt ๐“˜(โ„, โ„) (๐“ก n) f t ((1 : โ„ โ†’L[โ„] โ„).smulRight (X t (f t)))) : IsMIntegralCurveAt (I := ๐“˜(โ„, โ„).prod (๐“ก n)) (fun t => (t, f t)) Y s := by filter_upwards [hf] with t ht have h := (hasMFDerivAt_id (I := ๐“˜(โ„, โ„)) t).prodMk ht convert! h using 1 apply ContinuousLinearMap.ext intro r change (r * 1, r โ€ข X t (f t)) = (r, r โ€ข X t (f t)) rw [mul_one] have h := isMIntegralCurveAt_eventuallyEq_of_contMDiffAt_boundaryless hY (hcurve hฮณ) (hcurve hฮท) (Prod.ext rfl he) exact h.mono (fun t ht => congrArg Prod.snd ht) /-- Solutions of a jointly C1 time-dependent field agree on a connected open time domain if they have the same value at one time. -/ theorem timeDependent_integralCurve_eqOn [T2Space M] {I : Set โ„} (hI : IsOpen I) (hcI : IsPreconnected I) {X : โ„ โ†’ (x : M) โ†’ TangentSpace (๐“ก n) x} (hX : ContMDiffOn (๐“˜(โ„, โ„).prod (๐“ก n)) ((๐“ก n).prod (๐“ก n)) 1 (fun tx : โ„ ร— M => (โŸจtx.2, X tx.1 tx.2โŸฉ : TangentBundle (๐“ก n) M)) (I ร—หข univ)) {ฮณ ฮท : โ„ โ†’ M} (hฮณ : โˆ€ t โˆˆ I, HasMFDerivAt ๐“˜(โ„, โ„) (๐“ก n) ฮณ t ((1 : โ„ โ†’L[โ„] โ„).smulRight (X t (ฮณ t)))) (hฮท : โˆ€ t โˆˆ I, HasMFDerivAt ๐“˜(โ„, โ„) (๐“ก n) ฮท t ((1 : โ„ โ†’L[โ„] โ„).smulRight (X t (ฮท t)))) {s : โ„} (hs : s โˆˆ I) (he : ฮณ s = ฮท s) : EqOn ฮณ ฮท I := by let S := {t | ฮณ t = ฮท t} โˆฉ I suffices hsub : I โІ S from fun t ht => (hsub ht).1 apply hcI.subset_of_closure_inter_subset (s := I) (u := S) _ โŸจs, โŸจhs, he, hsโŸฉโŸฉ ยท dsimp only [S] rw [inter_comm, โ† Subtype.image_preimage_val, inter_comm, โ† Subtype.image_preimage_val, image_subset_image_iff Subtype.val_injective, preimage_ofPred_eq] intro t ht rw [mem_preimage, โ† closure_subtype] at ht revert ht t apply IsClosed.closure_subset (isClosed_eq _ _) ยท rw [continuous_iff_continuousAt] rintro โŸจt, htโŸฉ exact (hฮณ t ht).continuousAt.comp continuousAt_subtype_val ยท rw [continuous_iff_continuousAt] rintro โŸจt, htโŸฉ exact (hฮท t ht).continuousAt.comp continuousAt_subtype_val ยท rw [isOpen_iff_mem_nhds] intro t ht have heq : ฮณ =แถ [๐“ t] ฮท := timeDependent_integralCurve_eventuallyEq (hX.contMDiffAt ((hI.prod isOpen_univ).mem_nhds โŸจht.2, mem_univ _โŸฉ)) (Filter.Eventually.mono (hI.mem_nhds ht.2) (fun r hr => hฮณ r hr)) (Filter.Eventually.mono (hI.mem_nhds ht.2) (fun r hr => hฮท r hr)) ht.1 exact heq.and (hI.mem_nhds ht.2) end Poincare.Manifold