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.CurveShortening.Evolution.CovariantTheory |
| 2 | import PoincareLib.Geometry.RicciFlow.Spacetime.Product.Metric |
| 3 | import PoincareLib.Geometry.RicciFlow.Spacetime.Product.TimeSpatialPairing |
| 4 | import PoincareLib.Geometry.RicciFlow.Spacetime.Product.Gauss |
| 5 | import PoincareLib.Geometry.RicciFlow.Spacetime.Product.Codazzi |
| 6 | |
| 7 | /-! |
| 8 | # The complete actual spacetime identities |
| 9 | |
| 10 | Package the actual metric, connection and curvature formulas in the frozen |
| 11 | spacetime output. This follows MT2015Correction (0.1)-(0.2), p. 2, and |
| 12 | Lemma 0.2, pp. 4-6. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | namespace PoincareMT.M62 |
| 20 | |
| 21 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | {a b : ℝ} |
| 24 | |
| 25 | /-- All frozen identities hold for the actual spacetime data; |
| 26 | MT2015Correction (0.1)-(0.2), p. 2, and Lemma 0.2, pp. 4-6. -/ |
| 27 | theorem SpacetimeData.identities {F : RicciFlow n M (Set.Icc a b)} |
| 28 | (G : SpacetimeData F) : SpacetimeIdentities G where |
| 29 | time_smooth := G.charts.timeVector_smooth |
| 30 | time_unit := G.time_unit |
| 31 | time_parallel_time := G.time_parallel_time |
| 32 | spatial_connection := G.spatial_connection |
| 33 | spatial_time_vertical := fun q V => G.time_covariant_vertical q (G.charts.horizontal q V) |
| 34 | spatial_time_pairing := G.spatial_time_pairing |
| 35 | time_spatial_vertical := G.time_spatial_vertical |
| 36 | time_spatial_pairing := G.time_spatial_pairing |
| 37 | gauss := G.gauss |
| 38 | codazzi := G.codazzi |
| 39 | |
| 40 | /-- The genuine open spacetime exists with all its connection and curvature |
| 41 | identities; MT2015Correction p. 2 and Lemma 0.2, pp. 4-6. -/ |
| 42 | theorem exists_spacetimeData [T2Space M] [SecondCountableTopology M] |
| 43 | (F : RicciFlow n M (Set.Icc a b)) : |
| 44 | ∃ G : SpacetimeData F, SpacetimeIdentities G := by |
| 45 | obtain ⟨C⟩ := nonempty_spacetimeCharts (n := n) (M := M) a b |
| 46 | obtain ⟨G⟩ := nonempty_spacetimeData_of_charts F C |
| 47 | exact ⟨G, G.identities⟩ |
| 48 | |
| 49 | end PoincareMT.M62 |