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.TimeGluing |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.LocalFlows |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Regularity |
| 4 | |
| 5 | /-! |
| 6 | # Ancient Ricci flows from coordinate limits on expanding time domains |
| 7 | |
| 8 | On every bounded interval below the terminal time, a tail of the source flows |
| 9 | has a common time domain. Its bilinear spacetime jets realize the prescribed |
| 10 | limit metric as a Ricci flow there. The local realizations then assemble with |
| 11 | exactly the original total metric family. |
| 12 | |
| 13 | This is the local Ricci-equation step in Kleiner--Lott, Corollary 44.1, |
| 14 | pp. 2682--2683, using Appendix E, pp. 2848--2849. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter Poincare.Gluing Poincare.Analysis.Calculus |
| 21 | open scoped Manifold ContDiff Topology |
| 22 | |
| 23 | namespace PoincareMT.ChartDistance |
| 24 | |
| 25 | variable {ι : Type*} {n : ℕ} |
| 26 | (U : ι → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 27 | [∀ i, Nonempty (Piece U i)] |
| 28 | |
| 29 | /-- Smooth coordinate limits of flows on expanding time domains satisfy the |
| 30 | Ricci equation on the whole ancient interval, with the prescribed metric. -/ |
| 31 | theorem exists_ancientRicciFlow_on_coordinate_limit |
| 32 | {M : ℕ → Type*} [∀ k, TopologicalSpace (M k)] |
| 33 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 34 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 35 | {T : ℝ} {J : ℕ → Set ℝ} (Fseq : ∀ k, RicciFlow n (M k) (J k)) |
| 36 | (htime : ∀ a b : ℝ, b < T → ∀ᶠ k in atTop, Icc a b ⊆ J k) |
| 37 | (i : ι) (e : ∀ k, Piece U i → M k) |
| 38 | (he : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 39 | ∀ k, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k)) |
| 40 | (g : ℝ → CanonicalMetric U hU i) |
| 41 | (hg : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 42 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 43 | RiemannianMetric.IsSmoothFamilyOn g (Iio T)) |
| 44 | (B : ℝ × EuclideanSpace ℝ (Fin n) → |
| 45 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 46 | (hcoeff : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 47 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 48 | ∀ t ∈ Iio T, ∀ (x : Piece U i) v w, (g t).inner x v w = B (t, x) v w) |
| 49 | (hjet : ∀ m K, IsCompact K → K ⊆ Iio T ×ˢ U i → TendstoUniformlyOn |
| 50 | (fun k => iteratedFDeriv ℝ m (fun p : ℝ × EuclideanSpace ℝ (Fin n) => |
| 51 | ((Fseq k).metric p.1).pullbackCoefficients (chartParametrization U hU (e k)) p.2)) |
| 52 | (iteratedFDeriv ℝ m B) atTop K) : |
| 53 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 54 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 55 | ∃ F : RicciFlow n (Piece U i) (Iio T), F.metric = g := by |
| 56 | let := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 57 | let := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 58 | apply RicciFlow.exists_ancient_of_local_metric_realizations g hg |
| 59 | intro t ht |
| 60 | let a := t - 1 |
| 61 | let b := (t + T) / 2 |
| 62 | have ha : a < t := by dsimp [a]; linarith |
| 63 | have htb : t < b := by dsimp [b]; linarith |
| 64 | have hb : b < T := by dsimp [b]; linarith |
| 65 | have hwin : Ioo a b ⊆ Iio T := fun s hs ↦ hs.2.trans hb |
| 66 | have hne : (Ioo a b).Nontrivial := by |
| 67 | refine ⟨t, ⟨ha, htb⟩, (t + b) / 2, ⟨?_, ?_⟩, ?_⟩ <;> linarith |
| 68 | obtain ⟨N, hN⟩ := eventually_atTop.mp (htime a b hb) |
| 69 | let Ftail (k : ℕ) : RicciFlow n (M (k + N)) (Ioo a b) := |
| 70 | Poincare.Geometry.RicciFlow.Harnack.restrictFlow (Fseq (k + N)) |
| 71 | (fun _ hs ↦ hN (k + N) (by omega) (Ioo_subset_Icc_self hs)) |
| 72 | ordConnected_Ioo hne |
| 73 | refine ⟨Ioo a b, isOpen_Ioo, ⟨ha, htb⟩, ?_⟩ |
| 74 | apply exists_ricciFlow_on_coordinate_limit U hU isOpen_Ioo Ftail i |
| 75 | (fun k ↦ e (k + N)) (fun k ↦ he (k + N)) g |
| 76 | (hg.mono (prod_mono hwin (Subset.refl _))) B |
| 77 | (fun s hs ↦ hcoeff s (hwin hs)) |
| 78 | intro m K hK hKU |
| 79 | have hconv := hjet m K hK (hKU.trans (prod_mono hwin (Subset.refl _))) |
| 80 | intro V hV |
| 81 | exact (tendsto_add_atTop_nat N).eventually (hconv V hV) |
| 82 | |
| 83 | end PoincareMT.ChartDistance |