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.Lipschitz.BarrierLipschitz |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.Continuity.Continuity |
| 3 | |
| 4 | /-! |
| 5 | # Local time Lipschitz estimates for the actual reduced length |
| 6 | |
| 7 | The uniform contact derivatives in M09 control differences at a fixed |
| 8 | spatial point, including at cut points. Continuity and the upper-support |
| 9 | comparison supply the estimate without differentiating reduced length there. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology NNReal |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedVolume |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | [ConnectedSpace M] [T3Space M] |
| 23 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p q : M} |
| 24 | |
| 25 | /-- Uniform touching time derivatives control reduced length on a convex time set. -/ |
| 26 | theorem reducedLength_time_lipschitzOnWith |
| 27 | (hL : LGeodesicTheory F T τmax) |
| 28 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 29 | {S : Set ℝ} (hS : Convex ℝ S) (hStime : S ⊆ Set.Ioo 0 τmax) |
| 30 | {C : ℝ≥0} |
| 31 | (hbarrier : ∀ s ∈ S, ∃ B : ReducedLengthUpperBarrier F T p q s, |
| 32 | |deriv (fun t ↦ B.representative (q, t)) s| ≤ C) : |
| 33 | LipschitzOnWith C (fun s ↦ reducedLength F T p q s) S := by |
| 34 | have hf : ContinuousOn (fun s ↦ reducedLength F T p q s) S := |
| 35 | (reducedLength_continuousOn hL hDifferential p).comp |
| 36 | (continuous_const.prodMk continuous_id).continuousOn |
| 37 | (fun _ hs ↦ ⟨Set.mem_univ _, hStime hs⟩) |
| 38 | apply lipschitzOnWith_of_upper_supports hS hf |
| 39 | intro s hs |
| 40 | obtain ⟨B, hB⟩ := hbarrier s hs |
| 41 | obtain ⟨d, hd⟩ := B.representative_time_derivative |
| 42 | have hdom : ∀ᶠ z : M × ℝ in 𝓝 (q, s), |
| 43 | reducedLength F T p z.1 z.2 ≤ B.representative z := |
| 44 | Filter.eventually_of_mem (B.neighborhood_open.mem_nhds B.center_mem) B.dominates |
| 45 | refine ⟨fun t ↦ B.representative (q, t), |
| 46 | ContinuousLinearMap.toSpanSingleton ℝ d, hd.hasFDerivAt, B.touches, |
| 47 | (continuous_const.prodMk continuous_id).continuousAt hdom, ?_⟩ |
| 48 | simpa only [ContinuousLinearMap.norm_toSpanSingleton, Real.norm_eq_abs, hd.deriv] using hB |
| 49 | |
| 50 | /-- One M09 neighborhood gives uniform time estimates at every fixed spatial point. -/ |
| 51 | theorem reducedLength_local_time_lipschitz |
| 52 | (hL : LGeodesicTheory F T τmax) |
| 53 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 54 | (z : M × ℝ) (hz : z ∈ Set.univ ×ˢ Set.Ioo 0 τmax) : |
| 55 | ∃ N : Set (M × ℝ), IsOpen N ∧ z ∈ N ∧ |
| 56 | N ⊆ Set.univ ×ˢ Set.Ioo 0 τmax ∧ ∃ C : ℝ≥0, |
| 57 | ∀ q : M, ∀ a b : ℝ, a ≤ b → |
| 58 | (∀ s ∈ Set.Icc a b, (q, s) ∈ N) → |
| 59 | |reducedLength F T p q b - reducedLength F T p q a| ≤ C * |b - a| := by |
| 60 | obtain ⟨N, hNopen, hzN, hNtime, C, hC, hbounds⟩ := |
| 61 | hDifferential.local_upper_barrier_bounds p z hz |
| 62 | refine ⟨N, hNopen, hzN, hNtime, ⟨C, hC⟩, ?_⟩ |
| 63 | intro q a b hab hsegment |
| 64 | have htime : Set.Icc a b ⊆ Set.Ioo 0 τmax := |
| 65 | fun s hs ↦ (hNtime (hsegment s hs)).2 |
| 66 | have hLip := reducedLength_time_lipschitzOnWith hL hDifferential |
| 67 | (p := p) (q := q) (convex_Icc a b) htime (C := ⟨C, hC⟩) (fun s hs ↦ ?_) |
| 68 | · simpa only [Real.dist_eq] using hLip.dist_le_mul b ⟨hab, le_rfl⟩ a ⟨le_rfl, hab⟩ |
| 69 | obtain ⟨B, hB, _⟩ := hbounds (q, s) (hsegment s hs) |
| 70 | exact ⟨B, hB⟩ |
| 71 | |
| 72 | end PoincareMT.ReducedVolume |