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.Calculus.Deriv.Inv |
| 2 | import Mathlib.Analysis.Calculus.Deriv.Mul |
| 3 | import Mathlib.Analysis.SpecialFunctions.Sqrt |
| 4 | |
| 5 | /-! |
| 6 | # Differentiating the Euclidean source rescaling |
| 7 | |
| 8 | At positive backward time the source point y/(2 sqrt(t)) has velocity |
| 9 | minus its radial vector divided by 2t. This cancels the radial exponential |
| 10 | velocity in Morgan-Tian Proposition 7.27. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | namespace PoincareMT.ReducedVolume |
| 16 | |
| 17 | /-- The derivative of the inverse Euclidean spatial scale at positive time. -/ |
| 18 | theorem inverse_double_sqrt_hasDerivAt {t : ℝ} (ht : 0 < t) : |
| 19 | HasDerivAt (fun s : ℝ ↦ (2 * Real.sqrt s)⁻¹) |
| 20 | (-(2 * t)⁻¹ * (2 * Real.sqrt t)⁻¹) t := by |
| 21 | have hs : Real.sqrt t ≠ 0 := (Real.sqrt_pos.2 ht).ne' |
| 22 | apply (((Real.hasDerivAt_sqrt ht.ne').const_mul 2).inv |
| 23 | (mul_ne_zero (by norm_num) hs)).congr_deriv |
| 24 | field_simp [ht.ne', hs] |
| 25 | nlinarith [Real.sq_sqrt ht.le] |
| 26 | |
| 27 | /-- A fixed Euclidean point under the inverse scale has exactly negative radial velocity. -/ |
| 28 | theorem inverse_double_sqrt_smul_hasDerivAt {E : Type*} [NormedAddCommGroup E] |
| 29 | [NormedSpace ℝ E] (y : E) {t : ℝ} (ht : 0 < t) : |
| 30 | HasDerivAt (fun s : ℝ ↦ (2 * Real.sqrt s)⁻¹ • y) |
| 31 | (-(2 * t)⁻¹ • ((2 * Real.sqrt t)⁻¹ • y)) t := by |
| 32 | simpa only [mul_smul] using (inverse_double_sqrt_hasDerivAt ht).smul_const y |
| 33 | |
| 34 | end PoincareMT.ReducedVolume |