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.Minimum.Variation.Frame.SquareTime |
| 2 | |
| 3 | /-! |
| 4 | # Compatibility of the coordinate metric and connection |
| 5 | |
| 6 | The algebraic chart connection is torsion free and preserves the spatial |
| 7 | metric. These identities are the hypotheses of the coordinate second variation. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open Set Filter Topology |
| 14 | open scoped ContDiff |
| 15 | |
| 16 | namespace PoincareMT.ReducedLengthMinimum.Variation.Frame |
| 17 | |
| 18 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 19 | [FiniteDimensional ℝ E] [CompleteSpace E] |
| 20 | |
| 21 | /-- Symmetry of the metric makes its Koszul connection torsion free. -/ |
| 22 | theorem chartConnection_symm |
| 23 | (G : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ) (z : ℝ × E) |
| 24 | (hG : DifferentiableAt ℝ G z) |
| 25 | (hsym : ∀ᶠ q in 𝓝 z, ∀ v w, G q v w = G q w v) (v w : E) : |
| 26 | chartConnection G z v w = chartConnection G z w v := by |
| 27 | have heq : chartConnectionCovector G z v w = chartConnectionCovector G z w v := by |
| 28 | ext u |
| 29 | rw [chartConnectionCovector_apply, chartConnectionCovector_apply, |
| 30 | fderiv_bilinear_symm G z hG hsym (0, u) v w] |
| 31 | ring |
| 32 | simp only [chartConnection, heq] |
| 33 | |
| 34 | /-- The spatial derivative of the metric is the sum of its two connection terms. -/ |
| 35 | theorem chartConnection_metric_compatibility |
| 36 | (G : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ) (z : ℝ × E) |
| 37 | (hG : DifferentiableAt ℝ G z) |
| 38 | (hsym : ∀ᶠ q in 𝓝 z, ∀ v w, G q v w = G q w v) |
| 39 | (hpos : ∀ v : E, v ≠ 0 → 0 < G z v v) (v w u : E) : |
| 40 | fderiv ℝ G z (0, v) w u = |
| 41 | G z (chartConnection G z v w) u + G z w (chartConnection G z v u) := by |
| 42 | rw [hsym.self_of_nhds w (chartConnection G z v u), |
| 43 | chartConnection_pairing G z hpos, chartConnection_pairing G z hpos, |
| 44 | fderiv_bilinear_symm G z hG hsym (0, v) u w] |
| 45 | ring |
| 46 | |
| 47 | end PoincareMT.ReducedLengthMinimum.Variation.Frame |