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.Minimum.Compactness.SquarePathEnergyBound |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Analysis.Distance.PathEnergyDistance |
| 3 | |
| 4 | /-! |
| 5 | # Energy modulus for the actual square-time paths |
| 6 | |
| 7 | The energy on every subinterval is bounded by the full energy. The |
| 8 | intrinsic path estimate therefore gives a uniform square-root modulus, |
| 9 | without differentiating a constant extension. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedVolume |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 24 | |
| 25 | /-- The actual square-family kinetic energy is everywhere nonnegative. -/ |
| 26 | theorem terminalSquareEnergy_nonneg (G : LExponentialGeometry F T τmax p) |
| 27 | (Z : TangentSpace (𝓡 n) p) (s : ℝ) : 0 ≤ terminalSquareEnergy G Z s := by |
| 28 | by_cases hv : curveVelocity (n := n) (G.squareFamily Z) s = 0 |
| 29 | · simp [terminalSquareEnergy, hv] |
| 30 | · exact ((F.metric T).pos _ _ hv).le |
| 31 | |
| 32 | /-- A full square-path energy bound controls every pair of points on the path. -/ |
| 33 | theorem edist_squareFamily_le_of_energy |
| 34 | (G : LExponentialGeometry F T τmax p) (Z : TangentSpace (𝓡 n) p) |
| 35 | {τ K : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) |
| 36 | (henergy : (∫ s in 0..Real.sqrt τ, terminalSquareEnergy G Z s) ≤ K) |
| 37 | {a b : ℝ} (ha : 0 ≤ a) (hab : a ≤ b) (hb : b ≤ Real.sqrt τ) : |
| 38 | (F.metric T).edist (G.squareFamily Z a) (G.squareFamily Z b) ≤ |
| 39 | ENNReal.ofReal (Real.sqrt (K * (b - a))) := by |
| 40 | have hU : IsOpen {s : ℝ | (Z, s) ∈ G.squareDomain} := |
| 41 | G.square_open.preimage (continuous_const.prodMk continuous_id) |
| 42 | have hI : Icc a b ⊆ {s : ℝ | (Z, s) ∈ G.squareDomain} := by |
| 43 | intro s hs |
| 44 | apply G.square_contains |
| 45 | exact ⟨mem_univ _, ha.trans hs.1, |
| 46 | (hs.2.trans hb).trans_lt (Real.sqrt_lt_sqrt hτ.le hmax)⟩ |
| 47 | have hd := edist_le_sqrt_curve_energy (F.metric T) hU |
| 48 | ((squareFamily_contMDiffOn G Z).of_le (by decide)) hab hI |
| 49 | change (F.metric T).edist _ _ ≤ ENNReal.ofReal |
| 50 | (Real.sqrt ((b - a) * ∫ s in a..b, terminalSquareEnergy G Z s)) at hd |
| 51 | apply hd.trans |
| 52 | apply ENNReal.ofReal_le_ofReal |
| 53 | apply Real.sqrt_le_sqrt |
| 54 | have hint := intervalIntegral.integral_mono_interval (μ := volume) ha hab hb |
| 55 | (Eventually.of_forall (terminalSquareEnergy_nonneg G Z)) |
| 56 | ((terminalSquareEnergy_continuousOn G Z hτ hmax).intervalIntegrable_of_Icc |
| 57 | (Real.sqrt_nonneg τ)) |
| 58 | simpa only [mul_comm K] using |
| 59 | mul_le_mul_of_nonneg_left (hint.trans henergy) (sub_nonneg.mpr hab) |
| 60 | |
| 61 | end PoincareMT.ReducedVolume |