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.Surgery.StandardCap.Existence.Noncollapsing.OrdinaryProductCurvature |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Scalar.Within |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.ConnectionScalar |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.FixedExtension |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureAlgebra |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RiemannRegularity |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.TensorDerivativeClosure |
| 10 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Evolution.Scalar.SpatialCoefficients |
| 11 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.Riemannian.Curvature.IntrinsicCalculus |
| 12 | |
| 13 | /-! |
| 14 | # The actual scalar differential on the ordinary product |
| 15 | |
| 16 | Scalar transport first gives a smooth scalar function on the retained |
| 17 | spacetime. Its chain rule through each actual spatial slice then transports |
| 18 | the differential, including included physical-time endpoints. |
| 19 | Source: Morgan-Tian Proposition 12.13, pp. 304-306; section 6 of |
| 20 | `proof-work/tasks/M34/derivations/ordinary-square-survival.md`. |
| 21 | -/ |
| 22 | |
| 23 | set_option autoImplicit false |
| 24 | |
| 25 | open Set |
| 26 | open scoped Manifold ContDiff Bundle Topology |
| 27 | |
| 28 | universe u |
| 29 | |
| 30 | namespace PoincareMT.M34 |
| 31 | |
| 32 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 33 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 34 | {I : SpacetimeInterval} {F : RicciFlow n M I.domain} |
| 35 | |
| 36 | /-- The transported scalar is genuinely smooth on the retained |
| 37 | spacetime, including its time boundary (Proposition 12.13). -/ |
| 38 | theorem ordinaryProduct_scalar_smooth (R : OrdinaryProductRicciGeometry F.metric I) : |
| 39 | ContMDiff (spacetimeModel n) (𝓘(ℝ, ℝ)) ∞ |
| 40 | (fun z : R.product.spacetime.Point => horizontalScalarCurvature R.leafwiseConnection z) := by |
| 41 | have ht : ContMDiff (spacetimeModel n) (𝓘(ℝ, ℝ)) ∞ |
| 42 | R.product.spacetime.timeFunction := R.product.spacetime.time_smooth |
| 43 | have hc := F.contMDiffOn_scalarCurvature.comp_contMDiff |
| 44 | (ht.prodMk (ordinaryProductProjection_contMDiff R.product)) |
| 45 | (fun z => ⟨z.1.property, mem_univ _⟩) |
| 46 | apply hc.congr |
| 47 | intro z |
| 48 | have heq := ordinaryProduct_scalar_eq R F.connection z.1 z.2 |
| 49 | rw [R.product.productCylinder_eq] at heq |
| 50 | change horizontalScalarCurvature R.leafwiseConnection z = |
| 51 | (F.connection z.1.val).scalarCurvature (ordinaryProductProjection R.product z) |
| 52 | rw [ordinaryProductProjection_eq] |
| 53 | exact heq.symm |
| 54 | |
| 55 | set_option backward.isDefEq.respectTransparency false in |
| 56 | /-- The actual horizontal scalar differential agrees with the ordinary |
| 57 | slice differential under the retained spatial tangent equivalence |
| 58 | (Proposition 12.13, pp. 304-306). -/ |
| 59 | theorem ordinaryProduct_scalarDifferential |
| 60 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 61 | (t : (R.product.timeIntervals.interval I).Point) (x : M) (v : TangentSpace (𝓡 n) x) : |
| 62 | mvfderiv (spacetimeModel n) |
| 63 | (fun z : R.product.spacetime.Point => horizontalScalarCurvature R.leafwiseConnection z) |
| 64 | (R.product.productCylinder.toSpacetime (t, x)) |
| 65 | (R.product.productMetric.spatialTangentEquiv t x v).val = |
| 66 | mvfderiv (𝓡 n) ((F.connection t.val).scalarCurvature) x v := by |
| 67 | have heq : (fun z : R.product.spacetime.Point => |
| 68 | horizontalScalarCurvature R.leafwiseConnection z) ∘ |
| 69 | (fun y : M => R.product.productCylinder.toSpacetime (t, y)) = |
| 70 | (F.connection t.val).scalarCurvature := |
| 71 | funext (fun y => (ordinaryProduct_scalar_eq R F.connection t y).symm) |
| 72 | have hs := R.product.productCylinder.smooth.comp |
| 73 | ((contMDiff_const (c := t)).prodMk contMDiff_id) |
| 74 | change ContMDiff (𝓡 n) (spacetimeModel n) ∞ |
| 75 | (fun y : M => R.product.productCylinder.toSpacetime (t, y)) at hs |
| 76 | have hd := mvfderiv_comp x |
| 77 | ((ordinaryProduct_scalar_smooth R).mdifferentiableAt (by simp)) |
| 78 | (hs.mdifferentiableAt (by simp)) |
| 79 | rw [heq] at hd |
| 80 | have hv := congrArg (fun L : TangentSpace (𝓡 n) x →L[ℝ] ℝ => L v) hd |
| 81 | change mvfderiv (𝓡 n) ((F.connection t.val).scalarCurvature) x v = |
| 82 | mvfderiv (spacetimeModel n) |
| 83 | (fun z : R.product.spacetime.Point => horizontalScalarCurvature R.leafwiseConnection z) |
| 84 | (R.product.productCylinder.toSpacetime (t, x)) |
| 85 | (mfderiv (𝓡 n) (spacetimeModel n) |
| 86 | (fun y : M => R.product.productCylinder.toSpacetime (t, y)) x v) at hv |
| 87 | rw [← R.product.productMetric.spatialTangentEquiv_eq] at hv |
| 88 | exact hv.symm |
| 89 | |
| 90 | end PoincareMT.M34 |