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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Compatibility |
| 3 | import Mathlib.Tactic |
| 4 | |
| 5 | /-! |
| 6 | # Counterexamples to uniform bounded distance |
| 7 | |
| 8 | The contradiction setup of Morgan--Tian Theorem 10.2, printed pp. 246-247. |
| 9 | Failure of the actual same-time statement yields a sequence whose base |
| 10 | curvatures and violating curvature ratios tend to infinity. All metric |
| 11 | balls, flows and canonical certificates are retained from the contract. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.M28 |
| 19 | |
| 20 | open Filter |
| 21 | |
| 22 | /-- One violation of Theorem 10.2 at specified constants, with all the |
| 23 | original geometric hypotheses. See Morgan--Tian printed pp. 245-246. -/ |
| 24 | structure SameTimeCounterexample (epsilon C A D₀ D : ℝ) where |
| 25 | /-- The actual generalized flow. -/ |
| 26 | flow : GeneralizedRicciFlowData.{u} |
| 27 | /-- Equation (10.1) holds on the whole original flow, in its original clock. -/ |
| 28 | pinched : generalizedWeakHamiltonIveyPinched flow |
| 29 | /-- The tested time. -/ |
| 30 | time : ℝ |
| 31 | /-- The tested slice is included. -/ |
| 32 | time_mem : time ∈ flow.interval |
| 33 | /-- The base point. -/ |
| 34 | basepoint : (flow.slice time).carrier |
| 35 | /-- The base scalar exceeds the chosen cutoff. -/ |
| 36 | base_lower : D₀ ≤ flow.scalar ⟨time, basepoint⟩ |
| 37 | /-- Canonical control is on the tested slice above four times the base scalar. -/ |
| 38 | canonical : generalizedSliceStrongCanonicalNeighborhoods flow epsilon C |
| 39 | (4 * flow.scalar ⟨time, basepoint⟩) time |
| 40 | /-- A point violating the proposed scalar bound. -/ |
| 41 | endpoint : (flow.slice time).carrier |
| 42 | /-- Its distance is strictly within the actual normalized open ball. -/ |
| 43 | endpoint_mem : endpoint ∈ (flow.metric time).ball basepoint |
| 44 | (A * flow.scalar ⟨time, basepoint⟩ ^ (-1 / 2 : ℝ)) |
| 45 | /-- Strict failure of the scalar conclusion. -/ |
| 46 | scalar_large : D * flow.scalar ⟨time, basepoint⟩ < flow.scalar ⟨time, endpoint⟩ |
| 47 | |
| 48 | /-- Negating the same-time estimate fixes epsilon, C and A before selecting |
| 49 | counterexamples at cutoffs and ratios `n+1`. See Morgan--Tian Theorem 10.2, |
| 50 | printed pp. 246-247. -/ |
| 51 | theorem counterexamples_of_not_same_time {epsilon₀ : ℝ} |
| 52 | (h : ¬ M28SameTimeEstimateStatement.{u} epsilon₀) : |
| 53 | ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ epsilon₀ ∧ |
| 54 | ∃ C : ℝ, 0 < C ∧ ∃ A : ℝ, 0 ≤ A ∧ |
| 55 | Nonempty (∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 56 | ((n : ℝ) + 1) ((n : ℝ) + 1)) := by |
| 57 | classical |
| 58 | unfold M28SameTimeEstimateStatement RepairedBoundedDistanceEstimate at h |
| 59 | push Not at h |
| 60 | obtain ⟨epsilon, hepsilon, hsmall, C, hC, A, hA, hbad⟩ := h |
| 61 | refine ⟨epsilon, hepsilon, hsmall, C, hC, A, hA, ?_⟩ |
| 62 | have hex : ∀ n : ℕ, Nonempty (SameTimeCounterexample.{u} epsilon C A |
| 63 | ((n : ℝ) + 1) ((n : ℝ) + 1)) := by |
| 64 | intro n |
| 65 | have hn : (0 : ℝ) < (n : ℝ) + 1 := by positivity |
| 66 | obtain ⟨F, hpinched, t, ht, x, hx, hcanonical, y, hy, hlarge⟩ := |
| 67 | hbad ((n : ℝ) + 1) ((n : ℝ) + 1) hn hn |
| 68 | exact ⟨⟨F, hpinched, t, ht, x, hx, hcanonical, y, hy, hlarge⟩⟩ |
| 69 | exact ⟨fun n ↦ Classical.choice (hex n)⟩ |
| 70 | |
| 71 | /-- The counterexamples give a genuine blowup sequence with diverging |
| 72 | positive base scalars. See Morgan--Tian printed pp. 246-247. -/ |
| 73 | def counterexampleBlowupSequence {epsilon C A : ℝ} |
| 74 | (E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 75 | ((n : ℝ) + 1) ((n : ℝ) + 1)) : GeneralizedBlowupSequence.{u} where |
| 76 | flow n := (E n).flow |
| 77 | base n := ⟨(E n).time, (E n).basepoint⟩ |
| 78 | base_scalar_pos n := lt_of_lt_of_le (by positivity) (E n).base_lower |
| 79 | scalar_diverges := by |
| 80 | apply tendsto_atTop_mono (fun n ↦ (E n).base_lower) |
| 81 | apply tendsto_atTop_mono (fun n : ℕ ↦ ?_) tendsto_natCast_atTop_atTop |
| 82 | linarith |
| 83 | |
| 84 | /-- The violating scalar ratios also tend to infinity, because both |
| 85 | cutoffs were chosen to equal `n+1`. See Morgan--Tian printed p. 246. -/ |
| 86 | theorem counterexample_ratio_tendsto_atTop {epsilon C A : ℝ} |
| 87 | (E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 88 | ((n : ℝ) + 1) ((n : ℝ) + 1)) : |
| 89 | Tendsto (fun n ↦ (E n).flow.scalar ⟨(E n).time, (E n).endpoint⟩ / |
| 90 | (E n).flow.scalar ⟨(E n).time, (E n).basepoint⟩) atTop atTop := by |
| 91 | apply tendsto_atTop_mono (f := fun n : ℕ ↦ (n : ℝ)) |
| 92 | · intro n |
| 93 | have hpos := (counterexampleBlowupSequence E).base_scalar_pos n |
| 94 | have hlarge : (n : ℝ) + 1 < |
| 95 | (E n).flow.scalar ⟨(E n).time, (E n).endpoint⟩ / |
| 96 | (E n).flow.scalar ⟨(E n).time, (E n).basepoint⟩ := |
| 97 | (lt_div_iff₀ hpos).mpr (E n).scalar_large |
| 98 | linarith |
| 99 | · exact tendsto_natCast_atTop_atTop |
| 100 | |
| 101 | end PoincareMT.M28 |