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.Tube.SourceGeometry.Ends.SourceTubeCriticalRadius |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Ends.SourceTubeVolume |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.OpenGeometry.OpenMetricBalls |
| 5 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.BoundaryCoverage |
| 6 | |
| 7 | /-! |
| 8 | # The literal critical ball in the actual normalized tube |
| 9 | |
| 10 | Morgan--Tian Claims 10.5-10.6, pp. 251-252. Restrict the existing tube |
| 11 | metric to its strict critical ball. The base distance, a fixed smaller |
| 12 | base regularity radius, and the volume bound survive this restriction. |
| 13 | The original near-critical witnesses remain points of the original tube. |
| 14 | No larger collar margin or whole-neck containment is asserted. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set MeasureTheory |
| 22 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 27 | |
| 28 | variable {epsilon C A : ℝ} |
| 29 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 30 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 31 | (H : CounterexampleNeckFamily E) (T : ∀ k, SourceTubeData (H.segment k)) |
| 32 | (Acrit : ℝ) |
| 33 | |
| 34 | /-- The strict critical ball in the metric of the already chosen tube. -/ |
| 35 | def tubeCriticalRegion (k : ℕ) : TopologicalSpace.Opens (T k).carrierOpen := by |
| 36 | let g := H.tubeMetric T k |
| 37 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : (T k).carrierOpen → Type _) := |
| 38 | ⟨g.toRiemannianMetric⟩ |
| 39 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin 3)) |
| 40 | (TangentSpace (𝓡 3) : (T k).carrierOpen → Type _) := |
| 41 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ => rfl⟩⟩ |
| 42 | let : EMetricSpace (T k).carrierOpen := |
| 43 | EMetricSpace.ofRiemannianMetric (𝓡 3) (T k).carrierOpen |
| 44 | refine ⟨g.ball (H.tubeBase T k) Acrit, ?_⟩ |
| 45 | change IsOpen {x | edist (H.tubeBase T k) x < ENNReal.ofReal Acrit} |
| 46 | exact isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 47 | |
| 48 | /-- The source set is exactly the original tube-distance sublevel. -/ |
| 49 | @[simp] theorem tubeCriticalRegion_coe (k : ℕ) : |
| 50 | (H.tubeCriticalRegion T Acrit k : Set (T k).carrierOpen) = |
| 51 | (H.tubeMetric T k).ball (H.tubeBase T k) Acrit := rfl |
| 52 | |
| 53 | /-- The actual inclusion pullback metric on the strict critical ball. -/ |
| 54 | def tubeCriticalMetric (k : ℕ) : RiemannianMetric 3 (H.tubeCriticalRegion T Acrit k) := |
| 55 | intrinsicOpenMetric (H.tubeMetric T k) (H.tubeCriticalRegion T Acrit k) |
| 56 | |
| 57 | /-- The unchanged low point, lifted into the positive-radius critical ball. -/ |
| 58 | def tubeCriticalBase (hA : 0 < Acrit) (k : ℕ) : H.tubeCriticalRegion T Acrit k := by |
| 59 | refine ⟨H.tubeBase T k, ?_⟩ |
| 60 | change (H.tubeMetric T k).edist (H.tubeBase T k) (H.tubeBase T k) < |
| 61 | ENNReal.ofReal Acrit |
| 62 | simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_self] using |
| 63 | ENNReal.ofReal_pos.mpr hA |
| 64 | |
| 65 | /-- Inclusion retains the same actual tube basepoint. -/ |
| 66 | @[simp] theorem tubeCriticalBase_val (hA : 0 < Acrit) (k : ℕ) : |
| 67 | (H.tubeCriticalBase T Acrit hA k : (T k).carrierOpen) = H.tubeBase T k := rfl |
| 68 | |
| 69 | /-- Short competitors connect the strict ball, without completeness. -/ |
| 70 | theorem tubeCriticalRegion_connected (hA : 0 < Acrit) (k : ℕ) : |
| 71 | ConnectedSpace (H.tubeCriticalRegion T Acrit k) := by |
| 72 | apply Subtype.connectedSpace |
| 73 | refine ⟨⟨H.tubeBase T k, (H.tubeCriticalBase T Acrit hA k).property⟩, ?_⟩ |
| 74 | exact (H.tubeMetric T k).isPreconnected_ball (H.tubeBase T k) Acrit |
| 75 | |
| 76 | /-- Every base-centered radius below the critical cutoff has its exact |
| 77 | original tube ball after inclusion. This is not an all-pairs isometry. -/ |
| 78 | theorem tubeCritical_ball_eq_preimage (hA : 0 < Acrit) (k : ℕ) |
| 79 | {r : ℝ} (hr : r ≤ Acrit) : |
| 80 | (H.tubeCriticalMetric T Acrit k).ball (H.tubeCriticalBase T Acrit hA k) r = |
| 81 | (Subtype.val : H.tubeCriticalRegion T Acrit k → (T k).carrierOpen) ⁻¹' |
| 82 | (H.tubeMetric T k).ball (H.tubeBase T k) r := by |
| 83 | apply intrinsicOpenMetric_ball_eq_preimage |
| 84 | intro x hx |
| 85 | exact hx.trans_le (ENNReal.ofReal_le_ofReal hr) |
| 86 | |
| 87 | /-- Distances from the actual base agree exactly before and after the |
| 88 | critical-ball restriction; points outside that ball are not transported. -/ |
| 89 | theorem tubeCritical_base_edist (hA : 0 < Acrit) (k : ℕ) |
| 90 | (q : H.tubeCriticalRegion T Acrit k) : |
| 91 | (H.tubeCriticalMetric T Acrit k).edist (H.tubeCriticalBase T Acrit hA k) q = |
| 92 | (H.tubeMetric T k).edist (H.tubeBase T k) (q : (T k).carrierOpen) := by |
| 93 | apply le_antisymm |
| 94 | · by_contra hnot |
| 95 | have hlt : (H.tubeMetric T k).edist (H.tubeBase T k) (q : (T k).carrierOpen) < |
| 96 | (H.tubeCriticalMetric T Acrit k).edist (H.tubeCriticalBase T Acrit hA k) q := |
| 97 | lt_of_not_ge hnot |
| 98 | have hq : (H.tubeMetric T k).edist (H.tubeBase T k) (q : (T k).carrierOpen) < |
| 99 | ENNReal.ofReal Acrit := q.property |
| 100 | obtain ⟨r, hdr, hr⟩ := exists_between (lt_min hlt hq) |
| 101 | have hrA : r < ENNReal.ofReal Acrit := hr.trans_le (min_le_right _ _) |
| 102 | have hrfinite : r ≠ ⊤ := ne_top_of_lt (hrA.trans_le le_top) |
| 103 | have hrreal : r.toReal < Acrit := ENNReal.toReal_lt_of_lt_ofReal hrA |
| 104 | have hqball : (q : (T k).carrierOpen) ∈ |
| 105 | (H.tubeMetric T k).ball (H.tubeBase T k) r.toReal := by |
| 106 | change (H.tubeMetric T k).edist (H.tubeBase T k) (q : (T k).carrierOpen) < |
| 107 | ENNReal.ofReal r.toReal |
| 108 | simpa only [ENNReal.ofReal_toReal hrfinite] using hdr |
| 109 | have hqsmall : q ∈ (H.tubeCriticalMetric T Acrit k).ball |
| 110 | (H.tubeCriticalBase T Acrit hA k) r.toReal := by |
| 111 | rw [H.tubeCritical_ball_eq_preimage T Acrit hA k hrreal.le] |
| 112 | exact hqball |
| 113 | change (H.tubeCriticalMetric T Acrit k).edist |
| 114 | (H.tubeCriticalBase T Acrit hA k) q < ENNReal.ofReal r.toReal at hqsmall |
| 115 | rw [ENNReal.ofReal_toReal hrfinite] at hqsmall |
| 116 | exact (not_lt_of_ge (hr.trans_le (min_le_left _ _)).le) hqsmall |
| 117 | · rw [tubeCriticalMetric, intrinsicOpenMetric_edist] |
| 118 | exact RiemannianMetric.edist_le_intrinsicEDist (H.tubeMetric T k) |
| 119 | (H.tubeCriticalRegion T Acrit k) (H.tubeBase T k) (q : (T k).carrierOpen) |
| 120 | |
| 121 | /-- The fixed half-base radius remains regular in the actual critical |
| 122 | region. Only the already produced lower bound on Acrit is used. -/ |
| 123 | theorem tubeCritical_base_regular (hA : 0 < Acrit) |
| 124 | (hbase : (4 * max C 2)⁻¹ * epsilon⁻¹ / 8 ≤ Acrit) (k : ℕ) : |
| 125 | H.tubeCriticalBase T Acrit hA k ∈ regularPoints (H.tubeCriticalMetric T Acrit k) |
| 126 | (((4 * max C 2)⁻¹ * epsilon⁻¹ / 8) / 2) := by |
| 127 | let : PreconnectedSpace (T k).carrierOpen := (T k).preconnected |
| 128 | let rbase : ℝ := (4 * max C 2)⁻¹ * epsilon⁻¹ / 8 |
| 129 | have heps : 0 < epsilon := |
| 130 | (H.segment k).cover_epsilon ▸ (H.segment k).cover.epsilon_pos |
| 131 | have hB : 0 < max C 2 := lt_of_lt_of_le (by norm_num) (le_max_right C 2) |
| 132 | have hbasepos : 0 < rbase := by |
| 133 | dsimp only [rbase] |
| 134 | positivity |
| 135 | intro r hr |
| 136 | by_cases hr0 : r ≤ 0 |
| 137 | · have hempty : (H.tubeCriticalMetric T Acrit k).ball |
| 138 | (H.tubeCriticalBase T Acrit hA k) r = ∅ := by |
| 139 | ext q |
| 140 | simp only [RiemannianMetric.ball, mem_ofPred_eq, |
| 141 | ENNReal.ofReal_eq_zero.mpr hr0, not_lt_zero, mem_empty_iff_false] |
| 142 | rw [hempty, closure_empty] |
| 143 | exact isCompact_empty |
| 144 | have hrr : r < rbase := hr.trans (half_lt_self hbasepos) |
| 145 | have hrA : r < Acrit := hrr.trans_le hbase |
| 146 | have hball : (H.tubeMetric T k).ball (H.tubeBase T k) r ⊆ |
| 147 | (H.tubeCriticalRegion T Acrit k : Set (T k).carrierOpen) := by |
| 148 | intro q hq |
| 149 | exact hq.trans_le (ENNReal.ofReal_le_ofReal hrA.le) |
| 150 | have hclosed : IsClosed {q : (T k).carrierOpen | |
| 151 | ((H.tubeMetric T k).edist (H.tubeBase T k) q).toReal ≤ r} := |
| 152 | isClosed_le ((H.tubeMetric T k).continuous_toReal_edist (H.tubeBase T k)) |
| 153 | continuous_const |
| 154 | have hclosure_le : closure ((H.tubeMetric T k).ball (H.tubeBase T k) r) ⊆ |
| 155 | {q | ((H.tubeMetric T k).edist (H.tubeBase T k) q).toReal ≤ r} := by |
| 156 | apply closure_minimal ?_ hclosed |
| 157 | intro q hq |
| 158 | exact (ENNReal.toReal_lt_of_lt_ofReal hq).le |
| 159 | have hclosure : closure ((H.tubeMetric T k).ball (H.tubeBase T k) r) ⊆ |
| 160 | (H.tubeCriticalRegion T Acrit k : Set (T k).carrierOpen) := by |
| 161 | intro q hq |
| 162 | have hqr_le : ((H.tubeMetric T k).edist (H.tubeBase T k) q).toReal ≤ r := |
| 163 | hclosure_le hq |
| 164 | have hqr : ((H.tubeMetric T k).edist (H.tubeBase T k) q).toReal < Acrit := |
| 165 | hqr_le.trans_lt hrA |
| 166 | change (H.tubeMetric T k).edist (H.tubeBase T k) q < ENNReal.ofReal Acrit |
| 167 | rw [← ENNReal.ofReal_toReal (H.tube_edist_ne_top T k _ _)] |
| 168 | exact (ENNReal.ofReal_lt_ofReal_iff hA).mpr hqr |
| 169 | change IsCompact (closure ((intrinsicOpenMetric (H.tubeMetric T k) |
| 170 | (H.tubeCriticalRegion T Acrit k)).ball (H.tubeCriticalBase T Acrit hA k) r)) |
| 171 | rw [intrinsicOpenMetric_closure_ball_eq_preimage (H.tubeMetric T k) |
| 172 | (H.tubeCriticalRegion T Acrit k) (H.tubeCriticalBase T Acrit hA k) hball] |
| 173 | apply Topology.IsEmbedding.subtypeVal.isInducing.isCompact_preimage' |
| 174 | (H.tube_base_regular T k r hrr) |
| 175 | intro q hq |
| 176 | exact ⟨⟨q, hclosure hq⟩, rfl⟩ |
| 177 | |
| 178 | /-- Restricting the already normalized metric contributes no new volume |
| 179 | factor: total critical-region volume is the measure of that literal ball. -/ |
| 180 | theorem tubeCritical_volume_eq (k : ℕ) : |
| 181 | (H.tubeCriticalMetric T Acrit k).volumeMeasure univ = |
| 182 | (H.tubeMetric T k).volumeMeasure (H.tubeCriticalRegion T Acrit k : Set _) := |
| 183 | intrinsicOpenMetric_volumeMeasure_univ (H.tubeMetric T k) |
| 184 | (H.tubeCriticalRegion T Acrit k) |
| 185 | |
| 186 | /-- The same tube volume bound controls its actual critical-ball subtype, |
| 187 | with a positive constant chosen before every source index. -/ |
| 188 | theorem exists_tubeCritical_volume_bound : |
| 189 | ∃ V : ℝ, 0 < V ∧ ∀ k, |
| 190 | (H.tubeCriticalMetric T Acrit k).volumeMeasure univ ≤ ENNReal.ofReal V := by |
| 191 | obtain ⟨V, hV, hbound⟩ := H.exists_tube_volume_bound T |
| 192 | refine ⟨V, hV, ?_⟩ |
| 193 | intro k |
| 194 | rw [H.tubeCritical_volume_eq T Acrit k] |
| 195 | exact (measure_mono (subset_univ _)).trans (hbound k) |
| 196 | |
| 197 | end PoincareMT.M28.CounterexampleNeckFamily |