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.Variation.Coordinates.GaugeLift |
| 2 | |
| 3 | /-! |
| 4 | # Fixed gauge data for an interior prefix replacement |
| 5 | |
| 6 | The curve approximation for Morgan-Tian Proposition 6.30, pp. 118-119, |
| 7 | uses one inverse gauge and one compact convex spatial region for all |
| 8 | sufficiently small transition widths. Both curve pieces have their |
| 9 | actual clocks and remain in the retained gauge image. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {T τ₁ τ₂ c : ℝ} {x y : G.Point} |
| 24 | |
| 25 | /-- One actual inverse gauge, time window and compact convex spatial |
| 26 | region containing a full curve and a competing prefix at their common |
| 27 | join, as used in Proposition 6.30, pp. 118-119. -/ |
| 28 | structure PrefixJoinGauge (q : M14BackwardPath G T τ₁ τ₂ x y) |
| 29 | (p : M14BackwardPath G T τ₁ c x (q.curve c)) where |
| 30 | index : G.gaugeCover.index |
| 31 | image : Set G.Point |
| 32 | image_open : IsOpen image |
| 33 | lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval index)).Point × |
| 34 | G.gaugeCover.spatial index |
| 35 | lift_smooth : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift image |
| 36 | lift_right : ∀ z ∈ image, (G.gaugeCover.cylinder index).toSpacetime (lift z) = z |
| 37 | lift_time : ∀ z ∈ image, (lift z).1.val = G.spacetime.timeFunction z |
| 38 | radius : ℝ |
| 39 | radius_pos : 0 < radius |
| 40 | left_margin : τ₁ < c - radius |
| 41 | right_margin : c + radius < τ₂ |
| 42 | spatialRegion : Set (EuclideanSpace ℝ (Fin n)) |
| 43 | region_compact : IsCompact spatialRegion |
| 44 | region_convex : Convex ℝ spatialRegion |
| 45 | region_subset : spatialRegion ⊆ G.gaugeCover.spatial index |
| 46 | image_coordinates : ∀ z ∈ image, (lift z).2.val ∈ spatialRegion |
| 47 | prefix_in_image : ∀ s ∈ Icc (c - radius) c, p.curve s ∈ image |
| 48 | continuation_in_image : ∀ s ∈ Icc (c - radius) (c + radius), q.curve s ∈ image |
| 49 | |
| 50 | end PoincareMT.M14 |