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.Spacetime.Realization.Slice.Metric |
| 2 | import PoincareLib.Geometry.Spacetime.Slice |
| 3 | |
| 4 | /-! |
| 5 | # Boundaryless metric geometry on the literal time fibers |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open scoped Manifold ContDiff Bundle Topology |
| 12 | |
| 13 | open PoincareMT |
| 14 | |
| 15 | namespace Poincare.Spacetime.Realization |
| 16 | |
| 17 | variable {n : ℕ} {X : Type*} [TopologicalSpace X] [T2Space X] [SecondCountableTopology X] |
| 18 | |
| 19 | noncomputable def adaptedSliceGeometry (A : AdaptedMetricAtlas n X) (t : ℝ) : |
| 20 | SpacetimeSliceGeometry (adaptedSpacetime A) t where |
| 21 | chartedSpace := adaptedSliceChartedSpace A t |
| 22 | isManifold := adaptedSlice_isManifold A t |
| 23 | t3Space := by |
| 24 | let : T3Space X := adapted_t3Space A |
| 25 | infer_instance |
| 26 | secondCountable := @TopologicalSpace.Subtype.secondCountableTopology X _ {p | A.time p = t} |
| 27 | ‹SecondCountableTopology X› |
| 28 | measurableSpace := borel _ |
| 29 | borelSpace := by |
| 30 | change @BorelSpace (spacetimeSlice A.time t) _ (borel (spacetimeSlice A.time t)) |
| 31 | exact @BorelSpace.mk (spacetimeSlice A.time t) _ (borel _) rfl |
| 32 | inclusion_smooth := slice_inclusion_smooth A t |
| 33 | inclusion_embedding := Topology.IsEmbedding.subtypeVal |
| 34 | inclusion_differential_injective := slice_inclusion_differential_injective A t |
| 35 | tangentEquiv := sliceHorizontalEquiv A t |
| 36 | tangentEquiv_eq := sliceHorizontalEquiv_eq A t |
| 37 | metric := adaptedSliceMetric A t |
| 38 | metric_eq := fun _ _ _ ↦ rfl |
| 39 | |
| 40 | end Poincare.Spacetime.Realization |