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.Volume.Surgery.Event.RetainedVolume |
| 2 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Cap.EventCapVolume |
| 3 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Neck.NeckVolume |
| 4 | |
| 5 | /-! |
| 6 | Adapted from Mapher `PoincareMT/Proofs/M49/Lemma17_12_EventLoss.lean` at |
| 7 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 8 | |
| 9 | # Summed volume loss over every actual surgery cap |
| 10 | |
| 11 | Morgan-Tian Lemma 17.12, pp. 410-411, with the corrected h^3/delta |
| 12 | scale of MT-SURGERY-VOLUME-SCALING. Disjoint positive neck halves |
| 13 | pay for all inserted caps simultaneously. This stronger summed |
| 14 | estimate is also needed for the number of component-increasing cuts. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set MeasureTheory |
| 20 | open scoped Manifold ContDiff ENNReal BigOperators |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.SurgeryVolume |
| 25 | |
| 26 | /-- Every per-cap loss contributes to the actual total-volume drop |
| 27 | (MT Lemma 17.12, pp. 410-411; M49 derivation 26). -/ |
| 28 | theorem event_total_volume_add_cap_losses_le |
| 29 | {g₀ : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 30 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 31 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 32 | (E : SurgeryEventData g₀ K P slice metric T) (loss : ℝ≥0∞) |
| 33 | (hloss : ∀ i : Fin E.cap_count, |
| 34 | calibratedMetricVolume (metric T) (E.caps i).carrier + loss ≤ |
| 35 | calibratedMetricVolume E.limit_metric |
| 36 | ((E.necks i).neck.region 0 (E.necks i).neck.epsilon⁻¹)) : |
| 37 | calibratedMetricVolume (metric T) univ + (E.cap_count : ℝ≥0∞) * loss ≤ |
| 38 | calibratedMetricVolume E.limit_metric univ := by |
| 39 | classical |
| 40 | let R := E.limit_identify.map '' E.retained_pre |
| 41 | let A := fun i : Fin E.cap_count => |
| 42 | (E.necks i).neck.region 0 (E.necks i).neck.epsilon⁻¹ |
| 43 | have hA (i : Fin E.cap_count) : MeasurableSet (A i) := by |
| 44 | let N := (E.necks i).neck |
| 45 | have h0 : -N.epsilon⁻¹ ≤ (0 : ℝ) := neg_nonpos.mpr (inv_pos.mpr N.epsilon_pos).le |
| 46 | rw [show A i = N.region 0 N.epsilon⁻¹ from rfl, |
| 47 | ← epsilonNeckChart_image_region N 0 N.epsilon⁻¹ h0 le_rfl] |
| 48 | apply IsOpen.measurableSet |
| 49 | apply (epsilonNeckChart N).isOpen_image_of_subset_source (isOpen_univ.prod isOpen_Ioo) |
| 50 | intro z hz |
| 51 | exact ⟨mem_univ _, h0.trans_lt hz.2.1, hz.2.2⟩ |
| 52 | have hdis : Pairwise (fun i j => Disjoint (A i) (A j)) := by |
| 53 | intro i j hij |
| 54 | exact (E.neck_carrier_disjoint i j hij).mono |
| 55 | (fun _ hx => hx.1) (fun _ hx => hx.1) |
| 56 | have hRdis : Disjoint R (⋃ i, A i) := by |
| 57 | apply disjoint_iUnion_right.mpr |
| 58 | intro i |
| 59 | exact (E.neck_positive_discarded i).symm |
| 60 | have hpost : calibratedMetricVolume (metric T) univ ≤ |
| 61 | calibratedMetricVolume (metric T) E.retained_post + |
| 62 | ∑ i, calibratedMetricVolume (metric T) (E.caps i).carrier := by |
| 63 | rw [← E.post_cover] |
| 64 | exact (measure_union_le _ _).trans (add_le_add le_rfl (measure_iUnion_fintype_le _ _)) |
| 65 | have hterminal : calibratedMetricVolume E.limit_metric R + |
| 66 | ∑ i, calibratedMetricVolume E.limit_metric (A i) ≤ |
| 67 | calibratedMetricVolume E.limit_metric univ := by |
| 68 | have hvolA : calibratedMetricVolume E.limit_metric (⋃ i, A i) = |
| 69 | ∑ i, calibratedMetricVolume E.limit_metric (A i) := by |
| 70 | rw [measure_iUnion hdis hA, tsum_fintype] |
| 71 | rw [← hvolA, ← measure_union hRdis (MeasurableSet.iUnion hA)] |
| 72 | exact measure_mono (subset_univ _) |
| 73 | calc |
| 74 | _ ≤ (calibratedMetricVolume (metric T) E.retained_post + |
| 75 | ∑ i, calibratedMetricVolume (metric T) (E.caps i).carrier) + |
| 76 | (E.cap_count : ℝ≥0∞) * loss := add_le_add hpost le_rfl |
| 77 | _ = calibratedMetricVolume E.limit_metric R + |
| 78 | ∑ i, (calibratedMetricVolume (metric T) (E.caps i).carrier + loss) := by |
| 79 | rw [event_retained_volume_eq E, Finset.sum_add_distrib] |
| 80 | simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] |
| 81 | exact add_assoc _ _ _ |
| 82 | _ ≤ calibratedMetricVolume E.limit_metric R + |
| 83 | ∑ i, calibratedMetricVolume E.limit_metric (A i) := |
| 84 | add_le_add le_rfl (Finset.sum_le_sum (fun i _ => hloss i)) |
| 85 | _ ≤ _ := hterminal |
| 86 | |
| 87 | /-- Uniform positive cubic losses bound every cap and their full sum |
| 88 | (MT Lemma 17.12, pp. 410-411; corrected scale MT-SURGERY-VOLUME-SCALING). -/ |
| 89 | theorem exists_uniform_event_volume_loss (g₀ : StandardInitialMetric) : |
| 90 | ∃ c : ℝ, 0 < c ∧ ∀ K : MetricSurgeryConstants, |
| 91 | ∃ d : ℝ, 0 < d ∧ d ≤ K.delta₀ ∧ |
| 92 | ∀ (P : SurgeryParameters) (slice : ℝ → GeneralizedSliceCarrier.{u}) |
| 93 | (metric : ∀ t, RiemannianMetric 3 (slice t).carrier) (T : ℝ) |
| 94 | (E : SurgeryEventData g₀ K P slice metric T), |
| 95 | P.delta T ≤ d → |
| 96 | (∀ i : Fin E.cap_count, |
| 97 | calibratedMetricVolume (metric T) (E.caps i).carrier + |
| 98 | ENNReal.ofReal (c * ((P.h T) ^ 3 / P.delta T)) ≤ |
| 99 | calibratedMetricVolume E.limit_metric |
| 100 | ((E.necks i).neck.region 0 (E.necks i).neck.epsilon⁻¹)) ∧ |
| 101 | calibratedMetricVolume (metric T) univ + (E.cap_count : ℝ≥0∞) * |
| 102 | ENNReal.ofReal (c * ((P.h T) ^ 3 / P.delta T)) ≤ |
| 103 | calibratedMetricVolume E.limit_metric univ := by |
| 104 | obtain ⟨cn, dn, hcn, hdn, hneck⟩ := exists_uniform_positive_half_neck_volume.{u} |
| 105 | obtain ⟨Ccap, hCcap, hcap⟩ := exists_uniform_event_cap_volume_bound.{u} g₀ |
| 106 | refine ⟨cn / 2, half_pos hcn, ?_⟩ |
| 107 | intro K |
| 108 | obtain ⟨dc, hdc, hdcK, hcapK⟩ := hcap K |
| 109 | let d := min dc (min dn (cn / (2 * Ccap))) |
| 110 | have hd : 0 < d := lt_min hdc (lt_min hdn (div_pos hcn (mul_pos (by norm_num) hCcap))) |
| 111 | refine ⟨d, hd, (min_le_left _ _).trans hdcK, ?_⟩ |
| 112 | intro P slice metric T E hdelta |
| 113 | have hT : 0 ≤ T := E.tMinus_nonnegative.trans E.tMinus_lt.le |
| 114 | have hp : 0 < P.h T := P.h_pos T hT |
| 115 | have hdp : 0 < P.delta T := P.delta_pos T hT |
| 116 | have hc := hcapK P slice metric T E (hdelta.trans (min_le_left _ _)) |
| 117 | have hsmall : P.delta T ≤ cn / (2 * Ccap) := |
| 118 | hdelta.trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 119 | have habsorb : Ccap * (P.h T) ^ 3 ≤ cn / 2 * ((P.h T) ^ 3 / P.delta T) := by |
| 120 | have hm : P.delta T * (2 * Ccap) ≤ cn := |
| 121 | (le_div_iff₀ (mul_pos (by norm_num) hCcap)).mp hsmall |
| 122 | rw [← mul_div_assoc] |
| 123 | apply (le_div_iff₀ hdp).mpr |
| 124 | nlinarith [mul_le_mul_of_nonneg_right hm (pow_nonneg hp.le 3)] |
| 125 | have hper (i : Fin E.cap_count) : |
| 126 | calibratedMetricVolume (metric T) (E.caps i).carrier + |
| 127 | ENNReal.ofReal (cn / 2 * ((P.h T) ^ 3 / P.delta T)) ≤ |
| 128 | calibratedMetricVolume E.limit_metric |
| 129 | ((E.necks i).neck.region 0 (E.necks i).neck.epsilon⁻¹) := by |
| 130 | have hn := hneck E.terminal.carrier E.limit_metric (E.necks i).neck (by |
| 131 | rw [E.neck_delta i] |
| 132 | exact hdelta.trans ((min_le_right _ _).trans (min_le_left _ _))) |
| 133 | rw [E.neck_scale i, E.neck_delta i] at hn |
| 134 | calc |
| 135 | _ ≤ ENNReal.ofReal (Ccap * (P.h T) ^ 3) + |
| 136 | ENNReal.ofReal (cn / 2 * ((P.h T) ^ 3 / P.delta T)) := add_le_add (hc i) le_rfl |
| 137 | _ ≤ ENNReal.ofReal (cn / 2 * ((P.h T) ^ 3 / P.delta T)) + |
| 138 | ENNReal.ofReal (cn / 2 * ((P.h T) ^ 3 / P.delta T)) := |
| 139 | add_le_add (ENNReal.ofReal_le_ofReal habsorb) le_rfl |
| 140 | _ = ENNReal.ofReal (cn * (P.h T) ^ 3 / P.delta T) := by |
| 141 | rw [← ENNReal.ofReal_add (by positivity) (by positivity)] |
| 142 | congr 1 |
| 143 | ring |
| 144 | _ ≤ _ := by simpa only [E.neck_delta i] using hn |
| 145 | exact ⟨hper, event_total_volume_add_cap_losses_le E _ hper⟩ |
| 146 | |
| 147 | end PoincareMT.SurgeryVolume |