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.GlobalSchedule.Observation.ObservationControls |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Epoch.EpochProfiles |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Extension.CanonicalControls |
| 4 | |
| 5 | /-! |
| 6 | # M51 continuation controls on the actual observation |
| 7 | |
| 8 | Morgan--Tian Section 17.2, pp. 409-410. Use the same selected M47 and M46 |
| 9 | estimates on the same flow. At the left epoch boundary, the earlier prefix |
| 10 | already covers every observed time, so no strict next-epoch premise is used. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M51Numerical |
| 20 | |
| 21 | variable (S : RepairedControlledSchedulesData.{u}) |
| 22 | (N : RepairedNoncollapseInductionData S) (C : RepairedCanonicalInductionData S N) |
| 23 | |
| 24 | /-- Construct all continuation guards and the selected uniform noncollapse |
| 25 | bound from the available prefix and numerical profiles, including H=T_i. -/ |
| 26 | theorem continuationControls (n : ℕ) (F : SurgeryFlowData.{u}) |
| 27 | (O : SurgeryObservation F) (delta : ℝ → ℝ) |
| 28 | (hdelta : ∀ t, 0 ≤ t → F.parameters.delta t = delta t) |
| 29 | (hprofiles : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 30 | F.parameters.r t = (schedule S N C).r j ∧ |
| 31 | F.parameters.kappa t = (schedule S N C).kappa j ∧ |
| 32 | F.parameters.h t = S.setup.selector.h (delta t * F.parameters.r t) (delta t)) |
| 33 | (hcut : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 34 | delta t ≤ (schedule S N C).Delta j) |
| 35 | (old : SurgeryPrefixControls (prefixAt S N C n) F O) |
| 36 | (hpinched : SurgeryFlowPinched F) |
| 37 | (terminal_policy : SurgeryFlowTerminalPolicyOn F (surgeryObservationInterval O)) |
| 38 | (hstart : surgeryEpochStart (prefixAt S N C n).i ≤ O.H) |
| 39 | (hend : O.H ≤ surgeryEpochStart ((prefixAt S N C n).i + 1)) : |
| 40 | SurgeryEpochContinuationControls (prefixAt S N C n) F O |
| 41 | (noncollapse S N C n) (canonical S N C n) ∧ |
| 42 | SurgeryNoncollapsedOn F (surgeryObservationInterval O) |
| 43 | (noncollapse S N C n).kappaNew := by |
| 44 | obtain ⟨hr, hk, hh, hd⟩ := stepProfiles S N C n F delta hdelta hprofiles hcut |
| 45 | by_cases hstrict : surgeryEpochStart (prefixAt S N C n).i < O.H |
| 46 | · have hnext : SurgeryObservationIsNextEpoch (prefixAt S N C n) O := ⟨hstrict, hend⟩ |
| 47 | have hepoch {t : ℝ} |
| 48 | (ht : t ∈ surgeryObservationInterval O ∩ Ici (surgeryEpochStart (prefixAt S N C n).i)) : |
| 49 | t ∈ surgeryEpoch (prefixAt S N C n).i := ⟨ht.2, ht.1.2.trans_le hend⟩ |
| 50 | have hoverlap {t : ℝ} (ht : t ∈ surgeryEpoch (prefixAt S N C n).i) : |
| 51 | t ∈ overlapInterval (prefixAt S N C n) := |
| 52 | ⟨(epochStart_strictMono.monotone (Nat.sub_le _ 1)).trans ht.1, ht.2⟩ |
| 53 | have scales : SurgeryPostPrefixScales (prefixAt S N C n) F O |
| 54 | (canonical S N C n).rNext (canonical S N C n).deltaNext := { |
| 55 | r_eq := fun t ht => hr t (hepoch ht) |
| 56 | delta_le := fun t ht => hd t (hoverlap (hepoch ht)) |
| 57 | h_eq := fun t ht => hh t (hepoch ht) } |
| 58 | have overlap : ∀ t ∈ surgeryObservationInterval O ∩ |
| 59 | Ico (surgeryEpochStart ((prefixAt S N C n).i - 1)) O.H, |
| 60 | F.parameters.delta t ≤ (canonical S N C n).deltaNext := |
| 61 | fun t ht => hd t ⟨ht.2.1, ht.1.2.trans_le hend⟩ |
| 62 | obtain ⟨hcanonical, hnoncollapsed⟩ := (canonical S N C n).observedControls |
| 63 | F O hnext old old.admissible hpinched terminal_policy scales overlap |
| 64 | exact ⟨⟨hcanonical, old.noncollapsedAssumptionOn hnext hnoncollapsed hk, |
| 65 | hr, hk, hh, hd⟩, hnoncollapsed⟩ |
| 66 | · have hboundary : O.H = surgeryEpochStart (prefixAt S N C n).i := |
| 67 | le_antisymm (le_of_not_gt hstrict) hstart |
| 68 | exact ⟨⟨old.canonicalBeforePrefix hboundary.le (canonical S N C n), |
| 69 | old.noncollapsedProfileBeforePrefix hboundary.le, hr, hk, hh, hd⟩, |
| 70 | old.noncollapsedBeforePrefix hboundary.le (noncollapse S N C n)⟩ |
| 71 | |
| 72 | end PoincareMT.M51Numerical |