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.Pinching.Algebra |
| 2 | |
| 3 | /-! |
| 4 | # Reaction preservation of the logarithmic Hamilton--Ivey barrier |
| 5 | |
| 6 | This is the calculus producer for the ordered-eigenvalue reaction estimate. |
| 7 | The finite-dimensional sign is delegated to `pinchingReactionInequality`. |
| 8 | -/ |
| 9 | |
| 10 | namespace Poincare |
| 11 | |
| 12 | /-- The ordered-eigenvalue reaction keeps the logarithmic pinching quantity |
| 13 | above slope `X` at a point where the least eigenvalue is `-X`. |
| 14 | |
| 15 | The hypotheses expose the algebraic reaction equations so this producer can be |
| 16 | used by a geometric maximum-principle argument without hiding any input. |
| 17 | -/ |
| 18 | theorem pinchingReactionBarrier |
| 19 | {lam mu nu : ℝ} {S X : ℝ → ℝ} {t dS dX : ℝ} |
| 20 | (hmu : mu ≤ lam) (hnu : nu ≤ mu) |
| 21 | (hXval : X t = -nu) (hSval : S t = lam + mu + nu) |
| 22 | (hS : HasDerivAt S dS t) (hX : HasDerivAt X dX t) |
| 23 | (hdS : dS = X t ^ 2 + (-mu) ^ 2 + lam ^ 2 + X t * (-mu) - |
| 24 | lam * (X t + (-mu))) |
| 25 | (hdX : dX = -X t ^ 2 + (-mu) * lam) |
| 26 | (hXpos : 0 < X t) : |
| 27 | X t ≤ deriv (fun s => S s / X s - Real.log (X s)) t := by |
| 28 | have hnu0 : nu ≤ 0 := by |
| 29 | have h : 0 ≤ -nu := by simpa [hXval] using hXpos.le |
| 30 | exact neg_nonneg.mp h |
| 31 | have hreaction := pinchingReactionInequality |
| 32 | (lam := lam) (X := -nu) (Y := -mu) |
| 33 | (neg_nonneg.mpr hnu0) (neg_le_neg hnu) (by simpa using hmu) |
| 34 | have hdS' : dS = (-nu) ^ 2 + (-mu) ^ 2 + lam ^ 2 + |
| 35 | (-nu) * (-mu) - lam * ((-nu) + (-mu)) := by |
| 36 | simpa [hXval] using hdS |
| 37 | have hdX' : dX = -(-nu) ^ 2 + (-mu) * lam := by |
| 38 | simpa [hXval] using hdX |
| 39 | have hineq : X t ^ 3 ≤ X t * dS - (S t + X t) * dX := by |
| 40 | calc |
| 41 | X t ^ 3 = (-nu) ^ 3 := by rw [hXval] |
| 42 | _ ≤ (-nu) * ((-nu) ^ 2 + (-mu) ^ 2 + lam ^ 2 + |
| 43 | (-nu) * (-mu) - lam * ((-nu) + (-mu))) - |
| 44 | (lam - (-nu) - (-mu) + (-nu)) * |
| 45 | (-(-nu) ^ 2 + (-mu) * lam) := hreaction |
| 46 | _ = X t * dS - (S t + X t) * dX := by |
| 47 | rw [hXval, hSval, hdS', hdX'] |
| 48 | ring |
| 49 | exact derivPinchingLogQuantityGe hS hX hXpos hineq |
| 50 | |
| 51 | end Poincare |