Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Analytics.ScalarGradientTransport |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Analytics.LimitRadius |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Analytics.ObservedAnalytics |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.RegularSliceTransport |
| 5 | |
| 6 | /-! |
| 7 | # Apply the actual scalar estimates to the retained M48 history |
| 8 | |
| 9 | Every metric, connection and clock belongs to the one selected history. |
| 10 | The M12 box identity uses its literal box-flow connection; it composes with |
| 11 | the supplied M13 slice identity and M33 scalar pullback. Sources: |
| 12 | Morgan--Tian Assumptions 11.18, p. 279, and Section 17.2, pp. 409-410. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | theorem M48Predecessors.regular_box_scalar (P : M48Predecessors.{u}) |
| 25 | {F : SurgeryFlowData.{u}} {T : ℝ} {L : RepairedPreterminalSlab F T} |
| 26 | (R : M48RegularSpacetimeData L) (b : R.history.generalized.box_index) |
| 27 | (t : ℝ) (ht : t ∈ (R.history.generalized.box b).interval) |
| 28 | (x : (R.history.generalized.box b).carrier.carrier) : |
| 29 | ((R.history.generalized.box b).flow.connection t).scalarCurvature x = |
| 30 | (F.connection t).scalarCurvature |
| 31 | (R.history.history.forward t (m33BoxIntervalSubset _ b ht) |
| 32 | ((R.history.generalized.box b).forward t ht x)) := by |
| 33 | let G := R.history.generalized |
| 34 | let V := R.geometry.realization |
| 35 | let gauges := P.m12.gauges G.point Sigma.fst (EpochExtension.Spacetime.flowInterval G) |
| 36 | V.spacetime V.slices V.timeIntervals V.gaugeCover R.geometry.leafwise |
| 37 | let calculus := gauges.moving_calculus (G.box b).carrier.carrier |
| 38 | (EpochExtension.Spacetime.boxInterval G b) |
| 39 | (EpochExtension.Spacetime.originalBoxCylinder G V b).toMovingSpacetimeGauge |
| 40 | (EpochExtension.Spacetime.originalBoxMetric G V b).toMovingSpacetimeGaugeGeometry |
| 41 | (G.box b).flow.connection |
| 42 | exact (calculus.scalar_eq ⟨t, ht⟩ x).trans |
| 43 | (P.regular_scalar R t (m33BoxIntervalSubset G b ht) ((G.box b).forward t ht x)) |
| 44 | |
| 45 | namespace M48AnalyticCalibration |
| 46 | |
| 47 | variable {S : RepairedControlledSchedulesData.{u}} (A : M48AnalyticCalibration S) |
| 48 | {p : SurgeryParameterPrefix S.constants} {F : SurgeryFlowData.{u}} |
| 49 | {O : SurgeryObservation F} (hp : S.SeedCompatible p) |
| 50 | (old : SurgeryPrefixControls p F O) |
| 51 | {Q : SurgeryNoncollapseExtension.{u} p} {N : SurgeryCanonicalExtension p Q} |
| 52 | (controls : SurgeryEpochContinuationControls p F O Q N) |
| 53 | {L : RepairedPreterminalSlab F O.H} (R : M48RegularSpacetimeData L) |
| 54 | |
| 55 | include hp old controls in |
| 56 | /-- M31's directional bound on the actual selected history, without an analytic premise. -/ |
| 57 | theorem regular_gradient (t : ℝ) (ht : t ∈ R.history.generalized.interval) |
| 58 | (x : (R.history.generalized.slice t).carrier) |
| 59 | (hQ : (A.historyRadius N.rNext)⁻¹ ^ 2 ≤ |
| 60 | (R.history.generalized.connection t).scalarCurvature x) |
| 61 | (v : TangentSpace (𝓡 3) x) (hv : (R.history.generalized.metric t).inner x v v = 1) : |
| 62 | |mvfderiv (𝓡 3) (R.history.generalized.connection t).scalarCurvature x v| ≤ |
| 63 | S.calibration.analytic_constant * |
| 64 | (R.history.generalized.connection t).scalarCurvature x ^ (3 / 2 : ℝ) := by |
| 65 | apply R.history.scalar_gradient _ (A.continuation hp old controls) t ht x |
| 66 | ((A.history_threshold N.r_pos).le.trans hQ) v hv |
| 67 | intro s hs |
| 68 | exact (show s ∈ L.regularHistoryWindow.interval from R.history.interval_eq ▸ hs) |
| 69 | |
| 70 | include old in |
| 71 | theorem regular_pinched (t : ℝ) (ht : t ∈ R.history.generalized.interval) : |
| 72 | SurgeryPinchedAt (R.history.generalized.connection t) t := by |
| 73 | have htO : t ∈ surgeryObservationInterval O := |
| 74 | (show t ∈ L.regularHistoryWindow.interval from R.history.interval_eq ▸ ht) |
| 75 | exact R.history.pinched_at t ht (old.pinched t htO (O.interval_subset htO)) |
| 76 | |
| 77 | include old in |
| 78 | theorem regular_scalar_lower_bound (t : ℝ) (ht : t ∈ R.history.generalized.interval) |
| 79 | (x : (R.history.generalized.slice t).carrier) : |
| 80 | -6 ≤ (R.history.generalized.connection t).scalarCurvature x := by |
| 81 | have htO : t ∈ surgeryObservationInterval O := |
| 82 | (show t ∈ L.regularHistoryWindow.interval from R.history.interval_eq ▸ ht) |
| 83 | exact R.history.scalar_lower_bound t ht (old.pinched t htO (O.interval_subset htO)) x |
| 84 | |
| 85 | include hp old controls in |
| 86 | theorem frontier_history_scale |
| 87 | (hstart : surgeryEpochStart p.i ≤ O.H) |
| 88 | (hend : O.H < surgeryEpochStart (p.i + 1)) : |
| 89 | F.parameters.r O.H = N.rNext ∧ |
| 90 | F.parameters.h O.H = S.setup.selector.h |
| 91 | (F.parameters.delta O.H * N.rNext) (F.parameters.delta O.H) ∧ |
| 92 | F.parameters.delta O.H * N.rNext < A.historyRadius N.rNext := by |
| 93 | have h := A.frontier_scale hp old controls hstart hend |
| 94 | refine ⟨h.1, h.2.1, A.cut_scale_lt_historyRadius old hp N.r_pos ?_ O.H O.H_pos.le⟩ |
| 95 | exact N.r_le_last.trans ((p.r_le_epsilon _).trans_eq |
| 96 | (congrArg SurgeryControlSetup.epsilon hp.setup_eq)) |
| 97 | |
| 98 | end M48AnalyticCalibration |
| 99 | |
| 100 | end PoincareMT |