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.AncientKappa.Compactness.Coordinates.Convergence |
| 2 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Compactness.Normalized |
| 3 | import PoincareLib.Geometry.RicciFlow.TimeTranslation |
| 4 | |
| 5 | /-! |
| 6 | # Original-time jets of the retained ancient limit |
| 7 | |
| 8 | Translating time preserves every coordinate jet and the exact subsequence, |
| 9 | spatial maps, and exhaustion of ancient pointed convergence. |
| 10 | |
| 11 | Reference: Morgan--Tian, Definition 5.12 and Theorem 9.64, pp. 90, 225-229. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 23 | FlowCarrier.isManifold FlowCarrier.measurableSpace FlowCarrier.borelSpace |
| 24 | FlowCarrier.t2Space FlowCarrier.t3Space FlowCarrier.secondCountable |
| 25 | |
| 26 | namespace AncientPointedGeometricConvergence |
| 27 | |
| 28 | /-- A time translation retains all ordinary metric jets of the same ancient |
| 29 | convergence, including its original uniform threshold. -/ |
| 30 | theorem pullback_metric_CInfinity_translate |
| 31 | {n : ℕ} {C : ℕ → FlowCarrier.{0} n} {g : ∀ k, ℝ → (C k).metric} |
| 32 | {p : ∀ k, (C k).carrier} {T : ℝ} |
| 33 | (G : AncientPointedGeometricConvergence C g p T) (c : ℝ) |
| 34 | (q : G.limitCarrier.carrier) (j r : ℕ) |
| 35 | (K : Set (ℝ × EuclideanSpace ℝ (Fin n))) (hK : IsCompact K) |
| 36 | (hKU : K ⊆ {z | z.1 + c < T ∧ z.2 ∈ (extChartAt (𝓡 n) q).target ∧ |
| 37 | (extChartAt (𝓡 n) q).symm z.2 ∈ G.exhaustion j}) |
| 38 | (ε : ℝ) (hε : 0 < ε) : |
| 39 | ∃ N : ℕ, j ≤ N ∧ ∀ k ≥ N, ∀ a b : Fin n, ∀ z ∈ K, |
| 40 | ‖iteratedFDeriv ℝ r |
| 41 | (G.limitCarrier.coordinateCoefficient q |
| 42 | (fun t x v w => spatialPullbackInner G.limitCarrier (C (G.subsequence k)) |
| 43 | (g (G.subsequence k) (t + c)) (G.embedding k) x v w) a b) z - |
| 44 | iteratedFDeriv ℝ r |
| 45 | (G.limitCarrier.coordinateCoefficient q |
| 46 | (fun t x v w => G.limitCarrier.metricInner |
| 47 | (G.limitFlow.metric (t + c)) x v w) a b) z‖ < ε := by |
| 48 | let d : ℝ × EuclideanSpace ℝ (Fin n) := (c, 0) |
| 49 | let shift : ℝ × EuclideanSpace ℝ (Fin n) → ℝ × EuclideanSpace ℝ (Fin n) := |
| 50 | fun z => z + d |
| 51 | have hshift : Continuous shift := continuous_id.add continuous_const |
| 52 | have himage : shift '' K ⊆ {z | z.1 ∈ Iio T ∧ |
| 53 | z.2 ∈ (extChartAt (𝓡 n) q).target ∧ |
| 54 | (extChartAt (𝓡 n) q).symm z.2 ∈ G.exhaustion j} := by |
| 55 | rintro _ ⟨z, hz, rfl⟩ |
| 56 | simpa only [mem_setOf_eq, shift, d, Prod.fst_add, Prod.snd_add, add_zero, mem_Iio] |
| 57 | using hKU hz |
| 58 | obtain ⟨N, hjN, hN⟩ := G.pullback_metric_CInfinity q j r |
| 59 | (shift '' K) (hK.image hshift) himage ε hε |
| 60 | refine ⟨N, hjN, fun k hk a b z hz => ?_⟩ |
| 61 | have hs := hN k hk a b (shift z) (mem_image_of_mem shift hz) |
| 62 | let f := G.limitCarrier.coordinateCoefficient q |
| 63 | (fun t x v w => spatialPullbackInner G.limitCarrier (C (G.subsequence k)) |
| 64 | (g (G.subsequence k) t) (G.embedding k) x v w) a b |
| 65 | let l := G.limitCarrier.coordinateCoefficient q |
| 66 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metric t) x v w) a b |
| 67 | change ‖iteratedFDeriv ℝ r f (z + d) - iteratedFDeriv ℝ r l (z + d)‖ < ε at hs |
| 68 | rw [← iteratedFDeriv_comp_add_right (𝕜 := ℝ) (f := f) r d z, |
| 69 | ← iteratedFDeriv_comp_add_right (𝕜 := ℝ) (f := l) r d z] at hs |
| 70 | have hadd (u : ℝ × EuclideanSpace ℝ (Fin n)) : u + d = (u.1 + c, u.2) := |
| 71 | Prod.ext rfl (add_zero _) |
| 72 | have hf : (fun u => f (u + d)) = G.limitCarrier.coordinateCoefficient q |
| 73 | (fun t x v w => spatialPullbackInner G.limitCarrier (C (G.subsequence k)) |
| 74 | (g (G.subsequence k) (t + c)) (G.embedding k) x v w) a b := by |
| 75 | funext u |
| 76 | rw [hadd] |
| 77 | rfl |
| 78 | have hl : (fun u => l (u + d)) = G.limitCarrier.coordinateCoefficient q |
| 79 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metric (t + c)) x v w) |
| 80 | a b := by |
| 81 | funext u |
| 82 | rw [hadd] |
| 83 | rfl |
| 84 | rwa [hf, hl] at hs |
| 85 | |
| 86 | /-- Translate an ancient convergence in time without changing its spatial |
| 87 | carrier, exhaustion, embeddings or selected subsequence. -/ |
| 88 | def translate |
| 89 | {n : ℕ} {C : ℕ → FlowCarrier.{0} n} {g : ∀ k, ℝ → (C k).metric} |
| 90 | {p : ∀ k, (C k).carrier} {T : ℝ} |
| 91 | (G : AncientPointedGeometricConvergence C g p T) (c : ℝ) : |
| 92 | AncientPointedGeometricConvergence C (fun k t => g k (t + c)) p (T - c) where |
| 93 | limitCarrier := G.limitCarrier |
| 94 | limitFlow := G.limitFlow.translate c (by |
| 95 | rintro _ ⟨t, ht, rfl⟩ |
| 96 | exact show t + c < T by have := ht; change t < T - c at this; linarith) |
| 97 | ordConnected_Iio ⟨T - c - 2, by simp, T - c - 1, by simp, by linarith⟩ |
| 98 | base := G.base |
| 99 | subsequence := G.subsequence |
| 100 | subsequence_strictMono := G.subsequence_strictMono |
| 101 | exhaustion := G.exhaustion |
| 102 | exhaustion_open := G.exhaustion_open |
| 103 | exhaustion_connected := G.exhaustion_connected |
| 104 | exhaustion_compactClosure := G.exhaustion_compactClosure |
| 105 | exhaustion_increasing := G.exhaustion_increasing |
| 106 | exhaustion_covers := G.exhaustion_covers |
| 107 | embedding := G.embedding |
| 108 | embedding_open := G.embedding_open |
| 109 | embedding_smooth := G.embedding_smooth |
| 110 | base_in_exhaustion := G.base_in_exhaustion |
| 111 | base_preserving := G.base_preserving |
| 112 | pullback_metric_converges := by |
| 113 | intro j K I hK hKj hI hIt ε hε |
| 114 | have hshift : (fun t : ℝ => t + c) '' I ⊆ Iio T := by |
| 115 | rintro _ ⟨t, ht, rfl⟩ |
| 116 | have := hIt ht |
| 117 | change t < T - c at this |
| 118 | exact show t + c < T by linarith |
| 119 | obtain ⟨N, hjN, hN⟩ := G.pullback_metric_converges j K |
| 120 | ((fun t : ℝ => t + c) '' I) hK hKj |
| 121 | (hI.image (continuous_id.add continuous_const)) hshift ε hε |
| 122 | exact ⟨N, hjN, fun k hk t ht => hN k hk (t + c) (mem_image_of_mem _ ht)⟩ |
| 123 | pullback_metric_CInfinity := by |
| 124 | intro q j r K hK hKU ε hε |
| 125 | exact G.pullback_metric_CInfinity_translate c q j r K hK |
| 126 | (fun z hz => ⟨by have := (hKU hz).1; change z.1 < T - c at this; linarith, |
| 127 | (hKU hz).2⟩) ε hε |
| 128 | |
| 129 | end AncientPointedGeometricConvergence |
| 130 | |
| 131 | namespace NormalizedKappaSolutionSequence |
| 132 | |
| 133 | local instance timeShiftSourceConnected {κ : ℝ} (S : NormalizedKappaSolutionSequence κ) |
| 134 | (k : ℕ) : ConnectedSpace (S.term k).carrier.carrier := (S.term k).connectedSpace |
| 135 | |
| 136 | /-- The shifted interior limit converges in the original normalized source |
| 137 | time, with exactly the original spatial maps and subsequence. -/ |
| 138 | theorem interiorLimit_pullback_metric_CInfinity_unshifted |
| 139 | {κ : ℝ} (S : NormalizedKappaSolutionSequence κ) |
| 140 | (G : AncientPointedGeometricConvergence (fun k => (S.term k).carrier) |
| 141 | (fun k t => (S.term k).flow.flow.metric (t - 1)) (fun k => (S.term k).base) 1) |
| 142 | (q : G.limitCarrier.carrier) (j r : ℕ) |
| 143 | (K : Set (ℝ × EuclideanSpace ℝ (Fin 3))) (hK : IsCompact K) |
| 144 | (hKU : K ⊆ {z | z.1 < 0 ∧ z.2 ∈ (extChartAt (𝓡 3) q).target ∧ |
| 145 | (extChartAt (𝓡 3) q).symm z.2 ∈ G.exhaustion j}) |
| 146 | (ε : ℝ) (hε : 0 < ε) : |
| 147 | ∃ N : ℕ, j ≤ N ∧ ∀ k ≥ N, ∀ a b : Fin 3, ∀ z ∈ K, |
| 148 | ‖iteratedFDeriv ℝ r |
| 149 | (G.limitCarrier.coordinateCoefficient q |
| 150 | (fun t x v w => spatialPullbackInner G.limitCarrier |
| 151 | (S.term (G.subsequence k)).carrier ((S.term (G.subsequence k)).flow.flow.metric t) |
| 152 | (G.embedding k) x v w) a b) z - |
| 153 | iteratedFDeriv ℝ r |
| 154 | (G.limitCarrier.coordinateCoefficient q |
| 155 | (fun t x v w => G.limitCarrier.metricInner |
| 156 | (G.limitFlow.metric (t + 1)) x v w) a b) z‖ < ε := by |
| 157 | simpa only [add_sub_cancel_right] using |
| 158 | G.pullback_metric_CInfinity_translate 1 q j r K hK |
| 159 | (fun z hz => ⟨by linarith [(hKU hz).1], (hKU hz).2⟩) ε hε |
| 160 | |
| 161 | end NormalizedKappaSolutionSequence |
| 162 | |
| 163 | end PoincareMT |