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.CriticalBall.SourceCriticalBallCurvature |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Ends.SourceTubeNoncollapse |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.CriticalBall.CriticalBallSourcePacket |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.GeometryLimit |
| 6 | |
| 7 | /-! |
| 8 | # The first spatial limit of the actual critical source balls |
| 9 | |
| 10 | The literal critical metrics have fixed base regularity, bounded total |
| 11 | volume, curvature-conditioned noncollapse and regular-component curvature |
| 12 | derivative bounds. Apply the regular-set compactness factory to these |
| 13 | same metrics. The source packet and its high witnesses precede extraction. |
| 14 | Morgan--Tian Claim 10.6, pp. 252-253; Theorem 5.6, pp. 85-87; |
| 15 | `proof-work/tasks/M28/derivations/71-actual-critical-spatial-limit.md`. |
| 16 | -/ |
| 17 | |
| 18 | noncomputable section |
| 19 | set_option autoImplicit false |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | open Set Filter |
| 23 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 28 | |
| 29 | /-- Actual critical-radius geometry gives a spatial limit after any |
| 30 | specified strict source selection. This retains the critical witnesses |
| 31 | before extraction (Claim 10.6; M28 derivation 71). -/ |
| 32 | theorem exists_source_criticalBall_subsequence_limit_accuracy |
| 33 | (P : RicciFlowCurvatureTheory.{u}) : |
| 34 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 35 | ∀ {epsilon C A : ℝ} |
| 36 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 37 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 38 | (H : CounterexampleNeckFamily E) |
| 39 | (T : ∀ k, SourceTubeData (H.segment k)), |
| 40 | epsilon ≤ epsilon₀ → ∀ {A1 : ℝ} (hA1 : 0 < A1), |
| 41 | (4 * max C 2)⁻¹ * epsilon⁻¹ / 8 ≤ A1 → |
| 42 | (∀ r < A1, tube.eventuallyRadiusBound |
| 43 | (fun k x => ((H.tubeMetric T k).edist (H.tubeBase T k) x).toReal) |
| 44 | (fun k x => (H.tubeConnection T k).scalarCurvature x) r) → |
| 45 | ∀ phi : ℕ → ℕ, StrictMono phi → |
| 46 | Nonempty (RegularPointedMetricConvergence |
| 47 | (fun k => H.tubeCriticalMetric T A1 (phi k)) |
| 48 | (fun k => H.tubeCriticalBase T A1 hA1 (phi k))) := by |
| 49 | classical |
| 50 | obtain ⟨epsilonC, hCpos, hCsmall, hcurv⟩ := |
| 51 | exists_source_criticalBall_curvature_accuracy P |
| 52 | obtain ⟨epsilonN, kappa, hNpos, _hNsmall, hkappa, hnoncollapse⟩ := |
| 53 | exists_source_tubeCritical_noncollapse_accuracy P |
| 54 | refine ⟨min epsilonC epsilonN, lt_min hCpos hNpos, |
| 55 | (min_le_left _ _).trans hCsmall, ?_⟩ |
| 56 | intro epsilon C A E H T hepsilon A1 hA1 hbase hcrit phi hphi |
| 57 | let (k : ℕ) : PreconnectedSpace (H.tubeCriticalRegion T A1 k) := |
| 58 | (H.tubeCriticalRegion_connected T A1 hA1 k).toPreconnectedSpace |
| 59 | let (k : ℕ) : MetricSpace (H.tubeCriticalRegion T A1 k) := by |
| 60 | let g := H.tubeCriticalMetric T A1 k |
| 61 | letI : Bundle.RiemannianBundle |
| 62 | (TangentSpace (𝓡 3) : H.tubeCriticalRegion T A1 k → Type _) := |
| 63 | ⟨g.toRiemannianMetric⟩ |
| 64 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin 3)) |
| 65 | (TangentSpace (𝓡 3) : H.tubeCriticalRegion T A1 k → Type _) := |
| 66 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ => rfl⟩⟩ |
| 67 | letI : EMetricSpace (H.tubeCriticalRegion T A1 k) := |
| 68 | EMetricSpace.ofRiemannianMetric (𝓡 3) (H.tubeCriticalRegion T A1 k) |
| 69 | exact EMetricSpace.toMetricSpace (fun x y => g.edist_ne_top x y) |
| 70 | let D : ∀ k, LeviCivitaData (H.tubeCriticalMetric T A1 k) := |
| 71 | fun k => Classical.choice (exists_leviCivitaData (H.tubeCriticalMetric T A1 k)) |
| 72 | have heps : 0 < epsilon := by |
| 73 | rw [← (T 0).epsilon_eq] |
| 74 | exact (T 0).tube.epsilon_pos |
| 75 | have hC : 0 < max C 2 := lt_of_lt_of_le (by norm_num) (le_max_right _ _) |
| 76 | have hregular : 0 < ((4 * max C 2)⁻¹ * epsilon⁻¹ / 8) / 2 := by positivity |
| 77 | obtain ⟨V, hV, hvolume⟩ := H.exists_tubeCritical_volume_bound T A1 |
| 78 | apply exists_regular_metric_limit_of_geometry |
| 79 | (fun k => H.tubeCriticalMetric T A1 (phi k)) (fun k => D (phi k)) |
| 80 | (fun k => H.tubeCriticalBase T A1 hA1 (phi k)) |
| 81 | (by norm_num) (fun _ _ _ => rfl) hregular (by norm_num : (0 : ℝ) < 1) |
| 82 | hkappa hV.le |
| 83 | · exact Eventually.of_forall (fun k => |
| 84 | H.tubeCritical_base_regular T A1 hA1 hbase (phi k)) |
| 85 | · exact Eventually.of_forall (fun k => hvolume (phi k)) |
| 86 | · exact Eventually.of_forall (fun k => hnoncollapse H T A1 hA1 |
| 87 | (hepsilon.trans (min_le_right _ _)) (phi k) (D (phi k))) |
| 88 | · intro delta hdelta l |
| 89 | obtain ⟨B, hB, hbound⟩ := hcurv H T |
| 90 | (hepsilon.trans (min_le_left _ _)) hA1 D hcrit delta hdelta l |
| 91 | exact ⟨B, hB, hphi.tendsto_atTop.eventually hbound⟩ |
| 92 | |
| 93 | /-- The actual critical-radius inputs produce their pointed smooth |
| 94 | spatial limit, with eventual regular-component coverage. The accuracy |
| 95 | precedes the source data (Claim 10.6; M28 derivation 71). -/ |
| 96 | theorem exists_source_criticalBall_spatial_limit_accuracy |
| 97 | (P : RicciFlowCurvatureTheory.{u}) : |
| 98 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 99 | ∀ {epsilon C A : ℝ} |
| 100 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 101 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 102 | (H : CounterexampleNeckFamily E) |
| 103 | (T : ∀ k, SourceTubeData (H.segment k)), |
| 104 | epsilon ≤ epsilon₀ → ∀ {A1 : ℝ} (hA1 : 0 < A1), |
| 105 | (4 * max C 2)⁻¹ * epsilon⁻¹ / 8 ≤ A1 → |
| 106 | (∀ r < A1, tube.eventuallyRadiusBound |
| 107 | (fun k x => ((H.tubeMetric T k).edist (H.tubeBase T k) x).toReal) |
| 108 | (fun k x => (H.tubeConnection T k).scalarCurvature x) r) → |
| 109 | Nonempty (RegularPointedMetricConvergence |
| 110 | (H.tubeCriticalMetric T A1) (H.tubeCriticalBase T A1 hA1)) := by |
| 111 | obtain ⟨epsilon₀, hpos, hsmall, hgeometry⟩ := |
| 112 | exists_source_criticalBall_subsequence_limit_accuracy P |
| 113 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 114 | intro epsilon C A E H T hepsilon A1 hA1 hbase hcrit |
| 115 | exact hgeometry H T hepsilon hA1 hbase hcrit id strictMono_id |
| 116 | |
| 117 | /-- The selected source family constructs both its full critical-radius |
| 118 | packet and the spatial limit of that packet's actual critical metrics. |
| 119 | No regular-set geometric bound is an extra input (Claim 10.6; derivation 71). -/ |
| 120 | theorem exists_actual_source_criticalBall_spatial_limit_accuracy |
| 121 | (P : RicciFlowCurvatureTheory.{u}) : |
| 122 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 123 | ∀ {epsilon C A : ℝ} |
| 124 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 125 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 126 | (H : CounterexampleNeckFamily E), epsilon ≤ epsilon₀ → |
| 127 | ∃ W : CriticalBallSourcePacket H, |
| 128 | Nonempty (RegularPointedMetricConvergence |
| 129 | (H.tubeCriticalMetric W.tube W.radius) |
| 130 | (H.tubeCriticalBase W.tube W.radius W.radius_pos)) := by |
| 131 | obtain ⟨epsilonW, hWpos, _hWsmall, hpacket⟩ := |
| 132 | exists_criticalBall_source_packet_accuracy P |
| 133 | obtain ⟨epsilonG, hGpos, hGsmall, hgeometry⟩ := |
| 134 | exists_source_criticalBall_spatial_limit_accuracy P |
| 135 | refine ⟨min epsilonW epsilonG, lt_min hWpos hGpos, |
| 136 | (min_le_right _ _).trans hGsmall, ?_⟩ |
| 137 | intro epsilon C A E H hepsilon |
| 138 | obtain ⟨W⟩ := hpacket H (hepsilon.trans (min_le_left _ _)) |
| 139 | exact ⟨W, hgeometry H W.tube (hepsilon.trans (min_le_right _ _)) |
| 140 | W.radius_pos W.radius_lower W.radius_bound⟩ |
| 141 | |
| 142 | set_option maxHeartbeats 800000 in |
| 143 | -- The dependent carrier in the supremum retains both selected source index maps. |
| 144 | /-- Select high-curvature witnesses before spatial extraction and retain |
| 145 | their critical-radius supremum on the actual composite source indices. |
| 146 | The high points remain in the full tube (Claim 10.6; derivation 71). -/ |
| 147 | theorem exists_actual_source_criticalBall_retained_limit_accuracy |
| 148 | (P : RicciFlowCurvatureTheory.{u}) : |
| 149 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 150 | ∀ {epsilon C A : ℝ} |
| 151 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 152 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 153 | (H : CounterexampleNeckFamily E), epsilon ≤ epsilon₀ → |
| 154 | ∃ W : CriticalBallSourcePacket H, |
| 155 | ∃ G : RegularPointedMetricConvergence |
| 156 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 157 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k)), |
| 158 | sSup {r : ℝ | tube.eventuallyRadiusBound |
| 159 | (fun k x => ((H.tubeMetric W.tube (W.high_index (G.subsequence k))).edist |
| 160 | (H.tubeBase W.tube (W.high_index (G.subsequence k))) x).toReal) |
| 161 | (fun k x => (H.tubeConnection W.tube |
| 162 | (W.high_index (G.subsequence k))).scalarCurvature x) r} = W.radius := by |
| 163 | obtain ⟨epsilonW, hWpos, _hWsmall, hpacket⟩ := |
| 164 | exists_criticalBall_source_packet_accuracy P |
| 165 | obtain ⟨epsilonG, hGpos, hGsmall, hgeometry⟩ := |
| 166 | exists_source_criticalBall_subsequence_limit_accuracy P |
| 167 | refine ⟨min epsilonW epsilonG, lt_min hWpos hGpos, |
| 168 | (min_le_right _ _).trans hGsmall, ?_⟩ |
| 169 | intro epsilon C A E H hepsilon |
| 170 | obtain ⟨W⟩ := hpacket H (hepsilon.trans (min_le_left _ _)) |
| 171 | obtain ⟨G⟩ := hgeometry H W.tube (hepsilon.trans (min_le_right _ _)) |
| 172 | W.radius_pos W.radius_lower W.radius_bound W.high_index W.high_index_strictMono |
| 173 | refine ⟨W, G, ?_⟩ |
| 174 | exact tube.critical_radius_preserved_by_subsequence |
| 175 | (fun k x => ((H.tubeMetric W.tube k).edist (H.tubeBase W.tube k) x).toReal) |
| 176 | (fun k x => (H.tubeConnection W.tube k).scalarCurvature x) |
| 177 | (φ := W.high_index) (ψ := G.subsequence) W.radius_pos |
| 178 | W.radius_bound W.high_index_strictMono W.high_point |
| 179 | (fun j => ⟨W.high_radius_upper j, W.high_scalar_lower j⟩) G.subsequence_strictMono |
| 180 | |
| 181 | end PoincareMT.M28.CounterexampleNeckFamily |
| 182 | |
| 183 | namespace PoincareMT.M28 |
| 184 | |
| 185 | /-- The counterexamples and the two predecessor theories construct the |
| 186 | source family, its critical packet and the actual first spatial limit. |
| 187 | No selected geometric input is assumed (Claim 10.6; derivation 71). -/ |
| 188 | theorem exists_counterexample_criticalBall_spatial_limit_accuracy |
| 189 | (P : RicciFlowCurvatureTheory.{u}) (T : RepairedNeckCapTopologyTheory.{u}) : |
| 190 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 191 | ∀ (epsilon C A : ℝ), 0 < epsilon → epsilon ≤ epsilon₀ → 0 < C → |
| 192 | ∀ E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 193 | ((n : ℝ) + 1) ((n : ℝ) + 1), |
| 194 | ∃ H : CounterexampleNeckFamily E, |
| 195 | ∃ W : CounterexampleNeckFamily.CriticalBallSourcePacket H, |
| 196 | Nonempty (RegularPointedMetricConvergence |
| 197 | (H.tubeCriticalMetric W.tube W.radius) |
| 198 | (H.tubeCriticalBase W.tube W.radius W.radius_pos)) := by |
| 199 | obtain ⟨epsilonH, hHpos, _hHsmall, hfamily⟩ := |
| 200 | exists_counterexample_neck_family_accuracy P T |
| 201 | obtain ⟨epsilonG, hGpos, hGsmall, hgeometry⟩ := |
| 202 | CounterexampleNeckFamily.exists_actual_source_criticalBall_spatial_limit_accuracy P |
| 203 | refine ⟨min epsilonH epsilonG, lt_min hHpos hGpos, |
| 204 | (min_le_right _ _).trans hGsmall, ?_⟩ |
| 205 | intro epsilon C A heps hepsilon hC E |
| 206 | obtain ⟨H⟩ := hfamily epsilon C A heps |
| 207 | (hepsilon.trans (min_le_left _ _)) hC E |
| 208 | obtain ⟨W, hlimit⟩ := hgeometry H (hepsilon.trans (min_le_right _ _)) |
| 209 | exact ⟨H, W, hlimit⟩ |
| 210 | |
| 211 | end PoincareMT.M28 |