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.Analysis.Geometry.SpatialJetsWithin |
| 2 | |
| 3 | /-! |
| 4 | # Spatial jets with varying time domains |
| 5 | |
| 6 | Uniform convergence of within jets restricts to ordinary spatial jets |
| 7 | without identifying the source time domains with the target time domain. |
| 8 | This retains the included endpoints of the cylinders in Morgan--Tian |
| 9 | Definition 5.12, Proposition 5.14 and Theorem 11.8, pp. 90--91 and 272. |
| 10 | See M30 derivation `generalized-uniform-curvature.md`, Section 2. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped ContDiff Topology |
| 17 | |
| 18 | /-- Restrict uniformly convergent within jets on varying time products |
| 19 | to spatial jets on the same test set, including time endpoints |
| 20 | (Definition 5.12 and Proposition 5.14, pp. 90--91). -/ |
| 21 | theorem TendstoUniformlyOn.iteratedFDeriv_spatial_slice_varying_domain |
| 22 | {𝕜 T E F ι : Type*} [NontriviallyNormedField 𝕜] |
| 23 | [NormedAddCommGroup T] [NormedSpace 𝕜 T] |
| 24 | [NormedAddCommGroup E] [NormedSpace 𝕜 E] |
| 25 | [NormedAddCommGroup F] [NormedSpace 𝕜 F] |
| 26 | {l : Filter ι} {Jk : ι → Set T} {J : Set T} {U : Set E} |
| 27 | {K : Set (T × E)} {f : ι → T × E → F} {g : T × E → F} |
| 28 | {n : ℕ∞ω} {r : ℕ} |
| 29 | (hjet : TendstoUniformlyOn |
| 30 | (fun k => iteratedFDerivWithin 𝕜 r (f k) (Jk k ×ˢ U)) |
| 31 | (iteratedFDerivWithin 𝕜 r g (J ×ˢ U)) l K) |
| 32 | (hJ : UniqueDiffOn 𝕜 J) (hU : IsOpen U) (hK : K ⊆ J ×ˢ U) |
| 33 | (hJk : ∀ᶠ k in l, UniqueDiffOn 𝕜 (Jk k)) |
| 34 | (hKk : ∀ᶠ k in l, K ⊆ Jk k ×ˢ U) |
| 35 | (hf : ∀ᶠ k in l, ContDiffOn 𝕜 n (f k) (Jk k ×ˢ U)) |
| 36 | (hg : ContDiffOn 𝕜 n g (J ×ˢ U)) (hr : r ≤ n) : |
| 37 | TendstoUniformlyOn |
| 38 | (fun k p => iteratedFDeriv 𝕜 r (fun y => f k (p.1, y)) p.2) |
| 39 | (fun p => iteratedFDeriv 𝕜 r (fun y => g (p.1, y)) p.2) l K := by |
| 40 | let R := ContinuousMultilinearMap.compContinuousLinearMapL |
| 41 | (F := F) (fun _ : Fin r => ContinuousLinearMap.inr 𝕜 T E) |
| 42 | have h := R.uniformContinuous.comp_tendstoUniformlyOn hjet |
| 43 | apply (h.congr ?_).congr_right ?_ |
| 44 | · filter_upwards [hJk, hKk, hf] with k hkJ hkK hkf p hp |
| 45 | exact (iteratedFDeriv_spatial_slice_eq_within hkJ hU hkf |
| 46 | (hkK hp).1 (hkK hp).2 hr).symm |
| 47 | · intro p hp |
| 48 | exact (iteratedFDeriv_spatial_slice_eq_within hJ hU hg |
| 49 | (hK hp).1 (hK hp).2 hr).symm |