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.Embedding.CompactBallTransfer |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.MetricMonotonicity |
| 3 | import PoincareLib.Geometry.Riemannian.Metric.Diffeomorph |
| 4 | |
| 5 | /-! |
| 6 | # Terminal ball bounds for the stored convergence embeddings |
| 7 | |
| 8 | Compact subsets of a complete pointed limit have uniformly bounded images at |
| 9 | the reference time. Nonnegative Ricci curvature transfers this bound to a |
| 10 | later slice of the same source flows, retaining the stored maps and centers. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.PointedGeometricConvergence |
| 22 | |
| 23 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 24 | FlowCarrier.isManifold FlowCarrier.t3Space |
| 25 | |
| 26 | variable {n : ℕ} {a b : ℝ} {S : PointedFlowSequence n a b} |
| 27 | |
| 28 | /-- The actual time-zero embeddings of a compact limit set remain uniformly |
| 29 | bounded at a later source time under nonnegative Ricci curvature. The source |
| 30 | time and metric identifications need hold only eventually. -/ |
| 31 | theorem exists_pos_eventually_embedding_edist_le_of_ricci_nonneg |
| 32 | (G : PointedGeometricConvergence S) (hzero : a < 0 ∧ 0 < b) |
| 33 | (hcomplete : G.limitCarrier.metricComplete (G.limitFlow.metricAt 0)) |
| 34 | {K : Set G.limitCarrier.carrier} (hK : IsCompact K) |
| 35 | {J : ℕ → Set ℝ} (F : ∀ k, RicciFlow n (S.carrier k).carrier (J k)) |
| 36 | {s t : ℝ} (hst : s ≤ t) |
| 37 | (hmetric : ∀ᶠ k in atTop, (S.flow k).metricAt 0 = (F k).metric s) |
| 38 | (htime : ∀ᶠ k in atTop, Icc s t ⊆ interior (J k)) |
| 39 | (hRic : ∀ᶠ k in atTop, ∀ u ∈ Icc s t, ∀ x : (S.carrier k).carrier, |
| 40 | ∀ v : TangentSpace (𝓡 n) x, 0 ≤ ((F k).connection u).ricci x v v) : |
| 41 | ∃ R : ℝ, 0 < R ∧ ∀ᶠ k in atTop, ∀ x ∈ K, |
| 42 | ((F (G.subsequence k)).metric t).edist (S.flow (G.subsequence k)).base |
| 43 | (((G.embedding k).toFun (0, x)).2) ≤ ENNReal.ofReal R := by |
| 44 | obtain ⟨R, hR, hbound⟩ := |
| 45 | G.exists_pos_eventually_image_subset_ballAt hzero hzero hcomplete hK |
| 46 | refine ⟨R, hR, ?_⟩ |
| 47 | filter_upwards [hbound, |
| 48 | G.subsequence_strictMono.tendsto_atTop.eventually hmetric, |
| 49 | G.subsequence_strictMono.tendsto_atTop.eventually htime, |
| 50 | G.subsequence_strictMono.tendsto_atTop.eventually hRic] with k hk hm ht hRic |
| 51 | intro x hx |
| 52 | have hsource := hk (mem_image_of_mem (fun y => ((G.embedding k).toFun (0, y)).2) hx) |
| 53 | change (((G.embedding k).toFun (0, x)).2) ∈ |
| 54 | ((S.flow (G.subsequence k)).metricAt 0).ball (S.flow (G.subsequence k)).base R |
| 55 | at hsource |
| 56 | rw [hm] at hsource |
| 57 | exact ((F (G.subsequence k)).ball_subset_ball_of_ricci_nonneg ht |
| 58 | (S.flow (G.subsequence k)).base R ⟨le_rfl, hst⟩ ⟨hst, le_rfl⟩ hst |
| 59 | (fun u hu y _ v => hRic u hu y v) hsource).le |
| 60 | |
| 61 | /-- A specified metric-preserving diffeomorphism transports the same compact |
| 62 | image bound to source carriers in an arbitrary universe. The metric equality |
| 63 | is assumed at the tangent level, and the distance equality is derived. -/ |
| 64 | theorem exists_pos_eventually_embedding_edist_le_of_isometric_diffeomorph |
| 65 | (G : PointedGeometricConvergence S) (hzero : a < 0 ∧ 0 < b) |
| 66 | (hcomplete : G.limitCarrier.metricComplete (G.limitFlow.metricAt 0)) |
| 67 | {K : Set G.limitCarrier.carrier} (hK : IsCompact K) |
| 68 | (C : ℕ → FlowCarrier.{u} n) {J : ℕ → Set ℝ} |
| 69 | (F : ∀ k, RicciFlow n (C k).carrier (J k)) |
| 70 | (e : ∀ k, (S.carrier k).carrier ≃ₘ⟮𝓡 n, 𝓡 n⟯ (C k).carrier) |
| 71 | {s t : ℝ} (hst : s ≤ t) |
| 72 | (hmetric : ∀ᶠ k in atTop, ∀ (x : (S.carrier k).carrier) |
| 73 | (v w : TangentSpace (𝓡 n) x), |
| 74 | ((S.flow k).metricAt 0).inner x v w = ((F k).metric s).inner (e k x) |
| 75 | (mfderiv (𝓡 n) (𝓡 n) (e k) x v) (mfderiv (𝓡 n) (𝓡 n) (e k) x w)) |
| 76 | (htime : ∀ᶠ k in atTop, Icc s t ⊆ interior (J k)) |
| 77 | (hRic : ∀ᶠ k in atTop, ∀ u ∈ Icc s t, ∀ x : (C k).carrier, |
| 78 | ∀ v : TangentSpace (𝓡 n) x, 0 ≤ ((F k).connection u).ricci x v v) : |
| 79 | ∃ R : ℝ, 0 < R ∧ ∀ᶠ k in atTop, ∀ x ∈ K, |
| 80 | ((F (G.subsequence k)).metric t).edist |
| 81 | (e (G.subsequence k) (S.flow (G.subsequence k)).base) |
| 82 | (e (G.subsequence k) (((G.embedding k).toFun (0, x)).2)) ≤ ENNReal.ofReal R := by |
| 83 | obtain ⟨R, hR, hbound⟩ := |
| 84 | G.exists_pos_eventually_image_subset_ballAt hzero hzero hcomplete hK |
| 85 | refine ⟨R, hR, ?_⟩ |
| 86 | filter_upwards [hbound, |
| 87 | G.subsequence_strictMono.tendsto_atTop.eventually hmetric, |
| 88 | G.subsequence_strictMono.tendsto_atTop.eventually htime, |
| 89 | G.subsequence_strictMono.tendsto_atTop.eventually hRic] with k hk hm ht hRic |
| 90 | intro x hx |
| 91 | have hsource := hk (mem_image_of_mem (fun y => ((G.embedding k).toFun (0, y)).2) hx) |
| 92 | change ((S.flow (G.subsequence k)).metricAt 0).edist |
| 93 | (S.flow (G.subsequence k)).base (((G.embedding k).toFun (0, x)).2) < |
| 94 | ENNReal.ofReal R at hsource |
| 95 | rw [RiemannianMetric.edist_diffeomorph _ _ (e (G.subsequence k)) hm] at hsource |
| 96 | exact ((F (G.subsequence k)).ball_subset_ball_of_ricci_nonneg ht |
| 97 | (e (G.subsequence k) (S.flow (G.subsequence k)).base) R |
| 98 | ⟨le_rfl, hst⟩ ⟨hst, le_rfl⟩ hst |
| 99 | (fun u hu y _ v => hRic u hu y v) hsource).le |
| 100 | |
| 101 | end PoincareMT.PointedGeometricConvergence |