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.CanonicalInduction.Generalized.GeneralizedBridgeCanonical |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Control.Calibration |
| 3 | import Mathlib.Order.Interval.Set.Infinite |
| 4 | |
| 5 | /-! |
| 6 | # Dense regular-slice canonical control and bounded distance |
| 7 | |
| 8 | A whole nonsurgery time is selected before spatial points, avoiding the |
| 9 | finite included event set. The actual zero slice is handled separately. |
| 10 | M45's calibrated dense-time service then applies to this same selected |
| 11 | history with constants fixed before its flow, time and basepoint. |
| 12 | Source: Morgan--Tian Theorem 10.2 and Proposition 17.1, pp. 395-408. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | variable {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 25 | (H : M33RegularHistoryData W) |
| 26 | |
| 27 | /-- The finite actual event set leaves a whole regular included slice |
| 28 | between any earlier bound and a positive included time. -/ |
| 29 | theorem exists_regular_history_slice_between {s a : ℝ} |
| 30 | (hs : s ∈ H.generalized.interval) (hspos : 0 < s) (has : a < s) : |
| 31 | ∃ u ∈ H.generalized.interval, a < u ∧ u < s ∧ u ∉ F.surgery_times := by |
| 32 | have hmax : max 0 a < s := max_lt hspos has |
| 33 | obtain ⟨u, hu, hnot⟩ := ((Ioo_infinite hmax).sdiff W.events_finite).nonempty |
| 34 | have huW : u ∈ W.interval := W.interval_connected.out W.zero_mem (H.interval_eq ▸ hs) |
| 35 | ⟨(le_max_left 0 a).trans hu.1.le, hu.2.le⟩ |
| 36 | refine ⟨u, H.interval_eq.symm ▸ huW, (le_max_right 0 a).trans_lt hu.1, hu.2, ?_⟩ |
| 37 | intro hEvent |
| 38 | exact hnot ⟨hEvent, huW⟩ |
| 39 | |
| 40 | /-- Physical canonical control strictly before a positive terminal time |
| 41 | gives the literal dense generalized hypothesis, including its endpoint. -/ |
| 42 | theorem regular_history_dense_canonical {epsilon C t : ℝ} (htpos : 0 < t) |
| 43 | (x : (H.generalized.slice t).carrier) |
| 44 | (hcanonical : ∀ s ∈ W.interval, s < t → s ∉ F.surgery_times → |
| 45 | ∀ y : (F.slice s).carrier, |
| 46 | 4 * H.generalized.scalar ⟨t, x⟩ ≤ (F.connection s).scalarCurvature y → |
| 47 | SurgeryCanonicalControl F s y epsilon C) : |
| 48 | generalizedEarlierDenseStrongCanonicalNeighborhoods H.generalized epsilon C t x := by |
| 49 | intro s hs hst a has |
| 50 | have hnonnegative := regular_history_interval_nonnegative H hs |
| 51 | have chooseSlice : ∃ u ∈ H.generalized.interval, |
| 52 | a < u ∧ u ≤ s ∧ u < t ∧ u ∉ F.surgery_times := by |
| 53 | by_cases hz : s = 0 |
| 54 | · subst s |
| 55 | exact ⟨0, hs, has, le_rfl, htpos, F.zero_not_surgery⟩ |
| 56 | · have hspos : 0 < s := lt_of_le_of_ne hnonnegative (Ne.symm hz) |
| 57 | obtain ⟨u, hu, hau, hus, hregular⟩ := exists_regular_history_slice_between H hs hspos has |
| 58 | exact ⟨u, hu, hau, hus.le, hus.trans_le hst, hregular⟩ |
| 59 | obtain ⟨u, hu, hau, hus, hut, hregular⟩ := chooseSlice |
| 60 | refine ⟨u, hu, hau, hus, ?_⟩ |
| 61 | intro y hy |
| 62 | apply regular_history_canonical_control H hu hregular y |
| 63 | apply hcanonical u (H.interval_eq ▸ hu) hut hregular |
| 64 | simpa only [GeneralizedRicciFlowData.scalar, H.scalar_pullback u hu] using hy |
| 65 | |
| 66 | /-- The actual generalized bounded-distance estimate follows from |
| 67 | earlier physical canonical control and selected-window pinching. The |
| 68 | calibrated constants precede every flow, history, time and basepoint. -/ |
| 69 | theorem exists_regular_history_bounded_distance |
| 70 | (S : RepairedControlledSchedulesData.{u}) (epsilon : ℝ) (hepsilon : 0 < epsilon) |
| 71 | (hepsilon₀ : epsilon ≤ S.calibration.epsilon₁₀) |
| 72 | (C : ℝ) (hC : 0 < C) (A : ℝ) (hA : 0 ≤ A) : |
| 73 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 74 | ∀ (F : SurgeryFlowData.{u}) (W : M33RegularHistoryWindow F) |
| 75 | (H : M33RegularHistoryData W), |
| 76 | (∀ s ∈ W.interval, SurgeryPinchedAt (F.connection s) s) → |
| 77 | ∀ t, t ∈ H.generalized.interval → 0 < t → |
| 78 | ∀ x : (H.generalized.slice t).carrier, D₀ ≤ H.generalized.scalar ⟨t, x⟩ → |
| 79 | (∀ s ∈ W.interval, s < t → s ∉ F.surgery_times → |
| 80 | ∀ y : (F.slice s).carrier, |
| 81 | 4 * H.generalized.scalar ⟨t, x⟩ ≤ (F.connection s).scalarCurvature y → |
| 82 | SurgeryCanonicalControl F s y epsilon C) → |
| 83 | RepairedBoundedDistanceEstimate H.generalized A D t x := by |
| 84 | obtain ⟨D₀, D, hD₀, hD, hbound⟩ := |
| 85 | S.calibration.bounded_distance_dense epsilon hepsilon hepsilon₀ C hC A hA |
| 86 | refine ⟨D₀, D, hD₀, hD, ?_⟩ |
| 87 | intro F W H hpinched t ht htpos x hx hcanonical |
| 88 | exact hbound H.generalized |
| 89 | (regular_history_hamiltonIvey H hpinched).weak t ht x hx |
| 90 | (regular_history_dense_canonical H htpos x hcanonical) |
| 91 | |
| 92 | end PoincareMT.M47 |