import PoincareLib.Geometry.CurveShortening.Comparison.Compatibility.SourceNames import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.C2.SecondDerivComposition import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Coordinate.GaugeEquation import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Embedding.HessianVector import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.GaugeWitnesses /-! # Actual embedded acceleration of a C2 spatial slice The chart Hessian and covariant acceleration have cancelling Christoffel terms. The actual curvature formula then separates the embedded second derivative from its tangential component. MT2007 Claim 19.1, p. 437, and Lemma 19.6, pp. 441-442; C2 ambient acceleration derivation of 2026-09-22, statements 2-3. All identities are purely spatial. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Bundle Topology universe u v namespace PoincareMT.M63 open Proofs.M09 variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] {ฮน : Type v} [Fintype ฮน] local notation "E" => EuclideanSpace โ„ (Fin n) local notation "W" => EuclideanSpace โ„ ฮน /-- The actual second derivative of a smooth spatial map along a C2 curve is its selected-connection Hessian plus pushed covariant acceleration. Zero velocity is allowed. MT2007 Claim 19.1, p. 437; C2 ambient acceleration derivation, statement 2. -/ theorem secondDeriv_embedding_eq_hessian_add_acceleration {g : RiemannianMetric n M} (D : LeviCivitaData g) {e : M โ†’ W} (he : ContMDiff (๐“ก n) ๐“˜(โ„, W) โˆž e) {gamma : โ„ โ†’ M} (hgamma : ContMDiff ๐“˜(โ„, โ„) (๐“ก n) 2 gamma) (x : โ„) : deriv (deriv (fun y => e (gamma y))) x = HAdd.hAdd (ฮฑ := W) (ฮฒ := W) (ฮณ := W) (coordinateHessian D e (gamma x) (curveVelocity gamma x) (curveVelocity gamma x)) (mfderiv (๐“ก n) ๐“˜(โ„, W) e (gamma x) (rampHorizontalCovariantDerivative D gamma (fun y => curveVelocity gamma y) x)) := by let p := gamma x let c := chartAt E p let U := gamma โปยน' c.source let z : โ„ โ†’ E := fun y => c (gamma y) let f : E โ†’ W := e โˆ˜ c.symm have hU : IsOpen U := c.open_source.preimage hgamma.continuous have hx : x โˆˆ U := mem_chart_source E p have hmap : MapsTo gamma U c.source := fun _ hy => hy have hz : ContDiffOn โ„ 2 z U := (contMDiffOn_chart.comp hgamma.contMDiffOn hmap).contDiffOn have hf : ContDiffOn โ„ โˆž f c.target := (he.comp_contMDiffOn (contMDiffOn_chart_symm (I := ๐“ก n) (x := p))).contDiffOn have htarget : z x โˆˆ c.target := c.map_source hx have hbase : c.symm (z x) = gamma x := c.left_inv hx have hvel : chartVectorField p (deriv z x) (gamma x) = curveVelocity gamma x := chartVectorField_coordinate_velocity p gamma x (deriv z x) hx ((hgamma x).mdifferentiableAt (by norm_num)) (((hz.contDiffAt (hU.mem_nhds hx)).differentiableAt (by norm_num)).hasDerivAt) have hacc := pullback_velocity_eq_chart_acceleration D p hU hgamma.contMDiffOn hmap hx have hhess := coordinateHessian_eq_chart D he p (gamma x) hx (deriv z x) (deriv z x) dsimp only at hacc hhess rw [hvel] at hhess have hpush (v : E) : mfderiv (๐“ก n) ๐“˜(โ„, W) e (gamma x) (chartVectorField p v (gamma x)) = fderiv โ„ f (z x) v := by have hchain := mfderiv_comp (z x) (he.mdifferentiable (by simp)).mdifferentiableAt ((mdifferentiable_chart (I := ๐“ก n) p).mdifferentiableAt_symm htarget) rw [mfderiv_eq_fderiv] at hchain have hv := congrArg (fun L : E โ†’L[โ„] W => L v) hchain change fderiv โ„ f (z x) v = mfderiv (๐“ก n) ๐“˜(โ„, W) e (c.symm (z x)) (mfderiv (๐“ก n) (๐“ก n) c.symm (z x) v) at hv rw [โ† chartVectorField_at_inverse p v (z x) htarget, hbase] at hv exact hv.symm have hlocal : (fun y => e (gamma y)) =แถ [๐“ x] (fun y => f (z y)) := by filter_upwards [hU.mem_nhds hx] with y hy dsimp only [f, z, Function.comp_def] rw [c.left_inv hy] have hsecond := secondDeriv_comp_of_contDiffAt_two f z x ((hf.contDiffAt (c.open_target.mem_nhds htarget)).of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2)) (hz.contDiffAt (hU.mem_nhds hx)) rw [hlocal.deriv.deriv_eq, hsecond, hhess, hacc, hpush, map_add] abel variable {a b : โ„} /-- An arbitrary C2 immersed slice has the actual embedded curvature formula with the speed-cubed tangential coefficient. No time equation or endpoint time derivative is needed. MT2007 Lemma 19.6, pp. 441-442; C2 ambient acceleration derivation, statement 3. -/ theorem embedded_curvature_eq_acceleration_sub_tangent (F : RicciFlow n M (Icc a b)) {e : M โ†’ W} (he : ContMDiff (๐“ก n) ๐“˜(โ„, W) โˆž e) (q : โ„ โ†’ โ„ โ†’ M) {t : โ„} (hspace : ContMDiff ๐“˜(โ„, โ„) (๐“ก n) 2 (fun y => q y t)) (himm : โˆ€ y, curveVelocity (n := n) (fun z => q z t) y โ‰  0) (x : โ„) : mfderiv (๐“ก n) ๐“˜(โ„, W) e (q x t) (m62CurvatureVector F q t x) = (curveSpeed F q t x ^ 2)โปยน โ€ข (deriv (deriv (fun y => e (q y t))) x - coordinateHessian (F.connection t) e (q x t) (curveVelocity (fun y => q y t) x) (curveVelocity (fun y => q y t) x)) - (deriv (curveSpeed F q t) x / curveSpeed F q t x ^ 3) โ€ข deriv (fun y => e (q y t)) x := by have hX := ((spatial_velocity_contMDiff_of_c2 hspace) x).mdifferentiableAt (by simp) have hv := ((speed_contDiff_of_c2 F q hspace himm).differentiable (by simp) x).hasDerivAt have hne : curveSpeed F q t x โ‰  0 := (Real.sqrt_pos.mpr ((F.metric t).pos _ _ (himm x))).ne' have hacc := secondDeriv_embedding_eq_hessian_add_acceleration (F.connection t) he hspace x have hpushacc : mfderiv (๐“ก n) ๐“˜(โ„, W) e (q x t) (rampHorizontalCovariantDerivative (F.connection t) (fun y => q y t) (fun y => curveVelocity (fun z => q z t) y) x) = deriv (deriv (fun y => e (q y t))) x - coordinateHessian (F.connection t) e (q x t) (curveVelocity (fun y => q y t) x) (curveVelocity (fun y => q y t) x) := by rw [hacc] abel have hpushvel : mfderiv (๐“ก n) ๐“˜(โ„, W) e (q x t) (curveVelocity (fun y => q y t) x) = deriv (fun y => e (q y t)) x := by have hchain : fderiv โ„ (fun y => e (q y t)) x = (mfderiv (๐“ก n) ๐“˜(โ„, W) e (q x t)).comp (mfderiv ๐“˜(โ„, โ„) (๐“ก n) (fun y => q y t) x) := by rw [โ† mfderiv_eq_fderiv] exact mfderiv_comp x (he.mdifferentiable (by simp)).mdifferentiableAt ((hspace x).mdifferentiableAt (by norm_num)) exact (congrArg (fun L : โ„ โ†’L[โ„] W => L 1) hchain).symm rw [curvatureVector_eq_acceleration_sub_tangent F q hX hv hne, map_sub, map_smul, map_smul, hpushacc, hpushvel] end PoincareMT.M63