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.GeneralizedLimit.GeneralizedMetricComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.Generalized.TerminalMetric |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.SourceMetric |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.Coverage |
| 5 | import PoincareLib.Geometry.Riemannian.Distance.CompleteBalls |
| 6 | |
| 7 | /-! |
| 8 | # Bounded terminal images of compact limit sets |
| 9 | |
| 10 | The actual retained maps send each compact terminal limit set into one |
| 11 | fixed normalized source ball. The terminal slice identification transports |
| 12 | the dependent carrier as well as its metric. Source: Morgan--Tian |
| 13 | Definition 5.12 and Theorem 11.8, pp. 90 and 272; M30 derivation |
| 14 | `generalized-point-noncollapse.md`. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M30 |
| 25 | |
| 26 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 27 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space |
| 28 | |
| 29 | /-- One source radius bounds the actual terminal image of every point of |
| 30 | a fixed compact limit set (Definition 5.12 and Theorem 11.8, pp. 90, 272). -/ |
| 31 | theorem exists_eventually_generalized_terminal_image_baseBall |
| 32 | {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} |
| 33 | (G : GeneralizedBlowupConvergence S J) |
| 34 | {K : Set G.limit.carrier.carrier} (hK : IsCompact K) : |
| 35 | ∃ R : ℝ, 0 < R ∧ ∀ᶠ k in atTop, |
| 36 | ∀ x ∈ K, ∃ y : ((S.flow (G.subsequence k)).slice |
| 37 | (S.base (G.subsequence k)).1).carrier, |
| 38 | y ∈ S.baseBall (G.subsequence k) R ∧ |
| 39 | ∀ h0 : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0, |
| 40 | (G.embedding k).pointMap 0 h0 x = |
| 41 | (⟨(S.base (G.subsequence k)).1, y⟩ : (S.flow (G.subsequence k)).point) := by |
| 42 | let g := G.limit.flow.metric 0 |
| 43 | let : MetricSpace G.limit.carrier.carrier := G.limit.carrier.metricSpaceOf g |
| 44 | obtain ⟨r, hr, hKr⟩ := hK.isBounded.subset_ball_lt 0 G.limit.base |
| 45 | have hKr' : K ⊆ g.ball G.limit.base r := by |
| 46 | simpa only [FlowCarrier.metricBall_eq_metricBallOf, FlowCarrier.metricBall] using hKr |
| 47 | have hcompact : IsCompact (closure (g.ball G.limit.base r)) := by |
| 48 | apply IsCompact.of_isClosed_subset |
| 49 | (g.isCompact_closedBall_of_metricComplete |
| 50 | (G.limit.complete 0 G.limit.zero_mem) G.limit.base r) isClosed_closure |
| 51 | apply closure_minimal |
| 52 | (fun x (hx : g.edist G.limit.base x < ENNReal.ofReal r) => hx.le) |
| 53 | exact isClosed_le (continuous_const.edist continuous_id) continuous_const |
| 54 | have h0 (k : ℕ) : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0 := |
| 55 | ⟨neg_nonpos.mpr (G.exhaustion.time_pos k).le, le_rfl⟩ |
| 56 | have htransport (k : ℕ) (b : ℝ) (hb : b = (S.base k).1) |
| 57 | (z x : ((S.flow k).slice b).carrier) |
| 58 | (hz : (⟨b, z⟩ : (S.flow k).point) = S.base k) |
| 59 | (hx : x ∈ RiemannianMetric.ball |
| 60 | (M13.scaleSmoothMetric ((S.flow k).metric b) |
| 61 | (S.scale k) (S.base_scalar_pos k)) z (2 * r)) : |
| 62 | ∃ y : ((S.flow k).slice (S.base k).1).carrier, |
| 63 | y ∈ S.baseBall k (2 * r) ∧ |
| 64 | (⟨b, x⟩ : (S.flow k).point) = ⟨(S.base k).1, y⟩ := by |
| 65 | subst b |
| 66 | have hz' : z = (S.base k).2 := eq_of_heq (Sigma.mk.inj_iff.mp hz).2 |
| 67 | refine ⟨x, ?_, rfl⟩ |
| 68 | rw [← scaled_terminal_ball_eq_baseBall] |
| 69 | simpa only [hz'] using hx |
| 70 | refine ⟨2 * r, by positivity, ?_⟩ |
| 71 | filter_upwards [eventually_generalized_tangent_comparison G G.limit.zero_mem |
| 72 | 0 (fun k => h0 (k + 0)) hcompact (by norm_num : (1 : ℝ) < 2)] with k hk |
| 73 | let e := generalizedSliceHomeomorph G k 0 (h0 k) |
| 74 | let h := normalizedBlowupSliceMetric S (G.subsequence k) 0 |
| 75 | have hsource : g.ball G.limit.base r ⊆ e.source := subset_closure.trans hk.1 |
| 76 | have himage := g.image_ball_subset_ball_of_tangentNorm_le h e G.limit.base |
| 77 | (by norm_num : (0 : ℝ) < 2) hsource |
| 78 | (fun x hx => (generalizedSliceHomeomorph_contMDiffAt G k 0 (h0 k) hx).of_le |
| 79 | (by simp)) |
| 80 | (fun x hx v => (hk.2 x (subset_closure hx) v).1) |
| 81 | intro x hx |
| 82 | obtain ⟨y, hy, hxy⟩ := htransport (G.subsequence k) |
| 83 | ((S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k)) (by simp) |
| 84 | (e G.limit.base) (e x) (G.base_preserving k (h0 k)) |
| 85 | (himage (mem_image_of_mem e (hKr' hx))) |
| 86 | exact ⟨y, hy, fun _ => hxy⟩ |
| 87 | |
| 88 | end PoincareMT.M30 |