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.Slice |
| 2 | import PoincareLib.Geometry.RicciFlow.Basic |
| 3 | |
| 4 | /-! Ported from Mapher06/Poincare-MorganTian, `PoincareMT/Definitions/M11CompatibleEmbedding.lean`, |
| 5 | revision `b2c3c64781fee22edfd683a224d4f8d280e2e9ce`. Declaration bodies are unchanged; |
| 6 | only imports and module placement differ. See |
| 7 | `references/ricci-flow/mapher/spacetime-port.json`. -/ |
| 8 | |
| 9 | /-! |
| 10 | # Compatible worldlines and cylinders |
| 11 | |
| 12 | Morgan-Tian Definition 3.38, p. 61. All derivatives are derivatives of the |
| 13 | actual maps into the selected spacetime. Topological sources need no manifold |
| 14 | structure. Smooth cylinders additionally have an injective differential; |
| 15 | smooth topological embeddings alone do not guarantee positive pullback metrics. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle Topology |
| 21 | |
| 22 | universe u v |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I K : SpacetimeInterval} |
| 28 | |
| 29 | /-- An actual integral curve parameterized by the specified time interval. -/ |
| 30 | structure SpacetimeWorldline (F : GeneralizedFlowSpacetime n X time I) |
| 31 | (D : SmoothSpacetimeInterval K) where |
| 32 | interval_subset : K.domain ⊆ I.domain |
| 33 | curve : D.Point → F.Point |
| 34 | smooth : ContMDiff (𝓡∂ 1) (spacetimeModel n) ∞ curve |
| 35 | time_eq : ∀ t, F.timeFunction (curve t) = t.val |
| 36 | derivative_eq : ∀ t, |
| 37 | mfderiv (𝓡∂ 1) (spacetimeModel n) curve t (D.positiveTangent t) = |
| 38 | F.timeVector (curve t) |
| 39 | |
| 40 | /-- Compatibility for an arbitrary topological source, including a closed |
| 41 | subset of a slice. Spatial manifold differentiation is not assumed. -/ |
| 42 | structure CompatibleSpacetimeEmbedding (F : GeneralizedFlowSpacetime n X time I) |
| 43 | (D : SmoothSpacetimeInterval K) (C : Type v) [TopologicalSpace C] where |
| 44 | interval_subset : K.domain ⊆ I.domain |
| 45 | toSpacetime : D.Point × C → F.Point |
| 46 | embedding : Topology.IsEmbedding toSpacetime |
| 47 | time_eq : ∀ p, F.timeFunction (toSpacetime p) = p.1.val |
| 48 | worldline_smooth : ∀ x, ContMDiff (𝓡∂ 1) (spacetimeModel n) ∞ |
| 49 | (fun t : D.Point ↦ toSpacetime (t, x)) |
| 50 | worldline_derivative : ∀ t x, |
| 51 | mfderiv (𝓡∂ 1) (spacetimeModel n) (fun s : D.Point ↦ toSpacetime (s, x)) t |
| 52 | (D.positiveTangent t) = F.timeVector (toSpacetime (t, x)) |
| 53 | |
| 54 | /-- Compatibility on a smooth spatial source, with joint smoothness and |
| 55 | full-rank actual differential, including the source's time endpoints. -/ |
| 56 | structure CompatibleSpacetimeCylinder (F : GeneralizedFlowSpacetime n X time I) |
| 57 | (D : SmoothSpacetimeInterval K) (C : Type v) [TopologicalSpace C] |
| 58 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 59 | extends CompatibleSpacetimeEmbedding F D C where |
| 60 | smooth : ContMDiff (spacetimeModel n) (spacetimeModel n) ∞ toSpacetime |
| 61 | differential_injective : ∀ p, |
| 62 | Function.Injective (mfderiv (spacetimeModel n) (spacetimeModel n) toSpacetime p) |
| 63 | |
| 64 | /-- The specified source map is the actual map at the included base time. -/ |
| 65 | def CompatibleSpacetimeEmbedding.IsBasedAt |
| 66 | {F : GeneralizedFlowSpacetime n X time I} {D : SmoothSpacetimeInterval K} |
| 67 | {C : Type v} [TopologicalSpace C] (e : CompatibleSpacetimeEmbedding F D C) |
| 68 | (t : D.Point) (source : C → F.Point) : Prop := |
| 69 | ∀ x, e.toSpacetime (t, x) = source x |
| 70 | |
| 71 | /-- The jointly smooth metric pulled back by the actual compatible cylinder. |
| 72 | Only values on the specified interval are compared with the spacetime metric. -/ |
| 73 | structure SpacetimeCylinderMetric {F : GeneralizedFlowSpacetime n X time I} |
| 74 | {D : SmoothSpacetimeInterval K} {C : Type v} [TopologicalSpace C] |
| 75 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 76 | (e : CompatibleSpacetimeCylinder F D C) where |
| 77 | metric : ℝ → RiemannianMetric n C |
| 78 | smooth : RiemannianMetric.IsSmoothFamilyOn metric K.domain |
| 79 | spatialTangentEquiv : ∀ t : D.Point, ∀ x : C, |
| 80 | TangentSpace (𝓡 n) x ≃L[ℝ] F.Horizontal (e.toSpacetime (t, x)) |
| 81 | spatialTangentEquiv_eq : ∀ t x v, (spatialTangentEquiv t x v).val = |
| 82 | mfderiv (𝓡 n) (spacetimeModel n) (fun y : C ↦ e.toSpacetime (t, y)) x v |
| 83 | metric_eq : ∀ t : D.Point, ∀ x v w, (metric t.val).inner x v w = |
| 84 | F.horizontalMetric.inner (e.toSpacetime (t, x)) |
| 85 | (spatialTangentEquiv t x v) (spatialTangentEquiv t x w) |
| 86 | |
| 87 | end PoincareMT |