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.Topology |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Box.Transitions |
| 3 | |
| 4 | /-! |
| 5 | # Boundaryless charts on every actual time slice |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open Set |
| 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 slice_transition_smooth (A : AdaptedMetricAtlas n X) (t : ℝ) |
| 21 | (b c : {b : A.box_index // t ∈ (A.box b).interval.domain}) : |
| 22 | ContMDiffOn (𝓡 n) (𝓡 n) ∞ |
| 23 | ((sliceHomeomorph (A.box b.val) t b.property).trans |
| 24 | (sliceHomeomorph (A.box c.val) t c.property).symm) |
| 25 | ((sliceHomeomorph (A.box b.val) t b.property).trans |
| 26 | (sliceHomeomorph (A.box c.val) t c.property).symm).source := by |
| 27 | let := intervalChartedSpace (A.box b.val).interval |
| 28 | let := intervalChartedSpace (A.box c.val).interval |
| 29 | intro x hx |
| 30 | have htarget : (A.box b.val).toSpacetime (⟨t, b.property⟩, x) ∈ |
| 31 | (boxHomeomorph (A.box c.val)).target := by |
| 32 | have h := hx.2 |
| 33 | change sliceHomeomorph (A.box b.val) t b.property x ∈ |
| 34 | (sliceHomeomorph (A.box c.val) t c.property).target at h |
| 35 | rw [sliceHomeomorph_target] at h |
| 36 | exact h |
| 37 | have hfixed : ContMDiff (𝓡 n) (spacetimeModel n) ∞ |
| 38 | (fun y : (A.box b.val).spatial ↦ ((⟨t, b.property⟩ : (A.box b.val).interval.domain), y)) := |
| 39 | contMDiff_const.prodMk contMDiff_id |
| 40 | have htransition := (box_transition_smooth A b.val c.val).contMDiffAt |
| 41 | (((boxHomeomorph (A.box b.val)).trans (boxHomeomorph (A.box c.val)).symm).open_source.mem_nhds |
| 42 | ⟨mem_univ _, htarget⟩) |
| 43 | have hlocal := contMDiffAt_snd.comp x (htransition.comp x (hfixed x)) |
| 44 | apply ContMDiffAt.contMDiffWithinAt |
| 45 | apply hlocal.congr_of_eventuallyEq |
| 46 | filter_upwards [((sliceHomeomorph (A.box b.val) t b.property).trans |
| 47 | (sliceHomeomorph (A.box c.val) t c.property).symm).open_source.mem_nhds hx] with y hy |
| 48 | exact sliceHomeomorph_inverse (A.box c.val) t c.property |
| 49 | (sliceHomeomorph (A.box b.val) t b.property y) hy.2 |
| 50 | |
| 51 | noncomputable abbrev adaptedSliceChartedSpace (A : AdaptedMetricAtlas n X) (t : ℝ) : |
| 52 | ChartedSpace (EuclideanSpace ℝ (Fin n)) (spacetimeSlice A.time t) := |
| 53 | coverChartedSpace (H := EuclideanSpace ℝ (Fin n)) |
| 54 | (fun b : {b : A.box_index // t ∈ (A.box b).interval.domain} ↦ |
| 55 | sliceHomeomorph (A.box b.val) t b.property) (slice_targets_cover A t) |
| 56 | |
| 57 | theorem adaptedSlice_isManifold (A : AdaptedMetricAtlas n X) (t : ℝ) : |
| 58 | letI := adaptedSliceChartedSpace A t |
| 59 | IsManifold (𝓡 n) ∞ (spacetimeSlice A.time t) := |
| 60 | cover_isManifold |
| 61 | (fun b : {b : A.box_index // t ∈ (A.box b).interval.domain} ↦ |
| 62 | sliceHomeomorph (A.box b.val) t b.property) (slice_targets_cover A t) |
| 63 | (slice_transition_smooth A t) |
| 64 | |
| 65 | theorem adapted_sliceBox_localDiffeomorph (A : AdaptedMetricAtlas n X) |
| 66 | (b : A.box_index) (t : ℝ) (ht : t ∈ (A.box b).interval.domain) : |
| 67 | letI := adaptedSliceChartedSpace A t |
| 68 | IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (sliceBoxMap (A.box b) t ht) := |
| 69 | cover_localDiffeomorph |
| 70 | (fun b : {b : A.box_index // t ∈ (A.box b).interval.domain} ↦ |
| 71 | sliceHomeomorph (A.box b.val) t b.property) (slice_targets_cover A t) |
| 72 | (slice_transition_smooth A t) ⟨b, ht⟩ (sliceHomeomorph_source (A.box b) t ht) |
| 73 | |
| 74 | theorem slice_inclusion_smooth (A : AdaptedMetricAtlas n X) (t : ℝ) : |
| 75 | letI := adaptedChartedSpace A |
| 76 | letI := adaptedSliceChartedSpace A t |
| 77 | ContMDiff (𝓡 n) (spacetimeModel n) ∞ |
| 78 | (Subtype.val : spacetimeSlice A.time t → X) := by |
| 79 | let := adaptedChartedSpace A |
| 80 | let := adaptedSliceChartedSpace A t |
| 81 | apply (cover_smooth_iff |
| 82 | (fun b : {b : A.box_index // t ∈ (A.box b).interval.domain} ↦ |
| 83 | sliceHomeomorph (A.box b.val) t b.property) (slice_targets_cover A t) |
| 84 | (slice_transition_smooth A t) _).mpr |
| 85 | intro b |
| 86 | let := intervalChartedSpace (A.box b.val).interval |
| 87 | exact ((adapted_box_localDiffeomorph A b.val).contMDiff.comp |
| 88 | (contMDiff_const.prodMk contMDiff_id)).contMDiffOn |
| 89 | |
| 90 | end Poincare.Spacetime.Realization |