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.Curvature.Estimates.ScalarTrace |
| 2 | import PoincareLib.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapseFiniteHarnackDomain |
| 4 | import PoincareLib.Analysis.Parabolic.Maximum.CompactSlab |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.Scalar.Regularity |
| 6 | |
| 7 | local notation:max D ".laplacian_nonneg_of_isLocalMin" => |
| 8 | PoincareMT.LeviCivitaData.laplacian_nonneg_of_isLocalMinAt D |
| 9 | /-! |
| 10 | # Low scalar points on a compact limit carrier |
| 11 | |
| 12 | The actual scalar equation preserves a lower bound forward on each |
| 13 | included compact slab. Normalization at the terminal basepoint therefore |
| 14 | bounds every earlier attained minimum by one. Source: MT Proposition 17.1; |
| 15 | reviewed finite-horizon extension, compact branch of F3. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M47 |
| 26 | |
| 27 | /-- The scalar lower bound is preserved through the included right |
| 28 | endpoint by its actual within-interval evolution equation. -/ |
| 29 | theorem limitNoncollapse_compact_scalar_lower_preserved |
| 30 | {M : Type u} [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] [T2Space M] |
| 32 | (h04 : RicciFlowCurvatureTheory.{u}) {J : Set ℝ} (F : RicciFlow 3 M J) |
| 33 | (hcompact : IsCompact (univ : Set M)) {a b c : ℝ} (hab : a < b) |
| 34 | (hJ : Icc a b ⊆ J) (hinit : ∀ x, c ≤ (F.connection a).scalarCurvature x) : |
| 35 | ∀ t ∈ Icc a b, ∀ x, c ≤ (F.connection t).scalarCurvature x := by |
| 36 | let f := fun t x => (F.connection t).scalarCurvature x - c |
| 37 | let v := fun t x => (F.connection t).laplacian (F.connection t).scalarCurvature x + |
| 38 | 2 * (F.connection t).ricciNormSq x |
| 39 | have hf : ContinuousOn (Function.uncurry f) (Icc a b ×ˢ (univ : Set M)) := |
| 40 | ((h04.scalar_regular 3 M J F).continuousOn.mono |
| 41 | (prod_mono hJ Subset.rfl)).sub continuousOn_const |
| 42 | have hderiv : ∀ t ∈ Icc a b, ∀ x ∈ (univ : Set M), |
| 43 | HasDerivWithinAt (fun s => f s x) (v t x) (Icc a b) t := by |
| 44 | intro t ht x _hx |
| 45 | exact ((h04.scalar_evolution 3 M J F t (hJ ht) x).mono hJ).sub_const c |
| 46 | have hmin : ∀ t ∈ Ioc a b, ∀ x ∈ (univ : Set M), |
| 47 | (∀ y ∈ (univ : Set M), f t x ≤ f t y) → f t x < 0 → |
| 48 | -(0 : ℝ) * f t x ≤ v t x := by |
| 49 | intro t _ht x _hx hmin _hneg |
| 50 | have hlocal : IsLocalMin (F.connection t).scalarCurvature x := |
| 51 | Eventually.of_forall (fun y => (sub_le_sub_iff_right c).mp (hmin y (mem_univ y))) |
| 52 | have hlap := (F.connection t).laplacian_nonneg_of_isLocalMin |
| 53 | (h04.tensor_calculus 3 M (F.metric t) (F.connection t)).contMDiff_scalarCurvature.contMDiffAt |
| 54 | hlocal |
| 55 | have hric : 0 ≤ (F.connection t).ricciNormSq x := |
| 56 | Finset.sum_nonneg (fun _ _ => Finset.sum_nonneg (fun _ _ => sq_nonneg _)) |
| 57 | dsimp only [v] |
| 58 | nlinarith |
| 59 | have hresult := M04.compact_subset_min_velocity_nonnegative_Icc hcompact hab f v hf |
| 60 | hderiv hmin (fun x _hx => sub_nonneg.mpr (hinit x)) |
| 61 | intro t ht x |
| 62 | exact sub_nonneg.mp (hresult t ht x (mem_univ x)) |
| 63 | |
| 64 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 65 | TopologicalSpace L.carrier.carrier := L.carrier.topologicalSpace |
| 66 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 67 | ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.carrier.carrier := L.carrier.chartedSpace |
| 68 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 69 | IsManifold (𝓡 3) ∞ L.carrier.carrier := L.carrier.isManifold |
| 70 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 71 | T2Space L.carrier.carrier := L.carrier.t2Space |
| 72 | |
| 73 | /-- Compactness produces an actual low point at every included time. |
| 74 | Only the normalization at the original terminal basepoint is used. -/ |
| 75 | theorem limitNoncollapse_compact_exists_low_point |
| 76 | (h04 : RicciFlowCurvatureTheory.{u}) {H : ℝ≥0∞} |
| 77 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) |
| 78 | (hcompact : IsCompact (univ : Set L.carrier.carrier)) |
| 79 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) : |
| 80 | ∃ y : L.carrier.carrier, (L.flow.connection t).scalarCurvature y ≤ 1 := by |
| 81 | by_cases ht0 : t = 0 |
| 82 | · subst t |
| 83 | exact ⟨L.base, L.scalar_normalized.le⟩ |
| 84 | have htneg : t < 0 := lt_of_le_of_ne ht.1 ht0 |
| 85 | have hcont := (h04.tensor_calculus 3 L.carrier.carrier |
| 86 | (L.flow.metric t) (L.flow.connection t)).contMDiff_scalarCurvature.continuous |
| 87 | obtain ⟨y, _hy, hmin⟩ := hcompact.exists_isMinOn ⟨L.base, mem_univ _⟩ hcont.continuousOn |
| 88 | have hJ : Icc t 0 ⊆ blowupBackwardInterval H := L.flow.interval.out ht L.zero_mem |
| 89 | have hbound := limitNoncollapse_compact_scalar_lower_preserved h04 L.flow hcompact |
| 90 | htneg hJ (fun x => hmin (mem_univ x)) 0 ⟨ht.1, le_rfl⟩ L.base |
| 91 | exact ⟨y, hbound.trans_eq L.scalar_normalized⟩ |
| 92 | |
| 93 | end PoincareMT.M47 |