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.Blowup.Construction.LongTime.CofinalExtraction.CofinalHorizonConvergence |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.UniformControl.UniformTerminalScalar |
| 3 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.FiniteSlab.FiniteSourcePrefixControl |
| 4 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.CofinalExtraction.HorizonContinuation |
| 5 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.SeedFiniteLongConvergence |
| 6 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.Predecessors |
| 7 | |
| 8 | local macro "P.m04.local_derivative_estimates_small" : term => |
| 9 | `(PoincareMT.RicciFlowCurvatureTheory.local_derivative_estimates_small |
| 10 | (PoincareMT.RicciFlowCurvatureTheory.toCalculus $(Lean.mkIdent `P.m04))) |
| 11 | |
| 12 | /-! |
| 13 | # Closure of attainable horizons under cofinal finite limits |
| 14 | |
| 15 | The initial short source family bounds terminal scalar curvature in every |
| 16 | later finite limit. Finite Harnack then bounds a fixed strict prefix |
| 17 | uniformly for all sufficiently long finite limits. Those bounds give fixed |
| 18 | source cylinder coefficients and hence a diagonal extraction at the limiting |
| 19 | horizon, as required by Morgan--Tian Theorem 11.8, pp. 272--279. |
| 20 | -/ |
| 21 | |
| 22 | set_option autoImplicit false |
| 23 | |
| 24 | open Set Filter |
| 25 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 26 | |
| 27 | universe u |
| 28 | |
| 29 | namespace PoincareMT.M30 |
| 30 | |
| 31 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 32 | FlowCarrier.isManifold |
| 33 | |
| 34 | private theorem harnack_bound_on_prefix |
| 35 | {Q t U T s : ℝ} (hQ : 0 ≤ Q) (ht : 0 ≤ t) |
| 36 | (htU : t < U) (hUT : U ≤ T) (hs : -t ≤ s) : |
| 37 | Q * T / (s + T) ≤ Q * U / (U - t) := by |
| 38 | have hU : 0 < U := ht.trans_lt htU |
| 39 | have hden : 0 < s + T := by linarith |
| 40 | apply (div_le_div_iff₀ hden (sub_pos.mpr htU)).mpr |
| 41 | have hfirst : 0 ≤ Q * U * (s + t) := |
| 42 | mul_nonneg (mul_nonneg hQ hU.le) (by linarith) |
| 43 | have hsecond : 0 ≤ Q * t * (T - U) := |
| 44 | mul_nonneg (mul_nonneg hQ ht) (sub_nonneg.mpr hUT) |
| 45 | nlinarith only [hfirst, hsecond] |
| 46 | |
| 47 | /-- Cofinal finite extractions below a target horizon yield an actual |
| 48 | extraction at that horizon. The short source family is used only to fix a |
| 49 | single terminal scalar coefficient for all the intermediate limits. -/ |
| 50 | theorem exists_backward_convergence_of_cofinal_finite_limits |
| 51 | (P : M30ControlledBlowupPredecessors.{u}) |
| 52 | {S : GeneralizedBlowupSequence.{u}} {T0 Tstar : ℝ≥0∞} |
| 53 | {epsilon C kappa r0 mu : ℝ} |
| 54 | (H : M30LongBlowupControls S epsilon C kappa r0 mu T0) |
| 55 | (Hshort : ShortControlledBlowupHypotheses S kappa r0) |
| 56 | (hbound : GeneralizedBlowupBoundedDistance S) |
| 57 | (hstar : 0 < Tstar) (hstarT0 : Tstar ≤ T0) |
| 58 | (hlimits : ∀ r : ℝ, 0 < r → ENNReal.ofReal r < Tstar → |
| 59 | ∃ T : ℝ, r < T ∧ ENNReal.ofReal T < Tstar ∧ |
| 60 | Nonempty (GeneralizedBlowupConvergence S (Ioc (-T) 0))) : |
| 61 | Nonempty (GeneralizedBlowupConvergence S (blowupBackwardInterval Tstar)) := by |
| 62 | obtain ⟨T, hTmono, hT, hcofinal, _hcompactTime⟩ := |
| 63 | exists_strictMono_backward_time_exhaustion hstar |
| 64 | let Q : ℝ := 9 * Hshort.curvature_bound |
| 65 | have hQ : 0 ≤ Q := mul_nonneg (by norm_num) Hshort.curvature_bound_nonneg |
| 66 | let scalarBound (j : ℕ) : ℝ := Q * T (j + 1) / (T (j + 1) - T j) |
| 67 | let B (j : ℕ) : ℝ := 13 * max 4 (scalarBound j + 1) |
| 68 | have hB (j : ℕ) : 0 ≤ B j := |
| 69 | mul_nonneg (by norm_num) ((by norm_num : (0 : ℝ) ≤ 4).trans (le_max_left _ _)) |
| 70 | have hprefix : ∀ n : ℕ, ∃ phi : ℕ → ℕ, StrictMono phi ∧ |
| 71 | ∀ j : ℕ, j ≤ n → ∀ A : ℝ, 0 < A → ∀ eta : ℝ, 0 < eta → |
| 72 | ∀ᶠ k : ℕ in atTop, |
| 73 | Nonempty (ControlledBlowupCylinder S (phi k) A (T j) (B j) eta) := by |
| 74 | intro n |
| 75 | obtain ⟨V, hTV, hVTstar, ⟨G⟩⟩ := hlimits (T (n + 1)) |
| 76 | (hT (n + 1)).1 (hT (n + 1)).2 |
| 77 | have hV : 0 < V := (hT (n + 1)).1.trans hTV |
| 78 | have hVT0 : ENNReal.ofReal V < T0 := hVTstar.trans_le hstarT0 |
| 79 | obtain ⟨Tplus, _hTplusNonneg, hVTplus, hTplusT0⟩ := |
| 80 | ENNReal.lt_iff_exists_real_btwn.mp hVT0 |
| 81 | have hTplus : 0 < Tplus := ENNReal.ofReal_pos.mp |
| 82 | ((ENNReal.ofReal_pos.mpr hV).trans hVTplus) |
| 83 | have hVTplus' : V < Tplus := |
| 84 | (ENNReal.ofReal_lt_ofReal_iff hTplus).mp hVTplus |
| 85 | have hterminal : ∀ x, (G.limit.flow.connection 0).scalarCurvature x ≤ Q := |
| 86 | generalized_limit_terminal_scalar_le_of_short_controls Hshort G |
| 87 | refine ⟨G.subsequence, G.subsequence_strictMono, ?_⟩ |
| 88 | intro j hj |
| 89 | have hjnext : T j < T (j + 1) := hTmono (Nat.lt_succ_self j) |
| 90 | have hjV : T (j + 1) ≤ V := |
| 91 | (hTmono.monotone (Nat.add_le_add_right hj 1)).trans hTV.le |
| 92 | have hscalar : ∀ s ∈ Icc (-(T j)) 0, ∀ x, |
| 93 | (G.limit.flow.connection s).scalarCurvature x ≤ scalarBound j := by |
| 94 | intro s hs x |
| 95 | have hsG : s ∈ Ioc (-V) 0 := |
| 96 | ⟨(neg_lt_neg (hjnext.trans_le hjV)).trans_le hs.1, hs.2⟩ |
| 97 | exact (finite_limit_scalar_le_of_terminal_bound P.m04 P.m06 |
| 98 | G.limit hterminal s hsG x).trans |
| 99 | (harnack_bound_on_prefix hQ (hT j).1.le hjnext hjV hs.1) |
| 100 | exact eventually_controlled_prefix_of_finite_scalar_bound P.m04 |
| 101 | H.toM30CommonBlowupControls G hVTplus' |
| 102 | (H.slabs Tplus hTplus hTplusT0) (hT j).1 (hjnext.trans_le hjV) hscalar |
| 103 | obtain ⟨rho, v, hrho, hv, hvolume⟩ := |
| 104 | exists_eventually_terminal_volume_lower_bound P.m04 H.toM30CommonBlowupControls hbound |
| 105 | apply exists_backward_convergence_of_finite_prefixes |
| 106 | P.m04.local_derivative_estimates_small withinFlowJetBoundsService.{0, 0} |
| 107 | withinBilinearFlowService.{0} spatialSliceJetConvergenceService.{0, 0, 0, 0, 0} |
| 108 | S hstar hrho hv H.balls_compact hvolume T B hB ?_ hprefix |
| 109 | intro t _ht htstar |
| 110 | obtain ⟨j, hj⟩ := (hcofinal t htstar).exists |
| 111 | exact ⟨j, hj.le⟩ |
| 112 | |
| 113 | /-- Once every finite extracted limit can be continued to a larger finite |
| 114 | horizon, the original short construction and the cofinal source diagonal |
| 115 | produce a convergence on the full prescribed horizon. -/ |
| 116 | theorem exists_backward_convergence_of_finite_extension |
| 117 | (P : M30ControlledBlowupPredecessors.{u}) |
| 118 | {S : GeneralizedBlowupSequence.{u}} {T0 : ℝ≥0∞} |
| 119 | {epsilon C kappa r0 mu : ℝ} |
| 120 | (H : M30LongBlowupControls S epsilon C kappa r0 mu T0) |
| 121 | (Hshort : ShortControlledBlowupHypotheses S kappa r0) |
| 122 | (hbound : GeneralizedBlowupBoundedDistance S) |
| 123 | (hstep : ∀ T : ℝ, 0 < T → ENNReal.ofReal T < T0 → |
| 124 | ∀ _G : GeneralizedBlowupConvergence S (Ioc (-T) 0), |
| 125 | ∃ T' : ℝ, T < T' ∧ ENNReal.ofReal T' < T0 ∧ |
| 126 | Nonempty (GeneralizedBlowupConvergence S (Ioc (-T') 0))) : |
| 127 | Nonempty (GeneralizedBlowupConvergence S (blowupBackwardInterval T0)) := by |
| 128 | classical |
| 129 | apply horizon_of_seed_cofinal_closure_and_extension |
| 130 | (fun U => Nonempty (GeneralizedBlowupConvergence S (blowupBackwardInterval U))) |
| 131 | · obtain ⟨T, hT, hTT0, hG⟩ := |
| 132 | exists_seed_finite_long_convergence_of_short_controls P S |
| 133 | H.toM30CommonBlowupControls hbound Hshort H.horizon_pos |
| 134 | refine ⟨ENNReal.ofReal T, ENNReal.ofReal_pos.mpr hT, hTT0.le, ?_⟩ |
| 135 | simpa only [blowupBackwardInterval_ofReal hT] using hG |
| 136 | · intro U hU hUT0 hcofinal |
| 137 | by_cases hdone : Nonempty (GeneralizedBlowupConvergence S (blowupBackwardInterval U)) |
| 138 | · exact hdone |
| 139 | apply exists_backward_convergence_of_cofinal_finite_limits |
| 140 | P H Hshort hbound hU hUT0 |
| 141 | intro r hr hrU |
| 142 | obtain ⟨V, hrV, hVU, hGV⟩ := hcofinal (ENNReal.ofReal r) hrU |
| 143 | have hVU' : V < U := lt_of_le_of_ne hVU (by |
| 144 | intro heq |
| 145 | subst V |
| 146 | exact hdone hGV) |
| 147 | have hVfinite : V ≠ ⊤ := (hVU'.trans_le le_top).ne |
| 148 | have hVpos : 0 < V := (ENNReal.ofReal_pos.mpr hr).trans hrV |
| 149 | have hT : 0 < V.toReal := ENNReal.toReal_pos hVpos.ne' hVfinite |
| 150 | have hvalue : ENNReal.ofReal V.toReal = V := ENNReal.ofReal_toReal hVfinite |
| 151 | refine ⟨V.toReal, ?_, hvalue.trans_lt hVU', ?_⟩ |
| 152 | · exact (ENNReal.ofReal_lt_ofReal_iff hT).mp (hrV.trans_eq hvalue.symm) |
| 153 | · have hdomain : blowupBackwardInterval V = Ioc (-V.toReal) 0 := |
| 154 | (congrArg blowupBackwardInterval hvalue.symm).trans |
| 155 | (blowupBackwardInterval_ofReal hT) |
| 156 | exact hdomain ▸ hGV |
| 157 | · intro U hU hUT0 hGU |
| 158 | have hUfinite : U ≠ ⊤ := (hUT0.trans_le le_top).ne |
| 159 | have hT : 0 < U.toReal := ENNReal.toReal_pos hU.ne' hUfinite |
| 160 | have hvalue : ENNReal.ofReal U.toReal = U := ENNReal.ofReal_toReal hUfinite |
| 161 | have hG : Nonempty (GeneralizedBlowupConvergence S (Ioc (-U.toReal) 0)) := by |
| 162 | have hdomain : blowupBackwardInterval U = Ioc (-U.toReal) 0 := |
| 163 | (congrArg blowupBackwardInterval hvalue.symm).trans |
| 164 | (blowupBackwardInterval_ofReal hT) |
| 165 | exact hdomain ▸ hGU |
| 166 | obtain ⟨G⟩ := hG |
| 167 | obtain ⟨T', hTT', hT'T0, hG'⟩ := |
| 168 | hstep U.toReal hT (hvalue.trans_lt hUT0) G |
| 169 | have hT' : 0 < T' := hT.trans hTT' |
| 170 | refine ⟨ENNReal.ofReal T', ?_, hT'T0.le, ?_⟩ |
| 171 | · exact hvalue.symm.trans_lt ((ENNReal.ofReal_lt_ofReal_iff hT').mpr hTT') |
| 172 | · simpa only [blowupBackwardInterval_ofReal hT'] using hG' |
| 173 | |
| 174 | end PoincareMT.M30 |