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.CanonicalInduction.Terminal.Common.TerminalCommonIntervalSlabs |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.CanonicalTheory |
| 3 | |
| 4 | /-! |
| 5 | # The maximal controlled open-left horizon |
| 6 | |
| 7 | The supremum is over durations, never over curvature bounds. Its positive |
| 8 | initial slab, actual compactness and actual terminal volume are upstream |
| 9 | outputs, not additional M47 entry premises. Source: common-interval C5. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Topology ENNReal |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M47 |
| 20 | |
| 21 | /-- The controlled horizon is defined even before its positivity is proved. -/ |
| 22 | noncomputable def terminalCommonIntervalHorizon (V : GeneralizedBlowupSequence.{u}) : |
| 23 | ℝ≥0∞ := sSup (TerminalCommonIntervalHorizons V) |
| 24 | |
| 25 | /-- Each strictly smaller slab is supplied by one member of the supremum. -/ |
| 26 | theorem terminalCommonInterval_horizon_mem (V : GeneralizedBlowupSequence.{u}) : |
| 27 | terminalCommonIntervalHorizon V ∈ TerminalCommonIntervalHorizons V := by |
| 28 | intro T hT hTH |
| 29 | obtain ⟨H, hH, hTH'⟩ := lt_sSup_iff.mp hTH |
| 30 | exact hH T hT hTH' |
| 31 | |
| 32 | /-- The actual first common slab makes the maximal horizon positive. -/ |
| 33 | theorem terminalCommonInterval_horizon_pos |
| 34 | {V : GeneralizedBlowupSequence.{u}} {delta : ℝ} (hdelta : 0 < delta) |
| 35 | (hslab : TerminalCommonIntervalSlab V delta) : |
| 36 | 0 < terminalCommonIntervalHorizon V := by |
| 37 | have hmem : ENNReal.ofReal delta ∈ TerminalCommonIntervalHorizons V := by |
| 38 | intro T _hT hTd |
| 39 | exact terminalCommonInterval_slab_mono hslab |
| 40 | ((ENNReal.ofReal_lt_ofReal_iff hdelta).mp hTd).le |
| 41 | exact (ENNReal.ofReal_pos.mpr hdelta).trans_le (le_sSup hmem) |
| 42 | |
| 43 | /-- Countable decision makes the entire maximal horizon refinement-stable. -/ |
| 44 | theorem terminalCommonInterval_horizon_reindex |
| 45 | {V : GeneralizedBlowupSequence.{u}} (hdec : TerminalCommonIntervalDecided V) |
| 46 | {sigma : ℕ → ℕ} (hsigma : StrictMono sigma) : |
| 47 | terminalCommonIntervalHorizon (terminalCommonInterval_reindex V sigma hsigma) = |
| 48 | terminalCommonIntervalHorizon V := by |
| 49 | unfold terminalCommonIntervalHorizon |
| 50 | rw [terminalCommonInterval_horizons_reindex hdec hsigma] |
| 51 | |
| 52 | /-- Assemble the literal M30 controls from the actual three upstream outputs. -/ |
| 53 | theorem terminalCommonInterval_maximalControls |
| 54 | (V : GeneralizedBlowupSequence.{u}) {delta : ℝ} (hdelta : 0 < delta) |
| 55 | (hslab : TerminalCommonIntervalSlab V delta) |
| 56 | (hcompact : BlowupBaseBallsCompact V) |
| 57 | (hvolume : ∃ rho v : ℝ, 0 < rho ∧ 0 < v ∧ ∀ᶠ k in atTop, |
| 58 | ENNReal.ofReal (v / (Real.sqrt (V.scale k)) ^ 3) ≤ |
| 59 | calibratedMetricVolume ((V.flow k).metric (V.base k).1) (V.baseBall k rho)) : |
| 60 | M30GeometricLongControls V (terminalCommonIntervalHorizon V) := { |
| 61 | horizon_pos := terminalCommonInterval_horizon_pos hdelta hslab |
| 62 | balls_compact := hcompact |
| 63 | terminal_volume := hvolume |
| 64 | cylinders := terminalCommonInterval_horizon_mem V } |
| 65 | |
| 66 | /-- Reindex every M30 field on the same actual selected family. -/ |
| 67 | theorem terminalCommonInterval_reindexControls |
| 68 | {V : GeneralizedBlowupSequence.{u}} {H : ℝ≥0∞} |
| 69 | (C : M30GeometricLongControls V H) |
| 70 | {sigma : ℕ → ℕ} (hsigma : StrictMono sigma) : |
| 71 | M30GeometricLongControls (terminalCommonInterval_reindex V sigma hsigma) H := { |
| 72 | horizon_pos := C.horizon_pos |
| 73 | balls_compact := terminalCommonInterval_reindex_compact C.balls_compact hsigma |
| 74 | terminal_volume := by |
| 75 | obtain ⟨rho, v, hrho, hv, hc⟩ := C.terminal_volume |
| 76 | exact ⟨rho, v, hrho, hv, hsigma.tendsto_atTop.eventually hc⟩ |
| 77 | cylinders := fun T hT hTH => |
| 78 | terminalCommonInterval_slab_reindex (C.cylinders T hT hTH) hsigma } |
| 79 | |
| 80 | /-- No subsequent strict selection can have a larger controlled horizon. -/ |
| 81 | theorem terminalCommonInterval_maximal |
| 82 | {V : GeneralizedBlowupSequence.{u}} (hdec : TerminalCommonIntervalDecided V) |
| 83 | {sigma : ℕ → ℕ} (hsigma : StrictMono sigma) {H : ℝ≥0∞} |
| 84 | (C : M30GeometricLongControls (terminalCommonInterval_reindex V sigma hsigma) H) : |
| 85 | H ≤ terminalCommonIntervalHorizon V := by |
| 86 | have hmem : H ∈ TerminalCommonIntervalHorizons |
| 87 | (terminalCommonInterval_reindex V sigma hsigma) := C.cylinders |
| 88 | rw [terminalCommonInterval_horizons_reindex hdec hsigma] at hmem |
| 89 | exact le_sSup hmem |
| 90 | |
| 91 | /-- Apply the literal M30 field once, after constructing all three controls. |
| 92 | The selected limit, maps and metric jets survive composition unchanged. -/ |
| 93 | theorem terminalCommonInterval_extract |
| 94 | (P : M47Predecessors.{u}) (V : GeneralizedBlowupSequence.{u}) |
| 95 | {sigma : ℕ → ℕ} (hsigma : StrictMono sigma) {delta : ℝ} (hdelta : 0 < delta) |
| 96 | (hslab : TerminalCommonIntervalSlab |
| 97 | (terminalCommonInterval_reindex V sigma hsigma) delta) |
| 98 | (hcompact : BlowupBaseBallsCompact (terminalCommonInterval_reindex V sigma hsigma)) |
| 99 | (hvolume : ∃ rho v : ℝ, 0 < rho ∧ 0 < v ∧ ∀ᶠ k in atTop, |
| 100 | ENNReal.ofReal (v / (Real.sqrt (V.scale (sigma k))) ^ 3) ≤ |
| 101 | calibratedMetricVolume ((V.flow (sigma k)).metric (V.base (sigma k)).1) |
| 102 | (V.baseBall (sigma k) rho)) : |
| 103 | Nonempty (GeneralizedBlowupConvergence V (blowupBackwardInterval |
| 104 | (terminalCommonIntervalHorizon (terminalCommonInterval_reindex V sigma hsigma)))) := by |
| 105 | let D := terminalCommonInterval_reindex V sigma hsigma |
| 106 | let C := terminalCommonInterval_maximalControls D hdelta hslab hcompact hvolume |
| 107 | obtain ⟨G⟩ := P.geometric_limits D (terminalCommonIntervalHorizon D) C |
| 108 | exact ⟨terminalCommonInterval_compSubsequence hsigma G⟩ |
| 109 | |
| 110 | /-- Decide the actual tests, construct the maximal controls, and extract one |
| 111 | limit. The three geometric inputs are the prior C3, compactness and N7 outputs. -/ |
| 112 | theorem terminalCommonInterval_select_and_extract |
| 113 | (P : M47Predecessors.{u}) (V : GeneralizedBlowupSequence.{u}) |
| 114 | {delta : ℝ} (hdelta : 0 < delta) (hslab : TerminalCommonIntervalSlab V delta) |
| 115 | (hcompact : BlowupBaseBallsCompact V) |
| 116 | (hvolume : ∃ rho v : ℝ, 0 < rho ∧ 0 < v ∧ ∀ᶠ k in atTop, |
| 117 | ENNReal.ofReal (v / (Real.sqrt (V.scale k)) ^ 3) ≤ |
| 118 | calibratedMetricVolume ((V.flow k).metric (V.base k).1) (V.baseBall k rho)) : |
| 119 | ∃ (sigma : ℕ → ℕ) (hsigma : StrictMono sigma), |
| 120 | TerminalCommonIntervalDecided (terminalCommonInterval_reindex V sigma hsigma) ∧ |
| 121 | 0 < terminalCommonIntervalHorizon (terminalCommonInterval_reindex V sigma hsigma) ∧ |
| 122 | (∀ (rho : ℕ → ℕ) (hrho : StrictMono rho) (H : ℝ≥0∞), |
| 123 | M30GeometricLongControls (terminalCommonInterval_reindex |
| 124 | (terminalCommonInterval_reindex V sigma hsigma) rho hrho) H → |
| 125 | H ≤ terminalCommonIntervalHorizon (terminalCommonInterval_reindex V sigma hsigma)) ∧ |
| 126 | Nonempty (GeneralizedBlowupConvergence V (blowupBackwardInterval |
| 127 | (terminalCommonIntervalHorizon (terminalCommonInterval_reindex V sigma hsigma)))) := by |
| 128 | obtain ⟨sigma, hsigma, hdec⟩ := terminalCommonInterval_exists_decided V |
| 129 | have hslab' := terminalCommonInterval_slab_reindex hslab hsigma |
| 130 | have hcompact' := terminalCommonInterval_reindex_compact hcompact hsigma |
| 131 | have hvolume' : ∃ rho v : ℝ, 0 < rho ∧ 0 < v ∧ ∀ᶠ k in atTop, |
| 132 | ENNReal.ofReal (v / (Real.sqrt (V.scale (sigma k))) ^ 3) ≤ |
| 133 | calibratedMetricVolume ((V.flow (sigma k)).metric (V.base (sigma k)).1) |
| 134 | (V.baseBall (sigma k) rho) := by |
| 135 | obtain ⟨rho, v, hrho, hv, hc⟩ := hvolume |
| 136 | exact ⟨rho, v, hrho, hv, hsigma.tendsto_atTop.eventually hc⟩ |
| 137 | exact ⟨sigma, hsigma, hdec, terminalCommonInterval_horizon_pos hdelta hslab', |
| 138 | fun _ hrho _ C => terminalCommonInterval_maximal hdec hrho C, |
| 139 | terminalCommonInterval_extract P V hsigma hdelta hslab' hcompact' hvolume'⟩ |
| 140 | |
| 141 | end PoincareMT.M47 |