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.Cylinder.Basic |
| 2 | |
| 3 | /-! Ported from Mapher06/Poincare-MorganTian, `PoincareMT/Definitions/M12MovingGauge.lean`, |
| 4 | revision `b2c3c64781fee22edfd683a224d4f8d280e2e9ce`. Declaration bodies are unchanged; |
| 5 | only imports and module placement differ. See |
| 6 | `references/ricci-flow/mapher/spacetime-port.json`. -/ |
| 7 | |
| 8 | /-! |
| 9 | # Moving gauges in an actual spacetime |
| 10 | |
| 11 | A moving gauge preserves time but need not follow the selected time vector. |
| 12 | Its drift is determined by its actual differential. The pullback metric and |
| 13 | spatial tangent equivalence are construction outputs of M12. Compatible |
| 14 | cylinders from Morgan-Tian Definition 3.38, p. 61, supply special cases. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u v |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I K : SpacetimeInterval} |
| 27 | |
| 28 | /-- A jointly smooth time-preserving gauge with an injective actual |
| 29 | differential. Following the spacetime's time vector is not assumed. -/ |
| 30 | structure MovingSpacetimeGauge (F : GeneralizedFlowSpacetime n X time I) |
| 31 | (D : SmoothSpacetimeInterval K) (C : Type v) [TopologicalSpace C] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] where |
| 33 | interval_subset : K.domain ⊆ I.domain |
| 34 | toSpacetime : D.Point × C → F.Point |
| 35 | embedding : Topology.IsEmbedding toSpacetime |
| 36 | time_eq : ∀ p, F.timeFunction (toSpacetime p) = p.1.val |
| 37 | smooth : ContMDiff (spacetimeModel n) (spacetimeModel n) ∞ toSpacetime |
| 38 | differential_injective : ∀ p, |
| 39 | Function.Injective (mfderiv (spacetimeModel n) (spacetimeModel n) toSpacetime p) |
| 40 | |
| 41 | variable {F : GeneralizedFlowSpacetime n X time I} {D : SmoothSpacetimeInterval K} |
| 42 | {C : Type v} [TopologicalSpace C] |
| 43 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 44 | |
| 45 | /-- A compatible cylinder regarded as a moving gauge on the same domain. -/ |
| 46 | def CompatibleSpacetimeCylinder.toMovingSpacetimeGauge |
| 47 | (e : CompatibleSpacetimeCylinder F D C) : MovingSpacetimeGauge F D C where |
| 48 | interval_subset := e.interval_subset |
| 49 | toSpacetime := e.toSpacetime |
| 50 | embedding := e.embedding |
| 51 | time_eq := e.time_eq |
| 52 | smooth := e.smooth |
| 53 | differential_injective := e.differential_injective |
| 54 | |
| 55 | /-- The metric and spatial tangent identification induced by the actual |
| 56 | gauge. Only metric values on its stated interval are constrained. -/ |
| 57 | structure MovingSpacetimeGaugeGeometry (e : MovingSpacetimeGauge F D C) where |
| 58 | metric : ℝ → RiemannianMetric n C |
| 59 | smooth : RiemannianMetric.IsSmoothFamilyOn metric K.domain |
| 60 | spatialTangentEquiv : ∀ t : D.Point, ∀ x : C, |
| 61 | TangentSpace (𝓡 n) x ≃L[ℝ] F.Horizontal (e.toSpacetime (t, x)) |
| 62 | spatialTangentEquiv_eq : ∀ t x v, (spatialTangentEquiv t x v).val = |
| 63 | mfderiv (𝓡 n) (spacetimeModel n) (fun y : C ↦ e.toSpacetime (t, y)) x v |
| 64 | metric_eq : ∀ t : D.Point, ∀ x v w, (metric t.val).inner x v w = |
| 65 | F.horizontalMetric.inner (e.toSpacetime (t, x)) |
| 66 | (spatialTangentEquiv t x v) (spatialTangentEquiv t x w) |
| 67 | |
| 68 | /-- Existing cylinder metric data yield geometry for its identical moving |
| 69 | gauge without choosing another metric or differential. -/ |
| 70 | def SpacetimeCylinderMetric.toMovingSpacetimeGaugeGeometry |
| 71 | {e : CompatibleSpacetimeCylinder F D C} (G : SpacetimeCylinderMetric e) : |
| 72 | MovingSpacetimeGaugeGeometry e.toMovingSpacetimeGauge where |
| 73 | metric := G.metric |
| 74 | smooth := G.smooth |
| 75 | spatialTangentEquiv := G.spatialTangentEquiv |
| 76 | spatialTangentEquiv_eq := G.spatialTangentEquiv_eq |
| 77 | metric_eq := G.metric_eq |
| 78 | |
| 79 | /-- The actual velocity of the gauge in the positive interval-time direction. -/ |
| 80 | noncomputable def movingGaugeTimeVelocity (e : MovingSpacetimeGauge F D C) |
| 81 | (t : D.Point) (x : C) : |
| 82 | TangentSpace (spacetimeModel n) (e.toSpacetime (t, x)) := |
| 83 | mfderiv (spacetimeModel n) (spacetimeModel n) e.toSpacetime (t, x) |
| 84 | (D.positiveTangent t, 0) |
| 85 | |
| 86 | /-- The uniquely determined spatial drift: the inverse spatial differential |
| 87 | of the negative horizontal component of the gauge's actual time velocity. -/ |
| 88 | noncomputable def movingGaugeDrift {e : MovingSpacetimeGauge F D C} |
| 89 | (G : MovingSpacetimeGaugeGeometry e) (t : D.Point) (x : C) : |
| 90 | TangentSpace (𝓡 n) x := |
| 91 | (G.spatialTangentEquiv t x).symm |
| 92 | (-F.horizontalProjection (e.toSpacetime (t, x)) (movingGaugeTimeVelocity e t x)) |
| 93 | |
| 94 | /-- The actual spatial gauge map into the selected geometry on its time slice. -/ |
| 95 | def movingGaugeSliceMap (e : MovingSpacetimeGauge F D C) |
| 96 | (S : ∀ s : ℝ, SpacetimeSliceGeometry F s) (t : D.Point) : C → (S t.val).Point := |
| 97 | fun x ↦ ⟨e.toSpacetime (t, x), e.time_eq (t, x)⟩ |
| 98 | |
| 99 | end PoincareMT |