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.Regular.TerminalRegularFiniteCapBudget |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularRetainedCeiling |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularCommonApplication |
| 4 | |
| 5 | /-! |
| 6 | # The actual decided maximal first-failure family |
| 7 | |
| 8 | The finite cap budgets and preliminary sources precede the family. Its |
| 9 | terminal geometry gives a positive common slab before M30 is called. |
| 10 | The original bad points, buffered volume and cap services survive every |
| 11 | subsequent selection. MT Proposition 17.1, pp. 395-408; |
| 12 | induction-maximal-counterexample.md, MC1-MC3. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Topology ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | /-- A failed canonical extension supplies one actual decided maximal |
| 26 | family, retaining all physical inputs needed by both horizon cases. -/ |
| 27 | theorem exists_maximal_regular_counterexample |
| 28 | (P : M47Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) |
| 29 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) |
| 30 | (N : RepairedNoncollapseInductionData S) |
| 31 | (p : SurgeryParameterPrefix S.constants) (hp : S.SeedCompatible p) |
| 32 | (hno : ¬ Nonempty (SurgeryCanonicalExtension p (Classical.choice (N.induction p hp)))) : |
| 33 | ∃ kappa : ℝ, 0 < kappa ∧ |
| 34 | ∃ (r : ℕ → ℝ) (F : ℕ → SurgeryFlowData.{u}) (O : ∀ n, SurgeryObservation (F n)) |
| 35 | (t : ℕ → ℝ) (W : ∀ n, M33RegularHistoryWindow (F n)) |
| 36 | (history : ∀ n, M33RegularHistoryData (W n)) |
| 37 | (ht : ∀ n, t n ∈ (history n).generalized.interval) |
| 38 | (x : ∀ n, ((history n).generalized.slice (t n)).carrier), |
| 39 | ∃ (hPositive : ∀ n, 0 < ((F n).connection (t n)).scalarCurvature |
| 40 | ((history n).history.forward (t n) (ht n) (x n))) |
| 41 | (hDiverges : Tendsto (fun n => ((F n).connection (t n)).scalarCurvature |
| 42 | ((history n).history.forward (t n) (ht n) (x n))) atTop atTop), |
| 43 | let V := regularHistoryBlowupSequence F W history t ht x hPositive hDiverges |
| 44 | (∀ n, SurgeryPrefixControls p (F n) (O n) ∧ |
| 45 | t n ∈ Ico (surgeryEpochStart p.i) (O n).H ∧ |
| 46 | SurgeryFlowPinched (F n) ∧ |
| 47 | SurgeryCanonicalOn (F n) (Ico 0 (t n)) (r n) ∧ |
| 48 | (r n)⁻¹ ^ 2 ≤ V.scale n ∧ |
| 49 | ¬ SurgeryCanonicalControl (F n) (t n) |
| 50 | ((history n).history.forward (t n) (ht n) (x n)) |
| 51 | (F n).parameters.epsilon (F n).parameters.C ∧ |
| 52 | SurgeryVolumeControlOn (F n) (Icc (surgeryEpochStart p.i - 1 / 128) (t n)) kappa |
| 53 | (fun _ _ => True) ∧ |
| 54 | ∀ s ∈ surgeryObservationInterval (O n) ∩ |
| 55 | Ico (surgeryEpochStart (p.i - 1)) (O n).H, |
| 56 | (F n).parameters.delta s ≤ B.delta S.setup.standard_initial S.constants) ∧ |
| 57 | (∀ (sigma : ℕ → ℕ), StrictMono sigma → ∀ j : ℕ, ∀ᶠ k in atTop, |
| 58 | ∀ (C : GeneralizedSliceCarrier.{u}) {U : Set C.carrier}, IsOpen U → |
| 59 | ∀ {a : ℝ} (ha : a ∈ Ico (-((j : ℝ) + 1)) 0), |
| 60 | ∀ E : SurgeryFlowCylinder (F (sigma k)) C (t (sigma k)) |
| 61 | (V.scale (sigma k)) (Icc a 0) U, |
| 62 | (∀ s (hs : s ∈ Icc a 0), ∀ z ∈ U, |
| 63 | ((F (sigma k)).connection (t (sigma k) + s / V.scale (sigma k))).scalarCurvature |
| 64 | (E.forward s hs z) ≤ ((j : ℝ) + 1) * V.scale (sigma k)) → |
| 65 | let bottom : a ∈ Icc a 0 := ⟨le_rfl, ha.2.le⟩ |
| 66 | let zero : (0 : ℝ) ∈ Icc a 0 := ⟨ha.2.le, le_rfl⟩ |
| 67 | let tbirth := t (sigma k) + a / V.scale (sigma k) |
| 68 | ∀ (hEvent : tbirth ∈ (F (sigma k)).surgery_times), |
| 69 | ∀ [Nonempty ((F (sigma k)).slice tbirth).carrier], |
| 70 | ∀ (i : Fin ((F (sigma k)).event tbirth hEvent).cap_count) (contact : C.carrier), |
| 71 | contact ∈ U → |
| 72 | E.forward a bottom contact ∈ (((F (sigma k)).event tbirth hEvent).caps i).carrier → |
| 73 | (∀ z ∈ U, ((F (sigma k)).metric tbirth).edist |
| 74 | (E.forward a bottom contact) (E.forward a bottom z) ≤ |
| 75 | ENNReal.ofReal (((j : ℝ) + 1) / Real.sqrt (V.scale (sigma k)))) → |
| 76 | ∀ y ∈ U, |
| 77 | ((F (sigma k)).connection (t (sigma k) + 0 / V.scale (sigma k))).scalarCurvature |
| 78 | (E.forward 0 zero y) = V.scale (sigma k) → |
| 79 | SurgeryCanonicalControl (F (sigma k)) (t (sigma k) + 0 / V.scale (sigma k)) |
| 80 | (E.forward 0 zero y) (F (sigma k)).parameters.epsilon |
| 81 | (F (sigma k)).parameters.C) ∧ |
| 82 | ∃ (rho : ℕ → ℕ) (hrho : StrictMono rho), |
| 83 | let D := terminalCommonInterval_reindex V rho hrho |
| 84 | TerminalCommonIntervalDecided D ∧ |
| 85 | M30GeometricLongControls D (terminalCommonIntervalHorizon D) ∧ |
| 86 | Nonempty (GeneralizedBlowupConvergence D |
| 87 | (blowupBackwardInterval (terminalCommonIntervalHorizon D))) := by |
| 88 | classical |
| 89 | let A : ℕ → ℝ := fun j => (j : ℝ) + 1 |
| 90 | have hA : ∀ j, 0 < A j := fun j => by dsimp [A]; positivity |
| 91 | obtain ⟨kappa, hkappa, tau, K, duration, hsourceConstants, hDuration, sequence⟩ := |
| 92 | terminalSource_exists_regular_sequence_finite_cap_budget P S B N p hp A hA hno |
| 93 | obtain ⟨n0, r, delta, F, O, t, W, history, ht, x, hPositive, hDiverges, |
| 94 | _hrlim, hdlim, hdata, volume, ⟨alpha, halpha, sources⟩, budget, capBudget⟩ := |
| 95 | sequence (fun _ => B.delta S.setup.standard_initial S.constants) |
| 96 | (fun _ => B.delta_pos _ _) |
| 97 | let V := regularHistoryBlowupSequence F W history t ht x hPositive hDiverges |
| 98 | have core (n : ℕ) : |
| 99 | SurgeryPrefixControls p (F n) (O n) ∧ |
| 100 | t n ∈ Ico (surgeryEpochStart p.i) (O n).H ∧ |
| 101 | SurgeryFlowPinched (F n) ∧ |
| 102 | SurgeryCanonicalOn (F n) (Ico 0 (t n)) (r n) ∧ |
| 103 | (r n)⁻¹ ^ 2 ≤ ((F n).connection (t n)).scalarCurvature |
| 104 | ((history n).history.forward (t n) (ht n) (x n)) ∧ |
| 105 | ¬ SurgeryCanonicalControl (F n) (t n) |
| 106 | ((history n).history.forward (t n) (ht n) (x n)) |
| 107 | (F n).parameters.epsilon (F n).parameters.C ∧ |
| 108 | SurgeryVolumeControlOn (F n) (Icc (surgeryEpochStart p.i - 1 / 128) (t n)) kappa |
| 109 | (fun _ _ => True) ∧ |
| 110 | (∀ s ∈ surgeryObservationInterval (O n) ∩ |
| 111 | Ico (surgeryEpochStart (p.i - 1)) (O n).H, (F n).parameters.delta s ≤ delta n) ∧ |
| 112 | delta n ≤ B.delta S.setup.standard_initial S.constants := by |
| 113 | obtain ⟨_hrEq, _hwindow, _hrpos, _hrLast, _hdpos, hdc, _hdcut, _hobs, |
| 114 | old, _hadm, hpin, _hpol, _hscale, hover, hbase, _hfirst, hpast, hfloor, |
| 115 | hbad, hvol⟩ := hdata n |
| 116 | exact ⟨old, hbase, hpin, hpast, hfloor, hbad, hvol, hover, hdc⟩ |
| 117 | choose old hBase hPinched hPast hFloor hbad hvolume hOverlap hdelta using core |
| 118 | obtain ⟨rvol, vvol, hrvol, hvvol, terminalVolume⟩ := volume |
| 119 | have hcofinal (a : ℝ) (_ha : 0 < a) : ∃ j, a ≤ A j := by |
| 120 | obtain ⟨j, hj⟩ := exists_nat_ge a |
| 121 | exact ⟨j, by dsimp [A]; linarith⟩ |
| 122 | obtain ⟨xi, hxi, K0, _hK0, ceiling, compactBalls⟩ := |
| 123 | terminalSource_regular_retained_ceiling P S B p hp F O W history t r delta ht x |
| 124 | old hBase hPinched hPast hFloor hOverlap hdlim hDiverges A tau K hA |
| 125 | (fun j => (hsourceConstants j).1) (fun j => (hsourceConstants j).2.2.le) |
| 126 | hcofinal hrvol hvvol terminalVolume alpha halpha sources |
| 127 | let nu := alpha ∘ xi |
| 128 | have hnu : StrictMono nu := halpha.comp hxi |
| 129 | obtain ⟨delta0, hdelta0, initialSlab⟩ := |
| 130 | terminalSource_common_slab_of_physical_ceiling F W history t ht x hPositive hDiverges |
| 131 | duration (fun m => (hDuration m).1) nu hnu K0 budget ceiling |
| 132 | have hcompact : BlowupBaseBallsCompact (terminalCommonInterval_reindex V nu hnu) := |
| 133 | compactBalls |
| 134 | have hvol : ∃ rho v : ℝ, 0 < rho ∧ 0 < v ∧ ∀ᶠ k in atTop, |
| 135 | ENNReal.ofReal (v / (Real.sqrt (V.scale (nu k))) ^ 3) ≤ |
| 136 | calibratedMetricVolume ((V.flow (nu k)).metric (V.base (nu k)).1) |
| 137 | (V.baseBall (nu k) rho) := |
| 138 | ⟨rvol, vvol, hrvol, hvvol, hnu.tendsto_atTop.eventually terminalVolume⟩ |
| 139 | obtain ⟨lambda, hlambda, hdec, controls, _hmaximal, convergence⟩ := |
| 140 | terminalSource_common_maximal_selected_limit P |
| 141 | (terminalCommonInterval_reindex V nu hnu) hdelta0 initialSlab hcompact hvol |
| 142 | refine ⟨kappa, hkappa, r, F, O, t, W, history, ht, x, hPositive, hDiverges, |
| 143 | ?_, capBudget, nu ∘ lambda, hnu.comp hlambda, hdec, controls, convergence⟩ |
| 144 | intro n |
| 145 | refine ⟨old n, hBase n, hPinched n, hPast n, ?_, hbad n, hvolume n, ?_⟩ |
| 146 | · exact (hFloor n).trans_eq ((history n).scalar_pullback (t n) (ht n) (x n)) |
| 147 | · intro s hs |
| 148 | exact (hOverlap n s hs).trans (hdelta n) |
| 149 | |
| 150 | end PoincareMT.M47 |