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.Compactness.Ancient.Window |
| 2 | import PoincareLib.Geometry.RicciFlow.Completeness |
| 3 | |
| 4 | /-! |
| 5 | # Completeness of a bounded ancient flow |
| 6 | |
| 7 | The complete reference slice and the curvature bound of the actual ancient |
| 8 | flow give completeness at every time by finite-window metric comparison. |
| 9 | Reference: Kleiner--Lott, Appendix E, Corollary E.2, pp. 2848--2849. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | namespace PoincareMT.RicciFlow |
| 18 | |
| 19 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 20 | FlowCarrier.isManifold |
| 21 | |
| 22 | /-- A globally bounded ancient flow with a complete zero slice is complete |
| 23 | throughout its ancient time interval. -/ |
| 24 | theorem metricComplete_of_ancient_uniform_curvature_bound |
| 25 | {n : ℕ} (C : FlowCarrier n) {T K : ℝ} (hT : 0 < T) |
| 26 | (F : RicciFlow n C.carrier (Iio T)) (p : C.carrier) |
| 27 | (hcomplete : C.metricComplete (F.metric 0)) (hK : 0 ≤ K) |
| 28 | (hbound : ∀ t ∈ Iio T, ∀ x, (F.connection t).curvatureTensorNorm x ≤ K) : |
| 29 | ∀ t ∈ Iio T, C.metricComplete (F.metric t) := by |
| 30 | intro t ht |
| 31 | let a := min t 0 - 1 |
| 32 | have ha : a < 0 := by dsimp [a]; linarith [min_le_right t 0] |
| 33 | have hat : a < t := by dsimp [a]; linarith [min_le_left t 0] |
| 34 | let B := C.basedWindow F p (fun _ hs => hs.2 : Ioo a T ⊆ Iio T) (ha.trans hT) |
| 35 | exact B.complete_interior_of_two_time_curvature_bound ⟨ha, hT⟩ hcomplete |
| 36 | (fun _ _ => ⟨K, hK, fun _ _ s hs x _ => hbound s hs.2 x⟩) t ⟨hat, ht⟩ |
| 37 | |
| 38 | end PoincareMT.RicciFlow |