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.Continuation.NonemptyData |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.VanishingData |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Definitions/M43UnifiedContinuation.lean` at |
| 6 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. Declaration bodies are retained; |
| 7 | see `references/ricci-flow/mapher/surgery-adapters-port.json`. |
| 8 | -/ |
| 9 | |
| 10 | /-! |
| 11 | # M43 repaired unified continuation data |
| 12 | |
| 13 | The unified output stores exactly one branch certificate. A `Sum` keeps the |
| 14 | nonempty and whole-slice-vanishing alternatives constructor-disjoint while |
| 15 | preserving the detailed branch data for downstream schedule rows. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | structure RepairedUnifiedContinuationData |
| 27 | {F : SurgeryFlowData.{u}} {T : ℝ} |
| 28 | (I : RepairedContinuationInput F T) |
| 29 | (branch : RepairedBranchContinuationData I) where |
| 30 | terminal : Sum (RepairedNonemptyContinuationData I branch) |
| 31 | (RepairedVanishingContinuationData I branch) |
| 32 | |
| 33 | end PoincareMT |