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.Blowup.Controls.BlowupControlsSourceBounds |
| 3 | |
| 4 | /-! |
| 5 | # Bounded search from a shifted physical slice |
| 6 | |
| 7 | The physical analytic window remains based at the original first failure. |
| 8 | The search origin may precede that epoch. Reclocking the same actual |
| 9 | cylinder to scale one gives the included finite-event scalar estimate, |
| 10 | including a possible cap-contact bottom. Source: MT Proposition 17.1; |
| 11 | reviewed finite-horizon extension, F4. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | open Proofs.M46 |
| 25 | |
| 26 | private theorem shifted_scalar_eq_of_heq {F : SurgeryFlowData.{u}} {s t : ℝ} |
| 27 | {x : (F.slice s).carrier} {y : (F.slice t).carrier} (hst : s = t) (hxy : HEq x y) : |
| 28 | (F.connection s).scalarCurvature x = (F.connection t).scalarCurvature y := by |
| 29 | cases hst |
| 30 | cases hxy |
| 31 | rfl |
| 32 | |
| 33 | variable (S : RepairedControlledSchedulesData.{u}) |
| 34 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) |
| 35 | (p : SurgeryParameterPrefix S.constants) |
| 36 | {F : SurgeryFlowData.{u}} (O : SurgeryObservation F) |
| 37 | (hInitial : F.standard_initial = S.setup.standard_initial) |
| 38 | (hConstants : F.local_constants = S.constants) (hC : F.parameters.C = S.setup.C) |
| 39 | {base Q T r : ℝ} (hBase : base ∈ Ico (surgeryEpochStart p.i) O.H) |
| 40 | (hT : 0 ≤ T) (hScale : 64 * (T + 1) ≤ Q) |
| 41 | (hLarge : B.curvature_threshold ≤ Q) (hThreshold : r⁻¹ ^ 2 ≤ Q) |
| 42 | (hPinched : SurgeryFlowPinched F) |
| 43 | (hEarlier : SurgeryCanonicalOn F (surgeryObservationInterval O ∩ Iio base) r) |
| 44 | (hOverlap : ∀ u ∈ surgeryObservationInterval O ∩ |
| 45 | Ico (surgeryEpochStart (p.i - 1)) O.H, |
| 46 | F.parameters.delta u ≤ B.delta S.setup.standard_initial S.constants) |
| 47 | |
| 48 | include hInitial hConstants hC hBase hT hScale hLarge hThreshold hPinched hEarlier hOverlap |
| 49 | |
| 50 | /-- A shifted search retains the original first-failure analytic guards. |
| 51 | The scalar ceiling holds at every included time, even at a cap birth. -/ |
| 52 | theorem limitFinite_shifted_search_scalar_bound |
| 53 | (P : M44CapPersistencePredecessors.{u}) |
| 54 | {Z : GeneralizedSliceCarrier.{u}} {U : Set Z.carrier} {shift a L : ℝ} |
| 55 | (e : SurgeryFlowCylinder F Z (base + shift / Q) Q (Icc a 0) U) |
| 56 | (hshift : shift ≤ 0) (ha : a ≤ 0) (hbuffer : -T ≤ shift + a) |
| 57 | {x : Z.carrier} (hx : x ∈ U) (hL : 1 ≤ L) |
| 58 | (hTerminal : (F.connection ((base + shift / Q) + 0 / Q)).scalarCurvature |
| 59 | (e.forward 0 ⟨ha, le_rfl⟩ x) ≤ L * Q) |
| 60 | (hShort : 64 * blowupAnalyticConstant S B * L * (-a) ≤ 1) : |
| 61 | ∀ s (hs : s ∈ Icc a 0), |
| 62 | (F.connection ((base + shift / Q) + s / Q)).scalarCurvature |
| 63 | (e.forward s hs x) ≤ 4 * L * Q := by |
| 64 | have hQ := e.scale_pos |
| 65 | have hLpos : 0 < L := zero_lt_one.trans_le hL |
| 66 | have hLQ : 0 < L * Q := mul_pos hLpos hQ |
| 67 | have hmem : MapsTo (fun z : ℝ => Q * z) (Icc (a / Q) 0) (Icc a 0) := by |
| 68 | intro z hz |
| 69 | constructor |
| 70 | · simpa only [mul_comm] using (div_le_iff₀ hQ).mp hz.1 |
| 71 | · exact mul_nonpos_of_nonneg_of_nonpos hQ.le hz.2 |
| 72 | have hmono : StrictMonoOn (fun z : ℝ => Q * z) (Icc (a / Q) 0) := by |
| 73 | intro z _ w _ hzw |
| 74 | exact mul_lt_mul_of_pos_left hzw hQ |
| 75 | have hclock (z : ℝ) (_hz : z ∈ Icc (a / Q) 0) : |
| 76 | (base + shift / Q) + z / 1 = (base + shift / Q) + (Q * z) / Q := by |
| 77 | rw [div_one, mul_div_cancel_left₀ z hQ.ne'] |
| 78 | let f : SurgeryFlowCylinder F Z (base + shift / Q) 1 (Icc (a / Q) 0) U := |
| 79 | Proofs.M47.seedCylinderReclock e (by norm_num) ordConnected_Icc |
| 80 | (fun z => Q * z) hmem hmono hclock |
| 81 | have hread (z : ℝ) (hz : z ∈ Icc (a / Q) 0) : |
| 82 | cylinderScalar f x z = cylinderScalar e x (Q * z) := by |
| 83 | rw [cylinderScalar_of_mem f x z hz, cylinderScalar_of_mem e x (Q * z) (hmem hz)] |
| 84 | exact shifted_scalar_eq_of_heq (hclock z hz) |
| 85 | (Proofs.M47.seedCylinderReclock_forward_heq e |
| 86 | (by norm_num) ordConnected_Icc (fun z => Q * z) hmem hmono hclock z hz x) |
| 87 | let rho := (Real.sqrt (L * Q))⁻¹ |
| 88 | have hrho : 0 < rho := inv_pos.mpr (Real.sqrt_pos.mpr hLQ) |
| 89 | have hrhoSq : rho⁻¹ ^ 2 = L * Q := by |
| 90 | dsimp only [rho] |
| 91 | rw [inv_inv, Real.sq_sqrt hLQ.le] |
| 92 | have hzero : (0 : ℝ) ∈ Icc (a / Q) 0 := |
| 93 | ⟨div_nonpos_of_nonpos_of_nonneg ha hQ.le, le_rfl⟩ |
| 94 | have hstart : cylinderScalar f x 0 ≤ 2 * rho⁻¹ ^ 2 := by |
| 95 | rw [hread 0 hzero, mul_zero, cylinderScalar_of_mem e x 0 ⟨ha, le_rfl⟩, hrhoSq] |
| 96 | exact hTerminal.trans (by linarith only [hLQ]) |
| 97 | have hrate : ∀ z ∈ Ioo (a / Q) 0, |
| 98 | (base + shift / Q) + z / 1 ∉ F.surgery_times → |
| 99 | rho⁻¹ ^ 2 ≤ cylinderScalar f x z → |
| 100 | |cylinderScalarRate f x z| ≤ blowupAnalyticConstant S B * cylinderScalar f x z ^ 2 := by |
| 101 | intro z hz _hnot hhigh |
| 102 | have hzI := Ioo_subset_Icc_self hz |
| 103 | have hQle : Q ≤ (F.connection ((base + shift / Q) + z / 1)).scalarCurvature |
| 104 | (f.forward z hzI x) := by |
| 105 | rw [hrhoSq, cylinderScalar_of_mem f x z hzI] at hhigh |
| 106 | exact (by nlinarith only [hL, hQ] : Q ≤ L * Q).trans hhigh |
| 107 | have htime : (base + shift / Q) + z / 1 ∈ Ico (base - T / Q) base := by |
| 108 | have hleft := div_le_div_of_nonneg_right hbuffer hQ.le |
| 109 | rw [neg_div, add_div] at hleft |
| 110 | have hright := div_nonpos_of_nonpos_of_nonneg hshift hQ.le |
| 111 | simp only [mem_Ico, div_one] |
| 112 | constructor <;> linarith only [hleft, hright, hz.1, hz.2] |
| 113 | have h := first_failure_physical_analytic_estimate S B p O hInitial hConstants hC |
| 114 | hBase hT hScale hLarge hThreshold hPinched hEarlier hOverlap htime |
| 115 | (f.forward z hzI x) hQle |
| 116 | classical |
| 117 | simpa only [cylinderScalar, cylinderScalarRate, dif_pos hzI] using h.2.2 |
| 118 | have hshort : 64 * blowupAnalyticConstant S B * rho⁻¹ ^ 2 * (-(a / Q)) ≤ 1 := by |
| 119 | rw [hrhoSq] |
| 120 | have heq : 64 * blowupAnalyticConstant S B * (L * Q) * (-(a / Q)) = |
| 121 | 64 * blowupAnalyticConstant S B * L * (-a) := by field_simp [hQ.ne'] |
| 122 | rw [heq] |
| 123 | exact hShort |
| 124 | have hbound := cylinderScalar_le_four_inv_sq P hPinched f hx hzero.1 |
| 125 | (blowupAnalyticConstant_pos S B) hrho hstart hrate hshort |
| 126 | intro s hs |
| 127 | have hs' : s / Q ∈ Icc (a / Q) 0 := |
| 128 | ⟨div_le_div_of_nonneg_right hs.1 hQ.le, div_nonpos_of_nonpos_of_nonneg hs.2 hQ.le⟩ |
| 129 | have h := hbound (s / Q) hs' |
| 130 | have hcancel : Q * (s / Q) = s := by field_simp |
| 131 | rw [hread (s / Q) hs', hcancel, cylinderScalar_of_mem e x s hs, hrhoSq] at h |
| 132 | simpa only [mul_assoc] using h |
| 133 | |
| 134 | /-- Pinching converts the same shifted scalar ceiling into actual tensor |
| 135 | and negative-part bounds without changing the physical origin or scale. -/ |
| 136 | theorem limitFinite_shifted_search_curvature_bounds |
| 137 | (P : M46Predecessors.{u}) |
| 138 | {Z : GeneralizedSliceCarrier.{u}} {U : Set Z.carrier} {shift a L eta : ℝ} |
| 139 | (e : SurgeryFlowCylinder F Z (base + shift / Q) Q (Icc a 0) U) |
| 140 | (hshift : shift ≤ 0) (ha : a ≤ 0) (hbuffer : -T ≤ shift + a) |
| 141 | {x : Z.carrier} (hx : x ∈ U) (hL : 1 ≤ L) |
| 142 | (hTerminal : (F.connection ((base + shift / Q) + 0 / Q)).scalarCurvature |
| 143 | (e.forward 0 ⟨ha, le_rfl⟩ x) ≤ L * Q) |
| 144 | (hShort : 64 * blowupAnalyticConstant S B * L * (-a) ≤ 1) |
| 145 | (heta : 0 < eta) (hPinchingScale : blowupPinchingThreshold (4 * L) eta ≤ Q) : |
| 146 | ∀ s (hs : s ∈ Icc a 0), |
| 147 | |(F.connection ((base + shift / Q) + s / Q)).curvatureTensorNorm |
| 148 | (e.forward s hs x)| ≤ (13 * max (4 * L) 1) * Q ∧ |
| 149 | (F.connection ((base + shift / Q) + s / Q)).negativeCurvaturePart |
| 150 | (e.forward s hs x) ≤ eta * Q := by |
| 151 | have hscalar := limitFinite_shifted_search_scalar_bound S B p O hInitial hConstants hC |
| 152 | hBase hT hScale hLarge hThreshold hPinched hEarlier hOverlap |
| 153 | ⟨P.m04, P.m13.ordinary_flow⟩ e hshift ha hbuffer hx hL hTerminal hShort |
| 154 | intro s hs |
| 155 | apply pinched_blowup_curvature_bounds P |
| 156 | (hPinched _ (e.time_subset (mem_image_of_mem _ hs))) (by linarith only [hL]) |
| 157 | heta hPinchingScale (mem_univ _) |
| 158 | exact hscalar s hs |
| 159 | |
| 160 | end PoincareMT.M47 |