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.Generalized.ReducedGeometry.SourceNames.ReducedLength |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Hessian.HorizontalHessianTrace |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.RicciContractions |
| 4 | |
| 5 | /-! |
| 6 | # The scalar trace in actual horizontal orthonormal coordinates |
| 7 | |
| 8 | The selected slice tangent equivalence is an isometry. Transporting |
| 9 | an actual horizontal orthonormal basis therefore computes the same |
| 10 | Ricci trace as the selected slice connection. Morgan-Tian |
| 11 | Proposition 6.81, equation (6.19), p. 145. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- Slice tangent fibers use the specified metric renorming on their actual model. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle BigOperators |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | |
| 27 | /-- An actual horizontal orthonormal basis computes horizontal scalar |
| 28 | curvature by the Ricci trace, Proposition 6.81, equation (6.19), p. 145. -/ |
| 29 | theorem horizontalRicci_orthonormal_trace (hM04 : RicciFlowCurvatureTheory.{u}) |
| 30 | (q : G.Point) (b : Module.Basis (Fin n) ℝ (G.Horizontal q)) |
| 31 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner q (b i) (b j) = |
| 32 | if i = j then 1 else 0) : |
| 33 | (∑ i, horizontalRicci G.leafwise q (b i) (b i)) = |
| 34 | horizontalScalarCurvature G.leafwise q := by |
| 35 | let S := G.slices (G.spacetime.timeFunction q) |
| 36 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) S.Point := S.chartedSpace |
| 37 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : S.Point → Type _) := |
| 38 | ⟨S.metricOnPoints.toRiemannianMetric⟩ |
| 39 | let qs := spacetimeSlicePoint G.slices q |
| 40 | let j := S.tangentEquiv qs |
| 41 | let bs := b.map j.symm.toLinearEquiv |
| 42 | have hbs : Orthonormal ℝ bs := by |
| 43 | apply orthonormal_iff_ite.mpr |
| 44 | intro i k |
| 45 | change S.metricOnPoints.inner qs (bs i) (bs k) = _ |
| 46 | rw [S.metric_eq] |
| 47 | simpa only [bs, j, S, qs, spacetimeSlicePoint, Module.Basis.map_apply, |
| 48 | ContinuousLinearEquiv.coe_toLinearEquiv, |
| 49 | ContinuousLinearEquiv.apply_symm_apply] using hb i k |
| 50 | have h := Proofs.M09.ricci_orthonormal_trace hM04 |
| 51 | (G.leafwise.sliceConnection (G.spacetime.timeFunction q)) qs (bs.toOrthonormalBasis hbs) |
| 52 | simpa only [Module.Basis.coe_toOrthonormalBasis, bs, j, S, qs, spacetimeSlicePoint, |
| 53 | Module.Basis.map_apply, ContinuousLinearEquiv.coe_toLinearEquiv, |
| 54 | horizontalRicci, horizontalScalarCurvature] using h |
| 55 | |
| 56 | end PoincareMT.M14 |