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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Common.TerminalCommonIntervalInterior |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Common.TerminalCommonIntervalSearch |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Cylinder.BallTopology |
| 5 | |
| 6 | /-! |
| 7 | # The actual common-cylinder branch and its remaining cap obstruction |
| 8 | |
| 9 | All bounds use the same regular-history blowup sequence and its literal |
| 10 | scalar scale. No cap exclusion, source survival or common interval is an |
| 11 | entry input. The cap branch is retained for the positive author. Source: C3. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology Bundle ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | variable (F : ℕ → SurgeryFlowData.{u}) (W : ∀ k, M33RegularHistoryWindow (F k)) |
| 25 | (H : ∀ k, M33RegularHistoryData (W k)) (t : ℕ → ℝ) |
| 26 | (ht : ∀ k, t k ∈ (H k).generalized.interval) |
| 27 | (x : ∀ k, ((H k).generalized.slice (t k)).carrier) |
| 28 | (hPositive : ∀ k, 0 < ((F k).connection (t k)).scalarCurvature |
| 29 | ((H k).history.forward (t k) (ht k) (x k))) |
| 30 | (hDiverges : Tendsto (fun k => ((F k).connection (t k)).scalarCurvature |
| 31 | ((H k).history.forward (t k) (ht k) (x k))) atTop atTop) |
| 32 | |
| 33 | local notation "V" => regularHistoryBlowupSequence F W H t ht x hPositive hDiverges |
| 34 | |
| 35 | /-- The preliminary retained terminal image transfers the fixed scalar |
| 36 | bound to the whole actual physical search ball. -/ |
| 37 | theorem terminalCommonInterval_physical_scalar |
| 38 | (k : ℕ) {A K : ℝ} |
| 39 | (himage : ((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 40 | (A / Real.sqrt ((V).scale k)) ⊆ range ((H k).history.forward (t k) (ht k))) |
| 41 | (hscalar : ∀ y ∈ (V).baseBall k A, |
| 42 | ((V).flow k).scalar ⟨((V).base k).1, y⟩ ≤ (2 * K) * (V).scale k) : |
| 43 | ∀ y ∈ ((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 44 | (A / Real.sqrt ((V).scale k)), |
| 45 | ((F k).connection (t k)).scalarCurvature y ≤ (2 * K) * (V).scale k := by |
| 46 | intro y hy |
| 47 | obtain ⟨z, hz, rfl⟩ := ((H k).history.ball_image_of_subset (t k) (ht k) (x k) |
| 48 | (A / Real.sqrt ((V).scale k)) himage).symm ▸ hy |
| 49 | rw [(H k).scalar_pullback] |
| 50 | exact hscalar z hz |
| 51 | |
| 52 | /-- The strictly long physical branch supplies the frozen included |
| 53 | controlled cylinder on the exact ball of the same selected sequence. -/ |
| 54 | theorem terminalCommonInterval_controlled_of_long_search |
| 55 | (k : ℕ) {A a tau B eta : ℝ} (hA : 0 < A) (htau : 0 < tau) (ha : a < -tau) |
| 56 | (e : SurgeryFlowCylinder (F k) ((F k).slice (t k)) (t k) ((V).scale k) (Icc a 0) |
| 57 | (((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 58 | (A / Real.sqrt ((V).scale k)))) |
| 59 | (hbased : ∀ hs y, y ∈ ((F k).metric (t k)).ball |
| 60 | ((H k).history.forward (t k) (ht k) (x k)) (A / Real.sqrt ((V).scale k)) → |
| 61 | HEq (e.forward 0 hs y) y) |
| 62 | (hcurv : ∀ s (hs : s ∈ Icc a 0), ∀ y ∈ ((F k).metric (t k)).ball |
| 63 | ((H k).history.forward (t k) (ht k) (x k)) (A / Real.sqrt ((V).scale k)), |
| 64 | |((F k).connection (t k + s / (V).scale k)).curvatureTensorNorm (e.forward s hs y)| ≤ |
| 65 | B * (V).scale k) |
| 66 | (hneg : ∀ s (hs : s ∈ Icc a 0), ∀ y ∈ ((F k).metric (t k)).ball |
| 67 | ((H k).history.forward (t k) (ht k) (x k)) (A / Real.sqrt ((V).scale k)), |
| 68 | ((F k).connection (t k + s / (V).scale k)).negativeCurvaturePart (e.forward s hs y) ≤ |
| 69 | eta * (V).scale k) : |
| 70 | Nonempty (ControlledBlowupCylinder V k A tau B eta) := by |
| 71 | let U : TopologicalSpace.Opens ((F k).slice (t k)).carrier := |
| 72 | ⟨((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 73 | (A / Real.sqrt ((V).scale k)), M04.initial_ball_isOpen _ _ _⟩ |
| 74 | have hx : (H k).history.forward (t k) (ht k) (x k) ∈ U := by |
| 75 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : ((F k).slice (t k)).carrier → Type _) := |
| 76 | ⟨((F k).metric (t k)).toRiemannianMetric⟩ |
| 77 | change Manifold.riemannianEDist (𝓡 3) |
| 78 | ((H k).history.forward (t k) (ht k) (x k)) |
| 79 | ((H k).history.forward (t k) (ht k) (x k)) < |
| 80 | ENNReal.ofReal (A / Real.sqrt ((V).scale k)) |
| 81 | rw [Manifold.riemannianEDist_self] |
| 82 | exact ENNReal.ofReal_pos.mpr (div_pos hA (Real.sqrt_pos.mpr ((V).base_scalar_pos k))) |
| 83 | obtain ⟨_htime, d, hzero, _hmap, _hmetric, hbound⟩ := terminalCommonInterval_history_interior |
| 84 | (H k) (ht k) htau ha U ⟨_, hx⟩ e hbased hcurv hneg |
| 85 | have hpre : (H k).history.forward (t k) (ht k) ⁻¹' U = (V).baseBall k A := |
| 86 | terminalCommonInterval_ball_preimage (H k) (ht k) (by linarith only [ha, htau]) |
| 87 | (x k) e hbased |
| 88 | have hraw : ∃ d : GeneralizedFlowCylinder ((V).flow k) (((V).flow k).slice ((V).base k).1) |
| 89 | ((V).base k).1 ((V).scale k) (Icc (-tau) 0) |
| 90 | ((H k).history.forward (t k) (ht k) ⁻¹' U), |
| 91 | (∀ hs y, y ∈ (H k).history.forward (t k) (ht k) ⁻¹' U → |
| 92 | d.pointMap 0 hs y = (⟨((V).base k).1, y⟩ : ((V).flow k).point)) ∧ |
| 93 | (∀ s hs y, y ∈ (H k).history.forward (t k) (ht k) ⁻¹' U → |
| 94 | |((V).flow k).curvatureNorm (d.pointMap s hs y)| ≤ B * (V).scale k ∧ |
| 95 | (((V).flow k).connection (((V).base k).1 + s / (V).scale k)).negativeCurvaturePart |
| 96 | (d.forward s hs y) ≤ eta * (V).scale k) := ⟨d, hzero, hbound⟩ |
| 97 | rw [hpre] at hraw |
| 98 | obtain ⟨d, hd0, hdb⟩ := hraw |
| 99 | exact ⟨{ embedding := d |
| 100 | zero_identity := hd0 |
| 101 | curvature_bound := fun s hs y hy => (hdb s hs y hy).1 |
| 102 | negative_curvature_bound := fun s hs y hy => (hdb s hs y hy).2 }⟩ |
| 103 | |
| 104 | /-- Actual first-failure guards construct either the included common slab |
| 105 | or precisely the bounded cap-stop configuration still owned by positive. -/ |
| 106 | theorem terminalCommonInterval_controlled_or_cap |
| 107 | (S : RepairedControlledSchedulesData.{u}) |
| 108 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) |
| 109 | {K : ℝ} (hK : 1 ≤ K) (P : M46Predecessors.{u}) |
| 110 | (k : ℕ) (p : SurgeryParameterPrefix S.constants) (O : SurgeryObservation (F k)) |
| 111 | (hInitial : (F k).standard_initial = S.setup.standard_initial) |
| 112 | (hConstants : (F k).local_constants = S.constants) (hC : (F k).parameters.C = S.setup.C) |
| 113 | {r A eta : ℝ} (hA : 0 < A) (heta : 0 < eta) |
| 114 | (hBase : t k ∈ Ico (surgeryEpochStart p.i) O.H) |
| 115 | (hScale : 64 * (2 * terminalCommonIntervalDuration S B K + 1) ≤ (V).scale k) |
| 116 | (hLarge : B.curvature_threshold ≤ (V).scale k) (hThreshold : r⁻¹ ^ 2 ≤ (V).scale k) |
| 117 | (hPinched : SurgeryFlowPinched (F k)) |
| 118 | (hEarlier : SurgeryCanonicalOn (F k) (surgeryObservationInterval O ∩ Iio (t k)) r) |
| 119 | (hOverlap : ∀ s ∈ surgeryObservationInterval O ∩ |
| 120 | Ico (surgeryEpochStart (p.i - 1)) O.H, |
| 121 | (F k).parameters.delta s ≤ B.delta S.setup.standard_initial S.constants) |
| 122 | (hTerminal : ∀ y ∈ ((F k).metric (t k)).ball |
| 123 | ((H k).history.forward (t k) (ht k) (x k)) (A / Real.sqrt ((V).scale k)), |
| 124 | ((F k).connection (t k)).scalarCurvature y ≤ (2 * K) * (V).scale k) |
| 125 | (hPinchingScale : blowupPinchingThreshold (8 * K) eta ≤ (V).scale k) : |
| 126 | Nonempty (ControlledBlowupCylinder V k A (terminalCommonIntervalDuration S B K) |
| 127 | (13 * max (8 * K) 1) eta) ∨ |
| 128 | ∃ (a : ℝ) (ha : a ∈ Icc (-terminalCommonIntervalDuration S B K) 0), |
| 129 | ∃ e : SurgeryFlowCylinder (F k) ((F k).slice (t k)) (t k) ((V).scale k) (Icc a 0) |
| 130 | (((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 131 | (A / Real.sqrt ((V).scale k))), |
| 132 | (∀ hs y, y ∈ ((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 133 | (A / Real.sqrt ((V).scale k)) → HEq (e.forward 0 hs y) y) ∧ |
| 134 | (∀ s (hs : s ∈ Icc a 0), ∀ y ∈ ((F k).metric (t k)).ball |
| 135 | ((H k).history.forward (t k) (ht k) (x k)) (A / Real.sqrt ((V).scale k)), |
| 136 | ((F k).connection (t k + s / (V).scale k)).scalarCurvature (e.forward s hs y) ≤ |
| 137 | (8 * K) * (V).scale k) ∧ |
| 138 | ∃ hT : t k + a / (V).scale k ∈ (F k).surgery_times, |
| 139 | ∀ [Nonempty ((F k).slice (t k + a / (V).scale k)).carrier], |
| 140 | ∃ i : Fin ((F k).event (t k + a / (V).scale k) hT).cap_count, |
| 141 | (e.forward a ⟨le_rfl, ha.2⟩ '' |
| 142 | (((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 143 | (A / Real.sqrt ((V).scale k))) ∩ |
| 144 | (((F k).event (t k + a / (V).scale k) hT).caps i).carrier).Nonempty := by |
| 145 | let U := ((F k).metric (t k)).ball ((H k).history.forward (t k) (ht k) (x k)) |
| 146 | (A / Real.sqrt ((V).scale k)) |
| 147 | have hx : (H k).history.forward (t k) (ht k) (x k) ∈ U := by |
| 148 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : ((F k).slice (t k)).carrier → Type _) := |
| 149 | ⟨((F k).metric (t k)).toRiemannianMetric⟩ |
| 150 | change Manifold.riemannianEDist (𝓡 3) |
| 151 | ((H k).history.forward (t k) (ht k) (x k)) |
| 152 | ((H k).history.forward (t k) (ht k) (x k)) < |
| 153 | ENNReal.ofReal (A / Real.sqrt ((V).scale k)) |
| 154 | rw [Manifold.riemannianEDist_self] |
| 155 | exact ENNReal.ofReal_pos.mpr (div_pos hA (Real.sqrt_pos.mpr ((V).base_scalar_pos k))) |
| 156 | obtain ⟨a, _ha, e, hbased, hbounds, hstop⟩ := |
| 157 | terminalCommonInterval_exists_bounded_search S B hK p O hInitial hConstants hC |
| 158 | hBase hScale hLarge hThreshold hPinched hEarlier hOverlap P U |
| 159 | (M04.initial_ball_isOpen _ _ _) ⟨_, hx⟩ hTerminal heta hPinchingScale |
| 160 | rcases hstop with hlong | ⟨hshort, hcap⟩ |
| 161 | · exact Or.inl (terminalCommonInterval_controlled_of_long_search F W H t ht x |
| 162 | hPositive hDiverges k hA (terminalCommonInterval_duration_bounds S B hK).1 |
| 163 | hlong e hbased (fun s hs y hy => (hbounds s hs y hy).2.1) |
| 164 | (fun s hs y hy => (hbounds s hs y hy).2.2)) |
| 165 | · exact Or.inr ⟨a, hshort, e, hbased, fun s hs y hy => (hbounds s hs y hy).1, hcap⟩ |
| 166 | |
| 167 | end PoincareMT.M47 |