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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.SectionalBarrierDiffusion |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.SectionalPlanes |
| 4 | import PoincareLib.Geometry.RicciFlow.Positivity.Sectional.NullReaction |
| 5 | |
| 6 | /-! |
| 7 | # The actual sectional time velocity at a barrier contact |
| 8 | |
| 9 | Morgan-Tian Lemma 12.6, p. 297. The localized diffusion and the actual |
| 10 | three-dimensional curvature reaction combine with the metric Gram |
| 11 | variation. This retains the scalar Laplacian of the distance support. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT.M35.Uniqueness |
| 21 | |
| 22 | open M04 |
| 23 | |
| 24 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 25 | |
| 26 | theorem sectional_velocity_lower_bound_at_barrier_contact |
| 27 | {J : Set ℝ} (F : RicciFlow 3 V J) {t : ℝ} (ht : t ∈ J) {x : V} |
| 28 | {p : V × V} (hp : p ∈ modelOrthonormalPairs 3) {f : V → ℝ} |
| 29 | (hf : ContDiffAt ℝ ∞ f x) |
| 30 | (hpos : ∀ᶠ y in 𝓝 x, ∀ a b : V, |
| 31 | 0 ≤ (F.connection t).curvatureTensor y a b a b + f y * metricGram (F.metric t) y a b) |
| 32 | (hnull : (F.connection t).curvatureTensor x p.1 p.2 p.1 p.2 + |
| 33 | f x * metricGram (F.metric t) x p.1 p.2 = 0) : |
| 34 | ∃ v : ℝ, HasDerivWithinAt (fun s => (F.connection s).sectionalCurvature x p.1 p.2) v J t ∧ |
| 35 | -(F.connection t).laplacian f x + |
| 36 | (F.connection t).sectionalCurvature x p.1 p.2 * |
| 37 | ((F.connection t).scalarCurvature x - |
| 38 | 2 * (F.connection t).sectionalCurvature x p.1 p.2) ≤ v := by |
| 39 | let D := F.connection t |
| 40 | let g := F.metric t |
| 41 | let R := D.curvatureTensor x p.1 p.2 p.1 p.2 |
| 42 | let H := metricGram g x p.1 p.2 |
| 43 | let m := D.sectionalCurvature x p.1 p.2 |
| 44 | let L := D.tensorLaplacian D.riemannEvaluation x ![p.1, p.2, p.1, p.2] |
| 45 | let Q := D.curvatureReaction x p.1 p.2 p.1 p.2 |
| 46 | let Vg := -2 * D.ricci x p.1 p.1 * g.inner x p.2 p.2 - |
| 47 | 2 * g.inner x p.1 p.1 * D.ricci x p.2 p.2 + |
| 48 | 4 * D.ricci x p.1 p.2 * g.inner x p.1 p.2 |
| 49 | let v := (L + Q) / H - R * Vg / H ^ 2 |
| 50 | have hH : 0 < H := metricGram_pos_of_modelPair g x hp |
| 51 | have hR : R = m * H := (div_mul_cancel₀ R hH.ne').symm |
| 52 | have hfm : f x = -m := by |
| 53 | apply (mul_right_inj' hH.ne').mp |
| 54 | change R + f x * H = 0 at hnull |
| 55 | rw [hR] at hnull |
| 56 | nlinarith only [hnull] |
| 57 | refine ⟨v, hasDerivWithinAt_sectionalRayleigh F t ht x p.1 p.2 hH, ?_⟩ |
| 58 | have hlap : 0 ≤ L + D.laplacian f x * H := |
| 59 | curvature_diffusion_with_local_scalar_barrier D hf hpos p.1 p.2 hnull |
| 60 | have hshift : ∀ a b : V, |
| 61 | 0 ≤ D.curvatureTensor x a b a b + (-m) * metricGram g x a b := by |
| 62 | intro a b |
| 63 | simpa only [hfm] using hpos.self_of_nhds a b |
| 64 | have hreact : m * (D.scalarCurvature x - 2 * m) * H ≤ Q - m * Vg := by |
| 65 | have h := curvatureReaction_lower_bound_of_shiftedSectional_null D x (-m) hshift |
| 66 | p.1 p.2 (by rw [← hfm]; exact hnull) |
| 67 | change -(-m) * (D.scalarCurvature x + 2 * (-m)) * H ≤ Q + (-m) * Vg at h |
| 68 | convert! h using 1 <;> ring |
| 69 | have hvelocity : v * H = L + Q - m * Vg := by |
| 70 | dsimp only [v] |
| 71 | rw [hR] |
| 72 | field_simp [hH.ne'] |
| 73 | apply (mul_le_mul_iff_left₀ hH).mp |
| 74 | change (-D.laplacian f x + m * (D.scalarCurvature x - 2 * m)) * H ≤ v * H |
| 75 | nlinarith only [hlap, hreact, hvelocity] |
| 76 | |
| 77 | end PoincareMT.M35.Uniqueness |