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.Geometry |
| 2 | import PoincareLib.Geometry.Spacetime.Cylinder.Basic |
| 3 | |
| 4 | /-! |
| 5 | # The prescribed boxes are compatible smooth cylinders |
| 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 | noncomputable def adaptedBoxCylinder (A : AdaptedMetricAtlas n X) (b : A.box_index) : |
| 20 | CompatibleSpacetimeCylinder (adaptedSpacetime A) |
| 21 | (intervalSystem.interval (A.box b).interval) (A.box b).spatial where |
| 22 | interval_subset := (A.box b).interval_subset |
| 23 | toSpacetime := (A.box b).toSpacetime |
| 24 | embedding := (A.box b).openEmbedding.isEmbedding |
| 25 | time_eq := (A.box b).time_toSpacetime |
| 26 | worldline_smooth := by |
| 27 | intro x |
| 28 | let := intervalChartedSpace (A.box b).interval |
| 29 | let := adaptedChartedSpace A |
| 30 | exact (adapted_box_localDiffeomorph A b).contMDiff.comp |
| 31 | (contMDiff_id.prodMk contMDiff_const) |
| 32 | worldline_derivative := by |
| 33 | intro t x |
| 34 | let := intervalChartedSpace (A.box b).interval |
| 35 | let := adaptedChartedSpace A |
| 36 | have h := mfderiv_comp_apply t |
| 37 | (((adapted_box_localDiffeomorph A b).contMDiff (t, x)).mdifferentiableAt (by simp)) |
| 38 | ((contMDiff_id.prodMk contMDiff_const : ContMDiff (𝓡∂ 1) (spacetimeModel n) ∞ |
| 39 | (fun s : (smoothInterval (A.box b).interval).Point ↦ (s, x))) t |>.mdifferentiableAt |
| 40 | (by simp)) ((smoothInterval (A.box b).interval).positiveTangent t) |
| 41 | simp only [id_eq] at h |
| 42 | rw [mfderiv_prod_left] at h |
| 43 | exact h.trans (adaptedTimeVector_box A b (t, x)).symm |
| 44 | smooth := by |
| 45 | let := intervalChartedSpace (A.box b).interval |
| 46 | let := adaptedChartedSpace A |
| 47 | exact (adapted_box_localDiffeomorph A b).contMDiff |
| 48 | differential_injective := by |
| 49 | let := intervalChartedSpace (A.box b).interval |
| 50 | let := adaptedChartedSpace A |
| 51 | exact fun p ↦ (boxTangentEquiv A b p).injective |
| 52 | |
| 53 | end Poincare.Spacetime.Realization |