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.RicciFlow.ReducedGeometry.ReducedLength.Tensor.BilinearTrace |
| 2 | |
| 3 | /-! |
| 4 | # Basis independence of bilinear contractions |
| 5 | |
| 6 | The full squared contraction is the trace of the adjoint square of the |
| 7 | Riesz endomorphism. No symmetry of the form is needed. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open scoped BigOperators RealInnerProductSpace |
| 13 | |
| 14 | namespace PoincareMT.ReducedLength |
| 15 | |
| 16 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 17 | [FiniteDimensional ℝ E] |
| 18 | {ι κ : Type*} [Fintype ι] [Fintype κ] |
| 19 | |
| 20 | theorem bilinear_trace_basis_eq (B : E →L[ℝ] E →L[ℝ] ℝ) |
| 21 | (e : OrthonormalBasis ι ℝ E) (f : OrthonormalBasis κ ℝ E) : |
| 22 | (∑ i, B (e i) (e i)) = ∑ j, B (f j) (f j) := |
| 23 | (continuousTrace_formOperator B e).symm.trans (continuousTrace_formOperator B f) |
| 24 | |
| 25 | theorem endomorphism_square_trace (L : E →L[ℝ] E) (e : OrthonormalBasis ι ℝ E) : |
| 26 | (∑ i, ⟪L (e i), L (e i)⟫) = continuousTrace (L.adjoint * L) := by |
| 27 | rw [continuousTrace_apply, LinearMap.trace_eq_sum_inner _ e] |
| 28 | apply Finset.sum_congr rfl |
| 29 | intro i _ |
| 30 | exact (L.adjoint_inner_right (e i) (L (e i))).symm |
| 31 | |
| 32 | theorem bilinear_square_contraction (B : E →L[ℝ] E →L[ℝ] ℝ) |
| 33 | (e : OrthonormalBasis ι ℝ E) (x : E) : |
| 34 | (∑ j, (B x (e j)) ^ 2) = ⟪formOperator B x, formOperator B x⟫ := by |
| 35 | simpa only [formOperator_pairing, real_inner_self_eq_norm_sq] using |
| 36 | e.sum_sq_inner_left (formOperator B x) |
| 37 | |
| 38 | theorem bilinear_square_trace (B : E →L[ℝ] E →L[ℝ] ℝ) |
| 39 | (e : OrthonormalBasis ι ℝ E) : |
| 40 | (∑ i, ∑ j, (B (e i) (e j)) ^ 2) = |
| 41 | continuousTrace ((formOperator B).adjoint * formOperator B) := by |
| 42 | simp_rw [bilinear_square_contraction B e] |
| 43 | exact endomorphism_square_trace (formOperator B) e |
| 44 | |
| 45 | theorem bilinear_square_basis_eq (B : E →L[ℝ] E →L[ℝ] ℝ) |
| 46 | (e : OrthonormalBasis ι ℝ E) (f : OrthonormalBasis κ ℝ E) : |
| 47 | (∑ i, ∑ j, (B (e i) (e j)) ^ 2) = ∑ i, ∑ j, (B (f i) (f j)) ^ 2 := |
| 48 | (bilinear_square_trace B e).trans (bilinear_square_trace B f).symm |
| 49 | |
| 50 | end PoincareMT.ReducedLength |