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 Mathlib.Topology.Instances.Real.Lemmas |
| 2 | import Mathlib.Topology.Constructions |
| 3 | |
| 4 | /-! |
| 5 | # Initial closed rectangles inside relative family neighborhoods |
| 6 | |
| 7 | The initial-time localization in Morgan-Tian Claim 6.20, p. 114. |
| 8 | A relative product neighborhood at the left endpoint contains an |
| 9 | open parameter neighborhood times a positive closed time prefix. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | /-- A relative family neighborhood at the left endpoint contains a |
| 20 | nondegenerate closed initial rectangle, as needed for the closed |
| 21 | mixed-derivative argument of Claim 6.20, p. 114. -/ |
| 22 | theorem exists_open_initial_family_neighborhood {E : Type*} [TopologicalSpace E] |
| 23 | {U : Set E} (hU : IsOpen U) {x : E} (hx : x ∈ U) |
| 24 | {a b : ℝ} (hab : a < b) {S : Set (E × ℝ)} |
| 25 | (hS : S ∈ 𝓝[U ×ˢ Icc a b] (x, a)) : |
| 26 | ∃ V : Set E, IsOpen V ∧ x ∈ V ∧ V ⊆ U ∧ |
| 27 | ∃ d : ℝ, a < d ∧ d ≤ b ∧ V ×ˢ Icc a d ⊆ S := by |
| 28 | rw [nhdsWithin_prod_eq, nhdsWithin_eq_nhds.mpr (hU.mem_nhds hx)] at hS |
| 29 | obtain ⟨A, hA, B, hB, hAB⟩ := mem_prod_iff.mp hS |
| 30 | obtain ⟨V, hVsub, hV, hxV⟩ := mem_nhds_iff.mp (inter_mem hA (hU.mem_nhds hx)) |
| 31 | obtain ⟨N, hN, haN, hNB⟩ := mem_nhdsWithin.mp hB |
| 32 | obtain ⟨l, u, ⟨hla, hau⟩, hln⟩ := |
| 33 | mem_nhds_iff_exists_Ioo_subset.mp (hN.mem_nhds haN) |
| 34 | obtain ⟨d, had, hd⟩ := exists_between (lt_min hab hau) |
| 35 | have hdb : d ≤ b := hd.le.trans (min_le_left _ _) |
| 36 | refine ⟨V, hV, hxV, fun _ hy => (hVsub hy).2, d, had, hdb, ?_⟩ |
| 37 | intro z hz |
| 38 | exact hAB ⟨(hVsub hz.1).1, hNB |
| 39 | ⟨hln ⟨hla.trans_le hz.2.1, hz.2.2.trans_lt (hd.trans_le (min_le_right _ _))⟩, |
| 40 | hz.2.1, hz.2.2.trans hdb⟩⟩ |
| 41 | |
| 42 | end PoincareMT.M14 |