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.Component.ComponentEstimateTip |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Component.ComponentEstimateCap |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometryInvariants |
| 4 | |
| 5 | /-! |
| 6 | # Uniform cap exclusion from normalized component diameter |
| 7 | |
| 8 | The model-dependent surgery cutoff is selected before the actual event |
| 9 | and scalar level. The tip scalar fixes a lower surgery scale, while the |
| 10 | large precompact comparison ball contradicts the component diameter. |
| 11 | Source: Theorem 13.2, pp. 332-333, used on pp. 402-405. |
| 12 | See `proof-work/tasks/M47/derivations/component-estimate.md`, Stage C3. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | /-- The actual local-result embedding preserves its actual scalar |
| 26 | curvature; Theorem 13.2, pp. 332-333. -/ |
| 27 | theorem localResult_scalar_eq |
| 28 | {g₀ : StandardInitialMetric} {K : MetricSurgeryConstants} |
| 29 | {P : SurgeryParameters} {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 30 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 31 | (E : SurgeryEventData g₀ K P slice metric T) (D : LeviCivitaData (metric T)) |
| 32 | (i : Fin E.cap_count) (y : (E.local_result i).output.carrier) : |
| 33 | (E.local_result i).connection.scalarCurvature y = D.scalarCurvature (E.local_embed i y) := |
| 34 | (E.local_result i).connection.scalarCurvature_eq_of_local_isometry D isOpen_univ |
| 35 | (E.local_embed_smooth i).contMDiffOn |
| 36 | (fun z _ v w => (E.local_metric i z v w).symm) (mem_univ y) |
| 37 | |
| 38 | /-- One cutoff excludes every cap from an actual component with bounded |
| 39 | scalar and diameter in the same curvature units. The cutoff precedes the |
| 40 | event and scalar level; Theorem 13.2 and pp. 402-405. -/ |
| 41 | theorem exists_component_cap_exclusion_cutoff |
| 42 | (g₀ : StandardInitialMetric) (K : MetricSurgeryConstants) (Db : ℝ) (hDb : 0 < Db) : |
| 43 | ∃ delta : ℝ, 0 < delta ∧ |
| 44 | ∀ (P : SurgeryParameters) (slice : ℝ → GeneralizedSliceCarrier.{u}) |
| 45 | (metric : ∀ t, RiemannianMetric 3 (slice t).carrier) (T : ℝ) |
| 46 | (E : SurgeryEventData g₀ K P slice metric T) (D : LeviCivitaData (metric T)), |
| 47 | P.delta T ≤ delta → ∀ H : ℝ, 0 < H → ∀ x : (slice T).carrier, |
| 48 | (∀ z ∈ connectedComponent x, D.scalarCurvature z ≤ H) → |
| 49 | intrinsicDiameter (metric T) (connectedComponent x) < |
| 50 | ENNReal.ofReal (Db / Real.sqrt H) → |
| 51 | ∀ i, Disjoint (connectedComponent x) (E.caps i).carrier := by |
| 52 | obtain ⟨eta₀, heta₀, _heta₀small, htip⟩ := exists_tip_scalar_accuracy.{u} g₀ |
| 53 | let rho := 4 * (Db + 1) |
| 54 | have hrho : 0 < rho := by dsimp only [rho]; positivity |
| 55 | let eta := min eta₀ (min (1 / 2 : ℝ) (1 / (rho + 1))) |
| 56 | have heta : 0 < eta := lt_min heta₀ (lt_min (by norm_num) (by positivity)) |
| 57 | have hetaTip : eta ≤ eta₀ := min_le_left _ _ |
| 58 | have hetaHalf : eta ≤ 1 / 2 := (min_le_right _ _).trans (min_le_left _ _) |
| 59 | have hetaBuffer : eta ≤ 1 / (rho + 1) := (min_le_right _ _).trans (min_le_right _ _) |
| 60 | have hbuffer : rho < eta⁻¹ := by |
| 61 | rw [inv_eq_one_div, lt_div_iff₀ heta] |
| 62 | have he := (le_div_iff₀ (by positivity : 0 < rho + 1)).mp hetaBuffer |
| 63 | nlinarith |
| 64 | refine ⟨K.comparison_delta eta, K.comparison_delta_pos eta heta, ?_⟩ |
| 65 | intro P slice metric T E D hdelta H hH x hupper hdiam i |
| 66 | apply Set.disjoint_left.mpr |
| 67 | intro y hy hcap |
| 68 | have htipComponent : (E.caps i).tip ∈ connectedComponent x := by |
| 69 | have hytip := cap_subset_tip_component E i hcap |
| 70 | have heq : connectedComponent x = connectedComponent (E.caps i).tip := |
| 71 | (connectedComponent_eq hy).trans (connectedComponent_eq hytip).symm |
| 72 | rw [heq] |
| 73 | exact mem_connectedComponent |
| 74 | obtain ⟨Q⟩ := (E.local_result i).standard_close eta heta |
| 75 | (by simpa only [E.neck_delta i] using hdelta) |
| 76 | have htipLower := htip (E.local_result i).output (E.local_result i).metric |
| 77 | (E.local_result i).connection (E.local_result i).tip (E.necks i).neck.scale eta Q hetaTip |
| 78 | have hlocalTip := localResult_scalar_eq E D i (E.local_result i).tip |
| 79 | rw [E.local_tip i] at hlocalTip |
| 80 | have htipUpper : (E.local_result i).connection.scalarCurvature (E.local_result i).tip ≤ H := |
| 81 | hlocalTip.trans_le (hupper (E.caps i).tip htipComponent) |
| 82 | let h := (E.necks i).neck.scale |
| 83 | have hh : 0 < h := Q.scale_pos |
| 84 | have hscaled : (3 / 4 : ℝ) < h ^ 2 * H := |
| 85 | htipLower.trans_le (mul_le_mul_of_nonneg_left htipUpper (sq_nonneg h)) |
| 86 | have hsqrt : 0 < Real.sqrt H := Real.sqrt_pos.mpr hH |
| 87 | have hsquare : (h * Real.sqrt H) ^ 2 = h ^ 2 * H := by |
| 88 | rw [mul_pow, Real.sq_sqrt hH.le] |
| 89 | have hhlow : (1 / 2 : ℝ) < h * Real.sqrt H := by |
| 90 | have hpos := mul_pos hh hsqrt |
| 91 | nlinarith |
| 92 | have hradical : h / 2 ≤ Real.sqrt (h ^ 2 * (1 - eta)) := by |
| 93 | apply (Real.le_sqrt (by positivity) |
| 94 | (mul_nonneg (sq_nonneg h) (by linarith : 0 ≤ 1 - eta))).mpr |
| 95 | nlinarith [sq_nonneg h] |
| 96 | have hproduct : Db < Real.sqrt (h ^ 2 * (1 - eta)) * rho * Real.sqrt H := by |
| 97 | have hlarge := mul_lt_mul_of_pos_right hhlow (half_pos hrho) |
| 98 | have hcompare := mul_le_mul_of_nonneg_right |
| 99 | (mul_le_mul_of_nonneg_right hradical hrho.le) hsqrt.le |
| 100 | dsimp only [rho] at hlarge |
| 101 | nlinarith |
| 102 | have hradius : Db / Real.sqrt H ≤ Real.sqrt (h ^ 2 * (1 - eta)) * rho := |
| 103 | ((div_lt_iff₀ hsqrt).mpr hproduct).le |
| 104 | have hdisjoint := component_disjoint_cap_of_comparison E i x Q |
| 105 | (by linarith) hrho hbuffer |
| 106 | (hdiam.trans_le (ENNReal.ofReal_le_ofReal hradius)) |
| 107 | exact Set.disjoint_left.mp hdisjoint hy hcap |
| 108 | |
| 109 | end PoincareMT.M47 |