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.Ancient.Window |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.LocalControl |
| 3 | |
| 4 | /-! |
| 5 | # Compactness inputs on finite windows of expanding source flows |
| 6 | |
| 7 | A reference compactness input transfers its zero-time compactness and volume |
| 8 | to the same carriers on a larger source window. The supplied global curvature |
| 9 | bound gives both frozen curvature fields, with the actual source connections. |
| 10 | This follows Morgan--Tian Proposition 5.14 and Theorem 5.15, pp. 90-92, |
| 11 | and the finite-window construction in Theorem 11.8, pp. 272-279. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | namespace PoincareMT.M30 |
| 20 | |
| 21 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 22 | FlowCarrier.isManifold |
| 23 | |
| 24 | /-- A finite tail of expanding-domain flows gives the exact M07 compactness |
| 25 | input from reference-zero metric equality and a global window curvature bound. |
| 26 | This is the input construction for Morgan--Tian Proposition 5.14 and |
| 27 | Theorem 5.15, pp. 90-92, and Theorem 11.8, pp. 272-279. -/ |
| 28 | theorem exists_expanding_source_window_compactness |
| 29 | {n : ℕ} {s' s : ℝ} |
| 30 | (Href : PointedRicciFlowCompactnessHypotheses n s' s) |
| 31 | {J : ℕ → Set ℝ} |
| 32 | (Fseq : ∀ k, RicciFlow n (Href.sequence.carrier k).carrier (J k)) |
| 33 | (hmetric : ∀ k, |
| 34 | (Fseq k).metric 0 = (Href.sequence.flow k).flow.metric 0) |
| 35 | {a b : ℝ} (hab : a < 0 ∧ 0 < b) |
| 36 | (htime : ∀ᶠ k in atTop, Icc a b ⊆ J k) |
| 37 | (hcurv : ∃ K : ℝ, 0 ≤ K ∧ ∀ᶠ k in atTop, |
| 38 | ∀ t ∈ Ioo a b, ∀ x : (Href.sequence.carrier k).carrier, |
| 39 | ((Fseq k).connection t).curvatureTensorNorm x ≤ K) : |
| 40 | ∃ (N : ℕ) (hsub : ∀ k, Ioo a b ⊆ J (k + N)), |
| 41 | ∃ H : PointedRicciFlowCompactnessHypotheses n a b, |
| 42 | H.sequence = sourceWindowSequence Href.sequence.carrier Fseq |
| 43 | (fun k => (Href.sequence.flow k).base) N hsub |
| 44 | (hab.1.trans hab.2) := by |
| 45 | obtain ⟨N, hsub⟩ := exists_source_window_tail htime |
| 46 | let S := sourceWindowSequence Href.sequence.carrier Fseq |
| 47 | (fun k => (Href.sequence.flow k).base) N hsub (hab.1.trans hab.2) |
| 48 | have hball (k : ℕ) (r : ℝ) : |
| 49 | (S.flow k).zeroBall r = (Href.sequence.flow (k + N)).zeroBall r := by |
| 50 | change (Href.sequence.carrier (k + N)).metricBall |
| 51 | ((Fseq (k + N)).metric 0) (Href.sequence.flow (k + N)).base r = _ |
| 52 | rw [hmetric] |
| 53 | rfl |
| 54 | have hvolume (k : ℕ) (r : ℝ) : |
| 55 | (S.flow k).zeroBallVolume r = (Href.sequence.flow (k + N)).zeroBallVolume r := by |
| 56 | change (Href.sequence.carrier (k + N)).metricHausdorffVolume |
| 57 | ((Fseq (k + N)).metric 0) ((S.flow k).zeroBall r) = _ |
| 58 | rw [hball, hmetric, ← Href.volume_compatibility (k + N)] |
| 59 | rfl |
| 60 | obtain ⟨K, hK, hcurv⟩ := hcurv |
| 61 | have htail := (Filter.tendsto_add_atTop_nat N).eventually hcurv |
| 62 | let H : PointedRicciFlowCompactnessHypotheses n a b := { |
| 63 | time_bounds := hab |
| 64 | sequence := S |
| 65 | volume_compatibility := fun _ => rfl |
| 66 | zero_time_ball_compact := by |
| 67 | intro A hA |
| 68 | filter_upwards [(Filter.tendsto_add_atTop_nat N).eventually |
| 69 | (Href.zero_time_ball_compact A hA)] with k hk |
| 70 | change IsCompact (closure ((S.flow k).zeroBall A)) |
| 71 | rw [hball] |
| 72 | exact hk |
| 73 | spacetime_control := by |
| 74 | intro A _ I _ _ _ hI |
| 75 | refine ⟨K, hK, ?_⟩ |
| 76 | filter_upwards [htail] with k hk |
| 77 | refine ⟨SmoothSpacetimeEmbedding.refl (S.flow k) |
| 78 | (I ×ˢ (S.flow k).zeroBall A), fun _ _ => rfl, ?_⟩ |
| 79 | exact ⟨hK, fun t ht x _ => hk t (hI ht) x⟩ |
| 80 | all_time_curvature_control := by |
| 81 | intro A _ |
| 82 | refine ⟨K, hK, ?_⟩ |
| 83 | filter_upwards [htail] with k hk |
| 84 | dsimp only |
| 85 | intro _ _ t ht x _ |
| 86 | exact hk t ht x |
| 87 | noncollapsing := by |
| 88 | obtain ⟨r, κ, hr, hκ, hvol⟩ := Href.noncollapsing |
| 89 | refine ⟨r, κ, hr, hκ, ?_⟩ |
| 90 | filter_upwards [(Filter.tendsto_add_atTop_nat N).eventually hvol] with k hk |
| 91 | rw [hvolume] |
| 92 | exact hk } |
| 93 | exact ⟨N, hsub, H, rfl⟩ |
| 94 | |
| 95 | end PoincareMT.M30 |