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.Riemannian.MinimalSurface.Sphere.Compatibility.ShortLoops |
| 2 | |
| 3 | /-! |
| 4 | # The full derivative of radial normalization |
| 5 | |
| 6 | The derivative on the unit sphere is orthogonal projection to its tangent |
| 7 | space. This controls the carried ambient derivatives in the radial-family |
| 8 | construction for MT Definition 18.17, printed p. 430. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped RealInnerProductSpace |
| 14 | |
| 15 | namespace PoincareMT.Proofs.M59 |
| 16 | |
| 17 | open M58 |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 20 | |
| 21 | /-- At a unit vector, radial normalization differentiates to orthogonal |
| 22 | projection. Source: the radial-family derivation for MT Definition 18.17, |
| 23 | p. 430. -/ |
| 24 | theorem fderiv_radialNormalization_unit {x : E} (hx : ‖x‖ = 1) (v : E) : |
| 25 | fderiv ℝ radialNormalization x v = v - ⟪x, v⟫ • x := by |
| 26 | have hnorm : HasFDerivAt (fun y : E => ‖y‖) (innerSL ℝ x) x := by |
| 27 | have h := (hasStrictFDerivAt_norm_sq x).hasFDerivAt.sqrt (by rw [hx]; norm_num) |
| 28 | simp only [Real.sqrt_sq_eq_abs, abs_norm] at h |
| 29 | convert h using 1 |
| 30 | ext y |
| 31 | simp [hx] |
| 32 | have hinv := (hasDerivAt_inv (by rw [hx]; exact one_ne_zero)).comp_hasFDerivAt x hnorm |
| 33 | have hrad : HasFDerivAt (fun y : E => ‖y‖⁻¹ • y) _ x := |
| 34 | hinv.smul (hasFDerivAt_id x) |
| 35 | change fderiv ℝ (fun y : E => ‖y‖⁻¹ • y) x v = _ |
| 36 | rw [hrad.fderiv] |
| 37 | simp [hx, sub_eq_add_neg] |
| 38 | |
| 39 | end PoincareMT.Proofs.M59 |