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.Extinction.Width.Class.SphereArea |
| 2 | import PoincareLib.Geometry.RicciFlow.Basic |
| 3 | import Mathlib.Topology.Order.Compact |
| 4 | |
| 5 | /-! |
| 6 | # Attainment of the scalar minimum |
| 7 | |
| 8 | The scalar-minimum specialization in Morgan-Tian Claim 18.12, printed |
| 9 | pp. 426-427, follows from compactness, nonemptiness, and scalar continuity. |
| 10 | The flow-slice adapter takes the actual M04 regularity conclusion. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | /-- Continuous scalar curvature attains its infimum on a compact nonempty |
| 25 | carrier. Source: MT Claim 18.12, printed pp. 426-427. -/ |
| 26 | theorem m60ScalarMinimum_isLeast [Nonempty M] {g : RiemannianMetric n M} |
| 27 | (D : LeviCivitaData g) (hcompact : IsCompact (Set.univ : Set M)) |
| 28 | (hscalar : Continuous D.scalarCurvature) : |
| 29 | IsLeast (Set.range D.scalarCurvature) (m60ScalarMinimum D) := by |
| 30 | have hrange : IsCompact (Set.range D.scalarCurvature) := by |
| 31 | simpa only [Set.image_univ] using hcompact.image hscalar |
| 32 | exact hrange.isLeast_sInf (Set.range_nonempty _) |
| 33 | |
| 34 | set_option backward.isDefEq.respectTransparency false in |
| 35 | set_option maxHeartbeats 1600000 in |
| 36 | -- Elaborating the joint flow scalar field unfolds the curvature contractions. |
| 37 | /-- M04 joint regularity gives the scalar minimum on every included flow |
| 38 | slice. The sphere map supplies nonemptiness. Source: MT Claim 18.12, pp. 426-427. -/ |
| 39 | theorem m60ScalarMinimum_isLeast_of_flow {J : Set ℝ} (F : RicciFlow n M J) |
| 40 | (hcompact : IsCompact (Set.univ : Set M)) (f : UnitTwoSphere → M) |
| 41 | (hscalar : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓡 n)) (𝓘(ℝ, ℝ)) ∞ |
| 42 | (fun p : ℝ × M => (F.connection p.1).scalarCurvature p.2) (J ×ˢ Set.univ)) |
| 43 | {t : ℝ} (ht : t ∈ J) : |
| 44 | IsLeast (Set.range (F.connection t).scalarCurvature) |
| 45 | (m60ScalarMinimum (F.connection t)) := by |
| 46 | let : Nonempty M := ⟨f m60SpherePole⟩ |
| 47 | apply m60ScalarMinimum_isLeast (F.connection t) hcompact |
| 48 | have hslice : Continuous (fun x : M => (t, x)) := |
| 49 | continuous_const.prodMk continuous_id |
| 50 | have hcontinuous : ContinuousOn |
| 51 | (fun p : ℝ × M => (F.connection p.1).scalarCurvature p.2) (J ×ˢ Set.univ) := |
| 52 | ContMDiffOn.continuousOn (I := (𝓘(ℝ, ℝ)).prod (𝓡 n)) (I' := 𝓘(ℝ, ℝ)) hscalar |
| 53 | exact hcontinuous.comp_continuous hslice (fun _ => ⟨ht, Set.mem_univ _⟩) |
| 54 | |
| 55 | end PoincareMT |