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.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Spheres.SphereDisplacement |
| 3 | import Mathlib.Topology.UnitInterval |
| 4 | |
| 5 | /-! |
| 6 | # Compact ambient transport of the endpoint spheres |
| 7 | |
| 8 | Hirsch, Differential Topology, Chapter 8, Section 1, Theorem 1.3, p. 180. |
| 9 | The local finite-displacement construction is composed along one actual |
| 10 | finite subdivision of the time interval. The compact set here is only the |
| 11 | support of the ambient map; it is not the geometric confinement set for |
| 12 | the later intrinsic minimizing paths. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT.M28 |
| 21 | |
| 22 | local notation "E₃" => EuclideanSpace ℝ (Fin 3) |
| 23 | |
| 24 | /-- The explicit local displacement yields ambient transport between any |
| 25 | two sufficiently close times, with one fixed compact support (Hirsch |
| 26 | 8.1.3, p. 180). -/ |
| 27 | theorem exists_local_sphere_ambient_transport |
| 28 | {F : ℝ × UnitTwoSphere → E₃} |
| 29 | (hF : ContMDiff (𝓘(ℝ, ℝ).prod (𝓡 2)) 𝓘(ℝ, E₃) ∞ F) |
| 30 | (t₀ : ℝ) (U : Set E₃) |
| 31 | (hlocal : ∀ q : UnitTwoSphere, ∃ (V : Set E₃) (r : E₃ → UnitTwoSphere), |
| 32 | IsOpen V ∧ F (t₀, q) ∈ V ∧ V ⊆ U ∧ |
| 33 | ContMDiffOn 𝓘(ℝ, E₃) (𝓡 2) ∞ r V ∧ |
| 34 | ∀ z : UnitTwoSphere, F (t₀, z) ∈ V → r (F (t₀, z)) = z) : |
| 35 | ∃ (K : Set E₃) (J : Set ℝ), IsCompact K ∧ K ⊆ U ∧ IsOpen J ∧ t₀ ∈ J ∧ |
| 36 | ∀ s ∈ J, ∀ t ∈ J, ∃ e : E₃ ≃ₜ E₃, |
| 37 | ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ |
| 38 | (∀ q : UnitTwoSphere, e (F (s, q)) = F (t, q)) ∧ |
| 39 | ∀ x : E₃, x ∉ K → e x = x := by |
| 40 | obtain ⟨D, K, hD, hK, hKU, hsupport, hzero, hagree⟩ := |
| 41 | exists_compact_sphere_displacement hF t₀ U hlocal |
| 42 | have hnear := eventually_exists_smooth_homeomorph_of_compact_displacement |
| 43 | hD hK hsupport hzero |
| 44 | obtain ⟨J, hJ, hJo, ht₀⟩ := mem_nhds_iff.mp hnear |
| 45 | refine ⟨K, J, hK, hKU, hJo, ht₀, ?_⟩ |
| 46 | intro s hs t ht |
| 47 | obtain ⟨es, hes, hess, hesi, hesfix⟩ := hJ hs |
| 48 | obtain ⟨et, het, hets, heti, hetfix⟩ := hJ ht |
| 49 | have hesq (q : UnitTwoSphere) : es (F (t₀, q)) = F (s, q) := |
| 50 | (congrFun hes (F (t₀, q))).trans (hagree s q) |
| 51 | have hetq (q : UnitTwoSphere) : et (F (t₀, q)) = F (t, q) := |
| 52 | (congrFun het (F (t₀, q))).trans (hagree t q) |
| 53 | refine ⟨es.symm.trans et, hets.comp hesi, hess.comp heti, ?_, ?_⟩ |
| 54 | · intro q |
| 55 | change et (es.symm (F (s, q))) = F (t, q) |
| 56 | rw [← hesq q, es.symm_apply_apply, hetq] |
| 57 | · intro x hx |
| 58 | have hsi : es.symm x = x := by |
| 59 | calc |
| 60 | es.symm x = es.symm (es x) := congrArg es.symm (hesfix x hx).symm |
| 61 | _ = x := es.symm_apply_apply x |
| 62 | change et (es.symm x) = x |
| 63 | rw [hsi, hetfix x hx] |
| 64 | |
| 65 | /-- One finite time partition turns the actual local extensions into a |
| 66 | smooth ambient homeomorphism carrying the initial sphere to the terminal |
| 67 | sphere, supported in a compact subset of the prescribed open region |
| 68 | (Hirsch 8.1.3, p. 180). -/ |
| 69 | theorem exists_compact_sphere_ambient_transport |
| 70 | {F : ℝ × UnitTwoSphere → E₃} |
| 71 | (hF : ContMDiff (𝓘(ℝ, ℝ).prod (𝓡 2)) 𝓘(ℝ, E₃) ∞ F) |
| 72 | (U : Set E₃) |
| 73 | (hlocal : ∀ t ∈ Icc (0 : ℝ) 1, ∀ q : UnitTwoSphere, |
| 74 | ∃ (V : Set E₃) (r : E₃ → UnitTwoSphere), |
| 75 | IsOpen V ∧ F (t, q) ∈ V ∧ V ⊆ U ∧ |
| 76 | ContMDiffOn 𝓘(ℝ, E₃) (𝓡 2) ∞ r V ∧ |
| 77 | ∀ z : UnitTwoSphere, F (t, z) ∈ V → r (F (t, z)) = z) : |
| 78 | ∃ (K : Set E₃) (e : E₃ ≃ₜ E₃), |
| 79 | IsCompact K ∧ K ⊆ U ∧ ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ |
| 80 | (∀ q : UnitTwoSphere, e (F (0, q)) = F (1, q)) ∧ |
| 81 | ∀ x : E₃, x ∉ K → e x = x := by |
| 82 | classical |
| 83 | let T : Type := ↥(Icc (0 : ℝ) 1) |
| 84 | have hnear (t : T) := |
| 85 | exists_local_sphere_ambient_transport hF t.1 U (hlocal t.1 t.2) |
| 86 | choose K J hK hKU hJo hJt htransport using hnear |
| 87 | let cover : T → Set T := fun t => (Subtype.val : T → ℝ) ⁻¹' J t |
| 88 | have hcovero (t : T) : IsOpen (cover t) := |
| 89 | (hJo t).preimage continuous_subtype_val |
| 90 | have hcover : (univ : Set T) ⊆ ⋃ t : T, cover t := by |
| 91 | intro t _ |
| 92 | exact mem_iUnion.mpr ⟨t, hJt t⟩ |
| 93 | obtain ⟨τ, hτ₀, hτmono, ⟨n, hn⟩, hpart⟩ := |
| 94 | exists_monotone_Icc_subset_open_cover_unitInterval hcovero hcover |
| 95 | choose c hc using hpart |
| 96 | have hleft (i : ℕ) : (τ i : ℝ) ∈ J (c i) := |
| 97 | hc i (left_mem_Icc.mpr (hτmono (Nat.le_succ i))) |
| 98 | have hright (i : ℕ) : (τ (i + 1) : ℝ) ∈ J (c i) := |
| 99 | hc i (right_mem_Icc.mpr (hτmono (Nat.le_succ i))) |
| 100 | have hstep (i : ℕ) := |
| 101 | htransport (c i) (τ i) (hleft i) (τ (i + 1)) (hright i) |
| 102 | choose e hes hei heq hefix using hstep |
| 103 | let compose : ℕ → E₃ ≃ₜ E₃ := |
| 104 | Nat.rec (Homeomorph.refl E₃) (fun i previous => previous.trans (e i)) |
| 105 | have hsmooth (i : ℕ) : |
| 106 | ContDiff ℝ ∞ (compose i) ∧ ContDiff ℝ ∞ (compose i).symm := by |
| 107 | induction i with |
| 108 | | zero => exact ⟨contDiff_id, contDiff_id⟩ |
| 109 | | succ i hi => exact ⟨(hes i).comp hi.1, hi.2.comp (hei i)⟩ |
| 110 | have hpath (i : ℕ) (q : UnitTwoSphere) : |
| 111 | compose i (F (0, q)) = F ((τ i : ℝ), q) := by |
| 112 | induction i with |
| 113 | | zero => |
| 114 | change F (0, q) = F ((τ 0 : ℝ), q) |
| 115 | rw [hτ₀] |
| 116 | rfl |
| 117 | | succ i hi => |
| 118 | change e i (compose i (F (0, q))) = F ((τ (i + 1) : ℝ), q) |
| 119 | rw [hi, heq i q] |
| 120 | have hfix (i : ℕ) (x : E₃) (hx : ∀ j < i, x ∉ K (c j)) : compose i x = x := by |
| 121 | induction i with |
| 122 | | zero => rfl |
| 123 | | succ i hi => |
| 124 | change e i (compose i x) = x |
| 125 | rw [hi (fun j hj => hx j (Nat.lt_succ_of_lt hj)), hefix i x (hx i (Nat.lt_succ_self i))] |
| 126 | let Ksupport : Set E₃ := ⋃ i : Fin n, K (c i.1) |
| 127 | have hcompact : IsCompact Ksupport := isCompact_iUnion (fun i : Fin n => hK (c i.1)) |
| 128 | have hsubset : Ksupport ⊆ U := by |
| 129 | intro x hx |
| 130 | obtain ⟨i, hxi⟩ := mem_iUnion.mp hx |
| 131 | exact hKU (c i.1) hxi |
| 132 | refine ⟨Ksupport, compose n, hcompact, hsubset, (hsmooth n).1, (hsmooth n).2, ?_, ?_⟩ |
| 133 | · intro q |
| 134 | simpa only [hn n le_rfl, Set.Icc.coe_one] using hpath n q |
| 135 | · intro x hx |
| 136 | apply hfix n x |
| 137 | intro j hj hxj |
| 138 | exact hx (mem_iUnion.mpr ⟨⟨j, hj⟩, hxj⟩) |
| 139 | |
| 140 | end PoincareMT.M28 |