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.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.Regularity |
| 3 | import PoincareLib.Geometry.Riemannian.Comparison.Covering |
| 4 | |
| 5 | /-! |
| 6 | # Finite covers of actual regular components |
| 7 | |
| 8 | Total volume and local lower ball volumes bound the number of separated |
| 9 | centers in a regular base component. The resulting finite cover proves |
| 10 | that component compact using only its literal pointwise regularity. |
| 11 | This is the total-volume specialization of Morgan--Tian Theorem 5.6, |
| 12 | printed pp. 85-87, used after Claim 10.6 on printed pp. 252-253. See the |
| 13 | regular-set partial-compactness derivation dated 2026-09-23. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set MeasureTheory |
| 19 | open scoped ENNReal Manifold ContDiff Bundle |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M28 |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 28 | |
| 29 | /-- Total volume and lower volumes of half-radius balls give a uniformly |
| 30 | finite cover of the literal regular component. Theorem 5.6, pp. 86-87. -/ |
| 31 | theorem exists_finset_regularComponent_cover |
| 32 | (g : RiemannianMetric n M) (p : M) (δ : ℝ) {r v V : ℝ} |
| 33 | (hr : 0 < r) (hv : 0 < v) (hV : 0 ≤ V) |
| 34 | (hupper : g.volumeMeasure univ ≤ ENNReal.ofReal V) |
| 35 | (hlower : ∀ q ∈ regularComponent g p δ, |
| 36 | ENNReal.ofReal v ≤ g.volumeMeasure (g.ball q (r / 2))) : |
| 37 | ∃ C : Finset M, (↑C : Set M) ⊆ regularComponent g p δ ∧ |
| 38 | C.card ≤ ⌈V / v⌉₊ ∧ |
| 39 | (↑C : Set M).Pairwise (fun x y => ENNReal.ofReal r ≤ g.edist x y) ∧ |
| 40 | regularComponent g p δ ⊆ ⋃ q ∈ C, g.ball q r := by |
| 41 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 42 | ⟨g.toRiemannianMetric⟩ |
| 43 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 44 | (TangentSpace (𝓡 n) : M → Type _) := |
| 45 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ => rfl⟩⟩ |
| 46 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 47 | have hball (q : M) (s : ℝ) : Metric.eball q (ENNReal.ofReal s) = g.ball q s := by |
| 48 | ext y |
| 49 | change g.edist y q < ENNReal.ofReal s ↔ g.edist q y < ENNReal.ofReal s |
| 50 | rw [show g.edist y q = g.edist q y from Manifold.riemannianEDist_comm] |
| 51 | have hfinite : g.volumeMeasure univ ≠ ⊤ := |
| 52 | ne_top_of_le_ne_top ENNReal.ofReal_ne_top hupper |
| 53 | have hreal : (g.volumeMeasure univ).toReal ≤ V := by |
| 54 | exact (ENNReal.toReal_mono ENNReal.ofReal_ne_top hupper).trans_eq |
| 55 | (ENNReal.toReal_ofReal hV) |
| 56 | obtain ⟨C, hC, hcard, hsep, hcover⟩ := |
| 57 | Poincare.exists_finset_cover_of_separated_card_le (regularComponent g p δ) |
| 58 | (ENNReal.ofReal_pos.mpr hr) ⌈V / v⌉₊ (by |
| 59 | intro C hC hsep |
| 60 | have hbound := Poincare.MeasureTheory.card_le_measure_div_of_separated_balls |
| 61 | g.volumeMeasure C (r := ENNReal.ofReal (r / 2)) (U := univ) hv hfinite |
| 62 | (by |
| 63 | intro x hx y hy hxy |
| 64 | rw [← ENNReal.ofReal_add (by positivity) (by positivity), |
| 65 | show r / 2 + r / 2 = r by ring] |
| 66 | exact hsep hx hy hxy) |
| 67 | (fun _ _ => subset_univ _) (by |
| 68 | intro q hq |
| 69 | rw [hball] |
| 70 | exact hlower q (hC hq)) |
| 71 | exact_mod_cast (hbound.trans (div_le_div_of_nonneg_right hreal hv.le)).trans |
| 72 | (Nat.le_ceil (V / v))) |
| 73 | refine ⟨C, hC, hcard, hsep, ?_⟩ |
| 74 | intro x hx |
| 75 | obtain ⟨q, hq, hxq⟩ := hcover x hx |
| 76 | refine mem_iUnion₂.mpr ⟨q, hq, ?_⟩ |
| 77 | change g.edist q x < ENNReal.ofReal r |
| 78 | change g.edist x q < ENNReal.ofReal r at hxq |
| 79 | simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_comm] using hxq |
| 80 | |
| 81 | /-- Finite volume and uniform local noncollapse imply compactness of a |
| 82 | regular component, with no completeness or radial-ball premise. |
| 83 | This is the regular-set packing step of Theorem 5.6, pp. 86-87. -/ |
| 84 | theorem isCompact_regularComponent_of_volume_bounds |
| 85 | (g : RiemannianMetric n M) (p : M) {δ r v V : ℝ} |
| 86 | (hr : 0 < r) (hrδ : r < δ) (hv : 0 < v) (hV : 0 ≤ V) |
| 87 | (hupper : g.volumeMeasure univ ≤ ENNReal.ofReal V) |
| 88 | (hlower : ∀ q ∈ regularComponent g p δ, |
| 89 | ENNReal.ofReal v ≤ g.volumeMeasure (g.ball q (r / 2))) : |
| 90 | IsCompact (regularComponent g p δ) := by |
| 91 | obtain ⟨C, hC, _hcard, _hsep, hcover⟩ := |
| 92 | exists_finset_regularComponent_cover g p δ hr hv hV hupper hlower |
| 93 | have hK : IsCompact (⋃ q ∈ C, closure (g.ball q r)) := |
| 94 | C.finite_toSet.isCompact_biUnion fun q hq => |
| 95 | regularComponent_subset g p δ (hC hq) r hrδ |
| 96 | apply hK.of_isClosed_subset (isClosed_regularComponent g p δ) |
| 97 | intro x hx |
| 98 | obtain ⟨q, hq, hxq⟩ := mem_iUnion₂.mp (hcover hx) |
| 99 | exact mem_iUnion₂.mpr ⟨q, hq, subset_closure hxq⟩ |
| 100 | |
| 101 | /-- All-center noncollapse supplies the actual half-ball volumes in the |
| 102 | finite regular-component cover. Constants precede the covering centers; |
| 103 | Theorem 5.6, printed pp. 85-87. -/ |
| 104 | theorem exists_regularComponent_cover_of_noncollapse |
| 105 | (g : RiemannianMetric n M) (p : M) {δ r r₀ κ V : ℝ} |
| 106 | (hr : 0 < r) (hrδ : r / 2 ≤ δ) (hr₀ : r / 2 ≤ r₀) |
| 107 | (hκ : 0 < κ) (hV : 0 ≤ V) |
| 108 | (hupper : g.volumeMeasure univ ≤ ENNReal.ofReal V) |
| 109 | (hnoncollapse : ∀ s : ℝ, 0 < s → s ≤ r₀ → ∀ q ∈ regularComponent g p s, |
| 110 | ENNReal.ofReal (κ * s ^ n) ≤ g.volumeMeasure (g.ball q s)) : |
| 111 | ∃ C : Finset M, (↑C : Set M) ⊆ regularComponent g p δ ∧ |
| 112 | C.card ≤ ⌈V / (κ * (r / 2) ^ n)⌉₊ ∧ |
| 113 | (↑C : Set M).Pairwise (fun x y => ENNReal.ofReal r ≤ g.edist x y) ∧ |
| 114 | regularComponent g p δ ⊆ ⋃ q ∈ C, g.ball q r := by |
| 115 | apply exists_finset_regularComponent_cover g p δ hr (by positivity) hV hupper |
| 116 | intro q hq |
| 117 | exact hnoncollapse (r / 2) (by positivity) hr₀ q |
| 118 | (regularComponent_antitone g p hrδ hq) |
| 119 | |
| 120 | end PoincareMT.M28 |