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.Induction.Noncollapse.Assembly.StableConfiguration |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Prefix |
| 3 | |
| 4 | /-! |
| 5 | # The configuration and constant order for Proposition 16.1 |
| 6 | |
| 7 | This file fixes the exact interfaces between the geometric producers and the |
| 8 | Theorem 8.1 application. The conditional assembly below is not a producer of |
| 9 | minimizers or of a stable image with positive volume. |
| 10 | |
| 11 | Sources: Morgan--Tian Proposition 16.1 and Remark 16.2, pp. 367-368; |
| 12 | Proposition 16.4, p. 369; Proposition 16.5, p. 370; Claim 16.27, |
| 13 | pp. 391-394; and Theorem 8.1, pp. 169-176. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | -- The raw cylinder and its slice realization retain the same chosen instances. |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped Manifold ContDiff Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Proofs.M46 |
| 26 | |
| 27 | /-- Conditional assembly with separate literal producer hypotheses. |
| 28 | The minimizer producer consumes cap control; the stable-source producer |
| 29 | consumes the minimizing region and positive-ancestor exclusion. -/ |
| 30 | theorem configuration_from_producers (P : M46Predecessors.{u}) |
| 31 | {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 32 | {taubar l0 V : ℝ} (U : M15GeneralizedUniformData.{u} 3 taubar l0 V) |
| 33 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 34 | (old : SurgeryPrefixControls p F O) (D : NoncollapseTest F O) |
| 35 | (history : HalfRadiusHistory D) (rho A eta theta : ℝ) |
| 36 | (time_new : surgeryEpochStart p.i ≤ D.time) |
| 37 | (radius_large : rho ≤ D.radius) |
| 38 | (cap_persistence : OverlapCapControl p O old A eta theta) |
| 39 | (cap_avoidance : surgeryEpochStart p.i ≤ D.time → rho ≤ D.radius → |
| 40 | OverlapCapControl p O old A eta theta → |
| 41 | ∃ confinement : ActionConfinement history.spacetime.geometry.toLGeometry |
| 42 | D.time (surgeryEpochStart (p.i - 1)) |
| 43 | ((history.spacetime.geometry.sliceIdentification D.time).identification |
| 44 | history.center).val, confinement.barrier = actionBudget p) |
| 45 | (minimizers : ∀ confinement : ActionConfinement history.spacetime.geometry.toLGeometry |
| 46 | D.time (surgeryEpochStart (p.i - 1)) |
| 47 | ((history.spacetime.geometry.sliceIdentification D.time).identification |
| 48 | history.center).val, |
| 49 | confinement.barrier = actionBudget p → |
| 50 | surgeryEpochStart p.i ≤ D.time → rho ≤ D.radius → |
| 51 | Nonempty (MinimizingRegion history.spacetime.geometry.toLGeometry |
| 52 | D.time (surgeryEpochStart (p.i - 1)) |
| 53 | ((history.spacetime.geometry.sliceIdentification D.time).identification |
| 54 | history.center).val confinement)) |
| 55 | (positive_propagation : PositiveAncestorExclusion history) |
| 56 | (stable_set : ∀ confinement : ActionConfinement history.spacetime.geometry.toLGeometry |
| 57 | D.time (surgeryEpochStart (p.i - 1)) |
| 58 | ((history.spacetime.geometry.sliceIdentification D.time).identification |
| 59 | history.center).val, |
| 60 | confinement.barrier = actionBudget p → |
| 61 | MinimizingRegion history.spacetime.geometry.toLGeometry |
| 62 | D.time (surgeryEpochStart (p.i - 1)) |
| 63 | ((history.spacetime.geometry.sliceIdentification D.time).identification |
| 64 | history.center).val confinement → |
| 65 | PositiveAncestorExclusion history → Nonempty (StableSource history taubar l0 V)) : |
| 66 | ENNReal.ofReal (configurationKappa p U * D.radius ^ 3) ≤ |
| 67 | calibratedMetricVolume (F.metric D.time) ((F.metric D.time).ball D.center D.radius) := by |
| 68 | obtain ⟨confinement, hbudget⟩ := cap_avoidance time_new radius_large cap_persistence |
| 69 | obtain ⟨region⟩ := minimizers confinement hbudget time_new radius_large |
| 70 | obtain ⟨source⟩ := stable_set confinement hbudget region positive_propagation |
| 71 | exact source.volume P p U |
| 72 | |
| 73 | /-- The exact observed-flow hypotheses of Proposition 16.1, p. 367. |
| 74 | This local record changes no public premise and keeps the cutoff visible. -/ |
| 75 | structure ObservedInputs {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 76 | (rNext cutoff : ℝ) (F : SurgeryFlowData.{u}) (O : SurgeryObservation F) : Prop where |
| 77 | next_epoch : SurgeryObservationIsNextEpoch p O |
| 78 | old : SurgeryPrefixControls p F O |
| 79 | admissible : SurgeryFlowAdmissible F |
| 80 | pinched : SurgeryFlowPinched F |
| 81 | terminal_policy : SurgeryFlowTerminalPolicyOn F (surgeryObservationInterval O) |
| 82 | scales : SurgeryPostPrefixScales p F O rNext cutoff |
| 83 | canonical : SurgeryCanonicalOn F (surgeryObservationInterval O) rNext |
| 84 | overlap : ∀ t ∈ surgeryObservationInterval O ∩ overlapInterval p, |
| 85 | F.parameters.delta t ≤ cutoff |
| 86 | |
| 87 | /-- The cap-avoidance endpoint of Proposition 16.13, Lemma 16.15 and |
| 88 | Proposition 16.21, pp. 376-387. The cutoff and comparison parameters are |
| 89 | fixed before every flow. The positive test scale `rho` may be smaller than |
| 90 | the actual surgery scale `rNext`, which remains in `inputs.scales`. |
| 91 | The actual terminal policy remains in `inputs`. |
| 92 | See the reviewed critical-path derivation in M46 records. -/ |
| 93 | def CapAvoidanceProducer {K : MetricSurgeryConstants} |
| 94 | (p : SurgeryParameterPrefix K) (rNext cutoff rho A eta theta : ℝ) : Prop := |
| 95 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F) |
| 96 | (inputs : ObservedInputs p rNext cutoff F O), |
| 97 | ∀ (D : NoncollapseTest F O) (H : HalfRadiusHistory D), |
| 98 | surgeryEpochStart p.i ≤ D.time → rho ≤ D.radius → |
| 99 | OverlapCapControl p O inputs.old A eta theta → |
| 100 | ∃ C : ActionConfinement H.spacetime.geometry.toLGeometry |
| 101 | D.time (surgeryEpochStart (p.i - 1)) |
| 102 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val, |
| 103 | C.barrier = actionBudget p |
| 104 | |
| 105 | /-- Proposition 16.4's literal minimizing-region endpoint, p. 369. |
| 106 | Compact confinement is for actual paths in the selected history; neither |
| 107 | attainment nor the slice-minimum estimate is supplied by a new predecessor. |
| 108 | See the reviewed critical-path derivation in M46 records. -/ |
| 109 | def MinimizingRegionProducer {K : MetricSurgeryConstants} |
| 110 | (p : SurgeryParameterPrefix K) (rNext cutoff rho : ℝ) : Prop := |
| 111 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 112 | ObservedInputs p rNext cutoff F O → |
| 113 | ∀ (D : NoncollapseTest F O) (H : HalfRadiusHistory D), |
| 114 | surgeryEpochStart p.i ≤ D.time → rho ≤ D.radius → |
| 115 | ∀ C : ActionConfinement H.spacetime.geometry.toLGeometry |
| 116 | D.time (surgeryEpochStart (p.i - 1)) |
| 117 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val, |
| 118 | C.barrier = actionBudget p → |
| 119 | Nonempty (MinimizingRegion H.spacetime.geometry.toLGeometry |
| 120 | D.time (surgeryEpochStart (p.i - 1)) |
| 121 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val C) |
| 122 | |
| 123 | /-- The literal stable-source producer reviewed against Claim 16.27, |
| 124 | pp. 391-394. Its three source constants are fixed before `rNext` and |
| 125 | every flow; its minimizing region and positive ancestry concern the same |
| 126 | chosen history. See the integrated stable-source derivation in M46 records. -/ |
| 127 | def StableSourceProducer {K : MetricSurgeryConstants} |
| 128 | (p : SurgeryParameterPrefix K) (taubar l0 V : ℝ) : Prop := |
| 129 | ∀ (rNext cutoff : ℝ) (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 130 | ObservedInputs p rNext cutoff F O → |
| 131 | ∀ (D : NoncollapseTest F O) (H : HalfRadiusHistory D), |
| 132 | surgeryEpochStart p.i ≤ D.time → |
| 133 | ∀ C : ActionConfinement H.spacetime.geometry.toLGeometry |
| 134 | D.time (surgeryEpochStart (p.i - 1)) |
| 135 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val, |
| 136 | C.barrier = actionBudget p → |
| 137 | MinimizingRegion H.spacetime.geometry.toLGeometry |
| 138 | D.time (surgeryEpochStart (p.i - 1)) |
| 139 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val C → |
| 140 | PositiveAncestorExclusion H → Nonempty (StableSource H taubar l0 V) |
| 141 | |
| 142 | /-- Substitute the reviewed stable producer into the exact Theorem 8.1 |
| 143 | configuration and its half-radius volume estimate, pp. 393-394. -/ |
| 144 | theorem volume_of_stableSourceProducer (P : M46Predecessors.{u}) |
| 145 | {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 146 | {taubar l0 V : ℝ} (U : M15GeneralizedUniformData.{u} 3 taubar l0 V) |
| 147 | (produce : StableSourceProducer.{u} p taubar l0 V) |
| 148 | (rNext cutoff : ℝ) {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 149 | (inputs : ObservedInputs p rNext cutoff F O) |
| 150 | (D : NoncollapseTest F O) (H : HalfRadiusHistory D) |
| 151 | (time_new : surgeryEpochStart p.i ≤ D.time) |
| 152 | (C : ActionConfinement H.spacetime.geometry.toLGeometry |
| 153 | D.time (surgeryEpochStart (p.i - 1)) |
| 154 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val) |
| 155 | (budget : C.barrier = actionBudget p) |
| 156 | (region : MinimizingRegion H.spacetime.geometry.toLGeometry |
| 157 | D.time (surgeryEpochStart (p.i - 1)) |
| 158 | ((H.spacetime.geometry.sliceIdentification D.time).identification H.center).val C) |
| 159 | (positive : PositiveAncestorExclusion H) : |
| 160 | ENNReal.ofReal (configurationKappa p U * D.radius ^ 3) ≤ |
| 161 | calibratedMetricVolume (F.metric D.time) ((F.metric D.time).ball D.center D.radius) := by |
| 162 | obtain ⟨Q⟩ := produce rNext cutoff F O inputs D H time_new C budget region positive |
| 163 | exact Q.volume P p U |
| 164 | |
| 165 | /-- Substitute all three reviewed producer endpoints into the same |
| 166 | Theorem 8.1 configuration, as on pp. 393-394. Their proofs remain separate |
| 167 | from this conditional assembly. -/ |
| 168 | theorem volume_of_reviewed_producers (P : M46Predecessors.{u}) |
| 169 | {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 170 | {taubar l0 V : ℝ} (U : M15GeneralizedUniformData.{u} 3 taubar l0 V) |
| 171 | (stable : StableSourceProducer.{u} p taubar l0 V) |
| 172 | (rNext cutoff rho A eta theta : ℝ) |
| 173 | (avoid : CapAvoidanceProducer.{u} p rNext cutoff rho A eta theta) |
| 174 | (minimize : MinimizingRegionProducer.{u} p rNext cutoff rho) |
| 175 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 176 | (inputs : ObservedInputs p rNext cutoff F O) |
| 177 | (D : NoncollapseTest F O) (H : HalfRadiusHistory D) |
| 178 | (time_new : surgeryEpochStart p.i ≤ D.time) (radius_large : rho ≤ D.radius) |
| 179 | (caps : OverlapCapControl p O inputs.old A eta theta) |
| 180 | (positive : PositiveAncestorExclusion H) : |
| 181 | ENNReal.ofReal (configurationKappa p U * D.radius ^ 3) ≤ |
| 182 | calibratedMetricVolume (F.metric D.time) ((F.metric D.time).ball D.center D.radius) := by |
| 183 | obtain ⟨C, budget⟩ := avoid F O inputs D H time_new radius_large caps |
| 184 | obtain ⟨region⟩ := minimize F O inputs D H time_new radius_large C budget |
| 185 | exact volume_of_stableSourceProducer P p U stable rNext cutoff inputs |
| 186 | D H time_new C budget region positive |
| 187 | |
| 188 | /-- The new-time alternatives in Proposition 16.1, pp. 368, 391-394. |
| 189 | Low scalar curvature and a radius below the auxiliary scale use a larger |
| 190 | controlled cylinder and Bishop--Gromov comparison. -/ |
| 191 | def TestConclusion {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 192 | {taubar l0 V : ℝ} (U : M15GeneralizedUniformData.{u} 3 taubar l0 V) |
| 193 | (rNext rho : ℝ) {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 194 | (D : NoncollapseTest F O) : Prop := |
| 195 | (rNext⁻¹ ^ 2 ≤ (F.connection D.time).scalarCurvature D.center ∧ |
| 196 | ENNReal.ofReal (configurationKappa p U * D.radius ^ 3) ≤ |
| 197 | calibratedMetricVolume (F.metric D.time) ((F.metric D.time).ball D.center D.radius)) ∨ |
| 198 | ((F.connection D.time).scalarCurvature D.center < rNext⁻¹ ^ 2 ∧ |
| 199 | D.radius < rho ∧ |
| 200 | ENNReal.ofReal (configurationKappa p U * D.radius ^ 3) ≤ |
| 201 | calibratedMetricVolume (F.metric D.time) |
| 202 | ((F.metric D.time).ball D.center D.radius)) ∨ |
| 203 | ∃ H : HalfRadiusHistory D, Nonempty (StableSource H taubar l0 V) |
| 204 | |
| 205 | /-- The outer quantifiers enforce the source order: one M15 package before |
| 206 | the next radius, one cutoff before the flow, then the geometric producers. |
| 207 | This is conditional assembly, not an additional premise on the public M46 |
| 208 | theorem. Its hypothesis remains to be established by the producers. -/ |
| 209 | theorem induction_of_uniform_sources (P : M46Predecessors.{u}) |
| 210 | (S : RepairedControlledSchedulesData.{u}) |
| 211 | (produce : ∀ (p : SurgeryParameterPrefix S.constants), S.SeedCompatible p → |
| 212 | ∃ taubar l0 V : ℝ, ∃ U : M15GeneralizedUniformData.{u} 3 taubar l0 V, |
| 213 | ∀ rNext : ℝ, 0 < rNext → rNext ≤ p.r (Fin.last p.i) → |
| 214 | ∃ rho : ℝ, 0 < rho ∧ rho ≤ rNext ∧ |
| 215 | ∃ delta : ℝ, 0 < delta ∧ delta ≤ p.Delta (Fin.last p.i) ∧ |
| 216 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 217 | ObservedInputs p rNext delta F O → |
| 218 | ∀ D : NoncollapseTest F O, surgeryEpochStart p.i ≤ D.time → |
| 219 | TestConclusion p U rNext rho D) : |
| 220 | Nonempty (RepairedNoncollapseInductionData.{u} S) := by |
| 221 | classical |
| 222 | refine ⟨⟨fun p hp => ?_⟩⟩ |
| 223 | obtain ⟨taubar, l0, V, U, hU⟩ := produce p hp |
| 224 | let rho : ℝ → ℝ := fun rNext => |
| 225 | if hr : 0 < rNext ∧ rNext ≤ p.r (Fin.last p.i) then |
| 226 | Classical.choose (hU rNext hr.1 hr.2) else 1 |
| 227 | have rho_spec (rNext : ℝ) (hr : 0 < rNext) |
| 228 | (hle : rNext ≤ p.r (Fin.last p.i)) : |
| 229 | 0 < rho rNext ∧ rho rNext ≤ rNext ∧ |
| 230 | ∃ delta : ℝ, 0 < delta ∧ delta ≤ p.Delta (Fin.last p.i) ∧ |
| 231 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 232 | ObservedInputs p rNext delta F O → |
| 233 | ∀ D : NoncollapseTest F O, surgeryEpochStart p.i ≤ D.time → |
| 234 | TestConclusion p U rNext (rho rNext) D := by |
| 235 | have hallowed : 0 < rNext ∧ rNext ≤ p.r (Fin.last p.i) := ⟨hr, hle⟩ |
| 236 | simpa only [rho, dif_pos hallowed] using |
| 237 | Classical.choose_spec (hU rNext hr hle) |
| 238 | let cutoff : ℝ → ℝ := fun rNext => |
| 239 | if hr : 0 < rNext ∧ rNext ≤ p.r (Fin.last p.i) then |
| 240 | Classical.choose (rho_spec rNext hr.1 hr.2).2.2 else 1 |
| 241 | have cutoff_spec (rNext : ℝ) (hr : 0 < rNext) |
| 242 | (hle : rNext ≤ p.r (Fin.last p.i)) : |
| 243 | 0 < cutoff rNext ∧ cutoff rNext ≤ p.Delta (Fin.last p.i) ∧ |
| 244 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 245 | ObservedInputs p rNext (cutoff rNext) F O → |
| 246 | ∀ D : NoncollapseTest F O, surgeryEpochStart p.i ≤ D.time → |
| 247 | TestConclusion p U rNext (rho rNext) D := by |
| 248 | have hallowed : 0 < rNext ∧ rNext ≤ p.r (Fin.last p.i) := ⟨hr, hle⟩ |
| 249 | simpa only [cutoff, dif_pos hallowed] using |
| 250 | Classical.choose_spec (rho_spec rNext hr hle).2.2 |
| 251 | refine ⟨{ |
| 252 | kappaNew := configurationKappa p U |
| 253 | cutoff := cutoff |
| 254 | kappa_pos := configurationKappa_pos p U |
| 255 | kappa_le_last := configurationKappa_le_last p U |
| 256 | cutoff_bounds := fun r hr hle => |
| 257 | ⟨(cutoff_spec r hr hle).1, (cutoff_spec r hr hle).2.1⟩ |
| 258 | noncollapsed := ?_ |
| 259 | }⟩ |
| 260 | intro rNext hr hle F O hepoch old hadm hpin hpolicy hscales hcan hoverlap |
| 261 | t ht htF x hpositive r hradius hrle e hbase hcurv |
| 262 | let D : NoncollapseTest F O := |
| 263 | ⟨t, ht, htF, x, hpositive, r, hradius, hrle, e, hbase, hcurv⟩ |
| 264 | by_cases hnew : surgeryEpochStart p.i ≤ t |
| 265 | swap |
| 266 | · exact prefix_noncollapsed old (configurationKappa_le_last p U) |
| 267 | t ⟨ht, ht.1, lt_of_not_ge hnew⟩ htF x hpositive r hradius hrle e hbase hcurv |
| 268 | rcases (cutoff_spec rNext hr hle).2.2 F O |
| 269 | ⟨hepoch, old, hadm, hpin, hpolicy, hscales, hcan, hoverlap⟩ D hnew with |
| 270 | h | h | ⟨H, source⟩ |
| 271 | · exact h.2 |
| 272 | · exact h.2.2 |
| 273 | · obtain ⟨Q⟩ := source |
| 274 | exact Q.volume P p U |
| 275 | |
| 276 | end PoincareMT.Proofs.M46 |