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.OrdinaryProduct.Atlas |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.OrdinaryProduct.Chart.Homeomorph |
| 3 | import PoincareLib.Geometry.Spacetime.Realization.Geometry |
| 4 | |
| 5 | /-! |
| 6 | # Identity diffeomorphism between product charts and the realized atlas |
| 7 | -/ |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set Function |
| 13 | open scoped Manifold ContDiff Topology |
| 14 | |
| 15 | open PoincareMT |
| 16 | |
| 17 | namespace Poincare.Spacetime.Realization |
| 18 | |
| 19 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | [T2Space M] [SecondCountableTopology M] [Nonempty M] |
| 22 | |
| 23 | theorem ordinaryProduct_forward_smooth (g : ℝ → RiemannianMetric n M) |
| 24 | (I : SpacetimeInterval) (hg : RiemannianMetric.IsSmoothFamilyOn g I.domain) : |
| 25 | ContMDiff (M := (smoothInterval I).Point × M) |
| 26 | (M' := (adaptedSpacetime (ordinaryAtlas g I hg)).Point) |
| 27 | (spacetimeModel n) (spacetimeModel n) ∞ |
| 28 | (fun p : (smoothInterval I).Point × M ↦ |
| 29 | (p : (adaptedSpacetime (ordinaryAtlas g I hg)).Point)) := by |
| 30 | intro p |
| 31 | let A := ordinaryAtlas g I hg |
| 32 | let := intervalChartedSpace I |
| 33 | let e := spatialChartHomeomorph (n := n) p.2 |
| 34 | have hp : p.2 ∈ e.target := by |
| 35 | rw [spatialChartHomeomorph_target] |
| 36 | exact mem_chart_source _ p.2 |
| 37 | have hi := (spatialChartHomeomorph_inverse_smooth p.2).contMDiffAt |
| 38 | (e.open_target.mem_nhds hp) |
| 39 | have hbox : ContMDiff (M := (smoothInterval I).Point × spatialChartDomain (n := n) p.2) |
| 40 | (M' := (adaptedSpacetime A).Point) (spacetimeModel n) (spacetimeModel n) ∞ |
| 41 | (fun q ↦ (ordinaryBox g I hg p.2).toSpacetime q) := by |
| 42 | let := intervalChartedSpace (A.box p.2).interval |
| 43 | let := adaptedChartedSpace A |
| 44 | exact (adapted_box_localDiffeomorph A p.2).contMDiff |
| 45 | have hlocal := hbox.contMDiffAt.comp p |
| 46 | (contMDiffAt_fst.prodMk (hi.comp p contMDiffAt_snd)) |
| 47 | apply hlocal.congr_of_eventuallyEq |
| 48 | filter_upwards [(e.open_target.preimage continuous_snd).mem_nhds hp] with q hq |
| 49 | apply Prod.ext |
| 50 | · rfl |
| 51 | · exact (e.right_inv hq).symm |
| 52 | |
| 53 | theorem ordinaryProduct_inverse_smooth (g : ℝ → RiemannianMetric n M) |
| 54 | (I : SpacetimeInterval) (hg : RiemannianMetric.IsSmoothFamilyOn g I.domain) : |
| 55 | ContMDiff (M := (adaptedSpacetime (ordinaryAtlas g I hg)).Point) |
| 56 | (M' := (smoothInterval I).Point × M) |
| 57 | (spacetimeModel n) (spacetimeModel n) ∞ |
| 58 | (fun p : (adaptedSpacetime (ordinaryAtlas g I hg)).Point ↦ |
| 59 | (p : (smoothInterval I).Point × M)) := by |
| 60 | let A := ordinaryAtlas g I hg |
| 61 | let := intervalChartedSpace I |
| 62 | apply (cover_smooth_iff (J := spacetimeModel n) (L := spacetimeModel n) |
| 63 | (N := (smoothInterval I).Point × M) (fun b ↦ boxHomeomorph (A.box b)) |
| 64 | (box_targets_cover A) (box_transition_smooth A) _).mpr |
| 65 | intro b |
| 66 | change M at b |
| 67 | change ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ |
| 68 | (fun q : (smoothInterval I).Point × spatialChartDomain (n := n) b ↦ |
| 69 | (q.1, spatialChartInverse b q.2)) univ |
| 70 | exact (contMDiff_fst.prodMk ((spatialChartInverse_smooth b).comp contMDiff_snd)).contMDiffOn |
| 71 | |
| 72 | noncomputable def ordinaryProductIdentification (g : ℝ → RiemannianMetric n M) |
| 73 | (I : SpacetimeInterval) (hg : RiemannianMetric.IsSmoothFamilyOn g I.domain) : |
| 74 | Diffeomorph (spacetimeModel n) (spacetimeModel n) ((smoothInterval I).Point × M) |
| 75 | (adaptedSpacetime (ordinaryAtlas g I hg)).Point ∞ where |
| 76 | toEquiv := Equiv.refl _ |
| 77 | contMDiff_toFun := ordinaryProduct_forward_smooth g I hg |
| 78 | contMDiff_invFun := ordinaryProduct_inverse_smooth g I hg |
| 79 | |
| 80 | end Poincare.Spacetime.Realization |