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.Compactness.Coordinates.Covering |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.JetBounds |
| 3 | |
| 4 | /-! |
| 5 | # Fixed finite indices for the controlled source charts |
| 6 | |
| 7 | Repetitions pad each finite cover to a fixed index set, with index zero at the |
| 8 | basepoint. The normalized charts retain their distance, coefficient and compact |
| 9 | coverage estimates. Jet bounds apply to every such choice of charts. |
| 10 | |
| 11 | Reference: Morgan--Tian, Theorem 5.6, pp. 86--87, and Proposition 5.14, |
| 12 | pp. 90--91. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option synthInstance.maxHeartbeats 100000 |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | /-- A finite family of normalized source charts with fixed indices. -/ |
| 25 | structure NormalChartCover {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | (g : ℝ → RiemannianMetric n M) (p : M) (T' T A R ρ a b : ℝ) (N : ℕ) where |
| 28 | centre : Fin (N + 1) → M |
| 29 | chart : Fin (N + 1) → PartialDiffeomorph (𝓡 n) (𝓡 n) |
| 30 | (EuclideanSpace ℝ (Fin n)) M ∞ |
| 31 | centre_zero : centre 0 = p |
| 32 | centre_mem : ∀ i, centre i ∈ (g 0).ball p A |
| 33 | source : ∀ i, (chart i).source = Metric.ball 0 R |
| 34 | target : ∀ i, (chart i).target = (g 0).ball (centre i) R |
| 35 | map_zero : ∀ i, chart i 0 = centre i |
| 36 | normalized : ∀ i, ∃ L : EuclideanSpace ℝ (Fin n) ≃L[ℝ] EuclideanSpace ℝ (Fin n), |
| 37 | (∀ u v, (g 0).pullbackCoefficients (extChartAt (𝓡 n) (centre i)).symm |
| 38 | (extChartAt (𝓡 n) (centre i) (centre i)) (L u) (L v) = inner ℝ u v) ∧ |
| 39 | HasFDerivAt (fun w => extChartAt (𝓡 n) (centre i) (chart i w)) |
| 40 | L.toContinuousLinearMap 0 |
| 41 | radial_geodesic : ∀ i, ∀ w ∈ Metric.ball 0 R, |
| 42 | (g 0).IsGeodesicOn (fun t => chart i (t • w)) |
| 43 | {t : ℝ | t • w ∈ Metric.ball 0 R} |
| 44 | radial_distance : ∀ i, ∀ w ∈ Metric.ball 0 R, |
| 45 | (g 0).edist (centre i) (chart i w) = ENNReal.ofReal ‖w‖ |
| 46 | coefficients : ∀ i, ∀ t ∈ Ioo T' T, ∀ x ∈ Metric.closedBall 0 (2 * ρ), ∀ v, |
| 47 | a * ‖v‖ ^ 2 ≤ (g t).pullbackCoefficients (chart i) x v v ∧ |
| 48 | (g t).pullbackCoefficients (chart i) x v v ≤ b * ‖v‖ ^ 2 |
| 49 | distances : ∀ i, ∀ x ∈ Metric.ball 0 (ρ / 2), ∀ y ∈ Metric.ball 0 (ρ / 2), |
| 50 | Real.sqrt a * dist x y ≤ ((g 0).edist (chart i x) (chart i y)).toReal ∧ |
| 51 | ((g 0).edist (chart i x) (chart i y)).toReal ≤ Real.sqrt b * dist x y |
| 52 | compact_image : ∀ i, IsCompact ((chart i) '' Metric.closedBall 0 (ρ / 4)) |
| 53 | cover : (g 0).ball p A ⊆ ⋃ i, (chart i) '' Metric.closedBall 0 (ρ / 4) |
| 54 | |
| 55 | namespace NormalChartCover |
| 56 | |
| 57 | /-- A bound on one coefficient jet of all the retained charts. -/ |
| 58 | def HasMetricJetBound {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 59 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 60 | {g : ℝ → RiemannianMetric n M} {p : M} {T' T A R ρ a b : ℝ} {N : ℕ} |
| 61 | (C : NormalChartCover g p T' T A R ρ a b N) (m : ℕ) (B : ℝ) : Prop := |
| 62 | ∀ i x, x ∈ Metric.closedBall 0 ρ → |
| 63 | ‖iteratedFDeriv ℝ m ((g 0).pullbackCoefficients (C.chart i)) x‖ ≤ B |
| 64 | |
| 65 | end NormalChartCover |
| 66 | |
| 67 | private theorem exists_surjective_fin_with_zero {α : Type*} [Fintype α] |
| 68 | (a : α) {N : ℕ} (hN : Fintype.card α ≤ N) : |
| 69 | ∃ f : Fin (N + 1) → α, f 0 = a ∧ Function.Surjective f := by |
| 70 | classical |
| 71 | let : Nonempty α := ⟨a⟩ |
| 72 | let e : α ↪ Fin N := |
| 73 | { toFun := fun x => ⟨(Fintype.equivFin α x).val, |
| 74 | (Fintype.equivFin α x).isLt.trans_le hN⟩ |
| 75 | inj' := fun x y h => (Fintype.equivFin α).injective |
| 76 | (Fin.ext (congrArg (fun z : Fin N => z.val) h)) } |
| 77 | refine ⟨Fin.cases a (Function.invFun e), rfl, ?_⟩ |
| 78 | intro x |
| 79 | exact ⟨(e x).succ, Function.leftInverse_invFun e.injective x⟩ |
| 80 | |
| 81 | namespace PointedRicciFlowCompactnessHypotheses |
| 82 | |
| 83 | /-- The source-cover index set is fixed before the sequence index. -/ |
| 84 | theorem eventually_nonempty_normalChartCover |
| 85 | {n : ℕ} {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 86 | (hn : 1 ≤ n) {A : ℝ} (hA : 0 < A) : |
| 87 | ∃ R ρ a b : ℝ, 0 < ρ ∧ 2 * ρ < R ∧ 0 < a ∧ 0 < b ∧ |
| 88 | ∃ N : ℕ, ∀ᶠ k in atTop, |
| 89 | let C := H.sequence.carrier k |
| 90 | let F := H.sequence.flow k |
| 91 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 92 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 93 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 94 | Nonempty (NormalChartCover F.metricAt F.base T' T A R ρ a b N) := by |
| 95 | classical |
| 96 | obtain ⟨R, ρ, a, b, hρ, hρR, ha, hb, N, hcover⟩ := |
| 97 | H.eventually_exists_uniform_exponential_cover hn hA |
| 98 | refine ⟨R, ρ, a, b, hρ, hρR, ha, hb, N, ?_⟩ |
| 99 | filter_upwards [hcover] with k hk |
| 100 | let C := H.sequence.carrier k |
| 101 | let F := H.sequence.flow k |
| 102 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 103 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 104 | let : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 105 | obtain ⟨S, hbase, hS, hN, Φ, hΦ, hdist, hcompact, hcover⟩ := hk |
| 106 | obtain ⟨f, hf0, hf⟩ := exists_surjective_fin_with_zero (⟨F.base, hbase⟩ : S) |
| 107 | (by simpa only [Fintype.card_coe] using hN) |
| 108 | choose hsource htarget hzero L hL hderiv hgeo hradial hcoeff using hΦ |
| 109 | have hcoverFixed : (F.metricAt 0).ball F.base A ⊆ |
| 110 | ⋃ i, (Φ (f i)) '' Metric.closedBall 0 (ρ / 4) := by |
| 111 | intro x hx |
| 112 | obtain ⟨q, hq⟩ := mem_iUnion.mp (hcover hx) |
| 113 | obtain ⟨i, rfl⟩ := hf q |
| 114 | exact mem_iUnion.mpr ⟨i, hq⟩ |
| 115 | dsimp only |
| 116 | refine ⟨{ |
| 117 | centre := fun i => f i |
| 118 | chart := fun i => Φ (f i) |
| 119 | centre_zero := congrArg Subtype.val hf0 |
| 120 | centre_mem := fun i => hS (f i).property |
| 121 | source := fun i => hsource (f i) |
| 122 | target := fun i => htarget (f i) |
| 123 | map_zero := fun i => hzero (f i) |
| 124 | normalized := fun i => ⟨L (f i), hL (f i), hderiv (f i)⟩ |
| 125 | radial_geodesic := fun i => hgeo (f i) |
| 126 | radial_distance := fun i => hradial (f i) |
| 127 | coefficients := fun i => hcoeff (f i) |
| 128 | distances := fun i => hdist (f i) |
| 129 | compact_image := fun i => hcompact (f i) |
| 130 | cover := hcoverFixed }⟩ |
| 131 | |
| 132 | /-- The order-dependent tail controls every choice of the indexed chart cover. -/ |
| 133 | theorem eventually_normalChartCover_metric_jet_bound_of_local_derivative_estimates |
| 134 | {n : ℕ} {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 135 | (hShi : LocalCurvatureDerivativeEstimates.{0}) |
| 136 | {A R ρ a b : ℝ} {N : ℕ} (hA : 0 < A) (hρ : 0 < ρ) (hρR : ρ < R) (m : ℕ) : |
| 137 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in atTop, |
| 138 | let C := H.sequence.carrier k |
| 139 | let F := H.sequence.flow k |
| 140 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 141 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 142 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 143 | ∀ C : NormalChartCover F.metricAt F.base T' T A R ρ a b N, |
| 144 | C.HasMetricJetBound m B := by |
| 145 | obtain ⟨B, hB, hbound⟩ := |
| 146 | H.eventually_uniform_zero_time_exponential_metric_jet_bound_of_local_derivative_estimates |
| 147 | hShi hA hρ hρR m |
| 148 | refine ⟨B, hB, ?_⟩ |
| 149 | filter_upwards [hbound] with k hk |
| 150 | let C := H.sequence.carrier k |
| 151 | let F := H.sequence.flow k |
| 152 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 153 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 154 | let : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 155 | dsimp only |
| 156 | intro C i x hx |
| 157 | obtain ⟨L, hL, hderiv⟩ := C.normalized i |
| 158 | exact hk (C.centre i) (C.centre_mem i) L (C.chart i) (C.source i) (C.target i) |
| 159 | (C.map_zero i) hL hderiv (C.radial_geodesic i) x hx |
| 160 | |
| 161 | /-- The supplied curvature theory bounds every indexed normal-chart cover. -/ |
| 162 | theorem eventually_normalChartCover_metric_jet_bound |
| 163 | {n : ℕ} {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 164 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 165 | {A R ρ a b : ℝ} {N : ℕ} (hA : 0 < A) (hρ : 0 < ρ) (hρR : ρ < R) (m : ℕ) : |
| 166 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in atTop, |
| 167 | let C := H.sequence.carrier k |
| 168 | let F := H.sequence.flow k |
| 169 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 170 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 171 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 172 | ∀ C : NormalChartCover F.metricAt F.base T' T A R ρ a b N, |
| 173 | C.HasMetricJetBound m B := |
| 174 | H.eventually_normalChartCover_metric_jet_bound_of_local_derivative_estimates |
| 175 | hM04.local_derivative_estimates hA hρ hρR m |
| 176 | |
| 177 | end PointedRicciFlowCompactnessHypotheses |
| 178 | end PoincareMT |