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.CanonicalInduction.Limit.Noncollapse.LimitNoncollapseCapture |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Metric.LocalInverseMetricBound |
| 3 | import PoincareLib.Geometry.Riemannian.Distance.CompleteBalls |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.MetricSpace |
| 5 | |
| 6 | /-! |
| 7 | # Capture from a closed terminal metric buffer |
| 8 | |
| 9 | The actual inverse differential and the compact reference buffer give |
| 10 | ambient ball capture without source completeness. Source: C6a in |
| 11 | terminal-common-interval-identification.md, MT Theorem 5.11. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] [T3Space M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | |
| 27 | /-- The closure of an intrinsic ball stays in the corresponding closed buffer. -/ |
| 28 | theorem terminalCommonInterval_closure_ball_subset |
| 29 | (g : RiemannianMetric 3 M) (p : M) (R : ℝ) : |
| 30 | closure (g.ball p R) ⊆ {z | g.edist p z ≤ ENNReal.ofReal R} := by |
| 31 | let : EMetricSpace M := g.toEMetricSpace |
| 32 | have hclosed : IsClosed {z | g.edist p z ≤ ENNReal.ofReal R} := |
| 33 | isClosed_le (continuous_const.edist continuous_id) continuous_const |
| 34 | apply closure_minimal ?_ hclosed |
| 35 | intro z hz |
| 36 | exact (show g.edist p z < ENNReal.ofReal R from hz).le |
| 37 | |
| 38 | /-- Completeness of the reference metric supplies the actual compact buffer. -/ |
| 39 | theorem terminalCommonInterval_compact_ball_closure |
| 40 | (g : RiemannianMetric 3 M) (hg : MetricComplete g) (p : M) (R : ℝ) : |
| 41 | IsCompact (closure (g.ball p R)) := |
| 42 | (g.isCompact_closedBall_of_metricComplete hg p R).of_isClosed_subset |
| 43 | isClosed_closure (terminalCommonInterval_closure_ball_subset g p R) |
| 44 | |
| 45 | variable {N : Type v} [TopologicalSpace N] [T2Space N] |
| 46 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) N] [IsManifold (𝓡 3) ∞ N] |
| 47 | |
| 48 | /-- A forward lower tangent estimate produces capture on the same actual |
| 49 | partial map, with the strict radius guard retained. -/ |
| 50 | theorem terminalCommonInterval_capture_of_closed_buffer |
| 51 | (g : RiemannianMetric 3 M) (h : RiemannianMetric 3 N) |
| 52 | (hg : MetricComplete g) (e : OpenPartialHomeomorph M N) |
| 53 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) 1 e e.source) |
| 54 | (hi : ContMDiffOn (𝓡 3) (𝓡 3) 1 e.symm e.target) |
| 55 | (p : M) {R r C : ℝ} (hR : 0 < R) (hC : 0 < C) (hCr : C * r < R) |
| 56 | (hsource : {z | g.edist p z ≤ ENNReal.ofReal R} ⊆ e.source) |
| 57 | (hbound : ∀ z, g.edist p z ≤ ENNReal.ofReal R → |
| 58 | ∀ v : TangentSpace (𝓡 3) z, |
| 59 | g.tangentNorm z v ≤ C * h.tangentNorm (e z) (mfderiv (𝓡 3) (𝓡 3) e z v)) : |
| 60 | h.ball (e p) r ⊆ e '' g.ball p (C * r) := by |
| 61 | have hclosed := terminalCommonInterval_closure_ball_subset g p R |
| 62 | apply limitNoncollapse_capture_ball g h e p hR hC hCr |
| 63 | (terminalCommonInterval_compact_ball_closure g hg p R) (hclosed.trans hsource) |
| 64 | (fun y hy => (hi y hy).contMDiffAt (e.open_target.mem_nhds hy)) |
| 65 | rintro _ ⟨z, hz, rfl⟩ v |
| 66 | have hzs : z ∈ e.source := hsource (hclosed hz) |
| 67 | apply g.inverse_tangentNorm_le_of_forward_lower_bound h e hf hi (e.map_source hzs) |
| 68 | intro w |
| 69 | rw [e.left_inv hzs] |
| 70 | exact hbound z (hclosed hz) w |
| 71 | |
| 72 | end PoincareMT.M47 |