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.SourceCriticalBallInitialSphereSeparation |
| 3 | |
| 4 | /-! |
| 5 | # Source component labels along fixed limit paths |
| 6 | |
| 7 | The actual initial graph component has opposite collar labels. Every |
| 8 | fixed path in the limiting sphere complement eventually has a single |
| 9 | source label, including after any strict retained selection. Source: |
| 10 | Morgan--Tian Proposition 10.7, pp. 253-254; M28 derivation 114. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 22 | |
| 23 | variable {epsilon C A : ℝ} |
| 24 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 25 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 26 | |
| 27 | set_option maxHeartbeats 2400000 in |
| 28 | -- The coordinate graph and component live in the original varying raw slice. |
| 29 | /-- A single actual initial graph gives opposite labels to any fixed |
| 30 | collar anchors. All component and strip hypotheses are produced from the |
| 31 | original zero node. Source: Proposition 10.7; M28 derivation 114. -/ |
| 32 | theorem initial_graph_opposite_labels (H : CounterexampleNeckFamily E) |
| 33 | (W : CriticalBallSourcePacket H) |
| 34 | (G : RegularPointedMetricConvergence |
| 35 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 36 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 37 | letI := G.limitCarrier.topologicalSpace |
| 38 | letI := G.limitCarrier.chartedSpace |
| 39 | letI := G.limitCarrier.isManifold |
| 40 | ∀ (L : EpsilonNeck G.limitMetric) (j k : ℕ), L.carrier ⊆ G.exhaustion j → j ≤ k → |
| 41 | ∀ (f : UnitTwoSphere → ℝ), Continuous f → (∀ q, |f q| < epsilon⁻¹ / 32) → |
| 42 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k) '' |
| 43 | L.central_sphere = range (fun q : UnitTwoSphere => |
| 44 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2.coordinate_map (q, f q)) → |
| 45 | ∀ x₀ ∈ L.belowGraph_m28 (fun _ => 0), ∀ x₁ ∈ L.aboveGraph_m28 (fun _ => 0), |
| 46 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k x₀ ∈ |
| 47 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2.belowGraph_m28 f ↔ |
| 48 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k x₁ ∉ |
| 49 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2.belowGraph_m28 f := by |
| 50 | let := G.limitCarrier.topologicalSpace |
| 51 | let := G.limitCarrier.chartedSpace |
| 52 | let := G.limitCarrier.isManifold |
| 53 | intro L j k hstage hjk f hf hheight hsphere x₀ hx₀ x₁ hx₁ |
| 54 | let e := H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k |
| 55 | let N := ((W.tube (W.high_index (G.subsequence k))).list.node 0).2 |
| 56 | have heps : N.epsilon = epsilon := |
| 57 | (W.tube (W.high_index (G.subsequence k))).initial_node_geometry.1 |
| 58 | have hepspos : 0 < epsilon := heps ▸ N.epsilon_pos |
| 59 | have hdom (q : UnitTwoSphere) : f q ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := by |
| 60 | rw [heps] |
| 61 | have h := abs_lt.mp (hheight q) |
| 62 | constructor <;> linarith [h.1, h.2, inv_pos.mpr hepspos] |
| 63 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 64 | (fun k => subset_closure.trans (G.exhaustion_step k)) |
| 65 | exact neck_collar_opposite_graph_component_labels L N e.toOpenPartialHomeomorph |
| 66 | (by change L.carrier ⊆ e.source |
| 67 | rw [H.regularRawStageDiffeomorph_source] |
| 68 | exact hstage.trans (hmono hjk)) |
| 69 | (fun x _ => (G.embedding k x).val.property) f hdom hsphere |
| 70 | ((W.tube (W.high_index (G.subsequence k))).initial_graph_negative_region |
| 71 | f hf hheight).2.2 hx₀ hx₁ |
| 72 | |
| 73 | set_option maxHeartbeats 2400000 in |
| 74 | -- A common compact stage is chosen before the varying graph and source index. |
| 75 | /-- A fixed path in the actual limit complement eventually has equal |
| 76 | endpoint membership in every retained initial graph component. The |
| 77 | selection remains strict and all source indices are unchanged. Source: |
| 78 | Proposition 10.7, pp. 253-254; M28 derivation 114. -/ |
| 79 | theorem eventually_initial_graph_labels_along_path (H : CounterexampleNeckFamily E) |
| 80 | (W : CriticalBallSourcePacket H) |
| 81 | (G : RegularPointedMetricConvergence |
| 82 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 83 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 84 | letI := G.limitCarrier.topologicalSpace |
| 85 | letI := G.limitCarrier.chartedSpace |
| 86 | letI := G.limitCarrier.isManifold |
| 87 | ∀ (L : EpsilonNeck G.limitMetric) (j : ℕ), L.carrier ⊆ G.exhaustion j → |
| 88 | ∀ {sigma : ℕ → ℕ}, StrictMono sigma → |
| 89 | ∀ (f : ℕ → UnitTwoSphere → ℝ), |
| 90 | (∀ k, Continuous (f k) ∧ (∀ q, |f k q| < epsilon⁻¹ / 32) ∧ |
| 91 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 92 | W.high_index G (sigma k)) '' L.central_sphere = |
| 93 | range (fun q : UnitTwoSphere => |
| 94 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 95 | (q, f k q))) → |
| 96 | ∀ {x y : G.limitCarrier.carrier}, JoinedIn L.central_sphereᶜ x y → |
| 97 | ∀ᶠ k in atTop, |
| 98 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 99 | W.high_index G (sigma k) x ∈ |
| 100 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 101 | (f k) ↔ |
| 102 | H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 103 | W.high_index G (sigma k) y ∈ |
| 104 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 105 | (f k) := by |
| 106 | let := G.limitCarrier.topologicalSpace |
| 107 | let := G.limitCarrier.chartedSpace |
| 108 | let := G.limitCarrier.isManifold |
| 109 | intro L j hstage sigma hsigma f hf x y hpath |
| 110 | let e := fun k => H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 111 | W.high_index G k |
| 112 | let T := fun k => (W.tube (W.high_index (G.subsequence k))).tube.carrier |
| 113 | have hesource (k : ℕ) : (e k).source = G.exhaustion k := |
| 114 | H.regularRawStageDiffeomorph_source _ _ _ _ _ k |
| 115 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 116 | (fun k => subset_closure.trans (G.exhaustion_step k)) |
| 117 | have htail := hpath.eventually_component_mem_iff G.exhaustion G.exhaustion_open |
| 118 | hmono G.exhaustion_covers (L.central_sphere_subset.trans hstage) (fun k => e k) T |
| 119 | (fun k => by simpa only [hesource] using (e k).contMDiffOn.continuousOn) |
| 120 | (fun k => by simpa only [hesource] using (e k).toPartialEquiv.injOn) |
| 121 | (fun k x _ => (G.embedding k x).val.property) |
| 122 | filter_upwards [hsigma.tendsto_atTop.eventually htail] with k hk |
| 123 | apply hk |
| 124 | rw [(hf k).2.2] |
| 125 | exact ((W.tube (W.high_index (G.subsequence (sigma k)))).initial_graph_negative_region |
| 126 | (f k) (hf k).1 (hf k).2.1).2.2 |
| 127 | |
| 128 | end PoincareMT.M28.CounterexampleNeckFamily |