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.Curvature.Operator.Sectional |
| 2 | import PoincareLib.Geometry.RicciFlow.Pinching.Spectrum |
| 3 | import PoincareLib.LinearAlgebra.CrossProduct.Orthonormal |
| 4 | |
| 5 | /-! |
| 6 | # The three-dimensional algebraic curvature spectrum |
| 7 | |
| 8 | An algebraic curvature tensor on a real inner-product space with an |
| 9 | orthonormal three-frame has three ordered eigenvalues. Its sectional infimum, |
| 10 | scalar contraction, and full squared norm are their standard spectral |
| 11 | expressions. Only the two skew symmetries and pair interchange are needed. |
| 12 | |
| 13 | These identities support Morgan--Tian, Theorem 4.8, p. 66, and |
| 14 | Corollary 4.33, p. 80 (`MT2007` in `references/bibliography.bib`). |
| 15 | -/ |
| 16 | |
| 17 | open scoped BigOperators Matrix |
| 18 | |
| 19 | namespace Poincare.Geometry.Curvature.Operator |
| 20 | |
| 21 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 22 | |
| 23 | private theorem repr_dotProduct (b : OrthonormalBasis (Fin 3) ℝ E) (u v : E) : |
| 24 | dotProduct (b.repr u) (b.repr v) = inner ℝ u v := by |
| 25 | rw [← b.repr.inner_map_map u v, EuclideanSpace.inner_eq_star_dotProduct, |
| 26 | star_trivial, dotProduct_comm] |
| 27 | |
| 28 | /-- Cyclic wedge coordinates carry the metric induced on two-forms. -/ |
| 29 | theorem crossProduct_repr_inner (b : OrthonormalBasis (Fin 3) ℝ E) (u v w z : E) : |
| 30 | inner ℝ (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v)) : |
| 31 | EuclideanSpace ℝ (Fin 3)) |
| 32 | (WithLp.toLp 2 (crossProduct (b.repr w) (b.repr z))) = |
| 33 | inner ℝ u w * inner ℝ v z - inner ℝ u z * inner ℝ v w := by |
| 34 | rw [EuclideanSpace.inner_eq_star_dotProduct, star_trivial, dotProduct_comm] |
| 35 | exact (cross_dot_cross _ _ _ _).trans (by simp only [repr_dotProduct]) |
| 36 | |
| 37 | /-- Every unit two-form coordinate is represented by an orthonormal tangent pair. -/ |
| 38 | theorem exists_orthonormal_crossProduct_repr (b : OrthonormalBasis (Fin 3) ℝ E) |
| 39 | (a : EuclideanSpace ℝ (Fin 3)) (ha : ‖a‖ = 1) : |
| 40 | ∃ u v : E, inner ℝ u u = 1 ∧ inner ℝ v v = 1 ∧ inner ℝ u v = 0 ∧ |
| 41 | (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v)) : |
| 42 | EuclideanSpace ℝ (Fin 3)) = a := by |
| 43 | obtain ⟨u, v, hu, hv, huv, hcross⟩ := |
| 44 | Poincare.LinearAlgebra.exists_orthonormal_crossProduct_of_norm_eq_one a ha |
| 45 | refine ⟨b.repr.symm u, b.repr.symm v, ?_, ?_, ?_, ?_⟩ |
| 46 | · rw [b.repr.symm.inner_map_map, EuclideanSpace.inner_eq_star_dotProduct, star_trivial] |
| 47 | exact hu |
| 48 | · rw [b.repr.symm.inner_map_map, EuclideanSpace.inner_eq_star_dotProduct, star_trivial] |
| 49 | exact hv |
| 50 | · rw [b.repr.symm.inner_map_map, EuclideanSpace.inner_eq_star_dotProduct, |
| 51 | star_trivial, dotProduct_comm] |
| 52 | exact huv |
| 53 | · rw [b.repr.apply_symm_apply, b.repr.apply_symm_apply] |
| 54 | exact congrArg (WithLp.toLp 2) hcross |
| 55 | |
| 56 | /-- The full curvature pairing is represented by the operator on cyclic two-form |
| 57 | coordinates, including its off-diagonal entries. -/ |
| 58 | theorem multilinear_eq_curvatureOperator_pairing |
| 59 | (A : MultilinearMap ℝ (fun _ : Fin 4 => E) ℝ) |
| 60 | (b : OrthonormalBasis (Fin 3) ℝ E) |
| 61 | (hfirst : ∀ u v w z, A ![u, v, w, z] = -A ![v, u, w, z]) |
| 62 | (hlast : ∀ u v w z, A ![u, v, w, z] = -A ![u, v, z, w]) (u v w z : E) : |
| 63 | A ![u, v, w, z] = |
| 64 | inner ℝ (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v))) |
| 65 | (curvatureOperator (fun i j k l => A ![b i, b j, b k, b l]) |
| 66 | (WithLp.toLp 2 (crossProduct (b.repr w) (b.repr z)))) := by |
| 67 | have hexp := multilinear_curvature_expansion A b (b.repr u) (b.repr v) |
| 68 | (b.repr w) (b.repr z) |
| 69 | rw [b.sum_repr u, b.sum_repr v, b.sum_repr w, b.sum_repr z] at hexp |
| 70 | rw [hexp] |
| 71 | have hcoords := curvature_contraction_eq_crossProduct_pairing |
| 72 | (fun i j k l => A ![b i, b j, b k, b l]) |
| 73 | (fun i j k l => hfirst (b i) (b j) (b k) (b l)) |
| 74 | (fun i j k l => hlast (b i) (b j) (b k) (b l)) |
| 75 | (b.repr u) (b.repr v) (b.repr w) (b.repr z) |
| 76 | rw [hcoords] |
| 77 | simp only [curvatureOperator, Matrix.toLpLin_apply, |
| 78 | EuclideanSpace.inner_eq_star_dotProduct, star_trivial] |
| 79 | exact dotProduct_comm _ _ |
| 80 | |
| 81 | /-- Evaluation on a plane is the Rayleigh value in cyclic two-form coordinates. -/ |
| 82 | theorem multilinear_plane_eq_curvatureOperator_rayleigh |
| 83 | (A : MultilinearMap ℝ (fun _ : Fin 4 => E) ℝ) |
| 84 | (b : OrthonormalBasis (Fin 3) ℝ E) |
| 85 | (hfirst : ∀ u v w z, A ![u, v, w, z] = -A ![v, u, w, z]) |
| 86 | (hlast : ∀ u v w z, A ![u, v, w, z] = -A ![u, v, z, w]) (u v : E) : |
| 87 | A ![u, v, u, v] = |
| 88 | inner ℝ (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v))) |
| 89 | (curvatureOperator (fun i j k l => A ![b i, b j, b k, b l]) |
| 90 | (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v)))) := by |
| 91 | have hexp := multilinear_plane_expansion A b (b.repr u) (b.repr v) |
| 92 | rw [b.sum_repr u, b.sum_repr v] at hexp |
| 93 | rw [hexp, curvatureOperator_rayleigh] |
| 94 | exact curvature_contraction_eq_crossProduct_rayleigh |
| 95 | (fun i j k l => A ![b i, b j, b k, b l]) |
| 96 | (fun i j k l => hfirst (b i) (b j) (b k) (b l)) |
| 97 | (fun i j k l => hlast (b i) (b j) (b k) (b l)) (b.repr u) (b.repr v) |
| 98 | |
| 99 | /-- The sectional infimum is the least eigenvalue of the cyclic curvature operator. -/ |
| 100 | theorem sectional_inf_eq_least_eigenvalue |
| 101 | (A : MultilinearMap ℝ (fun _ : Fin 4 => E) ℝ) |
| 102 | (b : OrthonormalBasis (Fin 3) ℝ E) |
| 103 | (hfirst : ∀ u v w z, A ![u, v, w, z] = -A ![v, u, w, z]) |
| 104 | (hlast : ∀ u v w z, A ![u, v, w, z] = -A ![u, v, z, w]) |
| 105 | (hpair : ∀ u v w z, A ![u, v, w, z] = A ![w, z, u, v]) : |
| 106 | sInf {q : ℝ | ∃ u v : E, |
| 107 | inner ℝ u u = 1 ∧ inner ℝ v v = 1 ∧ inner ℝ u v = 0 ∧ |
| 108 | q = A ![u, v, u, v]} = |
| 109 | (curvatureOperator_isSymmetric (fun i j k l => A ![b i, b j, b k, b l]) |
| 110 | (fun i j k l => hpair (b i) (b j) (b k) (b l))).eigenvalues |
| 111 | (by simp : Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3) 2 := by |
| 112 | let R : Fin 3 → Fin 3 → Fin 3 → Fin 3 → ℝ := |
| 113 | fun i j k l => A ![b i, b j, b k, b l] |
| 114 | have hRpair : ∀ i j k l, R i j k l = R k l i j := |
| 115 | fun i j k l => hpair (b i) (b j) (b k) (b l) |
| 116 | let T := curvatureOperator R |
| 117 | have hT : T.IsSymmetric := curvatureOperator_isSymmetric R hRpair |
| 118 | have hn : Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3 := by simp |
| 119 | let e := hT.eigenvalues hn |
| 120 | let S : Set ℝ := {q | ∃ u v : E, |
| 121 | inner ℝ u u = 1 ∧ inner ℝ v v = 1 ∧ inner ℝ u v = 0 ∧ |
| 122 | q = A ![u, v, u, v]} |
| 123 | have hplane (u v : E) : A ![u, v, u, v] = |
| 124 | inner ℝ (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v))) |
| 125 | (T (WithLp.toLp 2 (crossProduct (b.repr u) (b.repr v)))) := |
| 126 | multilinear_plane_eq_curvatureOperator_rayleigh A b hfirst hlast u v |
| 127 | have hlower : ∀ q ∈ S, e 2 ≤ q := by |
| 128 | rintro q ⟨u, v, hu, hv, huv, rfl⟩ |
| 129 | rw [hplane] |
| 130 | apply Poincare.symmetric_three_rayleigh_ge_least hT hn |
| 131 | exact Poincare.LinearAlgebra.norm_crossProduct_of_orthonormal |
| 132 | ((repr_dotProduct b u u).trans hu) ((repr_dotProduct b v v).trans hv) |
| 133 | ((repr_dotProduct b u v).trans huv) |
| 134 | have hattained : e 2 ∈ S := by |
| 135 | obtain ⟨w, hw, hvalue⟩ := Poincare.symmetric_three_rayleigh_attains_least hT hn |
| 136 | obtain ⟨u, v, hu, hv, huv, hcross⟩ := |
| 137 | Poincare.LinearAlgebra.exists_orthonormal_crossProduct_of_norm_eq_one w hw |
| 138 | have hcross' : (WithLp.toLp 2 (crossProduct u v) : EuclideanSpace ℝ (Fin 3)) = w := by |
| 139 | exact congrArg (WithLp.toLp 2) hcross |
| 140 | refine ⟨b.repr.symm u, b.repr.symm v, ?_, ?_, ?_, ?_⟩ |
| 141 | · rw [b.repr.symm.inner_map_map, EuclideanSpace.inner_eq_star_dotProduct, star_trivial] |
| 142 | exact hu |
| 143 | · rw [b.repr.symm.inner_map_map, EuclideanSpace.inner_eq_star_dotProduct, star_trivial] |
| 144 | exact hv |
| 145 | · rw [b.repr.symm.inner_map_map, EuclideanSpace.inner_eq_star_dotProduct, |
| 146 | star_trivial, dotProduct_comm] |
| 147 | exact huv |
| 148 | · rw [hplane, b.repr.apply_symm_apply, b.repr.apply_symm_apply, hcross'] |
| 149 | exact hvalue.symm |
| 150 | have hnonempty : S.Nonempty := ⟨e 2, hattained⟩ |
| 151 | have hbounded : BddBelow S := ⟨e 2, hlower⟩ |
| 152 | exact le_antisymm (csInf_le hbounded hattained) (le_csInf hnonempty hlower) |
| 153 | |
| 154 | /-- The ordered curvature spectrum determines the sectional infimum and both |
| 155 | complete contractions of an algebraic curvature tensor in dimension three. -/ |
| 156 | theorem algebraic_three_operator_spectrum |
| 157 | (A : MultilinearMap ℝ (fun _ : Fin 4 => E) ℝ) |
| 158 | (b : OrthonormalBasis (Fin 3) ℝ E) |
| 159 | (hfirst : ∀ u v w z, A ![u, v, w, z] = -A ![v, u, w, z]) |
| 160 | (hlast : ∀ u v w z, A ![u, v, w, z] = -A ![u, v, z, w]) |
| 161 | (hpair : ∀ u v w z, A ![u, v, w, z] = A ![w, z, u, v]) : |
| 162 | let T := curvatureOperator (fun i j k l => A ![b i, b j, b k, b l]) |
| 163 | ∃ k : Fin 3 → ℝ, |
| 164 | ∃ e : OrthonormalBasis (Fin 3) ℝ (EuclideanSpace ℝ (Fin 3)), |
| 165 | Antitone k ∧ (∀ i, T (e i) = k i • e i) ∧ |
| 166 | sInf {q : ℝ | ∃ u v : E, |
| 167 | inner ℝ u u = 1 ∧ inner ℝ v v = 1 ∧ inner ℝ u v = 0 ∧ |
| 168 | q = A ![u, v, u, v]} = k 2 ∧ |
| 169 | (∑ i, ∑ j, A ![b i, b j, b i, b j]) = 2 * (k 0 + k 1 + k 2) ∧ |
| 170 | (∑ i, ∑ j, ∑ k, ∑ l, A ![b i, b j, b k, b l] ^ 2) = |
| 171 | 4 * (k 0 ^ 2 + k 1 ^ 2 + k 2 ^ 2) := by |
| 172 | let R : Fin 3 → Fin 3 → Fin 3 → Fin 3 → ℝ := |
| 173 | fun i j k l => A ![b i, b j, b k, b l] |
| 174 | have hRfirst : ∀ i j k l, R i j k l = -R j i k l := |
| 175 | fun i j k l => hfirst (b i) (b j) (b k) (b l) |
| 176 | have hRlast : ∀ i j k l, R i j k l = -R i j l k := |
| 177 | fun i j k l => hlast (b i) (b j) (b k) (b l) |
| 178 | have hRpair : ∀ i j k l, R i j k l = R k l i j := |
| 179 | fun i j k l => hpair (b i) (b j) (b k) (b l) |
| 180 | let T := curvatureOperator R |
| 181 | have hT : T.IsSymmetric := curvatureOperator_isSymmetric R hRpair |
| 182 | have hn : Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3 := by simp |
| 183 | let e := hT.eigenvalues hn |
| 184 | have hinf := sectional_inf_eq_least_eigenvalue A b hfirst hlast hpair |
| 185 | refine ⟨e, hT.eigenvectorBasis hn, hT.eigenvalues_antitone hn, |
| 186 | hT.apply_eigenvectorBasis hn, hinf, ?_, ?_⟩ |
| 187 | · change (∑ i, ∑ j, R i j i j) = _ |
| 188 | rw [curvatureOperator_scalar_identity R hRfirst hRlast] |
| 189 | change 2 * LinearMap.trace ℝ (EuclideanSpace ℝ (Fin 3)) T = _ |
| 190 | rw [hT.trace_eq_sum_eigenvalues hn] |
| 191 | simp [e, Fin.sum_univ_succ] |
| 192 | ring |
| 193 | · change (∑ i, ∑ j, ∑ k, ∑ l, R i j k l ^ 2) = _ |
| 194 | rw [curvatureOperator_normSq_identity R hRfirst hRlast hRpair |
| 195 | (hT.eigenvectorBasis hn)] |
| 196 | change 4 * (∑ i, ‖T (hT.eigenvectorBasis hn i)‖ ^ 2) = _ |
| 197 | rw [Poincare.symmetric_eigenbasis_energy hT hn] |
| 198 | simp [e, Fin.sum_univ_succ] |
| 199 | ring |
| 200 | |
| 201 | /-- The numerical consequences of the ordered curvature-operator eigenbasis. -/ |
| 202 | theorem algebraic_three_spectrum |
| 203 | (A : MultilinearMap ℝ (fun _ : Fin 4 => E) ℝ) |
| 204 | (b : OrthonormalBasis (Fin 3) ℝ E) |
| 205 | (hfirst : ∀ u v w z, A ![u, v, w, z] = -A ![v, u, w, z]) |
| 206 | (hlast : ∀ u v w z, A ![u, v, w, z] = -A ![u, v, z, w]) |
| 207 | (hpair : ∀ u v w z, A ![u, v, w, z] = A ![w, z, u, v]) : |
| 208 | ∃ k₁ k₂ k₃ : ℝ, |
| 209 | k₁ ≥ k₂ ∧ k₂ ≥ k₃ ∧ |
| 210 | sInf {q : ℝ | ∃ u v : E, |
| 211 | inner ℝ u u = 1 ∧ inner ℝ v v = 1 ∧ inner ℝ u v = 0 ∧ |
| 212 | q = A ![u, v, u, v]} = k₃ ∧ |
| 213 | (∑ i, ∑ j, A ![b i, b j, b i, b j]) = 2 * (k₁ + k₂ + k₃) ∧ |
| 214 | (∑ i, ∑ j, ∑ k, ∑ l, A ![b i, b j, b k, b l] ^ 2) = |
| 215 | 4 * (k₁ ^ 2 + k₂ ^ 2 + k₃ ^ 2) := by |
| 216 | obtain ⟨k, e, horder, heigen, hleast, hscalar, hnorm⟩ := |
| 217 | algebraic_three_operator_spectrum A b hfirst hlast hpair |
| 218 | exact ⟨k 0, k 1, k 2, horder (by decide), horder (by decide), |
| 219 | hleast, hscalar, hnorm⟩ |
| 220 | |
| 221 | end Poincare.Geometry.Curvature.Operator |