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.Surgery.StandardCap.Existence.Construction.Basic.ApproximationSpacetimeBounds |
| 2 | import PoincareLib.Analysis.Calculus.SmoothCompactness.FiniteDimensional |
| 3 | |
| 4 | /-! |
| 5 | # One subsequence of fixed-coordinate interior limits |
| 6 | |
| 7 | Each fixed ball is contained in all sufficiently late cap sources. A |
| 8 | finite initial reindexing makes its coefficient sequence smooth at every |
| 9 | index, and simultaneous finite-dimensional smooth extraction selects |
| 10 | one subsequence for every ball. The final convergence is stated for the |
| 11 | original compact sequence. This is Morgan-Tian Theorem 12.5, p. 297. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option maxSynthPendingDepth 8 |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | namespace PoincareMT.M34.CompactCapApproximation |
| 22 | |
| 23 | open SpacetimeBounds |
| 24 | |
| 25 | variable {g0 : StandardInitialMetric} (A : CompactCapApproximation g0) |
| 26 | |
| 27 | /-- The countable fixed-coordinate cover used for interior extraction |
| 28 | (Theorem 12.5, p. 297). -/ |
| 29 | def interiorBallDomain (i : ℕ) : Set (ℝ × StandardCapSpace) := |
| 30 | Ioo 0 A.time ×ˢ Metric.ball 0 ((i : ℝ) + 1) |
| 31 | |
| 32 | /-- Each extraction domain is open (Theorem 12.5, p. 297). -/ |
| 33 | theorem interiorBallDomain_isOpen (i : ℕ) : IsOpen (A.interiorBallDomain i) := |
| 34 | isOpen_Ioo.prod Metric.isOpen_ball |
| 35 | |
| 36 | set_option synthInstance.maxHeartbeats 100000 in |
| 37 | -- Simultaneous extraction infers the finite-dimensional bilinear target family. |
| 38 | /-- One strict subsequence has smooth local limits on all growing fixed |
| 39 | balls, with the original coefficients converging in every joint derivative |
| 40 | (Theorem 12.5, p. 297). -/ |
| 41 | theorem exists_local_interior_limits (P : RicciFlowCurvatureTheory.{0}) : |
| 42 | ∃ σ : ℕ → ℕ, StrictMono σ ∧ |
| 43 | ∃ F : ℕ → ℝ × StandardCapSpace → MetricCoefficient 3, |
| 44 | (∀ i, ContDiffOn ℝ ∞ (F i) (A.interiorBallDomain i)) ∧ |
| 45 | ∀ i m K, IsCompact K → K ⊆ A.interiorBallDomain i → |
| 46 | TendstoUniformlyOn |
| 47 | (fun k => iteratedFDeriv ℝ m |
| 48 | (fun p : ℝ × StandardCapSpace => A.coefficients (σ k) p.1 p.2)) |
| 49 | (iteratedFDeriv ℝ m (F i)) atTop K := by |
| 50 | classical |
| 51 | have htail (i : ℕ) : ∃ N : ℕ, ∀ k ≥ N, |
| 52 | Metric.closedBall (0 : StandardCapSpace) ((i : ℝ) + 1) ⊆ compactCapSource g0 k := |
| 53 | eventually_atTop.mp (eventually_compact_subset_double_source g0 (isCompact_closedBall _ _)) |
| 54 | choose N hN using htail |
| 55 | let f : ℕ → ℕ → ℝ × StandardCapSpace → MetricCoefficient 3 := |
| 56 | fun i k p => A.coefficients (max k (N i)) p.1 p.2 |
| 57 | have hsource (i k : ℕ) {x : StandardCapSpace} |
| 58 | (hx : x ∈ Metric.ball 0 ((i : ℝ) + 1)) : |
| 59 | x ∈ compactCapSource g0 (max k (N i)) := |
| 60 | hN i _ (le_max_right _ _) (Metric.ball_subset_closedBall hx) |
| 61 | have hf (i k : ℕ) : ContDiffOn ℝ ∞ (f i k) (A.interiorBallDomain i) := |
| 62 | (A.contDiffOn_interior_coefficients (max k (N i))).mono |
| 63 | (fun _ hp => ⟨hp.1, hsource i k hp.2⟩) |
| 64 | have hb (i : ℕ) (K : Set (ℝ × StandardCapSpace)) (hK : IsCompact K) |
| 65 | (hKU : K ⊆ A.interiorBallDomain i) (m : ℕ) : |
| 66 | ∃ B : ℝ, ∀ᶠ k : ℕ in atTop, ∀ p ∈ K, ‖iteratedFDeriv ℝ m (f i k) p‖ ≤ B := by |
| 67 | obtain ⟨B, _hB, hbound⟩ := A.eventually_compact_spacetimeJet_bound P |
| 68 | (hK.image continuous_snd) m |
| 69 | refine ⟨B, ?_⟩ |
| 70 | filter_upwards [hbound, eventually_ge_atTop (N i)] with k hk hki p hp |
| 71 | have hs : p.2 ∈ compactCapSource g0 k := |
| 72 | hN i k hki (Metric.ball_subset_closedBall (hKU hp).2) |
| 73 | simpa only [f, max_eq_left hki] using |
| 74 | hk p.1 (hKU hp).1 p.2 (mem_image_of_mem Prod.snd hp) hs |
| 75 | obtain ⟨σ, hσ, F, hF, hconv⟩ := |
| 76 | Poincare.Analysis.Calculus.exists_common_smoothSubsequenceExtraction_finiteDimensional |
| 77 | (E := fun _ => ℝ × StandardCapSpace) (F := fun _ => MetricCoefficient 3) |
| 78 | (A.interiorBallDomain_isOpen) f hf hb |
| 79 | refine ⟨σ, hσ, F, hF, ?_⟩ |
| 80 | intro i m K hK hKU |
| 81 | apply (hconv i m K hK hKU).congr |
| 82 | filter_upwards [hσ.tendsto_atTop.eventually (eventually_ge_atTop (N i))] with k hk |
| 83 | intro p _hp |
| 84 | simp only [f, max_eq_left hk] |
| 85 | |
| 86 | end PoincareMT.M34.CompactCapApproximation |