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.Surgery.Metric.Standard.Radial.StandardBalls |
| 2 | |
| 3 | /-! |
| 4 | # The image of a closed standard cap |
| 5 | |
| 6 | Continuity on a larger standard ball identifies the closed-cap image |
| 7 | under the same map with the closure of its open-cap image. This is the |
| 8 | topological consequence used in the September 19 closed-collar contract. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped ENNReal Topology |
| 14 | |
| 15 | namespace PoincareMT.MetricSurgery |
| 16 | |
| 17 | theorem standard_closed_ball_image {N : Type*} [TopologicalSpace N] [T2Space N] |
| 18 | (g₀ : StandardInitialMetric) {f : StandardCapSpace → N} {r R : ℝ} |
| 19 | (hr : 0 < r) (hrR : r < R) (hf : ContinuousOn f (g₀.metric.ball 0 R)) : |
| 20 | f '' {x | g₀.metric.edist 0 x ≤ ENNReal.ofReal r} = |
| 21 | closure (f '' g₀.metric.ball 0 r) := by |
| 22 | have hsubset : {x | g₀.metric.edist 0 x ≤ ENNReal.ofReal r} ⊆ |
| 23 | g₀.metric.ball 0 R := by |
| 24 | intro x hx |
| 25 | exact lt_of_le_of_lt hx (ENNReal.ofReal_lt_ofReal_iff (hr.trans hrR) |>.mpr hrR) |
| 26 | have hc : IsCompact (closure (g₀.metric.ball 0 r)) := by |
| 27 | rw [standard_closure_ball g₀ hr] |
| 28 | exact standard_closed_ball_compact g₀ hr.le |
| 29 | have hf' : ContinuousOn f (closure (g₀.metric.ball 0 r)) := by |
| 30 | rw [standard_closure_ball g₀ hr] |
| 31 | exact hf.mono hsubset |
| 32 | simpa only [standard_closure_ball g₀ hr] using image_closure_of_isCompact hc hf' |
| 33 | |
| 34 | theorem surgery_closed_cap_image {N : Type*} [TopologicalSpace N] [T2Space N] |
| 35 | (g₀ : StandardInitialMetric) {f : StandardCapSpace → N} |
| 36 | (hf : ContinuousOn f (g₀.metric.ball 0 (g₀.cylindrical_end.radius + 5))) : |
| 37 | f '' {x | g₀.metric.edist 0 x ≤ ENNReal.ofReal (g₀.cylindrical_end.radius + 4)} = |
| 38 | closure (f '' g₀.metric.ball 0 (g₀.cylindrical_end.radius + 4)) := by |
| 39 | apply standard_closed_ball_image g₀ (by linarith [g₀.cylindrical_end.radius_pos]) |
| 40 | (by linarith) hf |
| 41 | |
| 42 | end PoincareMT.MetricSurgery |