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.Surgery.Induction.Noncollapse.Assembly.RoundPositive |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Volume.NeckVolume |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Volume.CapVolume |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.TestScalar |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Configuration |
| 6 | |
| 7 | /-! |
| 8 | # The canonical-neighborhood case of Proposition 16.1 |
| 9 | |
| 10 | Morgan--Tian Proposition 16.3 and Remark 16.2, p. 368. A tested center |
| 11 | above the scalar threshold has neck or cap volume; both compact positive |
| 12 | alternatives are excluded by the actual component guard. The resulting |
| 13 | constant depends only on the fixed setup, before the next surgery radius. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M15 |
| 24 | export PoincareMT.Generalized.Noncollapse (calibratedMetricVolume_eq_volumeMeasure) |
| 25 | end PoincareMT.M15 |
| 26 | |
| 27 | namespace PoincareMT.Proofs.M46 |
| 28 | |
| 29 | /-- The canonical volume coefficient is selected before rNext and the flow. -/ |
| 30 | noncomputable def canonicalVolumeConstant {K : MetricSurgeryConstants} |
| 31 | (p : SurgeryParameterPrefix K) : ℝ := |
| 32 | min canonicalNeckVolumeFloor (canonicalCapVolumeFloor (max 1 p.setup.C)) |
| 33 | |
| 34 | /-- Both literal canonical alternatives give a positive uniform coefficient. -/ |
| 35 | theorem canonicalVolumeConstant_pos {K : MetricSurgeryConstants} |
| 36 | (p : SurgeryParameterPrefix K) : 0 < canonicalVolumeConstant p := |
| 37 | lt_min canonicalNeckVolumeFloor_pos (canonicalCapVolumeFloor_pos (le_max_left _ _)) |
| 38 | |
| 39 | /-- Proposition 16.3, applied to the actual public cylinder test. |
| 40 | There is no dependence of the coefficient on the next surgery scale. -/ |
| 41 | theorem canonical_test_volume (P : M46Predecessors.{u}) |
| 42 | {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 43 | {rNext cutoff : ℝ} (hrNext : 0 < rNext) |
| 44 | (hrLast : rNext ≤ p.r ⟨p.i, Nat.lt_succ_self _⟩) |
| 45 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 46 | (inputs : ObservedInputs p rNext cutoff F O) (D : NoncollapseTest F O) |
| 47 | (hhigh : rNext⁻¹ ^ 2 ≤ (F.connection D.time).scalarCurvature D.center) : |
| 48 | ENNReal.ofReal (canonicalVolumeConstant p * D.radius ^ 3) ≤ |
| 49 | calibratedMetricVolume (F.metric D.time) ((F.metric D.time).ball D.center D.radius) := by |
| 50 | have hcanonical := inputs.canonical D.time D.time_mem D.time_domain D.center hhigh |
| 51 | rcases canonical_neck_or_cap_of_not_positive hcanonical D.not_positive with |
| 52 | ⟨N, hx⟩ | ⟨N, _, hC, hconnection, hx⟩ |
| 53 | · have hscalar : N.neck.connection.scalarCurvature N.neck.center ≤ 9 * D.radius⁻¹ ^ 2 := by |
| 54 | rw [N.connection_eq, hx] |
| 55 | exact D.center_scalar_le |
| 56 | have hscale := canonicalNeck_scale_of_scalar_bound N.neck D.radius_pos hscalar |
| 57 | have hvolume := canonicalNeck_test_ball_volume N.neck D.radius_pos hscale |
| 58 | rw [hx] at hvolume |
| 59 | rw [M15.calibratedMetricVolume_eq_volumeMeasure] |
| 60 | apply le_trans (ENNReal.ofReal_le_ofReal _) hvolume |
| 61 | exact mul_le_mul_of_nonneg_right (min_le_left _ _) (pow_nonneg D.radius_pos.le 3) |
| 62 | · have hB : N.cap_constant ≤ max 1 p.setup.C := by |
| 63 | rw [inputs.old.C_eq] at hC |
| 64 | exact hC.trans (le_max_right _ _) |
| 65 | have hNhigh : rNext⁻¹ ^ 2 ≤ N.connection.scalarCurvature D.center := by |
| 66 | rw [hconnection] |
| 67 | exact hhigh |
| 68 | have hsmall : N.core_radius D.center ≤ 1 / 200 := |
| 69 | (canonicalCap_core_radius_le N hx hrNext hNhigh).trans |
| 70 | ((hrLast.trans (p.r_le_epsilon _)).trans |
| 71 | (p.setup.epsilon_le.trans (min_le_left _ _))) |
| 72 | have hpinch : SurgeryPinchedAt N.connection D.time := by |
| 73 | rw [hconnection] |
| 74 | exact inputs.pinched D.time D.time_domain |
| 75 | have hscalar : N.connection.scalarCurvature D.center ≤ 9 * D.radius⁻¹ ^ 2 := by |
| 76 | rw [hconnection] |
| 77 | exact D.center_scalar_le |
| 78 | have hvolume := canonicalCap_test_ball_volume P N hx (le_max_left 1 p.setup.C) |
| 79 | hB D.radius_pos hpinch hsmall hscalar |
| 80 | apply le_trans (ENNReal.ofReal_le_ofReal _) hvolume |
| 81 | exact mul_le_mul_of_nonneg_right (min_le_right _ _) (pow_nonneg D.radius_pos.le 3) |
| 82 | |
| 83 | end PoincareMT.Proofs.M46 |