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.GeneralizedCompactPreimages |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.GeneralizedLimit.GeneralizedScalarConvergence |
| 3 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.Generalized.WorldlineUniqueness |
| 4 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.Data |
| 5 | |
| 6 | /-! |
| 7 | # Uniform scalar bounds on shorter source prefixes |
| 8 | |
| 9 | Morgan--Tian Claim 11.17, pp. 277--278, transfers the compact limit bound |
| 10 | to the supplied source cylinders before applying the scalar differential |
| 11 | estimate. Fixed compact preimages and actual worldline uniqueness retain |
| 12 | one cylinder and one scalar coefficient on every shorter time prefix. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M30 |
| 23 | |
| 24 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 25 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space |
| 26 | |
| 27 | /-- A scalar bound on a compact spatial set over one closed time prefix |
| 28 | transfers to the supplied source slab on that prefix (Claim 11.17, |
| 29 | pp. 277--278). -/ |
| 30 | theorem eventually_finiteSlab_scalar_of_generalized_limit_bound_on_prefix |
| 31 | {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} |
| 32 | (G : GeneralizedBlowupConvergence S J) |
| 33 | {A Tplus kappa r0 B : ℝ} (hA : 0 < A) |
| 34 | (hslabs : ∀ᶠ n in atTop, |
| 35 | Nonempty (M30FiniteHorizonSlab S n A Tplus kappa r0)) |
| 36 | (t : ℝ) (ht : 0 < t) (htTplus : t < Tplus) (hI : Icc (-t) 0 ⊆ J) |
| 37 | (hscalar : ∀ s ∈ Icc (-t) 0, |
| 38 | ∀ x ∈ closure ((G.limit.flow.metric 0).ball G.limit.base (2 * A)), |
| 39 | (G.limit.flow.connection s).scalarCurvature x ≤ B) : |
| 40 | ∀ᶠ k in atTop, |
| 41 | ∃ e : M30FiniteHorizonSlab S (G.subsequence k) A Tplus kappa r0, |
| 42 | ∀ s (hs : s ∈ Icc (-t) 0) |
| 43 | (x : ((S.flow (G.subsequence k)).slice |
| 44 | (S.base (G.subsequence k)).1).carrier), |
| 45 | x ∈ S.baseBall (G.subsequence k) A → |
| 46 | (S.flow (G.subsequence k)).scalar |
| 47 | ((FiniteHorizonSlab.closedEmbedding e |
| 48 | htTplus).pointMap s hs x) ≤ |
| 49 | max 4 (B + 1) * S.scale (G.subsequence k) := by |
| 50 | let g := G.limit.flow.metric 0 |
| 51 | let : MetricSpace G.limit.carrier.carrier := G.limit.carrier.metricSpaceOf g |
| 52 | let K := closure (g.ball G.limit.base (2 * A)) |
| 53 | have hK : IsCompact K := by |
| 54 | apply IsCompact.of_isClosed_subset |
| 55 | (g.isCompact_closedBall_of_metricComplete |
| 56 | (G.limit.complete 0 G.limit.zero_mem) G.limit.base (2 * A)) isClosed_closure |
| 57 | apply closure_minimal |
| 58 | (fun x (hx : g.edist G.limit.base x < ENNReal.ofReal (2 * A)) => hx.le) |
| 59 | exact isClosed_le (continuous_const.edist continuous_id) continuous_const |
| 60 | have hslabs' := G.subsequence_strictMono.tendsto_atTop.eventually hslabs |
| 61 | filter_upwards [eventually_generalized_terminal_baseBall_preimage_ball G hA, |
| 62 | eventually_generalized_scalar_error G isCompact_Icc hI hK zero_lt_one, |
| 63 | hslabs'] with k hcapture herr he |
| 64 | obtain ⟨e⟩ := he |
| 65 | refine ⟨e, ?_⟩ |
| 66 | intro s hs x hx |
| 67 | obtain ⟨y, hy, hzero⟩ := hcapture.2 x hx |
| 68 | have hyK : y ∈ K := subset_closure hy |
| 69 | have h0 : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0 := |
| 70 | ⟨neg_nonpos.mpr (G.exhaustion.time_pos k).le, le_rfl⟩ |
| 71 | have h0t : (0 : ℝ) ∈ Icc (-t) 0 := ⟨neg_nonpos.mpr ht.le, le_rfl⟩ |
| 72 | have hmeet : (G.embedding k).pointMap 0 h0 y = |
| 73 | (FiniteHorizonSlab.closedEmbedding e htTplus).pointMap 0 h0t x := |
| 74 | (hzero h0).trans |
| 75 | (FiniteHorizonSlab.closedEmbedding_zero_identity e htTplus h0t x hx).symm |
| 76 | have hpoint := Cylinder.pointMap_eq_on_overlap (G.embedding k) |
| 77 | (FiniteHorizonSlab.closedEmbedding e htTplus) |
| 78 | ordConnected_Icc ordConnected_Icc (herr.2.1 hyK) hx h0 h0t hmeet s (herr.1 hs) hs |
| 79 | have herror := (abs_lt.mp (herr.2.2 s hs (herr.1 hs) y hyK)).2 |
| 80 | have hbound := hscalar s hs y hyK |
| 81 | have hQ := S.base_scalar_pos (G.subsequence k) |
| 82 | rw [← hpoint] |
| 83 | apply (div_le_iff₀ hQ).mp |
| 84 | exact (show (S.flow (G.subsequence k)).scalar |
| 85 | ((G.embedding k).pointMap s (herr.1 hs) y) / S.scale (G.subsequence k) ≤ |
| 86 | B + 1 by linarith).trans (le_max_right _ _) |
| 87 | |
| 88 | /-- The finite-horizon specialization of source scalar transfer on one |
| 89 | closed prefix (Claim 11.17, pp. 277--278). -/ |
| 90 | theorem eventually_finiteSlab_scalar_of_limit_bound_on_prefix |
| 91 | {S : GeneralizedBlowupSequence.{u}} {T : ℝ} |
| 92 | (G : GeneralizedBlowupConvergence S (Ioc (-T) 0)) |
| 93 | {A Tplus kappa r0 B : ℝ} (hA : 0 < A) (hTTplus : T < Tplus) |
| 94 | (hslabs : ∀ᶠ n in atTop, |
| 95 | Nonempty (M30FiniteHorizonSlab S n A Tplus kappa r0)) |
| 96 | (t : ℝ) (ht : 0 < t) (htT : t < T) |
| 97 | (hscalar : ∀ s ∈ Icc (-t) 0, |
| 98 | ∀ x ∈ closure ((G.limit.flow.metric 0).ball G.limit.base (2 * A)), |
| 99 | (G.limit.flow.connection s).scalarCurvature x ≤ B) : |
| 100 | ∀ᶠ k in atTop, |
| 101 | ∃ e : M30FiniteHorizonSlab S (G.subsequence k) A Tplus kappa r0, |
| 102 | ∀ s (hs : s ∈ Icc (-t) 0) |
| 103 | (x : ((S.flow (G.subsequence k)).slice |
| 104 | (S.base (G.subsequence k)).1).carrier), |
| 105 | x ∈ S.baseBall (G.subsequence k) A → |
| 106 | (S.flow (G.subsequence k)).scalar |
| 107 | ((FiniteHorizonSlab.closedEmbedding e |
| 108 | (htT.trans hTTplus)).pointMap s hs x) ≤ |
| 109 | max 4 (B + 1) * S.scale (G.subsequence k) := by |
| 110 | exact eventually_finiteSlab_scalar_of_generalized_limit_bound_on_prefix G hA hslabs |
| 111 | t ht (htT.trans hTTplus) (closedSlab_subset_openSlab htT) hscalar |
| 112 | |
| 113 | /-- A bound on one fixed compact terminal limit ball transfers to every |
| 114 | shorter source prefix with a coefficient independent of its duration |
| 115 | (Claim 11.17, pp. 277--278). -/ |
| 116 | theorem eventually_finiteSlab_prefix_scalar_of_limit_bound |
| 117 | {S : GeneralizedBlowupSequence.{u}} {T : ℝ} |
| 118 | (G : GeneralizedBlowupConvergence S (Ioc (-T) 0)) |
| 119 | {A Tplus kappa r0 B : ℝ} (hA : 0 < A) (hTTplus : T < Tplus) |
| 120 | (hslabs : ∀ᶠ n in atTop, |
| 121 | Nonempty (M30FiniteHorizonSlab S n A Tplus kappa r0)) |
| 122 | (hscalar : ∀ s ∈ Ioc (-T) 0, |
| 123 | ∀ x ∈ closure ((G.limit.flow.metric 0).ball G.limit.base (2 * A)), |
| 124 | (G.limit.flow.connection s).scalarCurvature x ≤ B) : |
| 125 | ∀ t : ℝ, 0 < t → ∀ htT : t < T, |
| 126 | ∀ᶠ k in atTop, |
| 127 | ∃ e : M30FiniteHorizonSlab S (G.subsequence k) A Tplus kappa r0, |
| 128 | ∀ s (hs : s ∈ Icc (-t) 0) |
| 129 | (x : ((S.flow (G.subsequence k)).slice |
| 130 | (S.base (G.subsequence k)).1).carrier), |
| 131 | x ∈ S.baseBall (G.subsequence k) A → |
| 132 | (S.flow (G.subsequence k)).scalar |
| 133 | ((FiniteHorizonSlab.closedEmbedding e |
| 134 | (htT.trans hTTplus)).pointMap s hs x) ≤ |
| 135 | max 4 (B + 1) * S.scale (G.subsequence k) := by |
| 136 | intro t ht htT |
| 137 | apply eventually_finiteSlab_scalar_of_limit_bound_on_prefix G hA hTTplus hslabs t ht htT |
| 138 | intro s hs x hx |
| 139 | exact hscalar s ⟨by linarith [hs.1], hs.2⟩ x hx |
| 140 | |
| 141 | end PoincareMT.M30 |