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.LocalControl |
| 2 | import PoincareLib.Geometry.RicciFlow.MetricComparison |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.NormBounds |
| 4 | |
| 5 | /-! |
| 6 | # Precompact local cylinders at every interior time |
| 7 | |
| 8 | The two-time curvature hypothesis compares each interior-time ball to a |
| 9 | uniformly larger zero-time ball. The latter is eventually precompact, so |
| 10 | the former is eventually precompact simultaneously at every interior time. |
| 11 | Diagonal selection retains this property on every earlier integer-radius |
| 12 | stage together with curvature control and the fixed noncollapse scale. |
| 13 | |
| 14 | These are local-cylinder inputs to Morgan--Tian, Theorem 3.28, p. 51, and |
| 15 | Proposition 5.14, pp. 90--91. Positive-order Shi derivative estimates and |
| 16 | normal-coordinate extraction remain separate proof obligations. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | namespace PoincareMT.PointedRicciFlowCompactnessHypotheses |
| 23 | |
| 24 | /-- All reference-time balls of a fixed radius lie in uniformly bounded balls |
| 25 | at any other time, with one eventual threshold for every pair of times. -/ |
| 26 | theorem exists_uniform_ball_containment |
| 27 | {n : ℕ} {T' T : ℝ} |
| 28 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 29 | (A : ℝ) (hA : 0 < A) : |
| 30 | ∃ B : ℝ, 0 < B ∧ ∀ᶠ k in Filter.atTop, |
| 31 | ∀ s ∈ Set.Ioo T' T, ∀ t ∈ Set.Ioo T' T, |
| 32 | (H.sequence.flow k).ballAt s A ⊆ (H.sequence.flow k).ballAt t B := by |
| 33 | obtain ⟨K, hK, hcurv⟩ := H.all_time_curvature_control A hA |
| 34 | let L : ℝ := (n : ℝ) ^ 3 * K |
| 35 | have hL : 0 ≤ L := mul_nonneg (by positivity) hK |
| 36 | refine ⟨Real.exp (L * (T - T')) * A, mul_pos (Real.exp_pos _) hA, ?_⟩ |
| 37 | filter_upwards [hcurv] with k hk |
| 38 | let C := H.sequence.carrier k |
| 39 | let F := H.sequence.flow k |
| 40 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 41 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 42 | let : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 43 | let : T2Space C.carrier := C.t2Space |
| 44 | intro s hs t ht |
| 45 | have hRic : ∀ τ ∈ Set.Ioo T' T, ∀ x ∈ F.ballAt s A, |
| 46 | ∀ v : C.tangent x, |
| 47 | |(F.flow.connection τ).ricci x v v| ≤ L * (F.flow.metric τ).inner x v v := by |
| 48 | intro τ hτ x hx v |
| 49 | have hQ : 0 ≤ (F.flow.metric τ).inner x v v := by |
| 50 | by_cases hv : v = 0 |
| 51 | · subst v |
| 52 | simp |
| 53 | · exact ((F.flow.metric τ).pos x v hv).le |
| 54 | have hnorm := (F.flow.connection τ).abs_ricci_quadratic_le_curvatureTensorNorm x v |
| 55 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 n) x) = n := finrank_euclideanSpace_fin |
| 56 | simp only [Fintype.card_fin, hdim] at hnorm |
| 57 | exact hnorm.trans (mul_le_mul_of_nonneg_right |
| 58 | (mul_le_mul_of_nonneg_left (hk s hs τ hτ x hx) (by positivity)) hQ) |
| 59 | have hball := F.flow.ball_subset_ball_of_ricci_bound (convex_Ioo T' T) |
| 60 | (Set.Subset.refl _) F.base A L hs ht hRic |
| 61 | have htime : |t - s| ≤ T - T' := by |
| 62 | rw [abs_le] |
| 63 | constructor <;> linarith [hs.1, hs.2, ht.1, ht.2] |
| 64 | intro x hx |
| 65 | have hx' := hball hx |
| 66 | exact hx'.trans_le (ENNReal.ofReal_le_ofReal |
| 67 | (mul_le_mul_of_nonneg_right |
| 68 | (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left htime hL)) hA.le)) |
| 69 | |
| 70 | /-- The eventual compactness threshold for a fixed radius works at every |
| 71 | interior time, despite the frozen input mentioning only zero-time balls. -/ |
| 72 | theorem eventually_all_time_ball_compact |
| 73 | {n : ℕ} {T' T : ℝ} |
| 74 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 75 | (A : ℝ) (hA : 0 < A) : |
| 76 | ∀ᶠ k in Filter.atTop, |
| 77 | let C := H.sequence.carrier k |
| 78 | let F := H.sequence.flow k |
| 79 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 80 | ∀ t ∈ Set.Ioo T' T, IsCompact (closure (F.ballAt t A)) := by |
| 81 | obtain ⟨B, hB, hcontain⟩ := H.exists_uniform_ball_containment A hA |
| 82 | filter_upwards [hcontain, H.zero_time_ball_compact B hB] with k hk hcompact |
| 83 | let C := H.sequence.carrier k |
| 84 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 85 | change ∀ t ∈ Set.Ioo T' T, IsCompact (closure ((H.sequence.flow k).ballAt t A)) |
| 86 | intro t ht |
| 87 | apply hcompact.of_isClosed_subset isClosed_closure |
| 88 | exact closure_mono (hk t ht 0 ⟨H.time_bounds.1, H.time_bounds.2⟩) |
| 89 | |
| 90 | /-- A single subsequence supplies precompact reference balls at every interior |
| 91 | time and two-time curvature bounds on all earlier integer-radius stages. -/ |
| 92 | theorem exists_uniform_interior_local_control |
| 93 | {n : ℕ} {T' T : ℝ} |
| 94 | (H : PointedRicciFlowCompactnessHypotheses n T' T) : |
| 95 | ∃ r₀ κ : ℝ, 0 < r₀ ∧ 0 < κ ∧ |
| 96 | ∃ K : ℕ → ℝ, (∀ j, 0 ≤ K j) ∧ |
| 97 | ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ k, |
| 98 | ENNReal.ofReal (κ * r₀ ^ n) ≤ (H.sequence.flow (φ k)).zeroBallVolume r₀ ∧ |
| 99 | ∀ j, j ≤ k → |
| 100 | let C := H.sequence.carrier (φ k) |
| 101 | let F := H.sequence.flow (φ k) |
| 102 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 103 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 104 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 105 | (∀ s ∈ Set.Ioo T' T, IsCompact (closure (F.ballAt s (j + 1)))) ∧ |
| 106 | ∀ s ∈ Set.Ioo T' T, ∀ t ∈ Set.Ioo T' T, |
| 107 | ∀ x ∈ F.ballAt s (j + 1), |
| 108 | (F.flow.connection t).curvatureTensorNorm x ≤ K j := by |
| 109 | obtain ⟨r₀, κ, hr₀, hκ, hvolume⟩ := H.noncollapsing |
| 110 | choose K hK hbound using fun j : ℕ => |
| 111 | H.all_time_curvature_control (j + 1) (by positivity) |
| 112 | have hlocal (j : ℕ) := |
| 113 | (H.eventually_all_time_ball_compact (j + 1) (by positivity)).and (hbound j) |
| 114 | obtain ⟨φ, hφ, hstage⟩ := |
| 115 | Poincare.exists_strictMono_forall_le_of_eventually |
| 116 | (fun j => hvolume.and (hlocal j)) |
| 117 | exact ⟨r₀, κ, hr₀, hκ, K, hK, φ, hφ, fun k => |
| 118 | ⟨(hstage k 0 (Nat.zero_le k)).1, fun j hj => (hstage k j hj).2⟩⟩ |
| 119 | |
| 120 | end PoincareMT.PointedRicciFlowCompactnessHypotheses |