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.Branch |
| 2 | |
| 3 | /-! |
| 4 | Adapted from Mapher `PoincareMT/Definitions/M41NonemptyContinuation.lean` at |
| 5 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. Declaration bodies are retained; |
| 6 | see `references/ricci-flow/mapher/surgery-adapters-port.json`. |
| 7 | -/ |
| 8 | |
| 9 | /-! |
| 10 | # M41 repaired nonempty-terminal continuation data |
| 11 | |
| 12 | This branch wrapper selects the nonempty terminal operation from the full |
| 13 | continuation output and keeps the continued carrier and transported surgery |
| 14 | event available to later rows. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | structure RepairedNonemptyContinuationData |
| 26 | {F : SurgeryFlowData.{u}} {T : ℝ} |
| 27 | (I : RepairedContinuationInput F T) |
| 28 | (branch : RepairedBranchContinuationData I) where |
| 29 | continued_nonempty : Nonempty (branch.conclusion.extension.extended.slice T).carrier |
| 30 | operation : RepairedNonemptyTerminalOperationCertificate I |
| 31 | branch.conclusion.extension branch.conclusion.surgery_at_terminal |
| 32 | continued_nonempty |
| 33 | operation_eq : branch.conclusion.terminal_operation = |
| 34 | RepairedTerminalOperation.nonempty continued_nonempty operation |
| 35 | post_terminal_interval : ∃ d : ℝ, 0 < d ∧ |
| 36 | Set.Ioo T (T + d) ⊆ branch.conclusion.extension.extended.time_domain ∧ |
| 37 | Disjoint branch.conclusion.extension.extended.surgery_times (Set.Ioo T (T + d)) |
| 38 | continued_admissible : SurgeryFlowAdmissible branch.conclusion.extension.extended |
| 39 | continued_pinched : SurgeryFlowPinched branch.conclusion.extension.extended |
| 40 | |
| 41 | end PoincareMT |