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.BallTransfer |
| 2 | import PoincareLib.Topology.MetricSpace.Completeness |
| 3 | |
| 4 | /-! |
| 5 | # Source-ball coverage and completeness of a pointed limit |
| 6 | |
| 7 | If each fixed source ball is eventually covered by one fixed limit exhaustion |
| 8 | stage, the limit balls have compact closure. Consequently the zero-time limit |
| 9 | is complete, even when the source metrics are incomplete. This is the |
| 10 | completeness step of Morgan--Tian, Theorem 5.9 and Corollary 5.10, pp. 88--89. |
| 11 | |
| 12 | The geometric construction must establish the coverage hypothesis. Smooth |
| 13 | convergence by itself does not supply it. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 20 | |
| 21 | namespace PoincareMT.PointedGeometricConvergence |
| 22 | |
| 23 | variable {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 24 | |
| 25 | /-- Coverage of one doubled source ball forces the corresponding limit ball |
| 26 | into the same exhaustion stage. -/ |
| 27 | theorem zeroBall_subset_exhaustion_of_source_ball_coverage |
| 28 | (G : PointedGeometricConvergence S) (hT : T' < 0 ∧ 0 < T) |
| 29 | {A : ℝ} {j : ℕ} |
| 30 | (hcover : ∀ᶠ k in atTop, |
| 31 | (S.flow (G.subsequence k)).zeroBall (2 * A) ⊆ |
| 32 | (fun x => ((G.embedding k).toFun (0, x)).2) '' G.exhaustion j) : |
| 33 | G.limitFlow.zeroBall A ⊆ G.exhaustion j := by |
| 34 | let : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 35 | intro x hx |
| 36 | have hxball : x ∈ G.limitFlow.ballAt 0 A := hx |
| 37 | obtain ⟨jx, hjx⟩ := G.exists_exhaustion_superset (K := {x}) isCompact_singleton |
| 38 | have hxstage : x ∈ G.exhaustion jx := hjx (mem_singleton x) |
| 39 | obtain ⟨k, hkcover, hkball, hkj, hkjx⟩ := |
| 40 | (hcover.and ((G.eventually_mem_ballAt hT hT hxball).and |
| 41 | ((eventually_ge_atTop j).and (eventually_ge_atTop jx)))).exists |
| 42 | obtain ⟨y, hy, heq⟩ := hkcover hkball |
| 43 | have heq' : (G.embedding k).toFun (0, y) = (G.embedding k).toFun (0, x) := by |
| 44 | apply Prod.ext |
| 45 | · simp only [(G.embedding k).time_preserving] |
| 46 | · exact heq |
| 47 | have hyx : y = x := congrArg Prod.snd ((G.embedding k).injective_on (x₁ := (0, y)) |
| 48 | (x₂ := (0, x)) |
| 49 | ⟨hT, G.exhaustion_monotone hkj hy⟩ |
| 50 | ⟨hT, G.exhaustion_monotone hkjx hxstage⟩ heq') |
| 51 | simpa only [hyx] using hy |
| 52 | |
| 53 | /-- Source-ball coverage gives compact closures of every zero-time limit ball. -/ |
| 54 | theorem isCompact_closure_zeroBall_of_source_ball_coverage |
| 55 | (G : PointedGeometricConvergence S) (hT : T' < 0 ∧ 0 < T) |
| 56 | (hcover : ∀ A : ℝ, 0 < A → ∃ j : ℕ, ∀ᶠ k in atTop, |
| 57 | (S.flow (G.subsequence k)).zeroBall A ⊆ |
| 58 | (fun x => ((G.embedding k).toFun (0, x)).2) '' G.exhaustion j) |
| 59 | (A : ℝ) (hA : 0 < A) : |
| 60 | letI : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 61 | IsCompact (closure (G.limitFlow.zeroBall A)) := by |
| 62 | let : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 63 | obtain ⟨j, hj⟩ := hcover (2 * A) (by positivity) |
| 64 | exact (G.exhaustion_compactClosure j).of_isClosed_subset isClosed_closure |
| 65 | (closure_mono (G.zeroBall_subset_exhaustion_of_source_ball_coverage hT hj)) |
| 66 | |
| 67 | set_option backward.isDefEq.respectTransparency false in |
| 68 | /-- Coverage by fixed exhaustion stages makes the zero-time limit complete. |
| 69 | No completeness assumption is imposed on any approximating flow. -/ |
| 70 | theorem metricComplete_zero_of_source_ball_coverage |
| 71 | (G : PointedGeometricConvergence S) (hT : T' < 0 ∧ 0 < T) |
| 72 | (hcover : ∀ A : ℝ, 0 < A → ∃ j : ℕ, ∀ᶠ k in atTop, |
| 73 | (S.flow (G.subsequence k)).zeroBall A ⊆ |
| 74 | (fun x => ((G.embedding k).toFun (0, x)).2) '' G.exhaustion j) : |
| 75 | G.limitCarrier.metricComplete (G.limitFlow.metricAt 0) := by |
| 76 | let : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 77 | let : EMetricSpace G.limitCarrier.carrier := |
| 78 | G.limitCarrier.metricEMetricSpace (G.limitFlow.metricAt 0) |
| 79 | let : PreconnectedSpace G.limitCarrier.carrier := |
| 80 | FlowCarrier.preconnected_metricEMetricSpace G.limitCarrier (G.limitFlow.metricAt 0) |
| 81 | change CompleteSpace G.limitCarrier.carrier |
| 82 | apply EMetric.complete_of_cauchySeq_tendsto |
| 83 | intro u hu |
| 84 | obtain ⟨N, hN⟩ := EMetric.cauchySeq_iff'.mp hu 1 zero_lt_one |
| 85 | let d := edist (u N) G.limitFlow.base |
| 86 | have hd : d ≠ ⊤ := Poincare.edist_ne_top_of_preconnected _ _ |
| 87 | let R : ℝ := d.toReal + 2 |
| 88 | have hR : 0 < R := by dsimp [R]; positivity |
| 89 | have hcompact := G.isCompact_closure_zeroBall_of_source_ball_coverage hT hcover R hR |
| 90 | have htail : ∀ᶠ k in atTop, u k ∈ closure (G.limitFlow.zeroBall R) := by |
| 91 | filter_upwards [eventually_ge_atTop N] with k hk |
| 92 | apply subset_closure |
| 93 | change edist G.limitFlow.base (u k) < ENNReal.ofReal R |
| 94 | rw [edist_comm] |
| 95 | calc |
| 96 | edist (u k) G.limitFlow.base ≤ edist (u k) (u N) + d := edist_triangle _ _ _ |
| 97 | _ < 1 + d := ENNReal.add_lt_add_right hd (hN k hk) |
| 98 | _ ≤ ENNReal.ofReal R := by |
| 99 | dsimp [R] |
| 100 | rw [ENNReal.ofReal_add ENNReal.toReal_nonneg (by norm_num), |
| 101 | ENNReal.ofReal_toReal hd] |
| 102 | norm_num |
| 103 | simpa only [add_comm d] using |
| 104 | add_le_add_left (by norm_num : (1 : ℝ≥0∞) ≤ 2) d |
| 105 | obtain ⟨x, _, hx⟩ := hcompact.isComplete (map u atTop) hu |
| 106 | (le_principal_iff.mpr htail) |
| 107 | exact ⟨x, hx⟩ |
| 108 | |
| 109 | end PoincareMT.PointedGeometricConvergence |