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.Distance.FiniteCalabi |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Distance.Cutoff |
| 3 | |
| 4 | /-! # Finite-distance cutoff supports |
| 5 | |
| 6 | A nonincreasing flat radial profile turns the finite-distance Calabi upper |
| 7 | support into a smooth lower support with the cutoff heat inequality. |
| 8 | -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | set_option maxHeartbeats 800000 |
| 14 | |
| 15 | open Set Filter Bundle |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow |
| 21 | |
| 22 | variable {m : ℕ} {M : Type u} [TopologicalSpace M] [T3Space M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] |
| 24 | [IsManifold (𝓡 (m + 1)) ∞ M] {J : Set ℝ} |
| 25 | |
| 26 | /-- A flat radial cutoff admits a lower support at each positive finite |
| 27 | distance from its center, without a connectedness assumption. -/ |
| 28 | theorem exists_distance_cutoff_lower_support_of_flat_finite |
| 29 | (F : RicciFlow (m + 1) M J) |
| 30 | {t r Λ scale δ d₀ A B C : ℝ} (ht : t ∈ interior J) (hm : 0 < m) |
| 31 | (hcomplete : MetricComplete (F.metric t)) |
| 32 | (hRic : ∀ y : M, ∀ v : TangentSpace (𝓡 (m + 1)) y, |
| 33 | 0 ≤ (F.connection t).ricci y v v) |
| 34 | (hΛ : 0 ≤ Λ) (hscale : 0 < scale) (p x : M) |
| 35 | (hx : x ∈ (F.metric t).ball p r) (hpx : p ≠ x) |
| 36 | (hfinite : (F.metric t).edist p x ≠ ⊤) |
| 37 | (hupper : ∀ y ∈ (F.metric t).ball p r, ∀ v : TangentSpace (𝓡 (m + 1)) y, |
| 38 | (F.connection t).ricci y v v ≤ Λ * (F.metric t).inner y v v) |
| 39 | {χ : ℝ → ℝ} (hχ : ContDiff ℝ ∞ χ) (hanti : Antitone χ) (hδ : 0 < δ) |
| 40 | (hflat : ∀ z, z ≤ 1 → χ z = 1) (hd₀ : 0 ≤ d₀) |
| 41 | (hA : ∀ z, deriv χ z ^ 2 ≤ A * χ z) |
| 42 | (hB : ∀ z, -B ≤ deriv (deriv χ) z) (hC : ∀ z, -C ≤ deriv χ z) |
| 43 | (hpos : 0 < χ ((((F.metric t).edist p x).toReal - d₀) / δ)) : |
| 44 | ∃ (U : Set M) (φ : ℝ → M → ℝ), IsOpen U ∧ x ∈ U ∧ |
| 45 | ContMDiffOn (𝓡 (m + 1)) 𝓘(ℝ, ℝ) ∞ (φ t) U ∧ |
| 46 | φ t x = χ ((((F.metric t).edist p x).toReal - d₀) / δ) ∧ |
| 47 | (∀ s : ℝ, ∀ y ∈ U, φ s y ≤ χ ((((F.metric s).edist p y).toReal - d₀) / δ)) ∧ |
| 48 | DifferentiableAt ℝ (fun s => φ s x) t ∧ |
| 49 | deriv (fun s => φ s x) t - (F.connection t).laplacian (φ t) x + |
| 50 | 2 * (F.metric t).inner x ((F.connection t).gradient (φ t) x) |
| 51 | ((F.connection t).gradient (φ t) x) / φ t x ≤ |
| 52 | C * (4 * ((m + 1 : ℕ) : ℝ) * scale + 8 * Λ / scale) / δ + |
| 53 | (B + 2 * A + 2 * (m : ℝ) * C) / δ ^ 2 := by |
| 54 | obtain ⟨U, ρ, hU, hxU, hρ, heq, hle, hg, hl, htime, htbound⟩ := |
| 55 | F.exists_distance_spacetime_upper_support_of_finite ht hm hcomplete hRic hΛ hscale |
| 56 | p x hx hpx hupper |
| 57 | have hd : 0 < ((F.metric t).edist p x).toReal := by |
| 58 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 1)) : M → Type _) := |
| 59 | ⟨(F.metric t).toRiemannianMetric⟩ |
| 60 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 (m + 1)) M |
| 61 | exact ENNReal.toReal_pos (edist_pos.mpr hpx).ne' hfinite |
| 62 | let φ : ℝ → M → ℝ := fun s y => χ ((ρ s y - d₀) / δ) |
| 63 | have hφtime : DifferentiableAt ℝ (fun s => φ s x) t := |
| 64 | (hχ.differentiable (by simp) _).comp t ((htime.sub_const d₀).div_const δ) |
| 65 | refine ⟨U, φ, hU, hxU, |
| 66 | hχ.contMDiff.comp_contMDiffOn ((hρ.sub contMDiffOn_const).div_const δ), |
| 67 | by simp only [φ, heq], ?_, hφtime, ?_⟩ |
| 68 | · intro s y hy |
| 69 | exact hanti (div_le_div_of_nonneg_right (sub_le_sub_right (hle s y hy) d₀) hδ.le) |
| 70 | · exact (F.connection t).cutoff_heat_le_of_flat_upper_support hU hxU hρ htime |
| 71 | hχ hanti hflat hδ hd₀ (by positivity) hA hB hC |
| 72 | (by simpa only [heq] using hd) hg (by simpa only [heq] using hl) htbound |
| 73 | (by simpa only [heq] using hpos) |
| 74 | |
| 75 | end PoincareMT.RicciFlow |