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.Gauge.Pullback.Regularity |
| 2 | import PoincareLib.Geometry.Spacetime.Interval.RealTime |
| 3 | |
| 4 | /-! |
| 5 | # Construction of moving-gauge metric geometry |
| 6 | |
| 7 | The metric is the actual horizontal pullback. Its real-time regularity holds |
| 8 | within the full supplied interval, including its included endpoints. |
| 9 | |
| 10 | Source: Morgan-Tian, Definitions 3.34-3.38, pp. 59-61. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | open Bundle Set |
| 18 | |
| 19 | universe u v |
| 20 | |
| 21 | namespace PoincareMT.MovingSpacetimeGauge |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I K : SpacetimeInterval} {F : GeneralizedFlowSpacetime n X time I} |
| 27 | {T : SmoothSpacetimeInterval K} {C : Type v} [TopologicalSpace C] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 29 | |
| 30 | def pullbackMetric (e : MovingSpacetimeGauge F T C) (t : ℝ) : RiemannianMetric n C := |
| 31 | e.spatialMetric (T.realParam t) |
| 32 | |
| 33 | theorem pullbackMetric_smooth (e : MovingSpacetimeGauge F T C) : |
| 34 | RiemannianMetric.IsSmoothFamilyOn e.pullbackMetric K.domain := by |
| 35 | have hp : ContMDiffOn (𝓘(ℝ).prod (𝓡 n)) (spacetimeModel n) ∞ |
| 36 | (fun p : ℝ × C => (T.realParam p.1, p.2)) (K.domain ×ˢ univ) := |
| 37 | (T.realParam_smoothOn.comp contMDiffOn_fst (fun _ hp => hp.1)).prodMk |
| 38 | contMDiffOn_snd |
| 39 | exact e.spatialMetricForm_joint_smooth.comp_contMDiffOn hp |
| 40 | |
| 41 | /-- Every moving embedding carries its actual smooth horizontal pullback metric. -/ |
| 42 | def geometry (e : MovingSpacetimeGauge F T C) : MovingSpacetimeGaugeGeometry e where |
| 43 | metric := e.pullbackMetric |
| 44 | smooth := e.pullbackMetric_smooth |
| 45 | spatialTangentEquiv := e.spatialTangentEquiv |
| 46 | spatialTangentEquiv_eq := e.spatialTangentEquiv_val |
| 47 | metric_eq := by |
| 48 | intro t x v w |
| 49 | change (e.spatialMetric (T.realParam t)).inner x v w = _ |
| 50 | rw [T.realParam_coe] |
| 51 | exact e.spatialMetric_inner t x v w |
| 52 | |
| 53 | end |
| 54 | |
| 55 | end PoincareMT.MovingSpacetimeGauge |