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.Producer |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Exhaustion |
| 3 | import PoincareLib.Topology.Sequences.Diagonal |
| 4 | |
| 5 | /-! |
| 6 | # Limit-carrier assembly |
| 7 | |
| 8 | The Shi and Cheeger--Gromov argument has two logically different outputs. The |
| 9 | analytic part constructs a smooth carrier, a limiting flow, and local |
| 10 | embeddings with their convergence estimates. The topological part turns the |
| 11 | carrier into the connected relatively compact exhaustion required by the |
| 12 | frozen contract. This file records the checked assembly of those outputs. |
| 13 | |
| 14 | The `PointedGeometricConvergenceCore` is a conditional assembly input. It |
| 15 | uses one compatible exhaustion, so the local construction only has to produce |
| 16 | embeddings on the stages that will be retained in the pointed convergence. |
| 17 | No existence theorem for this input is asserted here; controlled coordinates, |
| 18 | their compatible gluing, and the subsequence extraction remain the geometric |
| 19 | construction step. |
| 20 | -/ |
| 21 | |
| 22 | set_option autoImplicit false |
| 23 | |
| 24 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 25 | |
| 26 | namespace PoincareMT |
| 27 | |
| 28 | /-- Local limit data, before choosing the topological exhaustion of the limit |
| 29 | carrier. -/ |
| 30 | structure PointedGeometricConvergenceCore |
| 31 | {n : ℕ} {T' T : ℝ} (S : PointedFlowSequence n T' T) |
| 32 | (L : FlowCarrier n) (F : BasedFlow n T' T L) (φ : ℕ → ℕ) where |
| 33 | exhaustion : ℕ → Set L.carrier |
| 34 | exhaustion_open : ∀ j, |
| 35 | letI : TopologicalSpace L.carrier := L.topologicalSpace |
| 36 | IsOpen (exhaustion j) |
| 37 | exhaustion_connected : ∀ j, |
| 38 | letI : TopologicalSpace L.carrier := L.topologicalSpace |
| 39 | IsConnected (exhaustion j) |
| 40 | exhaustion_compactClosure : ∀ j, |
| 41 | letI : TopologicalSpace L.carrier := L.topologicalSpace |
| 42 | IsCompact (closure (exhaustion j)) |
| 43 | exhaustion_increasing : ∀ j, exhaustion j ⊆ exhaustion (j + 1) |
| 44 | exhaustion_covers : ⋃ j, exhaustion j = Set.univ |
| 45 | embedding : ∀ j, |
| 46 | SmoothSpacetimeEmbedding F (S.flow (φ j)) |
| 47 | (Set.Ioo T' T ×ˢ exhaustion j) |
| 48 | base_in_exhaustion : ∀ j, F.base ∈ exhaustion j |
| 49 | base_preserving : ∀ j, |
| 50 | (embedding j).toFun (0, F.base) = (0, (S.flow (φ j)).base) |
| 51 | pullback_metric_converges : |
| 52 | letI : TopologicalSpace L.carrier := L.topologicalSpace |
| 53 | ∀ j K I, IsCompact K → K ⊆ exhaustion j → IsCompact I → |
| 54 | I ⊆ Set.Ioo T' T → ∀ ε > 0, ∃ N : ℕ, j ≤ N ∧ ∀ k ≥ N, |
| 55 | ∀ t ∈ I, ∀ x ∈ K, ∀ v w : L.tangent x, |
| 56 | L.metricNorm (F.metricAt t) x v ≤ 1 → |
| 57 | L.metricNorm (F.metricAt t) x w ≤ 1 → |
| 58 | |pullbackInnerValue F (S.flow (φ k)) (embedding k) t x v w - |
| 59 | L.metricInner (F.metricAt t) x v w| < ε |
| 60 | pullback_metric_CInfinity : |
| 61 | letI : TopologicalSpace L.carrier := L.topologicalSpace |
| 62 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) L.carrier := L.chartedSpace |
| 63 | letI : IsManifold (𝓡 n) ∞ L.carrier := L.isManifold |
| 64 | ∀ q : L.carrier, ∀ j r : ℕ, |
| 65 | ∀ K : Set (ℝ × EuclideanSpace ℝ (Fin n)), IsCompact K → |
| 66 | K ⊆ {p | p.1 ∈ Set.Ioo T' T ∧ |
| 67 | p.2 ∈ (extChartAt (𝓡 n) q).target ∧ |
| 68 | (extChartAt (𝓡 n) q).symm p.2 ∈ exhaustion j} → |
| 69 | ∀ ε : ℝ, 0 < ε → ∃ N : ℕ, j ≤ N ∧ ∀ k ≥ N, |
| 70 | ∀ a b : Fin n, ∀ p ∈ K, |
| 71 | ‖MetricJet r |
| 72 | (FlowCarrier.coordinateCoefficient L q |
| 73 | (pullbackInnerValue F (S.flow (φ k)) (embedding k)) |
| 74 | a b) K p - |
| 75 | MetricJet r |
| 76 | (FlowCarrier.coordinateCoefficient L q |
| 77 | (fun t x v w ↦ L.metricInner (F.metricAt t) x v w) |
| 78 | a b) K p‖ < ε |
| 79 | |
| 80 | /-- A local-limit core becomes the frozen geometric convergence conclusion once |
| 81 | the carrier exhaustion is supplied by its intrinsic topology. -/ |
| 82 | def PointedGeometricConvergenceCore.toGeometricLimit |
| 83 | {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 84 | {L : FlowCarrier n} {F : BasedFlow n T' T L} {φ : ℕ → ℕ} |
| 85 | (hφ : StrictMono φ) (C : PointedGeometricConvergenceCore S L F φ) : |
| 86 | PointedGeometricConvergence S := by |
| 87 | letI : TopologicalSpace L.carrier := L.topologicalSpace |
| 88 | exact |
| 89 | { limitCarrier := L |
| 90 | limitFlow := F |
| 91 | subsequence := φ |
| 92 | subsequence_strictMono := hφ |
| 93 | exhaustion := C.exhaustion |
| 94 | exhaustion_open := C.exhaustion_open |
| 95 | exhaustion_connected := C.exhaustion_connected |
| 96 | exhaustion_compactClosure := C.exhaustion_compactClosure |
| 97 | exhaustion_increasing := C.exhaustion_increasing |
| 98 | exhaustion_covers := C.exhaustion_covers |
| 99 | embedding := C.embedding |
| 100 | base_in_exhaustion := C.base_in_exhaustion |
| 101 | base_preserving := C.base_preserving |
| 102 | pullback_metric_converges := C.pullback_metric_converges |
| 103 | pullback_metric_CInfinity := C.pullback_metric_CInfinity } |
| 104 | |
| 105 | /-- The checked geometric producer obtained from a local-limit core. -/ |
| 106 | def PointedGeometricConvergenceCore.toProducer |
| 107 | {n : ℕ} {T' T : ℝ} {H : PointedRicciFlowCompactnessHypotheses n T' T} |
| 108 | {L : FlowCarrier n} {F : BasedFlow n T' T L} {φ : ℕ → ℕ} |
| 109 | (hφ : StrictMono φ) (C : PointedGeometricConvergenceCore H.sequence L F φ) : |
| 110 | PointedRicciFlowGeometricProducer H where |
| 111 | geometric_limit := C.toGeometricLimit hφ |
| 112 | |
| 113 | end PoincareMT |
| 114 | |
| 115 | namespace Poincare |
| 116 | |
| 117 | /-- Name the diagonal selection used by the local-limit construction. -/ |
| 118 | theorem exists_diagonal_stage_selection |
| 119 | {P : ℕ → ℕ → Prop} (hP : ∀ j, ∀ᶠ k in Filter.atTop, P j k) : |
| 120 | ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ k j, j ≤ k → P j (φ k) := by |
| 121 | exact exists_strictMono_forall_le_of_eventually hP |
| 122 | |
| 123 | end Poincare |