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.Induction.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Spacetime.GeneralizedCylinderSpatial |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.Gauge.SliceMap |
| 4 | |
| 5 | /-! |
| 6 | # Smooth spatial inverses of the actual cap cylinder |
| 7 | |
| 8 | Proposition 16.13, pp. 377-378. The raw cylinder has a smooth inverse |
| 9 | within its image. Its actual injective spatial differential has full |
| 10 | rank, so that image is open and the supplied inverse is smooth there. |
| 11 | Together with M12's local product factorization, this is the local |
| 12 | regularity input for the physical inverse-cylinder curve. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The actual spatial tangent models have the same finite dimension. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Function |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M12 |
| 25 | end PoincareMT.Proofs.M12 |
| 26 | open PoincareMT.EpochExtension.Spacetime |
| 27 | |
| 28 | namespace PoincareMT.Proofs.M46 |
| 29 | |
| 30 | open PoincareMT.Proofs.M12 |
| 31 | |
| 32 | variable {F : GeneralizedRicciFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 33 | {a q : ℝ} {J : SpacetimeInterval} {U : TopologicalSpace.Opens C.carrier} |
| 34 | (e : GeneralizedFlowCylinder F C a q J.domain U) |
| 35 | |
| 36 | /-- The actual raw spatial map is a local diffeomorphism on its open |
| 37 | physical source. Source: Definition 3.38 and Proposition 16.13, |
| 38 | pp. 61 and 377-378. -/ |
| 39 | theorem rawCylinder_spatial_localDiffeomorph [Nonempty U] (s : J.domain) : |
| 40 | IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (rawSpatialMap e s) := by |
| 41 | apply isLocalDiffeomorph_of_contMDiff_mfderiv_bijective (rawSpatialMap_smooth e s) |
| 42 | · intro x y hxy |
| 43 | apply Subtype.ext |
| 44 | have h := congrArg (e.inverse s.val s.property) hxy |
| 45 | exact (e.left_inverse s.val s.property x.property).symm.trans |
| 46 | (h.trans (e.left_inverse s.val s.property y.property)) |
| 47 | · intro x |
| 48 | let L : EuclideanSpace ℝ (Fin 3) ≃ₗ[ℝ] EuclideanSpace ℝ (Fin 3) := |
| 49 | LinearEquiv.ofInjectiveEndo |
| 50 | (mfderiv (𝓡 3) (𝓡 3) (rawSpatialMap e s) x).toLinearMap |
| 51 | (rawSpatialMap_differential_injective e s x) |
| 52 | exact L.bijective |
| 53 | |
| 54 | /-- The spatial image at every included cap time is open in the |
| 55 | actual selected slice. Source: Proposition 16.13, pp. 377-378. -/ |
| 56 | theorem rawCylinder_spatial_image_isOpen [Nonempty U] (s : J.domain) : |
| 57 | IsOpen (e.forward s.val s.property '' U) := by |
| 58 | have heq : range (rawSpatialMap e s) = e.forward s.val s.property '' U := by |
| 59 | ext y |
| 60 | constructor |
| 61 | · rintro ⟨x, rfl⟩ |
| 62 | exact ⟨x.val, x.property, rfl⟩ |
| 63 | · rintro ⟨x, hx, rfl⟩ |
| 64 | exact ⟨⟨x, hx⟩, rfl⟩ |
| 65 | rw [← heq] |
| 66 | exact (rawCylinder_spatial_localDiffeomorph e s).isOpen_range |
| 67 | |
| 68 | /-- The supplied actual inverse, with its original physical codomain, |
| 69 | is smooth at each point in the tracked ball image. Source: Proposition |
| 70 | 16.13, pp. 377-378. -/ |
| 71 | theorem rawCylinder_inverse_contMDiffAt (s : J.domain) (x : U) : |
| 72 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ (e.inverse s.val s.property) |
| 73 | (e.forward s.val s.property x.val) := by |
| 74 | let : Nonempty U := ⟨x⟩ |
| 75 | exact (e.inverse_smooth s.val s.property _ (mem_image_of_mem _ x.property)).contMDiffAt |
| 76 | ((rawCylinder_spatial_image_isOpen e s).mem_nhds (mem_image_of_mem _ x.property)) |
| 77 | |
| 78 | end PoincareMT.Proofs.M46 |