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 | # Nonemptiness before a singular restart |
| 5 | |
| 6 | Curvature blow-up forces a nonempty last ordinary slab. Permanence of |
| 7 | extinction then excludes empty slices anywhere in the earlier flow. |
| 8 | Source: Morgan--Tian, Definition 15.8, p. 362. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | namespace PoincareMT |
| 16 | |
| 17 | theorem RepairedPreterminalSlab.start_nonempty |
| 18 | {F : SurgeryFlowData.{u}} {T : ℝ} (A : RepairedPreterminalSlab F T) : |
| 19 | Nonempty (F.slice A.start).carrier := by |
| 20 | obtain ⟨t, ht, x, hx⟩ := A.curvature_unbounded 0 A.start A.start_lt |
| 21 | exact ⟨x⟩ |
| 22 | |
| 23 | /-- A finite singular input has no extinct slice in its entire earlier history. -/ |
| 24 | theorem RepairedContinuationInput.slices_nonempty |
| 25 | {F : SurgeryFlowData.{u}} {T : ℝ} (I : RepairedContinuationInput F T) |
| 26 | (t : ℝ) (ht : t ∈ F.time_domain) : Nonempty (F.slice t).carrier := by |
| 27 | classical |
| 28 | have htT : t < T := (I.time_domain_eq ▸ ht).2 |
| 29 | rcases le_total I.last_slab.start t with hst | hts |
| 30 | · obtain ⟨x⟩ := I.last_slab.start_nonempty |
| 31 | exact ⟨I.last_slab.identify ⟨t, hst, htT⟩ x⟩ |
| 32 | · by_contra hempty |
| 33 | let : IsEmpty (F.slice t).carrier := not_nonempty_iff.mp hempty |
| 34 | let := F.extinction_permanent t I.last_slab.start ht I.last_slab.start_mem hts |
| 35 | (inferInstance : IsEmpty (F.slice t).carrier) |
| 36 | obtain ⟨x⟩ := I.last_slab.start_nonempty |
| 37 | exact isEmptyElim x |
| 38 | |
| 39 | end PoincareMT |