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.Interval.ProductMaps |
| 2 | |
| 3 | /-! |
| 4 | # The specified compatible cylinders on a relatively open time cover |
| 5 | -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | open Set Function |
| 11 | open scoped Manifold ContDiff Topology |
| 12 | |
| 13 | universe u v w |
| 14 | |
| 15 | open PoincareMT |
| 16 | |
| 17 | namespace Poincare.Spacetime.Realization |
| 18 | |
| 19 | structure CylinderTimeCover {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 20 | {time : X → ℝ} {I : SpacetimeInterval} (F : GeneralizedFlowSpacetime n X time I) |
| 21 | (K : SpacetimeInterval) (C : Type v) [TopologicalSpace C] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] where |
| 23 | index : Type w |
| 24 | interval : index → SpacetimeInterval |
| 25 | subset : ∀ b, (interval b).domain ⊆ K.domain |
| 26 | open_time : ∀ b, IsOpen {t : K.domain | t.val ∈ (interval b).domain} |
| 27 | covers : ∀ t : K.domain, ∃ b, t.val ∈ (interval b).domain |
| 28 | cylinder : ∀ b, CompatibleSpacetimeCylinder F (smoothInterval (interval b)) C |
| 29 | agree : ∀ b c t (hb : t ∈ (interval b).domain) (hc : t ∈ (interval c).domain) x, |
| 30 | (cylinder b).toSpacetime (⟨t, hb⟩, x) = (cylinder c).toSpacetime (⟨t, hc⟩, x) |
| 31 | |
| 32 | namespace CylinderTimeCover |
| 33 | |
| 34 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 35 | {I K : SpacetimeInterval} {F : GeneralizedFlowSpacetime n X time I} |
| 36 | {C : Type v} [TopologicalSpace C] [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] |
| 37 | [IsManifold (𝓡 n) ∞ C] (D : CylinderTimeCover.{u, v, w} F K C) |
| 38 | |
| 39 | noncomputable def map (p : (smoothInterval K).Point × C) : F.Point := |
| 40 | (D.cylinder (Classical.choose (D.covers p.1))).toSpacetime |
| 41 | (⟨p.1.val, Classical.choose_spec (D.covers p.1)⟩, p.2) |
| 42 | |
| 43 | theorem map_eq (b : D.index) (t : (smoothInterval (D.interval b)).Point) (x : C) : |
| 44 | D.map (spacetimeIntervalInclusion (smoothInterval (D.interval b)) |
| 45 | (smoothInterval K) (D.subset b) t, x) = (D.cylinder b).toSpacetime (t, x) := by |
| 46 | exact D.agree _ b t.val _ t.property x |
| 47 | |
| 48 | theorem map_time (p : (smoothInterval K).Point × C) : F.timeFunction (D.map p) = p.1.val := |
| 49 | (D.cylinder (Classical.choose (D.covers p.1))).time_eq _ |
| 50 | |
| 51 | theorem map_smooth : ContMDiff (spacetimeModel n) (spacetimeModel n) ∞ D.map := by |
| 52 | let := F.chartedSpace |
| 53 | let := intervalChartedSpace K |
| 54 | apply interval_product_smooth_of_local K D.interval D.subset D.open_time D.covers |
| 55 | intro b |
| 56 | have heq : D.map ∘ Prod.map (spacetimeIntervalInclusion (smoothInterval (D.interval b)) |
| 57 | (smoothInterval K) (D.subset b)) id = (D.cylinder b).toSpacetime := |
| 58 | funext fun p ↦ D.map_eq b p.1 p.2 |
| 59 | rw [heq] |
| 60 | exact (D.cylinder b).smooth |
| 61 | |
| 62 | end CylinderTimeCover |
| 63 | end Poincare.Spacetime.Realization |