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.GeneralizedCompactImages |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.SpatialEmbedding |
| 3 | |
| 4 | /-! |
| 5 | # Fixed compact preimages of terminal source balls |
| 6 | |
| 7 | The actual inverse differential bound captures each fixed source ball |
| 8 | inside the image of one fixed limit ball. This is the reverse capture in |
| 9 | Morgan--Tian Definition 5.12 and Claim 11.17, pp. 90 and 277--278. |
| 10 | The time-zero identification transports the dependent slice and its metric |
| 11 | together, retaining the original convergence maps and source subsequence. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M30 |
| 22 | |
| 23 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 24 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space |
| 25 | |
| 26 | /-- Every fixed terminal source ball has preimages in the fixed doubled |
| 27 | limit ball on one tail (Definition 5.12 and Claim 11.17, pp. 90, 277--278). -/ |
| 28 | theorem eventually_generalized_terminal_baseBall_preimage_ball |
| 29 | {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} |
| 30 | (G : GeneralizedBlowupConvergence S J) {A : ℝ} (hA : 0 < A) : |
| 31 | ∀ᶠ k in atTop, |
| 32 | (G.limit.flow.metric 0).ball G.limit.base (2 * A) ⊆ G.exhaustion.space k ∧ |
| 33 | ∀ x ∈ S.baseBall (G.subsequence k) A, |
| 34 | ∃ y ∈ (G.limit.flow.metric 0).ball G.limit.base (2 * A), |
| 35 | ∀ h0 : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0, |
| 36 | (G.embedding k).pointMap 0 h0 y = |
| 37 | (⟨(S.base (G.subsequence k)).1, x⟩ : |
| 38 | (S.flow (G.subsequence k)).point) := by |
| 39 | let g := G.limit.flow.metric 0 |
| 40 | let : MetricSpace G.limit.carrier.carrier := G.limit.carrier.metricSpaceOf g |
| 41 | let K := closure (g.ball G.limit.base (4 * A)) |
| 42 | have hK : IsCompact K := by |
| 43 | apply IsCompact.of_isClosed_subset |
| 44 | (g.isCompact_closedBall_of_metricComplete |
| 45 | (G.limit.complete 0 G.limit.zero_mem) G.limit.base (4 * A)) isClosed_closure |
| 46 | apply closure_minimal |
| 47 | (fun x (hx : g.edist G.limit.base x < ENNReal.ofReal (4 * A)) => hx.le) |
| 48 | exact isClosed_le (continuous_const.edist continuous_id) continuous_const |
| 49 | have hsmall : g.ball G.limit.base (2 * A) ⊆ K := by |
| 50 | intro x hx |
| 51 | exact subset_closure (hx.trans_le (ENNReal.ofReal_le_ofReal (by linarith))) |
| 52 | have h0 (k : ℕ) : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0 := |
| 53 | ⟨neg_nonpos.mpr (G.exhaustion.time_pos k).le, le_rfl⟩ |
| 54 | have htransport (n : ℕ) (b : ℝ) (hb : b = (S.base n).1) |
| 55 | (z : ((S.flow n).slice b).carrier) |
| 56 | (hz : (⟨b, z⟩ : (S.flow n).point) = S.base n) |
| 57 | (x : ((S.flow n).slice (S.base n).1).carrier) (hx : x ∈ S.baseBall n A) : |
| 58 | ∃ w : ((S.flow n).slice b).carrier, |
| 59 | w ∈ RiemannianMetric.ball |
| 60 | (M13.scaleSmoothMetric ((S.flow n).metric b) |
| 61 | (S.scale n) (S.base_scalar_pos n)) z A ∧ |
| 62 | (⟨b, w⟩ : (S.flow n).point) = ⟨(S.base n).1, x⟩ := by |
| 63 | subst b |
| 64 | have hz' : z = (S.base n).2 := eq_of_heq (Sigma.mk.inj_iff.mp hz).2 |
| 65 | refine ⟨x, ?_, rfl⟩ |
| 66 | rw [hz', scaled_terminal_ball_eq_baseBall] |
| 67 | exact hx |
| 68 | filter_upwards [eventually_generalized_tangent_comparison G G.limit.zero_mem |
| 69 | 0 (fun k => h0 (k + 0)) hK (by norm_num : (1 : ℝ) < 2)] with k hk |
| 70 | let e := generalizedSliceHomeomorph G k 0 (h0 k) |
| 71 | let h := normalizedBlowupSliceMetric S (G.subsequence k) 0 |
| 72 | have he : e.MDifferentiable (𝓡 3) (𝓡 3) := by |
| 73 | constructor |
| 74 | · intro x hx |
| 75 | exact ((generalizedSliceHomeomorph_contMDiffAt G k 0 (h0 k) hx).mdifferentiableAt |
| 76 | (by simp)).mdifferentiableWithinAt |
| 77 | · intro y hy |
| 78 | exact ((generalizedSliceHomeomorph_symm_contMDiffAt G k 0 (h0 k) hy).mdifferentiableAt |
| 79 | (by simp)).mdifferentiableWithinAt |
| 80 | have hinverse := g.inverse_tangentNorm_le_of_le h e he hk.1 |
| 81 | (fun x hx v => (hk.2 x hx v).2) |
| 82 | have hcapture : h.ball (e G.limit.base) A ⊆ e '' g.ball G.limit.base (2 * A) := |
| 83 | g.ball_subset_image_ball_of_inverse_tangentNorm_le h e G.limit.base |
| 84 | (by positivity : 0 < 4 * A) (by norm_num : (0 : ℝ) < 2) (by linarith) |
| 85 | hK hk.1 |
| 86 | (fun y hy => (generalizedSliceHomeomorph_symm_contMDiffAt G k 0 (h0 k) hy).of_le |
| 87 | (by simp)) hinverse |
| 88 | refine ⟨hsmall.trans hk.1, ?_⟩ |
| 89 | intro x hx |
| 90 | obtain ⟨w, hw, hwx⟩ := htransport (G.subsequence k) |
| 91 | ((S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k)) (by simp) |
| 92 | (e G.limit.base) (G.base_preserving k (h0 k)) x hx |
| 93 | obtain ⟨y, hy, hyw⟩ := hcapture hw |
| 94 | refine ⟨y, hy, ?_⟩ |
| 95 | intro hzero |
| 96 | change (⟨(S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k), e y⟩ : |
| 97 | (S.flow (G.subsequence k)).point) = _ |
| 98 | rw [hyw] |
| 99 | exact hwx |
| 100 | |
| 101 | end PoincareMT.M30 |