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.Surgery.CanonicalInduction.Limit.Finite.LimitFiniteEndpointRows |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Finite.LimitFiniteActualExtraction |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Finite.LimitFiniteActualGerms |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Finite.LimitFiniteActualMetric |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Finite.LimitFiniteRetainedService |
| 6 | |
| 7 | /-! |
| 8 | # The finite endpoint service from the original sequence |
| 9 | |
| 10 | Actual cap-free rows supply one coefficient extraction, compatible germs, |
| 11 | the complete endpoint metric and one retained scalar selection. The |
| 12 | resulting terminal-ball sources require no additional geometric input. |
| 13 | MT Proposition 17.1, pp. 407-408; limit-finite-endpoint-service.md, R2-R4. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Poincare.Gluing |
| 20 | open scoped ENNReal Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 27 | local notation "Bilin" => E →L[ℝ] E →L[ℝ] ℝ |
| 28 | |
| 29 | private noncomputable local instance endpointServiceDualAdd : |
| 30 | NormedAddCommGroup (E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 31 | private noncomputable local instance endpointServiceDualSpace : |
| 32 | NormedSpace ℝ (E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace |
| 33 | private noncomputable local instance endpointServiceBilinAdd : |
| 34 | NormedAddCommGroup Bilin := ContinuousLinearMap.toNormedAddCommGroup |
| 35 | private noncomputable local instance endpointServiceBilinSpace : |
| 36 | NormedSpace ℝ Bilin := ContinuousLinearMap.toNormedSpace |
| 37 | |
| 38 | variable (F : ℕ → SurgeryFlowData.{u}) (W : ∀ k, M33RegularHistoryWindow (F k)) |
| 39 | (history : ∀ k, M33RegularHistoryData (W k)) (baseTime : ℕ → ℝ) |
| 40 | (hbaseTime : ∀ k, baseTime k ∈ (history k).generalized.interval) |
| 41 | (basePoint : ∀ k, ((history k).generalized.slice (baseTime k)).carrier) |
| 42 | (hPositive : ∀ k, 0 < ((F k).connection (baseTime k)).scalarCurvature |
| 43 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k))) |
| 44 | (hDiverges : Tendsto (fun k => ((F k).connection (baseTime k)).scalarCurvature |
| 45 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k))) atTop atTop) |
| 46 | |
| 47 | local notation "V" => regularHistoryBlowupSequence F W history baseTime hbaseTime |
| 48 | basePoint hPositive hDiverges |
| 49 | |
| 50 | variable {H : ℝ≥0∞} (G : GeneralizedBlowupConvergence |
| 51 | (regularHistoryBlowupSequence F W history baseTime hbaseTime basePoint hPositive hDiverges) |
| 52 | (blowupBackwardInterval H)) |
| 53 | |
| 54 | private local instance endpointServiceTopology : TopologicalSpace G.limit.carrier.carrier := |
| 55 | G.limit.carrier.topologicalSpace |
| 56 | private local instance endpointServiceCharts : ChartedSpace E G.limit.carrier.carrier := |
| 57 | G.limit.carrier.chartedSpace |
| 58 | private local instance endpointServiceManifold : IsManifold (𝓡 3) ∞ G.limit.carrier.carrier := |
| 59 | G.limit.carrier.isManifold |
| 60 | private local instance endpointServiceMeasurable : MeasurableSpace G.limit.carrier.carrier := |
| 61 | G.limit.carrier.measurableSpace |
| 62 | private local instance endpointServiceBorel : BorelSpace G.limit.carrier.carrier := |
| 63 | G.limit.carrier.borelSpace |
| 64 | private local instance endpointServiceT2 : T2Space G.limit.carrier.carrier := |
| 65 | G.limit.carrier.t2Space |
| 66 | private local instance endpointServiceT3 : T3Space G.limit.carrier.carrier := |
| 67 | G.limit.carrier.t3Space |
| 68 | private local instance endpointServiceSecondCountable : |
| 69 | SecondCountableTopology G.limit.carrier.carrier := G.limit.carrier.secondCountable |
| 70 | private local instance endpointServiceConnected : ConnectedSpace G.limit.carrier.carrier := |
| 71 | G.limit.connectedSpace |
| 72 | |
| 73 | local notation "U" => (fun j : ℕ => TopologicalSpace.Opens.mk |
| 74 | (G.exhaustion.space j) (G.exhaustion.space_open j)) |
| 75 | |
| 76 | variable |
| 77 | (hbad : ∀ k, ¬ SurgeryCanonicalControl (F k) (baseTime k) |
| 78 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k)) |
| 79 | (F k).parameters.epsilon (F k).parameters.C) |
| 80 | (capBudget : |
| 81 | let seq := regularHistoryBlowupSequence F W history baseTime hbaseTime |
| 82 | basePoint hPositive hDiverges |
| 83 | ∀ j : ℕ, ∀ᶠ k in atTop, |
| 84 | ∀ (C : GeneralizedSliceCarrier.{u}) {Ucap : Set C.carrier}, IsOpen Ucap → |
| 85 | ∀ {a : ℝ} (ha : a ∈ Ico (-((j : ℝ) + 1)) 0), |
| 86 | ∀ E0 : SurgeryFlowCylinder (F (G.subsequence k)) C (baseTime (G.subsequence k)) |
| 87 | (seq.scale (G.subsequence k)) (Icc a 0) Ucap, |
| 88 | (∀ s (hs : s ∈ Icc a 0), ∀ x ∈ Ucap, |
| 89 | ((F (G.subsequence k)).connection |
| 90 | (baseTime (G.subsequence k) + s / seq.scale (G.subsequence k))).scalarCurvature |
| 91 | (E0.forward s hs x) ≤ ((j : ℝ) + 1) * seq.scale (G.subsequence k)) → |
| 92 | let bottom : a ∈ Icc a 0 := ⟨le_rfl, ha.2.le⟩ |
| 93 | let zero : (0 : ℝ) ∈ Icc a 0 := ⟨ha.2.le, le_rfl⟩ |
| 94 | let tbirth := baseTime (G.subsequence k) + a / seq.scale (G.subsequence k) |
| 95 | ∀ (hEvent : tbirth ∈ (F (G.subsequence k)).surgery_times), |
| 96 | ∀ [Nonempty ((F (G.subsequence k)).slice tbirth).carrier], |
| 97 | ∀ (i : Fin ((F (G.subsequence k)).event tbirth hEvent).cap_count) (contact : C.carrier), |
| 98 | contact ∈ Ucap → |
| 99 | E0.forward a bottom contact ∈ |
| 100 | (((F (G.subsequence k)).event tbirth hEvent).caps i).carrier → |
| 101 | (∀ x ∈ Ucap, ((F (G.subsequence k)).metric tbirth).edist |
| 102 | (E0.forward a bottom contact) (E0.forward a bottom x) ≤ |
| 103 | ENNReal.ofReal (((j : ℝ) + 1) / Real.sqrt (seq.scale (G.subsequence k)))) → |
| 104 | ∀ y ∈ Ucap, |
| 105 | ((F (G.subsequence k)).connection |
| 106 | (baseTime (G.subsequence k) + 0 / seq.scale (G.subsequence k))).scalarCurvature |
| 107 | (E0.forward 0 zero y) = seq.scale (G.subsequence k) → |
| 108 | SurgeryCanonicalControl (F (G.subsequence k)) |
| 109 | (baseTime (G.subsequence k) + 0 / seq.scale (G.subsequence k)) |
| 110 | (E0.forward 0 zero y) (F (G.subsequence k)).parameters.epsilon |
| 111 | (F (G.subsequence k)).parameters.C) |
| 112 | |
| 113 | include hbad capBudget in |
| 114 | /-- Original sequence guards construct the actual included endpoint |
| 115 | metric and a single retained terminal-ball service. The coefficient |
| 116 | subsequence sigma precedes the one retained subsequence eta. -/ |
| 117 | theorem limitFinite_actual_endpoint_terminal_ball_service |
| 118 | (P : M47Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) |
| 119 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) |
| 120 | (p : ℕ → SurgeryParameterPrefix S.constants) (O : ∀ k, SurgeryObservation (F k)) |
| 121 | (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 122 | (hInitial : ∀ k, (F k).standard_initial = S.setup.standard_initial) |
| 123 | (hConstants : ∀ k, (F k).local_constants = S.constants) |
| 124 | (hParameters : ∀ k, (F k).parameters.epsilon = S.setup.epsilon ∧ |
| 125 | (F k).parameters.C = S.setup.C) |
| 126 | (hBase : ∀ k, baseTime k ∈ Ico (surgeryEpochStart (p k).i) (O k).H) |
| 127 | (hPinched : ∀ k, SurgeryFlowPinched (F k)) |
| 128 | (rNext : ℕ → ℝ) (hThreshold : ∀ k, (rNext k)⁻¹ ^ 2 ≤ (V).scale k) |
| 129 | (hEarlier : ∀ k, SurgeryCanonicalOn (F k) (Ico 0 (baseTime k)) (rNext k)) |
| 130 | (hOverlap : ∀ k, ∀ t ∈ surgeryObservationInterval (O k) ∩ |
| 131 | Ico (surgeryEpochStart ((p k).i - 1)) (O k).H, |
| 132 | (F k).parameters.delta t ≤ B.delta S.setup.standard_initial S.constants) : |
| 133 | ∃ σ : ℕ → ℕ, StrictMono σ ∧ |
| 134 | ∃ gE : RiemannianMetric 3 G.limit.sliceCarrier.carrier, ∃ DE : LeviCivitaData gE, |
| 135 | MetricComplete gE ∧ (∀ x, DE.NonnegativeCurvatureOperator x) ∧ |
| 136 | ∃ η : ℕ → ℕ, StrictMono η ∧ StrictMono (fun k => G.subsequence (σ (η k))) ∧ |
| 137 | ∃ ψ : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) G.limit.sliceCarrier.carrier |
| 138 | ((F (G.subsequence (σ (η k)))).slice |
| 139 | (baseTime (G.subsequence (σ (η k))) + |
| 140 | -H.toReal / (V).scale (G.subsequence (σ (η k))))).carrier ∞, |
| 141 | (∀ k, (ψ k).source = G.exhaustion.space k) ∧ |
| 142 | (∀ k, 0 < (V).scale (G.subsequence (σ (η k))) ∧ |
| 143 | baseTime (G.subsequence (σ (η k))) + |
| 144 | -H.toReal / (V).scale (G.subsequence (σ (η k))) ∈ |
| 145 | (F (G.subsequence (σ (η k)))).time_domain ∧ |
| 146 | baseTime (G.subsequence (σ (η k))) + |
| 147 | -H.toReal / (V).scale (G.subsequence (σ (η k))) ∈ |
| 148 | Ico 0 (baseTime (G.subsequence (σ (η k))))) ∧ |
| 149 | ∃ Bglobal : ℝ, 0 < Bglobal ∧ (∀ x, DE.curvatureTensorNorm x ≤ Bglobal) ∧ |
| 150 | let Lscalar := 2 * max 1 (3 * Bglobal) |
| 151 | 1 ≤ Lscalar ∧ ∀ radius : ℝ, 0 < radius → |
| 152 | let Uball := (G.limit.flow.metric 0).ball G.limit.base radius |
| 153 | ∀ᶠ k : ℕ in atTop, Uball ⊆ G.exhaustion.space (σ (η k)) ∧ |
| 154 | ∃ e0 : SurgeryFlowCylinder (F (G.subsequence (σ (η k)))) G.limit.sliceCarrier |
| 155 | (baseTime (G.subsequence (σ (η k)))) ((V).scale (G.subsequence (σ (η k)))) |
| 156 | (Icc (-H.toReal) 0) Uball, |
| 157 | EqOn (ψ k) (e0.forward (-H.toReal) |
| 158 | ⟨le_rfl, neg_nonpos.mpr ENNReal.toReal_nonneg⟩) Uball ∧ |
| 159 | (∀ s (hs : s ∈ Icc (-H.toReal) 0) |
| 160 | (hsG : s ∈ Icc (-G.exhaustion.time (σ (η k))) 0), ∀ x ∈ Uball, |
| 161 | e0.forward s hs x = (history (G.subsequence (σ (η k)))).history.forward |
| 162 | (baseTime (G.subsequence (σ (η k))) + |
| 163 | s / (V).scale (G.subsequence (σ (η k)))) |
| 164 | (limitNoncollapse_physical_time_mem G (σ (η k)) s hsG) |
| 165 | ((G.embedding (σ (η k))).forward s hsG x)) ∧ |
| 166 | (∀ s (hs : s ∈ Icc (-H.toReal) 0) |
| 167 | (hsG : s ∈ Icc (-G.exhaustion.time (σ (η k))) 0), ∀ x ∈ Uball, |
| 168 | ∀ v w : TangentSpace (𝓡 3) x, |
| 169 | e0.pullbackInner s hs x v w = |
| 170 | (G.embedding (σ (η k))).pullbackInner s hsG x v w) ∧ |
| 171 | (∀ x ∈ Uball, |
| 172 | ((F (G.subsequence (σ (η k)))).connection |
| 173 | (baseTime (G.subsequence (σ (η k))) + |
| 174 | -H.toReal / (V).scale (G.subsequence (σ (η k))))).scalarCurvature |
| 175 | (e0.forward (-H.toReal) |
| 176 | ⟨le_rfl, neg_nonpos.mpr ENNReal.toReal_nonneg⟩ x) ≤ |
| 177 | Lscalar * (V).scale (G.subsequence (σ (η k)))) ∧ |
| 178 | (∀ x ∈ Uball, ∀ v : TangentSpace (𝓡 3) x, |
| 179 | e0.pullbackInner 0 ⟨neg_nonpos.mpr ENNReal.toReal_nonneg, le_rfl⟩ x v v ≤ |
| 180 | 2 * (G.limit.flow.metric 0).inner x v v) ∧ |
| 181 | ((⟨baseTime (G.subsequence (σ (η k))) + |
| 182 | 0 / (V).scale (G.subsequence (σ (η k))), |
| 183 | e0.forward 0 ⟨neg_nonpos.mpr ENNReal.toReal_nonneg, le_rfl⟩ G.limit.base⟩ : |
| 184 | Σ t, ((F (G.subsequence (σ (η k)))).slice t).carrier) = |
| 185 | ⟨baseTime (G.subsequence (σ (η k))), |
| 186 | (history (G.subsequence (σ (η k)))).history.forward |
| 187 | (baseTime (G.subsequence (σ (η k)))) |
| 188 | (hbaseTime (G.subsequence (σ (η k)))) |
| 189 | (basePoint (G.subsequence (σ (η k))))⟩) := by |
| 190 | classical |
| 191 | obtain ⟨d, K, hd, hK, hc, A, hactual⟩ := limitFinite_actual_endpoint_rows F W history |
| 192 | baseTime hbaseTime basePoint hPositive hDiverges G hbad capBudget P S B p O hH hfinite |
| 193 | hInitial hConstants hParameters hBase hPinched rNext hThreshold hEarlier hOverlap |
| 194 | have hcandidates : ∀ j, ∀ᶠ k : ℕ in atTop, |
| 195 | (∀ s ∈ Icc (-(H.toReal + d j / 2)) 0, ∀ x : U j, |
| 196 | |((A j k).connection s).curvatureTensorNorm x| ≤ K j) ∧ |
| 197 | ∃ ht : -H.toReal + d j / 4 ∈ Icc (-G.exhaustion.time k) 0, |
| 198 | ∀ (x : U j) (v w : TangentSpace (𝓡 3) x), |
| 199 | ((A j k).metric (-H.toReal + d j / 4)).inner x v w = |
| 200 | (G.embedding k).pullbackInner (-H.toReal + d j / 4) ht x.val |
| 201 | (mfderiv (𝓡 3) (𝓡 3) |
| 202 | (Subtype.val : U j → G.limit.sliceCarrier.carrier) x v) |
| 203 | (mfderiv (𝓡 3) (𝓡 3) |
| 204 | (Subtype.val : U j → G.limit.sliceCarrier.carrier) x w) := by |
| 205 | intro j |
| 206 | filter_upwards [hactual j] with k hk |
| 207 | obtain ⟨hI, _hspace, b, _hb, e, _hmap, _hnorm, hAnorm, _hmetric, hold⟩ := hk |
| 208 | have ha : -H.toReal + d j / 4 ∈ Icc (-(H.toReal + d j / 2)) 0 := |
| 209 | ⟨by linarith only [hd j], (hc j).1⟩ |
| 210 | exact ⟨hAnorm, hI ⟨le_rfl, (hc j).1⟩, |
| 211 | fun x v w => hold _ ha _ x v w⟩ |
| 212 | obtain ⟨j, hj, N, _centers, R, ρ, Φ, hdata, hcover, _hcharts, |
| 213 | σ, hσ, coeff, hcoeffSmooth, hjets, hpoint, hsymm, hquad⟩ := |
| 214 | limitFinite_actual_endpoint_extraction G P d K hd hK hc A hcandidates |
| 215 | have hρ : ∀ m i, 0 < ρ m i := fun m i => (hdata m i).1 |
| 216 | have hρR : ∀ m i, ρ m i < R m i := by |
| 217 | intro m i |
| 218 | linarith only [hρ m i, (hdata m i).2.1] |
| 219 | have hsource : ∀ m i, (Φ m i).source = Metric.ball 0 (R m i) := |
| 220 | fun m i => (hdata m i).2.2.1 |
| 221 | have hlower : ∀ m i, ∃ a : ℝ, 0 < a ∧ |
| 222 | ∀ z ∈ Ioo (-((3 * d (j m) / 4) / 2)) 0 ×ˢ Metric.ball (0 : E) (ρ m i), |
| 223 | ∀ v : E, a * ‖v‖ ^ 2 ≤ coeff m i z v v := by |
| 224 | intro m i |
| 225 | obtain ⟨a, b, ha, _hb, hab⟩ := hquad m i |
| 226 | exact ⟨a, ha, fun z hz v => (hab z hz v).1⟩ |
| 227 | let Wb := fun z : Σ m, Fin (N m + 1) => Metric.ball (0 : E) (ρ z.1 z.2) |
| 228 | let hWb : ∀ z, IsOpen (Wb z) := fun _ => Metric.isOpen_ball |
| 229 | let : ∀ z, Nonempty (Piece Wb z) := |
| 230 | fun z => ⟨⟨0, Metric.mem_ball_self (hρ z.1 z.2)⟩⟩ |
| 231 | let : ∀ z, ChartedSpace E (Piece Wb z) := |
| 232 | fun z => (hWb z).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 233 | let : ∀ z, IsManifold (𝓡 3) ∞ (Piece Wb z) := |
| 234 | fun z => (hWb z).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 235 | obtain ⟨Fc, Ag, _hcenter, hcoeff, hread, hold, hcompat⟩ := |
| 236 | limitFinite_actual_endpoint_germs F W history baseTime hbaseTime basePoint hPositive |
| 237 | hDiverges G d K hd hc A hactual j N R ρ hρ hρR Φ hsource hcover σ hσ coeff |
| 238 | hcoeffSmooth hjets hpoint hsymm hlower |
| 239 | obtain ⟨gE, DE, hcomplete, _hfloor, hoperator, _hterminalSlots, _hterminalFlat, |
| 240 | hinner, hconnected, htriple, L, _hdL, _hLclock, hLmetric, hLoperator⟩ := |
| 241 | limitFinite_actual_endpoint_metric F W history baseTime hbaseTime basePoint hPositive |
| 242 | hDiverges G P hfinite hPinched d K hd (fun m => (hK m).le) hc A hactual |
| 243 | j N R ρ hρ hρR Φ hsource hcover σ hσ coeff hcoeffSmooth hjets |
| 244 | Fc hcoeff Ag hread hold hcompat |
| 245 | refine ⟨σ, hσ, gE, DE, hcomplete, hoperator, ?_⟩ |
| 246 | exact limitFinite_actual_retained_terminal_ball_service F W history baseTime hbaseTime |
| 247 | basePoint hPositive hDiverges G P S rNext hThreshold (fun k => (hParameters k).1) |
| 248 | (fun k => (hParameters k).2) hEarlier hfinite d K hd hc A hactual |
| 249 | j N hj R ρ hρR Φ hsource hcover σ hσ coeff hcoeffSmooth hjets gE DE hcomplete |
| 250 | hoperator hinner hconnected L hLmetric hLoperator htriple |
| 251 | |
| 252 | end PoincareMT.M47 |