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.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.CoordinateMetricLimit |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.CountableCoefficients |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.Geometry.NormalCoverCharts |
| 5 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.JetBounds |
| 6 | import PoincareLib.Analysis.Calculus.SmoothCompactness.Diagonal |
| 7 | import PoincareLib.Topology.Sequences.Diagonal |
| 8 | |
| 9 | /-! |
| 10 | # Nonradial extraction from the actual regular normal covers |
| 11 | |
| 12 | Actual covariant curvature bounds supply the metric jets. Countable |
| 13 | smooth extraction and countable pairwise-distance extraction then |
| 14 | construct the overlaps, quotient, glued metric and source maps. Every |
| 15 | regular base component is covered by a fixed compact limit stage. |
| 16 | This is Morgan--Tian Theorem 5.6, printed pp. 85-87. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | open Set Filter Metric Poincare.Gluing Poincare.Analysis.Calculus |
| 23 | open scoped Topology NNReal Manifold ContDiff |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.M28 |
| 28 | |
| 29 | /-- The actual finite regular-component covers and curvature jets |
| 30 | produce one smooth pointed limit, including proved reverse source |
| 31 | coverage. Theorem 5.6, printed pp. 85-87. -/ |
| 32 | theorem exists_regular_metric_limit_of_normal_covers |
| 33 | {n : ℕ} {M : ℕ → Type u} [∀ k, MetricSpace (M k)] |
| 34 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 35 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 36 | {g : ∀ k, RiemannianMetric n (M k)} {p : ∀ k, M k} |
| 37 | {δ R ρ : ℕ → ℝ} {N : ℕ → ℕ} |
| 38 | (cover : ∀ k j, j ≤ k → RegularNormalChartCover (g k) (p k) |
| 39 | (δ j) (R j) (ρ j) (N j)) |
| 40 | (Dg : ∀ k, LeviCivitaData (g k)) |
| 41 | (hρ : ∀ j, 0 < ρ j) (hρR : ∀ j, 2 * ρ j < R j) |
| 42 | (hstep : ∀ j, 4 * δ (j + 1) ≤ 2 * δ j) |
| 43 | (hcofinal : ∀ ε : ℝ, 0 < ε → ∃ j, 4 * δ j ≤ ε) |
| 44 | (hdist : ∀ k (x y : M k), edist x y = (g k).edist x y) |
| 45 | (hcurv : ∀ j l, ∃ C : ℝ, 0 ≤ C ∧ ∀ᶠ k in atTop, |
| 46 | ∀ x ∈ regularComponent (g k) (p k) (2 * δ j), |
| 47 | (Dg k).curvatureDerivativeNorm l x ≤ C) : |
| 48 | Nonempty (RegularPointedMetricConvergence g p) := by |
| 49 | classical |
| 50 | let U : ℕ → Set (EuclideanSpace ℝ (Fin n)) := fun _ => ball 0 1 |
| 51 | let hU : ∀ i, IsOpen (U i) := fun _ => isOpen_ball |
| 52 | let : Nonempty (ball (0 : EuclideanSpace ℝ (Fin n)) 1) := ⟨⟨0, by simp⟩⟩ |
| 53 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 54 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 55 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 56 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 57 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 58 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) |
| 59 | (ball (0 : EuclideanSpace ℝ (Fin n)) 1) := |
| 60 | isOpen_ball.isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 61 | let : IsManifold (𝓡 n) ∞ (ball (0 : EuclideanSpace ℝ (Fin n)) 1) := |
| 62 | isOpen_ball.isOpenEmbedding_subtypeVal.isManifold_singleton |
| 63 | let : LocallyCompactSpace (ball (0 : EuclideanSpace ℝ (Fin n)) 1) := |
| 64 | isOpen_ball.locallyCompactSpace |
| 65 | let e := regularUnitBallMap cover |
| 66 | have hhalf (j : ℕ) : ρ j / 2 ≤ R j := by |
| 67 | have := hρ j |
| 68 | have := hρR j |
| 69 | linarith |
| 70 | have hfull (j : ℕ) : ρ j < R j := by |
| 71 | have := hρ j |
| 72 | have := hρR j |
| 73 | linarith |
| 74 | choose L c hc he hlower using regularUnitBallMap_distance_bounds cover hdist hρ |
| 75 | have hopen := regularUnitBallMap_isOpenEmbedding cover hρ hhalf |
| 76 | have hsmooth := regularUnitBallMap_isLocalDiffeomorph cover hρ hhalf |
| 77 | have hconn (k : ℕ) (x : M k) (r : ℝ) : IsPreconnected (ball x r) := by |
| 78 | rw [metric_ball_eq_of_riemannian_edist (g := fun k _ => g k) hdist] |
| 79 | exact (g k).isPreconnected_ball x r |
| 80 | have hjets := regularUnitBallMap_bounded_derivatives_of_curvature cover Dg |
| 81 | hρ hfull hcurv |
| 82 | have hsource (i k : ℕ) : ContDiffOn ℝ ∞ |
| 83 | ((g k).pullbackCoefficients |
| 84 | (ChartDistance.chartParametrization U hU (i := i) (e k i))) |
| 85 | (U i) := by |
| 86 | intro x hx |
| 87 | exact ((g k).contDiffAt_pullbackCoefficients |
| 88 | ((ChartDistance.contMDiffOn_chartParametrization U hU (i := i) (e := e k i) |
| 89 | (hsmooth k i).contMDiff).contMDiffAt ((hU i).mem_nhds hx))).contDiffWithinAt |
| 90 | obtain ⟨σ, hσ, B, hBsmooth, hBjets⟩ := exists_common_smoothSubsequenceExtraction hU |
| 91 | (fun i k => (g k).pullbackCoefficients |
| 92 | (ChartDistance.chartParametrization U hU (i := i) (e k i))) |
| 93 | hsource hjets |
| 94 | obtain ⟨τ, hτ, D, hD⟩ := ChartDistance.exists_pairwise_limits (fun k => e (σ k)) |
| 95 | L (fun k i => he i (σ k)) (fun i j x y => by |
| 96 | obtain ⟨C, hC⟩ := regularUnitBallMap_pairwise_bounded cover hdist hρ hρR i j |
| 97 | exact ⟨C, fun k => hC (σ k) x y⟩) |
| 98 | let φ := σ ∘ τ |
| 99 | have hφ : StrictMono φ := hσ.comp hτ |
| 100 | have hjets' : ∀ i, LocallyEventuallyBoundedDerivatives (U i) |
| 101 | (fun k => (g (φ k)).pullbackCoefficients |
| 102 | (ChartDistance.chartParametrization U hU (i := i) (e (φ k) i))) := by |
| 103 | intro i K hK hKU m |
| 104 | obtain ⟨C, hC⟩ := hjets i K hK hKU m |
| 105 | exact ⟨C, hφ.tendsto_atTop.eventually hC⟩ |
| 106 | have helliptic : ∀ i K, IsCompact K → K ⊆ U i → |
| 107 | ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, ∀ x ∈ K, ∀ v, |
| 108 | a * ‖v‖ ^ 2 ≤ (g (φ k)).pullbackCoefficients |
| 109 | (ChartDistance.chartParametrization U hU (i := i) (e (φ k) i)) x v v := by |
| 110 | intro i K _hK hKU |
| 111 | obtain ⟨a, ha, htail⟩ := |
| 112 | regularUnitBallMap_eventually_lower_coefficients cover hρ hhalf i |
| 113 | refine ⟨a, ha, (hφ.tendsto_atTop.eventually htail).mono fun k hk x hx v => ?_⟩ |
| 114 | exact hk x (hKU hx) v |
| 115 | have hbound := ChartDistance.locallyEventuallyBoundedDerivatives_source_transition |
| 116 | U hU (fun i j x y => |
| 117 | (hD i j).tendstoLocallyUniformlyOn.tendsto_at (mem_univ (x, y))) |
| 118 | L (fun k i => he i (φ k)) c hc (fun k i => hlower i (φ k)) |
| 119 | (fun k => hopen (φ k)) (fun k => hconn (φ k)) (fun k => hsmooth (φ k)) |
| 120 | (fun k => g (φ k)) hjets' helliptic |
| 121 | apply exists_regular_metric_limit_of_coordinate_limits cover hρ hhalf hstep hcofinal |
| 122 | hφ hD L (fun k i => he i (φ k)) c hc (fun k i => hlower i (φ k)) |
| 123 | hconn hbound B hBsmooth |
| 124 | · intro i m K hK hKU V hV |
| 125 | exact hτ.tendsto_atTop.eventually (hBjets i m K hK hKU V hV) |
| 126 | · intro i x hx |
| 127 | obtain ⟨a, ha, hbound⟩ := helliptic i {x} isCompact_singleton |
| 128 | (singleton_subset_iff.mpr hx) |
| 129 | exact ⟨a, ha, hbound.mono fun _ hk => hk x (mem_singleton x)⟩ |
| 130 | |
| 131 | /-- Eventual actual covers are arranged in the `min(j,k)` construction |
| 132 | before extracting coefficients or distances. Theorem 5.6, pp. 86-87. -/ |
| 133 | theorem exists_regular_metric_limit_of_eventual_normal_covers |
| 134 | {n : ℕ} {M : ℕ → Type u} [∀ k, MetricSpace (M k)] |
| 135 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 136 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 137 | {g : ∀ k, RiemannianMetric n (M k)} {p : ∀ k, M k} |
| 138 | {δ R ρ : ℕ → ℝ} {N : ℕ → ℕ} |
| 139 | (Dg : ∀ k, LeviCivitaData (g k)) |
| 140 | (hρ : ∀ j, 0 < ρ j) (hρR : ∀ j, 2 * ρ j < R j) |
| 141 | (hstep : ∀ j, 4 * δ (j + 1) ≤ 2 * δ j) |
| 142 | (hcofinal : ∀ ε : ℝ, 0 < ε → ∃ j, 4 * δ j ≤ ε) |
| 143 | (hdist : ∀ k (x y : M k), edist x y = (g k).edist x y) |
| 144 | (hcurv : ∀ j l, ∃ C : ℝ, 0 ≤ C ∧ ∀ᶠ k in atTop, |
| 145 | ∀ x ∈ regularComponent (g k) (p k) (2 * δ j), |
| 146 | (Dg k).curvatureDerivativeNorm l x ≤ C) |
| 147 | (hcovers : ∀ j, ∀ᶠ k in atTop, |
| 148 | Nonempty (RegularNormalChartCover (g k) (p k) (δ j) (R j) (ρ j) (N j))) : |
| 149 | Nonempty (RegularPointedMetricConvergence g p) := by |
| 150 | classical |
| 151 | obtain ⟨τ, hτ, hτcovers⟩ := Poincare.exists_strictMono_forall_le_of_eventually hcovers |
| 152 | let cover := fun k j (hjk : j ≤ k) => Classical.choice (hτcovers k j hjk) |
| 153 | have hcurv' : ∀ j l, ∃ C : ℝ, 0 ≤ C ∧ ∀ᶠ k in atTop, |
| 154 | ∀ x ∈ regularComponent (g (τ k)) (p (τ k)) (2 * δ j), |
| 155 | (Dg (τ k)).curvatureDerivativeNorm l x ≤ C := by |
| 156 | intro j l |
| 157 | obtain ⟨C, hC, htail⟩ := hcurv j l |
| 158 | exact ⟨C, hC, hτ.tendsto_atTop.eventually htail⟩ |
| 159 | obtain ⟨G⟩ := exists_regular_metric_limit_of_normal_covers cover (fun k => Dg (τ k)) |
| 160 | hρ hρR hstep hcofinal (fun k => hdist (τ k)) hcurv' |
| 161 | exact ⟨G.reindex hτ⟩ |
| 162 | |
| 163 | end PoincareMT.M28 |