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.Harnack.Noncompact.AncientVolume.ScalarRatio.Annular.ClosedCompactness |
| 2 | |
| 3 | /-! |
| 4 | # Closed-domain smooth compactness from eventual bounds |
| 5 | |
| 6 | Replace a finite prefix by a smooth field and absorb its compact jet bounds |
| 7 | before applying the retained closed-convex compactness theorem. Eventual |
| 8 | equality along the extracted strict subsequence restores the original fields. |
| 9 | This is the analytic compactness step of Morgan--Tian Proposition 5.14, |
| 10 | pp. 90--91, with closed endpoints as in corrected Kleiner--Lott Appendix E, |
| 11 | p. 2848. Geometric estimates for actual pullback coefficients are separate. |
| 12 | |
| 13 | See `proof-work/tasks/M30/derivations/eventual-closed-compactness.md` for the |
| 14 | reviewed source contract and the finite-prefix argument reused from the lower |
| 15 | `AncientKappa.Compactness.Coordinates.TerminalEventual` module. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Topology ContDiff BigOperators |
| 22 | |
| 23 | namespace PoincareMT.M30 |
| 24 | |
| 25 | /-- Eventual smoothness and compact-local bounds on every canonical within |
| 26 | jet give a smooth subsequence of the original fields on a closed convex domain |
| 27 | (Morgan--Tian Proposition 5.14, pp. 90--91; corrected Kleiner--Lott Appendix E, |
| 28 | p. 2848). -/ |
| 29 | theorem exists_smooth_subsequence_on_closed_convex_of_eventually |
| 30 | {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 31 | [FiniteDimensional ℝ X] [NormedAddCommGroup Y] [NormedSpace ℝ Y] |
| 32 | [FiniteDimensional ℝ Y] |
| 33 | {Ω : Set X} (hclosed : IsClosed Ω) (hconvex : Convex ℝ Ω) |
| 34 | (hne : (interior Ω).Nonempty) (f : ℕ → X → Y) |
| 35 | (hf : ∀ᶠ k : ℕ in atTop, ContDiffOn ℝ ∞ (f k) Ω) |
| 36 | (hbound : ∀ K : Set X, IsCompact K → K ⊆ Ω → ∀ m : ℕ, |
| 37 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k : ℕ in atTop, ∀ x ∈ K, |
| 38 | ‖iteratedFDerivWithin ℝ m (f k) Ω x‖ ≤ B) : |
| 39 | ∃ σ : ℕ → ℕ, StrictMono σ ∧ ∃ F : X → Y, ContDiffOn ℝ ∞ F Ω ∧ |
| 40 | ∀ m K, IsCompact K → K ⊆ Ω → TendstoUniformlyOn |
| 41 | (fun k => iteratedFDerivWithin ℝ m (f (σ k)) Ω) |
| 42 | (iteratedFDerivWithin ℝ m F Ω) atTop K := by |
| 43 | classical |
| 44 | have hunique := uniqueDiffOn_convex hconvex hne |
| 45 | obtain ⟨N, hN⟩ := eventually_atTop.mp hf |
| 46 | let f' := fun k => f (max k N) |
| 47 | have hf' (k : ℕ) : ContDiffOn ℝ ∞ (f' k) Ω := hN _ (le_max_right k N) |
| 48 | have heq : ∀ᶠ k : ℕ in atTop, f' k = f k := |
| 49 | (eventually_ge_atTop N).mono fun k hk => congrArg f (max_eq_left hk) |
| 50 | have hbound' (K : Set X) (hK : IsCompact K) (hKΩ : K ⊆ Ω) (m : ℕ) : |
| 51 | ∃ B : ℝ, 0 ≤ B ∧ ∀ k x, x ∈ K → ‖iteratedFDerivWithin ℝ m (f' k) Ω x‖ ≤ B := by |
| 52 | obtain ⟨B, hB, hevent⟩ := hbound K hK hKΩ m |
| 53 | obtain ⟨M, hM⟩ := eventually_atTop.mp hevent |
| 54 | have hfinite (k : Fin M) : ∃ C : ℝ, ∀ x ∈ K, |
| 55 | ‖iteratedFDerivWithin ℝ m (f' k) Ω x‖ ≤ C := |
| 56 | hK.exists_bound_of_continuousOn |
| 57 | (((hf' k).continuousOn_iteratedFDerivWithin |
| 58 | (WithTop.coe_le_coe.mpr (le_top : (m : ℕ∞) ≤ ⊤)) hunique).mono hKΩ) |
| 59 | choose C hC using hfinite |
| 60 | let D := ∑ k : Fin M, max (C k) 0 |
| 61 | have hD : 0 ≤ D := Finset.sum_nonneg fun k _ => le_max_right (C k) 0 |
| 62 | refine ⟨max B D, le_max_of_le_left hB, ?_⟩ |
| 63 | intro k x hx |
| 64 | by_cases hk : M ≤ k |
| 65 | · exact (hM (max k N) (hk.trans (le_max_left k N)) x hx).trans (le_max_left B D) |
| 66 | · have hkM : k < M := lt_of_not_ge hk |
| 67 | have hCD : C ⟨k, hkM⟩ ≤ D := |
| 68 | (le_max_left (C ⟨k, hkM⟩) 0).trans |
| 69 | (Finset.single_le_sum (fun i _ => le_max_right (C i) 0) |
| 70 | (Finset.mem_univ (⟨k, hkM⟩ : Fin M))) |
| 71 | exact (hC ⟨k, hkM⟩ x hx).trans (hCD.trans (le_max_right B D)) |
| 72 | obtain ⟨σ, hσ, F, hF, hjets⟩ := |
| 73 | Poincare.AncientVolume.exists_smooth_subsequence_on_closed_convex |
| 74 | hclosed hconvex hne f' hf' hbound' |
| 75 | refine ⟨σ, hσ, F, hF, ?_⟩ |
| 76 | intro m K hK hKΩ |
| 77 | exact (hjets m K hK hKΩ).congr |
| 78 | ((hσ.tendsto_atTop.eventually heq).mono fun k hk x _ => by rw [hk]) |
| 79 | |
| 80 | end PoincareMT.M30 |