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.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Avoidance.TestedCylinder |
| 3 | |
| 4 | /-! |
| 5 | # Initial scalar control for every actual small-action path |
| 6 | |
| 7 | Lemma 16.15, pp. 379-381. The physical tested cylinder and the |
| 8 | positive-action exit threshold capture the entire available initial |
| 9 | prefix, including when the path ends before the selected safe duration. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Function MeasureTheory |
| 16 | open scoped Manifold ContDiff Topology intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M12 |
| 21 | end PoincareMT.Proofs.M12 |
| 22 | open PoincareMT.EpochExtension.Spacetime |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M46 |
| 25 | |
| 26 | open PoincareMT.Proofs.M12 |
| 27 | |
| 28 | /-- The safe tested-cylinder estimate yields the actual uniform |
| 29 | initial scalar bound used by full cap avoidance. Source: Lemma 16.15, |
| 30 | pp. 379-381. -/ |
| 31 | theorem TestedSafeCylinder.initial_scalar_bound |
| 32 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 33 | {D : NoncollapseTest F O} {H : HalfRadiusHistory D} |
| 34 | {rho a budget : ℝ} {ha : 0 < a} |
| 35 | (Q : TestedSafeCylinder H rho a ha) (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 36 | (hrho : 0 < rho) (hthreshold : budget < rho ^ 2 / (16 * Real.sqrt a)) |
| 37 | {tau : ℝ} {y : H.spacetime.geometry.toLGeometry.Point} |
| 38 | (p : M14BackwardPath H.spacetime.geometry.toLGeometry D.time 0 tau |
| 39 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val y) |
| 40 | (hbudget : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) ≤ budget) : |
| 41 | ∀ s ∈ Icc 0 tau, s ≤ a → |
| 42 | horizontalScalarCurvature H.spacetime.geometry.toLGeometry.leafwise (p.curve s) ≤ |
| 43 | 9 * rho⁻¹ ^ 2 := by |
| 44 | let : CompactSpace (F.slice D.time).carrier := |
| 45 | isCompact_univ_iff.mp (F.slices_compact D.time D.time_domain) |
| 46 | let G := H.spacetime.geometry |
| 47 | let b := Real.sqrt (min tau a) |
| 48 | have hmin : 0 < min tau a := lt_min p.tau_lt ha |
| 49 | have hb : 0 < b := Real.sqrt_pos.mpr hmin |
| 50 | have hbtau : b ≤ Real.sqrt tau := Real.sqrt_le_sqrt (min_le_left _ _) |
| 51 | have hba : b ≤ Real.sqrt a := Real.sqrt_le_sqrt (min_le_right _ _) |
| 52 | have hclock : ∀ s ∈ Icc 0 b, |
| 53 | G.realization.spacetime.timeFunction (p.curve (s ^ 2)) ∈ |
| 54 | (cylinderPhysicalInterval D.time 1 Q.cylinder.scale_pos |
| 55 | (safeTestInterval a ha)).domain := by |
| 56 | intro s hs |
| 57 | have hsquare : s ^ 2 ≤ min tau a := by |
| 58 | have hsq : b ^ 2 = min tau a := Real.sq_sqrt hmin.le |
| 59 | nlinarith [hs.1, hs.2] |
| 60 | rw [Q.physical_eq] |
| 61 | change G.toLGeometry.spacetime.timeFunction (p.curve (s ^ 2)) ∈ |
| 62 | Icc (D.time - a) D.time |
| 63 | rw [p.curve_time (s ^ 2) ⟨sq_nonneg s, hsquare.trans (min_le_left _ _)⟩] |
| 64 | constructor <;> nlinarith [hsquare.trans (min_le_right tau a), sq_nonneg s] |
| 65 | have hzero : (0 : ℝ) ∈ (safeTestInterval a ha).domain := ⟨by linarith, le_rfl⟩ |
| 66 | let z : (G.realization.timeIntervals.interval |
| 67 | (cylinderPhysicalInterval D.time 1 Q.cylinder.scale_pos (safeTestInterval a ha))).Point × |
| 68 | Q.source := |
| 69 | ((cylinderClockHomeomorph D.time 1 Q.cylinder.scale_pos (safeTestInterval a ha)).symm |
| 70 | ⟨0, hzero⟩, ⟨D.center, Q.center_mem⟩) |
| 71 | have hbase : p.curve 0 = rawCylinderMap G.realization Q.cylinder z := by |
| 72 | rw [rawCylinderMap_at_parameter, Q.based, p.curve_start] |
| 73 | have hpositive : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) < |
| 74 | rho ^ 2 / (16 * b) := by |
| 75 | apply (hbudget.trans_lt hthreshold).trans_le |
| 76 | exact div_le_div_of_nonneg_left (sq_nonneg rho) (mul_pos (by norm_num) hb) |
| 77 | (mul_le_mul_of_nonneg_left hba (by norm_num)) |
| 78 | have hcapture := actualSafeCylinder_confines_initial_prefix G hM12 Q.cylinder Q.time_subset |
| 79 | (F.metric D.time) hrho (by simpa only [one_mul] using Q.metric_lower) |
| 80 | D.center Q.source_eq p hb hbtau hclock z hbase rfl hpositive |
| 81 | intro s hs hsa |
| 82 | have hsroot : Real.sqrt s ∈ Icc 0 b := |
| 83 | ⟨Real.sqrt_nonneg s, Real.sqrt_le_sqrt (le_min hs.2 hsa)⟩ |
| 84 | have hcap := hcapture hsroot |
| 85 | change p.curve (Real.sqrt s ^ 2) ∈ range (rawCylinderMap G.realization Q.cylinder) at hcap |
| 86 | rw [Real.sq_sqrt hs.1] at hcap |
| 87 | obtain ⟨w, hw⟩ := hcap |
| 88 | rw [← hw] |
| 89 | exact Q.scalar_upper w |
| 90 | |
| 91 | end PoincareMT.Proofs.M46 |