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.Spacetime.Realization.Horizontal.MetricSmooth |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Bundle.PositiveFormBounded |
| 3 | import PoincareLib.Geometry.Spacetime.Realization.Horizontal.Projection |
| 4 | |
| 5 | /-! |
| 6 | # Actual spacetime geometry on the supplied carrier |
| 7 | -/ |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Bundle |
| 13 | open scoped Manifold ContDiff Bundle Topology |
| 14 | |
| 15 | open PoincareMT |
| 16 | |
| 17 | namespace Poincare.Spacetime.Realization |
| 18 | |
| 19 | variable {n : ℕ} {X : Type*} [TopologicalSpace X] |
| 20 | |
| 21 | noncomputable def adaptedRiemannianMetric (A : AdaptedMetricAtlas n X) : |
| 22 | letI := adaptedChartedSpace A |
| 23 | letI := adaptedHorizontalTopology A |
| 24 | letI := adaptedHorizontalFiberBundle A |
| 25 | letI := adaptedHorizontalVectorBundle A |
| 26 | ContMDiffRiemannianMetric (spacetimeModel n) ∞ (EuclideanSpace ℝ (Fin n)) |
| 27 | (fun p ↦ adaptedHorizontal A p) := |
| 28 | letI := adaptedChartedSpace A |
| 29 | letI := adaptedHorizontalTopology A |
| 30 | letI := adaptedHorizontalFiberBundle A |
| 31 | letI := adaptedHorizontalVectorBundle A |
| 32 | { |
| 33 | inner := adaptedHorizontalMetric A |
| 34 | symm := adaptedHorizontalMetric_symm A |
| 35 | pos := adaptedHorizontalMetric_pos A |
| 36 | isVonNBounded := fun p ↦ positiveForm_isVonNBounded (adaptedHorizontalMetric A p) |
| 37 | (adaptedHorizontalMetric_pos A p) |
| 38 | contMDiff := adaptedHorizontalMetric_smooth A |
| 39 | } |
| 40 | |
| 41 | noncomputable def adaptedSpacetime [T2Space X] [SecondCountableTopology X] |
| 42 | (A : AdaptedMetricAtlas n X) : GeneralizedFlowSpacetime n X A.time A.interval where |
| 43 | chartedSpace := adaptedChartedSpace A |
| 44 | isManifold := adapted_isManifold A |
| 45 | t2Space := inferInstance |
| 46 | t3Space := adapted_t3Space A |
| 47 | secondCountable := inferInstance |
| 48 | time_smooth := adapted_time_smooth A |
| 49 | time_range := A.time_range |
| 50 | boundary_eq := adapted_boundary_eq A |
| 51 | timeVector := adaptedTimeVector A |
| 52 | timeVector_smooth := adaptedTimeVector_smooth A |
| 53 | timeVector_normalized := adaptedTimeVector_normalized A |
| 54 | horizontalTopology := adaptedHorizontalTopology A |
| 55 | horizontalFiberBundle := adaptedHorizontalFiberBundle A |
| 56 | horizontalVectorBundle := adaptedHorizontalVectorBundle A |
| 57 | horizontalSmoothBundle := adaptedHorizontalSmoothBundle A |
| 58 | horizontal_inclusion_smooth := horizontalInclusion_smooth A |
| 59 | horizontalProjection := adaptedHorizontalProjection A |
| 60 | horizontalProjection_eq := adaptedHorizontalProjection_eq A |
| 61 | horizontalProjection_identity := adaptedHorizontalProjection_identity A |
| 62 | tangent_decomposition := adapted_tangent_decomposition A |
| 63 | horizontalProjection_smooth := adaptedHorizontalProjection_smooth A |
| 64 | metric := adaptedRiemannianMetric A |
| 65 | |
| 66 | end Poincare.Spacetime.Realization |