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.Blowup.Construction.PartialLimits.CompleteStaticLimit |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.JetBounds |
| 3 | import PoincareLib.Analysis.Calculus.SmoothCompactness.Diagonal |
| 4 | |
| 5 | set_option synthInstance.maxHeartbeats 200000 |
| 6 | |
| 7 | /-! |
| 8 | # Complete static extraction from chart bounds |
| 9 | |
| 10 | Morgan--Tian Theorem 5.9 and Corollary 5.10, pp. 88--89. Local eventual |
| 11 | metric-jet bounds and ellipticity construct smooth positive coordinate |
| 12 | limits. Finite compact covers of every source ball give a complete metric |
| 13 | with the retained pointed maps. The spatial radii need no common bound. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Metric Poincare.Gluing Poincare.Analysis.Calculus |
| 20 | open scoped Topology NNReal Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M30 |
| 25 | |
| 26 | open ChartDistance |
| 27 | |
| 28 | /-- Controlled source charts with all-radius compact coverage give a |
| 29 | complete static limit and coverage along its actual embeddings |
| 30 | (Theorem 5.9, pp. 88--89). -/ |
| 31 | theorem exists_complete_static_limit_of_controlled_charts |
| 32 | {n : ℕ} (U : ℕ → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 33 | [∀ i, Nonempty (Piece U i)] |
| 34 | {M : ℕ → Type u} [∀ k, MetricSpace (M k)] |
| 35 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 36 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 37 | (e : ∀ k i, Piece U i → M k) |
| 38 | (L : ℕ → ℝ≥0) (he : ∀ k i, LipschitzWith (L i) (e k i)) |
| 39 | (c : ℕ → ℝ) (hc : ∀ i, 0 < c i) |
| 40 | (hlower : ∀ k i x y, c i * dist x y ≤ dist (e k i x) (e k i y)) |
| 41 | (hopen : ∀ k i, Topology.IsOpenEmbedding (e k i)) |
| 42 | (hconn : ∀ k (p : M k) r, IsPreconnected (ball p r)) |
| 43 | (hsmooth : letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 44 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 45 | ∀ k i, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k i)) |
| 46 | (hb : ∀ i j (x : Piece U i) (y : Piece U j), |
| 47 | ∃ C : ℝ, ∀ k, dist (e k i x) (e k j y) ≤ C) |
| 48 | {i₀ : ℕ} (p : Piece U i₀) |
| 49 | (hcover : ∀ R : ℝ, 0 < R → ∃ s : Finset ℕ, |
| 50 | ∃ K : ∀ i, Set (Piece U i), (∀ i ∈ s, IsCompact (K i)) ∧ |
| 51 | ∀ᶠ k in atTop, ball (e k i₀ p) R ⊆ ⋃ i ∈ s, e k i '' K i) |
| 52 | (g : ∀ k, RiemannianMetric n (M k)) |
| 53 | (hdist : ∀ k (x y : M k), edist x y = (g k).edist x y) |
| 54 | (hjets : ∀ i, LocallyEventuallyBoundedDerivatives (U i) |
| 55 | (fun k => (g k).pullbackCoefficients (chartParametrization U hU (e k i)))) |
| 56 | (helliptic : ∀ i K, IsCompact K → K ⊆ U i → |
| 57 | ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, ∀ x ∈ K, ∀ v, |
| 58 | a * ‖v‖ ^ 2 ≤ |
| 59 | (g k).pullbackCoefficients (chartParametrization U hU (e k i)) x v v) : |
| 60 | ∃ G : PartialPointedMetricConvergence g (fun k => e k i₀ p) 1, |
| 61 | G.limitCarrier.metricComplete G.limitMetric ∧ |
| 62 | ∀ R : ℝ, 0 < R → ∃ l : ℕ, ∀ᶠ k in atTop, |
| 63 | (g (G.subsequence k)).ball (e (G.subsequence k) i₀ p) R ⊆ |
| 64 | G.embedding k '' G.exhaustion l := by |
| 65 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 66 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 67 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 68 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 69 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 70 | have hsource (i k : ℕ) : ContDiffOn ℝ ∞ |
| 71 | ((g k).pullbackCoefficients (chartParametrization U hU (e k i))) (U i) := by |
| 72 | intro x hx |
| 73 | exact ((g k).contDiffAt_pullbackCoefficients |
| 74 | ((contMDiffOn_chartParametrization U hU (hsmooth k i).contMDiff).contMDiffAt |
| 75 | ((hU i).mem_nhds hx))).contDiffWithinAt |
| 76 | obtain ⟨sigma, hsigma, B, hBsmooth, hBjets⟩ := exists_common_smoothSubsequenceExtraction hU |
| 77 | (fun i k => (g k).pullbackCoefficients (chartParametrization U hU (e k i))) |
| 78 | hsource hjets |
| 79 | obtain ⟨tau, htau, D, hD⟩ := exists_pairwise_limits (fun k => e (sigma k)) L |
| 80 | (fun k => he (sigma k)) (fun i j x y => by |
| 81 | obtain ⟨C, hC⟩ := hb i j x y |
| 82 | exact ⟨C, fun k => hC (sigma k)⟩) |
| 83 | let rho := sigma ∘ tau |
| 84 | have hrho : StrictMono rho := hsigma.comp htau |
| 85 | have hjets' : ∀ i, LocallyEventuallyBoundedDerivatives (U i) |
| 86 | (fun k => (g (rho k)).pullbackCoefficients |
| 87 | (chartParametrization U hU (e (rho k) i))) := by |
| 88 | intro i K hK hKU m |
| 89 | obtain ⟨C, hC⟩ := hjets i K hK hKU m |
| 90 | exact ⟨C, hrho.tendsto_atTop.eventually hC⟩ |
| 91 | have helliptic' : ∀ i K, IsCompact K → K ⊆ U i → |
| 92 | ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, ∀ x ∈ K, ∀ v, |
| 93 | a * ‖v‖ ^ 2 ≤ (g (rho k)).pullbackCoefficients |
| 94 | (chartParametrization U hU (e (rho k) i)) x v v := by |
| 95 | intro i K hK hKU |
| 96 | obtain ⟨a, ha, hbound⟩ := helliptic i K hK hKU |
| 97 | exact ⟨a, ha, hrho.tendsto_atTop.eventually hbound⟩ |
| 98 | have hbound := locallyEventuallyBoundedDerivatives_source_transition U hU |
| 99 | (fun i j x y => (hD i j).tendstoLocallyUniformlyOn.tendsto_at (mem_univ (x, y))) |
| 100 | L (fun k => he (rho k)) c hc (fun k => hlower (rho k)) (fun k => hopen (rho k)) |
| 101 | (fun k => hconn (rho k)) (fun k => hsmooth (rho k)) (fun k => g (rho k)) |
| 102 | hjets' helliptic' |
| 103 | have hcover' : ∀ R : ℝ, 0 < R → ∃ s : Finset ℕ, |
| 104 | ∃ K : ∀ i, Set (Piece U i), (∀ i ∈ s, IsCompact (K i)) ∧ |
| 105 | ∀ᶠ k in atTop, ball (e (rho k) i₀ p) R ⊆ ⋃ i ∈ s, e (rho k) i '' K i := by |
| 106 | intro R hR |
| 107 | obtain ⟨s, K, hK, htail⟩ := hcover R hR |
| 108 | exact ⟨s, K, hK, hrho.tendsto_atTop.eventually htail⟩ |
| 109 | obtain ⟨G, hcomplete, hcoverage⟩ := exists_complete_static_limit_of_coordinate_limits |
| 110 | U hU hD L (fun k => he (rho k)) c hc (fun k => hlower (rho k)) |
| 111 | (fun k => hopen (rho k)) (fun k => hconn (rho k)) (fun k => hsmooth (rho k)) |
| 112 | hbound p hcover' (fun k => g (rho k)) (fun k => hdist (rho k)) B hBsmooth |
| 113 | (fun i m K hK hKU V hV => htau.tendsto_atTop.eventually (hBjets i m K hK hKU V hV)) |
| 114 | (by |
| 115 | intro i x hx |
| 116 | obtain ⟨a, ha, hbound⟩ := helliptic' i {x} isCompact_singleton |
| 117 | (singleton_subset_iff.mpr hx) |
| 118 | exact ⟨a, ha, hbound.mono fun _ hk => hk x (mem_singleton x)⟩) |
| 119 | exact ⟨G.reindex hrho, hcomplete, hcoverage⟩ |
| 120 | |
| 121 | end PoincareMT.M30 |