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.SourceCriticalBallFreshGeometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.NeckGeometry.SourceFreshCoefficients |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallRawChartBounds |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckGeometry.CapturedCylinderErrors |
| 6 | |
| 7 | /-! |
| 8 | # Metric convergence throughout the actual captured fresh strip |
| 9 | |
| 10 | The fixed captured stage supplies a finite target atlas. The original |
| 11 | fresh-neck scale bounds supply actual source ellipticity and finite jets, |
| 12 | so the captured-map Hessian estimates transfer metric convergence to the |
| 13 | whole strip on one common tail. Source: Morgan--Tian Claim 10.8, p. 254; |
| 14 | M28 derivation 117. |
| 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 3200000 in |
| 30 | -- The finite atlas keeps the same G, strict selection and original raw source. |
| 31 | /-- Captured fresh necks with two-sided normalized scale control have |
| 32 | uniform finite metric errors throughout their three-halves strip. |
| 33 | The tail precedes every cylinder point and tested order. Source: |
| 34 | Claim 10.8; M28 derivation 117, actual metric-error assembly. -/ |
| 35 | theorem exists_retained_fresh_metric_error |
| 36 | {epsilon C A : ℝ} |
| 37 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 38 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 39 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H) |
| 40 | (G : RegularPointedMetricConvergence |
| 41 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 42 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 43 | letI := G.limitCarrier.topologicalSpace |
| 44 | letI := G.limitCarrier.chartedSpace |
| 45 | letI := G.limitCarrier.isManifold |
| 46 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 47 | ∀ (N : ∀ k, EpsilonNeck |
| 48 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.metric |
| 49 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).time)), |
| 50 | (∀ k, (N k).epsilon = epsilon) → epsilon < 1 / 3 → |
| 51 | ∀ amin B : ℝ, 0 < amin → |
| 52 | (∀ᶠ k in atTop, amin ≤ |
| 53 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.scalar |
| 54 | ⟨(E (W.high_index (G.subsequence (sigma k)) + H.shift)).time, |
| 55 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).basepoint⟩ * |
| 56 | (N k).scale ^ 2 ∧ |
| 57 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.scalar |
| 58 | ⟨(E (W.high_index (G.subsequence (sigma k)) + H.shift)).time, |
| 59 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).basepoint⟩ * |
| 60 | (N k).scale ^ 2 ≤ B) → |
| 61 | ∀ j : ℕ, (∀ᶠ k in atTop, j ≤ sigma k ∧ ∀ x ∈ (N k).carrier, |
| 62 | |((N k).coordinate_inverse x).2| ≤ 2 * epsilon⁻¹ / 3 → |
| 63 | x ∈ (fun y => (G.embedding (sigma k) y).val.val) '' G.exhaustion j) → |
| 64 | ∀ n : ℕ, n + 1 ≤ ⌊epsilon⁻¹⌋₊ → ∀ rho : ℝ, 0 < rho → |
| 65 | ∃ K : ℕ, ∀ k ≥ K, ∀ z : RoundCylinderSpace, |
| 66 | z.2 ∈ Ioo (-(3 * epsilon / 2)⁻¹) (3 * epsilon / 2)⁻¹ → ∀ r ≤ n + 1, |
| 67 | ‖iteratedFDeriv ℝ r (fun x => G.limitMetric.pullbackCoefficients |
| 68 | (capturedCylinderMap |
| 69 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 70 | W.high_index G (sigma k)) (N k) z.1 z.2) x - |
| 71 | RiemannianMetric.pullbackCoefficients |
| 72 | (H.normalizedSliceMetric (W.high_index (G.subsequence (sigma k)))) |
| 73 | (cylinderNeckChart (N k) z.1 z.2) x) 0‖ ≤ rho := by |
| 74 | classical |
| 75 | let := G.limitCarrier.topologicalSpace |
| 76 | let := G.limitCarrier.chartedSpace |
| 77 | let := G.limitCarrier.isManifold |
| 78 | intro sigma hsigma N heps hsmall amin B hamin hscale j hcapture n hn |
| 79 | let idx := fun k => W.high_index (G.subsequence (sigma k)) |
| 80 | let e := fun k => H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 81 | W.high_index G (sigma k) |
| 82 | let eta := 3 * epsilon / 2 |
| 83 | have hepspos : 0 < epsilon := heps 0 ▸ (N 0).epsilon_pos |
| 84 | have hepseta : epsilon ≤ eta := by dsimp only [eta]; linarith |
| 85 | have hetahalf : eta < 1 / 2 := by dsimp only [eta]; linarith |
| 86 | have hNeta (k : ℕ) : (N k).epsilon ≤ eta := by rw [heps]; exact hepseta |
| 87 | let R := fun k => (N k).restrict_m28 eta (hNeta k) hetahalf |
| 88 | have hinv : eta⁻¹ = 2 * epsilon⁻¹ / 3 := by |
| 89 | dsimp only [eta] |
| 90 | field_simp [hepspos.ne'] |
| 91 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 92 | (fun k => subset_closure.trans (G.exhaustion_step k)) |
| 93 | have hcap : ∀ᶠ k in atTop, (R k).carrier ⊆ (e k).target ∧ |
| 94 | ∀ x ∈ (R k).carrier, (e k).symm x ∈ G.exhaustion j := by |
| 95 | filter_upwards [hcapture] with k hk |
| 96 | have hfixed : (R k).carrier ⊆ |
| 97 | (fun x => (G.embedding (sigma k) x).val.val) '' G.exhaustion j := by |
| 98 | intro x hx |
| 99 | change x ∈ (N k).carrier ∧ |
| 100 | ((N k).coordinate_inverse x).2 ∈ Ioo (-eta⁻¹) eta⁻¹ at hx |
| 101 | exact hk.2 x hx.1 ((abs_lt.mpr hx.2).le.trans_eq hinv) |
| 102 | constructor |
| 103 | · rw [H.regularRawStageDiffeomorph_target] |
| 104 | exact hfixed.trans (image_mono (hmono hk.1)) |
| 105 | · intro x hx |
| 106 | obtain ⟨y, hy, hyx⟩ := hfixed hx |
| 107 | have hys : y ∈ (e k).source := by |
| 108 | rw [H.regularRawStageDiffeomorph_source] |
| 109 | exact hmono hk.1 hy |
| 110 | have hey : e k y = x := hyx |
| 111 | have hxy : (e k).symm x = y := |
| 112 | (congrArg (e k).symm hey).symm.trans ((e k).left_inv hys) |
| 113 | exact hxy.symm ▸ hy |
| 114 | obtain ⟨F, Cset, hF, hcover⟩ := G.exists_finite_stage_chart_cover j |
| 115 | let S := {q : G.limitCarrier.carrier // q ∈ F} |
| 116 | let q : S → G.limitCarrier.carrier := Subtype.val |
| 117 | let Kset := fun l : S => (extChartAt (𝓡 3) (q l)) '' Cset (q l) |
| 118 | have hK (l : S) : IsCompact (Kset l) := (hF l.1 l.2).2.2.2.2.1 |
| 119 | have htarget (l : S) : Kset l ⊆ (extChartAt (𝓡 3) (q l)).target := |
| 120 | (hF l.1 l.2).2.2.2.2.2 |
| 121 | have hstage (l : S) (y : EuclideanSpace ℝ (Fin 3)) (hy : y ∈ Kset l) : |
| 122 | (extChartAt (𝓡 3) (q l)).symm y ∈ G.exhaustion (j + 1) := by |
| 123 | obtain ⟨x, hx, rfl⟩ := hy |
| 124 | have hc := (hF l.1 l.2).2.2.2.1 hx |
| 125 | rw [(extChartAt (𝓡 3) (q l)).left_inv hc.1] |
| 126 | exact hc.2 |
| 127 | obtain ⟨a, b, B0, ha, _, _, hbounds⟩ := |
| 128 | H.exists_eventual_regularRawStage_finite_chart_bounds W.tube W.radius W.radius_pos |
| 129 | W.high_index G q Kset (j + 1) hK htarget hstage (n + 1) |
| 130 | obtain ⟨K0, hK0⟩ := eventually_atTop.mp |
| 131 | (hcap.and ((hsigma.tendsto_atTop.eventually hbounds).and hscale)) |
| 132 | let J := {v : ℕ × RoundCylinderSpace × S // K0 ≤ v.1 ∧ |
| 133 | v.2.1.2 ∈ Ioo (-eta⁻¹) eta⁻¹ ∧ |
| 134 | (e v.1).symm ((N v.1).coordinate_map v.2.1) ∈ Cset (q v.2.2)} |
| 135 | let y := fun i : J => capturedCylinderCoordinates (e i.1.1) (R i.1.1) |
| 136 | i.1.2.1.1 i.1.2.1.2 (q i.1.2.2) 0 |
| 137 | have hy (i : J) : y i ∈ Kset i.1.2.2 := by |
| 138 | change (extChartAt (𝓡 3) (q i.1.2.2)) |
| 139 | ((e i.1.1).symm (cylinderNeckChart (R i.1.1) i.1.2.1.1 i.1.2.1.2 0)) ∈ _ |
| 140 | rw [cylinderNeckChart_zero] |
| 141 | exact mem_image_of_mem _ i.2.2.2 |
| 142 | have hp (i : J) : (e i.1.1).symm ((R i.1.1).coordinate_map i.1.2.1) ∈ |
| 143 | (extChartAt (𝓡 3) (q i.1.2.2)).source := |
| 144 | ((hF i.1.2.2.1 i.1.2.2.2).2.2.2.1 i.2.2.2).1 |
| 145 | have hs (i : J) : i.1.2.1.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ := |
| 146 | Proofs.M28.NeckAnalysis.cylinderStrip_mono hepspos hepseta i.2.2.1 |
| 147 | have hAj := H.hasUniformJetBoundsAt_normalizedSlice_fresh_coefficients |
| 148 | (fun i : J => idx i.1.1) (fun i => N i.1.1) (fun i => heps i.1.1) |
| 149 | hepspos (by linarith) (fun i => (hK0 i.1.1 i.2.1).2.2.2) |
| 150 | (fun i => i.1.2.1.1) (fun i => i.1.2.1.2) hs (n + 1) hn |
| 151 | have hBj : HasUniformJetBoundsAt (n + 1) |
| 152 | (fun i : J => (H.normalizedSliceMetric (idx i.1.1)).pullbackCoefficients |
| 153 | (e i.1.1 ∘ (extChartAt (𝓡 3) (q i.1.2.2)).symm)) y := by |
| 154 | intro r hr |
| 155 | exact ⟨B0, fun i => ((hK0 i.1.1 i.2.1).2.1 i.1.2.2 (y i) (hy i)).2 r hr⟩ |
| 156 | have hsource : 0 < amin * (1 - eta) := mul_pos hamin (by linarith) |
| 157 | have hmap := hasUniformJetBoundsAt_capturedCylinderCoordinates_fderiv |
| 158 | (fun i : J => H.normalizedSliceMetric (idx i.1.1)) (fun i => e i.1.1) |
| 159 | (fun i => R i.1.1) (fun i => (hK0 i.1.1 i.2.1).1.1) |
| 160 | (fun i => i.1.2.1.1) (fun i => i.1.2.1.2) (fun i => q i.1.2.2) |
| 161 | (fun i => i.2.2.1) hp n hAj hBj hsource ha |
| 162 | (fun i v => H.normalizedSlice_fresh_coefficient_lower (idx i.1.1) (R i.1.1) |
| 163 | (hK0 i.1.1 i.2.1).2.2.1 i.1.2.1.1 i.2.2.1 v) |
| 164 | (fun i v => ((hK0 i.1.1 i.2.1).2.1 i.1.2.2 (y i) (hy i)).1 v |>.1) |
| 165 | have herror : ∀ delta : ℝ, 0 < delta → ∃ K : ℕ, ∀ i : J, K ≤ i.1.1 → |
| 166 | ∀ r ≤ n + 1, ‖iteratedFDeriv ℝ r |
| 167 | ((H.normalizedSliceMetric (idx i.1.1)).pullbackCoefficients |
| 168 | (e i.1.1 ∘ (extChartAt (𝓡 3) (q i.1.2.2)).symm)) (y i) - |
| 169 | iteratedFDeriv ℝ r |
| 170 | (G.limitMetric.pullbackCoefficients (extChartAt (𝓡 3) (q i.1.2.2)).symm) (y i)‖ ≤ |
| 171 | delta := by |
| 172 | intro delta hdelta |
| 173 | obtain ⟨K, htail⟩ := eventually_atTop.mp (hsigma.tendsto_atTop.eventually |
| 174 | (H.eventually_regularRawStage_finite_chart_jet_error W.tube W.radius W.radius_pos |
| 175 | W.high_index G q Kset (j + 1) hK htarget hstage (n + 1) delta hdelta)) |
| 176 | exact ⟨K, fun i hi r hr => htail i.1.1 hi i.1.2.2 (y i) (hy i) r hr⟩ |
| 177 | have htail := exists_capturedCylinder_metric_error_tail G.limitMetric |
| 178 | (fun i : J => H.normalizedSliceMetric (idx i.1.1)) (fun i => e i.1.1) |
| 179 | (fun i => R i.1.1) (fun i => (hK0 i.1.1 i.2.1).1.1) |
| 180 | (fun i => i.1.2.1.1) (fun i => i.1.2.1.2) (fun i => q i.1.2.2) |
| 181 | (fun i => i.2.2.1) hp (n + 1) (fun i => i.1.1) hmap herror |
| 182 | intro rho hrho |
| 183 | obtain ⟨K, htailK⟩ := htail rho hrho |
| 184 | refine ⟨max K0 K, ?_⟩ |
| 185 | intro k hk z hz r hr |
| 186 | have hk0 : K0 ≤ k := (le_max_left _ _).trans hk |
| 187 | have hzR : (R k).coordinate_map z ∈ (R k).carrier := |
| 188 | (R k).coordinate_map_mem_of_axial z hz |
| 189 | have hzstage := (hK0 k hk0).1.2 _ hzR |
| 190 | obtain ⟨q0, hq0⟩ := mem_iUnion.mp (hcover (subset_closure hzstage)) |
| 191 | obtain ⟨hqF, hqC⟩ := mem_iUnion.mp hq0 |
| 192 | let l : S := ⟨q0, hqF⟩ |
| 193 | let i : J := ⟨(k, z, l), hk0, hz, interior_subset hqC⟩ |
| 194 | exact htailK i ((le_max_right _ _).trans hk) r hr |
| 195 | |
| 196 | end PoincareMT.M28.CounterexampleNeckFamily |