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.Seed.Old.SeedOldRecentCases |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Noncollapse.RecentVolume |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Retained.SeedRetainedCutoff |
| 4 | |
| 5 | /-! |
| 6 | # Uniform tested volume from actual retained positive history |
| 7 | |
| 8 | The old/recent dispatcher selects the genuine seed ancestry. The |
| 9 | independently retained whole-component cylinder supplies confinement. |
| 10 | Density is fixed before rNext. MT pp. 393-394; |
| 11 | seed-retained-confinement.md. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M47 |
| 23 | |
| 24 | open PoincareMT.M47 M46 |
| 25 | |
| 26 | /-- Actual retained component history supplies the uniform volume |
| 27 | bound on the original terminal test, without assuming any seed. -/ |
| 28 | theorem exists_positive_retained_volume_constant |
| 29 | (P : M47Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) |
| 30 | (p : SurgeryParameterPrefix S.constants) (hp : S.SeedCompatible p) : |
| 31 | ∃ k : ℝ, 0 < k ∧ ∀ (rNext rho : ℝ), 0 < rNext → |
| 32 | rNext ≤ p.r (Fin.last p.i) → 0 < rho → |
| 33 | ∀ params : ActionBarrierParameters S p rho, |
| 34 | ∃ cutoff : ℝ, 0 < cutoff ∧ cutoff ≤ p.Delta (Fin.last p.i) ∧ |
| 35 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 36 | ObservedInputs p rNext cutoff F O → |
| 37 | ∀ (T : ℝ), 0 < T → T ∈ F.time_domain → |
| 38 | T ∈ surgeryObservationInterval O → surgeryEpochStart p.i ≤ T → |
| 39 | ∀ (x : (F.slice T).carrier), SurgeryPositiveComponentAt F T x → |
| 40 | ∀ (r : ℝ), 0 < r → r ≤ p.setup.epsilon → |
| 41 | ∀ test : SurgeryFlowCylinder F (F.slice T) T 1 (Icc (-r ^ 2) 0) |
| 42 | ((F.metric T).ball x r), |
| 43 | (∀ hs y, y ∈ (F.metric T).ball x r → HEq (test.forward 0 hs y) y) → |
| 44 | (∀ s hs y, y ∈ (F.metric T).ball x r → |
| 45 | (F.connection (T + s / 1)).curvatureTensorNorm |
| 46 | (test.forward s hs y) ≤ r⁻¹ ^ 2) → |
| 47 | ∀ b ∈ Icc (-T) 0, |
| 48 | ∀ U : TopologicalSpace.Opens (F.slice T).carrier, |
| 49 | IsCompact (U : Set (F.slice T).carrier) → x ∈ U → |
| 50 | ∀ e : SurgeryFlowCylinder F (F.slice T) T 1 (Icc b 0) U, |
| 51 | (∀ hs y, y ∈ U → HEq (e.forward 0 hs y) y) → |
| 52 | b < -3 * params.safeTime → |
| 53 | ENNReal.ofReal (k * r ^ 3) ≤ |
| 54 | calibratedMetricVolume (F.metric T) ((F.metric T).ball x r) := by |
| 55 | let g0 := surgeryEpochStart (p.i - 1) / 8 |
| 56 | have hprev : 0 < surgeryEpochStart (p.i - 1) := |
| 57 | (by norm_num : (0 : ℝ) < 1 / 32).trans_le (epochStart_ge_initial _) |
| 58 | have hg0 : 0 < g0 := div_pos hprev (by norm_num) |
| 59 | obtain ⟨kOld, hkOld, oldOrRecent⟩ := exists_old_volume_or_recent_ancestry P S p hp hg0 |
| 60 | let B := max 1 (seedAnalyticConstant S) |
| 61 | have hB : 1 ≤ B := le_max_left _ _ |
| 62 | have hBanalytic : seedAnalyticConstant S ≤ B := le_max_right _ _ |
| 63 | obtain ⟨uniform⟩ := exists_seedM15_uniformData P.toM46 p hB |
| 64 | let k := min kOld (uniform.kappa / 8) |
| 65 | have hk : 0 < k := lt_min hkOld (div_pos uniform.kappa_pos (by norm_num)) |
| 66 | refine ⟨k, hk, ?_⟩ |
| 67 | intro rNext rho hrNext hrLast hrho params |
| 68 | obtain ⟨cutoff, hcutoff, hlast, hscalar, common⟩ := |
| 69 | exists_seedRetained_commonCutoff P.toM46 S p hp hrNext hrLast hrho params |
| 70 | refine ⟨cutoff, hcutoff, hlast, ?_⟩ |
| 71 | intro F O inputs T hT hTF hTO hTi x hpositive r hr hrEps test hbased hcurv |
| 72 | b hb U hcompact hx e hebased hage |
| 73 | have hTmax : T ≤ surgeryEpochStart (p.i + 1) := hTO.2.le.trans inputs.next_epoch.2 |
| 74 | rcases oldOrRecent F O inputs.old inputs.pinched inputs.terminal_policy |
| 75 | T hT hTF hTi hTO.2.le hTmax x hpositive r hr hrEps test hbased hcurv with |
| 76 | hold | hrecent |
| 77 | · exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right |
| 78 | (min_le_left kOld (uniform.kappa / 8)) (pow_nonneg hr.le 3))).trans hold |
| 79 | · obtain ⟨V, hV, hVcompact, hconnected, b', hb', f, fbased, birth, a, ha, |
| 80 | honsetTime, onset⟩ := hrecent |
| 81 | obtain ⟨H⟩ := seedM15_testHistory P.toM46 hT hTF x hr test hbased hcurv |
| 82 | obtain ⟨_caps, birthFloor, confine⟩ := common F O inputs |
| 83 | obtain ⟨confinement, barrier⟩ := confine T r hT hTF x H hTi hTO.2.le |
| 84 | b hb U hcompact hx e hebased hage |
| 85 | let P44 : M44CapPersistencePredecessors.{u} := |
| 86 | { curvature := P.m04, ordinary_flow := P.m13.ordinary_flow } |
| 87 | have hDelta : 2 * g0 ≤ surgeryEpochStart (p.i - 1) / 2 := by |
| 88 | dsimp only [g0] |
| 89 | linarith only [hprev] |
| 90 | have honsetTime' : surgeryEpochStart p.i - (2 * g0) / 2 < T + a / 1 := by |
| 91 | linarith only [honsetTime] |
| 92 | have hvolume := seedM15_recent_volume_of_confinement P.toM46 P44 S p hp |
| 93 | hB hBanalytic params.c_pos hrNext hrLast hscalar hDelta uniform |
| 94 | inputs H hTO hTi hr hrEps confinement barrier hb' ha V hV hVcompact hconnected |
| 95 | f fbased birth onset honsetTime' birthFloor |
| 96 | exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right |
| 97 | (min_le_right kOld (uniform.kappa / 8)) (pow_nonneg hr.le 3))).trans hvolume |
| 98 | |
| 99 | end PoincareMT.Proofs.M47 |