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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.IntrinsicSpatialMetric |
| 3 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.RoundCylinder |
| 4 | |
| 5 | /-! |
| 6 | # The actual metric on a literal intrinsic radial annulus |
| 7 | |
| 8 | Morgan-Tian Theorem 12.32, pp. 326-327. The annulus coordinate has constant |
| 9 | axial speed. The checked intrinsic |
| 10 | metric and the tangent orthogonality of the sphere inclusion therefore |
| 11 | give its exact angular and axial coefficients. These are the coefficients |
| 12 | that must satisfy the final radial neck comparison. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | namespace PoincareMT.M35 |
| 21 | |
| 22 | private theorem sphere_derivative_orthogonal (q : UnitTwoSphere) |
| 23 | (v : TangentSpace (𝓡 2) q) : |
| 24 | inner ℝ q.val (mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) q v) = 0 := by |
| 25 | let : Fact (Module.finrank ℝ StandardCapSpace = 2 + 1) := |
| 26 | ⟨finrank_euclideanSpace_fin⟩ |
| 27 | have hmem : mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) q v ∈ |
| 28 | (mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) q).range := ⟨v, rfl⟩ |
| 29 | rw [range_mvfderiv_subtypeVal] at hmem |
| 30 | exact Submodule.mem_orthogonal_singleton_iff_inner_right.mp hmem |
| 31 | |
| 32 | /-- Theorem 12.32, pp. 326-327: the actual affine annulus differential. -/ |
| 33 | theorem radial_annulus_coordinate_mfderiv (a b : ℝ) |
| 34 | (z : StandardCylinderSpace) (v : RoundCylinderTangent z) : |
| 35 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) |
| 36 | (fun y : StandardCylinderSpace => (a + b * y.2) • y.1.val) z v = |
| 37 | (a + b * z.2) • |
| 38 | mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) z.1 v.1 + |
| 39 | (b * v.2) • z.1.val := by |
| 40 | change EuclideanSpace ℝ (Fin 2) × ℝ at v |
| 41 | let : Fact (Module.finrank ℝ StandardCapSpace = 2 + 1) := |
| 42 | ⟨finrank_euclideanSpace_fin⟩ |
| 43 | let f : StandardCylinderSpace → ℝ := fun y => a + b * y.2 |
| 44 | let q : StandardCylinderSpace → StandardCapSpace := fun y => y.1.val |
| 45 | have hf : HasMFDerivAt ((𝓡 2).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) f z |
| 46 | (b • ContinuousLinearMap.snd ℝ (EuclideanSpace ℝ (Fin 2)) ℝ) := by |
| 47 | simpa only [zero_add] using! |
| 48 | (hasMFDerivAt_const (I := (𝓡 2).prod 𝓘(ℝ, ℝ)) a z).add |
| 49 | ((hasMFDerivAt_snd (I := 𝓡 2) (I' := 𝓘(ℝ, ℝ)) z).const_smul b) |
| 50 | have hq : MDifferentiableAt ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) q z := |
| 51 | ((contMDiff_coe_sphere (m := ∞) (n := 2) (E := StandardCapSpace)).comp |
| 52 | contMDiff_fst).mdifferentiable (by simp) z |
| 53 | have hfd : mvfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) f z v = b * v.2 := by |
| 54 | change mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) f z v = _ |
| 55 | rw [hf.mfderiv] |
| 56 | rfl |
| 57 | have hqd : mvfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) q z v = |
| 58 | mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) z.1 v.1 := by |
| 59 | have h := mfderiv_comp_apply z |
| 60 | ((contMDiff_coe_sphere (m := ∞) (n := 2) (E := StandardCapSpace)).mdifferentiable |
| 61 | (by simp) z.1) (mdifferentiableAt_fst (I := 𝓡 2) (I' := 𝓘(ℝ, ℝ))) v |
| 62 | change @Eq StandardCapSpace _ _ at h |
| 63 | rw [mfderiv_fst] at h |
| 64 | exact h |
| 65 | change mvfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (f • q) z v = _ |
| 66 | rw [mvfderiv_smul hf.mdifferentiableAt hq] |
| 67 | simp only [add_apply, smul_apply, |
| 68 | ContinuousLinearMap.smulRight_apply, hfd, hqd, f, q] |
| 69 | |
| 70 | namespace Uniqueness |
| 71 | |
| 72 | variable (g : RiemannianMetric 3 StandardCapSpace) |
| 73 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 74 | ∀ x u v : StandardCapSpace, |
| 75 | g.inner (standardRotation A x) |
| 76 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 77 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 78 | (hcomplete : MetricComplete g) |
| 79 | |
| 80 | /-- Theorem 12.32, pp. 326-327: the literal actual warped annulus tensor. -/ |
| 81 | theorem intrinsic_radial_annulus_pullback (a b : ℝ) |
| 82 | (z : StandardCylinderSpace) (hz : 0 < a + b * z.2) |
| 83 | (v w : RoundCylinderTangent z) : |
| 84 | roundCylinderPullback (intrinsicSpatialMetric g hrotation hcomplete) |
| 85 | (fun y : StandardCylinderSpace => (a + b * y.2) • y.1.val) z v w = |
| 86 | intrinsicWarpingRadius g hrotation hcomplete (a + b * z.2) ^ 2 * |
| 87 | inner ℝ |
| 88 | (mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) z.1 v.1) |
| 89 | (mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) z.1 w.1) + |
| 90 | b ^ 2 * v.2 * w.2 := by |
| 91 | let r := a + b * z.2 |
| 92 | have hnorm : ‖r • z.1.val‖ = r := by |
| 93 | rw [norm_smul, Real.norm_eq_abs, abs_of_pos hz, norm_eq_of_mem_sphere, mul_one] |
| 94 | have hne : r • z.1.val ≠ 0 := norm_ne_zero_iff.mp (hnorm.trans_ne hz.ne') |
| 95 | have hv := sphere_derivative_orthogonal z.1 v.1 |
| 96 | have hv' : inner ℝ (mvfderiv (𝓡 2) (fun p : UnitTwoSphere => p.val) z.1 v.1) |
| 97 | z.1.val = 0 := (real_inner_comm _ _).trans hv |
| 98 | have hw := sphere_derivative_orthogonal z.1 w.1 |
| 99 | have hunit : inner ℝ z.1.val z.1.val = 1 := by |
| 100 | rw [real_inner_self_eq_norm_sq, norm_eq_of_mem_sphere, one_pow] |
| 101 | rw [roundCylinderPullback, radial_annulus_coordinate_mfderiv, |
| 102 | radial_annulus_coordinate_mfderiv, |
| 103 | intrinsicSpatialMetric_inner g hrotation hcomplete hne] |
| 104 | rw [hnorm, ← mul_intrinsicWarpingQuotient g hrotation hcomplete r] |
| 105 | simp only [inner_add_left, inner_add_right, real_inner_smul_left, |
| 106 | real_inner_smul_right, hv, hv', hw, hunit, mul_zero, add_zero, zero_add] |
| 107 | field_simp [show r ≠ 0 from hz.ne'] |
| 108 | dsimp only [r] |
| 109 | ring |
| 110 | |
| 111 | end Uniqueness |
| 112 | end PoincareMT.M35 |