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.Limit.Noncollapse.LimitNoncollapseCompactDiameter |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapsePhysicalTime |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapsePointScalar |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapsePointDistance |
| 5 | import Mathlib.Topology.Order.IntermediateValue |
| 6 | |
| 7 | /-! |
| 8 | # Compact scalar control from actual earlier physical canonical slices |
| 9 | |
| 10 | The bounded-distance constants precede every tested time and point. Each |
| 11 | fixed test uses finitely many tails of the same convergence witness and |
| 12 | its selected source sequence. The low-point hypothesis is the local F3 |
| 13 | input, not an entry assumption. Source: MT Proposition 17.1; reviewed |
| 14 | limit-tail-compact-transfer, F2. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M47 |
| 26 | |
| 27 | private theorem normalized_distance_lt_scalar_radius |
| 28 | {Q R c d B A : ℝ} (hQ : 0 < Q) (hR : 0 < R) (hc : 0 < c) (hd : 0 ≤ d) |
| 29 | (hscalar : R / Q < 2 * c) (hdist : Real.sqrt Q * d < B) |
| 30 | (hA : B * Real.sqrt (2 * c) < A) : d < A * R ^ (-1 / 2 : ℝ) := by |
| 31 | have hroot : Real.sqrt R ≤ Real.sqrt (2 * c) * Real.sqrt Q := by |
| 32 | rw [← Real.sqrt_mul (by positivity : 0 ≤ 2 * c)] |
| 33 | exact Real.sqrt_le_sqrt ((div_lt_iff₀ hQ).mp hscalar).le |
| 34 | have hproduct : d * Real.sqrt R < A := by |
| 35 | calc |
| 36 | _ ≤ d * (Real.sqrt (2 * c) * Real.sqrt Q) := |
| 37 | mul_le_mul_of_nonneg_left hroot hd |
| 38 | _ = Real.sqrt (2 * c) * (Real.sqrt Q * d) := by ring |
| 39 | _ < Real.sqrt (2 * c) * B := mul_lt_mul_of_pos_left hdist (by positivity) |
| 40 | _ = B * Real.sqrt (2 * c) := mul_comm _ _ |
| 41 | _ < A := hA |
| 42 | rw [show (-1 / 2 : ℝ) = -(1 / 2 : ℝ) by ring, |
| 43 | Real.rpow_neg hR.le, ← Real.sqrt_eq_rpow, ← div_eq_mul_inv] |
| 44 | exact (lt_div_iff₀ (Real.sqrt_pos.mpr hR)).mpr hproduct |
| 45 | |
| 46 | variable (F : ℕ → SurgeryFlowData.{u}) (W : ∀ k, M33RegularHistoryWindow (F k)) |
| 47 | (history : ∀ k, M33RegularHistoryData (W k)) (baseTime : ℕ → ℝ) |
| 48 | (hbaseTime : ∀ k, baseTime k ∈ (history k).generalized.interval) |
| 49 | (basePoint : ∀ k, ((history k).generalized.slice (baseTime k)).carrier) |
| 50 | (hPositive : ∀ k, 0 < ((F k).connection (baseTime k)).scalarCurvature |
| 51 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k))) |
| 52 | (hDiverges : Tendsto (fun k => ((F k).connection (baseTime k)).scalarCurvature |
| 53 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k))) atTop atTop) |
| 54 | |
| 55 | local notation "V" => regularHistoryBlowupSequence F W history baseTime hbaseTime |
| 56 | basePoint hPositive hDiverges |
| 57 | |
| 58 | variable {H : ℝ≥0∞} (G : GeneralizedBlowupConvergence |
| 59 | (regularHistoryBlowupSequence F W history baseTime hbaseTime basePoint hPositive hDiverges) |
| 60 | (blowupBackwardInterval H)) |
| 61 | |
| 62 | private local instance : TopologicalSpace G.limit.carrier.carrier := |
| 63 | G.limit.carrier.topologicalSpace |
| 64 | private local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) G.limit.carrier.carrier := |
| 65 | G.limit.carrier.chartedSpace |
| 66 | private local instance : IsManifold (𝓡 3) ∞ G.limit.carrier.carrier := G.limit.carrier.isManifold |
| 67 | |
| 68 | /-- A compact connected set with a uniformly low scalar point on every |
| 69 | slice has uniformly bounded scalar curvature throughout the finite horizon. |
| 70 | The only source inputs are the literal earlier canonical slices, pinching, |
| 71 | parameter identities, and the true scale inequality of the selected family. -/ |
| 72 | theorem limitFinite_compact_scalar_bound |
| 73 | (P : M47Predecessors.{u}) (schedules : RepairedControlledSchedulesData.{u}) |
| 74 | (hH : 0 < H) (hfinite : H ≠ ⊤) {epsilon C : ℝ} |
| 75 | (hepsilon : 0 < epsilon) (hepsilon₀ : epsilon ≤ schedules.calibration.epsilon₁₀) |
| 76 | (hC : 0 < C) |
| 77 | (hParameters : ∀ k, (F k).parameters.epsilon = epsilon ∧ (F k).parameters.C = C) |
| 78 | (hPinched : ∀ k, ∀ s ∈ (W k).interval, SurgeryPinchedAt ((F k).connection s) s) |
| 79 | (rNext : ℕ → ℝ) (hThreshold : ∀ k, (rNext k)⁻¹ ^ 2 ≤ (V).scale k) |
| 80 | (hEarlier : ∀ k, SurgeryCanonicalOn (F k) (Ico 0 (baseTime k)) (rNext k)) |
| 81 | {B0 : ℝ} (hterminal : ∀ x : G.limit.carrier.carrier, |
| 82 | (G.limit.flow.connection 0).curvatureTensorNorm x ≤ B0) |
| 83 | {X : Set G.limit.carrier.carrier} (hX : IsCompact X) (hXconnected : IsPreconnected X) |
| 84 | {c : ℝ} (hlow : ∀ t ∈ blowupBackwardInterval H, |
| 85 | ∃ y ∈ X, (G.limit.flow.connection t).scalarCurvature y ≤ c) : |
| 86 | ∃ K : ℝ, 1 ≤ K ∧ ∀ t ∈ blowupBackwardInterval H, ∀ z ∈ X, |
| 87 | (G.limit.flow.connection t).scalarCurvature z ≤ K := by |
| 88 | classical |
| 89 | let c0 := max c 2 + 1 |
| 90 | have hc : c < c0 := by dsimp only [c0]; linarith [le_max_left c 2] |
| 91 | have hc2 : 2 < c0 := by dsimp only [c0]; linarith [le_max_right c 2] |
| 92 | have hc0 : 0 < c0 := by linarith |
| 93 | obtain ⟨DX, hDX, hdiam⟩ := |
| 94 | limitFinite_compact_diameter P.m04 hH hfinite G.limit hterminal hX |
| 95 | let A := 2 * (DX + 1) * Real.sqrt (2 * c0) + 1 |
| 96 | have hA : 0 < A := by dsimp only [A]; positivity |
| 97 | obtain ⟨D0, D, hD0, hD, hEstimate⟩ := |
| 98 | exists_regular_history_bounded_distance schedules epsilon hepsilon hepsilon₀ C hC A hA.le |
| 99 | let K := max 1 (max c0 (4 * c0 * D)) |
| 100 | refine ⟨K, le_max_left _ _, ?_⟩ |
| 101 | intro t ht z hz |
| 102 | by_contra hnot |
| 103 | have hhigh : K < (G.limit.flow.connection t).scalarCurvature z := lt_of_not_ge hnot |
| 104 | have hc0z : c0 < (G.limit.flow.connection t).scalarCurvature z := |
| 105 | (le_trans (le_max_left _ _) (le_max_right _ _)).trans_lt hhigh |
| 106 | have hDz : 4 * c0 * D < (G.limit.flow.connection t).scalarCurvature z := |
| 107 | (le_trans (le_max_right _ _) (le_max_right _ _)).trans_lt hhigh |
| 108 | have hRz : 0 < (G.limit.flow.connection t).scalarCurvature z := hc0.trans hc0z |
| 109 | obtain ⟨y0, hy0, hRy0⟩ := hlow t ht |
| 110 | have hcont := (P.m04.tensor_calculus 3 G.limit.carrier.carrier |
| 111 | (G.limit.flow.metric t) (G.limit.flow.connection t)).contMDiff_scalarCurvature.continuous |
| 112 | obtain ⟨y, hy, hRy⟩ := hXconnected.intermediate_value hy0 hz hcont.continuousOn |
| 113 | ⟨hRy0.trans hc.le, hc0z.le⟩ |
| 114 | have hyTail := limitNoncollapse_eventually_point_scalar G P t ht y (half_pos hc0) |
| 115 | have hzTail := limitNoncollapse_eventually_point_scalar G P t ht z (half_pos hRz) |
| 116 | have hdTail := limitNoncollapse_eventually_point_distance G t ht y z zero_lt_one |
| 117 | have htTail := limitNoncollapse_eventually_physical_time_pos hfinite G |
| 118 | (fun k => regular_history_interval_nonnegative (history k)) t ht |
| 119 | have hqTail : ∀ᶠ k : ℕ in atTop, 2 * D0 / c0 ≤ (V).scale (G.subsequence k) := |
| 120 | ((V).scalar_diverges.comp G.subsequence_strictMono.tendsto_atTop).eventually |
| 121 | (eventually_ge_atTop (2 * D0 / c0)) |
| 122 | obtain ⟨k, hky, hkz, hkd, hkt, hkq⟩ := |
| 123 | (hyTail.and (hzTail.and (hdTail.and (htTail.and hqTail)))).exists |
| 124 | let hs := hky.1 |
| 125 | let q := (V).scale (G.subsequence k) |
| 126 | let tau := ((V).base (G.subsequence k)).1 + t / q |
| 127 | let yk := (G.embedding k).forward t hs y |
| 128 | let zk := (G.embedding k).forward t hs z |
| 129 | let Ry := ((V).flow (G.subsequence k)).scalar ⟨tau, yk⟩ |
| 130 | let Rz := ((V).flow (G.subsequence k)).scalar ⟨tau, zk⟩ |
| 131 | have hq : 0 < q := (G.embedding k).scale_pos |
| 132 | have hRyErr : |Ry / q - c0| < c0 / 2 := by |
| 133 | have herr := hky.2.2 hs |
| 134 | change |Ry / q - (G.limit.flow.connection t).scalarCurvature y| < c0 / 2 at herr |
| 135 | rwa [hRy] at herr |
| 136 | have hRzErr : |Rz / q - (G.limit.flow.connection t).scalarCurvature z| < |
| 137 | (G.limit.flow.connection t).scalarCurvature z / 2 := hkz.2.2 hs |
| 138 | have hyLower : c0 / 2 < Ry / q := by linarith [(abs_lt.mp hRyErr).1] |
| 139 | have hyUpper : Ry / q < 2 * c0 := by linarith [(abs_lt.mp hRyErr).2] |
| 140 | have hzLower : (G.limit.flow.connection t).scalarCurvature z / 2 < Rz / q := by |
| 141 | linarith [(abs_lt.mp hRzErr).1] |
| 142 | have hyLower' : (c0 / 2) * q < Ry := (lt_div_iff₀ hq).mp hyLower |
| 143 | have hRypos : 0 < Ry := lt_trans (by positivity) hyLower' |
| 144 | have hyLarge : D0 ≤ Ry := by |
| 145 | have hq' : 2 * D0 ≤ q * c0 := (div_le_iff₀ hc0).mp hkq |
| 146 | nlinarith |
| 147 | have hcutoff : (rNext (G.subsequence k))⁻¹ ^ 2 ≤ 4 * Ry := by |
| 148 | apply (hThreshold (G.subsequence k)).trans |
| 149 | have hmult := mul_pos (show 0 < c0 - 2 by linarith) hq |
| 150 | change q ≤ 4 * Ry |
| 151 | nlinarith |
| 152 | have htimeBase : tau ≤ baseTime (G.subsequence k) := by |
| 153 | have hdiv := div_nonpos_of_nonpos_of_nonneg ht.1 hq.le |
| 154 | change baseTime (G.subsequence k) + t / q ≤ baseTime (G.subsequence k) |
| 155 | linarith |
| 156 | have hphysicalCanonical : ∀ s ∈ (W (G.subsequence k)).interval, s < tau → |
| 157 | s ∉ (F (G.subsequence k)).surgery_times → |
| 158 | ∀ w : ((F (G.subsequence k)).slice s).carrier, |
| 159 | 4 * Ry ≤ ((F (G.subsequence k)).connection s).scalarCurvature w → |
| 160 | SurgeryCanonicalControl (F (G.subsequence k)) s w epsilon C := by |
| 161 | intro s hsw hst _hregular w hw |
| 162 | have hsh : s ∈ (history (G.subsequence k)).generalized.interval := |
| 163 | (history (G.subsequence k)).interval_eq.symm ▸ hsw |
| 164 | have hsF := (history (G.subsequence k)).history.time_subset hsh |
| 165 | have hcanonical := hEarlier (G.subsequence k) s |
| 166 | ⟨regular_history_interval_nonnegative (history (G.subsequence k)) hsh, |
| 167 | hst.trans_le htimeBase⟩ hsF w (hcutoff.trans hw) |
| 168 | simpa only [(hParameters (G.subsequence k)).1, (hParameters (G.subsequence k)).2] |
| 169 | using hcanonical |
| 170 | have hM28 := hEstimate (F (G.subsequence k)) (W (G.subsequence k)) |
| 171 | (history (G.subsequence k)) (hPinched (G.subsequence k)) tau hkt.2.1 hkt.2.2 yk |
| 172 | hyLarge hphysicalCanonical |
| 173 | have hsource := hkd.2.2.2 hs |
| 174 | let gk := ((V).flow (G.subsequence k)).metric tau |
| 175 | have hd : Real.sqrt q * (gk.edist yk zk).toReal < 2 * (DX + 1) := by |
| 176 | have hdiameter := hdiam t ht y hy z hz |
| 177 | exact hsource.2.trans_le (by linarith) |
| 178 | have hradius : (gk.edist yk zk).toReal < A * Ry ^ (-1 / 2 : ℝ) := |
| 179 | normalized_distance_lt_scalar_radius hq hRypos hc0 ENNReal.toReal_nonneg |
| 180 | hyUpper hd (by dsimp only [A]; linarith) |
| 181 | have hzBall : zk ∈ gk.ball yk (A * Ry ^ (-1 / 2 : ℝ)) := by |
| 182 | change gk.edist yk zk < ENNReal.ofReal _ |
| 183 | rw [← ENNReal.ofReal_toReal hsource.1] |
| 184 | exact ENNReal.ofReal_lt_ofReal_iff (lt_of_le_of_lt ENNReal.toReal_nonneg hradius) |
| 185 | |>.mpr hradius |
| 186 | have hratio : Rz ≤ D * Ry := hM28 zk hzBall |
| 187 | have hratio' : Rz / q ≤ D * (Ry / q) := by |
| 188 | simpa only [mul_div_assoc] using (div_le_div_of_nonneg_right hratio hq.le) |
| 189 | have hupper : Rz / q < D * (2 * c0) := |
| 190 | hratio'.trans_lt (mul_lt_mul_of_pos_left hyUpper hD) |
| 191 | nlinarith |
| 192 | |
| 193 | end PoincareMT.M47 |