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.Construction.ExponentialSliceInverse |
| 2 | |
| 3 | /-! |
| 4 | # Openness of the full actual stable carrier |
| 5 | |
| 6 | Morgan-Tian Definition 6.25 and Proposition 6.28, pp. 116-117. |
| 7 | The given unique-minimizer neighborhood is retained. The actual |
| 8 | slice inverse theorem gives an open smaller source with invertible |
| 9 | differential throughout, so every point in that source remains stable. |
| 10 | No existence of a stable vector is inferred from survival. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped 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 full frozen stable predicate is open in the initial vector: |
| 27 | invertibility persists on the local inverse source and the prescribed |
| 28 | unique-minimizer neighborhood is retained, Proposition 6.28, p. 117. -/ |
| 29 | theorem isOpen_stableInitialVectors (E : M14ExponentialFamily G T x) (hτ : 0 ≤ τ) : |
| 30 | IsOpen {Z | M14StableInitialVector G T τ x E Z} := by |
| 31 | rw [isOpen_iff_mem_nhds] |
| 32 | intro Z hZ |
| 33 | obtain ⟨hZD, hbij, U, hU, hZU, hmin⟩ := hZ |
| 34 | let q₀ : (G.slices (T - τ)).Point := |
| 35 | ⟨E.gamma Z (Real.sqrt τ), by simpa only [Real.sq_sqrt hτ] using E.clock Z _ hZD⟩ |
| 36 | let S := U ∩ {W | (W, Real.sqrt τ) ∈ E.domain} |
| 37 | have hS : IsOpen S := hU.inter (exponentialFamily_domain_slice_isOpen E (Real.sqrt τ)) |
| 38 | have hSD : ∀ W ∈ S, (W, Real.sqrt τ) ∈ E.domain := fun _ hW => hW.2 |
| 39 | obtain ⟨e, hZe, heS, _, _, hbij_e⟩ := |
| 40 | exists_exponentialSlice_local_inverse E hτ q₀ hS hSD ⟨hZU, hZD⟩ hbij |
| 41 | apply mem_of_superset (e.open_source.mem_nhds hZe) |
| 42 | intro W hW |
| 43 | obtain ⟨hWD, hbijW⟩ := hbij_e W hW |
| 44 | exact ⟨hWD, hbijW, U, hU, (heS hW).1, hmin⟩ |
| 45 | |
| 46 | /-- Each stable vector has the actual uniquely minimizing branch |
| 47 | required by its defining neighborhood, Definition 6.25, p. 116. -/ |
| 48 | theorem stableInitialVector_unique_branch (E : M14ExponentialFamily G T x) |
| 49 | {Z : G.Horizontal x} (hZ : M14StableInitialVector G T τ x E Z) : |
| 50 | M14UniqueMinimizingBranch G T τ x E Z := by |
| 51 | obtain ⟨_, _, U, _, hZU, hmin⟩ := hZ |
| 52 | exact hmin Z hZU |
| 53 | |
| 54 | /-- A stable vector has an open neighborhood inside the full stable |
| 55 | carrier on which every actual branch uniquely minimizes, |
| 56 | Definition 6.25 and Proposition 6.28, pp. 116-117. -/ |
| 57 | theorem stableInitialVector_open_neighborhood (E : M14ExponentialFamily G T x) |
| 58 | (hτ : 0 ≤ τ) {Z : G.Horizontal x} (hZ : M14StableInitialVector G T τ x E Z) : |
| 59 | ∃ U : Set (G.Horizontal x), IsOpen U ∧ Z ∈ U ∧ |
| 60 | U ⊆ {W | M14StableInitialVector G T τ x E W} ∧ |
| 61 | ∀ W ∈ U, M14UniqueMinimizingBranch G T τ x E W := by |
| 62 | have hstable := hZ |
| 63 | obtain ⟨_, _, U, hU, hZU, hmin⟩ := hZ |
| 64 | exact ⟨U ∩ {W | M14StableInitialVector G T τ x E W}, |
| 65 | hU.inter (isOpen_stableInitialVectors E hτ), ⟨hZU, hstable⟩, |
| 66 | inter_subset_right, fun W hW => hmin W hW.1⟩ |
| 67 | |
| 68 | end PoincareMT.M14 |