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.AncientKappa.Compactness.TerminalJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.ScalarRatio.Annular.ClosedCompactness |
| 3 | |
| 4 | /-! |
| 5 | # Smooth terminal coefficient limits on the retained sequence |
| 6 | |
| 7 | Closed-domain compactness constructs a smooth candidate. Interior convergence |
| 8 | identifies every candidate jet, and the next-jet bounds extend convergence to |
| 9 | the terminal boundary along the full original sequence. |
| 10 | |
| 11 | Reference: Morgan--Tian, Theorem 9.64, pp. 225-229. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter Metric |
| 17 | open scoped Topology ContDiff |
| 18 | |
| 19 | namespace PoincareMT.AncientCompactness |
| 20 | |
| 21 | variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 22 | [FiniteDimensional ℝ X] [NormedAddCommGroup Y] [NormedSpace ℝ Y] |
| 23 | [FiniteDimensional ℝ Y] |
| 24 | |
| 25 | /-- All interior coefficient jets and compact closed-domain bounds construct |
| 26 | a smooth terminal limit without changing the selected source sequence. -/ |
| 27 | theorem exists_smooth_terminal_limit_same_sequence |
| 28 | {ρ : ℝ} (hρ : 0 < ρ) (f : ℕ → ℝ × X → Y) |
| 29 | (hf : ∀ k, ContDiffOn ℝ ∞ (f k) (Iic 0 ×ˢ closedBall 0 ρ)) |
| 30 | (g : (m : ℕ) → ℝ × X → (ℝ × X) [×m]→L[ℝ] Y) |
| 31 | (hinterior : ∀ m K, IsCompact K → K ⊆ Iio 0 ×ˢ closedBall (0 : X) ρ → |
| 32 | TendstoUniformlyOn |
| 33 | (fun k => iteratedFDerivWithin ℝ m (f k) (Iic 0 ×ˢ closedBall 0 ρ)) |
| 34 | (g m) atTop K) |
| 35 | (hbound : ∀ K : Set (ℝ × X), IsCompact K → |
| 36 | K ⊆ Iic 0 ×ˢ closedBall (0 : X) ρ → ∀ m : ℕ, |
| 37 | ∃ B : ℝ, 0 ≤ B ∧ ∀ k z, z ∈ K → |
| 38 | ‖iteratedFDerivWithin ℝ m (f k) (Iic 0 ×ˢ closedBall 0 ρ) z‖ ≤ B) : |
| 39 | ∃ F : ℝ × X → Y, ContDiffOn ℝ ∞ F (Iic 0 ×ˢ closedBall 0 ρ) ∧ |
| 40 | ∀ m K, IsCompact K → K ⊆ Iic 0 ×ˢ closedBall (0 : X) ρ → |
| 41 | TendstoUniformlyOn |
| 42 | (fun k => iteratedFDerivWithin ℝ m (f k) (Iic 0 ×ˢ closedBall 0 ρ)) |
| 43 | (iteratedFDerivWithin ℝ m F (Iic 0 ×ˢ closedBall 0 ρ)) atTop K := by |
| 44 | let Ω : Set (ℝ × X) := Iic 0 ×ˢ closedBall 0 ρ |
| 45 | have hclosed : IsClosed Ω := isClosed_Iic.prod isClosed_closedBall |
| 46 | have hconvex : Convex ℝ Ω := (convex_Iic 0).prod (convex_closedBall 0 ρ) |
| 47 | have hne : (interior Ω).Nonempty := by |
| 48 | rw [show Ω = Iic 0 ×ˢ closedBall (0 : X) ρ from rfl, |
| 49 | interior_prod_eq, interior_Iic, interior_closedBall (0 : X) hρ.ne'] |
| 50 | exact ⟨(-1, 0), by simp [hρ]⟩ |
| 51 | have hunique := uniqueDiffOn_convex hconvex hne |
| 52 | obtain ⟨σ, hσ, F, hF, hjets⟩ := |
| 53 | Poincare.AncientVolume.exists_smooth_subsequence_on_closed_convex |
| 54 | hclosed hconvex hne f hf hbound |
| 55 | have heq (m : ℕ) : EqOn (g m) (iteratedFDerivWithin ℝ m F Ω) |
| 56 | (Iio 0 ×ˢ closedBall (0 : X) ρ) := by |
| 57 | intro z hz |
| 58 | apply tendsto_nhds_unique |
| 59 | (((hinterior m {z} isCompact_singleton (singleton_subset_iff.mpr hz)).tendsto_at |
| 60 | (mem_singleton z)).comp hσ.tendsto_atTop) |
| 61 | exact (hjets m {z} isCompact_singleton |
| 62 | (singleton_subset_iff.mpr ⟨le_of_lt (show z.1 < 0 from hz.1), hz.2⟩)).tendsto_at |
| 63 | (mem_singleton z) |
| 64 | refine ⟨F, hF, ?_⟩ |
| 65 | intro m K hK hKΩ |
| 66 | apply tendstoUniformlyOn_past_of_time_lipschitz |
| 67 | (U := closedBall (0 : X) ρ) ?_ ?_ ?_ hK hKΩ |
| 68 | · intro A hA hAU |
| 69 | exact (hinterior m A hA hAU).congr_right fun z hz => heq m (hAU hz) |
| 70 | · intro x hx |
| 71 | have hc := hF.continuousOn_iteratedFDerivWithin |
| 72 | (WithTop.coe_le_coe.mpr (le_top : (m : ℕ∞) ≤ ⊤)) hunique |
| 73 | exact hc.comp (continuous_id.prodMk continuous_const).continuousOn |
| 74 | (fun t ht => ⟨ht.2, hx⟩) |
| 75 | · intro V hV hVU |
| 76 | obtain ⟨B, hB, hBbound⟩ := hbound (Icc (-1) 0 ×ˢ V) |
| 77 | (isCompact_Icc.prod hV) (prod_mono (fun _ ht => ht.2) hVU) (m + 1) |
| 78 | refine ⟨B, hB, Eventually.of_forall fun k x hx s hs t ht => ?_⟩ |
| 79 | let Q : Set (ℝ × X) := Icc (-1) 0 ×ˢ {x} |
| 80 | have hQ : Convex ℝ Q := (convex_Icc (-1) 0).prod (convex_singleton x) |
| 81 | have hQΩ : Q ⊆ Ω := by |
| 82 | rintro ⟨u, y⟩ ⟨hu, hy⟩ |
| 83 | rcases mem_singleton_iff.mp hy with rfl |
| 84 | exact ⟨hu.2, hVU hx⟩ |
| 85 | have hdiff := (hf k).differentiableOn_iteratedFDerivWithin |
| 86 | (ENat.natCast_lt_of_coe_top_le_withTop (N := (∞ : ℕ∞ω)) le_rfl m) hunique |
| 87 | have hnorm : ‖iteratedFDerivWithin ℝ m (f k) Ω (s, x) - |
| 88 | iteratedFDerivWithin ℝ m (f k) Ω (t, x)‖ ≤ B * ‖(s, x) - (t, x)‖ := by |
| 89 | apply hQ.norm_image_sub_le_of_norm_hasFDerivWithin_le |
| 90 | (fun z hz => (hdiff z (hQΩ hz)).hasFDerivWithinAt.mono hQΩ) |
| 91 | (fun z hz => ?_) ⟨ht, mem_singleton x⟩ ⟨hs, mem_singleton x⟩ |
| 92 | rw [norm_fderivWithin_iteratedFDerivWithin] |
| 93 | apply hBbound k z |
| 94 | exact ⟨hz.1, (mem_singleton_iff.mp hz.2) ▸ hx⟩ |
| 95 | simpa only [dist_eq_norm, Prod.mk_sub_mk, sub_self, Prod.norm_def, |
| 96 | norm_zero, Real.norm_eq_abs, max_eq_left (abs_nonneg (s - t))] using hnorm |
| 97 | |
| 98 | end PoincareMT.AncientCompactness |