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.GeometricLimit.BoundaryCoverage |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Assembly |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.LimitCarrier |
| 4 | |
| 5 | /-! |
| 6 | # Complete geometric limits from escaping boundaries |
| 7 | |
| 8 | For a supplied pointed geometric convergence on a chosen exhaustion, boundary |
| 9 | escape gives source-ball coverage and a complete zero-time limit metric. |
| 10 | The two-time curvature bounds then give completeness at every interior time. |
| 11 | No completeness of an approximating source is used. |
| 12 | |
| 13 | The geometric convergence and boundary escape remain hypotheses. Constructing |
| 14 | them from the frozen M07 assumptions requires controlled coordinates and a |
| 15 | compatible exhaustion. The core adapter below records the same assembly before |
| 16 | the frozen convergence record is packaged. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | open Set Filter |
| 22 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {n : ℕ} {T' T : ℝ} |
| 27 | |
| 28 | namespace PointedGeometricConvergenceCore |
| 29 | |
| 30 | /-- The boundary-escape condition for the exhaustion retained by a local |
| 31 | geometric-limit core. -/ |
| 32 | def boundaryEscape |
| 33 | {S : PointedFlowSequence n T' T} |
| 34 | {L : FlowCarrier n} {F : BasedFlow n T' T L} {φ : ℕ → ℕ} |
| 35 | (_hφ : StrictMono φ) (C : PointedGeometricConvergenceCore S L F φ) : Prop := |
| 36 | ∀ A : ℝ, 0 < A → ∃ j : ℕ, ∀ᶠ k in atTop, |
| 37 | ∀ x ∈ @frontier L.carrier L.topologicalSpace (C.exhaustion j), |
| 38 | ENNReal.ofReal A ≤ |
| 39 | ((S.carrier (φ k)).metricEMetricSpace |
| 40 | ((S.flow (φ k)).metricAt 0)).edist |
| 41 | (S.flow (φ k)).base |
| 42 | ((C.embedding k).toFun (0, x)).2 |
| 43 | |
| 44 | /-- Boundary escape makes the zero-time metric of the core limit complete. -/ |
| 45 | theorem metricComplete_zero_of_boundary_escape |
| 46 | {S : PointedFlowSequence n T' T} |
| 47 | {L : FlowCarrier.{0} n} {F : BasedFlow n T' T L} {φ : ℕ → ℕ} |
| 48 | (hφ : StrictMono φ) (C : PointedGeometricConvergenceCore S L F φ) |
| 49 | (hT : T' < 0 ∧ 0 < T) |
| 50 | (hescape : C.boundaryEscape hφ) : |
| 51 | (C.toGeometricLimit hφ).limitCarrier.metricComplete |
| 52 | ((C.toGeometricLimit hφ).limitFlow.metricAt 0) := by |
| 53 | let G := C.toGeometricLimit hφ |
| 54 | apply G.metricComplete_zero_of_boundary_escape hT |
| 55 | exact hescape |
| 56 | |
| 57 | end PointedGeometricConvergenceCore |
| 58 | |
| 59 | /-- A pointed geometric convergence whose exhaustion boundaries escape every |
| 60 | fixed source ball satisfies the frozen compactness conclusion. -/ |
| 61 | theorem pointedRicciFlowCompactness_of_boundary_escape |
| 62 | {H : PointedRicciFlowCompactnessHypotheses n T' T} |
| 63 | (G : PointedGeometricConvergence H.sequence) |
| 64 | (hescape : ∀ A : ℝ, 0 < A → ∃ j : ℕ, ∀ᶠ k in atTop, |
| 65 | ∀ x ∈ @frontier G.limitCarrier.carrier G.limitCarrier.topologicalSpace |
| 66 | (G.exhaustion j), |
| 67 | ENNReal.ofReal A ≤ |
| 68 | ((H.sequence.carrier (G.subsequence k)).metricEMetricSpace |
| 69 | ((H.sequence.flow (G.subsequence k)).metricAt 0)).edist |
| 70 | (H.sequence.flow (G.subsequence k)).base |
| 71 | ((G.embedding k).toFun (0, x)).2) : |
| 72 | Nonempty (PointedRicciFlowCompactnessConclusion H) := by |
| 73 | exact pointedRicciFlowCompactness_of_geometric_limit G |
| 74 | (G.metricComplete_zero_of_boundary_escape H.time_bounds hescape) |
| 75 | |
| 76 | /-- Boundary escape on a strict reindexing gives the frozen conclusion for the |
| 77 | original sequence. Geometric-limit construction naturally selects a |
| 78 | subsequence before the final contract is assembled; this adapter preserves |
| 79 | that selection while restoring the original hypothesis object. -/ |
| 80 | theorem pointedRicciFlowCompactness_of_boundary_escape_of_subsequence |
| 81 | {H : PointedRicciFlowCompactnessHypotheses n T' T} |
| 82 | {φ : ℕ → ℕ} (hφ : StrictMono φ) |
| 83 | (G : PointedGeometricConvergence (H.subsequence φ hφ).sequence) |
| 84 | (hescape : ∀ A : ℝ, 0 < A → ∃ j : ℕ, ∀ᶠ k in atTop, |
| 85 | ∀ x ∈ @frontier G.limitCarrier.carrier G.limitCarrier.topologicalSpace |
| 86 | (G.exhaustion j), |
| 87 | ENNReal.ofReal A ≤ |
| 88 | (((H.subsequence φ hφ).sequence.carrier (G.subsequence k)).metricEMetricSpace |
| 89 | (((H.subsequence φ hφ).sequence.flow (G.subsequence k)).metricAt 0)).edist |
| 90 | ((H.subsequence φ hφ).sequence.flow (G.subsequence k)).base |
| 91 | ((G.embedding k).toFun (0, x)).2) : |
| 92 | Nonempty (PointedRicciFlowCompactnessConclusion H) := by |
| 93 | obtain ⟨C⟩ := pointedRicciFlowCompactness_of_boundary_escape |
| 94 | (H := H.subsequence φ hφ) G hescape |
| 95 | exact ⟨C.ofSubsequence⟩ |
| 96 | |
| 97 | /-- A chosen-exhaustion core together with boundary escape supplies the frozen |
| 98 | compactness conclusion. -/ |
| 99 | theorem pointedRicciFlowCompactness_of_core_boundary_escape |
| 100 | {H : PointedRicciFlowCompactnessHypotheses n T' T} |
| 101 | {L : FlowCarrier.{0} n} {F : BasedFlow n T' T L} {φ : ℕ → ℕ} |
| 102 | (hφ : StrictMono φ) (C : PointedGeometricConvergenceCore H.sequence L F φ) |
| 103 | (hescape : C.boundaryEscape hφ) : |
| 104 | Nonempty (PointedRicciFlowCompactnessConclusion H) := by |
| 105 | let G := C.toGeometricLimit hφ |
| 106 | exact pointedRicciFlowCompactness_of_geometric_limit G |
| 107 | (PointedGeometricConvergenceCore.metricComplete_zero_of_boundary_escape |
| 108 | hφ C H.time_bounds hescape) |
| 109 | |
| 110 | end PoincareMT |