import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.ChartCurveExtension /-! # Coordinate velocities of an arbitrary manifold curve Chart differentiation and the inverse differential identify the actual velocity. A smooth coordinate velocity gives a parametric extension along the original curve, with no global chart-inverse representation required. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle namespace PoincareMT.ReducedLength variable {n : β„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] local notation "V" => EuclideanSpace ℝ (Fin n) set_option backward.isDefEq.respectTransparency false in theorem hasDerivAt_chart_curve (p : M) (Ξ³ : ℝ β†’ M) (s : ℝ) (hq : Ξ³ s ∈ (chartAt V p).source) (hΞ³ : MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ³ s) : HasDerivAt (fun t ↦ (chartAt V p) (Ξ³ t)) (mfderiv (𝓑 n) (𝓑 n) (chartAt V p) (Ξ³ s) (curveVelocity Ξ³ s)) s := by have he := (mdifferentiable_chart (I := 𝓑 n) p).mdifferentiableAt hq convert! (he.hasMFDerivAt.comp s hΞ³.hasMFDerivAt).hasFDerivAt.hasDerivAt using 1 set_option backward.isDefEq.respectTransparency false in theorem chartVectorField_coordinate_velocity (p : M) (Ξ³ : ℝ β†’ M) (s : ℝ) (v : V) (hq : Ξ³ s ∈ (chartAt V p).source) (hΞ³ : MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ³ s) (ha : HasDerivAt (fun t ↦ (chartAt V p) (Ξ³ t)) v s) : chartVectorField p v (Ξ³ s) = curveVelocity Ξ³ s := by have hv := ha.unique (hasDerivAt_chart_curve p Ξ³ s hq hΞ³) have hi : (mfderiv (𝓑 n) (𝓑 n) (chartAt V p) (Ξ³ s)).IsInvertible := ⟨(mdifferentiable_chart (I := 𝓑 n) p).mfderiv hq, rfl⟩ change (mfderiv (𝓑 n) (𝓑 n) (chartAt V p) (Ξ³ s)).inverse v = _ rw [hv] exact hi.inverse_apply_self _ noncomputable def chartVelocityExtensionAlong (p : M) (Ξ³ : ℝ β†’ M) (v : ℝ β†’ V) (U I : Set ℝ) (hU : IsOpen U) (hIU : I βŠ† U) (hI : UniqueDiffOn ℝ I) (hv : ContDiffOn ℝ ∞ v U) (hΞ³ : βˆ€ s ∈ I, MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ³ s) (ha : βˆ€ s ∈ I, HasDerivAt (fun t ↦ (chartAt V p) (Ξ³ t)) (v s) s) (hq : βˆ€ s ∈ I, Ξ³ s ∈ (chartAt V p).source) : ParametricAlongCurveExtensionOn I Ξ³ (curveVelocityWithin (n := n) Ξ³ I) where extension := fun s ↦ chartVectorField p (v s) domain := U Γ—Λ’ (chartAt V p).source open_domain := hU.prod (chartAt V p).open_source graph_mem := fun s hs ↦ ⟨hIU hs, hq s hs⟩ smooth := chartVectorField_param_smooth p v U hv agrees := by intro s hs rw [chartVectorField_coordinate_velocity p Ξ³ s (v s) (hq s hs) (hΞ³ s hs) (ha s hs)] exact (congrArg (fun L : ℝ β†’L[ℝ] TangentSpace (𝓑 n) (Ξ³ s) ↦ L 1) (mfderivWithin_eq_mfderiv (hI s hs).uniqueMDiffWithinAt (hΞ³ s hs))).symm set_option backward.isDefEq.respectTransparency false in theorem chartVelocityExtensionAlong_pullback {J : Set ℝ} (F : RicciFlow n M J) (time : ℝ β†’ ℝ) (p : M) (Ξ³ : ℝ β†’ M) (v : ℝ β†’ V) (U I : Set ℝ) (hU : IsOpen U) (hIU : I βŠ† U) (hI : UniqueDiffOn ℝ I) (hv : ContDiffOn ℝ ∞ v U) (hΞ³ : βˆ€ s ∈ I, MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ³ s) (ha : βˆ€ s ∈ I, HasDerivAt (fun t ↦ (chartAt V p) (Ξ³ t)) (v s) s) (hq : βˆ€ s ∈ I, Ξ³ s ∈ (chartAt V p).source) (s : ℝ) (hs : s ∈ I) (w : V) (hdv : HasDerivAt v w s) : pullbackCovariantDerivative F time Ξ³ (curveVelocityWithin (n := n) Ξ³ I) I (chartVelocityExtensionAlong p Ξ³ v U I hU hIU hI hv hΞ³ ha hq) s = chartVectorField p w (Ξ³ s) + (F.connection (time s)).connection (chartVectorField p (v s)) (Ξ³ s) (curveVelocityWithin (n := n) Ξ³ I s) := by let : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric (time s)).toRiemannianMetric⟩ let L : V β†’L[ℝ] TangentSpace (𝓑 n) (Ξ³ s) := (mfderiv (𝓑 n) (𝓑 n) (chartAt V p) (Ξ³ s)).inverse have hd : HasDerivAt (fun r ↦ L (v r)) (L w) s := by simpa only [zero_apply, zero_add] using (hasDerivAt_const s L).clm_apply hdv exact congrArg (Β· + (F.connection (time s)).connection (chartVectorField p (v s)) (Ξ³ s) (curveVelocityWithin (n := n) Ξ³ I s)) hd.deriv end PoincareMT.ReducedLength