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.AncientKappa.Compactness.Estimates |
| 2 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Asymptotic.Compactness.Calibration |
| 3 | import PoincareLib.Geometry.RicciFlow.TimeTranslation |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.LocalControl |
| 5 | import PoincareLib.Geometry.Riemannian.Comparison.Laplacian.Branch.Complete |
| 6 | |
| 7 | /-! |
| 8 | # Finite-window compactness for normalized ancient sequences |
| 9 | |
| 10 | Translate time -1 to the based time zero. The terminal scalar bound and the |
| 11 | M16 past-control and ball-monotonicity services supply both M07 curvature |
| 12 | clauses, compact balls, and a uniform noncollapse constant in M07's Hausdorff |
| 13 | volume convention. Carriers are allowed to vary with the sequence index. |
| 14 | |
| 15 | Reference: Morgan--Tian Theorem 9.64 and Lemma 9.65, pp. 225-229. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | namespace BasedKappaSolution |
| 26 | |
| 27 | variable {kappa a b : ℝ} (B : BasedKappaSolution kappa) |
| 28 | |
| 29 | local instance : TopologicalSpace B.carrier.carrier := B.carrier.topologicalSpace |
| 30 | local instance : MeasurableSpace B.carrier.carrier := B.carrier.measurableSpace |
| 31 | local instance : BorelSpace B.carrier.carrier := B.carrier.borelSpace |
| 32 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) B.carrier.carrier := |
| 33 | B.carrier.chartedSpace |
| 34 | local instance : IsManifold (𝓡 3) ∞ B.carrier.carrier := B.carrier.isManifold |
| 35 | local instance : T2Space B.carrier.carrier := B.carrier.t2Space |
| 36 | local instance : T3Space B.carrier.carrier := B.carrier.t3Space |
| 37 | local instance : SecondCountableTopology B.carrier.carrier := B.carrier.secondCountable |
| 38 | local instance : ConnectedSpace B.carrier.carrier := B.connectedSpace |
| 39 | |
| 40 | def shiftedWindowFlow (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) : |
| 41 | RicciFlow 3 B.carrier.carrier (Ioo a b) := |
| 42 | B.flow.flow.translate (-1) |
| 43 | (by rintro _ ⟨t, ht, rfl⟩; change t + -1 ≤ 0; linarith [ht.2]) |
| 44 | ordConnected_Ioo |
| 45 | (by refine ⟨a / 2, ⟨?_, ?_⟩, b / 2, ⟨?_, ?_⟩, ?_⟩ <;> linarith) |
| 46 | |
| 47 | noncomputable def basedWindow (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) : |
| 48 | BasedFlow 3 a b B.carrier where |
| 49 | base := B.base |
| 50 | flow := B.shiftedWindowFlow ha hb hb1 |
| 51 | volumeMeasure := B.carrier.metricHausdorffVolume |
| 52 | ((B.shiftedWindowFlow ha hb hb1).metric 0) |
| 53 | spacetimeVectorField := fun _ _ ↦ (1, 0) |
| 54 | spacetimeVectorField_time := fun _ _ ↦ rfl |
| 55 | spacetimeVectorField_spatial_zero := fun _ _ ↦ rfl |
| 56 | |
| 57 | theorem basedWindow_zeroBall (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) (r : ℝ) : |
| 58 | (B.basedWindow ha hb hb1).zeroBall r = (B.flow.flow.metric (-1)).ball B.base r := by |
| 59 | simp only [BasedFlow.zeroBall, basedWindow, shiftedWindowFlow, |
| 60 | RicciFlow.translate, FlowCarrier.metricBall, zero_add] |
| 61 | |
| 62 | theorem basedWindow_zeroBall_compact |
| 63 | (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) (r : ℝ) : |
| 64 | IsCompact (closure ((B.basedWindow ha hb hb1).zeroBall r)) := by |
| 65 | rw [B.basedWindow_zeroBall ha hb hb1] |
| 66 | exact (B.flow.flow.metric (-1)).isCompact_closure_ball_of_metricComplete |
| 67 | (B.flow.complete (-1) (by norm_num)) B.base r |
| 68 | |
| 69 | end BasedKappaSolution |
| 70 | |
| 71 | namespace NormalizedKappaSolutionSequence |
| 72 | |
| 73 | variable {kappa a b : ℝ} (S : NormalizedKappaSolutionSequence kappa) |
| 74 | |
| 75 | noncomputable def windowSequence (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) : |
| 76 | PointedFlowSequence 3 a b where |
| 77 | carrier := fun k ↦ (S.term k).carrier |
| 78 | flow := fun k ↦ (S.term k).basedWindow ha hb hb1 |
| 79 | |
| 80 | theorem window_noncollapsing |
| 81 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 82 | (hcontrol : M23AllTimeCurvatureControl S) |
| 83 | (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) : |
| 84 | ∃ r κ : ℝ, 0 < r ∧ 0 < κ ∧ ∀ k, |
| 85 | ENNReal.ofReal (κ * r ^ 3) ≤ ((S.term k).basedWindow ha hb hb1).zeroBallVolume r := by |
| 86 | obtain ⟨C, hC, hbound⟩ := hcontrol 1 (by norm_num) |
| 87 | let r : ℝ := (C + 1)⁻¹ |
| 88 | have hCp : 0 < C + 1 := by linarith |
| 89 | have hr : 0 < r := inv_pos.mpr hCp |
| 90 | have hr1 : r ≤ 1 := (inv_le_one₀ hCp).2 (by linarith) |
| 91 | have hrC : C ≤ r⁻¹ ^ 2 := by dsimp [r]; rw [inv_inv]; nlinarith |
| 92 | have hcal := ENNReal.toReal_pos (euclideanVolumeCalibration_pos 3).ne' |
| 93 | (euclideanVolumeCalibration_ne_top 3) |
| 94 | refine ⟨r, kappa / (euclideanVolumeCalibration 3).toReal, hr, |
| 95 | div_pos S.kappa_pos hcal, ?_⟩ |
| 96 | intro k |
| 97 | let B := S.term k |
| 98 | let Crr := B.carrier |
| 99 | letI : TopologicalSpace Crr.carrier := Crr.topologicalSpace |
| 100 | letI : MeasurableSpace Crr.carrier := Crr.measurableSpace |
| 101 | letI : BorelSpace Crr.carrier := Crr.borelSpace |
| 102 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) Crr.carrier := Crr.chartedSpace |
| 103 | letI : IsManifold (𝓡 3) ∞ Crr.carrier := Crr.isManifold |
| 104 | letI : T2Space Crr.carrier := Crr.t2Space |
| 105 | letI : T3Space Crr.carrier := Crr.t3Space |
| 106 | letI : SecondCountableTopology Crr.carrier := Crr.secondCountable |
| 107 | letI : ConnectedSpace Crr.carrier := B.connectedSpace |
| 108 | have hnc := B.flow.noncollapsed r hr (-1) (by norm_num) B.base r hr le_rfl (by |
| 109 | intro t ht x hx |
| 110 | have hx0 := P.ball_monotone Crr.carrier B.flow (-1) 0 (by norm_num) le_rfl B.base r hx |
| 111 | have hx1 : x ∈ (B.flow.flow.metric 0).ball B.base 1 := |
| 112 | lt_of_lt_of_le hx0 (ENNReal.ofReal_le_ofReal hr1) |
| 113 | exact (hbound k t (ht.2.trans (by norm_num)) x hx1).trans hrC) |
| 114 | rw [B.kappa_eq] at hnc |
| 115 | have hvol := calibrated_noncollapse_to_hausdorff Crr (B.flow.flow.metric (-1)) |
| 116 | ((B.flow.flow.metric (-1)).ball B.base r) S.kappa_pos hr hnc |
| 117 | simpa only [BasedFlow.zeroBallVolume, BasedFlow.zeroBall, FlowCarrier.metricBall, |
| 118 | BasedKappaSolution.basedWindow, BasedKappaSolution.shiftedWindowFlow, |
| 119 | RicciFlow.translate, zero_add] using hvol |
| 120 | |
| 121 | noncomputable def compactnessHypotheses |
| 122 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 123 | (hcontrol : M23AllTimeCurvatureControl S) |
| 124 | (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) : |
| 125 | PointedRicciFlowCompactnessHypotheses 3 a b where |
| 126 | time_bounds := ⟨ha, hb⟩ |
| 127 | sequence := S.windowSequence ha hb hb1 |
| 128 | volume_compatibility := fun _ ↦ rfl |
| 129 | zero_time_ball_compact := fun A _ ↦ Eventually.of_forall fun k ↦ |
| 130 | (S.term k).basedWindow_zeroBall_compact ha hb hb1 A |
| 131 | spacetime_control := by |
| 132 | intro A hA I _ _ _ hI |
| 133 | obtain ⟨C, hC, hbound⟩ := hcontrol A hA |
| 134 | refine ⟨C, hC, Eventually.of_forall ?_⟩ |
| 135 | intro k |
| 136 | let B := S.term k |
| 137 | let Crr := B.carrier |
| 138 | letI : TopologicalSpace Crr.carrier := Crr.topologicalSpace |
| 139 | letI : MeasurableSpace Crr.carrier := Crr.measurableSpace |
| 140 | letI : BorelSpace Crr.carrier := Crr.borelSpace |
| 141 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) Crr.carrier := Crr.chartedSpace |
| 142 | letI : IsManifold (𝓡 3) ∞ Crr.carrier := Crr.isManifold |
| 143 | letI : T2Space Crr.carrier := Crr.t2Space |
| 144 | letI : T3Space Crr.carrier := Crr.t3Space |
| 145 | letI : SecondCountableTopology Crr.carrier := Crr.secondCountable |
| 146 | letI : ConnectedSpace Crr.carrier := B.connectedSpace |
| 147 | refine ⟨SmoothSpacetimeEmbedding.refl (B.basedWindow ha hb hb1) |
| 148 | (I ×ˢ (B.basedWindow ha hb hb1).zeroBall A), fun _ _ ↦ rfl, hC, ?_⟩ |
| 149 | intro t ht x hx |
| 150 | change x ∈ (B.basedWindow ha hb hb1).zeroBall A at hx |
| 151 | rw [B.basedWindow_zeroBall ha hb hb1] at hx |
| 152 | have hx0 := P.ball_monotone Crr.carrier B.flow (-1) 0 (by norm_num) le_rfl B.base A hx |
| 153 | exact (le_abs_self _).trans (hbound k (t - 1) (by linarith [(hI ht).2]) x hx0) |
| 154 | all_time_curvature_control := by |
| 155 | intro A hA |
| 156 | obtain ⟨C, hC, hbound⟩ := hcontrol A hA |
| 157 | refine ⟨C, hC, Eventually.of_forall ?_⟩ |
| 158 | intro k |
| 159 | let B := S.term k |
| 160 | let Crr := B.carrier |
| 161 | letI : TopologicalSpace Crr.carrier := Crr.topologicalSpace |
| 162 | letI : MeasurableSpace Crr.carrier := Crr.measurableSpace |
| 163 | letI : BorelSpace Crr.carrier := Crr.borelSpace |
| 164 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) Crr.carrier := Crr.chartedSpace |
| 165 | letI : IsManifold (𝓡 3) ∞ Crr.carrier := Crr.isManifold |
| 166 | letI : T2Space Crr.carrier := Crr.t2Space |
| 167 | letI : T3Space Crr.carrier := Crr.t3Space |
| 168 | letI : SecondCountableTopology Crr.carrier := Crr.secondCountable |
| 169 | letI : ConnectedSpace Crr.carrier := B.connectedSpace |
| 170 | dsimp only |
| 171 | intro t₀ ht₀ t ht x hx |
| 172 | have hx0 := P.ball_monotone Crr.carrier B.flow (t₀ - 1) 0 |
| 173 | (by linarith [ht₀.2]) le_rfl B.base A hx |
| 174 | exact (le_abs_self _).trans (hbound k (t - 1) (by linarith [ht.2]) x hx0) |
| 175 | noncollapsing := by |
| 176 | obtain ⟨r, κ, hr, hκ, hvol⟩ := S.window_noncollapsing P hcontrol ha hb hb1 |
| 177 | exact ⟨r, κ, hr, hκ, Eventually.of_forall hvol⟩ |
| 178 | |
| 179 | theorem compactnessConclusion |
| 180 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 181 | (hlocal : M23LocalCurvatureEstimate S) |
| 182 | (ha : a < 0) (hb : 0 < b) (hb1 : b ≤ 1) : |
| 183 | Nonempty (PointedRicciFlowCompactnessConclusion |
| 184 | (S.compactnessHypotheses P (m23AllTimeCurvatureControl_of_local S P hlocal) ha hb hb1)) := |
| 185 | P.pointed_compactness ha hb _ |
| 186 | |
| 187 | end NormalizedKappaSolutionSequence |
| 188 | |
| 189 | end PoincareMT |