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.Spacetime.GeneralizedBoxMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Gauge.Geometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Intrinsic Ricci geometry of the actual generalized-flow atlas |
| 7 | |
| 8 | Use the checked M11 interval realization. M12's cover converse uses the |
| 9 | original box flows, metrics, connections and within-time equations; it |
| 10 | produces the intrinsic equation on this same spacetime. The M14 transport |
| 11 | is a checked projection, not an additional geometric hypothesis. |
| 12 | Source: Morgan--Tian Definitions 3.34-3.38 and Remark 3.37, pp. 59-61. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.EpochExtension.Spacetime |
| 23 | |
| 24 | variable (F : GeneralizedRicciFlowData.{u}) |
| 25 | |
| 26 | /-- One selected spacetime with exact original-slice identifications and PDE. -/ |
| 27 | structure FlowBoxRicciGeometry where |
| 28 | realization : GeneralizedFlowCarrierConclusionWithInterval (flowBoxAtlas F) |
| 29 | sliceIdentification : ∀ t, |
| 30 | SpacetimeSliceIdentification realization.spacetime t (realization.slices t) |
| 31 | (flowSliceLabel F t) |
| 32 | leafwise : LeafwiseLeviCivitaFamily realization.spacetime realization.slices |
| 33 | equation : IntrinsicGeneralizedRicciEquation leafwise |
| 34 | |
| 35 | theorem originalBoxes_cover (R : GeneralizedFlowCarrierConclusionWithInterval (flowBoxAtlas F)) : |
| 36 | ∀ p : R.spacetime.Point, ∃ b, |
| 37 | ∃ q : (R.timeIntervals.interval (boxInterval F b)).Point × (F.box b).carrier.carrier, |
| 38 | (originalBoxCylinder F R b).toSpacetime q = p := by |
| 39 | rintro ⟨t, x⟩ |
| 40 | obtain ⟨b, ht, y, hy⟩ := F.box_covers t x |
| 41 | exact ⟨b, (⟨t, ht⟩, y), congrArg (fun z => (⟨t, z⟩ : F.point)) hy⟩ |
| 42 | |
| 43 | /-- The original ordinary equations imply the intrinsic equation on any |
| 44 | selected realization and its supplied M12 leafwise connection. -/ |
| 45 | theorem originalBoxes_ricciEquation |
| 46 | (R : GeneralizedFlowCarrierConclusionWithInterval (flowBoxAtlas F)) |
| 47 | (D : LeafwiseLeviCivitaFamily R.spacetime R.slices) |
| 48 | (h : GeneralizedRicciGaugeTheory.{u} 3) : |
| 49 | IntrinsicGeneralizedRicciEquation D := by |
| 50 | have G := h.gauges F.point Sigma.fst (flowInterval F) R.spacetime R.slices |
| 51 | R.timeIntervals R.gaugeCover D |
| 52 | exact G.cover_converse F.box_index (fun b => (F.box b).carrier.carrier) |
| 53 | (boxInterval F) (originalBoxCylinder F R) (originalBoxMetric F R) |
| 54 | (fun b => (F.box b).flow.connection) (originalBoxes_cover F R) |
| 55 | (fun b => (F.box b).flow.equation) |
| 56 | |
| 57 | /-- Every generalized flow with the specified boxes has the same-carrier |
| 58 | M11/M12 realization. Both predecessor services are explicitly supplied. -/ |
| 59 | theorem flowBoxRicciGeometry |
| 60 | (hM11 : GeneralizedSpacetimeGeometryTheory.{u} 3) |
| 61 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) : Nonempty (FlowBoxRicciGeometry F) := by |
| 62 | classical |
| 63 | obtain ⟨R⟩ := flowBoxAtlas_realize F hM11 |
| 64 | obtain ⟨D⟩ := (hM12.leafwise_calculus F.point Sigma.fst (flowInterval F) |
| 65 | R.spacetime R.slices R.timeIntervals R.gaugeCover).1 |
| 66 | exact ⟨⟨R, fun t => Classical.choice (flowSlice_identification F R t), D, |
| 67 | originalBoxes_ricciEquation F R D hM12⟩⟩ |
| 68 | |
| 69 | /-- The transport used by L-geometry retains the selected spacetime exactly. -/ |
| 70 | noncomputable def FlowBoxRicciGeometry.toLGeometry (G : FlowBoxRicciGeometry F) : |
| 71 | GeneralizedLGeometryTransport 3 F.point Sigma.fst (flowInterval F) where |
| 72 | spacetime := G.realization.spacetime |
| 73 | slices := G.realization.slices |
| 74 | timeIntervals := G.realization.timeIntervals |
| 75 | gaugeCover := G.realization.gaugeCover |
| 76 | leafwise := G.leafwise |
| 77 | ricciEquation := G.equation |
| 78 | |
| 79 | end PoincareMT.EpochExtension.Spacetime |