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.Coordinates.SourceNormalizedConnector |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Geometry.RegularMinimizerExtension |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Ends.SourceTubeCriticalRegion |
| 5 | |
| 6 | /-! |
| 7 | # The actual small-scale critical-ball margin |
| 8 | |
| 9 | Morgan--Tian Claim 10.6, printed p. 252. At an intrinsically regular point |
| 10 | in a small selected neck, the same-level connector reaches the original |
| 11 | regional minimum. Its captured outward extension gains three quarters of |
| 12 | the regularity radius in base distance, giving the half-radius margin. |
| 13 | All geometric inputs are produced from the actual selected source data; |
| 14 | no fixed-index cofinality or separate radial-spine premise is required. |
| 15 | See `proof-work/tasks/M28/derivations/70-regular-minimizer-extension.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 27 | |
| 28 | /-- Every regular point in an active neck of normalized scale below |
| 29 | delta/48 has the strict half-delta critical-radius margin. The tolerance |
| 30 | precedes all source data and the conclusion holds at each source index |
| 31 | (Claim 10.6, p. 252; M28 derivation 70). -/ |
| 32 | theorem exists_source_criticalBall_small_scale_margin_accuracy : |
| 33 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 34 | ∀ {epsilon C A : ℝ} |
| 35 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 36 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 37 | (H : CounterexampleNeckFamily E) |
| 38 | (T : ∀ k, SourceTubeData (H.segment k)), |
| 39 | epsilon ≤ epsilon₀ → |
| 40 | ∀ {A1 delta : ℝ} (k : ℕ) (x : H.tubeCriticalRegion T A1 k), |
| 41 | 0 < delta → x ∈ regularPoints (H.tubeCriticalMetric T A1 k) delta → |
| 42 | ∀ {i : ℤ}, i ∈ (T k).chain.shape.active → |
| 43 | (x : (T k).carrierOpen).val ∈ ((T k).chain.neck i).carrier → |
| 44 | H.tubeNodeScale T k i < delta / 48 → |
| 45 | ((H.tubeMetric T k).edist (H.tubeBase T k) |
| 46 | (x : (T k).carrierOpen)).toReal < A1 - delta / 2 := by |
| 47 | obtain ⟨epsilonW, hWpos, hWsmall, hW⟩ := exists_source_finite_walk_accuracy.{u} |
| 48 | obtain ⟨epsilonR, hRpos, _hRsmall, hR⟩ := exists_source_neck_region_accuracy.{u} |
| 49 | obtain ⟨epsilonE, hEpos, _hEsmall, hE⟩ := |
| 50 | exists_source_neck_endpoint_exclusion_accuracy.{u} |
| 51 | let epsilon₀ := min epsilonW (min epsilonR epsilonE) |
| 52 | refine ⟨epsilon₀, lt_min hWpos (lt_min hRpos hEpos), |
| 53 | (min_le_left _ _).trans hWsmall, ?_⟩ |
| 54 | intro epsilon C A E H T hsmall A1 delta k x hdelta hxreg i hi hx hscale |
| 55 | have hsmallW : epsilon ≤ epsilonW := hsmall.trans (min_le_left _ _) |
| 56 | have hsmallR : epsilon ≤ epsilonR := |
| 57 | hsmall.trans ((min_le_right _ _).trans (min_le_left _ _)) |
| 58 | have hsmallE : epsilon ≤ epsilonE := |
| 59 | hsmall.trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 60 | let S := H.segment k |
| 61 | have hTR : (T k).carrierOpen.1 ⊆ S.source_region.carrier := |
| 62 | (T k).carrier_subset_neckCarrierUnion.trans |
| 63 | (hR (E (k + H.shift)) S (H.base_scalar_pos k) hsmallR).2.1 |
| 64 | have hend := hE (E (k + H.shift)) S (H.base_scalar_pos k) hsmallE |
| 65 | have hzero : S.path 0 ∉ (T k).carrierOpen := |
| 66 | fun h => hend.1 ((T k).carrier_subset_neckCarrierUnion h) |
| 67 | have hone : S.path 1 ∉ (T k).carrierOpen := |
| 68 | fun h => hend.2 ((T k).carrier_subset_neckCarrierUnion h) |
| 69 | obtain ⟨W⟩ := hW H T hsmallW k |
| 70 | obtain ⟨v, hv, hvT, hbasepath, hconnector⟩ := |
| 71 | normalized_source_connector_of_finite_walk H T k W |
| 72 | (hsmallW.trans hWsmall) hi (x : (T k).carrierOpen) hx |
| 73 | have hnorm := H.normalizedSlice_source_path_minimizing k |
| 74 | have he : 0 ≤ 8 * H.tubeNodeScale T k i := |
| 75 | mul_nonneg (by norm_num) (H.tubeNodeScale_pos T k i).le |
| 76 | have hL : 0 < 3 * delta / 4 := by positivity |
| 77 | have hbudget : 8 * H.tubeNodeScale T k i + 3 * delta / 4 < delta := by |
| 78 | linarith |
| 79 | obtain ⟨y, hgain⟩ := exists_radial_gain_of_regular_regional_minimizer |
| 80 | (H.normalizedSliceMetric k) (T k).carrierOpen (H.tubeCriticalRegion T A1 k) |
| 81 | (H.tubeBase T k) x hTR S.path_smooth S.source_region.path_mem |
| 82 | hnorm.1 hnorm.2 hzero hone |
| 83 | ⟨S.lower_pos.le, S.lower_lt_upper.le.trans S.upper_lt_one.le⟩ hv |
| 84 | rfl hvT hbasepath hxreg he hL hbudget hconnector |
| 85 | change (H.tubeMetric T k).edist (H.tubeBase T k) (x : (T k).carrierOpen) + |
| 86 | ENNReal.ofReal (3 * delta / 4) ≤ |
| 87 | (H.tubeMetric T k).edist (H.tubeBase T k) (y : (T k).carrierOpen) + |
| 88 | ENNReal.ofReal (8 * H.tubeNodeScale T k i) at hgain |
| 89 | have hxfinite := H.tube_edist_ne_top T k (H.tubeBase T k) |
| 90 | (x : (T k).carrierOpen) |
| 91 | have hyfinite := H.tube_edist_ne_top T k (H.tubeBase T k) |
| 92 | (y : (T k).carrierOpen) |
| 93 | have hreal := ENNReal.toReal_mono |
| 94 | (ENNReal.add_ne_top.mpr ⟨hyfinite, ENNReal.ofReal_ne_top⟩) hgain |
| 95 | rw [ENNReal.toReal_add hxfinite ENNReal.ofReal_ne_top, |
| 96 | ENNReal.toReal_add hyfinite ENNReal.ofReal_ne_top, |
| 97 | ENNReal.toReal_ofReal hL.le, ENNReal.toReal_ofReal he] at hreal |
| 98 | have hycrit : ((H.tubeMetric T k).edist (H.tubeBase T k) |
| 99 | (y : (T k).carrierOpen)).toReal < A1 := |
| 100 | ENNReal.toReal_lt_of_lt_ofReal y.property |
| 101 | linarith |
| 102 | |
| 103 | end PoincareMT.M28.CounterexampleNeckFamily |