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.Regularity.Continuity.Continuity |
| 2 | import Mathlib.Analysis.Calculus.FDeriv.Measurable |
| 3 | |
| 4 | /-! |
| 5 | # Measurability of the literal reduced-length time derivative |
| 6 | |
| 7 | Clamping time inside the strict window gives a globally continuous |
| 8 | parameter family. Its totalized derivative is measurable and agrees |
| 9 | locally with the actual derivative at every point of the fixed slice. |
| 10 | This supplies the measurable right side in Morgan-Tian Theorem 7.13. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedVolume |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | [ConnectedSpace M] [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 25 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 26 | |
| 27 | set_option maxHeartbeats 800000 in |
| 28 | -- Elaborating the parameterized derivative theorem unfolds the manifold product continuity proof. |
| 29 | /-- The actual totalized time derivative is measurable on each strict interior spatial slice. -/ |
| 30 | theorem reducedLength_time_derivative_measurable |
| 31 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 32 | {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 33 | Measurable (fun q : M ↦ deriv (fun s ↦ reducedLength F T p q s) τ) := by |
| 34 | let a := τ / 2 |
| 35 | let b := (τ + τmax) / 2 |
| 36 | have ha : 0 < a := by dsimp [a]; linarith |
| 37 | have haτ : a < τ := by dsimp [a]; linarith |
| 38 | have hτb : τ < b := by dsimp [b]; linarith |
| 39 | have hb : b < τmax := by dsimp [b]; linarith |
| 40 | let c := fun s : ℝ ↦ max a (min b s) |
| 41 | have hc (s : ℝ) : c s ∈ Ioo 0 τmax := |
| 42 | ⟨ha.trans_le (le_max_left _ _), |
| 43 | (max_le (haτ.trans hτb).le (min_le_left _ _)).trans_lt hb⟩ |
| 44 | let f := fun (q : M) (s : ℝ) ↦ reducedLength F T p q (c s) |
| 45 | have hf : Continuous f.uncurry := |
| 46 | (reducedLength_continuousOn hL hDifferential p).comp_continuous |
| 47 | (continuous_fst.prodMk (show Continuous (fun z : M × ℝ ↦ c z.2) by |
| 48 | dsimp only [c]; fun_prop)) (fun z ↦ ⟨mem_univ _, hc z.2⟩) |
| 49 | have hm : Measurable (fun q : M ↦ deriv (f q) τ) := |
| 50 | (measurable_deriv_with_param hf).comp (measurable_id.prodMk measurable_const) |
| 51 | have heq (q : M) : deriv (f q) τ = deriv (fun s ↦ reducedLength F T p q s) τ := by |
| 52 | apply Filter.EventuallyEq.deriv_eq |
| 53 | filter_upwards [isOpen_Ioo.mem_nhds (show τ ∈ Ioo a b from ⟨haτ, hτb⟩)] with s hs |
| 54 | dsimp only [f, c] |
| 55 | rw [min_eq_right hs.2.le, max_eq_right hs.1.le] |
| 56 | simpa only [heq] using hm |
| 57 | |
| 58 | /-- The combined upper Laplacian right side is measurable without choosing a measurable frame. -/ |
| 59 | theorem reducedLength_weak_bound_measurable |
| 60 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 61 | {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 62 | Measurable (fun q : M ↦ -deriv (fun s ↦ reducedLength F T p q s) τ + |
| 63 | ((n : ℝ) / 2 - reducedLength F T p q τ) / τ) := by |
| 64 | have hu : Continuous (fun q : M ↦ reducedLength F T p q τ) := |
| 65 | (reducedLength_continuousOn hL hDifferential p).comp_continuous |
| 66 | (continuous_id.prodMk continuous_const) (fun _ ↦ ⟨mem_univ _, hτ, hmax⟩) |
| 67 | exact (reducedLength_time_derivative_measurable hL hDifferential hτ hmax).neg.add |
| 68 | ((measurable_const.sub hu.measurable).div_const τ) |
| 69 | |
| 70 | end PoincareMT.ReducedVolume |