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 | # Sharp scalar and fresh-scale bounds on the retained source tube |
| 6 | |
| 7 | The selected centers lie above the initial scalar. Arbitrary cylinder |
| 8 | scalar accuracy therefore improves the factor-two bound on the whole |
| 9 | tube to 0.99 times the initial scalar. Every fresh centered neck then |
| 10 | has normalized scale less than 1.01 times the initial scale. |
| 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 |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 23 | |
| 24 | /-- The actual tube has scalar strictly above 0.99 times the exact initial |
| 25 | scalar. The tolerance precedes all source data (Claim 10.8; derivation 89). -/ |
| 26 | theorem exists_source_tube_sharp_scalar_accuracy : |
| 27 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 28 | ∀ {epsilon C A : ℝ} |
| 29 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 30 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 31 | (H : CounterexampleNeckFamily E) |
| 32 | (T : ∀ k, SourceTubeData (H.segment k)), epsilon ≤ epsilon₀ → |
| 33 | ∀ k (x : ((E (k + H.shift)).flow.slice (E (k + H.shift)).time).carrier), |
| 34 | x ∈ (T k).carrierOpen → |
| 35 | (0.99 : ℝ) * (16 * (max C 2) ^ 2) < |
| 36 | (H.normalizedSliceConnection k).scalarCurvature x := by |
| 37 | obtain ⟨epsilon₀, hpos, hsmall, hclose⟩ := |
| 38 | tube.exists_cylinder_scalar_accuracy.{u} (delta := 1 / 100) (by norm_num) |
| 39 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 40 | intro epsilon C A E H T hepsilon k x hx |
| 41 | change x ∈ ((T k).carrierOpen : Set _) at hx |
| 42 | rw [(T k).carrier_eq_iUnion_nodes] at hx |
| 43 | obtain ⟨i, hi, hx⟩ := mem_iUnion₂.mp hx |
| 44 | have hactive : (i : ℤ) ∈ (T k).list.active := by |
| 45 | change 0 ≤ (i : ℤ) ∧ (i : ℤ) ≤ ((T k).list.nodes.length : ℤ) - 1 |
| 46 | have := Finset.mem_range.mp hi |
| 47 | omega |
| 48 | let N := ((T k).list.node (i : ℤ)).2 |
| 49 | let D := (E (k + H.shift)).flow.connection (E (k + H.shift)).time |
| 50 | have hepsN : N.epsilon ≤ epsilon₀ := by |
| 51 | rw [(T k).list.node_epsilon hactive] |
| 52 | exact hepsilon |
| 53 | have herror := (abs_lt.mp (hclose _ _ D N hepsN x hx)).1 |
| 54 | have hcenter := tube.neck_normalized_scalar_center N D |
| 55 | have hratio : (0.99 : ℝ) * D.scalarCurvature N.center < D.scalarCurvature x := by |
| 56 | apply (mul_lt_mul_iff_right₀ (sq_pos_of_pos N.scale_pos)).mp |
| 57 | nlinarith only [herror, hcenter] |
| 58 | have hband := ((H.segment k).scalar_band ((T k).list.node (i : ℤ)).1 |
| 59 | ((T k).list.node_time_mem hactive)).1 |
| 60 | rw [(T k).list.node_center hactive] at hband |
| 61 | have hraw := lt_of_le_of_lt |
| 62 | (mul_le_mul_of_nonneg_left hband (by norm_num : (0 : ℝ) ≤ 0.99)) hratio |
| 63 | rw [H.normalizedSlice_scalar_eq] |
| 64 | apply (lt_div_iff₀ (H.base_scalar_pos k)).mpr |
| 65 | simpa only [D, GeneralizedRicciFlowData.scalar, mul_assoc] using hraw |
| 66 | |
| 67 | /-- A fresh neck centered anywhere in the same source tube has scale |
| 68 | less than 1.01 times its initial scale after the global normalization |
| 69 | (Claim 10.8; derivation 89). No carrier-containment premise is used. -/ |
| 70 | theorem exists_source_tube_fresh_scale_accuracy : |
| 71 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 72 | ∀ {epsilon C A : ℝ} |
| 73 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 74 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 75 | (H : CounterexampleNeckFamily E) |
| 76 | (T : ∀ k, SourceTubeData (H.segment k)), epsilon ≤ epsilon₀ → |
| 77 | ∀ k (N : EpsilonNeck |
| 78 | ((E (k + H.shift)).flow.metric (E (k + H.shift)).time)), |
| 79 | N.center ∈ (T k).carrierOpen → |
| 80 | Real.sqrt ((E (k + H.shift)).flow.scalar |
| 81 | ⟨(E (k + H.shift)).time, (E (k + H.shift)).basepoint⟩) * N.scale < |
| 82 | (1.01 : ℝ) * (4 * max C 2)⁻¹ := by |
| 83 | obtain ⟨epsilon₀, hpos, hsmall, hlower⟩ := exists_source_tube_sharp_scalar_accuracy.{u} |
| 84 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 85 | intro epsilon C A E H T hepsilon k N hcenter |
| 86 | let Q := (E (k + H.shift)).flow.scalar |
| 87 | ⟨(E (k + H.shift)).time, (E (k + H.shift)).basepoint⟩ |
| 88 | let r := Real.sqrt Q * N.scale |
| 89 | have hQ : 0 < Q := H.base_scalar_pos k |
| 90 | have hr : 0 < r := mul_pos (Real.sqrt_pos.mpr hQ) N.scale_pos |
| 91 | have hB : 0 < 4 * max C 2 := by |
| 92 | have := lt_of_lt_of_le (by norm_num : (0 : ℝ) < 2) (le_max_right C 2) |
| 93 | positivity |
| 94 | have hnorm : r ^ 2 * (H.normalizedSliceConnection k).scalarCurvature N.center = 1 := by |
| 95 | rw [H.normalizedSlice_scalar_eq] |
| 96 | change r ^ 2 * ((E (k + H.shift)).flow.scalar |
| 97 | ⟨(E (k + H.shift)).time, N.center⟩ / Q) = 1 |
| 98 | calc |
| 99 | _ = N.scale ^ 2 * (E (k + H.shift)).flow.scalar |
| 100 | ⟨(E (k + H.shift)).time, N.center⟩ := by |
| 101 | dsimp only [r] |
| 102 | rw [mul_pow, Real.sq_sqrt hQ.le] |
| 103 | field_simp |
| 104 | _ = 1 := tube.neck_normalized_scalar_center N |
| 105 | ((E (k + H.shift)).flow.connection (E (k + H.shift)).time) |
| 106 | have hbound := mul_lt_mul_of_pos_left (hlower H T hepsilon k N.center hcenter) |
| 107 | (sq_pos_of_pos hr) |
| 108 | rw [hnorm] at hbound |
| 109 | have hsquare : (0.99 : ℝ) * (r * (4 * max C 2)) ^ 2 < 1 := by |
| 110 | nlinarith only [hbound] |
| 111 | have hproduct : r * (4 * max C 2) < (1.01 : ℝ) := by |
| 112 | by_contra h |
| 113 | have hlarge := le_of_not_gt h |
| 114 | have hsq := mul_self_le_mul_self (by norm_num : (0 : ℝ) ≤ 1.01) hlarge |
| 115 | nlinarith only [hsquare, hsq] |
| 116 | change r < (1.01 : ℝ) * (4 * max C 2)⁻¹ |
| 117 | rw [← div_eq_mul_inv] |
| 118 | exact (lt_div_iff₀ hB).mpr hproduct |
| 119 | |
| 120 | end PoincareMT.M28.CounterexampleNeckFamily |