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.Limit.CoordinateRicci |
| 2 | import PoincareLib.Geometry.RicciFlow.Limit.TimeDerivative |
| 3 | |
| 4 | /-! |
| 5 | # Passing the Ricci-flow equation to a smooth positive metric limit |
| 6 | |
| 7 | Second spatial scalar jets give Ricci convergence. Actual first time |
| 8 | derivatives then pass the source equation to the limit. This is the equation |
| 9 | preservation step of Morgan--Tian, Proposition 5.14, pp. 90--91. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | open Filter |
| 16 | |
| 17 | namespace PoincareMT.RicciFlow |
| 18 | |
| 19 | /-- Smooth positive metric limits preserve the retained Ricci-flow equation. |
| 20 | Only second spatial scalar jets and the actual first time derivatives are used. -/ |
| 21 | theorem equation_of_coordinate_jets |
| 22 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {J : Set ℝ} (Fseq : ℕ → RicciFlow n M J) |
| 25 | (g : ℝ → RiemannianMetric n M) (D : ∀ t, LeviCivitaData (g t)) |
| 26 | (hJ : IsOpen J) (hg : RiemannianMetric.IsSmoothFamilyOn g J) |
| 27 | (hspace : ∀ t ∈ J, ∀ x : M, ∀ r : ℕ, r ≤ 2 → ∀ a c : Fin n, |
| 28 | Tendsto (fun k => iteratedFDeriv ℝ r |
| 29 | (fun y => ((Fseq k).metric t).pullbackCoefficients |
| 30 | (extChartAt (𝓡 n) x).symm y |
| 31 | (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 32 | (EuclideanSpace.basisFun (Fin n) ℝ c)) (extChartAt (𝓡 n) x x)) atTop |
| 33 | (𝓝 (iteratedFDeriv ℝ r |
| 34 | (fun y => (g t).pullbackCoefficients (extChartAt (𝓡 n) x).symm y |
| 35 | (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 36 | (EuclideanSpace.basisFun (Fin n) ℝ c)) (extChartAt (𝓡 n) x x)))) |
| 37 | (htime : ∀ t ∈ J, ∀ (x : M) (u v : TangentSpace (𝓡 n) x), |
| 38 | Tendsto (fun k => deriv (fun s => ((Fseq k).metric s).inner x u v) t) atTop |
| 39 | (𝓝 (deriv (fun s => (g s).inner x u v) t))) : |
| 40 | ∀ t ∈ J, ∀ (x : M) (u v : TangentSpace (𝓡 n) x), |
| 41 | HasDerivWithinAt (fun s => (g s).inner x u v) (-2 * (D t).ricci x u v) J t := by |
| 42 | intro t ht x u v |
| 43 | have hRic := LeviCivitaData.tendsto_ricci_of_coordinate_jets |
| 44 | (fun k => (Fseq k).connection t) (D t) x u v (hspace t ht x) |
| 45 | have heq (k : ℕ) : deriv (fun s => ((Fseq k).metric s).inner x u v) t = |
| 46 | -2 * ((Fseq k).connection t).ricci x u v := |
| 47 | (((Fseq k).equation t ht x u v).hasDerivAt (hJ.mem_nhds ht)).deriv |
| 48 | have hlimit : deriv (fun s => (g s).inner x u v) t = -2 * (D t).ricci x u v := by |
| 49 | apply tendsto_nhds_unique (htime t ht x u v) |
| 50 | simpa only [heq] using hRic.const_mul (-2) |
| 51 | rw [← hlimit] |
| 52 | exact (hg.hasDerivAt_inner hJ ht x u v).hasDerivWithinAt |
| 53 | |
| 54 | end PoincareMT.RicciFlow |