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.EventHistory |
| 2 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Analysis.ExponentialJumpBalance |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Proofs/M50/Lemma17_12_Telescoping.lean` at |
| 6 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 7 | |
| 8 | # Weighted losses for arbitrary finite event subsets |
| 9 | |
| 10 | Morgan-Tian Lemma 17.12, p. 410, bounds selected surgery losses by the |
| 11 | initial volume. We apply M49's general finite-jump balance to the exact |
| 12 | supplied certificate, using only the maximum of the selected finite set. |
| 13 | See `reviews/contracts/2026-09-20-m50-finite-subsets.md`. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Topology ENNReal BigOperators |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.SurgeryFiniteness |
| 24 | |
| 25 | /-- Constant losses below the actual selected event losses telescope |
| 26 | against initial volume (MT Lemma 17.12, p. 410). The whole surgery set |
| 27 | need not be finite, and no outside-domain horizon is evaluated. -/ |
| 28 | theorem weighted_constant_losses_le_initial |
| 29 | (F : SurgeryFlowData.{u}) (C : RepairedVolumeLossControls F) |
| 30 | (V : RepairedVolumeLossData F C) (sigma : ℝ) (S : Finset ℝ) |
| 31 | (hS : ∀ T ∈ S, ∃ hT : T ∈ F.surgery_times, |
| 32 | ∃ hN : Nonempty (F.slice T).carrier, |
| 33 | letI := hN |
| 34 | ENNReal.ofReal sigma ≤ (V.event_loss T hT).loss) : |
| 35 | ∑ T ∈ S, ENNReal.ofReal (Real.exp (-(6 * T))) * ENNReal.ofReal sigma ≤ |
| 36 | calibratedMetricVolume (F.metric 0) univ := by |
| 37 | classical |
| 38 | rcases S.eq_empty_or_nonempty with rfl | hne |
| 39 | · simp |
| 40 | let b := S.max' hne |
| 41 | obtain ⟨hb, _hN, _hloss⟩ := hS b (S.max'_mem hne) |
| 42 | have hb0 : 0 ≤ b := (SurgeryVolume.surgeryTime_pos F hb).le |
| 43 | have hJ : Icc 0 b ⊆ F.time_domain := |
| 44 | SurgeryVolume.initialInterval_subset F (F.surgery_times_subset hb) |
| 45 | have hSI : (S : Set ℝ) ⊆ Ioc 0 b := by |
| 46 | intro T hTS |
| 47 | obtain ⟨hT, _hN, _hloss⟩ := hS T hTS |
| 48 | exact ⟨SurgeryVolume.surgeryTime_pos F hT, S.le_max' T hTS⟩ |
| 49 | have hbalance := ENNReal.expWeighted_add_sum_le_of_finite_left_jumps 6 |
| 50 | (V := fun t => calibratedMetricVolume (F.metric t) univ) |
| 51 | (loss := fun _ => ENNReal.ofReal sigma) S hb0 hSI (by |
| 52 | intro x hx y hy hxy _hdis |
| 53 | exact V.volume_growth x y (hJ hx) (hJ hy) hxy) (by |
| 54 | intro T hTS |
| 55 | obtain ⟨hT, hN, hloss⟩ := hS T hTS |
| 56 | let := hN |
| 57 | let E := F.event T hT |
| 58 | let D := V.event_loss T hT |
| 59 | have hleft : 𝓝[<] T ≤ 𝓝[F.time_domain ∩ Iio T] T := by |
| 60 | rw [← nhdsWithin_Ico_eq_nhdsLT E.tMinus_lt] |
| 61 | exact nhdsWithin_mono _ (fun t ht => |
| 62 | ⟨C.nonempty_pre_interval T hT ht, ht.2⟩) |
| 63 | exact ⟨D.left_limit_volume, D.left_limit_volume_tendsto.mono_left hleft, |
| 64 | (add_le_add le_rfl hloss).trans |
| 65 | (D.terminal_volume_drop.trans D.regular_limit_volume_le_left_limit)⟩) |
| 66 | have hsum := (le_add_of_nonneg_left (bot_le : (0 : ℝ≥0∞) ≤ |
| 67 | ENNReal.ofReal (Real.exp (-(6 * b))) * |
| 68 | calibratedMetricVolume (F.metric b) univ)).trans hbalance |
| 69 | simpa only [mul_zero, neg_zero, Real.exp_zero, ENNReal.ofReal_one, one_mul] using hsum |
| 70 | |
| 71 | end PoincareMT.SurgeryFiniteness |