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.Geometry.Manifold.ContMDiff.Defs |
| 2 | import Mathlib.Topology.Instances.Real.Lemmas |
| 3 | |
| 4 | /-! |
| 5 | # Smoothness on overlapping closed family tubes |
| 6 | |
| 7 | Morgan-Tian Lemma 6.18, pp. 113-114. A single actual family |
| 8 | smooth on two overlapping closed time tubes is smooth on their |
| 9 | closed union, by within locality at every point. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Manifold Topology |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | variable {E F H M : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | [NormedAddCommGroup F] [NormedSpace ℝ F] [TopologicalSpace H] |
| 21 | (IM : ModelWithCorners ℝ F H) [TopologicalSpace M] [ChartedSpace H M] |
| 22 | |
| 23 | /-- Smoothness on overlapping closed time tubes gives smoothness |
| 24 | on the whole closed tube, including exterior endpoints, the family |
| 25 | continuation locality used in Lemma 6.18, pp. 113-114. -/ |
| 26 | theorem contMDiffOn_union_closed_tubes {k : WithTop ℕ∞} {U : Set E} {a l c d : ℝ} |
| 27 | (hlc : l < c) {f : E × ℝ → M} |
| 28 | (hleft : ContMDiffOn ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) IM k f (U ×ˢ Icc a c)) |
| 29 | (hright : ContMDiffOn ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) IM k f (U ×ˢ Icc l d)) : |
| 30 | ContMDiffOn ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) IM k f (U ×ˢ Icc a d) := by |
| 31 | intro z hz |
| 32 | by_cases hzc : z.2 < c |
| 33 | · apply (hleft z ⟨hz.1, hz.2.1, hzc.le⟩).mono_of_mem_nhdsWithin |
| 34 | have hnear : {w : E × ℝ | w.2 < c} ∈ 𝓝 z := |
| 35 | (isOpen_Iio.preimage continuous_snd).mem_nhds hzc |
| 36 | filter_upwards [mem_nhdsWithin_of_mem_nhds hnear, self_mem_nhdsWithin] with w hw hdom |
| 37 | exact ⟨hdom.1, hdom.2.1, hw.le⟩ |
| 38 | · have hlz : l < z.2 := hlc.trans_le (le_of_not_gt hzc) |
| 39 | apply (hright z ⟨hz.1, hlz.le, hz.2.2⟩).mono_of_mem_nhdsWithin |
| 40 | have hnear : {w : E × ℝ | l < w.2} ∈ 𝓝 z := |
| 41 | (isOpen_Ioi.preimage continuous_snd).mem_nhds hlz |
| 42 | filter_upwards [mem_nhdsWithin_of_mem_nhds hnear, self_mem_nhdsWithin] with w hw hdom |
| 43 | exact ⟨hdom.1, hw.le, hdom.2.2⟩ |
| 44 | |
| 45 | end PoincareMT.M14 |