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 Mathlib.Data.ENNReal.Basic |
| 2 | |
| 3 | /-! |
| 4 | # Supremum continuation of an attainable horizon |
| 5 | |
| 6 | An attainable positive horizon that is closed under cofinal limits and can |
| 7 | be strictly extended below the target reaches the target. The supremum is |
| 8 | taken in the extended nonnegative reals, so the target may be infinite. |
| 9 | The analytic closure and extension hypotheses are separate obligations in |
| 10 | the application to Morgan--Tian Theorem 11.8, pp. 272--279. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped ENNReal |
| 17 | |
| 18 | namespace PoincareMT.M30 |
| 19 | |
| 20 | /-- A positive seed, cofinal-limit closure, and strict extension below the |
| 21 | target imply attainability of the entire target horizon. -/ |
| 22 | theorem horizon_of_seed_cofinal_closure_and_extension |
| 23 | (P : ℝ≥0∞ → Prop) {T0 : ℝ≥0∞} |
| 24 | (hseed : ∃ T, 0 < T ∧ T ≤ T0 ∧ P T) |
| 25 | (hclosed : ∀ T, 0 < T → T ≤ T0 → |
| 26 | (∀ t < T, ∃ U, t < U ∧ U ≤ T ∧ P U) → P T) |
| 27 | (hextend : ∀ T, 0 < T → T < T0 → P T → |
| 28 | ∃ U, T < U ∧ U ≤ T0 ∧ P U) : P T0 := by |
| 29 | let A : Set ℝ≥0∞ := {T | 0 < T ∧ T ≤ T0 ∧ P T} |
| 30 | let Tstar := sSup A |
| 31 | obtain ⟨Tseed, hTseed, hTseedT0, hPseed⟩ := hseed |
| 32 | have hseedA : Tseed ∈ A := ⟨hTseed, hTseedT0, hPseed⟩ |
| 33 | have hstarPos : 0 < Tstar := hTseed.trans_le (le_sSup hseedA) |
| 34 | have hstarLe : Tstar ≤ T0 := sSup_le fun _ h => h.2.1 |
| 35 | have hPstar : P Tstar := by |
| 36 | apply hclosed Tstar hstarPos hstarLe |
| 37 | intro t ht |
| 38 | obtain ⟨U, hUA, htU⟩ := lt_sSup_iff.mp ht |
| 39 | exact ⟨U, htU, le_sSup hUA, hUA.2.2⟩ |
| 40 | have hstarEq : Tstar = T0 := by |
| 41 | by_contra hne |
| 42 | obtain ⟨U, hstarU, hUT0, hPU⟩ := |
| 43 | hextend Tstar hstarPos (lt_of_le_of_ne hstarLe hne) hPstar |
| 44 | have hUA : U ∈ A := ⟨hstarPos.trans hstarU, hUT0, hPU⟩ |
| 45 | exact (not_lt_of_ge (le_sSup hUA)) hstarU |
| 46 | exact hstarEq ▸ hPstar |
| 47 | |
| 48 | end PoincareMT.M30 |