import PoincareLib.Geometry.RicciFlow.AncientKappa.Compactness.Data import PoincareLib.Geometry.RicciFlow.AncientKappa.Theory import PoincareLib.Geometry.RicciFlow.Rescaling.Ordinary import PoincareLib.Geometry.RicciFlow.Soliton.TwoDimensional.Models import PoincareLib.Geometry.RicciFlow.AncientKappa.Volume.Basic /-! # M23 normalized kappa compactness statement The numbered M23 boundary owns the compactness theorem rather than wrapping the historical Chapter 9 predecessor package. It retains pointed smooth convergence on varying carriers, the uniform local estimate from Lemma 9.65, and bounded curvature of the actual ancient limit. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle ENNReal Topology namespace PoincareMT /-! Actual earlier services for the complete Theorem 9.64 construction. The carriers are Type0, matching the varying-carrier input and limit. M19/M21/M22 apply only after their actual kappa-solution inputs are built. See reviews/contracts/2026-09-15-m23-complete-contract.md. -/ structure M23NormalizedKappaCompactnessPredecessors : Prop where tensor_calculus : โˆ€ (n : โ„•) (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] (g : RiemannianMetric n M) (D : LeviCivitaData g), D.CurvatureTensorCalculus curvature_norm_zero : โˆ€ (n : โ„•) (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] (g : RiemannianMetric n M) (D : LeviCivitaData g) (x : M), D.curvatureDerivativeNorm 0 x = D.curvatureTensorNorm x scalar_regular : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] (J : Set โ„) (F : RicciFlow 3 M J), ContMDiffOn ((๐“˜(โ„, โ„)).prod (๐“ก 3)) (๐“˜(โ„, โ„)) โˆž (fun p : โ„ ร— M โ†ฆ (F.connection p.1).scalarCurvature p.2) (J ร—หข Set.univ) scalar_evolution : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] (J : Set โ„) (F : RicciFlow 3 M J) (t : โ„), t โˆˆ J โ†’ โˆ€ x : M, HasDerivWithinAt (fun s โ†ฆ (F.connection s).scalarCurvature x) ((F.connection t).laplacian (F.connection t).scalarCurvature x + 2 * (F.connection t).ricciNormSq x) J t curvature_evolution : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] (J : Set โ„) (F : RicciFlow 3 M J) (t : โ„), t โˆˆ J โ†’ โˆ€ (x : M) (vโ‚ vโ‚‚ vโ‚ƒ vโ‚„ : TangentSpace (๐“ก 3) x), HasDerivWithinAt (fun s โ†ฆ (F.connection s).curvatureTensor x vโ‚ vโ‚‚ vโ‚ƒ vโ‚„) ((F.connection t).tensorLaplacian (F.connection t).riemannEvaluation x ![vโ‚, vโ‚‚, vโ‚ƒ, vโ‚„] + (F.connection t).curvatureReaction x vโ‚ vโ‚‚ vโ‚ƒ vโ‚„) J t ricci_evolution : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] (J : Set โ„) (F : RicciFlow 3 M J) (t : โ„), t โˆˆ J โ†’ โˆ€ (x : M) (v w : TangentSpace (๐“ก 3) x), HasDerivWithinAt (fun s โ†ฆ (F.connection s).ricci x v w) ((F.connection t).tensorLaplacian (F.connection t).ricciEvaluation x ![v, w] + (F.connection t).ricciReaction x v w) J t local_derivative_estimates : โˆ€ (k : โ„•) (K ฮฑ r : โ„), 0 < K โ†’ 0 < ฮฑ โ†’ 0 < r โ†’ โˆƒ C : โ„, 0 < C โˆง โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [T2Space M] [SecondCountableTopology M], โˆ€ (T : โ„), 0 < T โ†’ T โ‰ค ฮฑ / K โ†’ โˆ€ (F : RicciFlow 3 M (Set.Icc 0 T)) (p : M), IsCompact (closure ((F.metric 0).ball p r)) โ†’ (โˆ€ t โˆˆ Set.Icc 0 T, โˆ€ x โˆˆ (F.metric 0).ball p r, (F.connection t).curvatureTensorNorm x โ‰ค K) โ†’ โˆ€ t โˆˆ Set.Ioc 0 T, โˆ€ x โˆˆ (F.metric 0).ball p (r / 2), (F.connection t).curvatureDerivativeNorm k x โ‰ค C / t ^ ((k : โ„) / 2) scalar_zero_rigidity : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [T2Space M] [SecondCountableTopology M] [ConnectedSpace M], โˆ€ (T : โ„), 0 < T โ†’ โˆ€ F : RicciFlow 3 M (Set.Icc 0 T), (โˆ€ t โˆˆ Set.Icc 0 T, (F.connection t).NonnegativeSectionalCurvature) โ†’ โˆ€ p : M, (F.connection T).scalarCurvature p = 0 โ†’ โˆ€ t โˆˆ Set.Icc 0 T, โˆ€ x : M, (F.connection t).curvatureTensorNorm x = 0 pointed_compactness : โˆ€ {T' T : โ„}, T' < 0 โ†’ 0 < T โ†’ โˆ€ H : PointedRicciFlowCompactnessHypotheses 3 T' T, Nonempty (PointedRicciFlowCompactnessConclusion H) ordinary_rescaling : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [T2Space M] [SecondCountableTopology M] (I : SpacetimeInterval) (F : RicciFlow 3 M I.domain) (Q : โ„) (hQ : 0 < Q) (a : โ„), Nonempty (OrdinaryParabolicRescaling F Q hQ a) scalar_pos : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 3 M), โˆ€ t : โ„, t โ‰ค 0 โ†’ โˆ€ x : M, 0 < (K.flow.connection t).scalarCurvature x scalar_monotone : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 3 M), โˆ€ s t : โ„, s โ‰ค t โ†’ t โ‰ค 0 โ†’ โˆ€ x : M, (K.flow.connection s).scalarCurvature x โ‰ค (K.flow.connection t).scalarCurvature x past_norm_le_scalar : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 3 M), โˆ€ t b : โ„, t โ‰ค b โ†’ b โ‰ค 0 โ†’ โˆ€ x : M, (K.flow.connection t).curvatureTensorNorm x โ‰ค (K.flow.connection b).scalarCurvature x ball_monotone : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 3 M), โˆ€ s t : โ„, s โ‰ค t โ†’ t โ‰ค 0 โ†’ โˆ€ x : M, โˆ€ r : โ„, (K.flow.metric s).ball x r โІ (K.flow.metric t).ball x r two_dimensional_classification : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 2)) M] [IsManifold (๐“ก 2) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 2 M), Nonempty (TwoDimensionalAncientRoundCertificate K) ratio_antitone : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 3 M) (t : โ„), t โ‰ค 0 โ†’ โˆ€ p : M, AntitoneMetricBallVolumeRatio (K.flow.metric t) p zero_avr : โˆ€ (M : Type) [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] [IsManifold (๐“ก 3) โˆž M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] (K : AncientKappaSolution 3 M), AncientAsymptoticVolumeRatioZero K /-! The source-local uniform estimate. Its time-zero form is the content of Lemma 9.65; the M23 proof may propagate it to earlier times using the already listed structural/Harnack services while constructing the compactness package. -/ def M23LocalCurvatureEstimate {kappa : โ„} (S : NormalizedKappaSolutionSequence kappa) : Prop := โˆ€ r : โ„, 0 < r โ†’ โˆƒ C : โ„, 0 โ‰ค C โˆง โˆ€ k : โ„•, let B := S.term k let Crr := B.carrier letI : TopologicalSpace Crr.carrier := Crr.topologicalSpace letI : MeasurableSpace Crr.carrier := Crr.measurableSpace letI : BorelSpace Crr.carrier := Crr.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) Crr.carrier := Crr.chartedSpace letI : IsManifold (๐“ก 3) โˆž Crr.carrier := Crr.isManifold letI : T2Space Crr.carrier := Crr.t2Space letI : T3Space Crr.carrier := Crr.t3Space letI : SecondCountableTopology Crr.carrier := Crr.secondCountable letI : ConnectedSpace Crr.carrier := B.connectedSpace โˆ€ x : Crr.carrier, x โˆˆ Crr.metricBall (B.flow.flow.metric 0) B.base r โ†’ (B.flow.flow.connection 0).scalarCurvature x โ‰ค C /-! The all-time full-curvature adapter needed by finite-window M07 hypotheses. It is a separate output so the proof cannot hide the ancient Harnack/time-propagation step behind the time-zero Lemma 9.65 estimate. -/ def M23AllTimeCurvatureControl {kappa : โ„} (S : NormalizedKappaSolutionSequence kappa) : Prop := โˆ€ r : โ„, 0 < r โ†’ โˆƒ C : โ„, 0 โ‰ค C โˆง โˆ€ k : โ„•, let B := S.term k let Crr := B.carrier letI : TopologicalSpace Crr.carrier := Crr.topologicalSpace letI : MeasurableSpace Crr.carrier := Crr.measurableSpace letI : BorelSpace Crr.carrier := Crr.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) Crr.carrier := Crr.chartedSpace letI : IsManifold (๐“ก 3) โˆž Crr.carrier := Crr.isManifold letI : T2Space Crr.carrier := Crr.t2Space letI : T3Space Crr.carrier := Crr.t3Space letI : SecondCountableTopology Crr.carrier := Crr.secondCountable letI : ConnectedSpace Crr.carrier := B.connectedSpace โˆ€ t : โ„, t โ‰ค 0 โ†’ โˆ€ x : Crr.carrier, x โˆˆ Crr.metricBall (B.flow.flow.metric 0) B.base r โ†’ |(B.flow.flow.connection t).curvatureTensorNorm x| โ‰ค C /-! Bounded curvature of the actual limit, recorded separately for downstream canonical-neighborhood consumers even though the `BasedKappaSolution` limit also carries its pointwise ancient-solution bounds. -/ def M23LimitBoundedCurvature {kappa : โ„} (B : BasedKappaSolution kappa) : Prop := let C := B.carrier letI : TopologicalSpace C.carrier := C.topologicalSpace letI : MeasurableSpace C.carrier := C.measurableSpace letI : BorelSpace C.carrier := C.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) C.carrier := C.chartedSpace letI : IsManifold (๐“ก 3) โˆž C.carrier := C.isManifold letI : T2Space C.carrier := C.t2Space letI : T3Space C.carrier := C.t3Space letI : SecondCountableTopology C.carrier := C.secondCountable letI : ConnectedSpace C.carrier := B.connectedSpace โˆ€ t : โ„, t โ‰ค 0 โ†’ โˆƒ K : โ„, 0 โ‰ค K โˆง โˆ€ x : C.carrier, |(B.flow.flow.connection t).curvatureTensorNorm x| โ‰ค K /-! The one-sided endpoint obligations are recorded separately from the finite-window convergence package. The fields deliberately mention the actual limit supplied by that package, so a proof cannot discharge the terminal step with an unrelated flow. -/ def M23TerminalNoncollapsing {kappa : โ„} (B : BasedKappaSolution kappa) : Prop := let C := B.carrier letI : TopologicalSpace C.carrier := C.topologicalSpace letI : MeasurableSpace C.carrier := C.measurableSpace letI : BorelSpace C.carrier := C.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) C.carrier := C.chartedSpace letI : IsManifold (๐“ก 3) โˆž C.carrier := C.isManifold letI : T2Space C.carrier := C.t2Space letI : T3Space C.carrier := C.t3Space letI : SecondCountableTopology C.carrier := C.secondCountable letI : ConnectedSpace C.carrier := B.connectedSpace โˆ€ rโ‚€ : โ„, 0 < rโ‚€ โ†’ โˆ€ p : C.carrier, โˆ€ r : โ„, 0 < r โ†’ r โ‰ค rโ‚€ โ†’ (โˆ€ s โˆˆ Set.Ioc (-r ^ 2) 0, โˆ€ q โˆˆ (B.flow.flow.metric 0).ball p r, |(B.flow.flow.connection s).curvatureTensorNorm q| โ‰ค rโปยน ^ 2) โ†’ ENNReal.ofReal (B.flow.kappa * r ^ 3) โ‰ค calibratedMetricVolume (B.flow.flow.metric 0) ((B.flow.flow.metric 0).ball p r) def M23TerminalCompleteAtZero {kappa : โ„} (B : BasedKappaSolution kappa) : Prop := let C := B.carrier letI : TopologicalSpace C.carrier := C.topologicalSpace letI : MeasurableSpace C.carrier := C.measurableSpace letI : BorelSpace C.carrier := C.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) C.carrier := C.chartedSpace letI : IsManifold (๐“ก 3) โˆž C.carrier := C.isManifold letI : T2Space C.carrier := C.t2Space letI : T3Space C.carrier := C.t3Space letI : SecondCountableTopology C.carrier := C.secondCountable letI : ConnectedSpace C.carrier := B.connectedSpace FlowCarrier.metricComplete C (B.flow.flow.metric 0) def M23TerminalBoundedAtZero {kappa : โ„} (B : BasedKappaSolution kappa) : Prop := let C := B.carrier letI : TopologicalSpace C.carrier := C.topologicalSpace letI : MeasurableSpace C.carrier := C.measurableSpace letI : BorelSpace C.carrier := C.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) C.carrier := C.chartedSpace letI : IsManifold (๐“ก 3) โˆž C.carrier := C.isManifold letI : T2Space C.carrier := C.t2Space letI : T3Space C.carrier := C.t3Space letI : SecondCountableTopology C.carrier := C.secondCountable letI : ConnectedSpace C.carrier := B.connectedSpace โˆƒ K : โ„, 0 โ‰ค K โˆง โˆ€ x : C.carrier, |(B.flow.flow.connection 0).curvatureTensorNorm x| โ‰ค K def M23TerminalNormalization {kappa : โ„} (B : BasedKappaSolution kappa) : Prop := let C := B.carrier letI : TopologicalSpace C.carrier := C.topologicalSpace letI : MeasurableSpace C.carrier := C.measurableSpace letI : BorelSpace C.carrier := C.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) C.carrier := C.chartedSpace letI : IsManifold (๐“ก 3) โˆž C.carrier := C.isManifold letI : T2Space C.carrier := C.t2Space letI : T3Space C.carrier := C.t3Space letI : SecondCountableTopology C.carrier := C.secondCountable letI : ConnectedSpace C.carrier := B.connectedSpace (B.flow.flow.connection 0).scalarCurvature B.base = 1 /-- Terminal metric jets use the fixed past half-space, so arbitrary values of the total representatives at positive times do not enter the derivatives. The compact sets in convergence statements are only uniform testing sets. -/ noncomputable def M23TerminalMetricJet (r : โ„•) (f : โ„ ร— EuclideanSpace โ„ (Fin 3) โ†’ โ„) (p : โ„ ร— EuclideanSpace โ„ (Fin 3)) := iteratedFDerivWithin โ„ r f (Set.Iic (0 : โ„) ร—หข Set.univ) p /-- Smooth pointed convergence including the terminal slice, through the same selected embeddings and subsequence as the interior construction. Source: Morgan--Tian Theorem 9.64, pp. 225/229; the time-zero neck/cap transfer in the proof of Theorem 9.89, pp. 240--241. -/ def M23TerminalMetricConvergence {kappa : โ„} {S : NormalizedKappaSolutionSequence kappa} (G : M23InteriorConvergence S) (e : โˆ€ j, NormalizedKappaSpacetimeEmbedding (source := S.term (G.subsequence j)) (target := G.limit) (Set.Iic 0 ร—หข G.exhaustion j)) : Prop := let C := G.limit.carrier letI : TopologicalSpace C.carrier := C.topologicalSpace letI : MeasurableSpace C.carrier := C.measurableSpace letI : BorelSpace C.carrier := C.borelSpace letI : ChartedSpace (EuclideanSpace โ„ (Fin 3)) C.carrier := C.chartedSpace letI : IsManifold (๐“ก 3) โˆž C.carrier := C.isManifold letI : T2Space C.carrier := C.t2Space letI : T3Space C.carrier := C.t3Space letI : SecondCountableTopology C.carrier := C.secondCountable letI : ConnectedSpace C.carrier := G.limit.connectedSpace โˆ€ q : C.carrier, โˆ€ j r : โ„•, โˆ€ K : Set (โ„ ร— EuclideanSpace โ„ (Fin 3)), IsCompact K โ†’ K โІ {p | p.1 โ‰ค 0 โˆง p.2 โˆˆ (extChartAt (๐“ก 3) q).target โˆง (extChartAt (๐“ก 3) q).symm p.2 โˆˆ G.exhaustion j} โ†’ โˆ€ ฮต : โ„, 0 < ฮต โ†’ โˆƒ N : โ„•, j โ‰ค N โˆง โˆ€ k โ‰ฅ N, โˆ€ a b : Fin 3, โˆ€ p โˆˆ K, โ€–M23TerminalMetricJet r (normalizedKappaPullbackCoefficient (source := S.term (G.subsequence k)) (target := G.limit) (e k) q a b) p - M23TerminalMetricJet r (FlowCarrier.coordinateCoefficient C q (fun t x v w โ†ฆ (G.limit.flow.flow.metric t).inner x v w) a b) pโ€– < ฮต structure M23TerminalExtension {kappa : โ„} {S : NormalizedKappaSolutionSequence kappa} (G : M23InteriorConvergence S) : Prop where endpoint_in_domain : โˆ€ j, ((0 : โ„), G.limit.base) โˆˆ Set.Iic 0 ร—หข G.exhaustion j terminal_embedding : โˆƒ e : โˆ€ j, NormalizedKappaSpacetimeEmbedding (source := S.term (G.subsequence j)) (target := G.limit) (Set.Iic 0 ร—หข G.exhaustion j), (โˆ€ j, (โˆ€ t โˆˆ G.time_window j, โˆ€ x โˆˆ G.exhaustion j, (e j).toFun (t, x) = (G.embedding j).toFun (t, x)) โˆง (e j).toFun (0, G.limit.base) = (0, (S.term (G.subsequence j)).base)) โˆง (โˆ€ j (s t : โ„) (x : G.limit.carrier.carrier), s โ‰ค 0 โ†’ t โ‰ค 0 โ†’ x โˆˆ G.exhaustion j โ†’ ((e j).toFun (s, x)).2 = ((e j).toFun (t, x)).2) โˆง M23TerminalMetricConvergence G e complete_at_zero : M23TerminalCompleteAtZero G.limit bounded_at_zero : M23TerminalBoundedAtZero G.limit noncollapsed_at_zero : M23TerminalNoncollapsing G.limit normalized_at_zero : M23TerminalNormalization G.limit structure RedesignNormalizedKappaCompactnessConclusion (N : NormalizedKappaCompactnessData) where convergence : M23InteriorConvergence N.sequence local_curvature_estimate : M23LocalCurvatureEstimate N.sequence all_time_curvature_control : M23AllTimeCurvatureControl N.sequence limit_bounded_curvature : M23LimitBoundedCurvature convergence.limit terminal_extension : M23TerminalExtension convergence end PoincareMT