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.Analysis.Coordinates.FiniteChartCover |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.ChartBounds |
| 4 | |
| 5 | /-! |
| 6 | # Compact stage atlases and common finite-order bounds |
| 7 | |
| 8 | One fixed regular stage has a finite compact chart cover inside its next |
| 9 | stage. On any fixed finite chart family, ellipticity and finitely many |
| 10 | metric-jet bounds hold on one common source tail. Source: Morgan--Tian |
| 11 | Proposition 9.79, pp. 232-234, and Proposition 10.7, p. 253; |
| 12 | M28 derivations 100 and 101. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology BigOperators |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28.RegularPointedMetricConvergence |
| 25 | |
| 26 | variable {n : ℕ} {M : ℕ → Type u} [∀ k, TopologicalSpace (M k)] |
| 27 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 28 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 29 | {g : ∀ k, RiemannianMetric n (M k)} {p : ∀ k, M k} |
| 30 | |
| 31 | /-- Compact actual chart regions cover a stage closure and remain inside |
| 32 | the next open stage. Coordinate images are compact in the actual targets. |
| 33 | Source: Proposition 10.7, p. 253; M28 derivation 101. -/ |
| 34 | theorem exists_finite_stage_chart_cover (G : RegularPointedMetricConvergence g p) |
| 35 | (j : ℕ) : |
| 36 | letI := G.limitCarrier.topologicalSpace |
| 37 | letI := G.limitCarrier.chartedSpace |
| 38 | ∃ s : Finset G.limitCarrier.carrier, ∃ C : G.limitCarrier.carrier → Set G.limitCarrier.carrier, |
| 39 | (∀ q ∈ s, q ∈ closure (G.exhaustion j) ∧ IsCompact (C q) ∧ |
| 40 | q ∈ interior (C q) ∧ C q ⊆ (extChartAt (𝓡 n) q).source ∩ G.exhaustion (j + 1) ∧ |
| 41 | IsCompact ((extChartAt (𝓡 n) q) '' C q) ∧ |
| 42 | (extChartAt (𝓡 n) q) '' C q ⊆ (extChartAt (𝓡 n) q).target) ∧ |
| 43 | closure (G.exhaustion j) ⊆ ⋃ q ∈ s, interior (C q) := by |
| 44 | let := G.limitCarrier.topologicalSpace |
| 45 | let := G.limitCarrier.chartedSpace |
| 46 | let : LocallyCompactSpace G.limitCarrier.carrier := |
| 47 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier |
| 48 | exact (G.exhaustion_compactClosure j).exists_finite_extChart_cover (𝓡 n) |
| 49 | (G.exhaustion_open (j + 1)) (G.exhaustion_step j) |
| 50 | |
| 51 | variable {ι : Type*} [Finite ι] |
| 52 | |
| 53 | /-- One common tail gives finite metric jets and ellipticity on every |
| 54 | region of a fixed finite atlas. All constants precede the source index, |
| 55 | point and vector; an empty family is allowed. Source: M28 derivation 101. -/ |
| 56 | theorem exists_eventual_finite_chart_bounds (G : RegularPointedMetricConvergence g p) : |
| 57 | letI := G.limitCarrier.topologicalSpace |
| 58 | letI := G.limitCarrier.chartedSpace |
| 59 | letI := G.limitCarrier.isManifold |
| 60 | ∀ (q : ι → G.limitCarrier.carrier) (K : ι → Set (EuclideanSpace ℝ (Fin n))), |
| 61 | (∀ i, IsCompact (K i)) → (∀ i, K i ⊆ (extChartAt (𝓡 n) (q i)).target) → |
| 62 | ∀ m : ℕ, ∃ a b B : ℝ, 0 < a ∧ 0 < b ∧ 1 ≤ B ∧ |
| 63 | ∀ᶠ k in atTop, ∀ i x, x ∈ K i → |
| 64 | (∀ v : EuclideanSpace ℝ (Fin n), |
| 65 | a * ‖v‖ ^ 2 ≤ (g (G.subsequence k)).pullbackCoefficients |
| 66 | (G.embedding k ∘ (extChartAt (𝓡 n) (q i)).symm) x v v ∧ |
| 67 | (g (G.subsequence k)).pullbackCoefficients |
| 68 | (G.embedding k ∘ (extChartAt (𝓡 n) (q i)).symm) x v v ≤ b * ‖v‖ ^ 2) ∧ |
| 69 | ∀ r ≤ m, ‖iteratedFDeriv ℝ r ((g (G.subsequence k)).pullbackCoefficients |
| 70 | (G.embedding k ∘ (extChartAt (𝓡 n) (q i)).symm)) x‖ ≤ B := by |
| 71 | classical |
| 72 | let : Fintype ι := Fintype.ofFinite ι |
| 73 | let := G.limitCarrier.topologicalSpace |
| 74 | let := G.limitCarrier.chartedSpace |
| 75 | let := G.limitCarrier.isManifold |
| 76 | intro q K hK htarget m |
| 77 | choose a b ha hb he using fun i => |
| 78 | G.exists_eventual_chart_ellipticity (q i) (K i) (hK i) (htarget i) |
| 79 | choose c hc hj using fun i : ι × Fin (m + 1) => |
| 80 | G.exists_eventual_chart_jet_bound (q i.1) i.2 (K i.1) (hK i.1) (htarget i.1) |
| 81 | let lower : Option ι → ℝ := fun i => i.elim 1 a |
| 82 | let a₀ := Finset.univ.inf' Finset.univ_nonempty lower |
| 83 | let b₀ := 1 + ∑ i, b i |
| 84 | let B := 1 + ∑ i, c i |
| 85 | have hlower : ∀ i, 0 < lower i := by |
| 86 | intro i |
| 87 | cases i with |
| 88 | | none => exact zero_lt_one |
| 89 | | some i => exact ha i |
| 90 | have ha₀ : 0 < a₀ := |
| 91 | (Finset.lt_inf'_iff Finset.univ_nonempty).mpr (fun i _ => hlower i) |
| 92 | have ha_le (i : ι) : a₀ ≤ a i := Finset.inf'_le lower (Finset.mem_univ (some i)) |
| 93 | have hb_sum : 0 ≤ ∑ i, b i := Finset.sum_nonneg (fun i _ => (hb i).le) |
| 94 | have hc_sum : 0 ≤ ∑ i, c i := |
| 95 | Finset.sum_nonneg (fun i _ => (by norm_num : (0 : ℝ) ≤ 1).trans (hc i)) |
| 96 | have hb₀ : 0 < b₀ := by dsimp only [b₀]; linarith |
| 97 | have hB : 1 ≤ B := by dsimp only [B]; linarith |
| 98 | have hb_le (i : ι) : b i ≤ b₀ := by |
| 99 | have h := Finset.single_le_sum (fun j _ => (hb j).le) (Finset.mem_univ i) |
| 100 | dsimp only [b₀] |
| 101 | linarith |
| 102 | have hc_le (i : ι × Fin (m + 1)) : c i ≤ B := by |
| 103 | have h := Finset.single_le_sum |
| 104 | (fun j _ => (by norm_num : (0 : ℝ) ≤ 1).trans (hc j)) (Finset.mem_univ i) |
| 105 | dsimp only [B] |
| 106 | linarith |
| 107 | refine ⟨a₀, b₀, B, ha₀, hb₀, hB, ?_⟩ |
| 108 | filter_upwards [Filter.eventually_all.mpr he, Filter.eventually_all.mpr hj] with k hk hkj |
| 109 | intro i x hx |
| 110 | constructor |
| 111 | · intro v |
| 112 | exact ⟨(mul_le_mul_of_nonneg_right (ha_le i) (sq_nonneg ‖v‖)).trans |
| 113 | (hk i x hx v).1, (hk i x hx v).2.trans |
| 114 | (mul_le_mul_of_nonneg_right (hb_le i) (sq_nonneg ‖v‖))⟩ |
| 115 | · intro r hr |
| 116 | let j : ι × Fin (m + 1) := (i, ⟨r, Nat.lt_succ_of_le hr⟩) |
| 117 | exact (hkj j x hx).trans (hc_le j) |
| 118 | |
| 119 | /-- Actual uniform convergence gives one finite-order error tail for every |
| 120 | chart and every point of its compact coordinate set. This states a |
| 121 | difference of derivatives; the derivative-of-difference identity is used |
| 122 | only on actual smooth germs. Source: Proposition 9.79; M28 derivation 101. -/ |
| 123 | theorem eventually_finite_chart_jet_error (G : RegularPointedMetricConvergence g p) : |
| 124 | letI := G.limitCarrier.topologicalSpace |
| 125 | letI := G.limitCarrier.chartedSpace |
| 126 | letI := G.limitCarrier.isManifold |
| 127 | ∀ (q : ι → G.limitCarrier.carrier) (K : ι → Set (EuclideanSpace ℝ (Fin n))), |
| 128 | (∀ i, IsCompact (K i)) → (∀ i, K i ⊆ (extChartAt (𝓡 n) (q i)).target) → |
| 129 | ∀ (m : ℕ) (delta : ℝ), 0 < delta → |
| 130 | ∀ᶠ k in atTop, ∀ i x, x ∈ K i → ∀ r ≤ m, |
| 131 | ‖iteratedFDeriv ℝ r ((g (G.subsequence k)).pullbackCoefficients |
| 132 | (G.embedding k ∘ (extChartAt (𝓡 n) (q i)).symm)) x - |
| 133 | iteratedFDeriv ℝ r (G.limitMetric.pullbackCoefficients |
| 134 | (extChartAt (𝓡 n) (q i)).symm) x‖ ≤ delta := by |
| 135 | let := G.limitCarrier.topologicalSpace |
| 136 | let := G.limitCarrier.chartedSpace |
| 137 | let := G.limitCarrier.isManifold |
| 138 | intro q K hK htarget m delta hdelta |
| 139 | have he := Filter.eventually_all.mpr (fun i : ι × Fin (m + 1) => |
| 140 | Metric.tendstoUniformlyOn_iff.mp |
| 141 | (G.metric_jets (q i.1) i.2 (K i.1) (hK i.1) (htarget i.1)) delta hdelta) |
| 142 | filter_upwards [he] with k hk |
| 143 | intro i x hx r hr |
| 144 | have h := hk (i, ⟨r, Nat.lt_succ_of_le hr⟩) x hx |
| 145 | exact le_of_lt (by simpa only [dist_eq_norm, norm_sub_rev] using h) |
| 146 | |
| 147 | end PoincareMT.M28.RegularPointedMetricConvergence |