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.CriticalBall.SourceCriticalBallInitialCapture |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Ends.SourceTubeInitialPair |
| 4 | |
| 5 | /-! |
| 6 | # Capture the literal first oriented source neck |
| 7 | |
| 8 | The side construction needs the zero node of the retained oriented list, |
| 9 | not an existentially chosen original cover neck. Its center, accuracy and |
| 10 | carrier give the same uniform regular-component argument and fixed-stage |
| 11 | capture. Source: Morgan--Tian Proposition 10.7, p. 253; M28 derivation 88. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28 |
| 23 | |
| 24 | /-- The literal first oriented node has the original accuracy and its |
| 25 | whole carrier lies in the retained tube. Source: Proposition 10.7; |
| 26 | M28 derivation 88, oriented initial-node readout. -/ |
| 27 | theorem SourceTubeData.initial_node_geometry |
| 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 0).2.epsilon = epsilon ∧ |
| 32 | (T.list.node 0).2.carrier ⊆ T.carrierOpen := by |
| 33 | have hlen : 0 < T.list.nodes.length := List.length_pos_iff.mpr T.list.nonempty |
| 34 | have hzero : (0 : ℤ) ∈ T.list.active := by |
| 35 | change 0 ≤ (0 : ℤ) ∧ (0 : ℤ) ≤ (T.list.nodes.length : ℤ) - 1 |
| 36 | constructor <;> omega |
| 37 | refine ⟨T.list.node_epsilon hzero, ?_⟩ |
| 38 | intro x hx |
| 39 | change x ∈ T.tube.carrier |
| 40 | rw [T.carrier_eq] |
| 41 | have hactive : (0 : ℤ) ∈ T.chain.shape.active := by |
| 42 | rw [T.shape_eq] |
| 43 | exact hzero |
| 44 | change x ∈ ⋃ i : {i // i ∈ T.chain.shape.active}, (T.chain.neck i.1).carrier |
| 45 | refine mem_iUnion.mpr ⟨⟨0, hactive⟩, ?_⟩ |
| 46 | simpa only [T.neck_eq, T.list.neckOfList_eq_node] using hx |
| 47 | |
| 48 | namespace CounterexampleNeckFamily |
| 49 | |
| 50 | variable {epsilon C A : ℝ} |
| 51 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 52 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 53 | |
| 54 | /-- The whole literal zero-node neck lies in the actual critical region |
| 55 | under the retained enlarged radius. Source: Proposition 10.7, p. 253; |
| 56 | M28 derivation 88. No new neck or orientation is selected. -/ |
| 57 | theorem tubeCritical_contains_initial_node (H : CounterexampleNeckFamily E) |
| 58 | (T : ∀ k, SourceTubeData (H.segment k)) |
| 59 | (hsmall : epsilon ≤ (1 / 1000 : ℝ)) {Acrit : ℝ} |
| 60 | (hAcrit : (7 / 4 : ℝ) * (4 * max C 2)⁻¹ * epsilon⁻¹ ≤ Acrit) (k : ℕ) : |
| 61 | ((T k).list.node 0).2.carrier ⊆ (Subtype.val : (T k).carrierOpen → |
| 62 | ((E (k + H.shift)).flow.slice (E (k + H.shift)).time).carrier) '' |
| 63 | (H.tubeCriticalRegion T Acrit k : Set (T k).carrierOpen) := by |
| 64 | let N := ((T k).list.node 0).2 |
| 65 | obtain ⟨hepsilon, hNT⟩ := (T k).initial_node_geometry |
| 66 | have hcenter := (T k).node_zero_readout.2.2 |
| 67 | intro x hx |
| 68 | refine ⟨⟨x, hNT hx⟩, ?_, rfl⟩ |
| 69 | have hdist := H.tube_initial_neck_distance_lt T k hsmall N hepsilon hcenter hNT hx |
| 70 | change (H.tubeMetric T k).edist (H.tubeBase T k) ⟨x, hNT hx⟩ < ENNReal.ofReal Acrit |
| 71 | apply hdist.trans_le |
| 72 | apply ENNReal.ofReal_le_ofReal |
| 73 | apply le_trans ?_ hAcrit |
| 74 | have hε : 0 < epsilon := hepsilon ▸ N.epsilon_pos |
| 75 | have hB : 0 < max C 2 := lt_of_lt_of_le (by norm_num) (le_max_right C 2) |
| 76 | nlinarith only [mul_pos (inv_pos.mpr (mul_pos (by norm_num : (0 : ℝ) < 4) hB)) |
| 77 | (inv_pos.mpr hε)] |
| 78 | |
| 79 | set_option maxHeartbeats 2400000 in |
| 80 | -- The actual oriented node keeps the two dependent source selections literal. |
| 81 | /-- One fixed stage captures the entire closed three-quarter core of the |
| 82 | literal zero node at all late retained source indices. Source: Proposition |
| 83 | 10.7, p. 253; M28 derivation 88. Its orientation is preserved. -/ |
| 84 | theorem exists_retained_initial_node_capture_accuracy : |
| 85 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 86 | ∀ {epsilon C A : ℝ} |
| 87 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 88 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 89 | (H : CounterexampleNeckFamily E), epsilon ≤ epsilon₀ → |
| 90 | ∀ (W : CriticalBallSourcePacket H) |
| 91 | (G : RegularPointedMetricConvergence |
| 92 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 93 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))), |
| 94 | let i := fun k => W.high_index (G.subsequence k) |
| 95 | ∃ j : ℕ, ∀ᶠ k in atTop, j ≤ k ∧ |
| 96 | let N := ((W.tube (i k)).list.node 0).2 |
| 97 | ∀ x ∈ N.carrier, |(N.coordinate_inverse x).2| ≤ 3 * N.epsilon⁻¹ / 4 → |
| 98 | x ∈ (fun y => (G.embedding k y).val.val) '' G.exhaustion j := by |
| 99 | obtain ⟨epsilon₀, hpos, hsmall, hradius⟩ := |
| 100 | exists_retained_criticalBall_large_radius_accuracy.{u} |
| 101 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 102 | intro epsilon C A E H hepsilon W G |
| 103 | let i := fun k => W.high_index (G.subsequence k) |
| 104 | dsimp only |
| 105 | have hepspos : 0 < epsilon := |
| 106 | (H.segment 0).cover_epsilon ▸ (H.segment 0).cover.epsilon_pos |
| 107 | have hCpos : 0 < max C 2 := lt_of_lt_of_le (by norm_num) (le_max_right _ _) |
| 108 | have hdelta : 0 < (4 * max C 2)⁻¹ * epsilon⁻¹ / 32 := by positivity |
| 109 | have hlarge : (7 / 4 : ℝ) * (4 * max C 2)⁻¹ * epsilon⁻¹ ≤ W.radius := |
| 110 | hradius (E := E) H hepsilon W |
| 111 | obtain ⟨j, hcoverage⟩ := |
| 112 | G.regular_component_coverage ((4 * max C 2)⁻¹ * epsilon⁻¹ / 32) hdelta |
| 113 | refine ⟨j, ?_⟩ |
| 114 | filter_upwards [hcoverage] with k hk |
| 115 | let N := ((W.tube (i k)).list.node 0).2 |
| 116 | obtain ⟨hepsN, _⟩ := (W.tube (i k)).initial_node_geometry |
| 117 | have hcenter := (W.tube (i k)).node_zero_readout.2.2 |
| 118 | have hcritical := H.tubeCritical_contains_initial_node W.tube |
| 119 | (hepsilon.trans hsmall) hlarge (i k) |
| 120 | refine ⟨hk.1, ?_⟩ |
| 121 | intro x hx hheight |
| 122 | obtain ⟨y, hy, hxy⟩ := hcritical hx |
| 123 | have hregular := H.tubeCritical_initial_neck_core_component W.tube W.radius |
| 124 | W.radius_pos (i k) N hepsN hcenter hcritical ⟨y, hy⟩ |
| 125 | (by simpa only [hxy] using hx) (by simpa only [hxy] using hheight) |
| 126 | obtain ⟨q, hq, hqz⟩ := hk.2 hregular |
| 127 | refine ⟨q, hq, ?_⟩ |
| 128 | exact (congrArg (fun z : H.tubeCriticalRegion W.tube W.radius (i k) => z.val.val) |
| 129 | hqz).trans hxy |
| 130 | |
| 131 | end CounterexampleNeckFamily |
| 132 | |
| 133 | end PoincareMT.M28 |