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.Intrinsic.Jacobi |
| 2 | |
| 3 | /-! |
| 4 | # The actual normalized transverse coefficient of the normal family |
| 5 | |
| 6 | The scalar coefficient is the projection of the boundary variation field |
| 7 | onto the parallel transport of the boundary unit tangent, divided by the |
| 8 | initial boundary speed. Its initial value and Jacobi equation are derived |
| 9 | from the constructed variation and metric connection. |
| 10 | |
| 11 | Morgan--Tian context: Claim 19.37, printed pp. 468-469, in the proof of Proposition |
| 12 | 19.35. This module supplies actual normal-geodesic data or its coordinate and measure |
| 13 | transport. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Topology Manifold ContDiff Bundle |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | open ConnectionAlongCurve ConnectionVariation |
| 26 | |
| 27 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 28 | normedSpaceTangentSpaceVectorSpace |
| 29 | |
| 30 | /-- The model-space tangent chart reads the actual coordinate field. Source/construction: |
| 31 | Morgan--Tian Claim 19.37, printed pp. 468-469. -/ |
| 32 | theorem m64Intrinsic_chartField_eq |
| 33 | (q V : ℝ → AnnulusCoordinates) (p : AnnulusCoordinates) : |
| 34 | chartField q p V = V := by |
| 35 | funext t |
| 36 | simp [chartField] |
| 37 | |
| 38 | /-- A smooth normal geodesic variation constructs its normalized scalar Jacobi coefficient, |
| 39 | including its exact physical first derivative. Source/construction: Morgan--Tian Claim |
| 40 | 19.37, printed pp. 468-469. -/ |
| 41 | theorem m64Intrinsic_exists_normal_scalar_jacobi |
| 42 | (N : IntrinsicAnnulus) {radius : ℝ} (hradius : radius ≠ 0) |
| 43 | {u : ℝ × ℝ → AnnulusCoordinates} {S I : Set ℝ} |
| 44 | (hS : IsOpen S) (hI : IsOpen I) |
| 45 | (hu : ContMDiffOn 𝓘(ℝ, ℝ × ℝ) (𝓡 2) ∞ u (S ×ˢ I)) |
| 46 | (hgeo : ∀ s ∈ S, N.metric.IsGeodesicOn (fun t => u (s, t)) I) |
| 47 | (hboundary : ∀ s ∈ S, u (s, 0) = intrinsicAnnulusBoundary radius s) |
| 48 | {a b : ℝ} (ha : a ∈ S) (hb : 0 < b) (hsub : Icc (0 : ℝ) b ⊆ I) |
| 49 | {normal : AnnulusCoordinates} |
| 50 | (hunit : N.metric.inner (intrinsicAnnulusBoundary radius a) normal normal = 1) |
| 51 | (horth : N.metric.inner (intrinsicAnnulusBoundary radius a) normal |
| 52 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary radius) a) = 0) |
| 53 | (hvelocity : HasDerivAt (fun t => u (a, t)) normal 0) : |
| 54 | let q : ℝ → AnnulusCoordinates := fun t => u (a, t) |
| 55 | let X : ℝ → AnnulusCoordinates := fun t => curveVelocity (n := 2) (fun s => u (s, t)) a |
| 56 | ∃ (W : ℝ → AnnulusCoordinates) (j v : ℝ → ℝ), |
| 57 | W 0 = intrinsicBoundaryUnitTangent N.metric radius a ∧ j 0 = 1 ∧ |
| 58 | ∀ t ∈ Icc (0 : ℝ) b, |
| 59 | ContDiffAt ℝ ∞ W t ∧ N.metric.inner (q t) (W t) (W t) = 1 ∧ |
| 60 | N.metric.inner (q t) (W t) (curveVelocity (n := 2) q t) = 0 ∧ |
| 61 | manifoldCovDerivAlong N.metric q W 1 t = 0 ∧ |
| 62 | j t = N.metric.inner (q t) (X t) (W t) / intrinsicBoundarySpeed N.metric radius a ∧ |
| 63 | v t = N.metric.inner (q t) (manifoldCovDerivAlong N.metric q X 1 t) (W t) / |
| 64 | intrinsicBoundarySpeed N.metric radius a ∧ |
| 65 | HasDerivAt j (v t) t ∧ |
| 66 | HasDerivAt v (-(N.connection.scalarCurvature (q t) / 2) * j t) t ∧ |
| 67 | ContDiffAt ℝ ∞ j t := by |
| 68 | let q : ℝ → AnnulusCoordinates := fun t => u (a, t) |
| 69 | let X : ℝ → AnnulusCoordinates := fun t => curveVelocity (n := 2) (fun s => u (s, t)) a |
| 70 | let speed := intrinsicBoundarySpeed N.metric radius a |
| 71 | have hs : 0 < speed := m64Intrinsic_boundarySpeed_pos N hradius a |
| 72 | have hzero : (0 : ℝ) ∈ Icc (0 : ℝ) b := ⟨le_rfl, hb.le⟩ |
| 73 | have hq : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 2) ∞ q I := by |
| 74 | intro t ht |
| 75 | exact ((hu.contMDiffAt ((hS.prod hI).mem_nhds ⟨ha, ht⟩)).comp t |
| 76 | (show ContMDiffAt 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ × ℝ) ∞ (fun r => (a, r)) t from |
| 77 | contMDiffAt_iff_contDiffAt.mpr (by fun_prop))).contMDiffWithinAt |
| 78 | have hX (t : ℝ) (ht : t ∈ I) : ContDiffAt ℝ ∞ (chartField q (q t) X) t := by |
| 79 | rw [m64Intrinsic_chartField_eq] |
| 80 | exact m64Intrinsic_contDiff_variation_field hS hI hu.contDiffOn ha ht |
| 81 | have hjac (t : ℝ) (ht : t ∈ Icc (0 : ℝ) b) : |
| 82 | manifoldCovDerivAlong N.metric q (manifoldCovDerivAlong N.metric q X 1) 1 t = |
| 83 | -N.connection.curvature (q t) (X t) (curveVelocity (n := 2) q t) |
| 84 | (curveVelocity (n := 2) q t) := |
| 85 | m64Intrinsic_variation_intrinsic_jacobi N hS hI hu hgeo ha (hsub ht) |
| 86 | obtain ⟨P, hPnormal, hPtangent, hPi, hP, hpair, hPvelocity⟩ := |
| 87 | m64Intrinsic_exists_normal_parallel_frame N hradius a hunit horth hb hI hq hsub |
| 88 | (hgeo a ha) (hboundary a ha) hvelocity |
| 89 | let nu : AnnulusCoordinates := !₂[0, 1] |
| 90 | let Y : ℝ → AnnulusCoordinates := fun t => (P t).inverse (X t) |
| 91 | let W : ℝ → AnnulusCoordinates := fun t => P t nu |
| 92 | let j : ℝ → ℝ := fun t => inner ℝ nu (Y t) / speed |
| 93 | let v : ℝ → ℝ := fun t => inner ℝ nu (deriv Y t) / speed |
| 94 | have hY (t : ℝ) (ht : t ∈ Icc (0 : ℝ) b) : ContDiffAt ℝ ∞ Y t := |
| 95 | RiemannianMetric.contDiffAt_inverse_frame_field (hq.contMDiffAt (hI.mem_nhds (hsub ht))) |
| 96 | (hPi t ht) (fun w => (hP t ht w).1) (hX t (hsub ht)) |
| 97 | have hpairV (t : ℝ) (ht : t ∈ Icc (0 : ℝ) b) (Z : AnnulusCoordinates) : |
| 98 | inner ℝ nu ((P t).inverse Z) = N.metric.inner (q t) Z (W t) := by |
| 99 | rw [← hpair t ht nu ((P t).inverse Z), (hPi t ht).self_apply_inverse, N.metric.symm] |
| 100 | have hjeq (t : ℝ) (ht : t ∈ Icc (0 : ℝ) b) : |
| 101 | j t = N.metric.inner (q t) (X t) (W t) / speed := by |
| 102 | exact congrArg (fun r => r / speed) (hpairV t ht (X t)) |
| 103 | have hXzero : X 0 = curveVelocity (n := 2) (intrinsicAnnulusBoundary radius) a := by |
| 104 | have heq : (fun s => u (s, 0)) =ᶠ[𝓝 a] intrinsicAnnulusBoundary radius := by |
| 105 | filter_upwards [hS.mem_nhds ha] with s hs |
| 106 | exact hboundary s hs |
| 107 | change curveVelocity (n := 2) (fun s => u (s, 0)) a = _ |
| 108 | rw [m64Intrinsic_curveVelocity_eq_deriv, m64Intrinsic_curveVelocity_eq_deriv] |
| 109 | exact heq.deriv_eq |
| 110 | have hWzero : W 0 = intrinsicBoundaryUnitTangent N.metric radius a := hPtangent |
| 111 | have hjzero : j 0 = 1 := by |
| 112 | rw [hjeq 0 hzero, hWzero, hXzero] |
| 113 | change N.metric.inner (u (a, 0)) |
| 114 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary radius) a) |
| 115 | (intrinsicBoundaryUnitTangent N.metric radius a) / speed = 1 |
| 116 | rw [hboundary a ha] |
| 117 | have hsq : speed ^ 2 = N.metric.inner (intrinsicAnnulusBoundary radius a) |
| 118 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary radius) a) |
| 119 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary radius) a) := |
| 120 | Real.sq_sqrt (Real.sqrt_pos.mp hs).le |
| 121 | simp only [intrinsicBoundaryUnitTangent, map_smul, smul_eq_mul, ← hsq] |
| 122 | change (speed⁻¹ * speed ^ 2) / speed = 1 |
| 123 | field_simp |
| 124 | refine ⟨W, j, v, hWzero, hjzero, ?_⟩ |
| 125 | intro t ht |
| 126 | have hW := (hP t ht nu).1 |
| 127 | rw [m64Intrinsic_chartField_eq] at hW |
| 128 | have hWunit : N.metric.inner (q t) (W t) (W t) = 1 := by |
| 129 | change N.metric.inner (q t) (P t nu) (P t nu) = 1 |
| 130 | rw [hpair t ht] |
| 131 | simp only [nu, PiLp.inner_apply, Fin.sum_univ_two] |
| 132 | norm_num |
| 133 | have hWorth : N.metric.inner (q t) (W t) (curveVelocity (n := 2) q t) = 0 := by |
| 134 | rw [← hPvelocity t ht] |
| 135 | change N.metric.inner (q t) (P t nu) (P t !₂[1, 0]) = 0 |
| 136 | rw [hpair t ht] |
| 137 | simp only [nu, PiLp.inner_apply, Fin.sum_univ_two] |
| 138 | norm_num |
| 139 | have hDY := inverse_manifold_parallel_hasDerivAt N.metric hb ht hPi |
| 140 | (hq.contMDiffAt (hI.mem_nhds (hsub ht))) (hP t ht) ((hX t (hsub ht)).differentiableAt |
| 141 | (by simp)) |
| 142 | have hveq : v t = N.metric.inner (q t) |
| 143 | (manifoldCovDerivAlong N.metric q X 1 t) (W t) / speed := by |
| 144 | change inner ℝ nu (deriv Y t) / speed = _ |
| 145 | rw [hDY.deriv, hpairV t ht] |
| 146 | have hdj : HasDerivAt j (v t) t := by |
| 147 | simpa only [inner_zero_left, add_zero] using |
| 148 | ((hasDerivAt_const t nu).inner ℝ |
| 149 | ((hY t ht).differentiableAt (by simp)).hasDerivAt).div_const speed |
| 150 | have hdv := m64Intrinsic_transverse_jacobi_equation N hb hI hq hsub hPi hP hpair |
| 151 | !₂[1, 0] nu (by simp only [PiLp.inner_apply, Fin.sum_univ_two]; norm_num) |
| 152 | (by simp only [nu, PiLp.inner_apply, Fin.sum_univ_two]; norm_num) hPvelocity hX hjac ht |
| 153 | have hdv' : HasDerivAt v (-(N.connection.scalarCurvature (q t) / 2) * j t) t := by |
| 154 | simpa only [j, v, Y, div_eq_mul_inv, mul_assoc] using! hdv.div_const speed |
| 155 | refine ⟨hW, hWunit, hWorth, (hP t ht nu).2, hjeq t ht, hveq, hdj, hdv', ?_⟩ |
| 156 | exact (contDiffAt_const.inner ℝ (hY t ht)).div_const speed |
| 157 | |
| 158 | end PoincareMT |