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.SourceCriticalBallInitialGeometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallInitialCoefficients |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallRawChartBounds |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckGeometry.CapturedCylinderErrors |
| 6 | |
| 7 | /-! |
| 8 | # Uniform metric errors on the actual retained initial cylinders |
| 9 | |
| 10 | The literal zero-node core is captured in a fixed stage. A finite atlas |
| 11 | there bounds its actual coordinate derivatives, and metric convergence |
| 12 | then controls the whole cylinder pullback on one common source tail. |
| 13 | No limiting neck comparison, new subsequence, or map convergence is |
| 14 | assumed. Source: Morgan--Tian Proposition 10.7, p. 253; M28 derivation 106. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 26 | |
| 27 | open tube PoincareMT.Proofs.M28.NeckTransfer PoincareMT.Proofs.M28.FiniteHessian |
| 28 | |
| 29 | set_option maxHeartbeats 2400000 in |
| 30 | -- The finite family retains the varying raw manifolds and both original index maps. |
| 31 | /-- Actual retained initial cylinders have uniformly small finite metric |
| 32 | errors on their three-halves strip. All points and derivative orders use |
| 33 | one source tail. Source: Proposition 10.7, p. 253; M28 derivation 106. -/ |
| 34 | theorem exists_retained_initial_metric_error_accuracy : |
| 35 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 36 | ∀ {epsilon C A : ℝ} |
| 37 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 38 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 39 | (H : CounterexampleNeckFamily E), epsilon ≤ epsilon₀ → |
| 40 | ∀ (W : CriticalBallSourcePacket H) |
| 41 | (G : RegularPointedMetricConvergence |
| 42 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 43 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))), |
| 44 | letI := G.limitCarrier.topologicalSpace |
| 45 | letI := G.limitCarrier.chartedSpace |
| 46 | letI := G.limitCarrier.isManifold |
| 47 | ∀ n : ℕ, n + 1 ≤ ⌊epsilon⁻¹⌋₊ → ∀ rho : ℝ, 0 < rho → |
| 48 | ∃ K : ℕ, ∀ k ≥ K, ∀ z : RoundCylinderSpace, |
| 49 | z.2 ∈ Ioo (-(3 * epsilon / 2)⁻¹) (3 * epsilon / 2)⁻¹ → ∀ r ≤ n + 1, |
| 50 | ‖iteratedFDeriv ℝ r (fun x => G.limitMetric.pullbackCoefficients |
| 51 | (capturedCylinderMap |
| 52 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 53 | W.high_index G k) |
| 54 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2 z.1 z.2) x - |
| 55 | (H.normalizedSliceMetric (W.high_index (G.subsequence k))).pullbackCoefficients |
| 56 | (cylinderNeckChart |
| 57 | ((W.tube (W.high_index (G.subsequence k))).list.node 0).2 z.1 z.2) x) 0‖ ≤ |
| 58 | rho := by |
| 59 | classical |
| 60 | obtain ⟨epsilon₀, hpos, hsmall, hcapture⟩ := exists_retained_initial_node_capture_accuracy.{u} |
| 61 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 62 | intro epsilon C A E H hepsilon W G |
| 63 | let := G.limitCarrier.topologicalSpace |
| 64 | let := G.limitCarrier.chartedSpace |
| 65 | let := G.limitCarrier.isManifold |
| 66 | intro n hn |
| 67 | obtain ⟨j, hj⟩ := hcapture H hepsilon W G |
| 68 | let idx := fun k => W.high_index (G.subsequence k) |
| 69 | let N := fun k => ((W.tube (idx k)).list.node 0).2 |
| 70 | let e := H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G |
| 71 | let eta := 3 * epsilon / 2 |
| 72 | have hepsN (k : ℕ) : (N k).epsilon = epsilon := |
| 73 | (W.tube (idx k)).initial_node_geometry.1 |
| 74 | have hepspos : 0 < epsilon := hepsN 0 ▸ (N 0).epsilon_pos |
| 75 | have hepseta : epsilon ≤ eta := by dsimp only [eta]; linarith |
| 76 | have hetahalf : eta < 1 / 2 := by dsimp only [eta]; linarith [hepsilon.trans hsmall] |
| 77 | have hNeta (k : ℕ) : (N k).epsilon ≤ eta := by rw [hepsN]; exact hepseta |
| 78 | let R := fun k => (N k).restrict_m28 eta (hNeta k) hetahalf |
| 79 | have hinv : eta⁻¹ ≤ 3 * epsilon⁻¹ / 4 := by |
| 80 | have heq : eta⁻¹ = (2 / 3 : ℝ) * epsilon⁻¹ := by |
| 81 | dsimp only [eta] |
| 82 | field_simp [hepspos.ne'] |
| 83 | rw [heq] |
| 84 | nlinarith [inv_pos.mpr hepspos] |
| 85 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 86 | (fun k => subset_closure.trans (G.exhaustion_step k)) |
| 87 | have hcap : ∀ᶠ k in atTop, (R k).carrier ⊆ (e k).target ∧ |
| 88 | ∀ x ∈ (R k).carrier, (e k).symm x ∈ G.exhaustion j := by |
| 89 | filter_upwards [hj] with k hk |
| 90 | have hfixed : (R k).carrier ⊆ |
| 91 | (fun x => (G.embedding k x).val.val) '' G.exhaustion j := by |
| 92 | intro x hx |
| 93 | change x ∈ (N k).carrier ∧ |
| 94 | ((N k).coordinate_inverse x).2 ∈ Ioo (-eta⁻¹) eta⁻¹ at hx |
| 95 | apply hk.2 x hx.1 |
| 96 | rw [hepsN] |
| 97 | exact (abs_lt.mpr hx.2).le.trans hinv |
| 98 | constructor |
| 99 | · rw [H.regularRawStageDiffeomorph_target] |
| 100 | exact hfixed.trans (image_mono (hmono hk.1)) |
| 101 | · intro x hx |
| 102 | obtain ⟨y, hy, hyx⟩ := hfixed hx |
| 103 | have hys : y ∈ (e k).source := by |
| 104 | rw [H.regularRawStageDiffeomorph_source] |
| 105 | exact hmono hk.1 hy |
| 106 | have hey : e k y = x := hyx |
| 107 | have hxy : (e k).symm x = y := |
| 108 | (congrArg (e k).symm hey).symm.trans ((e k).left_inv hys) |
| 109 | exact hxy.symm ▸ hy |
| 110 | obtain ⟨F, Cset, hF, hcover⟩ := G.exists_finite_stage_chart_cover j |
| 111 | let S := {q : G.limitCarrier.carrier // q ∈ F} |
| 112 | let q : S → G.limitCarrier.carrier := Subtype.val |
| 113 | let Kset := fun l : S => (extChartAt (𝓡 3) (q l)) '' Cset (q l) |
| 114 | have hK (l : S) : IsCompact (Kset l) := (hF l.1 l.2).2.2.2.2.1 |
| 115 | have htarget (l : S) : Kset l ⊆ (extChartAt (𝓡 3) (q l)).target := |
| 116 | (hF l.1 l.2).2.2.2.2.2 |
| 117 | have hstage (l : S) (y : EuclideanSpace ℝ (Fin 3)) (hy : y ∈ Kset l) : |
| 118 | (extChartAt (𝓡 3) (q l)).symm y ∈ G.exhaustion (j + 1) := by |
| 119 | obtain ⟨x, hx, rfl⟩ := hy |
| 120 | have hc := (hF l.1 l.2).2.2.2.1 hx |
| 121 | rw [(extChartAt (𝓡 3) (q l)).left_inv hc.1] |
| 122 | exact hc.2 |
| 123 | obtain ⟨a, b, B, ha, _, _, hbounds⟩ := |
| 124 | H.exists_eventual_regularRawStage_finite_chart_bounds W.tube W.radius W.radius_pos |
| 125 | W.high_index G q Kset (j + 1) hK htarget hstage (n + 1) |
| 126 | obtain ⟨K₀, hK₀⟩ := eventually_atTop.mp (hcap.and hbounds) |
| 127 | let J := {v : ℕ × RoundCylinderSpace × S // K₀ ≤ v.1 ∧ |
| 128 | v.2.1.2 ∈ Ioo (-eta⁻¹) eta⁻¹ ∧ |
| 129 | (e v.1).symm ((N v.1).coordinate_map v.2.1) ∈ Cset (q v.2.2)} |
| 130 | let y := fun i : J => capturedCylinderCoordinates (e i.1.1) (R i.1.1) |
| 131 | i.1.2.1.1 i.1.2.1.2 (q i.1.2.2) 0 |
| 132 | have hy (i : J) : y i ∈ Kset i.1.2.2 := by |
| 133 | change (extChartAt (𝓡 3) (q i.1.2.2)) |
| 134 | ((e i.1.1).symm (cylinderNeckChart (R i.1.1) i.1.2.1.1 i.1.2.1.2 0)) ∈ _ |
| 135 | rw [cylinderNeckChart_zero] |
| 136 | exact mem_image_of_mem _ i.2.2.2 |
| 137 | have hp (i : J) : (e i.1.1).symm ((R i.1.1).coordinate_map i.1.2.1) ∈ |
| 138 | (extChartAt (𝓡 3) (q i.1.2.2)).source := |
| 139 | ((hF i.1.2.2.1 i.1.2.2.2).2.2.2.1 i.2.2.2).1 |
| 140 | have hs (i : J) : i.1.2.1.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ := |
| 141 | Proofs.M28.NeckAnalysis.cylinderStrip_mono hepspos hepseta i.2.2.1 |
| 142 | have hAj := H.hasUniformJetBoundsAt_normalizedSlice_initial_coefficients W.tube |
| 143 | (fun i : J => idx i.1.1) (fun i => i.1.2.1.1) (fun i => i.1.2.1.2) hs (n + 1) hn |
| 144 | have hBj : HasUniformJetBoundsAt (n + 1) |
| 145 | (fun i : J => (H.normalizedSliceMetric (idx i.1.1)).pullbackCoefficients |
| 146 | (e i.1.1 ∘ (extChartAt (𝓡 3) (q i.1.2.2)).symm)) y := by |
| 147 | intro r hr |
| 148 | exact ⟨B, fun i => ((hK₀ i.1.1 i.2.1).2 i.1.2.2 (y i) (hy i)).2 r hr⟩ |
| 149 | have hsource : 0 < ((4 * max C 2)⁻¹) ^ 2 * (1 - epsilon) := by |
| 150 | have hC : 0 < max C 2 := lt_of_lt_of_le (by norm_num) (le_max_right C 2) |
| 151 | have hε : 0 < 1 - epsilon := by linarith [hepsilon.trans hsmall] |
| 152 | positivity |
| 153 | have hmap := hasUniformJetBoundsAt_capturedCylinderCoordinates_fderiv |
| 154 | (fun i : J => H.normalizedSliceMetric (idx i.1.1)) (fun i => e i.1.1) |
| 155 | (fun i => R i.1.1) (fun i => (hK₀ i.1.1 i.2.1).1.1) |
| 156 | (fun i => i.1.2.1.1) (fun i => i.1.2.1.2) (fun i => q i.1.2.2) |
| 157 | (fun i => i.2.2.1) hp n hAj hBj hsource ha |
| 158 | (fun i v => H.normalizedSlice_initial_coefficient_lower W.tube (idx i.1.1) |
| 159 | i.1.2.1.1 (hs i) v) |
| 160 | (fun i v => ((hK₀ i.1.1 i.2.1).2 i.1.2.2 (y i) (hy i)).1 v |>.1) |
| 161 | have herror : ∀ delta : ℝ, 0 < delta → ∃ K : ℕ, ∀ i : J, K ≤ i.1.1 → |
| 162 | ∀ r ≤ n + 1, ‖iteratedFDeriv ℝ r |
| 163 | ((H.normalizedSliceMetric (idx i.1.1)).pullbackCoefficients |
| 164 | (e i.1.1 ∘ (extChartAt (𝓡 3) (q i.1.2.2)).symm)) (y i) - |
| 165 | iteratedFDeriv ℝ r |
| 166 | (G.limitMetric.pullbackCoefficients (extChartAt (𝓡 3) (q i.1.2.2)).symm) (y i)‖ ≤ |
| 167 | delta := by |
| 168 | intro delta hdelta |
| 169 | obtain ⟨K, htail⟩ := eventually_atTop.mp |
| 170 | (H.eventually_regularRawStage_finite_chart_jet_error W.tube W.radius W.radius_pos |
| 171 | W.high_index G q Kset (j + 1) hK htarget hstage (n + 1) delta hdelta) |
| 172 | exact ⟨K, fun i hi r hr => htail i.1.1 hi i.1.2.2 (y i) (hy i) r hr⟩ |
| 173 | have htail := exists_capturedCylinder_metric_error_tail G.limitMetric |
| 174 | (fun i : J => H.normalizedSliceMetric (idx i.1.1)) (fun i => e i.1.1) |
| 175 | (fun i => R i.1.1) (fun i => (hK₀ i.1.1 i.2.1).1.1) |
| 176 | (fun i => i.1.2.1.1) (fun i => i.1.2.1.2) (fun i => q i.1.2.2) |
| 177 | (fun i => i.2.2.1) hp (n + 1) (fun i => i.1.1) hmap herror |
| 178 | intro rho hrho |
| 179 | obtain ⟨K, htailK⟩ := htail rho hrho |
| 180 | refine ⟨max K₀ K, ?_⟩ |
| 181 | intro k hk z hz r hr |
| 182 | have hk₀ : K₀ ≤ k := (le_max_left _ _).trans hk |
| 183 | have hzR : (R k).coordinate_map z ∈ (R k).carrier := |
| 184 | (R k).coordinate_map_mem_of_axial z hz |
| 185 | have hzstage := (hK₀ k hk₀).1.2 _ hzR |
| 186 | obtain ⟨q₀, hq₀⟩ := mem_iUnion.mp (hcover (subset_closure hzstage)) |
| 187 | obtain ⟨hqF, hqC⟩ := mem_iUnion.mp hq₀ |
| 188 | let l : S := ⟨q₀, hqF⟩ |
| 189 | let i : J := ⟨(k, z, l), hk₀, hz, interior_subset hqC⟩ |
| 190 | exact htailK i ((le_max_right _ _).trans hk) r hr |
| 191 | |
| 192 | end PoincareMT.M28.CounterexampleNeckFamily |