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.CanonicalNeighborhood.Neck.Separation.Diameter |
| 2 | |
| 3 | /-! |
| 4 | # Diameter bounds for projective neck sections |
| 5 | |
| 6 | The zeroth-order cylinder comparison bounds the actual image diameter even |
| 7 | when the parameter map has antipodal fibers. Injectivity is unnecessary for |
| 8 | this metric estimate. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open Poincare.Geometry.Riemannian.SpaceForm |
| 17 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 18 | |
| 19 | namespace PoincareMT |
| 20 | |
| 21 | private theorem cylinderClose_zeroth_normSquared_lt |
| 22 | {ε : ℝ} {B : RoundCylinderTwoTensor} (hB : RoundCylinderClose ε 0 B) |
| 23 | {z : RoundCylinderSpace} (hz : z.2 ∈ Ioo (-ε⁻¹) ε⁻¹) : |
| 24 | roundCylinderTensorNormSquared 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1) |
| 25 | (chartAt (EuclideanSpace ℝ (Fin 2)) z.1 z.1, z.2) |
| 26 | (roundCylinderIteratedDerivative 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1) |
| 27 | B 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1 z.1, z.2)) < ε ^ 2 := by |
| 28 | obtain ⟨_, bound, hbound, hjet⟩ := hB |
| 29 | have hterm : roundCylinderTensorNormSquared 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1) |
| 30 | (chartAt (EuclideanSpace ℝ (Fin 2)) z.1 z.1, z.2) |
| 31 | (roundCylinderIteratedDerivative 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1) |
| 32 | B 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1 z.1, z.2)) ≤ |
| 33 | roundCylinderJetErrorSquared 0 B ⌊ε⁻¹⌋₊ z := by |
| 34 | dsimp only [roundCylinderJetErrorSquared] |
| 35 | apply Finset.single_le_sum (f := fun k => |
| 36 | roundCylinderTensorNormSquared 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1) |
| 37 | (chartAt (EuclideanSpace ℝ (Fin 2)) z.1 z.1, z.2) |
| 38 | (roundCylinderIteratedDerivative 0 (chartAt (EuclideanSpace ℝ (Fin 2)) z.1) |
| 39 | B k (chartAt (EuclideanSpace ℝ (Fin 2)) z.1 z.1, z.2))) |
| 40 | · intro k _ |
| 41 | exact roundCylinderTensorNormSquared_nonneg z.1 _ _ |
| 42 | · simp |
| 43 | exact hterm.trans_lt ((hjet z hz).trans_lt hbound) |
| 44 | |
| 45 | variable {M : Type*} [TopologicalSpace M] |
| 46 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 47 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 48 | |
| 49 | /-- Zeroth-order comparison controls every tangent direction of an actual |
| 50 | cylinder covering map, with its literal normalization factor. -/ |
| 51 | theorem roundCylinderClose_scaled_pullback_quadratic_error |
| 52 | (g : RiemannianMetric 3 M) (f : RoundCylinderSpace → M) |
| 53 | {ε Q : ℝ} (hε : 0 ≤ ε) |
| 54 | (hclose : RoundCylinderClose ε 0 (fun z v w => Q * roundCylinderPullback g f z v w)) |
| 55 | {z : RoundCylinderSpace} (hz : z.2 ∈ Ioo (-ε⁻¹) ε⁻¹) |
| 56 | (v : RoundCylinderTangent z) : |
| 57 | |Q * roundCylinderPullback g f z v v - EvolvingRoundCylinderMetric 0 z v v| ≤ |
| 58 | ε * EvolvingRoundCylinderMetric 0 z v v := by |
| 59 | let : Bundle.RiemannianBundle (RoundCylinderTangent : RoundCylinderSpace → Type _) := |
| 60 | ⟨roundCylinderProductMetric.toRiemannianMetric⟩ |
| 61 | let c := chartAt (EuclideanSpace ℝ (Fin 2)) z.1 |
| 62 | let p : RoundCylinderCoordinates := (c z.1, z.2) |
| 63 | let x : RoundCylinderSpace := (c.symm p.1, p.2) |
| 64 | let b := roundCylinderChartBasis z.1 p |
| 65 | let : FiniteDimensional ℝ (RoundCylinderTangent x) := Module.Finite.of_basis b |
| 66 | let D := mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) f x |
| 67 | let A : RoundCylinderTangent x →ₗ[ℝ] RoundCylinderTangent x →ₗ[ℝ] ℝ := |
| 68 | Q • (g.inner (f x)).toBilinForm.comp D.toLinearMap D.toLinearMap - |
| 69 | (roundCylinderProductMetric.inner x).toBilinForm |
| 70 | have hGram : Matrix.of (fun i j => inner ℝ (b i) (b j)) = roundCylinderGram 0 c p := by |
| 71 | ext i j |
| 72 | simp only [Matrix.of_apply, b, roundCylinderChartBasis_apply] |
| 73 | exact roundCylinderChartFrame_gram z.1 p i j |
| 74 | have hcoef (i j : Fin 3) : A (b i) (b j) = |
| 75 | roundCylinderTensorCoefficient (fun z v w => Q * roundCylinderPullback g f z v w) |
| 76 | c p i j - roundCylinderGram 0 c p i j := by |
| 77 | change Q * roundCylinderPullback g f x (b i) (b j) - |
| 78 | roundCylinderProductMetric.inner x (b i) (b j) = _ |
| 79 | rw [roundCylinderProductMetric_inner] |
| 80 | simp only [b, roundCylinderChartBasis_apply] |
| 81 | rfl |
| 82 | have hA : (∑ i : Fin 2 → Fin 3, ∑ j : Fin 2 → Fin 3, |
| 83 | (∏ r, (Matrix.of (fun i j => inner ℝ (b i) (b j)))⁻¹ (i r) (j r)) * |
| 84 | A (b (i 0)) (b (i 1)) * A (b (j 0)) (b (j 1))) ≤ ε ^ 2 := by |
| 85 | simp only [hGram, hcoef] |
| 86 | exact (cylinderClose_zeroth_normSquared_lt hclose hz).le |
| 87 | have hx : x = z := Prod.ext (c.left_inv (mem_chart_source _ z.1)) rfl |
| 88 | have hbound : ∀ w : RoundCylinderTangent x, |
| 89 | |Q * roundCylinderPullback g f x w w - EvolvingRoundCylinderMetric 0 x w w| ≤ |
| 90 | ε * EvolvingRoundCylinderMetric 0 x w w := by |
| 91 | intro w |
| 92 | have h := abs_bilinear_apply_self_le_of_inverse_gram_contraction_le A b hε hA w |
| 93 | change |Q * roundCylinderPullback g f x w w - roundCylinderProductMetric.inner x w w| ≤ |
| 94 | ε * roundCylinderProductMetric.inner x w w at h |
| 95 | simpa only [roundCylinderProductMetric_inner] using h |
| 96 | exact Eq.mp (congrArg (fun y : RoundCylinderSpace => |
| 97 | ∀ w : RoundCylinderTangent y, |
| 98 | |Q * roundCylinderPullback g f y w w - EvolvingRoundCylinderMetric 0 y w w| ≤ |
| 99 | ε * EvolvingRoundCylinderMetric 0 y w w) hx) hbound v |
| 100 | |
| 101 | /-- The diameter of an actual projective slice is bounded at the inverse |
| 102 | square-root scalar scale by the same round-sphere path estimate. -/ |
| 103 | theorem edist_cylinderCover_slice_le |
| 104 | (g : RiemannianMetric 3 M) (f : RoundCylinderSpace → M) |
| 105 | {ε Q : ℝ} (hε : 0 < ε) (hQ : 0 < Q) |
| 106 | (hf : ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ f |
| 107 | (univ ×ˢ Ioo (-ε⁻¹) ε⁻¹)) |
| 108 | (hclose : RoundCylinderClose ε 0 (fun z v w => Q * roundCylinderPullback g f z v w)) |
| 109 | (q r : UnitTwoSphere) {a : ℝ} (ha : a ∈ Ioo (-ε⁻¹) ε⁻¹) : |
| 110 | g.edist (f (q, a)) (f (r, a)) ≤ |
| 111 | ENNReal.ofReal (Real.sqrt ((1 + ε) * 2 / Q) * Real.pi) := by |
| 112 | have hcoord (q : UnitTwoSphere) : |
| 113 | ContMDiffAt ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ f (q, a) := |
| 114 | hf.contMDiffAt ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ q, ha⟩) |
| 115 | let F : UnitTwoSphere → M := fun q => f (q, a) |
| 116 | have hF : ContMDiff (𝓡 2) (𝓡 3) 1 F := by |
| 117 | intro q |
| 118 | exact ((hcoord q).comp q (contMDiffAt_id.prodMk contMDiffAt_const)).of_le (by simp) |
| 119 | have hderiv (q : UnitTwoSphere) (v : TangentSpace (𝓡 2) q) : |
| 120 | mfderiv (𝓡 2) (𝓡 3) F q v = |
| 121 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) f (q, a) (v, 0) := by |
| 122 | dsimp only [TangentSpace] at v ⊢ |
| 123 | change mfderiv (𝓡 2) (𝓡 3) (f ∘ fun q : UnitTwoSphere => (q, a)) q v = _ |
| 124 | have h := mfderiv_comp_apply q ((hcoord q).mdifferentiableAt (by simp)) |
| 125 | (mdifferentiableAt_id.prodMk mdifferentiableAt_const) v |
| 126 | simp only [id_eq, mfderiv_prod_left] at h |
| 127 | exact h |
| 128 | have hC : 0 < Real.sqrt ((1 + ε) * 2 / Q) := Real.sqrt_pos.mpr (by positivity) |
| 129 | have hbound (q : UnitTwoSphere) (v : TangentSpace (𝓡 2) q) : |
| 130 | g.inner (F q) (mfderiv (𝓡 2) (𝓡 3) F q v) |
| 131 | (mfderiv (𝓡 2) (𝓡 3) F q v) ≤ |
| 132 | (Real.sqrt ((1 + ε) * 2 / Q)) ^ 2 * (roundSphereMetric 2).inner q v v := by |
| 133 | have h := (abs_le.mp (roundCylinderClose_scaled_pullback_quadratic_error |
| 134 | g f hε.le hclose (z := (q, a)) ha (v, 0))).2 |
| 135 | rw [hderiv, Real.sq_sqrt (by positivity : 0 ≤ (1 + ε) * 2 / Q)] |
| 136 | simp only [roundCylinderPullback, EvolvingRoundCylinderMetric, sub_zero, mul_one, |
| 137 | zero_mul, add_zero, roundSphereMetric_inner, RiemannianMetric.euclideanMetric_inner] at h |
| 138 | rw [div_mul_eq_mul_div, le_div_iff₀ hQ] |
| 139 | simp only [roundSphereMetric_inner, RiemannianMetric.euclideanMetric_inner] |
| 140 | nlinarith |
| 141 | have hdist := (roundSphereMetric 2).edist_le_mul_of_inner_mfderiv_le g hF hC hbound q r |
| 142 | have hpi : (roundSphereMetric 2).edist q r ≤ ENNReal.ofReal Real.pi := by |
| 143 | rw [roundSphereMetric_edist_eq_angle (by norm_num)] |
| 144 | exact ENNReal.ofReal_le_ofReal (Real.arccos_le_pi _) |
| 145 | exact hdist.trans (by |
| 146 | rw [ENNReal.ofReal_mul hC.le] |
| 147 | exact mul_le_mul' le_rfl hpi) |
| 148 | |
| 149 | end PoincareMT |