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.Cylinder.Tangent |
| 2 | import Mathlib.Geometry.Manifold.ContMDiffMFDeriv |
| 3 | |
| 4 | /-! |
| 5 | # Joint smoothness of the spatial tangent map of a compatible cylinder |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open Bundle |
| 12 | open scoped Manifold ContDiff Bundle Topology |
| 13 | |
| 14 | open PoincareMT |
| 15 | |
| 16 | namespace Poincare.Spacetime.Realization |
| 17 | |
| 18 | variable {n : ℕ} {X : Type*} [TopologicalSpace X] {time : X → ℝ} |
| 19 | {I K : SpacetimeInterval} {F : GeneralizedFlowSpacetime n X time I} |
| 20 | {D : SmoothSpacetimeInterval K} |
| 21 | {C : Type*} [TopologicalSpace C] [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] |
| 22 | [IsManifold (𝓡 n) ∞ C] |
| 23 | |
| 24 | theorem cylinder_spatial_lift_smooth (D : SmoothSpacetimeInterval K) : |
| 25 | ContMDiff ((𝓡∂ 1).prod ((𝓡 n).prod (𝓡 n))) |
| 26 | ((spacetimeModel n).prod 𝓘(ℝ, SpacetimeModelVector n)) ∞ |
| 27 | (fun q : D.Point × TangentBundle (𝓡 n) C ↦ |
| 28 | TotalSpace.mk' (SpacetimeModelVector n) |
| 29 | (E := (TangentSpace (spacetimeModel n) : D.Point × C → Type _)) |
| 30 | (q.1, q.2.proj) (0, q.2.2)) := by |
| 31 | have ht : ContMDiff ((𝓡∂ 1).prod ((𝓡 n).prod (𝓡 n))) |
| 32 | ((𝓡∂ 1).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1))) ∞ |
| 33 | (fun q : D.Point × TangentBundle (𝓡 n) C ↦ |
| 34 | TotalSpace.mk' (EuclideanSpace ℝ (Fin 1)) |
| 35 | (E := (TangentSpace (𝓡∂ 1) : D.Point → Type _)) q.1 0) := |
| 36 | (contMDiff_zeroSection ℝ (TangentSpace (𝓡∂ 1) : D.Point → Type _)).comp contMDiff_fst |
| 37 | exact contMDiff_equivTangentBundleProd_symm.comp (ht.prodMk contMDiff_snd) |
| 38 | |
| 39 | noncomputable def cylinderSpatialTangentMap (e : CompatibleSpacetimeCylinder F D C) |
| 40 | (q : D.Point × TangentBundle (𝓡 n) C) : |
| 41 | TotalSpace (EuclideanSpace ℝ (Fin n)) F.Horizontal := |
| 42 | ⟨e.toSpacetime (q.1, q.2.proj), cylinderSpatialEquiv e q.1 q.2.proj q.2.2⟩ |
| 43 | |
| 44 | theorem cylinderSpatialTangentMap_smooth (e : CompatibleSpacetimeCylinder F D C) : |
| 45 | ContMDiff ((𝓡∂ 1).prod ((𝓡 n).prod (𝓡 n))) |
| 46 | ((spacetimeModel n).prod (𝓡 n)) ∞ (cylinderSpatialTangentMap e) := by |
| 47 | let := F.chartedSpace |
| 48 | let := F.isManifold |
| 49 | let := F.horizontalTopology |
| 50 | let := F.horizontalFiberBundle |
| 51 | let := F.horizontalVectorBundle |
| 52 | let := F.horizontalSmoothBundle |
| 53 | have hpush := (e.smooth.contMDiff_tangentMap (m := ∞) (by simp)).comp |
| 54 | (cylinder_spatial_lift_smooth (C := C) D) |
| 55 | have hproj := F.horizontalProjection_smooth.comp hpush |
| 56 | apply hproj.congr |
| 57 | intro q |
| 58 | apply TotalSpace.ext |
| 59 | · rfl |
| 60 | · apply heq_of_eq |
| 61 | exact (F.horizontalProjection_identity _ (cylinderSpatialEquiv e q.1 q.2.proj q.2.2)).symm |
| 62 | |
| 63 | end Poincare.Spacetime.Realization |