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.CurveShortening.Comparison.Annulus |
| 2 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.AreaEnergy |
| 3 | |
| 4 | /-! |
| 5 | # Two-column Gram comparison for the circle-product projection |
| 6 | |
| 7 | The vertical circle columns add a positive-semidefinite Gram matrix. The |
| 8 | algebraic two-column form is kept independent of the manifold differential so |
| 9 | that the geometric projection proof can use it pointwise at differentiability |
| 10 | points. |
| 11 | |
| 12 | Morgan--Tian context: Section 19.6, Lemmas 19.30-19.31, printed pp. 461-466. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | namespace PoincareMT |
| 18 | |
| 19 | /-! Adding a positive-semidefinite two-column Gram matrix cannot decrease the |
| 20 | two-dimensional Gram determinant. -/ |
| 21 | /-- Adding a positive semidefinite two-by-two Gram matrix cannot decrease its determinant. |
| 22 | Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual half-disk collar in |
| 23 | `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 24 | theorem m64_gramDet_add_nonneg |
| 25 | {b00 b01 b11 s00 s01 s11 : ℝ} |
| 26 | (hb00 : 0 ≤ b00) (hb11 : 0 ≤ b11) (hs00 : 0 ≤ s00) (hs11 : 0 ≤ s11) |
| 27 | (hbdet : b01 ^ 2 ≤ b00 * b11) |
| 28 | (hsdet : s01 ^ 2 ≤ s00 * s11) : |
| 29 | b00 * b11 - b01 ^ 2 ≤ |
| 30 | (b00 + s00) * (b11 + s11) - (b01 + s01) ^ 2 := by |
| 31 | have hprod : 0 ≤ (b00 * b11 - b01 ^ 2) * (s00 * s11) := |
| 32 | mul_nonneg (sub_nonneg.mpr hbdet) (mul_nonneg hs00 hs11) |
| 33 | have hsq : 0 ≤ (b00 * s11 - s00 * b11) ^ 2 := sq_nonneg _ |
| 34 | have hsum : 0 ≤ b00 * s11 + s00 * b11 := |
| 35 | add_nonneg (mul_nonneg hb00 hs11) (mul_nonneg hs00 hb11) |
| 36 | have hcross : 2 * b01 * s01 ≤ b00 * s11 + s00 * b11 := by |
| 37 | nlinarith [hprod, hsq] |
| 38 | nlinarith |
| 39 | |
| 40 | end PoincareMT |