import PoincareLib.Geometry.CurveShortening.Comparison.Compatibility.SourceNames import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Pullback.MetricHessian import Mathlib.Analysis.Calculus.ContDiff.WithLp /-! # The actual vector of embedding-coordinate Hessians The componentwise frozen Hessian equals the actual vector chart formula. Its pullback along a smooth spatial map is jointly smooth through the closed flow interval. MT2007 Claim 19.1, p. 437; `2026-09-21-embedding-hessian-vector.md`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Topology universe u v w 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 literal Euclidean vector of the actual coordinate Hessians for the supplied connection. MT2007 Claim 19.1, p. 437; embedding Hessian vector derivation, item 1. -/ noncomputable def coordinateHessian {g : RiemannianMetric n M} (D : LeviCivitaData g) (e : M โ†’ W) (p : M) (v w : TangentSpace (๐“ก n) p) : W := WithLp.toLp 2 (fun i => D.hessian (fun q => e q i) p v w) /-- The actual coordinate Hessian vector has the actual second chart derivative minus the Christoffel correction. MT2007 Claim 19.1, p. 437; embedding Hessian vector derivation, item 2. -/ theorem coordinateHessian_eq_chart {g : RiemannianMetric n M} (D : LeviCivitaData g) {e : M โ†’ W} (he : ContMDiff (๐“ก n) ๐“˜(โ„, W) โˆž e) (p q : M) (hq : q โˆˆ (chartAt E p).source) (u v : E) : let f : E โ†’ W := e โˆ˜ (chartAt E p).symm coordinateHessian D e q (chartVectorField p u q) (chartVectorField p v q) = fderiv โ„ (fderiv โ„ f) ((chartAt E p) q) u v - fderiv โ„ f ((chartAt E p) q) (coordinateChristoffel (g.pullbackCoefficients (chartAt E p).symm) ((chartAt E p) q) u v) := by let c := chartAt E p let f : E โ†’ W := e โˆ˜ c.symm have hy : c q โˆˆ c.target := c.map_source hq have hf : ContDiffOn โ„ โˆž f c.target := (he.comp_contMDiffOn (contMDiffOn_chart_symm (I := ๐“ก n) (x := p))).contDiffOn ext i let L : W โ†’L[โ„] โ„ := EuclideanSpace.proj i let A : (E โ†’L[โ„] W) โ†’L[โ„] E โ†’L[โ„] โ„ := ContinuousLinearMap.compL โ„ E W โ„ L have hei : ContMDiff (๐“ก n) ๐“˜(โ„, โ„) โˆž (fun x => e x i) := L.contDiff.contMDiff.comp he have hD (y : E) (hy : y โˆˆ c.target) : fderiv โ„ (L โˆ˜ f) y = A (fderiv โ„ f y) := (L.hasFDerivAt.comp y ((hf.contDiffAt (c.open_target.mem_nhds hy)).differentiableAt (by simp)).hasFDerivAt).fderiv have hDDf : HasFDerivAt (fderiv โ„ f) (fderiv โ„ (fderiv โ„ f) (c q)) (c q) := (((hf.contDiffAt (c.open_target.mem_nhds hy)).fderiv_right (m := โˆž) (by simp)).differentiableAt (by simp)).hasFDerivAt have heq : fderiv โ„ (L โˆ˜ f) =แถ [๐“ (c q)] A โˆ˜ fderiv โ„ f := by filter_upwards [c.open_target.mem_nhds hy] with y hyt exact hD y hyt have hDD : fderiv โ„ (fderiv โ„ (L โˆ˜ f)) (c q) = A.comp (fderiv โ„ (fderiv โ„ f) (c q)) := ((A.hasFDerivAt.comp (c q) hDDf).congr_of_eventuallyEq heq).fderiv have hh := hessian_eq_chart_christoffel D hei p q hq u v change D.hessian (fun x => e x i) q (chartVectorField p u q) (chartVectorField p v q) = fderiv โ„ (fderiv โ„ (L โˆ˜ f)) (c q) u v - fderiv โ„ (L โˆ˜ f) (c q) (coordinateChristoffel (g.pullbackCoefficients c.symm) (c q) u v) at hh rw [hD _ hy, hDD] at hh exact hh /-- Actual repeated coordinate Hessians along an arbitrary smooth spatial map retain joint smoothness through the flow interval. MT2007 Claim 19.1, p. 437; embedding Hessian vector derivation, item 3. -/ theorem flow_coordinateHessian_pullback_contDiffOn {a b : โ„} (F : RicciFlow n M (Icc a b)) {e : M โ†’ W} (he : ContMDiff (๐“ก n) ๐“˜(โ„, W) โˆž e) {V : Type w} [NormedAddCommGroup V] [NormedSpace โ„ V] {U : Set V} (hU : IsOpen U) {ฯ : V โ†’ M} (hฯ : ContMDiffOn ๐“˜(โ„, V) (๐“ก n) โˆž ฯ U) : ContDiffOn โ„ โˆž (fun z : (โ„ ร— V) ร— V => coordinateHessian (F.connection z.1.1) e (ฯ z.1.2) (mfderiv ๐“˜(โ„, V) (๐“ก n) ฯ z.1.2 z.2) (mfderiv ๐“˜(โ„, V) (๐“ก n) ฯ z.1.2 z.2)) ((Icc a b ร—หข U) ร—หข univ) := by apply (contDiffOn_piLp 2).mpr intro i have hei : ContMDiff (๐“ก n) ๐“˜(โ„, โ„) โˆž (fun x => e x i) := (EuclideanSpace.proj i).contDiff.contMDiff.comp he exact (flow_pullback_metric_hessian_contDiffOn F hU hฯ hei).2 end PoincareMT.M63