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.Analysis.RetainedGeometry.RetainedWitnessLabel |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallGraphLabels |
| 4 | |
| 5 | /-! |
| 6 | # One retained orientation of the actual initial source graphs |
| 7 | |
| 8 | The fixed collar anchors have opposite source labels. One frequent label |
| 9 | class supplies a single strict selection and graph witnesses at every |
| 10 | selected index. The negative and positive limit anchors are fixed before |
| 11 | any subsequent point is tested. Source: Morgan--Tian Proposition 10.7, |
| 12 | pp. 253-254; M28 derivation 114. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 24 | |
| 25 | variable {epsilon C A : ℝ} |
| 26 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 27 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 28 | |
| 29 | set_option maxHeartbeats 2400000 in |
| 30 | -- The selected witnesses retain the literal composite source index at every occurrence. |
| 31 | /-- Fix one orientation and smooth graph family along a strictly |
| 32 | increasing selection of the original embeddings. The two anchors occupy |
| 33 | opposite fixed collar halves and opposite source sides at every retained |
| 34 | index. Source: Proposition 10.7; M28 derivation 114. -/ |
| 35 | theorem exists_retained_initial_graph_orientation (H : CounterexampleNeckFamily E) |
| 36 | (W : CriticalBallSourcePacket H) |
| 37 | (G : RegularPointedMetricConvergence |
| 38 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 39 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 40 | letI := G.limitCarrier.topologicalSpace |
| 41 | letI := G.limitCarrier.chartedSpace |
| 42 | letI := G.limitCarrier.isManifold |
| 43 | ∀ (L : EpsilonNeck G.limitMetric) (j : ℕ), L.carrier ⊆ G.exhaustion j → |
| 44 | (∀ᶠ k in atTop, j ≤ k ∧ ∃ f : UnitTwoSphere → ℝ, |
| 45 | ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ f ∧ (∀ q, |f q| < epsilon⁻¹ / 32) ∧ |
| 46 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 47 | W.high_index G k) '' L.central_sphere = |
| 48 | range (fun q : UnitTwoSphere => |
| 49 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2.coordinate_map |
| 50 | (q, f q))) → |
| 51 | ∃ sigma : ℕ → ℕ, StrictMono sigma ∧ ∃ xminus xplus : G.limitCarrier.carrier, |
| 52 | ((xminus ∈ L.belowGraph_m28 (fun _ => 0) ∧ xplus ∈ L.aboveGraph_m28 (fun _ => 0)) ∨ |
| 53 | (xplus ∈ L.belowGraph_m28 (fun _ => 0) ∧ xminus ∈ L.aboveGraph_m28 (fun _ => 0))) ∧ |
| 54 | ∃ f : ℕ → UnitTwoSphere → ℝ, ∀ k, |
| 55 | j ≤ sigma k ∧ ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (f k) ∧ |
| 56 | (∀ q, |f k q| < epsilon⁻¹ / 32) ∧ |
| 57 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 58 | W.high_index G (sigma k)) '' L.central_sphere = |
| 59 | range (fun q : UnitTwoSphere => |
| 60 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 61 | (q, f k q)) ∧ |
| 62 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 63 | W.high_index G (sigma k) xminus ∈ |
| 64 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 65 | (f k) ∧ |
| 66 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 67 | W.high_index G (sigma k) xplus ∉ |
| 68 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 69 | (f k) := by |
| 70 | classical |
| 71 | let := G.limitCarrier.topologicalSpace |
| 72 | let := G.limitCarrier.chartedSpace |
| 73 | let := G.limitCarrier.isManifold |
| 74 | intro L j hstage hgraphs |
| 75 | have hzero (q : UnitTwoSphere) : (0 : ℝ) ∈ Ioo (-L.epsilon⁻¹) L.epsilon⁻¹ := |
| 76 | ⟨neg_lt_zero.mpr (inv_pos.mpr L.epsilon_pos), inv_pos.mpr L.epsilon_pos⟩ |
| 77 | obtain ⟨x₀, hx₀⟩ := (L.isConnected_belowGraph_m28 _ continuous_const hzero).nonempty |
| 78 | obtain ⟨x₁, hx₁⟩ := (L.isConnected_aboveGraph_m28 _ continuous_const hzero).nonempty |
| 79 | let P := fun k (f : UnitTwoSphere → ℝ) => |
| 80 | j ≤ k ∧ ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ f ∧ (∀ q, |f q| < epsilon⁻¹ / 32) ∧ |
| 81 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 82 | W.high_index G k) '' L.central_sphere = |
| 83 | range (fun q : UnitTwoSphere => |
| 84 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2.coordinate_map (q, f q)) |
| 85 | let label := fun k (f : UnitTwoSphere → ℝ) => |
| 86 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k x₀ ∈ |
| 87 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2.belowGraph_m28 f |
| 88 | have hgood : ∀ᶠ k in atTop, ∃ f, P k f := by |
| 89 | filter_upwards [hgraphs] with k hk |
| 90 | obtain ⟨hjk, f, hf, hheight, hsphere⟩ := hk |
| 91 | exact ⟨f, hjk, hf, hheight, hsphere⟩ |
| 92 | obtain ⟨sigma, hsigma, f, hf, hlabel⟩ := |
| 93 | Filter.exists_strictMono_constant_label_witness P label hgood |
| 94 | have hopposite (k : ℕ) := H.initial_graph_opposite_labels W G L j (sigma k) |
| 95 | hstage (hf k).1 (f k) (hf k).2.1.continuous (hf k).2.2.1 (hf k).2.2.2 |
| 96 | x₀ hx₀ x₁ hx₁ |
| 97 | rcases hlabel with hnegative | hpositive |
| 98 | · refine ⟨sigma, hsigma, x₀, x₁, Or.inl ⟨hx₀, hx₁⟩, f, ?_⟩ |
| 99 | intro k |
| 100 | exact ⟨(hf k).1, (hf k).2.1, (hf k).2.2.1, (hf k).2.2.2, |
| 101 | hnegative k, (hopposite k).mp (hnegative k)⟩ |
| 102 | · refine ⟨sigma, hsigma, x₁, x₀, Or.inr ⟨hx₀, hx₁⟩, f, ?_⟩ |
| 103 | intro k |
| 104 | refine ⟨(hf k).1, (hf k).2.1, (hf k).2.2.1, (hf k).2.2.2, ?_, hpositive k⟩ |
| 105 | by_contra hnot |
| 106 | exact hpositive k ((hopposite k).mpr hnot) |
| 107 | |
| 108 | end PoincareMT.M28.CounterexampleNeckFamily |