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.Slice.Label.Differential |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Slice.Charts |
| 3 | |
| 4 | /-! |
| 5 | # Supplied labels are diffeomorphic to the actual time slices |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open Set Function |
| 12 | open scoped Manifold ContDiff Topology |
| 13 | |
| 14 | open PoincareMT |
| 15 | |
| 16 | namespace Poincare.Spacetime.Realization |
| 17 | |
| 18 | variable {n : ℕ} {X : Type*} [TopologicalSpace X] |
| 19 | |
| 20 | theorem sliceLabelHomeomorph_box (A : AdaptedMetricAtlas n X) |
| 21 | (L : SpacetimeSliceLabeling A) (b : A.box_index) (t : ℝ) |
| 22 | (ht : t ∈ (A.box b).interval.domain) (x : (A.box b).spatial) : |
| 23 | sliceLabelHomeomorph (L.slice t) (L.boxMap b t ht x) = |
| 24 | sliceBoxMap (A.box b) t ht x := |
| 25 | Subtype.ext (L.boxMap_eq b t ht x) |
| 26 | |
| 27 | theorem sliceLabelHomeomorph_smooth (A : AdaptedMetricAtlas n X) |
| 28 | (L : SpacetimeSliceLabeling A) (t : ℝ) : |
| 29 | letI := adaptedSliceChartedSpace A t |
| 30 | ContMDiff (𝓡 n) (𝓡 n) ∞ (sliceLabelHomeomorph (L.slice t)) := by |
| 31 | let := adaptedSliceChartedSpace A t |
| 32 | intro p |
| 33 | obtain ⟨b, hp⟩ := labelBox_targets_cover A L t p |
| 34 | have hi := (labelBox_inverse_smooth A L b.val t b.property).contMDiffAt |
| 35 | ((labelBoxHomeomorph A L b.val t b.property).open_target.mem_nhds hp) |
| 36 | have hs := (adapted_sliceBox_localDiffeomorph A b.val t b.property).contMDiff |
| 37 | apply (hs.contMDiffAt.comp p hi).congr_of_eventuallyEq |
| 38 | filter_upwards [(labelBoxHomeomorph A L b.val t b.property).open_target.mem_nhds hp] |
| 39 | with q hq |
| 40 | change sliceLabelHomeomorph (L.slice t) q = |
| 41 | sliceBoxMap (A.box b.val) t b.property ((labelBoxHomeomorph A L b.val t b.property).symm q) |
| 42 | rw [← sliceLabelHomeomorph_box] |
| 43 | congr 1 |
| 44 | rw [← labelBoxHomeomorph_apply, |
| 45 | (labelBoxHomeomorph A L b.val t b.property).right_inv hq] |
| 46 | |
| 47 | theorem sliceLabelHomeomorph_inverse_smooth (A : AdaptedMetricAtlas n X) |
| 48 | (L : SpacetimeSliceLabeling A) (t : ℝ) : |
| 49 | letI := adaptedSliceChartedSpace A t |
| 50 | ContMDiff (𝓡 n) (𝓡 n) ∞ (sliceLabelHomeomorph (L.slice t)).symm := by |
| 51 | let := adaptedSliceChartedSpace A t |
| 52 | apply (cover_smooth_iff |
| 53 | (fun b : {b : A.box_index // t ∈ (A.box b).interval.domain} ↦ |
| 54 | sliceHomeomorph (A.box b.val) t b.property) (slice_targets_cover A t) |
| 55 | (slice_transition_smooth A t) _).mpr |
| 56 | intro b |
| 57 | have heq : (sliceLabelHomeomorph (L.slice t)).symm ∘ |
| 58 | sliceHomeomorph (A.box b.val) t b.property = L.boxMap b.val t b.property := |
| 59 | funext (labelBoxHomeomorph_apply A L b.val t b.property) |
| 60 | rw [heq] |
| 61 | exact (L.boxMap_smooth b.val t b.property).contMDiffOn |
| 62 | |
| 63 | noncomputable def sliceLabelDiffeomorph (A : AdaptedMetricAtlas n X) |
| 64 | (L : SpacetimeSliceLabeling A) (t : ℝ) : |
| 65 | letI := adaptedSliceChartedSpace A t |
| 66 | Diffeomorph (𝓡 n) (𝓡 n) (L.slice t).carrier (spacetimeSlice A.time t) ∞ := |
| 67 | letI := adaptedSliceChartedSpace A t |
| 68 | { |
| 69 | toEquiv := (sliceLabelHomeomorph (L.slice t)).toEquiv |
| 70 | contMDiff_toFun := sliceLabelHomeomorph_smooth A L t |
| 71 | contMDiff_invFun := sliceLabelHomeomorph_inverse_smooth A L t |
| 72 | } |
| 73 | |
| 74 | end Poincare.Spacetime.Realization |