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.StandardCap.Persistence.Cylinder.TrackedBall |
| 2 | import Mathlib.Topology.Order.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Selecting actual counterexamples after the uniform cutoff |
| 6 | |
| 7 | Failure of Proposition 16.5 supplies an actual eligible cap for each |
| 8 | prescribed positive cutoff. Its birth delta tends to zero whenever |
| 9 | the cutoffs do. Morgan--Tian, Proposition 16.5, pp. 370 and 373-374; |
| 10 | M44 derivation 93. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M44 |
| 21 | |
| 22 | /-- An actual failure of the frozen persistence alternative, retaining |
| 23 | the original observation, scale profile and geometric hypotheses. |
| 24 | Source: Proposition 16.5, pp. 373-374; M44 derivation 93. -/ |
| 25 | structure CapPersistenceCounterexample {constants : MetricSurgeryConstants} |
| 26 | (setup : SurgeryControlSetup constants) (start rNext A eta theta cutoff : ℝ) where |
| 27 | /-- The actual physical flow. -/ |
| 28 | flow : SurgeryFlowData.{u} |
| 29 | /-- Its actual observation interval and model decoration. -/ |
| 30 | observation : SurgeryObservation flow |
| 31 | /-- The frozen model comparison. -/ |
| 32 | standard_flow_eq : HEq observation.standard_flow setup.standard_flow |
| 33 | /-- The entire eligible profile uses the preselected cutoff. -/ |
| 34 | fixed_scales : SurgeryFixedScalesOn setup flow observation start rNext cutoff |
| 35 | /-- Primitive admissibility. -/ |
| 36 | admissible : SurgeryFlowAdmissible flow |
| 37 | /-- Actual pinching on the physical flow. -/ |
| 38 | pinched : SurgeryFlowPinched flow |
| 39 | /-- Actual canonical control on the observation interval. -/ |
| 40 | canonical : SurgeryCanonicalOn flow (surgeryObservationInterval observation) rNext |
| 41 | /-- The cap birth time. -/ |
| 42 | time : ℝ |
| 43 | /-- The actual surgery at birth. -/ |
| 44 | is_surgery : time ∈ flow.surgery_times |
| 45 | /-- The actual nonempty birth slice, used by the event and cap index. -/ |
| 46 | birth_nonempty : Nonempty (flow.slice time).carrier |
| 47 | /-- Birth lies strictly before the observation endpoint. -/ |
| 48 | observation_time : time ∈ surgeryObservationInterval observation |
| 49 | /-- Birth is in the controlled overlap. -/ |
| 50 | after_start : start ≤ time |
| 51 | /-- The birth delta obeys the selected cutoff. -/ |
| 52 | birth_delta_le : flow.parameters.delta time ≤ cutoff |
| 53 | /-- The actual cap of this event. -/ |
| 54 | cap : Fin (@SurgeryFlowData.event flow time is_surgery birth_nonempty).cap_count |
| 55 | /-- The exact frozen alternative fails. -/ |
| 56 | failure : ¬ @SurgeryCapPersistenceAlternative flow observation time is_surgery |
| 57 | birth_nonempty cap A eta theta |
| 58 | |
| 59 | /-- Failure of the cutoff-first proposition permits any prescribed |
| 60 | positive schedule of actual counterexamples. Source: Proposition |
| 61 | 16.5, pp. 373-374; M44 derivation 93. -/ |
| 62 | theorem counterexamples_at_positive_cutoffs |
| 63 | {constants : MetricSurgeryConstants} (setup : SurgeryControlSetup constants) |
| 64 | (start rNext A eta theta : ℝ) |
| 65 | (hnot : ¬ ∃ cutoff : ℝ, 0 < cutoff ∧ |
| 66 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 67 | HEq O.standard_flow setup.standard_flow → |
| 68 | SurgeryFixedScalesOn setup F O start rNext cutoff → |
| 69 | SurgeryFlowAdmissible F → SurgeryFlowPinched F → |
| 70 | SurgeryCanonicalOn F (surgeryObservationInterval O) rNext → |
| 71 | ∀ (t : ℝ) (hT : t ∈ F.surgery_times) [Nonempty (F.slice t).carrier], |
| 72 | t ∈ surgeryObservationInterval O → start ≤ t → F.parameters.delta t ≤ cutoff → |
| 73 | ∀ i : Fin (F.event t hT).cap_count, |
| 74 | SurgeryCapPersistenceAlternative F O t hT i A eta theta) |
| 75 | (cutoffs : ℕ → ℝ) (hcutoffs : ∀ n, 0 < cutoffs n) : |
| 76 | Nonempty (∀ n, CapPersistenceCounterexample.{u} setup start rNext A eta theta (cutoffs n)) := by |
| 77 | classical |
| 78 | have hbad (cutoff : ℝ) (hcutoff : 0 < cutoff) : |
| 79 | Nonempty (CapPersistenceCounterexample.{u} setup start rNext A eta theta cutoff) := by |
| 80 | by_contra hnone |
| 81 | apply hnot |
| 82 | refine ⟨cutoff, hcutoff, ?_⟩ |
| 83 | intro F O hmodel hscales hadmissible hpinch hcanonical t hT hn hobs hstart hdelta i |
| 84 | by_contra hfailure |
| 85 | exact hnone ⟨⟨F, O, hmodel, hscales, hadmissible, hpinch, hcanonical, t, hT, hn, |
| 86 | hobs, hstart, hdelta, i, hfailure⟩⟩ |
| 87 | exact ⟨fun n => Classical.choice (hbad (cutoffs n) (hcutoffs n))⟩ |
| 88 | |
| 89 | /-- The actual birth deltas tend to zero under a vanishing schedule |
| 90 | of counterexample cutoffs. Source: Proposition 16.5, p. 373; |
| 91 | M44 derivation 93. -/ |
| 92 | theorem counterexample_birth_delta_tendsto_zero |
| 93 | {constants : MetricSurgeryConstants} {setup : SurgeryControlSetup constants} |
| 94 | {start rNext A eta theta : ℝ} {cutoffs : ℕ → ℝ} |
| 95 | (X : ∀ n, CapPersistenceCounterexample.{u} setup start rNext A eta theta (cutoffs n)) |
| 96 | (hcutoffs : Tendsto cutoffs atTop (𝓝 0)) : |
| 97 | Tendsto (fun n => (X n).flow.parameters.delta (X n).time) atTop (𝓝 0) := by |
| 98 | apply squeeze_zero (fun n => ((X n).flow.parameters.delta_pos (X n).time |
| 99 | (X n).observation_time.1).le) (fun n => (X n).birth_delta_le) hcutoffs |
| 100 | |
| 101 | end PoincareMT.M44 |