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.Volume.LossTheory |
| 2 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Event.EventLoss |
| 3 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Event.EventLossCertificate |
| 4 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Evolution.DirectVolumeGrowth |
| 5 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Count.UniformEventCount |
| 6 | |
| 7 | /-! |
| 8 | Adapted from Mapher `PoincareMT/Proofs/M49.lean` at |
| 9 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 10 | |
| 11 | # Correct surgery volume-loss scaling |
| 12 | |
| 13 | Morgan-Tian Lemma 17.12, pp. 410-411, with corrected h^3/delta |
| 14 | loss. The same calibrated cutoff supplies selected event losses and |
| 15 | a uniform bound for every finite observed event set. The latter uses |
| 16 | all cap multiplicities and the complete component history on an |
| 17 | included prefix. See M49 derivation 38 for the final assembly. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | |
| 22 | open Set |
| 23 | open scoped ENNReal |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT |
| 28 | |
| 29 | /- |
| 30 | |
| 31 | Natural-language theorem: each fixed standard model and set of local surgery |
| 32 | constants admits a positive delta cutoff for selected terminal loss bounds |
| 33 | and uniform event counting. Cap/neck cuts have positive loss at the corrected |
| 34 | `h^3 / delta` scale; deletion-only events may use zero as a lower bound. |
| 35 | Retained transport and volume decrease refer to the actual regular-limit |
| 36 | metric. Its volume is bounded by the finite scalar limit of the total |
| 37 | pre-surgery volume, using the actual left filter within the flow domain. |
| 38 | Whole-domain volume growth is at most `exp (6 * (b - a))`, as follows from |
| 39 | scalar pinching, ordinary volume evolution, and nonincrease at each event. |
| 40 | Vanishing post-volume is zero, while its left-limit volume is not prescribed. |
| 41 | After fixing the same cutoff, a horizon, finite initial-volume upper bound |
| 42 | and positive lower surgery height, one integer bounds every finite set of |
| 43 | events in every raw-flow observation ending no later than the fixed horizon, |
| 44 | with the same standard model and local |
| 45 | constants, pinching and actual strong event controls on the observed interval, |
| 46 | initial volume below that upper bound, and delta/height within the fixed |
| 47 | bounds. All cut multiplicities and component deletions are included. No |
| 48 | chosen M37 lineage or continuation service is an input to either branch. |
| 49 | |
| 50 | Source: Morgan--Tian, Lemma 17.12, pp. 410--411, with the corrected scaling |
| 51 | recorded in `reviews/errata/2026-09-10-surgery-extinction-audit.md`. |
| 52 | |
| 53 | The proof uses the static model and actual local surgery results as |
| 54 | primitive input data. Direct ordinary-volume comparison and the actual |
| 55 | regular-limit inequality supply the analytic evolution; all cap losses |
| 56 | and explicit component-discard witnesses supply the event count. |
| 57 | -/ |
| 58 | |
| 59 | /-- Correct cubic surgery loss and uniform raw-flow event counts |
| 60 | (MT Lemma 17.12, pp. 410-411; MT-SURGERY-VOLUME-SCALING). -/ |
| 61 | theorem repairedVolumeLoss : RepairedVolumeLossTheory.{u} := by |
| 62 | classical |
| 63 | refine ⟨?_⟩ |
| 64 | intro g₀ K |
| 65 | obtain ⟨c, hc, hcutoff⟩ := SurgeryVolume.exists_uniform_event_volume_loss.{u} g₀ |
| 66 | obtain ⟨d, hd, hdK, hcal⟩ := hcutoff K |
| 67 | refine ⟨d, hd, hdK, ?_, ?_⟩ |
| 68 | · intro F C hstandard hconstants hdelta |
| 69 | have hgeom := hcal |
| 70 | rw [← hstandard, ← hconstants] at hgeom |
| 71 | have hcert : ∀ (T : ℝ) (hT : T ∈ F.surgery_times), |
| 72 | ∀ [Nonempty (F.slice T).carrier], |
| 73 | ∃ D : RepairedSurgeryEventLossData F T hT, |
| 74 | D.loss = if (F.event T hT).cap_count = 0 then 0 else |
| 75 | ENNReal.ofReal (c * (F.parameters.h T ^ 3 / F.parameters.delta T)) := by |
| 76 | intro T hT hNonempty |
| 77 | have hbound := hgeom F.parameters F.slice F.metric T (F.event T hT) (hdelta T hT) |
| 78 | exact SurgeryVolume.exists_event_loss_certificate F T hT c hc |
| 79 | (fun t ht => C.pinched t (SurgeryVolume.nonemptyEventPreInterval F T hT ht)) |
| 80 | (C.zero_cap_discard T hT) hbound.1 hbound.2 |
| 81 | let D : ∀ (T : ℝ) (hT : T ∈ F.surgery_times), |
| 82 | ∀ [Nonempty (F.slice T).carrier], RepairedSurgeryEventLossData F T hT := |
| 83 | fun T hT _hNonempty => (hcert T hT).choose |
| 84 | have hD (T : ℝ) (hT : T ∈ F.surgery_times) [Nonempty (F.slice T).carrier] : |
| 85 | (D T hT).loss = if (F.event T hT).cap_count = 0 then 0 else |
| 86 | ENNReal.ofReal (c * (F.parameters.h T ^ 3 / F.parameters.delta T)) := |
| 87 | (hcert T hT).choose_spec |
| 88 | refine ⟨{ |
| 89 | initial_volume_ne_top := SurgeryVolume.initialVolume_ne_top F |
| 90 | event_loss := D |
| 91 | vanishing_volume := SurgeryVolume.vanishingVolumeData F |
| 92 | volume_growth := fun a b ha hb hab => |
| 93 | SurgeryVolume.volume_growth_of_event_losses_direct F D ha hb hab |
| 94 | (fun t ht => C.pinched t (F.time_domain_interval.out ha hb ht)) |
| 95 | loss_scale_factor := c |
| 96 | loss_scale_factor_pos := hc |
| 97 | horn_loss_lower_bound := ?_ |
| 98 | component_event_count_bound := ?_ }⟩ |
| 99 | · intro H hH |
| 100 | have hhH := F.parameters.h_pos H hH |
| 101 | refine ⟨c * (F.parameters.h H ^ 3 / d), |
| 102 | mul_pos hc (div_pos (pow_pos hhH 3) hd), ?_⟩ |
| 103 | intro T hT hTI hNonempty hcap |
| 104 | rw [hD, if_neg (Nat.ne_of_gt hcap)] |
| 105 | refine ⟨ENNReal.ofReal_le_ofReal ?_, le_rfl⟩ |
| 106 | have hh := F.parameters.h_antitone hTI.1 hH hTI.2 |
| 107 | apply mul_le_mul_of_nonneg_left _ hc.le |
| 108 | exact div_le_div₀ (pow_nonneg (hhH.le.trans hh) 3) |
| 109 | (pow_le_pow_left₀ hhH.le hh 3) (F.parameters.delta_pos T hTI.1) (hdelta T hT) |
| 110 | · intro H hH |
| 111 | obtain ⟨n, hn⟩ := SurgeryVolume.exists_uniform_event_prefix_bound |
| 112 | c d H (calibratedMetricVolume (F.metric 0) univ) (F.parameters.h H) |
| 113 | hc hd (SurgeryVolume.initialVolume_ne_top F) (F.parameters.h_pos H hH) |
| 114 | refine ⟨n, ?_⟩ |
| 115 | intro S hS |
| 116 | rcases S.eq_empty_or_nonempty with rfl | hne |
| 117 | · exact Nat.zero_le _ |
| 118 | let b := S.max' hne |
| 119 | have hbS : b ∈ S := S.max'_mem hne |
| 120 | have hbT := (hS hbS).1.1 |
| 121 | have hbH : b ≤ H := (hS hbS).1.2.2 |
| 122 | have hb : b ∈ F.time_domain := F.surgery_times_subset hbT |
| 123 | apply hn F b hb hbH |
| 124 | · intro t ht |
| 125 | exact C.pinched t (SurgeryVolume.initialInterval_subset F hb ht) |
| 126 | · intro T hT _hTI hNonempty hzero |
| 127 | obtain ⟨x, hx, _hvol⟩ := C.zero_cap_discard T hT hzero |
| 128 | exact ⟨x, hx⟩ |
| 129 | · exact le_rfl |
| 130 | · intro T hT |
| 131 | exact ⟨hdelta T hT.1, F.parameters.h_antitone hT.2.1 hH (hT.2.2.trans hbH)⟩ |
| 132 | · intro T hT _hTI hNonempty |
| 133 | exact (hgeom F.parameters F.slice F.metric T (F.event T hT) (hdelta T hT)).2 |
| 134 | · intro T hTS |
| 135 | exact ⟨(hS hTS).1.1, (hS hTS).1.2.1, S.le_max' T hTS⟩ |
| 136 | · intro B V₀ hMin _hB hV₀ hhMin |
| 137 | obtain ⟨n, hn⟩ := SurgeryVolume.exists_uniform_event_prefix_bound c d B V₀ hMin hc hd hV₀ hhMin |
| 138 | refine ⟨n, ?_⟩ |
| 139 | intro F O hstandard hconstants hHB C hvol hscale S hS |
| 140 | have hgeom := hcal |
| 141 | rw [← hstandard, ← hconstants] at hgeom |
| 142 | rcases S.eq_empty_or_nonempty with rfl | hne |
| 143 | · exact Nat.zero_le _ |
| 144 | let b := S.max' hne |
| 145 | have hbS : b ∈ S := S.max'_mem hne |
| 146 | have hbT := (hS hbS).1 |
| 147 | have hbO : b ∈ Ico 0 O.H := (hS hbS).2 |
| 148 | have hb : b ∈ F.time_domain := F.surgery_times_subset hbT |
| 149 | have hprefix : Icc 0 b ⊆ surgeryObservationInterval O := |
| 150 | fun t ht => ⟨ht.1, ht.2.trans_lt hbO.2⟩ |
| 151 | apply hn F b hb (hbO.2.le.trans hHB) |
| 152 | · exact fun t ht => C.pinched t (hprefix ht) |
| 153 | · intro T hT _hTI hNonempty hzero |
| 154 | obtain ⟨x, hx, _hpositive⟩ := C.zero_cap_discard T hT hzero |
| 155 | exact ⟨x, hx⟩ |
| 156 | · exact hvol |
| 157 | · exact fun T hT => hscale T ⟨hT.1, hprefix hT.2⟩ |
| 158 | · intro T hT hTI hNonempty |
| 159 | exact (hgeom F.parameters F.slice F.metric T (F.event T hT) |
| 160 | (hscale T ⟨hT, hprefix hTI⟩).1).2 |
| 161 | · intro T hTS |
| 162 | exact ⟨(hS hTS).1, (hS hTS).2.1, S.le_max' T hTS⟩ |
| 163 | |
| 164 | end PoincareMT |