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.Analysis.Parabolic.CompactMaximum |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Estimates.ScalarTrace |
| 3 | import PoincareLib.Geometry.RicciFlow.Basic |
| 4 | import Mathlib.Analysis.Calculus.LocalExtr.Basic |
| 5 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 6 | import Mathlib.Topology.Order.Compact |
| 7 | import Mathlib.Tactic |
| 8 | |
| 9 | /-! Adapted from Mapher06/Poincare-MorganTian, `PoincareMT/Proofs/M04/CompactParabolic.lean`, |
| 10 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. See the curvature import record under |
| 11 | `references/ricci-flow/mapher/curvature/`. -/ |
| 12 | |
| 13 | /-! |
| 14 | # Compact scalar comparison |
| 15 | |
| 16 | The compact-family comparison is applied to the negative of a supersolution, |
| 17 | including terminal endpoints. This reuses the exponential comparison from |
| 18 | Morgan-Tian, Theorems 4.7-4.8, printed p. 66. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | |
| 23 | open Set |
| 24 | open scoped Manifold ContDiff Bundle |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.RicciFlowAnalysis |
| 29 | |
| 30 | theorem compact_min_velocity_nonnegative |
| 31 | {M : Type u} [TopologicalSpace M] [CompactSpace M] |
| 32 | {T K : ℝ} (hT : 0 < T) (f v : ℝ → M → ℝ) |
| 33 | (hf : ContinuousOn (Function.uncurry f) (Icc 0 T ×ˢ (univ : Set M))) |
| 34 | (hderiv : ∀ t ∈ Icc 0 T, ∀ x : M, |
| 35 | HasDerivWithinAt (fun s ↦ f s x) (v t x) (Icc 0 T) t) |
| 36 | (hmin : ∀ t ∈ Ioc 0 T, ∀ x : M, |
| 37 | (∀ y : M, f t x ≤ f t y) → f t x ≤ 0 → -K * f t x ≤ v t x) |
| 38 | (hinit : ∀ x : M, 0 ≤ f 0 x) : |
| 39 | ∀ t ∈ Icc 0 T, ∀ x : M, 0 ≤ f t x := by |
| 40 | have hcont : ContinuousOn (fun p : M × ℝ ↦ -f p.2 p.1) |
| 41 | (univ ×ˢ Icc 0 T) := |
| 42 | hf.neg.comp continuous_swap.continuousOn (fun _ hp ↦ ⟨hp.2, hp.1⟩) |
| 43 | have h := Poincare.Parabolic.nonpos_of_deriv_le_mul_at_max |
| 44 | (F := fun x t ↦ -f t x) (F' := fun x t ↦ -v t x) (K := -K) hcont |
| 45 | (fun x t ht ↦ (hderiv t ⟨ht.1.le, ht.2⟩ x).neg) |
| 46 | (fun x t ht hneg hspace ↦ by |
| 47 | have hv := hmin t ht x (fun y ↦ neg_le_neg_iff.mp (hspace y)) (by linarith) |
| 48 | linarith) |
| 49 | (fun x ↦ neg_nonpos.mpr (hinit x)) |
| 50 | exact fun t ht x ↦ neg_nonpos.mp (h x t ht) |
| 51 | |
| 52 | theorem ricciFlow_supersolution_nonnegative |
| 53 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 54 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 55 | [CompactSpace M] {T K : ℝ} (hT : 0 < T) (F : RicciFlow n M (Icc 0 T)) |
| 56 | (f v : ℝ → M → ℝ) |
| 57 | (hf : ContinuousOn (Function.uncurry f) (Icc 0 T ×ˢ (univ : Set M))) |
| 58 | (hderiv : ∀ t ∈ Icc 0 T, ∀ x : M, |
| 59 | HasDerivWithinAt (fun s ↦ f s x) (v t x) (Icc 0 T) t) |
| 60 | (hinit : ∀ x : M, 0 ≤ f 0 x) |
| 61 | (hsmooth : ∀ t ∈ Icc 0 T, ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (f t)) |
| 62 | (hevol : ∀ t ∈ Ioc 0 T, ∀ x : M, |
| 63 | (F.connection t).laplacian (f t) x - K * f t x ≤ v t x) : |
| 64 | ∀ t ∈ Icc 0 T, ∀ x : M, 0 ≤ f t x := by |
| 65 | apply compact_min_velocity_nonnegative (K := K) hT f v hf hderiv _ hinit |
| 66 | intro t ht x hmin _hneg |
| 67 | have hlocal : IsLocalMin (f t) x := Filter.Eventually.of_forall hmin |
| 68 | have hlap := (F.connection t).laplacian_nonneg_of_isLocalMinAt |
| 69 | ((hsmooth t ⟨ht.1.le, ht.2⟩).contMDiffAt) hlocal |
| 70 | have := hevol t ht x |
| 71 | linarith |
| 72 | |
| 73 | end PoincareMT.RicciFlowAnalysis |