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.Construction.OldEventPolicy |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.TerminalPolicy |
| 3 | |
| 4 | /-! |
| 5 | # Terminal policy throughout the M33 continuation |
| 6 | |
| 7 | Definition 15.8 attaches one surgery and its maximal ordinary continuation. |
| 8 | Old-event policy follows from literal geometric preservation, frontier policy |
| 9 | from the constructed terminal operation, and there are no later events. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT |
| 17 | |
| 18 | /-- Source-faithful old events and the constructed frontier give the terminal |
| 19 | policy on the entire returned domain, without a policy-preservation premise. -/ |
| 20 | theorem RepairedContinuationConclusion.terminalPolicy |
| 21 | {F : SurgeryFlowData.{u}} {T : Real} |
| 22 | {I : RepairedContinuationInput F T} |
| 23 | (D : RepairedContinuationConclusion I) |
| 24 | (policy : SurgeryFlowTerminalPolicyOn F F.time_domain) : |
| 25 | SurgeryFlowTerminalPolicyOn D.extension.extended D.extension.extended.time_domain := by |
| 26 | have old := D.old_event_data.transportPolicy (Set.Subset.refl _) policy |
| 27 | have frontier := D.terminal_operation.singletonTerminalPolicy |
| 28 | have event_location : ∀ t ∈ D.extension.extended.time_domain, |
| 29 | t ∈ D.extension.extended.surgery_times → t ∈ F.time_domain ∨ t = T := by |
| 30 | intro t ht hs |
| 31 | have hle : t ≤ T := le_of_not_gt (fun hgt => D.no_later_surgery t ht hgt hs) |
| 32 | rcases lt_or_eq_of_le hle with hlt | heq |
| 33 | · left |
| 34 | rw [I.time_domain_eq] |
| 35 | exact ⟨D.extension.extended.time_domain_nonnegative ht, hlt⟩ |
| 36 | · exact Or.inr heq |
| 37 | constructor |
| 38 | · intro t ht hs hpost |
| 39 | rcases event_location t ht hs with hold | heq |
| 40 | · exact old.nonempty t hold hs |
| 41 | · exact frontier.nonempty t (Set.mem_singleton_iff.mpr heq) hs |
| 42 | · intro t ht hs hempty |
| 43 | rcases event_location t ht hs with hold | heq |
| 44 | · exact old.vanishing t hold hs |
| 45 | · exact frontier.vanishing t (Set.mem_singleton_iff.mpr heq) hs |
| 46 | |
| 47 | end PoincareMT |