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.SourceCriticalBallFreshNeck |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Geometry.SeparatingLimitCover |
| 4 | |
| 5 | /-! |
| 6 | # The actual positive-side neck cover and its M25 tube |
| 7 | |
| 8 | Choose the constructed limit neck at each positive-side point and restrict |
| 9 | it to common accuracy two epsilon. Its range is a cover with every center |
| 10 | in that same side and every connection equal to the prescribed one. |
| 11 | The initial separating sphere supplies M25's separation label and tube. |
| 12 | Source: Morgan--Tian Proposition 10.7 and Claim 10.8, pp. 253-254, |
| 13 | and corrected Appendix A.19-A.20; M28 derivations 117 and 121. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 25 | |
| 26 | set_option maxHeartbeats 3200000 in |
| 27 | -- The range cover keeps every selected center and its actual limit connection. |
| 28 | /-- Actual source labels produce a selected positive-side neck cover and |
| 29 | its corrected A.19 tube. Every selected neck is centered in the same |
| 30 | connected side and uses D0. Source: Proposition 10.7 and Claim 10.8; |
| 31 | M28 derivation 121, using the published M25 separation producers. -/ |
| 32 | theorem exists_retained_positive_side_tube_accuracy |
| 33 | (P : RicciFlowCurvatureTheory.{u}) : |
| 34 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ (1 / 10000 : ℝ) ∧ |
| 35 | ∀ {epsilon C A : ℝ} |
| 36 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 37 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 38 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H), |
| 39 | epsilon ≤ epsilon0 → |
| 40 | ∀ (G : RegularPointedMetricConvergence |
| 41 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 42 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))), |
| 43 | letI := G.limitCarrier.topologicalSpace |
| 44 | letI := G.limitCarrier.chartedSpace |
| 45 | letI := G.limitCarrier.isManifold |
| 46 | ∀ (D0 : LeviCivitaData G.limitMetric) (L : EpsilonNeck G.limitMetric), |
| 47 | L.center = G.base → L.epsilon = 3 * epsilon / 2 → L.IsSeparating → |
| 48 | ∀ X : Set G.limitCarrier.carrier, IsConnected X → frontier X = L.central_sphere → |
| 49 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 50 | ∀ (f : ℕ → UnitTwoSphere → ℝ), |
| 51 | (∀ k, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (f k)) → |
| 52 | (∀ k z, |f k z| < epsilon⁻¹ / 32) → |
| 53 | (∀ k, (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 54 | W.high_index G (sigma k)) '' L.central_sphere = |
| 55 | range (fun z => |
| 56 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 57 | (z, f k z))) → |
| 58 | (∀ x ∈ X, ∀ᶠ k in atTop, (G.embedding (sigma k) x).val.val ∉ |
| 59 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 60 | (f k)) → |
| 61 | ∃ K : NeckOnlyCover G.limitMetric, K.X = X ∧ K.epsilon = 2 * epsilon ∧ |
| 62 | (∀ N ∈ K.necks, N.center ∈ X ∧ N.connection = D0) ∧ |
| 63 | Nonempty (CorrectedA19Conclusion G.limitMetric K) := by |
| 64 | classical |
| 65 | obtain ⟨epsilonN, hNpos, hNsmall, hneck⟩ := exists_retained_positive_limit_neck_accuracy P |
| 66 | obtain ⟨epsilonT, hTpos, hTsmall, htube⟩ := exists_limit_cover_tube_accuracy.{0} |
| 67 | refine ⟨min epsilonN (epsilonT / 2), lt_min hNpos (half_pos hTpos), |
| 68 | (min_le_left _ _).trans hNsmall, ?_⟩ |
| 69 | intro epsilon C A E H W hepsilon G |
| 70 | let := G.limitCarrier.topologicalSpace |
| 71 | let := G.limitCarrier.chartedSpace |
| 72 | let := G.limitCarrier.isManifold |
| 73 | let := G.limitCarrier.measurableSpace |
| 74 | let := G.limitCarrier.borelSpace |
| 75 | let := G.limitCarrier.t2Space |
| 76 | let := G.limitCarrier.t3Space |
| 77 | intro D0 L hL hepsL hsep X hX hfront sigma hsigma f hf hbound hgraphs hside |
| 78 | have hepspos : 0 < epsilon := |
| 79 | (H.segment 0).cover_epsilon ▸ (H.segment 0).cover.epsilon_pos |
| 80 | have hepsN : epsilon ≤ epsilonN := hepsilon.trans (min_le_left _ _) |
| 81 | have htwo : 2 * epsilon ≤ epsilonT := by |
| 82 | have hh := hepsilon.trans (min_le_right _ _) |
| 83 | linarith |
| 84 | have hhalf : 2 * epsilon < 1 / 2 := (htwo.trans hTsmall).trans_lt (by norm_num) |
| 85 | have hpoint (x : X) : ∃ N : EpsilonNeck G.limitMetric, |
| 86 | N.epsilon = 2 * epsilon ∧ N.center = x.val ∧ N.connection = D0 := by |
| 87 | obtain ⟨N, heps, hcenter, hconnection, _hstage⟩ := |
| 88 | hneck H W hepsN G D0 x.val L hL sigma hsigma f hf hbound hgraphs (hside x.val x.property) |
| 89 | have hNeps : N.epsilon ≤ 2 * epsilon := by rw [heps]; linarith |
| 90 | exact ⟨N.restrict_m28 (2 * epsilon) hNeps hhalf, rfl, hcenter, hconnection⟩ |
| 91 | choose N hN using hpoint |
| 92 | let K : NeckOnlyCover G.limitMetric := { |
| 93 | epsilon := 2 * epsilon |
| 94 | epsilon_pos := mul_pos (by norm_num) hepspos |
| 95 | epsilon_threshold := epsilonT |
| 96 | epsilon_threshold_pos := hTpos |
| 97 | epsilon_threshold_le_one_two_hundred := hTsmall |
| 98 | epsilon_le_threshold := htwo |
| 99 | X := X |
| 100 | connected_X := hX |
| 101 | necks := range N |
| 102 | pointwise_center_cover := fun x hx => |
| 103 | ⟨N ⟨x, hx⟩, mem_range_self _, (hN ⟨x, hx⟩).2.1⟩ |
| 104 | neck_epsilon := by |
| 105 | rintro _ ⟨x, rfl⟩ |
| 106 | exact (hN x).1 } |
| 107 | have hcenters : ∀ V ∈ K.necks, V.center ∈ X ∧ V.connection = D0 := by |
| 108 | rintro _ ⟨x, rfl⟩ |
| 109 | refine ⟨?_, (hN x).2.2⟩ |
| 110 | rw [(hN x).2.1] |
| 111 | exact x.property |
| 112 | have hclosure : L.center ∈ closure K.X := by |
| 113 | apply frontier_subset_closure |
| 114 | change L.center ∈ frontier X |
| 115 | rw [hfront] |
| 116 | exact L.center_on_central_sphere |
| 117 | have hLsmall : L.epsilon ≤ epsilonT := by rw [hepsL]; linarith |
| 118 | obtain ⟨_hseparate, hresult⟩ := htube K L htwo hLsmall hsep hclosure |
| 119 | (fun V hV => (hcenters V hV).1) |
| 120 | exact ⟨K, rfl, rfl, hcenters, hresult⟩ |
| 121 | |
| 122 | end PoincareMT.M28.CounterexampleNeckFamily |