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.NeckCap.Cap.Bounds |
| 2 | |
| 3 | /-! # Uniform core-radius bounds from the frozen cap scalar ratio -/ |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | |
| 7 | open Set |
| 8 | open scoped Manifold ContDiff Bundle ENNReal |
| 9 | |
| 10 | namespace PoincareMT.CapCertificate |
| 11 | |
| 12 | variable {M : Type*} [TopologicalSpace M] |
| 13 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 14 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 15 | {g : RiemannianMetric 3 M} |
| 16 | |
| 17 | /-- The scalar at a core point is bounded by its calibrated inverse square. -/ |
| 18 | theorem scalar_le_core_radius_inv_sq (N : CapCertificate g) |
| 19 | {y : M} (hy : y ∈ N.core) : |
| 20 | N.connection.scalarCurvature y ≤ (N.core_radius y)⁻¹ ^ 2 := by |
| 21 | have hball : g.ball y (N.core_radius y) ⊆ N.carrier := |
| 22 | fun z hz => N.core_ball_subset y hy (subset_closure hz) |
| 23 | have hbdd : BddAbove (range (fun z : g.ball y (N.core_radius y) => |
| 24 | N.connection.scalarCurvature z.val)) := by |
| 25 | apply N.scalar_range_bddAbove.mono |
| 26 | rintro _ ⟨z, rfl⟩ |
| 27 | exact ⟨⟨z, hball z.property⟩, rfl⟩ |
| 28 | have hyball : y ∈ g.ball y (N.core_radius y) := by |
| 29 | change g.edist y y < ENNReal.ofReal (N.core_radius y) |
| 30 | simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_self] using |
| 31 | ENNReal.ofReal_pos.mpr (N.core_radius_pos y hy) |
| 32 | rw [← N.core_radius_eq y hy] |
| 33 | exact le_csSup hbdd ⟨⟨y, hyball⟩, rfl⟩ |
| 34 | |
| 35 | /-- A scalar lower bound at any point of a cap controls every core radius. |
| 36 | The bound retains the original cap constant. -/ |
| 37 | theorem core_radius_lt_of_scalar_lower (N : CapCertificate g) |
| 38 | {C m L : ℝ} (hC : N.cap_constant ≤ C) (hm : 0 < m) (hL : 0 < L) |
| 39 | (hscale : C ≤ m * L ^ 2) {p y : M} (hp : p ∈ N.carrier) |
| 40 | (hscalar : m ≤ N.connection.scalarCurvature p) (hy : y ∈ N.core) : |
| 41 | N.core_radius y < L := by |
| 42 | have hr := N.core_radius_pos y hy |
| 43 | have hCpos := N.cap_constant_pos.trans_le hC |
| 44 | have hratio := N.scalar_lt_constant_mul (N.core_subset_carrier hy) hp |
| 45 | have hbound : m < C * (N.core_radius y)⁻¹ ^ 2 := |
| 46 | hscalar.trans_lt (hratio.trans_le |
| 47 | ((mul_le_mul_of_nonneg_right hC |
| 48 | (N.scalar_pos y (N.core_subset_carrier hy)).le).trans |
| 49 | (mul_le_mul_of_nonneg_left (N.scalar_le_core_radius_inv_sq hy) hCpos.le))) |
| 50 | have hsquare : m * (N.core_radius y) ^ 2 < C := by |
| 51 | have hh := mul_lt_mul_of_pos_right hbound (sq_pos_of_pos hr) |
| 52 | have heq : C * (N.core_radius y)⁻¹ ^ 2 * (N.core_radius y) ^ 2 = C := by |
| 53 | field_simp |
| 54 | rwa [heq] at hh |
| 55 | have hsq : (N.core_radius y) ^ 2 < L ^ 2 := |
| 56 | (mul_lt_mul_iff_right₀ hm).mp (by simpa only [mul_comm m] using hsquare.trans_le hscale) |
| 57 | nlinarith |
| 58 | |
| 59 | end PoincareMT.CapCertificate |