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.Riemannian.Homothety.Calculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Pinching.Definitions |
| 3 | import Mathlib.Geometry.Manifold.LocalDiffeomorph |
| 4 | |
| 5 | /-! |
| 6 | # Negative curvature under an actual unit metric homothety |
| 7 | |
| 8 | The differential bijects orthonormal tangent pairs and preserves their |
| 9 | curvature values. Equality of these sets preserves their infima, hence |
| 10 | the negative part. No attainment or curvature-operator bound is needed. |
| 11 | Source: Morgan--Tian curvature conventions, pp. 5-7; the Chapter 4 |
| 12 | Hamilton--Ivey quantity is the existing least-sectional-value definition. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u v |
| 20 | |
| 21 | namespace PoincareMT.EpochExtension.SliceGeometry |
| 22 | |
| 23 | variable {M : Type u} {N : Type v} |
| 24 | [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 26 | [TopologicalSpace N] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) N] |
| 27 | [IsManifold (𝓡 3) ∞ N] [T3Space N] [MeasurableSpace N] [BorelSpace N] |
| 28 | {g : RiemannianMetric 3 M} {h : RiemannianMetric 3 N} |
| 29 | {f : Diffeomorph (𝓡 3) (𝓡 3) M N ∞} |
| 30 | |
| 31 | theorem leastSectionalCurvature_eq_one (H : MetricHomothetyCalculus g h f 1) |
| 32 | (hm : MetricHomothety g h f 1) (D : LeviCivitaData g) (D' : LeviCivitaData h) |
| 33 | (x : M) : D'.leastSectionalCurvature (f x) = D.leastSectionalCurvature x := by |
| 34 | let e := f.mfderivToContinuousLinearEquiv (by simp) x |
| 35 | have he_apply (u : TangentSpace (𝓡 3) x) : e u = mfderiv (𝓡 3) (𝓡 3) f x u := |
| 36 | congrArg (fun A => A u) (Diffeomorph.mfderivToContinuousLinearEquiv_coe f (by simp)) |
| 37 | have he (u v : TangentSpace (𝓡 3) x) : h.inner (f x) (e u) (e v) = g.inner x u v := by |
| 38 | simpa only [he_apply, one_mul] using hm x u v |
| 39 | have horth (u v : TangentSpace (𝓡 3) x) : |
| 40 | LeviCivitaData.IsOrthonormalPair h (f x) (e u) (e v) ↔ |
| 41 | LeviCivitaData.IsOrthonormalPair g x u v := by |
| 42 | simp only [LeviCivitaData.IsOrthonormalPair, he] |
| 43 | have hcurv (u v : TangentSpace (𝓡 3) x) : |
| 44 | D'.curvatureTensor (f x) (e u) (e v) (e u) (e v) = D.curvatureTensor x u v u v := by |
| 45 | simpa only [he_apply, one_mul] using |
| 46 | H.riemann_eq D D' x u v u v |
| 47 | unfold LeviCivitaData.leastSectionalCurvature |
| 48 | congr 1 |
| 49 | ext k |
| 50 | constructor |
| 51 | · rintro ⟨u, v, huv, hk⟩ |
| 52 | refine ⟨e.symm u, e.symm v, ?_, ?_⟩ |
| 53 | · exact (horth _ _).mp (by simpa only [e.apply_symm_apply] using huv) |
| 54 | · exact hk.trans (by simpa only [e.apply_symm_apply] using hcurv (e.symm u) (e.symm v)) |
| 55 | · rintro ⟨u, v, huv, hk⟩ |
| 56 | exact ⟨e u, e v, (horth u v).mpr huv, hk.trans (hcurv u v).symm⟩ |
| 57 | |
| 58 | theorem negativeCurvaturePart_eq_one (H : MetricHomothetyCalculus g h f 1) |
| 59 | (hm : MetricHomothety g h f 1) (D : LeviCivitaData g) (D' : LeviCivitaData h) |
| 60 | (x : M) : D'.negativeCurvaturePart (f x) = D.negativeCurvaturePart x := by |
| 61 | simp only [LeviCivitaData.negativeCurvaturePart, leastSectionalCurvature_eq_one H hm D D' x] |
| 62 | |
| 63 | end PoincareMT.EpochExtension.SliceGeometry |