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.Surgery.Singular.RegularLimit.Spacetime.Maps |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Spacetime.OldBoxes |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Spacetime.ReferenceCompatibility |
| 4 | |
| 5 | /-! # Worldline compatibility of the two spacetime charts -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | open Set |
| 10 | open scoped Manifold ContDiff Bundle Topology |
| 11 | |
| 12 | universe u |
| 13 | |
| 14 | namespace PoincareMT.SingularTimeAssumptions |
| 15 | |
| 16 | variable {M : Type u} [TopologicalSpace M] |
| 17 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 18 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 19 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 20 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 21 | |
| 22 | /-- Agreement of an old box and a regular-cylinder worldline at one time |
| 23 | implies agreement at every common time. -/ |
| 24 | theorem regularSpacetimeForward_eq_oldBox_of_eq |
| 25 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 26 | (b : F.box_index) (x : (F.box b).carrier.carrier) (y : H.regularRegion P04) |
| 27 | {t : ℝ} (ht : t ∈ Ioc H.reference.tMinus T) (hbt : t ∈ (F.box b).interval) |
| 28 | (heq : H.regularSpacetimeForward P04 (⟨t, ht⟩, y) = |
| 29 | H.oldSpacetimeForward P04 ⟨t, (F.box b).forward t hbt x⟩) |
| 30 | {s : ℝ} (hs : s ∈ Ioc H.reference.tMinus T) (hbs : s ∈ (F.box b).interval) : |
| 31 | H.regularSpacetimeForward P04 (⟨s, hs⟩, y) = |
| 32 | H.oldSpacetimeForward P04 ⟨s, (F.box b).forward s hbs x⟩ := by |
| 33 | have htT := (H.interval_preterminal (F.box_interval_subset b hbt)).2 |
| 34 | have hsT := (H.interval_preterminal (F.box_interval_subset b hbs)).2 |
| 35 | rw [H.regularSpacetimeForward_old P04 t ht htT] at heq |
| 36 | have hbase : H.reference.forward t ⟨ht.1.le, htT⟩ y = (F.box b).forward t hbt x := |
| 37 | eq_of_heq (Sigma.mk.inj_iff.mp (H.oldSpacetimeForward_injective P04 heq)).2 |
| 38 | rw [H.regularSpacetimeForward_old P04 s hs hsT] |
| 39 | apply congrArg (H.oldSpacetimeForward P04) |
| 40 | apply congrArg (Sigma.mk s) |
| 41 | exact H.reference.forward_eq_of_eq b x (y : M) ⟨ht.1.le, htT⟩ hbt hbase |
| 42 | ⟨hs.1.le, hsT⟩ hbs |
| 43 | |
| 44 | /-- Two regular-cylinder worldlines that meet have the same spatial label. -/ |
| 45 | theorem regularSpacetimeForward_eq_of_eq |
| 46 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 47 | (x y : H.regularRegion P04) {t : ℝ} (ht : t ∈ Ioc H.reference.tMinus T) |
| 48 | (heq : H.regularSpacetimeForward P04 (⟨t, ht⟩, x) = |
| 49 | H.regularSpacetimeForward P04 (⟨t, ht⟩, y)) |
| 50 | {s : ℝ} (hs : s ∈ Ioc H.reference.tMinus T) : |
| 51 | H.regularSpacetimeForward P04 (⟨s, hs⟩, x) = |
| 52 | H.regularSpacetimeForward P04 (⟨s, hs⟩, y) := by |
| 53 | have hxy := congrArg Prod.snd (H.regularSpacetimeForward_injective P04 heq) |
| 54 | exact congrArg (fun z => H.regularSpacetimeForward P04 (⟨s, hs⟩, z)) hxy |
| 55 | |
| 56 | end PoincareMT.SingularTimeAssumptions |