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.Evolution.DirectLeftLimitVolume |
| 2 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Analysis.ExponentialJumpBalance |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Proofs/M49/WeightedEventVolume.lean` at |
| 6 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 7 | |
| 8 | # Weighted losses on an actual included event prefix |
| 9 | |
| 10 | Morgan-Tian Lemma 17.12, pp. 410-411. The actual scalar left limits |
| 11 | and terminal-volume inequalities bound every finite sum of weighted |
| 12 | event losses. See M49 derivation 33 for the included endpoint and |
| 13 | empty post-slice cases. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter MeasureTheory |
| 19 | open scoped Topology ENNReal BigOperators |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.SurgeryVolume |
| 24 | |
| 25 | /-- Actual event losses on an included prefix are paid for by initial |
| 26 | volume (MT Lemma 17.12, pp. 410-411; M49 derivation 33). -/ |
| 27 | theorem weighted_event_losses_le_initial |
| 28 | (F : SurgeryFlowData.{u}) {b : ℝ} (hb : b ∈ F.time_domain) |
| 29 | (hpinched : ∀ t ∈ Icc 0 b, SurgeryPinchedAt (F.connection t) t) |
| 30 | (loss : ℝ → ℝ≥0∞) |
| 31 | (hvanish : ∀ T ∈ F.surgery_times ∩ Icc 0 b, |
| 32 | IsEmpty (F.slice T).carrier → loss T = 0) |
| 33 | (hdrop : ∀ (T : ℝ) (hT : T ∈ F.surgery_times), T ∈ Icc 0 b → |
| 34 | ∀ [Nonempty (F.slice T).carrier], |
| 35 | calibratedMetricVolume (F.metric T) univ + loss T ≤ |
| 36 | calibratedMetricVolume (F.event T hT).limit_metric univ) |
| 37 | (S : Finset ℝ) (hS : (S : Set ℝ) ⊆ F.surgery_times ∩ Icc 0 b) : |
| 38 | ∑ T ∈ S, ENNReal.ofReal (Real.exp (-(6 * T))) * loss T ≤ |
| 39 | calibratedMetricVolume (F.metric 0) univ := by |
| 40 | classical |
| 41 | have hb0 : 0 ≤ b := F.time_domain_nonnegative hb |
| 42 | have hJ : Icc 0 b ⊆ F.time_domain := initialInterval_subset F hb |
| 43 | have hfinite : (F.surgery_times ∩ Ioc 0 b).Finite := |
| 44 | (surgeryTimes_inter_Icc_finite F F.zero_mem hb).subset |
| 45 | (inter_subset_inter_right _ Ioc_subset_Icc_self) |
| 46 | let A := hfinite.toFinset |
| 47 | have hmem (t : ℝ) : t ∈ A ↔ t ∈ F.surgery_times ∩ Ioc 0 b := hfinite.mem_toFinset |
| 48 | have hbalance := ENNReal.expWeighted_add_sum_le_of_finite_left_jumps 6 |
| 49 | (V := fun t => calibratedMetricVolume (F.metric t) univ) (loss := loss) |
| 50 | A hb0 (fun t ht => ((hmem t).mp ht).2) (by |
| 51 | intro x hx y hy hxy hdis |
| 52 | have hno : Disjoint F.surgery_times (Ioc x y) := by |
| 53 | apply disjoint_left.mpr |
| 54 | intro z hz hxy' |
| 55 | exact disjoint_left.mp hdis |
| 56 | ((hmem z).mpr ⟨hz, hx.1.trans_lt hxy'.1, hxy'.2.trans hy.2⟩) hxy' |
| 57 | have hsub : Icc x y ⊆ Icc 0 b := fun t ht => |
| 58 | ⟨hx.1.trans ht.1, ht.2.trans hy.2⟩ |
| 59 | exact regular_volume_le_exp_mul_direct F hxy (hsub.trans hJ) hno |
| 60 | (fun t ht => hpinched t (hsub ht))) (by |
| 61 | intro T hTA |
| 62 | have hT := (hmem T).mp hTA |
| 63 | have hTI : T ∈ Icc 0 b := Ioc_subset_Icc_self hT.2 |
| 64 | rcases isEmpty_or_nonempty (F.slice T).carrier with hEmpty | hNonempty |
| 65 | · let := hEmpty |
| 66 | let E := F.vanishing_event T hT.1 |
| 67 | refine ⟨E.left_limit_volume, E.left_limit_volume_tendsto, ?_⟩ |
| 68 | rw [univ_eq_empty_iff.mpr hEmpty, measure_empty, |
| 69 | hvanish T ⟨hT.1, hTI⟩ hEmpty, zero_add] |
| 70 | exact bot_le |
| 71 | · let := hNonempty |
| 72 | let E := F.event T hT.1 |
| 73 | obtain ⟨L, _hL, hlim⟩ := preEvent_exists_finite_left_limit_direct F T hT.1 |
| 74 | (fun t ht => hpinched t ⟨E.tMinus_nonnegative.trans ht.1, |
| 75 | ht.2.le.trans hTI.2⟩) |
| 76 | have hleft : 𝓝[<] T ≤ 𝓝[F.time_domain ∩ Iio T] T := by |
| 77 | rw [← nhdsWithin_Ico_eq_nhdsLT E.tMinus_lt] |
| 78 | exact nhdsWithin_mono _ (fun t ht => |
| 79 | ⟨nonemptyEventPreInterval F T hT.1 ht, ht.2⟩) |
| 80 | exact ⟨L, hlim.mono_left hleft, |
| 81 | (hdrop T hT.1 hTI).trans |
| 82 | (event_regular_limit_volume_le_left_limit_direct F T hT.1 hlim)⟩) |
| 83 | have hA : ∑ T ∈ A, ENNReal.ofReal (Real.exp (-(6 * T))) * loss T ≤ |
| 84 | calibratedMetricVolume (F.metric 0) univ := by |
| 85 | simpa only [mul_zero, neg_zero, Real.exp_zero, ENNReal.ofReal_one, one_mul] using |
| 86 | (le_add_of_nonneg_left (bot_le : (0 : ℝ≥0∞) ≤ |
| 87 | ENNReal.ofReal (Real.exp (-(6 * b))) * |
| 88 | calibratedMetricVolume (F.metric b) univ)).trans hbalance |
| 89 | apply le_trans (Finset.sum_le_sum_of_subset_of_nonneg ?_ (by intros; exact bot_le)) hA |
| 90 | intro T hTS |
| 91 | have hT := hS hTS |
| 92 | exact (hmem T).mpr ⟨hT.1, surgeryTime_pos F hT.1, hT.2.2⟩ |
| 93 | |
| 94 | end PoincareMT.SurgeryVolume |