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.SourceNames |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallInitialMetricError |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckGeometry.CoreCoefficientReadout |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckAnalysis.RawError |
| 6 | |
| 7 | /-! |
| 8 | # The actual retained initial neck in the first spatial limit |
| 9 | |
| 10 | Uniform errors for the captured original zero nodes give the frozen |
| 11 | comparison on a shorter strip. The resulting neck retains the exact |
| 12 | limit base, scalar-defined scale, connection and actual source map. |
| 13 | Source: Morgan--Tian Proposition 10.7, p. 253; M28 derivation 106. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 25 | |
| 26 | open tube PoincareMT.Proofs.M28.NeckTransfer PoincareMT.Proofs.M28.NeckAnalysis |
| 27 | |
| 28 | set_option maxHeartbeats 2400000 in |
| 29 | -- The final assembly keeps the dependent original source and retained map literal. |
| 30 | /-- Every sufficiently late captured zero node produces an actual initial |
| 31 | neck in the retained spatial limit. The exact center, scale, connection, |
| 32 | fixed-stage containment and source map survive. Source: Proposition 10.7, |
| 33 | p. 253; M28 derivation 106. -/ |
| 34 | theorem exists_retained_initial_neck_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 | ∀ D₀ : LeviCivitaData G.limitMetric, ∃ j : ℕ, ∀ᶠ k in atTop, |
| 48 | j ≤ k ∧ ∃ N : EpsilonNeck G.limitMetric, |
| 49 | N.epsilon = 3 * epsilon / 2 ∧ N.center = G.base ∧ |
| 50 | N.scale = (4 * max C 2)⁻¹ ∧ N.connection = D₀ ∧ |
| 51 | N.carrier ⊆ G.exhaustion j ∧ ∀ z : RoundCylinderSpace, |
| 52 | N.coordinate_map z = |
| 53 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 54 | W.high_index G k).symm |
| 55 | (((W.tube (W.high_index (G.subsequence k))).list.node 0).2.coordinate_map |
| 56 | z) := by |
| 57 | obtain ⟨epsilonG, hGpos, hGsmall, hgeometry⟩ := exists_retained_initial_geometry_accuracy.{u} |
| 58 | obtain ⟨epsilonE, hEpos, _, herror⟩ := exists_retained_initial_metric_error_accuracy.{u} |
| 59 | refine ⟨min epsilonG epsilonE, lt_min hGpos hEpos, |
| 60 | (min_le_left _ _).trans hGsmall, ?_⟩ |
| 61 | intro epsilon C A E H hepsilon W G |
| 62 | let := G.limitCarrier.topologicalSpace |
| 63 | let := G.limitCarrier.chartedSpace |
| 64 | let := G.limitCarrier.isManifold |
| 65 | intro D₀ |
| 66 | have hepsG := hepsilon.trans (min_le_left _ _) |
| 67 | have hepsE := hepsilon.trans (min_le_right _ _) |
| 68 | obtain ⟨j, hj⟩ := hgeometry H hepsG W G D₀ |
| 69 | have hepspos : 0 < epsilon := |
| 70 | (H.segment 0).cover_epsilon ▸ (H.segment 0).cover.epsilon_pos |
| 71 | let eta := 3 * epsilon / 2 |
| 72 | let m := ⌊eta⁻¹⌋₊ |
| 73 | let s₀ := (4 * max C 2)⁻¹ |
| 74 | have hepseta : epsilon < eta := by dsimp only [eta]; linarith |
| 75 | have heta : 0 < eta := hepspos.trans hepseta |
| 76 | have hetahalf : eta < 1 / 2 := by dsimp only [eta]; linarith [hepsG.trans hGsmall] |
| 77 | have hmpos : 1 ≤ m := (Nat.one_le_floor_iff _).mpr |
| 78 | ((one_le_inv₀ heta).mpr (by linarith)) |
| 79 | obtain ⟨n, hnm⟩ := Nat.exists_eq_succ_of_ne_zero (by omega : m ≠ 0) |
| 80 | have hn : n + 1 ≤ ⌊epsilon⁻¹⌋₊ := by |
| 81 | have horder : m ≤ ⌊epsilon⁻¹⌋₊ := cylinderOrder_mono hepspos hepseta.le |
| 82 | omega |
| 83 | have hs₀ : 0 < s₀ := by |
| 84 | have hC : 0 < max C 2 := lt_of_lt_of_le (by norm_num) (le_max_right C 2) |
| 85 | dsimp only [s₀] |
| 86 | positivity |
| 87 | obtain ⟨delta, hdelta, hperturb⟩ := |
| 88 | exists_roundCylinderClose_perturbation_tolerance hepspos hepseta |
| 89 | obtain ⟨rho, hrho, hraw⟩ := exists_cylinder_raw_error_tolerance m hdelta |
| 90 | let L := cylinderScalarCoordinateEquiv.symm.toContinuousLinearMap |
| 91 | let F := s₀⁻¹ ^ 2 * (max 1 ‖L‖) ^ m |
| 92 | have hF : 0 < F := by |
| 93 | have hmax : 0 < max 1 ‖L‖ := lt_of_lt_of_le zero_lt_one (le_max_left _ _) |
| 94 | exact mul_pos (pow_pos (inv_pos.mpr hs₀) 2) (pow_pos hmax m) |
| 95 | obtain ⟨K, hK⟩ := herror H hepsE W G n hn (rho / F) (div_pos hrho hF) |
| 96 | refine ⟨j, ?_⟩ |
| 97 | filter_upwards [hj, eventually_ge_atTop K] with k hk hkK |
| 98 | obtain ⟨hjk, V, hcenter, hscale, hconnection, hcarrier, hmap⟩ := hk |
| 99 | let i := W.high_index (G.subsequence k) |
| 100 | let N := ((W.tube i).list.node 0).2 |
| 101 | let Q := (E (i + H.shift)).flow.scalar |
| 102 | ⟨(E (i + H.shift)).time, (E (i + H.shift)).basepoint⟩ |
| 103 | have hQ : 0 < Q := H.base_scalar_pos i |
| 104 | have hepsN : N.epsilon = epsilon := (W.tube i).initial_node_geometry.1 |
| 105 | have hscaleN : Q * N.scale ^ 2 = V.scale ^ 2 := by |
| 106 | rw [hscale] |
| 107 | exact H.normalizedSlice_initial_scale_sq W.tube i |
| 108 | let S : RoundCylinderTwoTensor := fun z v w => |
| 109 | N.scale⁻¹ ^ 2 * roundCylinderPullback ((E (i + H.shift)).flow.metric |
| 110 | (E (i + H.shift)).time) N.coordinate_map z v w |
| 111 | have hsource : RoundCylinderClose epsilon 0 S := by |
| 112 | have h := N.metric_comparison.close |
| 113 | rw [hepsN] at h |
| 114 | exact h |
| 115 | have hclose : RoundCylinderClose eta 0 V.tensor := by |
| 116 | apply hperturb 0 (by norm_num) V.tensor S hsource V.tensor_smooth |
| 117 | intro z hz |
| 118 | apply hraw eta V.tensor S V.tensor_smooth |
| 119 | (hsource.1.mono_epsilon_m28 hepspos hepseta.le) z hz |
| 120 | intro r hr a b |
| 121 | have hsN : z.2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := by |
| 122 | rw [hepsN] |
| 123 | exact cylinderStrip_mono hepspos hepseta.le hz |
| 124 | have h := V.norm_frozen_difference_jet_le N Q hQ hscaleN z.1 hz hsN a b r |
| 125 | have hlocal : V.coordinate_map ∘ |
| 126 | (cylinderSphereParametrization z.1 ∘ cylinderScalarCoordinates z.2) = |
| 127 | capturedCylinderMap |
| 128 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k) |
| 129 | N z.1 z.2 := by |
| 130 | funext x |
| 131 | exact hmap _ |
| 132 | rw [hlocal, hscale] at h |
| 133 | have hmetric : ‖iteratedFDeriv ℝ r (fun x => |
| 134 | G.limitMetric.pullbackCoefficients |
| 135 | (capturedCylinderMap |
| 136 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos W.high_index G k) |
| 137 | N z.1 z.2) x - |
| 138 | RiemannianMetric.pullbackCoefficients (M13.scaleSmoothMetric _ Q hQ) |
| 139 | (cylinderNeckChart N z.1 z.2) x) 0‖ ≤ rho / F := |
| 140 | hK k hkK z hz r (by omega) |
| 141 | have hpower : ‖L‖ ^ r ≤ (max 1 ‖L‖) ^ m := |
| 142 | (pow_le_pow_left₀ (norm_nonneg L) (le_max_right _ _) r).trans |
| 143 | (pow_le_pow_right₀ (le_max_left _ _) hr) |
| 144 | have hfactor : s₀⁻¹ ^ 2 * ‖L‖ ^ r ≤ F := |
| 145 | mul_le_mul_of_nonneg_left hpower (sq_nonneg _) |
| 146 | exact h.trans ((mul_le_mul_of_nonneg_left hmetric |
| 147 | (mul_nonneg (sq_nonneg _) (pow_nonneg (norm_nonneg _) _))).trans |
| 148 | ((mul_le_mul_of_nonneg_right hfactor (div_pos hrho hF).le).trans_eq |
| 149 | (mul_div_cancel₀ rho hF.ne'))) |
| 150 | exact ⟨hjk, V.toEpsilonNeck hclose, rfl, hcenter, hscale, hconnection, hcarrier, hmap⟩ |
| 151 | |
| 152 | end PoincareMT.M28.CounterexampleNeckFamily |