import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.CenteredHessian /-! # The centered Hessian with local scalar smoothness Only the specified open scalar neighborhood is used in differentiating the actual chart germ and its first directional derivative. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 open scoped Manifold ContDiff Bundle Topology open Filter universe u namespace PoincareMT.ReducedLength variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] local notation "E" => EuclideanSpace โ„ (Fin n) set_option backward.isDefEq.respectTransparency false in theorem hessian_centeredCoordinates_local {g : RiemannianMetric n M} (D : LeviCivitaData g) (f : M โ†’ โ„) (p : M) (O : Set M) (hO : IsOpen O) (hpO : p โˆˆ O) (hf : ContMDiffOn (๐“ก n) (๐“˜(โ„, โ„)) โˆž f O) (U W : TangentSpace (๐“ก n) p) : let ฯ† : E โ†’ โ„ := fun y โ†ฆ f ((chartAt E p).symm y) D.hessian f p U W = fderiv โ„ (fun y โ†ฆ fderiv โ„ ฯ† y W) ((chartAt E p) p) U - fderiv โ„ ฯ† ((chartAt E p) p) (D.connection (chartVectorField p W) p U) := by let e := chartAt E p let V := e.target โˆฉ e.symm โปยน' O have he : ContMDiffOn (๐“ก n) (๐“ก n) โˆž e.symm e.target := contMDiffOn_chart_symm have hV : IsOpen V := he.continuousOn.isOpen_inter_preimage e.open_target hO have hp : e p โˆˆ V := โŸจe.map_source (mem_chart_source E p), by change e.symm (e p) โˆˆ O rwa [e.left_inv (mem_chart_source E p)]โŸฉ let ฯ† : E โ†’ โ„ := fun y โ†ฆ f (e.symm y) let ฯˆ : E โ†’ โ„ := fun y โ†ฆ fderiv โ„ ฯ† y W have hฯ† : ContDiffOn โ„ โˆž ฯ† V := (hf.comp (he.mono Set.inter_subset_left) (fun y hy โ†ฆ hy.2)).contDiffOn have hฯˆ : ContDiffOn โ„ โˆž ฯˆ V := (hฯ†.fderiv_of_isOpen hV (by simp)).clm_apply contDiffOn_const have heq : f =แถ [๐“ p] (fun q โ†ฆ ฯ† (e q)) := by filter_upwards [e.open_source.mem_nhds (mem_chart_source E p)] with q hq exact congrArg f (e.left_inv hq).symm have hinner : (fun q โ†ฆ mvfderiv (๐“ก n) f q (chartVectorField p W q)) =แถ [๐“ p] (fun q โ†ฆ ฯˆ (e q)) := by filter_upwards [(hO.inter e.open_source).mem_nhds โŸจhpO, mem_chart_source E pโŸฉ] with q hq have hdiff : MDifferentiableAt (๐“ก n) (๐“˜(โ„, โ„)) f (e.symm (e q)) := by rw [e.left_inv hq.2] exact (hf.contMDiffAt (hO.mem_nhds hq.1)).mdifferentiableAt (by simp) have h := mvfderiv_chartVectorField p f (e q) W (e.map_source hq.2) hdiff convert! h using 1 rw [e.left_inv hq.2] have hfirst := mvfderiv_centeredChart_of_eventuallyEq p (fun q โ†ฆ mvfderiv (๐“ก n) f q (chartVectorField p W q)) ฯˆ ((hฯˆ.contDiffAt (hV.mem_nhds hp)).differentiableAt (by simp)) hinner U have hsecond := mvfderiv_centeredChart_of_eventuallyEq p f ฯ† ((hฯ†.contDiffAt (hV.mem_nhds hp)).differentiableAt (by simp)) heq (D.connection (chartVectorField p W) p U) rw [hessian_centeredChart, LeviCivitaData.hessianOnFields, chartVectorField_self, hfirst, hsecond] end PoincareMT.ReducedLength