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.Exponential |
| 2 | import Mathlib.Topology.Constructions.SumProd |
| 3 | |
| 4 | /-! |
| 5 | # Stable slice neighborhoods inside a prescribed parameter neighborhood |
| 6 | |
| 7 | The actual fixed-slice inverse puts every nearby slice endpoint in the |
| 8 | image of a small set of stable vectors. This uses no future joint |
| 9 | stability. Morgan-Tian Proposition 6.28, p. 117, in the local argument |
| 10 | of Proposition 6.56, p. 133. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T τ : ℝ} {x : G.Point} |
| 25 | |
| 26 | /-- The fixed stable slice captures every sufficiently close slice |
| 27 | endpoint with parameters in a prescribed joint neighborhood, |
| 28 | Propositions 6.28 and 6.56, pp. 117, 133. -/ |
| 29 | theorem exists_stable_slice_neighborhood (E : M14ExponentialFamily G T x) |
| 30 | (H : M14StableSet G T τ x E) {Z : G.Horizontal x} (hZ : Z ∈ H.carrier) |
| 31 | {P : Set (G.Horizontal x × ℝ)} (hP : IsOpen P) (hzP : (Z, Real.sqrt τ) ∈ P) : |
| 32 | ∃ U : Set G.Point, IsOpen U ∧ H.endpoint_map Z ∈ U ∧ |
| 33 | ∃ J : Set ℝ, IsOpen J ∧ Real.sqrt τ ∈ J ∧ |
| 34 | ∀ q ∈ U, G.spacetime.timeFunction q = T - τ → |
| 35 | ∀ s ∈ J, ∃ W ∈ H.carrier, (W, s) ∈ P ∧ H.endpoint_map W = q := by |
| 36 | obtain ⟨A, J, hA, hZA, hJ, hsJ, hAJ⟩ := mem_nhds_prod_iff'.mp (hP.mem_nhds hzP) |
| 37 | obtain ⟨U0, V0, inv, hU0, _, hZU0, _, hU0carrier, _, _, hopen, _⟩ := |
| 38 | H.local_inverse Z hZ |
| 39 | have himage : IsOpen (H.endpoint_slice_map '' (A ∩ U0)) := |
| 40 | hopen _ (hA.inter hU0) inter_subset_right |
| 41 | obtain ⟨U, hU, hUeq⟩ := isOpen_induced_iff.mp himage |
| 42 | have hcenter : H.endpoint_slice_map Z ∈ H.endpoint_slice_map '' (A ∩ U0) := |
| 43 | ⟨Z, ⟨hZA, hZU0⟩, rfl⟩ |
| 44 | rw [← hUeq] at hcenter |
| 45 | have hZU : H.endpoint_map Z ∈ U := by |
| 46 | simpa only [mem_preimage, H.endpoint_slice_map_val Z hZ] using hcenter |
| 47 | refine ⟨U, hU, hZU, J, hJ, hsJ, ?_⟩ |
| 48 | intro q hq htime s hs |
| 49 | let qs : (G.slices (T - τ)).Point := ⟨q, htime⟩ |
| 50 | have hqs : qs ∈ H.endpoint_slice_map '' (A ∩ U0) := by |
| 51 | rw [← hUeq] |
| 52 | exact hq |
| 53 | obtain ⟨W, hW, hWeq⟩ := hqs |
| 54 | have hWcarrier := hU0carrier hW.2 |
| 55 | refine ⟨W, hWcarrier, hAJ ⟨hW.1, hs⟩, ?_⟩ |
| 56 | exact (H.endpoint_slice_map_val W hWcarrier).symm.trans |
| 57 | (congrArg Subtype.val hWeq) |
| 58 | |
| 59 | end PoincareMT.M14 |