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.StandardCap.Existence.Geometry.Curvature.LocalRicciFlowVolume |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Noncollapsing.EarlyBallVolume |
| 3 | import PoincareLib.Geometry.RicciFlow.Curvature.Estimates.QuadraticRicci |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.ConnectionScalar |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.FixedExtension |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureAlgebra |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RiemannRegularity |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Estimates.QuadraticRicci |
| 10 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 11 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 12 | |
| 13 | /-! |
| 14 | # One fixed positive-volume exterior region |
| 15 | |
| 16 | A small reference-time ball outside the compact exceptional set has a |
| 17 | positive early-slice volume bound. The actual local Ricci comparison |
| 18 | preserves a single positive lower bound throughout the final time tail. |
| 19 | Source: Morgan-Tian Theorem 12.29, pp. 324-325; |
| 20 | exterior-scalar-and-second-blowup.md, section 6. |
| 21 | -/ |
| 22 | |
| 23 | set_option autoImplicit false |
| 24 | |
| 25 | open Set MeasureTheory |
| 26 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 27 | |
| 28 | namespace PoincareMT.M34 |
| 29 | |
| 30 | /-- A uniform exterior full-curvature bound preserves the volume of |
| 31 | one fixed nonempty relatively compact open region. The region and its |
| 32 | positive lower bound precede every terminal time (Theorem 12.29). -/ |
| 33 | theorem partialFlow_exists_fixed_exterior_volume |
| 34 | {g0 : StandardInitialMetric} (F : PartialStandardCapFlow g0) |
| 35 | (P : RicciFlowCurvatureTheory.{0}) {T0 B : ℝ} (hT0 : T0 ∈ Ioo 0 F.lifetime) |
| 36 | (hB : 0 < B) {X : Set StandardCapSpace} (hX : IsCompact X) |
| 37 | (hcurv : ∀ t ∈ Ico T0 F.lifetime, ∀ x ∉ X, |
| 38 | (F.flow.connection t).curvatureTensorNorm x ≤ 2 * B) : |
| 39 | ∃ Omega : Set StandardCapSpace, IsOpen Omega ∧ Omega.Nonempty ∧ |
| 40 | IsCompact (closure Omega) ∧ Omega ⊆ Xᶜ ∧ |
| 41 | ∃ v : ℝ, 0 < v ∧ ∀ t ∈ Ico T0 F.lifetime, |
| 42 | ENNReal.ofReal v ≤ calibratedMetricVolume (F.flow.metric t) Omega := by |
| 43 | obtain ⟨r0, kappa, hr0, hkappa, hearly⟩ := |
| 44 | partialFlow_early_small_ball_volume F P ⟨hT0.1.le, hT0.2⟩ |
| 45 | obtain ⟨x, hx⟩ := nonempty_compl.mpr hX.ne_univ |
| 46 | let g := F.flow.metric T0 |
| 47 | let : PseudoEMetricSpace StandardCapSpace := g.comparisonPseudoEMetric |
| 48 | obtain ⟨eps, heps, hball⟩ := EMetric.mem_nhds_iff.mp (hX.isClosed.isOpen_compl.mem_nhds hx) |
| 49 | obtain ⟨d, _, hd, hdeps⟩ := ENNReal.lt_iff_exists_real_btwn.mp heps |
| 50 | have hdpos : 0 < d := ENNReal.ofReal_pos.mp hd |
| 51 | let r := min r0 d |
| 52 | have hr : 0 < r := lt_min hr0 hdpos |
| 53 | let Omega := g.ball x r |
| 54 | have hOmega : IsOpen Omega := isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 55 | have hxOmega : x ∈ Omega := by |
| 56 | change g.comparisonPseudoEMetric.edist x x < ENNReal.ofReal r |
| 57 | rw [g.comparisonPseudoEMetric.edist_self] |
| 58 | exact ENNReal.ofReal_pos.mpr hr |
| 59 | have hOmegaU : Omega ⊆ Xᶜ := by |
| 60 | intro y hy |
| 61 | apply hball |
| 62 | change g.comparisonPseudoEMetric.edist y x < eps |
| 63 | rw [g.comparisonPseudoEMetric.edist_comm] |
| 64 | exact hy.trans_le (ENNReal.ofReal_le_ofReal (min_le_right _ _)) |>.trans hdeps |
| 65 | let c := Real.exp (6 * B * F.lifetime) |
| 66 | have hc : 0 < c := Real.exp_pos _ |
| 67 | let v := kappa * r ^ 3 / c ^ 3 |
| 68 | have hv : 0 < v := div_pos (mul_pos hkappa (pow_pos hr 3)) (pow_pos hc 3) |
| 69 | refine ⟨Omega, hOmega, ⟨x, hxOmega⟩, |
| 70 | Proofs.M09.isCompact_closure_metric_ball g (partialFlow_complete F P ⟨hT0.1.le, hT0.2⟩) x r, |
| 71 | hOmegaU, v, hv, ?_⟩ |
| 72 | intro t ht |
| 73 | have hsub : Icc T0 t ⊆ Ico 0 F.lifetime := |
| 74 | fun s hs => ⟨hT0.1.le.trans hs.1, hs.2.trans_lt ht.2⟩ |
| 75 | have hRic : ∀ tau ∈ Icc T0 t, ∀ y ∈ Xᶜ, ∀ w : TangentSpace (𝓡 3) y, |
| 76 | |(F.flow.connection tau).ricci y w w| ≤ (6 * B) * (F.flow.metric tau).inner y w w := by |
| 77 | intro tau htau y hy w |
| 78 | have hfull := hcurv tau ⟨htau.1, htau.2.trans_lt ht.2⟩ y hy |
| 79 | have hself : 0 ≤ (F.flow.metric tau).inner y w w := by |
| 80 | by_cases hw : w = 0 |
| 81 | · simp [hw] |
| 82 | · exact ((F.flow.metric tau).pos y w hw).le |
| 83 | calc |
| 84 | _ ≤ (3 : ℝ) * (F.flow.connection tau).curvatureTensorNorm y * |
| 85 | (F.flow.metric tau).inner y w w := M04.abs_ricci_le_curvatureTensorNorm _ _ _ |
| 86 | _ ≤ _ := mul_le_mul_of_nonneg_right (by linarith) hself |
| 87 | have hlength : |T0 - t| ≤ F.lifetime := by |
| 88 | rw [abs_of_nonpos (sub_nonpos.mpr ht.1)] |
| 89 | linarith [hT0.1, ht.2] |
| 90 | have hvolume := calibratedMetricVolume_le_exp_mul_of_local_ricci_bound F.flow |
| 91 | (convex_Icc T0 t) hsub hX.isClosed.isOpen_compl hOmega.measurableSet hOmegaU |
| 92 | (show 0 ≤ 6 * B by positivity) ⟨le_rfl, ht.1⟩ ⟨ht.1, le_rfl⟩ hlength hRic |
| 93 | have hreference := hearly T0 ⟨hT0.1.le, le_rfl⟩ x r hr (min_le_left _ _) |
| 94 | have hmeasure : ENNReal.ofReal (kappa * r ^ 3) ≤ |
| 95 | ENNReal.ofReal c ^ 3 * calibratedMetricVolume (F.flow.metric t) Omega := |
| 96 | hreference.trans hvolume |
| 97 | have hc3 : 0 < c ^ 3 := pow_pos hc 3 |
| 98 | change ENNReal.ofReal (kappa * r ^ 3 / c ^ 3) ≤ _ |
| 99 | rw [ENNReal.ofReal_div_of_pos hc3] |
| 100 | apply (ENNReal.div_le_iff (ENNReal.ofReal_pos.mpr hc3).ne' ENNReal.ofReal_ne_top).mpr |
| 101 | simpa only [ENNReal.ofReal_pow hc.le, mul_comm] using hmeasure |
| 102 | |
| 103 | end PoincareMT.M34 |