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.Coordinates.KoszulCoefficient |
| 2 | import Mathlib.Geometry.Manifold.MFDeriv.Atlas |
| 3 | import Mathlib.Geometry.Manifold.VectorField.LieBracket |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Geometry.ChartVectorField |
| 5 | |
| 6 | /-! Generic variation constructions reused by the reduced-length theory. -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | |
| 10 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 11 | |
| 12 | universe u |
| 13 | |
| 14 | namespace PoincareMT.ReducedLength |
| 15 | |
| 16 | export PoincareMT.ReducedLengthMinimum.Variation.Geometry |
| 17 | (chartVectorField chartVectorField_smooth chartVectorField_at_inverse chartVectorField_bracket mvfderiv_chartVectorField) |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 21 | [IsManifold (𝓡 n) ∞ M] |
| 22 | |
| 23 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 24 | |
| 25 | theorem chartVectorField_diagonal_koszul {g : RiemannianMetric n M} |
| 26 | (D : LeviCivitaData g) (p : M) (v w : E) (x : M) |
| 27 | (hx : x ∈ (chartAt E p).source) : |
| 28 | 2 * g.inner x |
| 29 | (D.connection (chartVectorField p v) x (chartVectorField p v x)) |
| 30 | (chartVectorField p w x) = |
| 31 | 2 * mvfderiv (𝓡 n) |
| 32 | (fun q ↦ g.inner q (chartVectorField p v q) (chartVectorField p w q)) x |
| 33 | (chartVectorField p v x) - |
| 34 | mvfderiv (𝓡 n) |
| 35 | (fun q ↦ g.inner q (chartVectorField p v q) (chartVectorField p v q)) x |
| 36 | (chartVectorField p w x) := by |
| 37 | have hV (a : E) := ((chartVectorField_smooth p a).contMDiffAt |
| 38 | ((chartAt E p).open_source.mem_nhds hx)).mdifferentiableAt (by simp) |
| 39 | have h := leviCivita_koszul_at D x (chartVectorField p v) (chartVectorField p v) |
| 40 | (chartVectorField p w) (hV v) (hV v) (hV w) |
| 41 | rw [chartVectorField_bracket p v v x hx, chartVectorField_bracket p v w x hx] at h |
| 42 | simpa only [map_zero, ContinuousLinearMap.zero_apply, add_zero, sub_zero, two_mul] using h |
| 43 | |
| 44 | |
| 45 | end PoincareMT.ReducedLength |