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.Paths.Joining.GaugeBlend |
| 2 | |
| 3 | /-! |
| 4 | # A one-sided gauge transition with unchanged outer curves |
| 5 | |
| 6 | The actual curve used in the corner approximation for Morgan-Tian |
| 7 | Proposition 6.30, pp. 118-119. The spatial transition lies strictly |
| 8 | before the join. Both patch boundaries have constant-cutoff overlaps |
| 9 | with the original curves. |
| 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 | (b : G.gaugeCover.index) |
| 24 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 25 | G.gaugeCover.spatial b) |
| 26 | (α β : ℝ → G.Point) |
| 27 | |
| 28 | /-- The actual gauge blend patched to the two outer curves, with its |
| 29 | transition on [c-2d,c-d], Proposition 6.30, pp. 118-119. -/ |
| 30 | noncomputable def oneSidedGaugeJoin (c r d s : ℝ) : G.Point := |
| 31 | if s < c - r then α s else if c ≤ s then β s else |
| 32 | gaugeBlend b lift α β (c - 3 * d / 2) (d / 2) s |
| 33 | |
| 34 | /-- Between its two patch boundaries the joining curve is the actual |
| 35 | gauge blend, Proposition 6.30, pp. 118-119. -/ |
| 36 | theorem oneSidedGaugeJoin_eq_middle {c r d s : ℝ} (hs : s ∈ Ico (c - r) c) : |
| 37 | oneSidedGaugeJoin b lift α β c r d s = |
| 38 | gaugeBlend b lift α β (c - 3 * d / 2) (d / 2) s := by |
| 39 | simp only [oneSidedGaugeJoin, if_neg (not_lt.mpr hs.1), if_neg (not_le.mpr hs.2)] |
| 40 | |
| 41 | /-- The joining curve retains the whole first outer piece through |
| 42 | the left end of the transition, Proposition 6.30, pp. 118-119. -/ |
| 43 | theorem oneSidedGaugeJoin_eq_left {c r d : ℝ} (hd : 0 < d) |
| 44 | (hα : ∀ s ∈ Icc (c - r) c, |
| 45 | (G.gaugeCover.cylinder b).toSpacetime (lift (α s)) = α s) |
| 46 | (htime : ∀ s ∈ Icc (c - r) c, (lift (α s)).1 = (lift (β s)).1) |
| 47 | {s : ℝ} (hs : s ≤ c - 2 * d) : |
| 48 | oneSidedGaugeJoin b lift α β c r d s = α s := by |
| 49 | by_cases hl : s < c - r |
| 50 | · simp only [oneSidedGaugeJoin, if_pos hl] |
| 51 | have hsI : s ∈ Ico (c - r) c := ⟨le_of_not_gt hl, by linarith⟩ |
| 52 | rw [oneSidedGaugeJoin_eq_middle b lift α β hsI] |
| 53 | exact gaugeBlend_eq_left b lift α β (by linarith) (by linarith) |
| 54 | (hα s ⟨hsI.1, hsI.2.le⟩) (htime s ⟨hsI.1, hsI.2.le⟩) |
| 55 | |
| 56 | /-- The joining curve agrees with the continuation before reaching |
| 57 | the join, so no endpoint regularity of the first curve is needed |
| 58 | there, Proposition 6.30, pp. 118-119. -/ |
| 59 | theorem oneSidedGaugeJoin_eq_right {c r d : ℝ} (hd : 0 < d) (hdr : 2 * d < r) |
| 60 | (hβ : ∀ s ∈ Icc (c - r) c, |
| 61 | (G.gaugeCover.cylinder b).toSpacetime (lift (β s)) = β s) |
| 62 | {s : ℝ} (hs : c - d ≤ s) : |
| 63 | oneSidedGaugeJoin b lift α β c r d s = β s := by |
| 64 | have hleft : ¬s < c - r := by linarith |
| 65 | by_cases hright : c ≤ s |
| 66 | · simp only [oneSidedGaugeJoin, if_neg hleft, if_pos hright] |
| 67 | have hsI : s ∈ Ico (c - r) c := ⟨le_of_not_gt hleft, lt_of_not_ge hright⟩ |
| 68 | rw [oneSidedGaugeJoin_eq_middle b lift α β hsI] |
| 69 | exact gaugeBlend_eq_right b lift α β (by linarith) (by linarith) |
| 70 | (hβ s ⟨hsI.1, hsI.2.le⟩) |
| 71 | |
| 72 | end PoincareMT.M14 |