import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Metric.Ricci import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Metric.TimeFamily import Mathlib.Analysis.Calculus.FDeriv.Extend /-! # The Ricci equation at the terminal time Metric convergence gives continuity at the endpoint, and spatial two-jet convergence gives the limit of the Ricci tensor. The one-sided derivative extension theorem then proves the actual endpoint evolution equation. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false set_option synthInstance.maxHeartbeats 100000 set_option maxSynthPendingDepth 8 open Set Filter open scoped Manifold ContDiff Bundle Topology universe u namespace PoincareMT.SingularTimeAssumptions variable {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] {F : GeneralizedRicciFlowData.{u}} {T : โ„} /-- Old-time tangent pairings are exactly those of the reference flow. -/ theorem terminalMetricFamily_inner_of_ne (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) {t : โ„} (ht : t โ‰  T) (x : H.regularRegion P04) (v w : TangentSpace (๐“ก 3) x) : (H.terminalMetricFamily P04 t).inner x v w = (H.reference.flow.metric t).inner (x : M) v w := by rw [H.terminalMetricFamily_of_ne P04 ht, RicciFlow.restrictToOpen_inner, Poincare.Geometry.Manifold.RegularLevel.mfderiv_opens_subtypeVal] rfl theorem terminalMetricFamily_hasDerivAt_of_lt (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) {t : โ„} (ht : t โˆˆ Ioo H.reference.tMinus T) (x : H.regularRegion P04) (v w : TangentSpace (๐“ก 3) x) : HasDerivAt (fun s => (H.terminalMetricFamily P04 s).inner x v w) (-2 * (H.reference.flow.connection t).ricci (x : M) v w) t := by apply ((H.reference.flow.equation t โŸจht.1.le, ht.2โŸฉ (x : M) v w).hasDerivAt (Ico_mem_nhds_iff.mpr ht)).congr_of_eventuallyEq filter_upwards [Iio_mem_nhds ht.2] with s hs exact H.terminalMetricFamily_inner_of_ne P04 (ne_of_lt hs) x v w /-- The terminal metric pairings have the required one-sided Ricci derivative. -/ theorem terminalMetricFamily_endpoint_equation (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) (x : H.regularRegion P04) (v w : TangentSpace (๐“ก 3) x) : HasDerivWithinAt (fun s => (H.terminalMetricFamily P04 s).inner x v w) (-2 * (H.terminalConnection P04).ricci x v w) (Ioc H.reference.tMinus T) T := by let f : โ„ โ†’ โ„ := fun s => (H.terminalMetricFamily P04 s).inner x v w have hlimit : Tendsto f (๐“[<] T) (๐“ (f T)) := by have h := H.tendsto_terminalMetricBilinear_apply P04 x.property v w have heq : f =แถ [๐“[<] T] (fun t => (H.reference.flow.metric t).inner (x : M) v w) := by filter_upwards [self_mem_nhdsWithin] with t ht exact H.terminalMetricFamily_inner_of_ne P04 (ne_of_lt ht) x v w have hT : f T = H.terminalMetricBilinear P04 x.property v w := by dsimp only [f] rw [H.terminalMetricFamily_at_terminal P04] rfl rw [hT] exact h.congr' heq.symm have hderiv : Tendsto (deriv f) (๐“[<] T) (๐“ (-2 * (H.terminalConnection P04).ricci x v w)) := by have h := (tendsto_const_nhds (x := (-2 : โ„))).mul (H.tendsto_terminal_ricci P04 x v w) apply h.congr' filter_upwards [Ioo_mem_nhdsLT H.reference.tMinus_lt] with t ht exact (H.terminalMetricFamily_hasDerivAt_of_lt P04 ht x v w).deriv.symm exact (hasDerivWithinAt_Iic_of_tendsto_deriv (fun t ht => (H.terminalMetricFamily_hasDerivAt_of_lt P04 ht x v w).differentiableAt.differentiableWithinAt) (hlimit.mono_left (nhdsWithin_mono T Ioo_subset_Iio_self)) (Ioo_mem_nhdsLT H.reference.tMinus_lt) hderiv).mono Ioc_subset_Iic_self end PoincareMT.SingularTimeAssumptions