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.Finite.CurrentTraces |
| 2 | |
| 3 | /-! Source derivatives of the genuine finite-regularity current |
| 4 | agree with its curve pairings on interior slices. Source: MT |
| 5 | Lemma 19.15, pp. 447-449; finite-conormal-variation derivation. -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | set_option autoImplicit false |
| 9 | set_option warningAsError true |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set Filter Bundle |
| 13 | open scoped Manifold ContDiff Topology |
| 14 | |
| 15 | namespace PoincareMT |
| 16 | |
| 17 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 18 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 19 | |
| 20 | /-- The actual current derivative along a constant source-direction slice is the derivative |
| 21 | of its intrinsic curve pairing. All differential hypotheses concern the base map or the |
| 22 | current, not spatial second derivatives of the full motion. Source: Morgan--Tian (2007), |
| 23 | Lemma 19.15 and Corollary 19.16, pp. 447-449; project derivation |
| 24 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 25 | theorem m64FiniteAnnulusCurrent_along_slice_hasDerivAt |
| 26 | (g : RiemannianMetric n M) {v : ℝ → LoopPlane → M} |
| 27 | {ell : ℝ → LoopPlane} {x : ℝ} (i : Fin 2) |
| 28 | (hJ : DifferentiableAt ℝ (m64FiniteAnnulusCurrent g v i) (ell x)) |
| 29 | (hell : ∀ y, HasDerivAt ell (EuclideanSpace.basisFun (Fin 2) ℝ i) y) |
| 30 | (hinside : ∀ᶠ y in 𝓝 x, ell y ∈ interior m64AnnulusDomain) |
| 31 | (hbase : ∀ᶠ y in 𝓝 x, MDifferentiableAt (𝓡 2) (𝓡 n) (v 0) (ell y)) : |
| 32 | HasDerivAt |
| 33 | (fun y => g.inner (v 0 (ell y)) (curveVelocity (fun s => v s (ell y)) 0) |
| 34 | (curveVelocity (fun z => v 0 (ell z)) y)) |
| 35 | (fderiv ℝ (m64FiniteAnnulusCurrent g v i) (ell x) |
| 36 | (EuclideanSpace.basisFun (Fin 2) ℝ i)) x := by |
| 37 | have hd := hJ.hasFDerivAt.comp_hasDerivAt x (hell x) |
| 38 | apply hd.congr_of_eventuallyEq |
| 39 | filter_upwards [hinside, hbase] with y hy hby |
| 40 | have hline : mfderiv 𝓘(ℝ, ℝ) (𝓡 2) ell y 1 = |
| 41 | EuclideanSpace.basisFun (Fin 2) ℝ i := by |
| 42 | rw [mfderiv_eq_fderiv, (hell y).hasFDerivAt.fderiv] |
| 43 | exact ContinuousLinearMap.toSpanSingleton_apply_one ℝ _ |
| 44 | have hchain := mfderiv_comp_apply y hby (hell y).differentiableAt.mdifferentiableAt (1 : ℝ) |
| 45 | rw [hline] at hchain |
| 46 | have hvel : curveVelocity (n := n) (fun z => v 0 (ell z)) y = |
| 47 | mfderiv (𝓡 2) (𝓡 n) (v 0) (ell y) (EuclideanSpace.basisFun (Fin 2) ℝ i) := hchain |
| 48 | rw [hvel] |
| 49 | exact (m64FiniteAnnulusCurrent_eq_pairing g v i hy).symm |
| 50 | |
| 51 | end PoincareMT |