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.Volume.Surgery.Finiteness.EventCount |
| 2 | |
| 3 | /-! |
| 4 | Adapted from Mapher `PoincareMT/Proofs/M50/Sec17_2_NoAccumulation.lean` at |
| 5 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 6 | |
| 7 | # Compact-set finiteness of surgery times |
| 8 | |
| 9 | Morgan-Tian Section 17.2, p. 411, concludes that surgery times cannot |
| 10 | accumulate in finite time. A horizon bound for the exact certificate |
| 11 | controls every compact set, whether or not its endpoints are in the domain. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.SurgeryFiniteness |
| 21 | |
| 22 | /-- Finite horizon counts give compact-set finiteness for the same raw |
| 23 | flow and exact certificate (MT Section 17.2, p. 411; M50 derivation 01). -/ |
| 24 | theorem surgery_times_inter_compact_finite |
| 25 | (F : SurgeryFlowData.{u}) (C : RepairedVolumeLossControls F) |
| 26 | (V : RepairedVolumeLossData F C) (K : Set ℝ) (hK : IsCompact K) : |
| 27 | (F.surgery_times ∩ K).Finite := by |
| 28 | obtain ⟨B, hB⟩ := hK.bddAbove |
| 29 | apply (surgery_times_inter_Icc_finite F C V (max 0 B) (le_max_left _ _)).subset |
| 30 | intro T hT |
| 31 | exact ⟨hT.1, F.time_domain_nonnegative (F.surgery_times_subset hT.1), |
| 32 | (hB hT.2).trans (le_max_right _ _)⟩ |
| 33 | |
| 34 | end PoincareMT.SurgeryFiniteness |