import PoincareLib.Geometry.RicciFlow.CurveShortening.Connection.Restriction import PoincareLib.Geometry.CurveShortening.Evolution.CovariantGeometry import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.ParametricCurveDerivative /-! # Parametric ambient fields restricted to a curve The selected-frame chain rule separates explicit parameter change from the actual ambient connection. This is the parameter calculus in MT2007 Lemma 19.6, pp. 441-442, and the correction's connection formulas, pp. 2-3. See `references/ricci-flow/mapher/curve-evolution/derivations/2026-09-19-parametric-restriction.md`. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 set_option backward.isDefEq.respectTransparency false open scoped Manifold ContDiff Bundle Topology universe u namespace PoincareMT.M62 variable {n : ā„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ā„ (Fin n)) M] [IsManifold (š“” n) āˆž M] /-- The frozen fixed-point time derivative has a genuine derivative witness. Correction connection formulas (0.1)-(0.2), pp. 2-3. -/ theorem hasDerivAt_fixedPointTimeDerivative (W : ā„ → (p : M) → TangentSpace (š“” n) p) (p : M) (x : ā„) (hW : MDifferentiableAt ((š“˜(ā„, ā„)).prod (š“” n)) ((š“” n).prod (š“” n)) (fun z : ā„ Ɨ M ↦ (⟨z.2, W z.1 z.2⟩ : TangentBundle (š“” n) M)) (x, p)) : HasDerivAt (fun r ↦ W r p) (fixedPointTimeDerivative W p x) x := by let e := trivializationAt (EuclideanSpace ā„ (Fin n)) (TangentSpace (š“” n)) p have hp : p ∈ e.baseSet := FiberBundle.mem_baseSet_trivializationAt' p let C : ā„ Ɨ M → EuclideanSpace ā„ (Fin n) := fun z ↦ (e ⟨z.2, W z.1 z.2⟩).2 have hC : MDifferentiableAt ((š“˜(ā„, ā„)).prod (š“” n)) (š“” n) C (x, p) := ((e.mdifferentiableAt_totalSpace_iff (š“” n) _ (e.mem_source.mpr hp)).mp hW).2 have hc : DifferentiableAt ā„ (fun r ↦ C (r, p)) x := (hC.comp x (mdifferentiableAt_id.prodMk mdifferentiableAt_const)).differentiableAt have hlin : HasDerivAt (fun r ↦ e.symmL ā„ p (C (r, p))) (e.symmL ā„ p (deriv (fun r ↦ C (r, p)) x)) x := by rw [hasDerivAt_iff_hasFDerivAt, hasFDerivAt_iff_isLittleOTVS] simpa only [Function.comp_def, map_sub, map_smul, ContinuousLinearMap.toSpanSingleton_apply] using (e.symmL ā„ p).isBigOTVS_comp.trans_isLittleOTVS hc.hasDerivAt.hasFDerivAt.isLittleOTVS have hrep : (fun r ↦ e.symmL ā„ p (C (r, p))) = (fun r ↦ W r p) := by funext r change e.symmL ā„ p (e ⟨p, W r p⟩).2 = W r p rw [← e.continuousLinearMapAt_apply_of_mem ā„ hp] exact e.symmL_continuousLinearMapAt hp _ rw [hrep] at hlin exact hlin /-- Along-curve differentiation splits into explicit parameter variation and the actual ambient connection; correction Lemma 0.1, p. 3. -/ theorem pullback_parametric_field {g : RiemannianMetric n M} (D : LeviCivitaData g) {γ : ā„ → M} {x : ā„} (hγ : MDifferentiableAt (š“˜(ā„, ā„)) (š“” n) γ x) (W : ā„ → (p : M) → TangentSpace (š“” n) p) (hW : MDifferentiableAt ((š“˜(ā„, ā„)).prod (š“” n)) ((š“” n).prod (š“” n)) (fun z : ā„ Ɨ M ↦ (⟨z.2, W z.1 z.2⟩ : TangentBundle (š“” n) M)) (x, γ x)) : rampHorizontalCovariantDerivative D γ (fun r ↦ W r (γ r)) x = fixedPointTimeDerivative W (γ x) x + D.connection (W x) (γ x) (curveVelocity γ x) := by let e := trivializationAt (EuclideanSpace ā„ (Fin n)) (TangentSpace (š“” n)) (γ x) have hp : γ x ∈ e.baseSet := FiberBundle.mem_baseSet_trivializationAt' (γ x) let C : ā„ Ɨ M → EuclideanSpace ā„ (Fin n) := fun z ↦ (e ⟨z.2, W z.1 z.2⟩).2 have hC : MDifferentiableAt ((š“˜(ā„, ā„)).prod (š“” n)) (š“” n) C (x, γ x) := ((e.mdifferentiableAt_totalSpace_iff (š“” n) _ (e.mem_source.mpr hp)).mp hW).2 have hsplit := PoincareMT.ReducedLength.hasDerivAt_parametric_curve C γ x hC hγ have hCs : MDifferentiableAt (š“” n) (š“” n) (fun p ↦ C (x, p)) (γ x) := hC.comp (γ x) (mdifferentiableAt_const.prodMk mdifferentiableAt_id) have hspatial : HasDerivAt (fun r ↦ C (x, γ r)) (mvfderiv (š“” n) (fun p ↦ C (x, p)) (γ x) (curveVelocity γ x)) x := (hCs.hasMFDerivAt.comp x hγ.hasMFDerivAt).hasFDerivAt.hasDerivAt have hWs : MDifferentiableAt (š“” n) ((š“” n).prod (š“” n)) (fun p ↦ (⟨p, W x p⟩ : TangentBundle (š“” n) M)) (γ x) := hW.comp (γ x) (mdifferentiableAt_const.prodMk mdifferentiableAt_id) rw [← pullback_ambient_field D hγ (W x) hWs] change e.symmL ā„ (γ x) (deriv (fun r ↦ C (r, γ r)) x) + D.connection (FiberBundle.extend (EuclideanSpace ā„ (Fin n)) (W x (γ x))) (γ x) (curveVelocity γ x) = e.symmL ā„ (γ x) (deriv (fun r ↦ C (r, γ x)) x) + (e.symmL ā„ (γ x) (deriv (fun r ↦ C (x, γ r)) x) + D.connection (FiberBundle.extend (EuclideanSpace ā„ (Fin n)) (W x (γ x))) (γ x) (curveVelocity γ x)) rw [hsplit.deriv, hspatial.deriv, map_add, add_assoc] end PoincareMT.M62