import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.CenteredCoordinateDifferential import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.SquareChartPairing import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.TimeSpaceDerivative /-! # Spatial derivatives of the actual square-time metric partial The flow equation gives four times square time times Ricci. Differentiation on the open chart target retains this identity also at square time zero. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 set_option maxHeartbeats 800000 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) theorem centeredChartRicci_contDiffOn (hM04 : RicciFlowCurvatureTheory.{u}) {g : RiemannianMetric n M} (D : LeviCivitaData g) (p : M) (V W : E) : ContDiffOn โ„ โˆž (fun y : E โ†ฆ D.ricci ((chartAt E p).symm y) (chartVectorField p V ((chartAt E p).symm y)) (chartVectorField p W ((chartAt E p).symm y))) (chartAt E p).target := by have hf : ContMDiffOn (๐“ก n) (๐“˜(โ„, โ„)) โˆž (fun q : M โ†ฆ D.ricci q (chartVectorField p V q) (chartVectorField p W q)) (chartAt E p).source := by have h := (hM04.tensor_calculus n M g D).2.1.2 (chartAt E p).source (chartAt E p).open_source (fun i : Fin 2 โ†ฆ chartVectorField p (![V, W] i)) (fun i โ†ฆ chartVectorField_smooth p (![V, W] i)) simpa [LeviCivitaData.ricciEvaluation] using h exact (hf.comp contMDiffOn_chart_symm (fun y hy โ†ฆ (chartAt E p).map_target hy)).contDiffOn set_option backward.isDefEq.respectTransparency false in theorem squareChartMetric_time_at_center {J : Set โ„} (F : RicciFlow n M J) (T b : โ„) (hb : 0 < b) (hwindow : Set.Icc (T - b) T โІ J) (p : M) (s : โ„) (hs : s โˆˆ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) (V W : E) : fderiv โ„ (squareChartMetric F T p) (s, (chartAt E p) p) (1, 0) V W = 4 * s * (F.connection (T - s ^ 2)).ricci p V W := by have hy := (chartAt E p).map_source (mem_chart_source E p) have h := squareChartMetric_time_pairing F T b hb hwindow p s hs ((chartAt E p) p) V W hy rw [โ† chartVectorField_at_inverse p V ((chartAt E p) p) hy, โ† chartVectorField_at_inverse p W ((chartAt E p) p) hy] at h rw [(chartAt E p).left_inv (mem_chart_source E p)] at h simpa only [chartVectorField_self] using h theorem squareChartMetric_time_space_at_center {J : Set โ„} (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) (T b : โ„) (hb : 0 < b) (hwindow : Set.Icc (T - b) T โІ J) (p : M) (s : โ„) (hs : s โˆˆ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) (U V W : E) : fderiv โ„ (fun y : E โ†ฆ fderiv โ„ (squareChartMetric F T p) (s, y) (1, 0)) ((chartAt E p) p) U V W = 4 * s * fderiv โ„ (fun y : E โ†ฆ (F.connection (T - s ^ 2)).ricci ((chartAt E p).symm y) (chartVectorField p V ((chartAt E p).symm y)) (chartVectorField p W ((chartAt E p).symm y))) ((chartAt E p) p) U := by let H : E โ†’ E โ†’L[โ„] E โ†’L[โ„] โ„ := fun y โ†ฆ fderiv โ„ (squareChartMetric F T p) (s, y) (1, 0) let r : E โ†’ โ„ := fun y โ†ฆ (F.connection (T - s ^ 2)).ricci ((chartAt E p).symm y) (chartVectorField p V ((chartAt E p).symm y)) (chartVectorField p W ((chartAt E p).symm y)) have hy := (chartAt E p).map_source (mem_chart_source E p) have hH : DifferentiableAt โ„ H ((chartAt E p) p) := by have hG : ContDiffAt โ„ โˆž (squareChartMetric F T p) (s, (chartAt E p) p) := (squareChartMetric_smooth F T b hb hwindow p).contDiffAt ((isOpen_Ioo.prod (chartAt E p).open_target).mem_nhds โŸจhs, hyโŸฉ) exact (((hG.fderiv_right (m := โˆž) (by simp)).differentiableAt (by simp)).comp ((chartAt E p) p) ((hasFDerivAt_const s ((chartAt E p) p)).prodMk (hasFDerivAt_id ((chartAt E p) p))).differentiableAt).clm_apply (differentiableAt_const ((1, 0) : โ„ ร— E)) have hr : DifferentiableAt โ„ r ((chartAt E p) p) := ((centeredChartRicci_contDiffOn hM04 (F.connection (T - s ^ 2)) p V W).contDiffAt ((chartAt E p).open_target.mem_nhds hy)).differentiableAt (by simp) have heq : (fun y โ†ฆ H y V W) =แถ [๐“ ((chartAt E p) p)] (fun y โ†ฆ (4 * s) * r y) := by filter_upwards [(chartAt E p).open_target.mem_nhds hy] with y hy' dsimp only [H, r] rw [squareChartMetric_time_pairing F T b hb hwindow p s hs y V W hy', chartVectorField_at_inverse p V y hy', chartVectorField_at_inverse p W y hy'] have hleft := (hH.hasFDerivAt.clm_apply (hasFDerivAt_const V ((chartAt E p) p))).clm_apply (hasFDerivAt_const W ((chartAt E p) p)) have hright := hr.hasFDerivAt.const_mul (4 * s) have h := (hleft.congr_of_eventuallyEq heq.symm).unique hright simpa using congrArg (fun L : E โ†’L[โ„] โ„ โ†ฆ L U) h end PoincareMT.ReducedLength