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.AnnularEvolution.Annulus.SliceDifferential |
| 2 | |
| 3 | /-! |
| 4 | # Smooth intrinsic currents for moving annuli |
| 5 | |
| 6 | The time-space metric pairings are globally defined scalar functions of |
| 7 | the actual family differential. They are smooth without a single target |
| 8 | chart and without a positive-rank condition. |
| 9 | |
| 10 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 11 | 447-449. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter Bundle |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | |
| 27 | /-- The actual scalar time-space pairing of a moving annulus. Source: Morgan--Tian (2007), |
| 28 | Lemma 19.15 and Corollary 19.16, pp. 447-449; project derivation |
| 29 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 30 | noncomputable def m64MovingAnnulusCurrent (g : RiemannianMetric n M) |
| 31 | (v : ℝ × LoopPlane → M) (i : Fin 2) (q : ℝ × LoopPlane) : ℝ := |
| 32 | g.inner (v q) |
| 33 | (mfderiv 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v q (1, 0)) |
| 34 | (mfderiv 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v q |
| 35 | (0, EuclideanSpace.basisFun (Fin 2) ℝ i)) |
| 36 | |
| 37 | /-- The actual time-space current is smooth wherever the family is smooth. Source: |
| 38 | Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; project derivation |
| 39 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 40 | theorem m64MovingAnnulusCurrent_contDiffAt |
| 41 | (g : RiemannianMetric n M) {v : ℝ × LoopPlane → M} {q : ℝ × LoopPlane} |
| 42 | (hv : ContMDiffAt 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) ∞ v q) (i : Fin 2) : |
| 43 | ContDiffAt ℝ ∞ (m64MovingAnnulusCurrent g v i) q := by |
| 44 | have hpush (d : ℝ × LoopPlane) : |
| 45 | ContMDiffAt 𝓘(ℝ, ℝ × LoopPlane) ((𝓡 n).prod (𝓡 n)) ∞ |
| 46 | (fun p => (⟨v p, mfderiv 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v p d⟩ : |
| 47 | TangentBundle (𝓡 n) M)) q := by |
| 48 | have hd : ContMDiffAt 𝓘(ℝ, ℝ × LoopPlane) |
| 49 | ((𝓘(ℝ, ℝ × LoopPlane)).prod 𝓘(ℝ, ℝ × LoopPlane)) ∞ |
| 50 | (fun p : ℝ × LoopPlane => |
| 51 | (⟨p, d⟩ : TangentBundle 𝓘(ℝ, ℝ × LoopPlane) (ℝ × LoopPlane))) q := by |
| 52 | rw [contMDiffAt_totalSpace] |
| 53 | exact ⟨contMDiffAt_id, by simpa using contMDiffAt_const (c := d)⟩ |
| 54 | exact (hv.mfderiv_const (m := ∞) (by simp)).clm_apply_of_inCoordinates hd hv |
| 55 | have h := ((g.contMDiff (v q)).comp q hv).clm_bundle_apply₂ |
| 56 | (F₃ := ℝ) (E₃ := Bundle.Trivial M ℝ) |
| 57 | (hpush (1, 0)) (hpush (0, EuclideanSpace.basisFun (Fin 2) ℝ i)) |
| 58 | exact contMDiffAt_iff_contDiffAt.mp (Bundle.contMDiffAt_totalSpace.mp h).2 |
| 59 | |
| 60 | omit [IsManifold (𝓡 n) ∞ M] in |
| 61 | /-- The actual time velocity is the time column of the joint differential. Source: |
| 62 | Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; project derivation |
| 63 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 64 | theorem m64MovingAnnulus_time_velocity |
| 65 | {v : ℝ × LoopPlane → M} {t : ℝ} {p : LoopPlane} |
| 66 | (hv : MDifferentiableAt 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v (t, p)) : |
| 67 | curveVelocity (fun r => v (r, p)) t = |
| 68 | mfderiv 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v (t, p) (1, 0) := by |
| 69 | have hline := hasFDerivAt_prodMk_left (𝕜 := ℝ) t p |
| 70 | have hmd : MDifferentiableAt 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ × LoopPlane) |
| 71 | (fun r : ℝ => (r, p)) t := hline.differentiableAt.mdifferentiableAt |
| 72 | have hd : mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ × LoopPlane) (fun r : ℝ => (r, p)) t 1 = |
| 73 | (1, 0) := by |
| 74 | rw [mfderiv_eq_fderiv, hline.fderiv] |
| 75 | rfl |
| 76 | have hchain := mfderiv_comp_apply t hv hmd (1 : ℝ) |
| 77 | rw [hd] at hchain |
| 78 | exact hchain |
| 79 | |
| 80 | omit [IsManifold (𝓡 n) ∞ M] in |
| 81 | /-- The source differential of a time slice is the actual joint spatial column, for any |
| 82 | source vector. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; |
| 83 | project derivation |
| 84 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 85 | theorem m64MovingAnnulus_spatial_differential |
| 86 | {v : ℝ × LoopPlane → M} {t : ℝ} {p : LoopPlane} |
| 87 | (hv : MDifferentiableAt 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v (t, p)) (d : LoopPlane) : |
| 88 | mfderiv (𝓡 2) (𝓡 n) (fun z => v (t, z)) p d = |
| 89 | mfderiv 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v (t, p) (0, d) := by |
| 90 | have hline := hasFDerivAt_prodMk_right (𝕜 := ℝ) t p |
| 91 | have hmd : MDifferentiableAt (𝓡 2) 𝓘(ℝ, ℝ × LoopPlane) |
| 92 | (fun z : LoopPlane => (t, z)) p := hline.differentiableAt.mdifferentiableAt |
| 93 | have hd : mfderiv (𝓡 2) 𝓘(ℝ, ℝ × LoopPlane) (fun z : LoopPlane => (t, z)) p d = |
| 94 | (0, d) := by |
| 95 | rw [mfderiv_eq_fderiv, hline.fderiv] |
| 96 | rfl |
| 97 | have hchain := mfderiv_comp_apply p hv hmd d |
| 98 | rw [hd] at hchain |
| 99 | exact hchain |
| 100 | |
| 101 | /-- The scalar current is the genuine variation velocity paired with the actual spatial map |
| 102 | differential. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; |
| 103 | project derivation |
| 104 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 105 | theorem m64MovingAnnulusCurrent_eq_pairing |
| 106 | (g : RiemannianMetric n M) {v : ℝ × LoopPlane → M} {t : ℝ} {p : LoopPlane} |
| 107 | (hv : MDifferentiableAt 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) v (t, p)) (i : Fin 2) : |
| 108 | m64MovingAnnulusCurrent g v i (t, p) = |
| 109 | g.inner (v (t, p)) (curveVelocity (fun r => v (r, p)) t) |
| 110 | (mfderiv (𝓡 2) (𝓡 n) (fun z => v (t, z)) p |
| 111 | (EuclideanSpace.basisFun (Fin 2) ℝ i)) := by |
| 112 | rw [m64MovingAnnulus_time_velocity hv, m64MovingAnnulus_spatial_differential hv] |
| 113 | rfl |
| 114 | |
| 115 | end PoincareMT |