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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.IntrinsicGeometry.IntrinsicOpenMetric |
| 3 | |
| 4 | /-! |
| 5 | # The guarded partial diffeomorphism of actual open inclusion |
| 6 | |
| 7 | Keep the inherited manifold structure and the original total inverse. |
| 8 | This is used twice in the raw source map for Morgan--Tian Proposition |
| 9 | 10.7, p. 253; M28 derivation 102. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M28 |
| 20 | |
| 21 | variable {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 23 | |
| 24 | /-- The actual inclusion has full subtype source and the literal open set |
| 25 | as target. Its inverse is smooth only on that target. |
| 26 | Source: Proposition 10.7, p. 253; M28 derivation 102. -/ |
| 27 | noncomputable def openSubtypePartialDiffeomorph (U : TopologicalSpace.Opens M) |
| 28 | (hne : Nonempty U) : PartialDiffeomorph (𝓡 3) (𝓡 3) U M ∞ := |
| 29 | let e := U.openPartialHomeomorphSubtypeCoe hne |
| 30 | { toPartialEquiv := e.toPartialEquiv |
| 31 | open_source := e.open_source |
| 32 | open_target := e.open_target |
| 33 | contMDiffOn_toFun := (contMDiff_subtype_val (I := 𝓡 3) (U := U)).contMDiffOn |
| 34 | contMDiffOn_invFun := by |
| 35 | change ContMDiffOn (𝓡 3) (𝓡 3) ∞ e.symm e.target |
| 36 | rw [show e.target = (U : Set M) from U.openPartialHomeomorphSubtypeCoe_target hne] |
| 37 | exact openSubtypeInverse_contMDiffOn U hne } |
| 38 | |
| 39 | /-- The inclusion is defined smoothly on its entire actual subtype. |
| 40 | Source: the raw-stage composition in M28 derivation 102. -/ |
| 41 | @[simp] theorem openSubtypePartialDiffeomorph_source |
| 42 | (U : TopologicalSpace.Opens M) (hne : Nonempty U) : |
| 43 | (openSubtypePartialDiffeomorph U hne).source = univ := |
| 44 | U.openPartialHomeomorphSubtypeCoe_source hne |
| 45 | |
| 46 | /-- The inverse domain is precisely the original open subset. |
| 47 | Source: the raw-stage composition in M28 derivation 102. -/ |
| 48 | @[simp] theorem openSubtypePartialDiffeomorph_target |
| 49 | (U : TopologicalSpace.Opens M) (hne : Nonempty U) : |
| 50 | (openSubtypePartialDiffeomorph U hne).target = (U : Set M) := |
| 51 | U.openPartialHomeomorphSubtypeCoe_target hne |
| 52 | |
| 53 | /-- Forward evaluation is the unchanged subtype inclusion. |
| 54 | Source: the exact metric-map identity in M28 derivation 102. -/ |
| 55 | @[simp] theorem openSubtypePartialDiffeomorph_apply |
| 56 | (U : TopologicalSpace.Opens M) (hne : Nonempty U) (x : U) : |
| 57 | openSubtypePartialDiffeomorph U hne x = x.val := rfl |
| 58 | |
| 59 | end PoincareMT.M28 |