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.ReducedVolume.Exponential.Dynamics.KineticLagrangian |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Coordinates.MetricInverse |
| 3 | |
| 4 | /-! |
| 5 | # One autonomous covector phase field |
| 6 | |
| 7 | Time is part of the state. The momentum component retains the complete |
| 8 | spatial differential of the kinetic Lagrangian. Smoothness follows from |
| 9 | the actual metric inverse and the derivative of the actual potential. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped ContDiff |
| 15 | |
| 16 | namespace PoincareMT.ReducedVolume |
| 17 | |
| 18 | variable {Y : Type*} [NormedAddCommGroup Y] [InnerProductSpace ℝ Y] |
| 19 | [FiniteDimensional ℝ Y] |
| 20 | |
| 21 | /-- The autonomous position and covector-momentum field, with time as its first coordinate. -/ |
| 22 | noncomputable def phaseField (B : Y × ℝ → Y →L[ℝ] Y →L[ℝ] ℝ) (R : Y × ℝ → ℝ) |
| 23 | (a : ℝ × Y × (Y →L[ℝ] ℝ)) : ℝ × Y × (Y →L[ℝ] ℝ) := |
| 24 | (1, phaseVelocity B a, |
| 25 | (fderiv ℝ (kineticLagrangian B R) (a.1, a.2.1, phaseVelocity B a)).comp |
| 26 | ((0 : Y →L[ℝ] ℝ).prod |
| 27 | ((ContinuousLinearMap.id ℝ Y).prod (0 : Y →L[ℝ] Y)))) |
| 28 | |
| 29 | /-- Smooth actual metric and potential germs give the C1 phase field needed for local uniqueness. -/ |
| 30 | theorem phaseField_contDiffAt {B : Y × ℝ → Y →L[ℝ] Y →L[ℝ] ℝ} {R : Y × ℝ → ℝ} |
| 31 | {a : ℝ × Y × (Y →L[ℝ] ℝ)} |
| 32 | (hB : ContDiffAt ℝ ∞ B (a.2.1, a.1)) |
| 33 | (hR : ContDiffAt ℝ ∞ R (a.2.1, a.1)) (ht : 0 < a.1) |
| 34 | (hi : (B (a.2.1, a.1)).IsInvertible) : |
| 35 | ContDiffAt ℝ 1 (phaseField B R) a := by |
| 36 | have hV : ContDiffAt ℝ 1 (phaseVelocity B) a := |
| 37 | (phaseVelocity_contDiffAt hB ht hi).of_le (by simp) |
| 38 | have hL : ContDiffAt ℝ ∞ (kineticLagrangian B R) |
| 39 | (a.1, a.2.1, phaseVelocity B a) := kineticLagrangian_contDiffAt hB hR ht |
| 40 | have hs : ContDiffAt ℝ 1 |
| 41 | (fun b : ℝ × Y × (Y →L[ℝ] ℝ) ↦ (b.1, b.2.1, phaseVelocity B b)) a := |
| 42 | contDiffAt_fst.prodMk (contDiffAt_snd.fst.prodMk hV) |
| 43 | have hLtwo : ContDiffAt ℝ 2 (kineticLagrangian B R) |
| 44 | (a.1, a.2.1, phaseVelocity B a) := |
| 45 | hL.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2) |
| 46 | exact contDiffAt_const.prodMk (hV.prodMk |
| 47 | (((hLtwo.fderiv_right (m := 1) (by norm_num)).comp a hs).clm_comp contDiffAt_const)) |
| 48 | |
| 49 | end PoincareMT.ReducedVolume |