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.Curvature.Integral.ConnectedComponent.Equivalence |
| 2 | import PoincareLib.Geometry.Curvature.Integral.Reduction.Connected |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.Similarity |
| 4 | /-! # Scalar bounds transported between actual connected components -/ |
| 5 | |
| 6 | open Set MeasureTheory PoincareMT |
| 7 | open scoped Manifold ContDiff Bundle |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | theorem PoincareMT.RiemannianMetric.component_scalar_bound_of_diffeomorph |
| 12 | {n : ℕ} {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] |
| 13 | [T3Space M] [T3Space N] [MeasurableSpace M] [BorelSpace M] |
| 14 | [MeasurableSpace N] [BorelSpace N] |
| 15 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 16 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) N] |
| 17 | [IsManifold (𝓡 n) ∞ M] [IsManifold (𝓡 n) ∞ N] |
| 18 | (g : PoincareMT.RiemannianMetric n M) (h : PoincareMT.RiemannianMetric n N) |
| 19 | (e : M ≃ₘ⟮𝓡 n, 𝓡 n⟯ N) |
| 20 | (hm : ∀ (x : M) (v w : TangentSpace (𝓡 n) x), |
| 21 | g.inner x v w = h.inner (e x) (mfderiv (𝓡 n) (𝓡 n) e x v) |
| 22 | (mfderiv (𝓡 n) (𝓡 n) e x w)) |
| 23 | (K : M → ℝ) (hKc : Continuous K) (hK : ∀ x, 0≤K x) |
| 24 | (hsec : ∀ x (v w : TangentSpace (𝓡 n) x), |
| 25 | -K x ≤ g.leviCivitaData.sectionalCurvature x v w) {C L : ℝ} |
| 26 | (hbound : ∀ p : N, |
| 27 | let hC := h.connectedComponentMetric p |
| 28 | ∀ E : Poincare.connectedComponentOpens (EuclideanSpace ℝ (Fin n)) p → ℝ, |
| 29 | Continuous E → (∀ x, 0≤E x) → |
| 30 | (∀ x (v w : TangentSpace (𝓡 n) x), |
| 31 | -E x ≤ hC.leviCivitaData.sectionalCurvature x v w) → |
| 32 | (∫ x, max 0 (hC.leviCivitaData.scalarCurvature x) ∂hC.volumeMeasure) ≤ |
| 33 | C*(L+∫ x, E x ∂hC.volumeMeasure)) (p : M) : |
| 34 | (∫ x, max 0 ((g.connectedComponentMetric p).leviCivitaData.scalarCurvature x) |
| 35 | ∂(g.connectedComponentMetric p).volumeMeasure) ≤ |
| 36 | C*(L+∫ x, K x ∂(g.connectedComponentMetric p).volumeMeasure) := by |
| 37 | let E := Poincare.connectedComponentDiffeomorph e p |
| 38 | let gC := g.connectedComponentMetric p |
| 39 | let hC := h.connectedComponentMetric (e p) |
| 40 | let Kc : Poincare.connectedComponentOpens (EuclideanSpace ℝ (Fin n)) p → ℝ := |
| 41 | fun x => K x |
| 42 | have hgeom := g.connectedComponentMetric_geometry_diffeomorph h e hm p |
| 43 | have hsecs (x : Poincare.connectedComponentOpens (EuclideanSpace ℝ (Fin n)) p) |
| 44 | (v w : TangentSpace (𝓡 n) x) : |
| 45 | -Kc x ≤ gC.leviCivitaData.sectionalCurvature x v w := by |
| 46 | rw [RiemannianMetric.sectionalCurvature_connectedComponentMetric g g.leviCivitaData] |
| 47 | exact hsec x _ _ |
| 48 | have hsect := gC.leviCivitaData.sectionalCurvature_lower_bound_of_metric_similarity |
| 49 | hC.leviCivitaData E (a := 1) (by norm_num) |
| 50 | (fun x v w => by simpa only [one_mul] using (hgeom.1 x v w).symm) hsecs |
| 51 | have hb := hbound (e p) (Kc ∘ E.symm) |
| 52 | ((hKc.comp continuous_subtype_val).comp E.symm.contMDiff.continuous) |
| 53 | (fun x => hK (E.symm x)) |
| 54 | (by simpa only [inv_one, one_mul, Function.comp_apply] using hsect) |
| 55 | rw [hgeom.2.2.2.2.2 (fun z => max 0 z), hgeom.2.2.2.2.1 Kc] |
| 56 | exact hb |
| 57 |