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.Tube.SourceGeometry.Ends.SourceTubeVolume |
| 3 | |
| 4 | /-! |
| 5 | # Uniform scalar divergence on the literal terminal source neck |
| 6 | |
| 7 | The retained high endpoint lies in the same last selected neck. Scalar |
| 8 | comparison on that neck promotes endpoint divergence to a uniform bound |
| 9 | on its whole carrier. A fresh neck with bounded normalized center scalar |
| 10 | therefore avoids even the closure of the last carrier. |
| 11 | Morgan--Tian Claim 10.8, p. 254; M28 derivation 89. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28 |
| 23 | |
| 24 | /-- The last integer-indexed source node is the retained last list entry, |
| 25 | and its carrier contains the literal high endpoint (Claim 10.8; |
| 26 | derivation 89). -/ |
| 27 | theorem SourceTubeData.node_last_readout |
| 28 | {epsilon C A D₀ D : ℝ} |
| 29 | {E : SameTimeCounterexample.{u} epsilon C A D₀ D} |
| 30 | {S : CounterexampleNeckSegment E} (T : SourceTubeData S) : |
| 31 | T.list.node ((T.list.nodes.length - 1 : ℕ) : ℤ) = |
| 32 | T.list.nodes.getLast T.list.nonempty ∧ |
| 33 | S.path S.upper ∈ |
| 34 | (T.list.node ((T.list.nodes.length - 1 : ℕ) : ℤ)).2.carrier := by |
| 35 | have hlen : 0 < T.list.nodes.length := List.length_pos_iff.mpr T.list.nonempty |
| 36 | have hlast : ((T.list.nodes.length - 1 : ℕ) : ℤ) ∈ T.list.active := by |
| 37 | change 0 ≤ ((T.list.nodes.length - 1 : ℕ) : ℤ) ∧ |
| 38 | ((T.list.nodes.length - 1 : ℕ) : ℤ) ≤ (T.list.nodes.length : ℤ) - 1 |
| 39 | omega |
| 40 | have heq : T.list.node ((T.list.nodes.length - 1 : ℕ) : ℤ) = |
| 41 | T.list.nodes.getLast T.list.nonempty := by |
| 42 | rw [T.list.node_eq_getElem hlast] |
| 43 | simpa only [Int.toNat_natCast] using (List.getLast_eq_getElem T.list.nonempty).symm |
| 44 | refine ⟨heq, ?_⟩ |
| 45 | rw [heq] |
| 46 | exact T.list.terminal (right_mem_Icc.mpr |
| 47 | ((T.list.vertex _ (List.getLast_mem T.list.nonempty)).1.2)) |
| 48 | |
| 49 | namespace CounterexampleNeckFamily |
| 50 | |
| 51 | /-- Scalar on the whole literal last source neck diverges uniformly. |
| 52 | The tail index follows the requested bound and precedes every point of |
| 53 | that neck (Claim 10.8; derivation 89). -/ |
| 54 | theorem exists_source_terminal_neck_scalar_accuracy : |
| 55 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 56 | ∀ {epsilon C A : ℝ} |
| 57 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 58 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 59 | (H : CounterexampleNeckFamily E) |
| 60 | (T : ∀ k, SourceTubeData (H.segment k)), epsilon ≤ epsilon₀ → |
| 61 | ∀ B : ℝ, ∀ᶠ k in atTop, |
| 62 | ∀ x ∈ ((T k).list.node (((T k).list.nodes.length - 1 : ℕ) : ℤ)).2.carrier, |
| 63 | B < (H.normalizedSliceConnection k).scalarCurvature x := by |
| 64 | obtain ⟨epsilon₀, hpos, hsmall, hratio⟩ := tube.exists_cylinder_scalar_ratio_accuracy.{u} |
| 65 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 66 | intro epsilon C A E H T hepsilon B |
| 67 | filter_upwards [H.normalizedSlice_upper_scalar_tendsto.eventually |
| 68 | (eventually_gt_atTop (2 * B))] with k hk |
| 69 | intro x hx |
| 70 | have hlen : 0 < (T k).list.nodes.length := List.length_pos_iff.mpr (T k).list.nonempty |
| 71 | have hlast : (((T k).list.nodes.length - 1 : ℕ) : ℤ) ∈ (T k).list.active := by |
| 72 | change 0 ≤ (((T k).list.nodes.length - 1 : ℕ) : ℤ) ∧ |
| 73 | (((T k).list.nodes.length - 1 : ℕ) : ℤ) ≤ ((T k).list.nodes.length : ℤ) - 1 |
| 74 | omega |
| 75 | let N := ((T k).list.node (((T k).list.nodes.length - 1 : ℕ) : ℤ)).2 |
| 76 | have hepsN : N.epsilon ≤ epsilon₀ := |
| 77 | ((T k).list.node_epsilon hlast).trans_le hepsilon |
| 78 | have hraw := hratio _ _ ((E (k + H.shift)).flow.connection (E (k + H.shift)).time) |
| 79 | N hepsN ((H.segment k).path (H.segment k).upper) (T k).node_last_readout.2 x hx |
| 80 | have hnormalized : (H.normalizedSliceConnection k).scalarCurvature |
| 81 | ((H.segment k).path (H.segment k).upper) ≤ |
| 82 | 2 * (H.normalizedSliceConnection k).scalarCurvature x := by |
| 83 | rw [H.normalizedSlice_scalar_eq, H.normalizedSlice_scalar_eq, ← mul_div_assoc] |
| 84 | exact div_le_div_of_nonneg_right hraw (H.base_scalar_pos k).le |
| 85 | linarith only [hk, hnormalized] |
| 86 | |
| 87 | /-- Bounded fresh center scalar excludes the whole fresh carrier from the |
| 88 | closure of the last selected carrier. Both comparisons are actual neck |
| 89 | estimates, with one common eventual tail (Claim 10.8; derivation 89). -/ |
| 90 | theorem exists_source_terminal_neck_exclusion_accuracy : |
| 91 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 92 | ∀ {epsilon C A : ℝ} |
| 93 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 94 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 95 | (H : CounterexampleNeckFamily E) |
| 96 | (T : ∀ k, SourceTubeData (H.segment k)), epsilon ≤ epsilon₀ → |
| 97 | ∀ (phi : ℕ → ℕ), StrictMono phi → |
| 98 | ∀ (J : ∀ k, EpsilonNeck |
| 99 | ((E (phi k + H.shift)).flow.metric (E (phi k + H.shift)).time)), |
| 100 | (∀ k, (J k).epsilon = epsilon) → ∀ B : ℝ, |
| 101 | (∀ᶠ k in atTop, (H.normalizedSliceConnection (phi k)).scalarCurvature |
| 102 | (J k).center ≤ B) → |
| 103 | ∀ᶠ k in atTop, Disjoint (J k).carrier |
| 104 | (closure (((T (phi k)).list.node |
| 105 | (((T (phi k)).list.nodes.length - 1 : ℕ) : ℤ)).2.carrier)) := by |
| 106 | obtain ⟨epsilonT, hTpos, hTsmall, hterminal⟩ := |
| 107 | exists_source_terminal_neck_scalar_accuracy.{u} |
| 108 | obtain ⟨epsilonR, hRpos, _, hratio⟩ := tube.exists_cylinder_scalar_ratio_accuracy.{u} |
| 109 | refine ⟨min epsilonT epsilonR, lt_min hTpos hRpos, |
| 110 | (min_le_left _ _).trans hTsmall, ?_⟩ |
| 111 | intro epsilon C A E H T hepsilon phi hphi J hepsJ B hcenter |
| 112 | have hhigh := hphi.tendsto_atTop.eventually |
| 113 | (hterminal H T (hepsilon.trans (min_le_left _ _)) (2 * B)) |
| 114 | filter_upwards [hhigh, hcenter] with k hk hcenterK |
| 115 | apply Disjoint.closure_right _ (J k).carrier_open |
| 116 | apply disjoint_left.mpr |
| 117 | intro x hxJ hxLast |
| 118 | have heps : (J k).epsilon ≤ epsilonR := by |
| 119 | rw [hepsJ] |
| 120 | exact hepsilon.trans (min_le_right _ _) |
| 121 | have hraw := hratio _ _ |
| 122 | ((E (phi k + H.shift)).flow.connection (E (phi k + H.shift)).time) |
| 123 | (J k) heps x hxJ (J k).center |
| 124 | ((J k).central_sphere_subset (J k).center_on_central_sphere) |
| 125 | have hnormalized : (H.normalizedSliceConnection (phi k)).scalarCurvature x ≤ |
| 126 | 2 * (H.normalizedSliceConnection (phi k)).scalarCurvature (J k).center := by |
| 127 | rw [H.normalizedSlice_scalar_eq, H.normalizedSlice_scalar_eq, ← mul_div_assoc] |
| 128 | exact div_le_div_of_nonneg_right hraw (H.base_scalar_pos (phi k)).le |
| 129 | have hpoint := hk x hxLast |
| 130 | linarith only [hpoint, hnormalized, hcenterK] |
| 131 | |
| 132 | end CounterexampleNeckFamily |
| 133 | |
| 134 | end PoincareMT.M28 |