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.ReducedGeometry.SourceNames.Realization |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.SpatialMetricCoefficients |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Smooth actual metric at the meeting endpoint |
| 7 | |
| 8 | Morgan-Tian Proposition 6.30, pp. 118-119. Fixing an actual allowed |
| 9 | gauge time gives a smooth metric coefficient in the spatial endpoint, |
| 10 | including when that time is a physical boundary. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped ContDiff |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | |
| 25 | /-- The actual fixed-time metric coefficient is smooth at every gauge |
| 26 | point, the positive momentum used in Proposition 6.30, pp. 118-119. -/ |
| 27 | theorem meetingMetric_contDiffAt (j : G.gaugeCover.index) |
| 28 | (t : (G.timeIntervals.interval (G.gaugeCover.interval j)).Point) |
| 29 | (q : G.gaugeCover.spatial j) : |
| 30 | ContDiffAt ℝ ∞ |
| 31 | (fun y => Proofs.M11.ordinaryChartMetric (G.gaugeCover.metric j).metric q (t.val, y)) |
| 32 | q.val := by |
| 33 | have hm := Proofs.M11.ordinaryChartMetric_smooth (G.gaugeCover.metric j).metric |
| 34 | (G.gaugeCover.interval j).domain (G.gaugeCover.metric j).smooth q |
| 35 | have h : ContDiffOn ℝ ∞ |
| 36 | (fun y => Proofs.M11.ordinaryChartMetric (G.gaugeCover.metric j).metric q (t.val, y)) |
| 37 | (G.gaugeCover.spatial j : Set _) := by |
| 38 | apply hm.comp (contDiffOn_const.prodMk contDiffOn_id) |
| 39 | intro y hy |
| 40 | refine ⟨t.property, ?_⟩ |
| 41 | change y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) q).target |
| 42 | rw [(G.gaugeCover.spatial j).chartAt_target_eq] |
| 43 | exact hy |
| 44 | exact (h q.val q.property).contDiffAt ((G.gaugeCover.spatial j).isOpen.mem_nhds q.property) |
| 45 | |
| 46 | end PoincareMT.M14 |