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.Harnack.Noncompact.CurvatureControl.CompactVolume |
| 2 | import Mathlib.Analysis.Calculus.Deriv.MeanValue |
| 3 | |
| 4 | /-! |
| 5 | # Temporal comparison for intrinsic volume |
| 6 | |
| 7 | The fixed-set volume derivative turns an upper bound on the scalar-curvature |
| 8 | integral into a linear lower bound on volume. Nonnegative scalar curvature |
| 9 | makes the same volume nonincreasing. These are the analytic steps in |
| 10 | Cabezas-Rivas--Wilking, Proposition 4.3, equations (4.2)-(4.3), p. 3161. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set MeasureTheory Filter |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {J : Set ℝ} |
| 26 | |
| 27 | /-- A uniform upper bound on the scalar-curvature integral limits the loss of |
| 28 | volume over a time interval. The bound is required only at interior times. -/ |
| 29 | theorem volumeMeasure_lower_bound_of_integral_scalarCurvature_le |
| 30 | (F : RicciFlow n M J) {a b P : ℝ} (hab : a ≤ b) |
| 31 | (hJ : Icc a b ⊆ interior J) |
| 32 | (hD : ∀ t ∈ Icc a b, (F.connection t).CurvatureTensorCalculus) |
| 33 | {S K : Set M} (hS : MeasurableSet S) (hK : IsCompact K) (hSK : S ⊆ K) |
| 34 | (hP : ∀ t ∈ Ioo a b, |
| 35 | (∫ y in S, (F.connection t).scalarCurvature y ∂(F.metric t).volumeMeasure) ≤ P) : |
| 36 | ((F.metric a).volumeMeasure S).toReal - P * (b - a) ≤ |
| 37 | ((F.metric b).volumeMeasure S).toReal := by |
| 38 | have hd (t : ℝ) (ht : t ∈ Icc a b) : |
| 39 | HasDerivAt (fun s => ((F.metric s).volumeMeasure S).toReal) |
| 40 | (-(∫ y in S, (F.connection t).scalarCurvature y |
| 41 | ∂(F.metric t).volumeMeasure)) t := |
| 42 | F.hasDerivAt_volumeMeasure_of_subset (hJ ht) (hD t ht) hS hK hSK |
| 43 | have hcont : ContinuousOn (fun s => ((F.metric s).volumeMeasure S).toReal) (Icc a b) := |
| 44 | fun t ht => (hd t ht).continuousAt.continuousWithinAt |
| 45 | have hdiff : DifferentiableOn ℝ (fun s => ((F.metric s).volumeMeasure S).toReal) |
| 46 | (interior (Icc a b)) := |
| 47 | fun t ht => (hd t (interior_subset ht)).differentiableAt.differentiableWithinAt |
| 48 | have hbound : ∀ t ∈ interior (Icc a b), |
| 49 | -P ≤ deriv (fun s => ((F.metric s).volumeMeasure S).toReal) t := by |
| 50 | intro t ht |
| 51 | rw [(hd t (interior_subset ht)).deriv] |
| 52 | exact neg_le_neg (hP t (by simpa only [interior_Icc] using ht)) |
| 53 | have h := (convex_Icc a b).mul_sub_le_image_sub_of_le_deriv hcont hdiff hbound |
| 54 | a (left_mem_Icc.mpr hab) b (right_mem_Icc.mpr hab) hab |
| 55 | linarith |
| 56 | |
| 57 | /-- Nonnegative integrated scalar curvature makes the fixed-set volume |
| 58 | nonincreasing throughout a closed time interval. -/ |
| 59 | theorem antitoneOn_volumeMeasure_of_integral_scalarCurvature_nonneg |
| 60 | (F : RicciFlow n M J) {a b : ℝ} |
| 61 | (hJ : Icc a b ⊆ interior J) |
| 62 | (hD : ∀ t ∈ Icc a b, (F.connection t).CurvatureTensorCalculus) |
| 63 | {S K : Set M} (hS : MeasurableSet S) (hK : IsCompact K) (hSK : S ⊆ K) |
| 64 | (hR : ∀ t ∈ Ioo a b, 0 ≤ |
| 65 | ∫ y in S, (F.connection t).scalarCurvature y ∂(F.metric t).volumeMeasure) : |
| 66 | AntitoneOn (fun t => ((F.metric t).volumeMeasure S).toReal) (Icc a b) := by |
| 67 | have hd (t : ℝ) (ht : t ∈ Icc a b) : |
| 68 | HasDerivAt (fun s => ((F.metric s).volumeMeasure S).toReal) |
| 69 | (-(∫ y in S, (F.connection t).scalarCurvature y |
| 70 | ∂(F.metric t).volumeMeasure)) t := |
| 71 | F.hasDerivAt_volumeMeasure_of_subset (hJ ht) (hD t ht) hS hK hSK |
| 72 | apply antitoneOn_of_deriv_nonpos (convex_Icc a b) |
| 73 | (fun t ht => (hd t ht).continuousAt.continuousWithinAt) |
| 74 | (fun t ht => (hd t (interior_subset ht)).differentiableAt.differentiableWithinAt) |
| 75 | intro t ht |
| 76 | rw [(hd t (interior_subset ht)).deriv] |
| 77 | exact neg_nonpos.mpr (hR t (by simpa only [interior_Icc] using ht)) |
| 78 | |
| 79 | /-- Nonnegative scalar curvature on the measured set makes its intrinsic |
| 80 | volume nonincreasing. -/ |
| 81 | theorem antitoneOn_volumeMeasure_of_scalarCurvature_nonneg |
| 82 | (F : RicciFlow n M J) {a b : ℝ} |
| 83 | (hJ : Icc a b ⊆ interior J) |
| 84 | (hD : ∀ t ∈ Icc a b, (F.connection t).CurvatureTensorCalculus) |
| 85 | {S K : Set M} (hS : MeasurableSet S) (hK : IsCompact K) (hSK : S ⊆ K) |
| 86 | (hR : ∀ t ∈ Icc a b, ∀ x ∈ S, 0 ≤ (F.connection t).scalarCurvature x) : |
| 87 | AntitoneOn (fun t => ((F.metric t).volumeMeasure S).toReal) (Icc a b) := by |
| 88 | apply F.antitoneOn_volumeMeasure_of_integral_scalarCurvature_nonneg hJ hD hS hK hSK |
| 89 | intro t ht |
| 90 | apply integral_nonneg_of_ae |
| 91 | filter_upwards [ae_restrict_mem hS] with x hx |
| 92 | exact hR t (Ioo_subset_Icc_self ht) x hx |
| 93 | |
| 94 | end PoincareMT.RicciFlow |