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.Limits.SourceActualTube |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Geometry.SourceFamilyScales |
| 4 | |
| 5 | /-! |
| 6 | # Retaining one actual source tube |
| 7 | |
| 8 | Morgan--Tian Claims 10.4-10.6, printed pp. 249-252. The actual source |
| 9 | constructor supplies every field here. The literal first neck, original |
| 10 | path and carrier are kept together before choosing a critical radius. |
| 11 | See M28 derivation 55; no compactness or curvature bound is an input. |
| 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 ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28 |
| 23 | |
| 24 | /-- The actual selected list, its literal balanced chain and its cylinder, |
| 25 | all produced from one source segment in Claim 10.4. -/ |
| 26 | structure SourceTubeData {epsilon C A D₀ D : ℝ} |
| 27 | {E : SameTimeCounterexample.{u} epsilon C A D₀ D} |
| 28 | (S : CounterexampleNeckSegment E) where |
| 29 | list : SourceOrientedList S |
| 30 | chain : BalancedNeckChain (E.flow.metric E.time) epsilon |
| 31 | shape_eq : chain.shape = ChainShape.finite 0 (list.nodes.length - 1) |
| 32 | neck_eq : chain.neck = neckOfList (list.nodes.map Prod.snd) |
| 33 | (list.nodes.head list.nonempty).2 |
| 34 | source_eq : chain.source_necks = S.cover.necks |
| 35 | tube : EpsilonTubeCertificate (E.flow.metric E.time) S.cover.X |
| 36 | epsilon_eq : tube.epsilon = epsilon |
| 37 | chain_eq : HEq tube.chain chain |
| 38 | carrier_eq : tube.carrier = chain.unionOpen |
| 39 | |
| 40 | /-- All retained tube fields are actual outputs of the source constructor; |
| 41 | the accuracy threshold precedes the counterexample and flow. -/ |
| 42 | theorem exists_source_tube_data_accuracy : |
| 43 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 10000 : ℝ) ∧ |
| 44 | ∀ {epsilon C A D₀ D : ℝ} (E : SameTimeCounterexample.{u} epsilon C A D₀ D) |
| 45 | (S : CounterexampleNeckSegment E), |
| 46 | 0 < E.flow.scalar ⟨E.time, E.basepoint⟩ → epsilon ≤ epsilon₀ → |
| 47 | Nonempty (SourceTubeData S) := by |
| 48 | obtain ⟨epsilon₀, hpos, hsmall, h⟩ := exists_actual_source_tube_accuracy.{u} |
| 49 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 50 | intro epsilon C A D₀ D E S hbase hbound |
| 51 | obtain ⟨L, B, hshape, hneck, hsource, T, heps, hchain, hcarrier⟩ := |
| 52 | h E S hbase hbound |
| 53 | exact ⟨⟨L, B, hshape, hneck, hsource, T, heps, hchain, hcarrier⟩⟩ |
| 54 | |
| 55 | namespace SourceTubeData |
| 56 | |
| 57 | variable {epsilon C A D₀ D : ℝ} |
| 58 | {E : SameTimeCounterexample.{u} epsilon C A D₀ D} |
| 59 | {S : CounterexampleNeckSegment E} |
| 60 | |
| 61 | /-- The literal open carrier on which the first source metric is tested. -/ |
| 62 | def carrierOpen (T : SourceTubeData S) : TopologicalSpace.Opens |
| 63 | (E.flow.slice E.time).carrier := ⟨T.tube.carrier, T.tube.carrier_open⟩ |
| 64 | |
| 65 | /-- The retained original path lies in that same open carrier. -/ |
| 66 | theorem path_mem (T : SourceTubeData S) : |
| 67 | MapsTo S.path (Icc S.lower S.upper) T.carrierOpen := by |
| 68 | intro s hs |
| 69 | apply T.tube.contains_X |
| 70 | rw [S.cover_set] |
| 71 | exact mem_image_of_mem _ hs |
| 72 | |
| 73 | /-- The actual first selected original neck is centered at the low point |
| 74 | and its whole carrier lies in this tube. Source-set equality alone would |
| 75 | not imply this containment; the literal active index zero proves it. -/ |
| 76 | theorem exists_initial_neck (T : SourceTubeData S) : |
| 77 | ∃ N ∈ S.cover.necks, N.epsilon = epsilon ∧ |
| 78 | N.center = S.path S.lower ∧ N.carrier ⊆ T.carrierOpen := by |
| 79 | have hlen : 0 < T.list.nodes.length := List.length_pos_iff.mpr T.list.nonempty |
| 80 | have hzero : (0 : ℤ) ∈ T.list.active := by |
| 81 | change 0 ≤ (0 : ℤ) ∧ (0 : ℤ) ≤ (T.list.nodes.length : ℤ) - 1 |
| 82 | constructor <;> omega |
| 83 | have hzeroB : (0 : ℤ) ∈ T.chain.shape.active := by |
| 84 | rw [T.shape_eq] |
| 85 | exact hzero |
| 86 | have hhead : T.chain.neck 0 = (T.list.nodes.head T.list.nonempty).2 := by |
| 87 | rw [T.neck_eq, T.list.neckOfList_eq_node, T.list.node_eq_getElem hzero] |
| 88 | simp only [Int.toNat_zero, List.getElem_zero_eq_head] |
| 89 | have hcarrier : (T.list.nodes.head T.list.nonempty).2.carrier ⊆ T.carrierOpen := by |
| 90 | intro x hx |
| 91 | change x ∈ T.tube.carrier |
| 92 | rw [T.carrier_eq] |
| 93 | change x ∈ ⋃ i : {i // i ∈ T.chain.shape.active}, (T.chain.neck i.1).carrier |
| 94 | exact mem_iUnion.mpr ⟨⟨0, hzeroB⟩, by simpa only [hhead] using hx⟩ |
| 95 | obtain ⟨_, N, hN, hchoice, hcenter⟩ := |
| 96 | T.list.vertex _ (List.head_mem T.list.nonempty) |
| 97 | rw [T.list.head_time] at hcenter |
| 98 | refine ⟨N, hN, (S.cover.neck_epsilon N hN).trans S.cover_epsilon, ?_, ?_⟩ |
| 99 | · rcases hchoice with h | h <;> |
| 100 | simpa only [h, EpsilonNeck.reversed_center] using hcenter.symm |
| 101 | · rcases hchoice with h | h <;> |
| 102 | simpa only [h, EpsilonNeck.reversed_carrier] using hcarrier |
| 103 | |
| 104 | /-- The actual cylinder proves connectedness of this carrier, without |
| 105 | any connectedness premise on the original tested slice. -/ |
| 106 | theorem preconnected (T : SourceTubeData S) : PreconnectedSpace T.carrierOpen := by |
| 107 | have hs : IsConnected (Metric.sphere (0 : EuclideanSpace ℝ (Fin 3)) 1) := |
| 108 | isConnected_sphere (by rw [← Module.finrank_eq_rank]; norm_num) _ (by norm_num) |
| 109 | let : ConnectedSpace UnitTwoSphere := Subtype.connectedSpace hs |
| 110 | let : PreconnectedSpace (Ioo (0 : ℝ) 1) := |
| 111 | Subtype.preconnectedSpace isPreconnected_Ioo |
| 112 | exact T.tube.cylinder.homeomorph.surjective.denseRange.preconnectedSpace |
| 113 | T.tube.cylinder.homeomorph.continuous |
| 114 | |
| 115 | end SourceTubeData |
| 116 | |
| 117 | /-- Choose one actual tube at each already selected source index, before |
| 118 | any critical-radius or compactness extraction (Claims 10.5-10.6). -/ |
| 119 | theorem exists_source_tube_family_accuracy : |
| 120 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 10000 : ℝ) ∧ |
| 121 | ∀ {epsilon C A : ℝ} |
| 122 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 123 | ((n : ℝ) + 1) ((n : ℝ) + 1)} (H : CounterexampleNeckFamily E), |
| 124 | epsilon ≤ epsilon₀ → Nonempty (∀ k, SourceTubeData (H.segment k)) := by |
| 125 | obtain ⟨epsilon₀, hpos, hsmall, h⟩ := exists_source_tube_data_accuracy.{u} |
| 126 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 127 | intro epsilon C A E H hbound |
| 128 | exact ⟨fun k => Classical.choice |
| 129 | (h (E (k + H.shift)) (H.segment k) (H.base_scalar_pos k) hbound)⟩ |
| 130 | |
| 131 | end PoincareMT.M28 |