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.Box.Cylinder |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Cylinder.Metric |
| 3 | |
| 4 | /-! |
| 5 | # The compatible box cylinder retains its prescribed metric coefficients |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open scoped Manifold ContDiff Bundle Topology |
| 12 | |
| 13 | open PoincareMT |
| 14 | |
| 15 | namespace Poincare.Spacetime.Realization |
| 16 | |
| 17 | variable {n : ℕ} {X : Type*} [TopologicalSpace X] [T2Space X] [SecondCountableTopology X] |
| 18 | |
| 19 | theorem adaptedBox_spatialEquiv (A : AdaptedMetricAtlas n X) (b : A.box_index) |
| 20 | (t : (smoothInterval (A.box b).interval).Point) (x : (A.box b).spatial) |
| 21 | (v : EuclideanSpace ℝ (Fin n)) : |
| 22 | cylinderSpatialEquiv (adaptedBoxCylinder A b) t x v = |
| 23 | boxHorizontalEquiv A b ((A.box b).toSpacetime (t, x)) |
| 24 | ((boxHomeomorph (A.box b)).map_source (Set.mem_univ (t, x))) v := by |
| 25 | apply Subtype.ext |
| 26 | rw [cylinderSpatialEquiv_apply, boxHorizontalEquiv_apply, boxHomeomorph_left_inv] |
| 27 | rfl |
| 28 | |
| 29 | theorem adaptedBox_metric_eq (A : AdaptedMetricAtlas n X) (b : A.box_index) |
| 30 | (t : (smoothInterval (A.box b).interval).Point) (x : (A.box b).spatial) |
| 31 | (v w : EuclideanSpace ℝ (Fin n)) : |
| 32 | ((pulledCylinderMetric (adaptedBoxCylinder A b)).metric t.val).inner x v w = |
| 33 | (A.box b).metric (t.val, x) v w := by |
| 34 | change cylinderMetricForm (adaptedBoxCylinder A b) |
| 35 | (cylinderMetricTime (A.box b).interval t.val) x v w = _ |
| 36 | rw [cylinderMetricTime_of_mem] |
| 37 | change adaptedHorizontalMetric A ((A.box b).toSpacetime (t, x)) |
| 38 | (cylinderSpatialEquiv (adaptedBoxCylinder A b) t x v) |
| 39 | (cylinderSpatialEquiv (adaptedBoxCylinder A b) t x w) = _ |
| 40 | rw [adaptedBox_spatialEquiv, adaptedBox_spatialEquiv] |
| 41 | rw [adaptedHorizontalMetric_box A b ((A.box b).toSpacetime (t, x)) |
| 42 | ((boxHomeomorph (A.box b)).map_source (Set.mem_univ (t, x)))] |
| 43 | rw [horizontalBoxMetric_apply, ContinuousLinearEquiv.symm_apply_apply, |
| 44 | ContinuousLinearEquiv.symm_apply_apply, boxHomeomorph_left_inv] |
| 45 | |
| 46 | end Poincare.Spacetime.Realization |