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.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.GaugeLift |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Gauge.SliceMap |
| 3 | |
| 4 | /-! |
| 5 | # Smooth maps into the actual selected time slice |
| 6 | |
| 7 | Morgan-Tian Definition 6.25 and Proposition 6.28, pp. 116-117. |
| 8 | A smooth local cylinder inverse gives smooth spatial coordinates. |
| 9 | The clock is constant on the actual slice, and M12's actual gauge |
| 10 | slice map is smooth into its supplied atlas. This proves slice |
| 11 | smoothness from smoothness of the spacetime inclusion, also at |
| 12 | physical boundary times. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {E H M : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 27 | [TopologicalSpace H] {J : ModelWithCorners ℝ E H} |
| 28 | [TopologicalSpace M] [ChartedSpace H M] |
| 29 | {t : ℝ} {f : M → (G.slices t).Point} {S : Set M} {z : M} |
| 30 | |
| 31 | /-- A map into an actual selected time slice is smooth within a set |
| 32 | whenever its spacetime inclusion is. The local reconstruction uses |
| 33 | the supplied compatible cylinder, including physical boundary times, |
| 34 | Proposition 6.28, p. 117. -/ |
| 35 | theorem contMDiffWithinAt_slice_of_inclusion |
| 36 | (hf : ContMDiffWithinAt J (spacetimeModel n) ∞ (fun a => (f a).val) S z) : |
| 37 | ContMDiffWithinAt J (𝓡 n) ∞ f S z := by |
| 38 | obtain ⟨b, U, lift, hU, hzU, hlift, hrec, htime⟩ := exists_smooth_gauge_lift G (f z).val |
| 39 | have ht : t ∈ (G.gaugeCover.interval b).domain := by |
| 40 | have h := (lift (f z).val).1.property |
| 41 | rwa [(htime _ hzU).trans (f z).property] at h |
| 42 | let t₀ : (G.timeIntervals.interval (G.gaugeCover.interval b)).Point := ⟨t, ht⟩ |
| 43 | let g := movingGaugeSliceMap (G.gaugeCover.cylinder b).toMovingSpacetimeGauge G.slices t₀ |
| 44 | have hg : ContMDiff (𝓡 n) (𝓡 n) ∞ g := |
| 45 | (movingGaugeSliceMap_localDiffeomorph (G.gaugeCover.cylinder b).toMovingSpacetimeGauge |
| 46 | G.slices (G.gaugeCover.metric b).toMovingSpacetimeGaugeGeometry t₀).contMDiff |
| 47 | have heq (a : M) (ha : (f a).val ∈ U) : g (lift (f a).val).2 = f a := by |
| 48 | apply Subtype.ext |
| 49 | change (G.gaugeCover.cylinder b).toSpacetime (t₀, (lift (f a).val).2) = (f a).val |
| 50 | have hclock : t₀ = (lift (f a).val).1 := |
| 51 | Subtype.ext ((htime _ ha).trans (f a).property).symm |
| 52 | rw [hclock] |
| 53 | exact hrec _ ha |
| 54 | have hc := ((hlift _ hzU).contMDiffAt (hU.mem_nhds hzU)).comp_contMDiffWithinAt z hf |
| 55 | have hcomp := hg.contMDiffAt.comp_contMDiffWithinAt z hc.snd |
| 56 | apply hcomp.congr_of_eventuallyEq _ (heq z hzU).symm |
| 57 | filter_upwards [hf.continuousWithinAt (hU.mem_nhds hzU)] with a ha |
| 58 | exact (heq a ha).symm |
| 59 | |
| 60 | /-- Ordinary smoothness into the actual slice follows from ordinary |
| 61 | smoothness of its spacetime inclusion, the fixed-time regularity |
| 62 | needed in Proposition 6.28, p. 117. -/ |
| 63 | theorem contMDiffAt_slice_of_inclusion |
| 64 | (hf : ContMDiffAt J (spacetimeModel n) ∞ (fun a => (f a).val) z) : |
| 65 | ContMDiffAt J (𝓡 n) ∞ f z := |
| 66 | (contMDiffWithinAt_slice_of_inclusion (S := univ) hf.contMDiffWithinAt).contMDiffAt univ_mem |
| 67 | |
| 68 | end PoincareMT.M14 |