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.Blowup.Construction.LongTime.ScalarBounds.NoncompactScalarAnchor |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.ScalarBounds.CompactTimeScalarBound |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.BoundaryCoverage |
| 4 | import PoincareLib.Geometry.Riemannian.Distance.CompleteBalls |
| 5 | |
| 6 | local notation "GeneralizedBoundedDistanceHypotheses" => |
| 7 | PoincareMT.DenseGeneralizedBoundedDistanceHypotheses |
| 8 | |
| 9 | /-! |
| 10 | # Scalar bounds on compact terminal balls |
| 11 | |
| 12 | Morgan--Tian Corollary 11.16, p. 277, combines the noncompact anchor from |
| 13 | Claims 11.14--11.15, pp. 275--277, with compact scalar comparison. The |
| 14 | actual terminal metric supplies one compact connected set containing |
| 15 | both the requested ball and the fixed anchor, before any earlier time. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M30 |
| 26 | |
| 27 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 28 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space |
| 29 | FlowCarrier.measurableSpace FlowCarrier.borelSpace FlowCarrier.secondCountable |
| 30 | |
| 31 | /-- Each compact terminal ball has one scalar bound for every included |
| 32 | earlier time, including zero (Morgan--Tian Corollary 11.16, p. 277). -/ |
| 33 | theorem exists_finite_limit_compact_scalar_bound_threshold |
| 34 | (P : M30ControlledBlowupPredecessors.{u}) : |
| 35 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 400 ∧ |
| 36 | ∀ (S : GeneralizedBlowupSequence.{u}) (epsilon C : ℝ), |
| 37 | 0 < epsilon → epsilon ≤ epsilon0 → 0 < C → |
| 38 | GeneralizedBoundedDistanceHypotheses S epsilon C → |
| 39 | ∀ (T : ℝ), 0 < T → |
| 40 | ∀ G : GeneralizedBlowupConvergence S (Ioc (-T) 0), |
| 41 | ∀ A : ℝ, 0 < A → |
| 42 | ∃ B : ℝ, 0 ≤ B ∧ |
| 43 | ∀ t, t ∈ Ioc (-T) 0 → |
| 44 | ∀ x, x ∈ closure ((G.limit.flow.metric 0).ball G.limit.base A) → |
| 45 | (G.limit.flow.connection t).scalarCurvature x ≤ B := by |
| 46 | obtain ⟨epsilonAnchor, hAnchorPos, hAnchorMax, hAnchor⟩ := |
| 47 | exists_noncompact_limit_scalar_anchor_threshold P |
| 48 | obtain ⟨epsilonComparison, hComparisonPos, _hComparisonMax, hComparison⟩ := |
| 49 | exists_compact_scalar_bound_of_anchors_threshold P |
| 50 | obtain ⟨epsilonCompact, hCompactPos, _hCompactMax, hCompact⟩ := |
| 51 | exists_compact_limit_uniform_scalar_bound_threshold P |
| 52 | refine ⟨min epsilonAnchor (min epsilonComparison epsilonCompact), |
| 53 | lt_min hAnchorPos (lt_min hComparisonPos hCompactPos), |
| 54 | (min_le_left _ _).trans hAnchorMax, ?_⟩ |
| 55 | intro S epsilon C hepsilon hepsilonLe hC H T hT G A hA |
| 56 | have heAnchor : epsilon ≤ epsilonAnchor := hepsilonLe.trans (min_le_left _ _) |
| 57 | have heComparison : epsilon ≤ epsilonComparison := |
| 58 | hepsilonLe.trans ((min_le_right _ _).trans (min_le_left _ _)) |
| 59 | have heCompact : epsilon ≤ epsilonCompact := |
| 60 | hepsilonLe.trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 61 | by_cases hcompact : IsCompact (univ : Set G.limit.carrier.carrier) |
| 62 | · obtain ⟨B, hB, hbound⟩ := hCompact S epsilon C hepsilon heCompact hC H T hT G hcompact |
| 63 | exact ⟨B, hB, fun t ht x _hx => hbound t ht x⟩ |
| 64 | · obtain ⟨y, Bmin, _hBmin, hAnchorBound⟩ := |
| 65 | hAnchor S epsilon C hepsilon heAnchor hC H T hT G hcompact |
| 66 | let : ConnectedSpace G.limit.carrier.carrier := G.limit.connectedSpace |
| 67 | let g := G.limit.flow.metric 0 |
| 68 | let : MetricSpace G.limit.carrier.carrier := G.limit.carrier.metricSpaceOf g |
| 69 | let rho := max A ((g.edist G.limit.base y).toReal + 1) |
| 70 | have hrho : 0 < rho := hA.trans_le (le_max_left _ _) |
| 71 | let X := closure (g.ball G.limit.base rho) |
| 72 | have hXcompact : IsCompact X := by |
| 73 | apply IsCompact.of_isClosed_subset |
| 74 | (g.isCompact_closedBall_of_metricComplete |
| 75 | (G.limit.complete 0 G.limit.zero_mem) G.limit.base rho) isClosed_closure |
| 76 | apply closure_minimal |
| 77 | (fun x (hx : g.edist G.limit.base x < ENNReal.ofReal rho) => hx.le) |
| 78 | exact isClosed_le (continuous_const.edist continuous_id) continuous_const |
| 79 | have hpball : G.limit.base ∈ g.ball G.limit.base rho := by |
| 80 | change g.edist G.limit.base G.limit.base < ENNReal.ofReal rho |
| 81 | simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_self] using |
| 82 | ENNReal.ofReal_pos.mpr hrho |
| 83 | have hXconnected : IsConnected X := |
| 84 | ⟨⟨G.limit.base, subset_closure hpball⟩, |
| 85 | (g.isPreconnected_ball G.limit.base rho).closure⟩ |
| 86 | have hyX : y ∈ X := by |
| 87 | apply subset_closure |
| 88 | change g.edist G.limit.base y < ENNReal.ofReal rho |
| 89 | apply (ENNReal.lt_ofReal_iff_toReal_lt (g.edist_ne_top G.limit.base y)).mpr |
| 90 | exact (lt_add_one _).trans_le (le_max_right _ _) |
| 91 | obtain ⟨B, hB, hbound⟩ := hComparison S epsilon C hepsilon heComparison hC H T hT |
| 92 | G X hXcompact hXconnected Bmin (fun t ht => ⟨y, hyX, hAnchorBound t ht⟩) |
| 93 | have hsubset : closure (g.ball G.limit.base A) ⊆ X := by |
| 94 | apply closure_mono |
| 95 | intro x hx |
| 96 | exact hx.trans_le (ENNReal.ofReal_le_ofReal (le_max_left _ _)) |
| 97 | exact ⟨B, hB, fun t ht x hx => hbound t ht x (hsubset hx)⟩ |
| 98 | |
| 99 | end PoincareMT.M30 |