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.Tensor.NormBounds |
| 2 | import Mathlib.Analysis.Matrix.PosDef |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Proofs/M49/Mathlib/InverseGramBound.lean` at |
| 6 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 7 | |
| 8 | # Bilinear evaluations controlled by the inverse-Gram contraction |
| 9 | |
| 10 | Morgan-Tian Definition 2.16, p. 30, uses the selected metric to |
| 11 | contract every tensor slot. For a positive Gram matrix, the literal |
| 12 | rank-two contraction controls every bilinear evaluation with constant |
| 13 | one. No symmetry assumption on the tensor is needed. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open scoped BigOperators Matrix |
| 19 | |
| 20 | namespace Matrix |
| 21 | |
| 22 | -- The selected matrix norm uses the same real scalar operations as the tensor API. |
| 23 | set_option backward.isDefEq.respectTransparency false in |
| 24 | /-- The exact inverse-Gram tensor norm bounds any bilinear evaluation |
| 25 | (MT Definition 2.16, p. 30, used for necks in Definition 2.18, p. 31). -/ |
| 26 | theorem abs_bilinear_apply_le_inverse_gram_norm {ι : Type*} [Fintype ι] [DecidableEq ι] |
| 27 | {G : Matrix ι ι ℝ} (hG : G.PosDef) (A : Matrix ι ι ℝ) (x y : ι → ℝ) : |
| 28 | |x ⬝ᵥ (A *ᵥ y)| ≤ |
| 29 | Real.sqrt (∑ a : Fin 2 → ι, ∑ b : Fin 2 → ι, |
| 30 | (∏ j : Fin 2, G⁻¹ (a j) (b j)) * A (a 0) (a 1) * A (b 0) (b 1)) * |
| 31 | Real.sqrt (x ⬝ᵥ (G *ᵥ x)) * Real.sqrt (y ⬝ᵥ (G *ᵥ y)) := by |
| 32 | let := G.toNormedAddCommGroup hG |
| 33 | let := G.toSeminormedAddCommGroup hG.posSemidef |
| 34 | let := G.toInnerProductSpace hG.posSemidef |
| 35 | have hin (v w : ι → ℝ) : inner ℝ v w = v ⬝ᵥ (G *ᵥ w) := by |
| 36 | change (G *ᵥ w) ⬝ᵥ star v = v ⬝ᵥ (G *ᵥ w) |
| 37 | rw [star_trivial, dotProduct_comm] |
| 38 | let T : MultilinearMap ℝ (fun _ : Fin 2 => ι → ℝ) ℝ := |
| 39 | { toFun := fun z => z 0 ⬝ᵥ (A *ᵥ z 1) |
| 40 | map_update_add' := by |
| 41 | intro _ z i a b |
| 42 | fin_cases i <;> simp [add_dotProduct, mulVec_add, dotProduct_add] |
| 43 | map_update_smul' := by |
| 44 | intro _ z i r a |
| 45 | fin_cases i <;> simp [smul_dotProduct, mulVec_smul, dotProduct_smul] } |
| 46 | let b := Pi.basisFun ℝ ι |
| 47 | let c := stdOrthonormalBasis ℝ (ι → ℝ) |
| 48 | have hgram : (Matrix.of (fun i j => inner ℝ (b i) (b j))) = G := by |
| 49 | ext i j |
| 50 | simp [b, hin, Pi.basisFun_apply, single_dotProduct] |
| 51 | have hcoeff (a : Fin 2 → ι) : T (fun r => b (a r)) = A (a 0) (a 1) := by |
| 52 | simp [T, b, Pi.basisFun_apply, single_dotProduct] |
| 53 | have hcontraction := PoincareMT.multilinear_sum_mul_eq_inverse_gram T T b c |
| 54 | rw [hgram] at hcontraction |
| 55 | simp_rw [hcoeff] at hcontraction |
| 56 | have hnorm (v : ι → ℝ) : |
| 57 | @norm (ι → ℝ) (G.toNormedAddCommGroup hG).toNorm v = |
| 58 | Real.sqrt (v ⬝ᵥ (G *ᵥ v)) := by |
| 59 | change Real.sqrt ((G *ᵥ v) ⬝ᵥ star v) = Real.sqrt (v ⬝ᵥ (G *ᵥ v)) |
| 60 | rw [star_trivial, dotProduct_comm] |
| 61 | have hbound := PoincareMT.abs_multilinear_apply_le_orthonormal_tensor_norm |
| 62 | T c ![x, y] |
| 63 | simp_rw [pow_two] at hbound |
| 64 | rw [hcontraction] at hbound |
| 65 | simpa only [T, MultilinearMap.coe_mk, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 66 | Matrix.head_cons, Fin.prod_univ_two, hnorm, mul_assoc] using hbound |
| 67 | |
| 68 | end Matrix |