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.Worldline.Uniqueness |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Cylinder.Gluing |
| 3 | import PoincareLib.Geometry.Spacetime.Realization.Cylinder.Metric |
| 4 | import PoincareLib.Geometry.Spacetime.Realization.Cylinder.SourceRestriction |
| 5 | import PoincareLib.Geometry.Spacetime.Cylinder.Theory |
| 6 | |
| 7 | /-! |
| 8 | # The complete compatible-domain theory for the realized spacetime |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open scoped Manifold ContDiff Topology |
| 15 | |
| 16 | universe u v |
| 17 | |
| 18 | open PoincareMT |
| 19 | |
| 20 | namespace Poincare.Spacetime.Realization |
| 21 | |
| 22 | theorem adaptedCompatibleTheory {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 23 | [T2Space X] [SecondCountableTopology X] (A : AdaptedMetricAtlas n X) : |
| 24 | CompatibleSpacetimeTheory.{u, v} (adaptedSpacetime A) intervalSystem where |
| 25 | worldline_unique := adapted_worldline_unique A |
| 26 | embedding_unique := by |
| 27 | intro C _ K L e f s hsK hsL source he hf t htK htL x |
| 28 | exact adapted_embedding_unique A K L e f s hsK hsL source he hf t htK htL x |
| 29 | embedding_time_restrict := by |
| 30 | intro C _ K L h e |
| 31 | exact ⟨embeddingTimeRestrict intervalSystem K L h e, fun _ _ ↦ rfl⟩ |
| 32 | cylinder_time_restrict := by |
| 33 | intro C _ _ _ K L h e |
| 34 | exact ⟨cylinderTimeRestrict intervalSystem K L h e, fun _ _ ↦ rfl⟩ |
| 35 | embedding_source_restrict := by |
| 36 | intro C C' _ _ K e j hj |
| 37 | exact ⟨embeddingSourceRestrict e j hj, fun _ _ ↦ rfl⟩ |
| 38 | cylinder_open_restrict := by |
| 39 | intro C _ _ _ K e U |
| 40 | exact ⟨cylinderOpenRestrict e U, fun _ _ ↦ rfl⟩ |
| 41 | cylinder_glue := by |
| 42 | intro C _ _ _ K B J hsub ho hc e he |
| 43 | let D : CylinderTimeCover (adaptedSpacetime A) K C := { |
| 44 | index := B |
| 45 | interval := J |
| 46 | subset := hsub |
| 47 | open_time := ho |
| 48 | covers := hc |
| 49 | cylinder := e |
| 50 | agree := he |
| 51 | } |
| 52 | exact ⟨D.glued, D.glued_eq, D.glued_based⟩ |
| 53 | cylinder_metric := by |
| 54 | intro C _ _ _ K e |
| 55 | exact ⟨pulledCylinderMetric e⟩ |
| 56 | |
| 57 | end Poincare.Spacetime.Realization |