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.Coordinates.RicciFlow |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.RicciFlow |
| 3 | |
| 4 | /-! |
| 5 | # Ancient Ricci flow on one spatial coordinate quotient |
| 6 | |
| 7 | The spatial overlap system is fixed before time is exhausted. Positive smooth |
| 8 | limits of the original metric coefficients construct compatible metrics on all |
| 9 | ancient times. Local-in-time passage of the Ricci equation and the existing |
| 10 | spatial descent theorem then construct one actual ancient Ricci flow. |
| 11 | |
| 12 | Reference: Kleiner--Lott, Appendix E, Theorem E.1, pp. 2848--2849, and the |
| 13 | ancient limit in Corollary 44.1, pp. 2682--2683. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Metric Poincare.Gluing Poincare.Analysis.Calculus |
| 20 | open scoped Topology NNReal Manifold ContDiff |
| 21 | |
| 22 | namespace PoincareMT.ChartDistance |
| 23 | |
| 24 | /-- Actual flows on expanding time domains and their compatible coordinate |
| 25 | limits produce one ancient flow on the original spatial overlap quotient. -/ |
| 26 | theorem exists_ancient_quotientRicciFlow_of_chart_limits |
| 27 | {ι : Type*} [Nonempty ι] {n : ℕ} |
| 28 | (U : ι → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 29 | [∀ i, Nonempty (Piece U i)] |
| 30 | {M : ℕ → Type*} [∀ k, MetricSpace (M k)] |
| 31 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 32 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 33 | (e : ∀ k i, Piece U i → M k) |
| 34 | (D : ∀ i j, C(Piece U i × Piece U j, ℝ)) |
| 35 | (hD : ∀ i j x y, Tendsto (fun k => dist (e k i x) (e k j y)) atTop |
| 36 | (𝓝 (D i j (x, y)))) |
| 37 | (L : ι → ℝ≥0) (he : ∀ k i, LipschitzWith (L i) (e k i)) |
| 38 | (c : ι → ℝ) (hc : ∀ i, 0 < c i) |
| 39 | (hlower : ∀ k i x y, c i * dist x y ≤ dist (e k i x) (e k i y)) |
| 40 | (hopen : ∀ k i, Topology.IsOpenEmbedding (e k i)) |
| 41 | (hconn : ∀ k (p : M k) r, IsPreconnected (ball p r)) |
| 42 | (hsmooth : letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 43 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 44 | ∀ k i, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k i)) |
| 45 | (hbound : ∀ i j, LocallyEventuallyBoundedDerivatives |
| 46 | (Subtype.val '' overlap (fun i j => D i j) i j) |
| 47 | (fun k => coordinateRepresentative U hU |
| 48 | (fun x => Function.invFun (e k j) (e k i x)))) |
| 49 | {T : ℝ} (hT : 0 < T) {J : ℕ → Set ℝ} |
| 50 | (Fseq : ∀ k, RicciFlow n (M k) (J k)) |
| 51 | (htime : ∀ a b : ℝ, b < T → ∀ᶠ k in atTop, Icc a b ⊆ J k) |
| 52 | (B : ι → ℝ × EuclideanSpace ℝ (Fin n) → |
| 53 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 54 | (hBsmooth : ∀ i, ContDiffOn ℝ ∞ (B i) (Iio T ×ˢ U i)) |
| 55 | (hBjets : ∀ i m K, IsCompact K → K ⊆ Iio T ×ˢ U i → TendstoUniformlyOn |
| 56 | (fun k => iteratedFDeriv ℝ m (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 57 | ((Fseq k).metric z.1).pullbackCoefficients |
| 58 | (chartParametrization U hU (e k i)) z.2)) |
| 59 | (iteratedFDeriv ℝ m (B i)) atTop K) |
| 60 | (hpositive : ∀ t ∈ Iio T, ∀ i x, x ∈ U i → ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, |
| 61 | ∀ v, a * ‖v‖ ^ 2 ≤ ((Fseq k).metric t).pullbackCoefficients |
| 62 | (chartParametrization U hU (e k i)) x v v) : |
| 63 | letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 64 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 65 | letI : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 66 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 67 | letI : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 68 | let O := overlapSystem hD L he c hc hlower hopen hconn |
| 69 | let hO := overlapSystem_smooth U hU hD L he c hc hlower hopen hconn hsmooth hbound |
| 70 | letI := quotientChartedSpace U hU O |
| 71 | letI := quotient_isManifold U hU O hO |
| 72 | ∃ (g : ℝ → ∀ i, CanonicalMetric U hU i) |
| 73 | (hcompat : ∀ t, CompatibleMetrics U hU O (g t)) |
| 74 | (F : RicciFlow n (Quotient O.setoid) (Iio T)), |
| 75 | F.metric = (fun t => quotientMetric U hU O hO (g t) (hcompat t)) ∧ |
| 76 | ∀ t ∈ Iio T, ∀ i (x : Piece U i) v w, |
| 77 | (g t i).inner x v w = B i (t, x) v w := by |
| 78 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 79 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 80 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 81 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 82 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 83 | let O := overlapSystem hD L he c hc hlower hopen hconn |
| 84 | let hO := overlapSystem_smooth U hU hD L he c hc hlower hopen hconn hsmooth hbound |
| 85 | let := quotientChartedSpace U hU O |
| 86 | let := quotient_isManifold U hU O hO |
| 87 | have hBlocal (i : ι) : TendstoLocallyUniformlyOn |
| 88 | (fun k z => ((Fseq k).metric z.1).pullbackCoefficients |
| 89 | (chartParametrization U hU (e k i)) z.2) |
| 90 | (B i) atTop (Iio T ×ˢ U i) := |
| 91 | CoordinateTransition.locallyUniformly_of_tendsto_zeroJet |
| 92 | (isOpen_Iio.prod (hU i)) (hBjets i 0) |
| 93 | have hBslice : ∀ t ∈ Iio T, ∀ i, TendstoLocallyUniformlyOn |
| 94 | (fun k => ((Fseq k).metric t).pullbackCoefficients |
| 95 | (chartParametrization U hU (e k i))) |
| 96 | (fun x => B i (t, x)) atTop (U i) := by |
| 97 | intro t ht i |
| 98 | exact (hBlocal i).comp (fun x => (t, x)) (fun _ hx => ⟨ht, hx⟩) |
| 99 | (continuous_const.prodMk continuous_id).continuousOn |
| 100 | obtain ⟨g, hcompat, hcoeff, hfamily, _⟩ := |
| 101 | exists_compatibleMetricFamilies_of_spacetime_limits U hU hD L he c hc hlower |
| 102 | hopen hconn hsmooth 0 hT (fun k => (Fseq k).metric) B hBslice |
| 103 | hBsmooth hpositive hbound |
| 104 | have hlocal : ∀ i, ∃ F : RicciFlow n (Piece U i) (Iio T), |
| 105 | F.metric = fun t => g t i := by |
| 106 | intro i |
| 107 | exact exists_ancientRicciFlow_on_coordinate_limit U hU Fseq htime |
| 108 | i (fun k => e k i) (fun k => hsmooth k i) (fun t => g t i) |
| 109 | (hfamily i) (B i) (fun t ht => hcoeff t ht i) (hBjets i) |
| 110 | choose Fchart hFchart using hlocal |
| 111 | obtain ⟨FQ, hFQ⟩ := exists_quotientRicciFlow_of_chart_flows U hU O hO |
| 112 | g hcompat Fchart hFchart |
| 113 | exact ⟨g, hcompat, FQ, hFQ, hcoeff⟩ |
| 114 | |
| 115 | end PoincareMT.ChartDistance |