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.Restriction |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Interval.Maps |
| 3 | import Mathlib.Geometry.Manifold.LocalDiffeomorph |
| 4 | |
| 5 | /-! |
| 6 | # Relatively open interval inclusions and their smooth local inverses |
| 7 | -/ |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set Topology |
| 13 | open scoped Manifold ContDiff Topology |
| 14 | |
| 15 | open PoincareMT |
| 16 | |
| 17 | namespace Poincare.Spacetime.Realization |
| 18 | |
| 19 | theorem intervalInclusion_range (K L : SpacetimeInterval) (h : L.domain ⊆ K.domain) : |
| 20 | range (spacetimeIntervalInclusion (smoothInterval L) (smoothInterval K) h) = |
| 21 | {t : (smoothInterval K).Point | t.val ∈ L.domain} := by |
| 22 | ext t |
| 23 | constructor |
| 24 | · rintro ⟨s, rfl⟩ |
| 25 | exact s.property |
| 26 | · intro ht |
| 27 | exact ⟨⟨t.val, ht⟩, Subtype.ext rfl⟩ |
| 28 | |
| 29 | theorem intervalInclusion_openEmbedding (K L : SpacetimeInterval) |
| 30 | (h : L.domain ⊆ K.domain) (ho : IsOpen {t : K.domain | t.val ∈ L.domain}) : |
| 31 | IsOpenEmbedding (spacetimeIntervalInclusion (smoothInterval L) (smoothInterval K) h) := |
| 32 | ⟨intervalInclusion_embedding intervalSystem K L h, (intervalInclusion_range K L h).symm ▸ ho⟩ |
| 33 | |
| 34 | noncomputable def intervalInclusionHomeomorph (K L : SpacetimeInterval) |
| 35 | (h : L.domain ⊆ K.domain) (ho : IsOpen {t : K.domain | t.val ∈ L.domain}) : |
| 36 | OpenPartialHomeomorph (smoothInterval L).Point (smoothInterval K).Point := by |
| 37 | letI : Nonempty (smoothInterval L).Point := L.nontrivial.nonempty.to_subtype |
| 38 | exact (intervalInclusion_openEmbedding K L h ho).toOpenPartialHomeomorph |
| 39 | (spacetimeIntervalInclusion (smoothInterval L) (smoothInterval K) h) |
| 40 | |
| 41 | theorem intervalInclusionHomeomorph_inverse_smooth (K L : SpacetimeInterval) |
| 42 | (h : L.domain ⊆ K.domain) (ho : IsOpen {t : K.domain | t.val ∈ L.domain}) : |
| 43 | ContMDiffOn (𝓡∂ 1) (𝓡∂ 1) ∞ (intervalInclusionHomeomorph K L h ho).symm |
| 44 | (intervalInclusionHomeomorph K L h ho).target := by |
| 45 | let := intervalChartedSpace K |
| 46 | let := intervalChartedSpace L |
| 47 | let e := intervalInclusionHomeomorph K L h ho |
| 48 | intro t ht |
| 49 | apply ContMDiffAt.contMDiffWithinAt |
| 50 | apply (contMDiffAt_interval_iff L).mpr |
| 51 | apply ((smoothInterval K).inclusion_smooth t).congr_of_eventuallyEq |
| 52 | filter_upwards [e.open_target.mem_nhds ht] with s hs |
| 53 | exact congrArg Subtype.val (e.right_inv hs) |
| 54 | |
| 55 | theorem intervalInclusion_localDiffeomorph (K L : SpacetimeInterval) |
| 56 | (h : L.domain ⊆ K.domain) (ho : IsOpen {t : K.domain | t.val ∈ L.domain}) : |
| 57 | IsLocalDiffeomorph (𝓡∂ 1) (𝓡∂ 1) ∞ |
| 58 | (spacetimeIntervalInclusion (smoothInterval L) (smoothInterval K) h) := by |
| 59 | let := intervalChartedSpace K |
| 60 | let := intervalChartedSpace L |
| 61 | intro t |
| 62 | let e := intervalInclusionHomeomorph K L h ho |
| 63 | exact ⟨{ |
| 64 | toPartialEquiv := e.toPartialEquiv |
| 65 | open_source := e.open_source |
| 66 | open_target := e.open_target |
| 67 | contMDiffOn_toFun := (smoothInterval_inclusion_smooth L K h).contMDiffOn |
| 68 | contMDiffOn_invFun := intervalInclusionHomeomorph_inverse_smooth K L h ho |
| 69 | }, mem_univ t, fun _ _ ↦ rfl⟩ |
| 70 | |
| 71 | end Poincare.Spacetime.Realization |