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 Mathlib.Analysis.SpecialFunctions.Sqrt |
| 2 | import Mathlib.Tactic.FieldSimp |
| 3 | import Mathlib.Tactic.Ring |
| 4 | |
| 5 | /-! |
| 6 | # Algebra of the reduced-length defect |
| 7 | |
| 8 | The actual time, gradient and Laplacian formulas give the three |
| 9 | defect identities by substitution. Morgan-Tian Theorem 6.50 and |
| 10 | Corollary 6.51, pp. 131-132. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | namespace PoincareMT.M14 |
| 16 | |
| 17 | /-- The three scalar defect identities following from the exact time |
| 18 | and gradient formulas, Theorem 6.50 and Corollary 6.51, pp. 131-132. -/ |
| 19 | theorem reducedLength_delta_identities {t : ℝ} (ht : 0 < t) |
| 20 | (n L R K A B C : ℝ) |
| 21 | (hA : A = R - L / t + K / (2 * t * Real.sqrt t)) |
| 22 | (hC : C = L / t - K / (t * Real.sqrt t) - R) : |
| 23 | let d := n / (2 * t) - R - K / (2 * t * Real.sqrt t) - B |
| 24 | (A + B - (n / 2 - L) / t = -d) ∧ |
| 25 | (A - B + C - R + n / (2 * t) = d) ∧ |
| 26 | (2 * B - C + R + (L - n) / t = -2 * d) := by |
| 27 | dsimp only |
| 28 | rw [hA, hC] |
| 29 | constructor |
| 30 | · field_simp [ht.ne', (Real.sqrt_pos.mpr ht).ne'] |
| 31 | ring |
| 32 | constructor |
| 33 | · field_simp [ht.ne', (Real.sqrt_pos.mpr ht).ne'] |
| 34 | ring |
| 35 | · field_simp [ht.ne', (Real.sqrt_pos.mpr ht).ne'] |
| 36 | ring |
| 37 | |
| 38 | end PoincareMT.M14 |