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.StandardCap.Existence.Construction.Flow.PartialFlowUnion |
| 2 | import Mathlib.Order.Zorn |
| 3 | |
| 4 | /-! |
| 5 | # Maximal continuation under a universal finite lifetime bound |
| 6 | |
| 7 | The relation form of Zorn avoids identifying total records outside their |
| 8 | included domains. This isolates the order-theoretic step in Morgan-Tian |
| 9 | Definition 12.4 and Theorem 12.5, pp. 295-297. The universal analytic |
| 10 | lifetime bound is an explicit hypothesis, not a conclusion of this file. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | |
| 17 | namespace PoincareMT.M34 |
| 18 | |
| 19 | /-- A first partial flow and a universal finite upper bound on all partial |
| 20 | lifetimes give a maximal flow in the exact frozen sense |
| 21 | (Definition 12.4 and Theorem 12.5, pp. 295-297). -/ |
| 22 | theorem maximalStandardCapFlow_exists_of_bounded_lifetimes |
| 23 | {g0 : StandardInitialMetric} (F0 : PartialStandardCapFlow g0) |
| 24 | {B : ℝ} (hB : ∀ F : PartialStandardCapFlow g0, F.lifetime ≤ B) : |
| 25 | Nonempty (MaximalStandardCapFlow g0) := by |
| 26 | let : Nonempty (PartialStandardCapFlow g0) := ⟨F0⟩ |
| 27 | have hchains : ∀ c : Set (PartialStandardCapFlow g0), IsChain partialFlowLE c → |
| 28 | c.Nonempty → ∃ G, ∀ F ∈ c, partialFlowLE F G := by |
| 29 | intro c hc hne |
| 30 | have hbdd : BddAbove ((fun F : PartialStandardCapFlow g0 => F.lifetime) '' c) := by |
| 31 | refine ⟨B, ?_⟩ |
| 32 | rintro T ⟨F, _hF, rfl⟩ |
| 33 | exact hB F |
| 34 | obtain ⟨G, _hGtime, hG⟩ := partialFlowChain_has_upper_bound hc hne hbdd |
| 35 | exact ⟨G, hG⟩ |
| 36 | obtain ⟨F, hF⟩ := exists_maximal_of_nonempty_chains_bounded hchains |
| 37 | (fun hFG hGH => partialFlowLE_trans hFG hGH) |
| 38 | refine ⟨⟨F, ?_⟩⟩ |
| 39 | intro T ⟨E⟩ |
| 40 | have hback := hF (partialFlowOfExtension E) (partialFlowLE_extension E) |
| 41 | exact (not_lt_of_ge hback.1) E.lifetime_gt |
| 42 | |
| 43 | end PoincareMT.M34 |