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.CurveShortening.Comparison.IntrinsicComparison.Normal.Frame |
| 2 | |
| 3 | /-! |
| 4 | # Scalar reduction of the normal variation |
| 5 | |
| 6 | Inverse parallel transport converts the actual covariant Jacobi equation |
| 7 | into an ordinary vector equation, including the initial endpoint. Its |
| 8 | transverse component has coefficient exactly the Gaussian curvature. |
| 9 | |
| 10 | Morgan--Tian context: Claim 19.37, printed pp. 468-469, in the proof of Proposition |
| 11 | 19.35. This module supplies actual normal-geodesic data or its coordinate and measure |
| 12 | transport. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology Manifold ContDiff Bundle |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | open ConnectionAlongCurve ConnectionVariation |
| 25 | |
| 26 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 27 | normedSpaceTangentSpaceVectorSpace |
| 28 | |
| 29 | /-- The ordinary Jacobi equation after inverse transport of a vector field, with two-sided |
| 30 | derivatives at both endpoints of the compact interval. Source/construction: Morgan--Tian |
| 31 | Claim 19.37, printed pp. 468-469. -/ |
| 32 | theorem m64Intrinsic_inverse_parallel_jacobi_vector |
| 33 | (N : IntrinsicAnnulus) {q : ℝ → AnnulusCoordinates} {I : Set ℝ} {b t : ℝ} |
| 34 | (hb : 0 < b) (hI : IsOpen I) (hq : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 2) ∞ q I) |
| 35 | (hsub : Icc (0 : ℝ) b ⊆ I) |
| 36 | {P : ℝ → AnnulusCoordinates →L[ℝ] AnnulusCoordinates} |
| 37 | (hPi : ∀ s ∈ Icc (0 : ℝ) b, (P s).IsInvertible) |
| 38 | (hP : ∀ s ∈ Icc (0 : ℝ) b, ∀ u, |
| 39 | ContDiffAt ℝ ∞ (chartField q (q s) (fun r => P r u)) s ∧ |
| 40 | manifoldCovDerivAlong N.metric q (fun r => P r u) 1 s = 0) |
| 41 | {X : ℝ → AnnulusCoordinates} |
| 42 | (hX : ∀ s ∈ I, ContDiffAt ℝ ∞ (chartField q (q s) X) s) |
| 43 | (hjac : ∀ s ∈ Icc (0 : ℝ) b, |
| 44 | manifoldCovDerivAlong N.metric q (manifoldCovDerivAlong N.metric q X 1) 1 s = |
| 45 | -N.connection.curvature (q s) (X s) (curveVelocity (n := 2) q s) |
| 46 | (curveVelocity (n := 2) q s)) |
| 47 | (ht : t ∈ Icc (0 : ℝ) b) : |
| 48 | let Y := fun s => (P s).inverse (X s) |
| 49 | HasDerivAt (deriv Y) |
| 50 | (-(P t).inverse (N.connection.curvature (q t) (X t) |
| 51 | (curveVelocity (n := 2) q t) (curveVelocity (n := 2) q t))) t := by |
| 52 | let Y : ℝ → AnnulusCoordinates := fun s => (P s).inverse (X s) |
| 53 | have hqt (s : ℝ) (hs : s ∈ I) := hq.contMDiffAt (hI.mem_nhds hs) |
| 54 | have hY (s : ℝ) (hs : s ∈ Icc (0 : ℝ) b) : ContDiffAt ℝ ∞ Y s := |
| 55 | RiemannianMetric.contDiffAt_inverse_frame_field (hqt s (hsub hs)) (hPi s hs) |
| 56 | (fun u => (hP s hs u).1) (hX s (hsub hs)) |
| 57 | have hval (s : ℝ) (hs : s ∈ Icc (0 : ℝ) b) : |
| 58 | deriv Y s = (P s).inverse (manifoldCovDerivAlong N.metric q X 1 s) := |
| 59 | (inverse_manifold_parallel_hasDerivAt N.metric hb hs hPi |
| 60 | (hqt s (hsub hs)) (hP s hs) ((hX s (hsub hs)).differentiableAt (by simp))).deriv |
| 61 | have hDX := contDiffAt_chartField_covDeriv N.metric hI hq hX (hsub ht) |
| 62 | (mem_extChartAt_source _) |
| 63 | have hd := inverse_manifold_parallel_hasDerivAt N.metric hb ht hPi |
| 64 | (hqt t (hsub ht)) (hP t ht) (hDX.differentiableAt (by simp)) |
| 65 | rw [hjac t ht, map_neg] at hd |
| 66 | have hwithin := hd.hasDerivWithinAt.congr (fun s hs => hval s hs) (hval t ht) |
| 67 | have hV : ContDiffAt ℝ ∞ (deriv Y) t := (hY t ht).derivWithin (by simp) |
| 68 | have heq := ((hV.differentiableAt (by simp)).hasDerivAt.hasDerivWithinAt.derivWithin |
| 69 | (uniqueDiffOn_Icc hb t ht)).symm.trans |
| 70 | (hwithin.derivWithin (uniqueDiffOn_Icc hb t ht)) |
| 71 | exact heq ▸ (hV.differentiableAt (by simp)).hasDerivAt |
| 72 | |
| 73 | /-- The transverse component of an actual Jacobi field satisfies the scalar |
| 74 | Gaussian-curvature equation in the isometric parallel frame. Source/construction: |
| 75 | Morgan--Tian Claim 19.37, printed pp. 468-469. -/ |
| 76 | theorem m64Intrinsic_transverse_jacobi_equation |
| 77 | (N : IntrinsicAnnulus) {q : ℝ → AnnulusCoordinates} {I : Set ℝ} {b t : ℝ} |
| 78 | (hb : 0 < b) (hI : IsOpen I) (hq : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 2) ∞ q I) |
| 79 | (hsub : Icc (0 : ℝ) b ⊆ I) |
| 80 | {P : ℝ → AnnulusCoordinates →L[ℝ] AnnulusCoordinates} |
| 81 | (hPi : ∀ s ∈ Icc (0 : ℝ) b, (P s).IsInvertible) |
| 82 | (hP : ∀ s ∈ Icc (0 : ℝ) b, ∀ u, |
| 83 | ContDiffAt ℝ ∞ (chartField q (q s) (fun r => P r u)) s ∧ |
| 84 | manifoldCovDerivAlong N.metric q (fun r => P r u) 1 s = 0) |
| 85 | (hpair : ∀ s ∈ Icc (0 : ℝ) b, ∀ u v, |
| 86 | N.metric.inner (q s) (P s u) (P s v) = inner ℝ u v) |
| 87 | (theta nu : AnnulusCoordinates) (htheta : inner ℝ theta theta = 1) |
| 88 | (horth : inner ℝ theta nu = 0) |
| 89 | (hvelocity : ∀ s ∈ Icc (0 : ℝ) b, P s theta = curveVelocity (n := 2) q s) |
| 90 | {X : ℝ → AnnulusCoordinates} |
| 91 | (hX : ∀ s ∈ I, ContDiffAt ℝ ∞ (chartField q (q s) X) s) |
| 92 | (hjac : ∀ s ∈ Icc (0 : ℝ) b, |
| 93 | manifoldCovDerivAlong N.metric q (manifoldCovDerivAlong N.metric q X 1) 1 s = |
| 94 | -N.connection.curvature (q s) (X s) (curveVelocity (n := 2) q s) |
| 95 | (curveVelocity (n := 2) q s)) |
| 96 | (ht : t ∈ Icc (0 : ℝ) b) : |
| 97 | let Y := fun s => (P s).inverse (X s) |
| 98 | HasDerivAt (fun s => inner ℝ nu (deriv Y s)) |
| 99 | (-(N.connection.scalarCurvature (q t) / 2) * inner ℝ nu (Y t)) t := by |
| 100 | have hd := m64Intrinsic_inverse_parallel_jacobi_vector N hb hI hq hsub hPi hP hX hjac ht |
| 101 | have h := (hasDerivAt_const t nu).inner ℝ hd |
| 102 | simp only [inner_zero_left, add_zero, inner_neg_right] at h |
| 103 | rw [← hvelocity t ht] at h |
| 104 | have hcurv := m64Intrinsic_radialCurvature_transverse_pairing N (q t) (P t) |
| 105 | (hPi t ht) (hpair t ht) theta nu ((P t).inverse (X t)) htheta horth |
| 106 | rw [(hPi t ht).self_apply_inverse, N.metric.radialCurvatureOperator_apply N.connection] |
| 107 | at hcurv |
| 108 | rw [hcurv, ← neg_mul] at h |
| 109 | exact h |
| 110 | |
| 111 | end PoincareMT |