import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Comparison.SmoothMetric import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Exponential.Coordinates.ProductDerivatives import Mathlib.Geometry.Manifold.MFDeriv.Atlas import Mathlib.Analysis.Calculus.Deriv.Mul /-! # Backward metric evolution in the preferred endpoint coordinates Strict interior times turn the flow's within derivative into a genuine derivative. Backward time changes its sign, giving the +2 Ric contribution to the reduced-volume Gram evolution. -/ set_option autoImplicit false open Set Filter open scoped Manifold ContDiff Bundle Topology universe u namespace PoincareMT.ReducedVolume variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} set_option backward.isDefEq.respectTransparency false in /-- At its preferred center the coordinate bilinear form is the literal selected metric. -/ theorem coordinateBackwardMetric_at_center (q : M) (Ο„ : ℝ) (v w : TangentSpace (𝓑 n) q) : coordinateBackwardMetric F T q (extChartAt (𝓑 n) q q, Ο„) v w = (F.metric (T - Ο„)).inner q v w := by have hc := backwardMetricCoordinates_apply (F := F) (T := T) q (q, Ο„) (FiberBundle.mem_baseSet_trivializationAt' q) v w rw [TangentBundle.continuousLinearMapAt_trivializationAt (mem_chart_source _ _), mfderiv_extChartAt_self] at hc simpa only [coordinateBackwardMetric, extChartAt_to_inv, ContinuousLinearMap.id_apply] using! hc /-- The actual backward metric has derivative +2 Ric at every strict interior time. -/ theorem backward_metric_inner_hasDerivAt (hwindow : Icc (T - Ο„max) T βŠ† J) {Ο„ : ℝ} (hΟ„ : 0 < Ο„) (hmax : Ο„ < Ο„max) (q : M) (v w : TangentSpace (𝓑 n) q) : HasDerivAt (fun s ↦ (F.metric (T - s)).inner q v w) (2 * (F.connection (T - Ο„)).ricci q v w) Ο„ := by have hi : T - Ο„ ∈ Ioo (T - Ο„max) T := by constructor <;> linarith have hJ : J ∈ 𝓝 (T - Ο„) := Filter.mem_of_superset (isOpen_Ioo.mem_nhds hi) (fun _ hs ↦ hwindow ⟨hs.1.le, hs.2.le⟩) have hd := (F.equation (T - Ο„) (hwindow ⟨hi.1.le, hi.2.le⟩) q v w).hasDerivAt hJ have ht := hd.comp Ο„ ((hasDerivAt_id Ο„).const_sub T) simpa only [Function.comp_def, neg_mul, mul_neg, mul_one, neg_neg] using ht set_option backward.isDefEq.respectTransparency false in /-- The pure time derivative of the actual coordinate metric is +2 Ric. -/ theorem coordinateBackwardMetric_time_derivative (hwindow : Icc (T - Ο„max) T βŠ† J) {Ο„ : ℝ} (hΟ„ : 0 < Ο„) (hmax : Ο„ < Ο„max) (q : M) (v w : TangentSpace (𝓑 n) q) : fderiv ℝ (coordinateBackwardMetric F T q) (extChartAt (𝓑 n) q q, Ο„) (0, 1) v w = 2 * (F.connection (T - Ο„)).ricci q v w := by let v' : EuclideanSpace ℝ (Fin n) := v let w' : EuclideanSpace ℝ (Fin n) := w have hB : DifferentiableAt ℝ (coordinateBackwardMetric F T q) (extChartAt (𝓑 n) q q, Ο„) := (coordinateBackwardMetric_contDiffAt (F := F) hwindow q hΟ„ hmax).differentiableAt (by simp) have ht := hasDerivAt_time_slice (X := EuclideanSpace ℝ (Fin n)) (Y := EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n) β†’L[ℝ] ℝ) hB have hv := ht.clm_apply (hasDerivAt_const Ο„ v') have hcoord := hv.clm_apply (hasDerivAt_const Ο„ w') simp only [map_zero, add_zero] at hcoord have hmetric := (backward_metric_inner_hasDerivAt hwindow hΟ„ hmax q v w).congr_of_eventuallyEq (Filter.Eventually.of_forall (fun s ↦ coordinateBackwardMetric_at_center (F := F) (T := T) q s v w)) exact hcoord.unique hmetric end PoincareMT.ReducedVolume