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.Terminal.Curvature.TerminalCurvatureCompactBuffers |
| 2 | import Mathlib.Topology.UniformSpace.UniformConvergence |
| 3 | |
| 4 | /-! |
| 5 | # Compact atlas images in a fixed source radius |
| 6 | |
| 7 | The original finite chart buffers and their uniform approximation retain |
| 8 | one radius for the whole compact image. No inverse-map convergence or |
| 9 | common backward interval is used. |
| 10 | MT Theorem 5.11; terminal-regular-atlas-capture.md, D1. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology BigOperators |
| 18 | |
| 19 | universe u v w |
| 20 | |
| 21 | namespace PoincareMT.M47 |
| 22 | |
| 23 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 24 | |
| 25 | /-- Original compact chart approximations place every compact terminal |
| 26 | image in one fixed source ball, uniformly on the eventual tail. -/ |
| 27 | theorem terminalSource_compact_atlas_image_radius |
| 28 | {ι : Type u} {X : Type v} [TopologicalSpace X] [ChartedSpace E X] |
| 29 | [IsManifold (𝓡 3) ∞ X] [T3Space X] |
| 30 | (c : ι → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 31 | (hcover : ∀ x : X, ∃ i, x ∈ (c i).source) |
| 32 | (M : ℕ → Type w) [∀ k, MetricSpace (M k)] |
| 33 | (point : ∀ k, M k) (f : ∀ k, X → M k) (e : ∀ k, ι → E → M k) |
| 34 | (b : ι → ℝ) |
| 35 | (hbase : ∀ k i z, z ∈ (c i).target → dist (point k) (e k i z) ≤ b i) |
| 36 | (happrox : ∀ i K, IsCompact K → K ⊆ (c i).target → |
| 37 | TendstoUniformlyOn (fun k z => dist (f k ((c i).symm z)) (e k i z)) |
| 38 | (fun _ => 0) atTop K) |
| 39 | {C : Set X} (hC : IsCompact C) : |
| 40 | ∃ R : ℝ, 0 < R ∧ ∀ᶠ k in atTop, MapsTo (f k) C (Metric.ball (point k) R) := by |
| 41 | classical |
| 42 | rcases C.eq_empty_or_nonempty with hCempty | hCne |
| 43 | · refine ⟨1, zero_lt_one, Filter.Eventually.of_forall ?_⟩ |
| 44 | intro k |
| 45 | simp only [hCempty, mapsTo_empty] |
| 46 | obtain ⟨s, _hs, index, K, hK, htarget, hfinite⟩ := |
| 47 | terminalCurvature_exists_finite_original_chart_buffers c hC hCne |
| 48 | (fun x _ => hcover x) |
| 49 | let R : ℝ := 2 + ∑ j : s, max (b (index j)) 0 |
| 50 | have hsum : 0 ≤ ∑ j : s, max (b (index j)) 0 := |
| 51 | Finset.sum_nonneg (fun j _ => le_max_right _ _) |
| 52 | have htail : ∀ᶠ k in atTop, ∀ j : s, ∀ z ∈ K j, |
| 53 | dist (f k ((c (index j)).symm z)) (e k (index j) z) < 1 := by |
| 54 | apply Filter.eventually_all.mpr |
| 55 | intro j |
| 56 | have ht := (Metric.tendstoUniformlyOn_iff.mp |
| 57 | (happrox (index j) (K j) (hK j) (htarget j))) 1 zero_lt_one |
| 58 | filter_upwards [ht] with k hk |
| 59 | intro z hz |
| 60 | simpa only [Real.dist_eq, zero_sub, abs_neg, abs_of_nonneg dist_nonneg] using hk z hz |
| 61 | refine ⟨R, by dsimp only [R]; linarith, ?_⟩ |
| 62 | filter_upwards [htail] with k hk |
| 63 | intro x hx |
| 64 | obtain ⟨j, hsource, hcoord⟩ := hfinite x hx |
| 65 | have herror := hk j (c (index j) x) hcoord |
| 66 | have hinverse : (c (index j)).symm (c (index j) x) = x := |
| 67 | (c (index j)).left_inv hsource |
| 68 | change dist (f k ((c (index j)).symm (c (index j) x))) |
| 69 | (e k (index j) (c (index j) x)) < 1 at herror |
| 70 | rw [hinverse] at herror |
| 71 | have hb := hbase k (index j) (c (index j) x) (htarget j hcoord) |
| 72 | have hentry : b (index j) ≤ ∑ i : s, max (b (index i)) 0 := |
| 73 | (le_max_left _ _).trans (Finset.single_le_sum |
| 74 | (fun i _ => le_max_right (b (index i)) 0) (Finset.mem_univ j)) |
| 75 | have htriangle := dist_triangle (point k) (e k (index j) (c (index j) x)) (f k x) |
| 76 | rw [dist_comm (e k (index j) (c (index j) x)) (f k x)] at htriangle |
| 77 | rw [Metric.mem_ball, dist_comm] |
| 78 | dsimp only [R] |
| 79 | linarith |
| 80 | |
| 81 | end PoincareMT.M47 |