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.Statement |
| 2 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Asymptotic.Compactness.Calibration |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.LocalControl |
| 4 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.ScalarRatio.Annular.Compactness |
| 5 | |
| 6 | /-! |
| 7 | # Finite windows of controlled raw ancient flows |
| 8 | |
| 9 | Expanding terminal balls with a common past curvature bound give the full |
| 10 | two-time M07 hypotheses. Actual parabolic noncollapse supplies reference |
| 11 | volume after the fixed Euclidean calibration. No source is packaged as a |
| 12 | globally bounded ancient kappa-solution. |
| 13 | |
| 14 | Reference: Kleiner--Lott, Theorem 46.1, pp. 2687-2688, and Appendix E, |
| 15 | pp. 2848-2849. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | set_option maxHeartbeats 800000 |
| 21 | |
| 22 | open Set Filter |
| 23 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 24 | |
| 25 | namespace PoincareMT.RawAncientSequence |
| 26 | |
| 27 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.measurableSpace |
| 28 | FlowCarrier.borelSpace FlowCarrier.chartedSpace FlowCarrier.isManifold |
| 29 | FlowCarrier.t2Space FlowCarrier.t3Space FlowCarrier.secondCountable |
| 30 | |
| 31 | local instance windowCarrierConnected (D : FlowCarrier 3) : ConnectedSpace D.carrier := |
| 32 | connectedSpace_iff_univ.mpr D.connected |
| 33 | |
| 34 | variable (C : ℕ → FlowCarrier.{0} 3) |
| 35 | (F : ∀ k, RicciFlow 3 (C k).carrier (Iic 0)) (p : ∀ k, (C k).carrier) |
| 36 | |
| 37 | /-- Earlier balls lie in the same terminal balls without a global curvature |
| 38 | bound, by the actual closed-time Ricci equation. -/ |
| 39 | theorem ball_subset_terminal |
| 40 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 41 | (hop : ∀ k t, t ≤ 0 → ∀ x, ((F k).connection t).NonnegativeCurvatureOperator x) |
| 42 | (k : ℕ) (t : ℝ) (ht : t ≤ 0) (q : (C k).carrier) (r : ℝ) : |
| 43 | ((F k).metric t).ball q r ⊆ ((F k).metric 0).ball q r := by |
| 44 | apply (F k).ball_subset_terminal_ball_of_ancient_ricci_nonneg q r ht |
| 45 | intro s hs x _ v |
| 46 | exact (((F k).connection s).ricci_bounds_of_nonnegative_curvatureOperator |
| 47 | (P.tensor_calculus 3 (C k).carrier ((F k).metric s) ((F k).connection s)) |
| 48 | x (hop k s hs x) v).1 |
| 49 | |
| 50 | variable {δ a b : ℝ} |
| 51 | |
| 52 | def shiftedWindowFlow (k : ℕ) (ha : a < 0) (hb : 0 < b) (hbδ : b ≤ δ) : |
| 53 | RicciFlow 3 (C k).carrier (Ioo a b) := |
| 54 | (F k).translate (-δ) |
| 55 | (by rintro _ ⟨t, ht, rfl⟩; change t + -δ ≤ 0; linarith [ht.2]) |
| 56 | ordConnected_Ioo |
| 57 | (by refine ⟨a / 2, ⟨?_, ?_⟩, b / 2, ⟨?_, ?_⟩, ?_⟩ <;> linarith) |
| 58 | |
| 59 | noncomputable def basedWindow (k : ℕ) (ha : a < 0) (hb : 0 < b) (hbδ : b ≤ δ) : |
| 60 | BasedFlow 3 a b (C k) where |
| 61 | base := p k |
| 62 | flow := shiftedWindowFlow C F k ha hb hbδ |
| 63 | volumeMeasure := (C k).metricHausdorffVolume |
| 64 | ((shiftedWindowFlow C F k ha hb hbδ).metric 0) |
| 65 | spacetimeVectorField := fun _ _ => (1, 0) |
| 66 | spacetimeVectorField_time := fun _ _ => rfl |
| 67 | spacetimeVectorField_spatial_zero := fun _ _ => rfl |
| 68 | |
| 69 | theorem basedWindow_zeroBall (k : ℕ) (ha : a < 0) (hb : 0 < b) (hbδ : b ≤ δ) (r : ℝ) : |
| 70 | (basedWindow C F p k ha hb hbδ).zeroBall r = ((F k).metric (-δ)).ball (p k) r := by |
| 71 | simp only [BasedFlow.zeroBall, basedWindow, shiftedWindowFlow, |
| 72 | RicciFlow.translate, FlowCarrier.metricBall, zero_add] |
| 73 | |
| 74 | noncomputable def windowSequence (ha : a < 0) (hb : 0 < b) (hbδ : b ≤ δ) : |
| 75 | PointedFlowSequence 3 a b where |
| 76 | carrier := C |
| 77 | flow := fun k => basedWindow C F p k ha hb hbδ |
| 78 | |
| 79 | /-- The common factor-four bound gives a complete M07 input on every |
| 80 | buffered finite window of the same actual raw source sequence. -/ |
| 81 | noncomputable def compactnessHypotheses |
| 82 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 83 | {κ : ℝ} (hκ : 0 < κ) |
| 84 | (hc : ∀ k t, t ≤ 0 → MetricComplete ((F k).metric t)) |
| 85 | (hop : ∀ k t, t ≤ 0 → ∀ x, ((F k).connection t).NonnegativeCurvatureOperator x) |
| 86 | (hnc : ∀ k, AncientKappaNoncollapsed (F k) κ) |
| 87 | (L : ℕ → ℝ) (hL : Tendsto L atTop atTop) |
| 88 | (hbound : ∀ k t, t ≤ 0 → ∀ x ∈ ((F k).metric 0).ball (p k) (L k), |
| 89 | |((F k).connection t).curvatureTensorNorm x| ≤ 4) |
| 90 | (ha : a < 0) (hb : 0 < b) (hbδ : b ≤ δ) : |
| 91 | PointedRicciFlowCompactnessHypotheses 3 a b where |
| 92 | time_bounds := ⟨ha, hb⟩ |
| 93 | sequence := windowSequence C F p ha hb hbδ |
| 94 | volume_compatibility := fun _ => rfl |
| 95 | zero_time_ball_compact := by |
| 96 | intro A _ |
| 97 | refine Eventually.of_forall fun k => ?_ |
| 98 | change IsCompact (closure ((basedWindow C F p k ha hb hbδ).zeroBall A)) |
| 99 | rw [basedWindow_zeroBall C F p k ha hb hbδ] |
| 100 | exact ((F k).metric (-δ)).isCompact_closure_ball_of_metricComplete |
| 101 | (hc k (-δ) (by linarith)) (p k) A |
| 102 | spacetime_control := by |
| 103 | intro A hA I _ _ _ hI |
| 104 | refine ⟨4, by norm_num, ?_⟩ |
| 105 | filter_upwards [hL.eventually_ge_atTop A] with k hk |
| 106 | refine ⟨SmoothSpacetimeEmbedding.refl (basedWindow C F p k ha hb hbδ) |
| 107 | (I ×ˢ (basedWindow C F p k ha hb hbδ).zeroBall A), fun _ _ => rfl, |
| 108 | by norm_num, ?_⟩ |
| 109 | intro t ht x hx |
| 110 | change x ∈ (basedWindow C F p k ha hb hbδ).zeroBall A at hx |
| 111 | rw [basedWindow_zeroBall C F p k ha hb hbδ] at hx |
| 112 | have hx0 := ball_subset_terminal C F P hop k (-δ) (by linarith) (p k) A hx |
| 113 | exact (le_abs_self _).trans (hbound k (t - δ) (by linarith [(hI ht).2]) x |
| 114 | (hx0.trans_le (ENNReal.ofReal_le_ofReal hk))) |
| 115 | all_time_curvature_control := by |
| 116 | intro A _ |
| 117 | refine ⟨4, by norm_num, ?_⟩ |
| 118 | filter_upwards [hL.eventually_ge_atTop A] with k hk |
| 119 | dsimp only |
| 120 | intro t₀ ht₀ t ht x hx |
| 121 | have hx0 := ball_subset_terminal C F P hop k (t₀ - δ) |
| 122 | (by linarith [ht₀.2]) (p k) A hx |
| 123 | exact (le_abs_self _).trans (hbound k (t - δ) (by linarith [ht.2]) x |
| 124 | (hx0.trans_le (ENNReal.ofReal_le_ofReal hk))) |
| 125 | noncollapsing := by |
| 126 | have hcal := ENNReal.toReal_pos (euclideanVolumeCalibration_pos 3).ne' |
| 127 | (euclideanVolumeCalibration_ne_top 3) |
| 128 | refine ⟨1 / 2, κ / (euclideanVolumeCalibration 3).toReal, |
| 129 | by norm_num, div_pos hκ hcal, ?_⟩ |
| 130 | filter_upwards [hL.eventually_ge_atTop (1 / 2)] with k hk |
| 131 | have hvol := hnc k (1 / 2) (by norm_num) (-δ) (by linarith) (p k) |
| 132 | (1 / 2) (by norm_num) le_rfl (by |
| 133 | intro s hs x hx |
| 134 | have hx0 := ball_subset_terminal C F P hop k (-δ) (by linarith) (p k) (1 / 2) hx |
| 135 | have h := hbound k s (by linarith [hs.2]) x |
| 136 | (hx0.trans_le (ENNReal.ofReal_le_ofReal hk)) |
| 137 | norm_num at h ⊢ |
| 138 | exact h) |
| 139 | have hraw := calibrated_noncollapse_to_hausdorff (C k) ((F k).metric (-δ)) |
| 140 | (((F k).metric (-δ)).ball (p k) (1 / 2)) hκ (by norm_num) hvol |
| 141 | change ENNReal.ofReal ((κ / (euclideanVolumeCalibration 3).toReal) * (1 / 2) ^ 3) ≤ |
| 142 | (basedWindow C F p k ha hb hbδ).zeroBallVolume (1 / 2) |
| 143 | simpa only [BasedFlow.zeroBallVolume, BasedFlow.zeroBall, FlowCarrier.metricBall, |
| 144 | basedWindow, shiftedWindowFlow, RicciFlow.translate, zero_add] using hraw |
| 145 | |
| 146 | end PoincareMT.RawAncientSequence |