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.Soliton.ThreeDimensional.Noncompact.Rigidity.Levels.TotalCurvature |
| 2 | import PoincareLib.Geometry.Riemannian.Heat.Energy.VolumeSupport |
| 3 | import PoincareLib.Geometry.Riemannian.Surface.Regularity |
| 4 | |
| 5 | /-! |
| 6 | # The compact-surface area obstruction |
| 7 | |
| 8 | Gauss--Bonnet fixes total scalar curvature under a change of metric. A metric |
| 9 | with scalar curvature everywhere below one therefore has strictly larger |
| 10 | area than a metric with scalar curvature identically one on the same surface. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | namespace PoincareMT.LeviCivitaData |
| 21 | |
| 22 | variable {N : Type*} [TopologicalSpace N] [MeasurableSpace N] [BorelSpace N] |
| 23 | [T3Space N] [ChartedSpace (EuclideanSpace ℝ (Fin 2)) N] |
| 24 | [IsManifold (𝓡 2) ∞ N] [CompactSpace N] [Nonempty N] |
| 25 | {g h : RiemannianMetric 2 N} |
| 26 | |
| 27 | /-- Subunit scalar curvature forces strictly more area than a unit-scalar |
| 28 | reference metric on the same compact surface. -/ |
| 29 | theorem volume_lt_of_unit_scalar_and_subunit_scalar |
| 30 | (D : LeviCivitaData g) (D' : LeviCivitaData h) |
| 31 | (hunit : ∀ x, D.scalarCurvature x = 1) |
| 32 | (hsubunit : ∀ x, D'.scalarCurvature x < 1) : |
| 33 | g.volumeMeasure.real univ < h.volumeMeasure.real univ := by |
| 34 | let : h.volumeMeasure.IsOpenPosMeasure := h.volumeMeasure_isOpenPosMeasure |
| 35 | have hc : Continuous (fun x => 1 - D'.scalarCurvature x) := |
| 36 | continuous_const.sub D'.continuous_scalarCurvature |
| 37 | have hi := hc.integrable_of_hasCompactSupport |
| 38 | (μ := h.volumeMeasure) (HasCompactSupport.of_compactSpace _) |
| 39 | have hiR := D'.continuous_scalarCurvature.integrable_of_hasCompactSupport |
| 40 | (μ := h.volumeMeasure) (HasCompactSupport.of_compactSpace _) |
| 41 | have hpos := integral_pos_of_integrable_nonneg_nonzero hc hi |
| 42 | (fun x => (sub_pos.mpr (hsubunit x)).le) |
| 43 | (ne_of_gt (sub_pos.mpr (hsubunit (Classical.arbitrary N)))) |
| 44 | rw [integral_sub (integrable_const (1 : ℝ)) hiR] at hpos |
| 45 | have heq := D.integral_scalarCurvature_eq_of_compact_surface D' |
| 46 | simp only [hunit, integral_const, smul_eq_mul, mul_one] at heq hpos |
| 47 | linarith |
| 48 | |
| 49 | end PoincareMT.LeviCivitaData |