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.UniformSpace.UniformApproximation |
| 3 | |
| 4 | /-! |
| 5 | # Joint continuity at the initial time |
| 6 | |
| 7 | A family converging uniformly to continuous initial data has a joint limit as |
| 8 | the time approaches zero from above and the spatial point varies. Joint |
| 9 | continuity at positive times therefore extends to the closed time half-line. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace Poincare.Parabolic |
| 18 | |
| 19 | variable {M E : Type*} [TopologicalSpace M] [UniformSpace E] |
| 20 | |
| 21 | /-- Uniform convergence to continuous initial data gives a joint limit from |
| 22 | positive times, without any continuity assumption on the approximating family. -/ |
| 23 | theorem tendsto_joint_initial_of_tendstoUniformly |
| 24 | {F : ℝ × M → E} {f : M → E} {x : M} |
| 25 | (hlim : TendstoUniformly (fun t y ↦ F (t, y)) f (𝓝[>] (0 : ℝ))) |
| 26 | (hf : ContinuousAt f x) : |
| 27 | Tendsto F ((𝓝[>] (0 : ℝ)) ×ˢ 𝓝 x) (𝓝 (f x)) := by |
| 28 | have hprod : TendstoUniformly (fun p : ℝ × M ↦ fun y ↦ F (p.1, y)) f |
| 29 | ((𝓝[>] (0 : ℝ)) ×ˢ 𝓝 x) := by |
| 30 | intro u hu |
| 31 | exact tendsto_fst.eventually (hlim u hu) |
| 32 | exact hprod.tendsto_comp hf tendsto_snd |
| 33 | |
| 34 | /-- Positive-time joint continuity extends to the initial time when the family |
| 35 | converges uniformly to its continuous value there. -/ |
| 36 | theorem continuousOn_nonneg_of_tendstoUniformly |
| 37 | {F : ℝ × M → E} {f : M → E} |
| 38 | (hF : ContinuousOn F (Ioi 0 ×ˢ univ)) |
| 39 | (hf : Continuous f) |
| 40 | (hlim : TendstoUniformly (fun t y ↦ F (t, y)) f (𝓝[>] (0 : ℝ))) |
| 41 | (hzero : ∀ x, F (0, x) = f x) : |
| 42 | ContinuousOn F (Ici 0 ×ˢ univ) := by |
| 43 | rintro ⟨t, x⟩ ht |
| 44 | rcases eq_or_lt_of_le (mem_Ici.mp ht.1) with ht | ht |
| 45 | · change 0 = t at ht |
| 46 | subst t |
| 47 | change Tendsto F (𝓝[Ici 0 ×ˢ univ] (0, x)) (𝓝 (F (0, x))) |
| 48 | rw [hzero, nhdsWithin_prod_eq, nhdsWithin_univ, ← Ioi_insert, |
| 49 | nhdsWithin_insert, sup_prod, tendsto_sup] |
| 50 | constructor |
| 51 | · rw [pure_prod, tendsto_map'_iff] |
| 52 | simpa only [Function.comp_def, hzero] using hf.tendsto x |
| 53 | · exact tendsto_joint_initial_of_tendstoUniformly hlim hf.continuousAt |
| 54 | · exact (hF.continuousAt ((isOpen_Ioi.prod isOpen_univ).mem_nhds |
| 55 | ⟨ht, mem_univ x⟩)).continuousWithinAt |
| 56 | |
| 57 | /-- Replacing the value at time zero by the continuous uniform limit gives a |
| 58 | jointly continuous extension to all nonnegative times. -/ |
| 59 | theorem continuousOn_initialExtension_of_tendstoUniformly |
| 60 | {F : ℝ × M → E} {f : M → E} |
| 61 | (hF : ContinuousOn F (Ioi 0 ×ˢ univ)) |
| 62 | (hf : Continuous f) |
| 63 | (hlim : TendstoUniformly (fun t y ↦ F (t, y)) f (𝓝[>] (0 : ℝ))) : |
| 64 | ContinuousOn (fun p : ℝ × M ↦ if p.1 = 0 then f p.2 else F p) |
| 65 | (Ici 0 ×ˢ univ) := by |
| 66 | apply continuousOn_nonneg_of_tendstoUniformly (f := f) |
| 67 | · apply hF.congr |
| 68 | intro p hp |
| 69 | simp only [ne_of_gt (mem_Ioi.mp hp.1), if_false] |
| 70 | · exact hf |
| 71 | · intro u hu |
| 72 | filter_upwards [hlim u hu, self_mem_nhdsWithin] with t ht hpos |
| 73 | intro x |
| 74 | simpa only [ne_of_gt (mem_Ioi.mp hpos), if_false] using ht x |
| 75 | · intro x |
| 76 | simp |
| 77 | |
| 78 | end Poincare.Parabolic |