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.AncientKappa.Noncollapse.Universal.ModelVolume |
| 2 | import PoincareLib.Geometry.Riemannian.SpaceForm.LocalIsometry.SphereMotions |
| 3 | import PoincareLib.Geometry.Riemannian.Metric.Diffeomorph |
| 4 | import Mathlib.Analysis.InnerProductSpace.Projection.Reflection |
| 5 | |
| 6 | /-! # Homogeneity of the normalized round cylinder |
| 7 | |
| 8 | Sphere motions and translations of the line preserve the literal cylinder |
| 9 | metric. Consequently the fixed small-ball volume is independent of its center. |
| 10 | Reference: Morgan--Tian, Proposition 9.58, pp. 220--221. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | local instance : ChartedSpace RoundCylinderCoordinates RoundCylinderSpace := |
| 23 | prodChartedSpace (EuclideanSpace ℝ (Fin 2)) UnitTwoSphere ℝ ℝ |
| 24 | |
| 25 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) RoundCylinderSpace := |
| 26 | RiemannianMetric.lineProductChartedSpace (n := 2) (M := UnitTwoSphere) |
| 27 | |
| 28 | local instance : IsManifold (𝓡 3) ∞ RoundCylinderSpace := |
| 29 | RiemannianMetric.lineProductIsManifold (n := 2) (M := UnitTwoSphere) |
| 30 | |
| 31 | private def lineTranslation (a : ℝ) : Diffeomorph 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) ℝ ℝ ∞ where |
| 32 | toEquiv := Equiv.addRight a |
| 33 | contMDiff_toFun := contMDiff_id.add contMDiff_const |
| 34 | contMDiff_invFun := contMDiff_id.sub contMDiff_const |
| 35 | |
| 36 | private theorem lineTranslation_mfderiv (a z v : ℝ) : |
| 37 | mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) (lineTranslation a) z v = v := by |
| 38 | change mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) (fun x : ℝ => x + a) z v = v |
| 39 | rw [mfderiv_eq_fderiv] |
| 40 | simp |
| 41 | rfl |
| 42 | |
| 43 | private theorem productMotion_inner |
| 44 | (L : EuclideanSpace ℝ (Fin 3) ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin 3)) |
| 45 | (a : ℝ) (z : RoundCylinderSpace) (v w : RoundCylinderTangent z) : |
| 46 | let d := (Poincare.Geometry.Riemannian.SpaceForm.sphereMotion L).prodCongr |
| 47 | (lineTranslation a) |
| 48 | EvolvingRoundCylinderMetric 0 (d z) |
| 49 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) d z v) |
| 50 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) d z w) = |
| 51 | EvolvingRoundCylinderMetric 0 z v w := by |
| 52 | dsimp only |
| 53 | let f := Poincare.Geometry.Riemannian.SpaceForm.sphereMotion L |
| 54 | have hd := mfderiv_prodMap (p := z) |
| 55 | (f.contMDiff.mdifferentiable (by simp) z.1) |
| 56 | ((lineTranslation a).contMDiff.mdifferentiable (by simp) z.2) |
| 57 | change _ = _ at hd |
| 58 | change EvolvingRoundCylinderMetric 0 (f z.1, lineTranslation a z.2) |
| 59 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) |
| 60 | (Prod.map f (lineTranslation a)) z v) |
| 61 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) |
| 62 | (Prod.map f (lineTranslation a)) z w) = _ |
| 63 | rw [hd] |
| 64 | change EvolvingRoundCylinderMetric 0 (f z.1, lineTranslation a z.2) |
| 65 | (mfderiv (𝓡 2) (𝓡 2) f z.1 v.1, |
| 66 | mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) (lineTranslation a) z.2 v.2) |
| 67 | (mfderiv (𝓡 2) (𝓡 2) f z.1 w.1, |
| 68 | mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) (lineTranslation a) z.2 w.2) = _ |
| 69 | rw [lineTranslation_mfderiv, lineTranslation_mfderiv] |
| 70 | simp only [EvolvingRoundCylinderMetric, sub_zero, mul_one] |
| 71 | have hs := Poincare.Geometry.Riemannian.SpaceForm.sphereMotion_inner L z.1 v.1 w.1 |
| 72 | exact congrArg (fun t : ℝ => 2 * t + v.2 * w.2) hs |
| 73 | |
| 74 | theorem roundCylinder_exists_motion (p q : RoundCylinderSpace) : |
| 75 | ∃ e : Diffeomorph (𝓡 3) (𝓡 3) RoundCylinderSpace RoundCylinderSpace ∞, |
| 76 | e p = q ∧ ∀ z v w, |
| 77 | roundCylinderMetric.inner (e z) |
| 78 | (mfderiv (𝓡 3) (𝓡 3) e z v) (mfderiv (𝓡 3) (𝓡 3) e z w) = |
| 79 | roundCylinderMetric.inner z v w := by |
| 80 | let L := (ℝ ∙ ((p.1 : EuclideanSpace ℝ (Fin 3)) - q.1))ᗮ.reflection |
| 81 | have hLp : L p.1 = q.1 := Submodule.reflection_sub (by |
| 82 | simpa only [Metric.mem_sphere, dist_zero_right] using p.1.property.trans q.1.property.symm) |
| 83 | let d := (Poincare.Geometry.Riemannian.SpaceForm.sphereMotion L).prodCongr |
| 84 | (lineTranslation (q.2 - p.2)) |
| 85 | let c := roundCylinderModelDiffeomorph |
| 86 | let e := (c.symm.trans d).trans c |
| 87 | have hec (z : RoundCylinderSpace) : e (c z) = c (d z) := by simp [e] |
| 88 | refine ⟨e, ?_, ?_⟩ |
| 89 | · change ((Poincare.Geometry.Riemannian.SpaceForm.sphereMotion L) p.1, |
| 90 | p.2 + (q.2 - p.2)) = q |
| 91 | apply Prod.ext |
| 92 | · exact Subtype.ext hLp |
| 93 | · dsimp; ring |
| 94 | · intro z v w |
| 95 | obtain ⟨z, rfl⟩ := c.surjective z |
| 96 | let A := mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) c z |
| 97 | have hA : Function.Surjective A := by |
| 98 | have hi := mfderiv_comp (c z) (c.contMDiff.mdifferentiable (by simp) _) |
| 99 | (c.symm.contMDiff.mdifferentiable (by simp) _) |
| 100 | rw [show (c ∘ c.symm : RoundCylinderSpace → RoundCylinderSpace) = id from |
| 101 | funext c.apply_symm_apply, mfderiv_id] at hi |
| 102 | intro u |
| 103 | refine ⟨mfderiv (𝓡 3) ((𝓡 2).prod 𝓘(ℝ, ℝ)) c.symm (c z) u, ?_⟩ |
| 104 | have hu := congrArg (fun f => f u) hi |
| 105 | change u = mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) c (c.symm (c z)) |
| 106 | (mfderiv (𝓡 3) ((𝓡 2).prod 𝓘(ℝ, ℝ)) c.symm (c z) u) at hu |
| 107 | erw [c.symm_apply_apply] at hu |
| 108 | exact hu.symm |
| 109 | obtain ⟨v, rfl⟩ := hA v |
| 110 | obtain ⟨w, rfl⟩ := hA w |
| 111 | have hd : ∀ u : RoundCylinderTangent z, |
| 112 | mfderiv (𝓡 3) (𝓡 3) e (c z) (A u) = |
| 113 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) c (d z) |
| 114 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) d z u) := by |
| 115 | intro u |
| 116 | have h := congrArg (fun f => mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) f z u) |
| 117 | (show e ∘ c = c ∘ d from funext hec) |
| 118 | rw [mfderiv_comp z (e.contMDiff.mdifferentiable (by simp) _) |
| 119 | (c.contMDiff.mdifferentiable (by simp) _), |
| 120 | mfderiv_comp z (c.contMDiff.mdifferentiable (by simp) _) |
| 121 | (d.contMDiff.mdifferentiable (by simp) _)] at h |
| 122 | exact h |
| 123 | change roundCylinderMetric.inner (e (c z)) |
| 124 | (mfderiv (𝓡 3) (𝓡 3) e (c z) (A v)) |
| 125 | (mfderiv (𝓡 3) (𝓡 3) e (c z) (A w)) = _ |
| 126 | erw [hd v, hd w] |
| 127 | rw [hec] |
| 128 | exact (roundCylinderMetric_inner (d z) _ _).trans |
| 129 | ((productMotion_inner L (q.2 - p.2) z v w).trans |
| 130 | (roundCylinderMetric_inner z v w).symm) |
| 131 | |
| 132 | theorem roundCylinder_ball_volume_eq (p q : RoundCylinderSpace) (r : ℝ) : |
| 133 | roundCylinderMetric.volumeMeasure (roundCylinderMetric.ball p r) = |
| 134 | roundCylinderMetric.volumeMeasure (roundCylinderMetric.ball q r) := by |
| 135 | obtain ⟨e, he, hg⟩ := roundCylinder_exists_motion p q |
| 136 | simpa only [he] using RiemannianMetric.volumeMeasure_ball_diffeomorph |
| 137 | roundCylinderMetric roundCylinderMetric e (fun z v w => (hg z v w).symm) p r |
| 138 | |
| 139 | end PoincareMT |