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.EpochExtension.Prefix.PrefixControls |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.RegularAnalytics |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Calibration.Calibration |
| 4 | |
| 5 | /-! |
| 6 | # M33's input on the actual excluded M48 frontier |
| 7 | |
| 8 | Morgan--Tian Section 17.2, pp. 409--410, and Lemma 15.11, p. 364. |
| 9 | Whole-domain controls follow from the actual observed profile. All numerical |
| 10 | frontier guards use the same total profiles and the stored height selector. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M48AnalyticCalibration |
| 20 | |
| 21 | variable {S : RepairedControlledSchedulesData.{u}} (A : M48AnalyticCalibration S) |
| 22 | {p : SurgeryParameterPrefix S.constants} {F : SurgeryFlowData.{u}} |
| 23 | {O : SurgeryObservation F} (hp : S.SeedCompatible p) |
| 24 | (old : SurgeryPrefixControls p F O) |
| 25 | {Q : SurgeryNoncollapseExtension.{u} p} {N : SurgeryCanonicalExtension p Q} |
| 26 | (controls : SurgeryEpochContinuationControls p F O Q N) |
| 27 | (hstart : surgeryEpochStart p.i ≤ O.H) |
| 28 | (hend : O.H < surgeryEpochStart (p.i + 1)) |
| 29 | |
| 30 | include hp old controls hstart hend in |
| 31 | /-- The actual frontier height satisfies the local restart and both horn bounds. -/ |
| 32 | theorem terminal_height_bounds : |
| 33 | F.parameters.h O.H ≤ F.local_constants.R₀ ^ (-1 / 2 : ℝ) ∧ |
| 34 | F.parameters.h O.H ≤ |
| 35 | (F.parameters.delta O.H * F.parameters.r O.H) * F.parameters.delta O.H ∧ |
| 36 | F.parameters.h O.H ≤ |
| 37 | (F.parameters.delta O.H * F.parameters.r O.H) / (2 * F.parameters.C) := by |
| 38 | have hr := controls.next_r O.H ⟨hstart, hend⟩ |
| 39 | have hh : F.parameters.h O.H = S.setup.selector.h |
| 40 | (F.parameters.delta O.H * F.parameters.r O.H) (F.parameters.delta O.H) := by |
| 41 | simpa only [hp.setup_eq] using controls.next_h O.H ⟨hstart, hend⟩ |
| 42 | have hd := F.parameters.delta_pos O.H O.H_pos.le |
| 43 | have hdle := old.delta_le_initial hp O.H O.H_pos.le |
| 44 | have hD : 0 < S.Delta0 := by rw [← hp.Delta_zero_eq]; exact p.Delta_pos 0 |
| 45 | have hre : F.parameters.r O.H ≤ S.setup.epsilon := by |
| 46 | rw [hr] |
| 47 | exact N.r_le_last.trans ((p.r_le_epsilon _).trans_eq |
| 48 | (congrArg SurgeryControlSetup.epsilon hp.setup_eq)) |
| 49 | have hrpos := F.parameters.r_pos O.H O.H_pos.le |
| 50 | have hrho := mul_pos hd hrpos |
| 51 | have hrhole : F.parameters.delta O.H * F.parameters.r O.H ≤ |
| 52 | S.Delta0 * S.setup.epsilon := mul_le_mul hdle hre hrpos.le hD.le |
| 53 | have hm := S.setup.selector.h_mono_rho (F.parameters.delta O.H) hd.le |
| 54 | hrho.le (mul_pos hD S.setup.epsilon_pos).le hrhole |
| 55 | have hm' := S.setup.selector.h_mono_delta (S.Delta0 * S.setup.epsilon) |
| 56 | (mul_pos hD S.setup.epsilon_pos).le hd.le hD.le hdle |
| 57 | have hsmall := le_min_iff.mp (S.selector_deep_horn _ _ hrho hd) |
| 58 | rw [hh] |
| 59 | refine ⟨?_, hsmall.1, ?_⟩ |
| 60 | · rw [old.local_constants_eq] |
| 61 | exact hm.trans (hm'.trans S.calibration.selector_initial_bound) |
| 62 | · simpa only [old.C_eq, hp.setup_eq] using hsmall.2 |
| 63 | |
| 64 | /-- Assemble M33's primitive input for any specified core on the actual last |
| 65 | slab. The terminal bridge below chooses that core from its fixed limit. -/ |
| 66 | noncomputable def continuationInput |
| 67 | (hdomain : F.time_domain = Ico 0 O.H) |
| 68 | (L : RepairedPreterminalSlab F O.H) (core : Set (F.slice L.start).carrier) : |
| 69 | RepairedContinuationInput F O.H := by |
| 70 | classical |
| 71 | have hfront := A.frontier_history_scale hp old controls hstart hend |
| 72 | have hrho : F.parameters.delta O.H * F.parameters.r O.H < A.historyRadius N.rNext := by |
| 73 | simpa only [hfront.1] using hfront.2.2 |
| 74 | have hbounds := terminal_height_bounds hp old controls hstart hend |
| 75 | exact { |
| 76 | terminal_pos := O.H_pos |
| 77 | time_domain_eq := hdomain |
| 78 | last_slab := L |
| 79 | admissible := old.admissible |
| 80 | pinched := fun t ht => old.pinched t |
| 81 | (by simpa only [hdomain, surgeryObservationInterval] using ht) ht |
| 82 | canonical := fun t ht => old.canonicalAssumptionOn hend.le |
| 83 | controls.canonical controls.next_r t |
| 84 | (by simpa only [hdomain, surgeryObservationInterval] using ht) ht |
| 85 | noncollapsed := fun t ht => controls.noncollapsed t |
| 86 | (by simpa only [hdomain, surgeryObservationInterval] using ht) ht |
| 87 | rho := F.parameters.delta O.H * F.parameters.r O.H |
| 88 | rho_eq := rfl |
| 89 | rho_pos := mul_pos (F.parameters.delta_pos O.H O.H_pos.le) |
| 90 | (F.parameters.r_pos O.H O.H_pos.le) |
| 91 | rho_lt_r := by |
| 92 | simpa only [hfront.1] using |
| 93 | hrho.trans_le ((A.historyRadius_lt N.r_pos).le.trans (A.limitRadius_le N.rNext)) |
| 94 | r₀ := A.historyRadius N.rNext |
| 95 | r₀_pos := A.historyRadius_pos N.r_pos |
| 96 | rho_lt_r₀ := hrho |
| 97 | controlled_core := core |
| 98 | core_status := by |
| 99 | by_cases h : core.Nonempty |
| 100 | · exact .nonempty h |
| 101 | · exact .empty (Set.not_nonempty_iff_eq_empty.mp h) |
| 102 | terminal_delta_bound := by |
| 103 | rw [old.local_constants_eq] |
| 104 | exact (old.delta_le_initial hp O.H O.H_pos.le).trans |
| 105 | (hp.Delta_zero_eq ▸ p.Delta_le_setup 0) |
| 106 | terminal_height_bound := hbounds.1 |
| 107 | terminal_height_rho_delta := hbounds.2.1 |
| 108 | terminal_height_rho_constant := hbounds.2.2 } |
| 109 | |
| 110 | end PoincareMT.M48AnalyticCalibration |