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.C2AnnulusMotion |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Finite.PeriodicFirstVariation |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Boundary.Relabel.AreaRange |
| 4 | |
| 5 | /-! The original C2 boundary evolutions and attained free-label minimum |
| 6 | supply their actual conormal first variation. Source: MT Lemma 19.15, |
| 7 | pp. 447-449; finite-conormal-variation derivation. -/ |
| 8 | |
| 9 | noncomputable section |
| 10 | set_option autoImplicit false |
| 11 | set_option warningAsError true |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | namespace PoincareMT |
| 18 | |
| 19 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] [T2Space M] [CompactSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | {a b : ℝ} |
| 22 | |
| 23 | /-- The attained original minimum has genuine moving competitors, the prescribed curvature |
| 24 | velocities, and the boundary-minus-Ricci energy derivative. The original labels may have |
| 25 | flat intervals. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; |
| 26 | project derivation |
| 27 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 28 | theorem m64C2Annulus_exists_finite_first_variation |
| 29 | (F : RicciFlow n M (Icc a b)) {c0 c1 : ℝ → ℝ → M} |
| 30 | (hc0 : M63C2ShrinkingCurveOn F c0 (Icc a b)) |
| 31 | (hc1 : M63C2ShrinkingCurveOn F c1 (Icc a b)) {t : ℝ} (ht : t ∈ Ioo a b) |
| 32 | (sigma0 sigma1 : M64PeriodicDegreeOneLift) |
| 33 | (hsigma0 : ContDiff ℝ 1 sigma0.map) (hsigma1 : ContDiff ℝ 1 sigma1.map) |
| 34 | (A : M64Annulus (F.metric t) |
| 35 | ((fun x => c0 x t) ∘ sigma0.map) ((fun x => c1 x t) ∘ sigma1.map)) |
| 36 | (hA : ContMDiffOn (𝓡 2) (𝓡 n) 1 A.map m64AnnulusDomain) |
| 37 | (hstrip : ContMDiffOn (𝓡 2) (𝓡 n) ∞ A.map |
| 38 | {p : LoopPlane | p 1 ∈ Ioo (0 : ℝ) 1}) |
| 39 | {r : ℝ} (hr : 0 < r) |
| 40 | (hminimum : A.area = m64LeastAnnulusArea (F.metric t) (fun x => c0 x t) (fun x => c1 x t)) |
| 41 | (hconformal : ∀ᵐ p ∂volume.restrict m64AnnulusDomain, |
| 42 | r * m60AreaGram (F.metric t) A.map p 0 0 = |
| 43 | r⁻¹ * m60AreaGram (F.metric t) A.map p 1 1 ∧ |
| 44 | m60AreaGram (F.metric t) A.map p 0 1 = 0) : |
| 45 | ∃ epsilon : ℝ, 0 < epsilon ∧ |
| 46 | (∀ s ∈ Ioo (-epsilon) epsilon, t + s ∈ Ioo a b) ∧ |
| 47 | ∃ v : ℝ → LoopPlane → M, |
| 48 | (∀ p, v 0 p = A.map p) ∧ |
| 49 | (∀ s x y, v s (annulusPoint (x + curvePeriod) y) = v s (annulusPoint x y)) ∧ |
| 50 | (∀ s ∈ Ioo (-epsilon) epsilon, ∀ x, |
| 51 | v s (annulusPoint x 0) = c0 (sigma0.map x) (t + s)) ∧ |
| 52 | (∀ s ∈ Ioo (-epsilon) epsilon, ∀ x, |
| 53 | v s (annulusPoint x 1) = c1 (sigma1.map x) (t + s)) ∧ |
| 54 | (∀ x, curveVelocity (n := n) (fun s => v s (annulusPoint x 0)) 0 = |
| 55 | m62CurvatureVector F c0 t (sigma0.map x)) ∧ |
| 56 | (∀ x, curveVelocity (n := n) (fun s => v s (annulusPoint x 1)) 0 = |
| 57 | m62CurvatureVector F c1 t (sigma1.map x)) ∧ |
| 58 | (∀ s ∈ Ioo (-epsilon) epsilon, ∀ g' : RiemannianMetric n M, |
| 59 | ∃ B : M64Annulus g' ((fun x => c0 x (t + s)) ∘ sigma0.map) |
| 60 | ((fun x => c1 x (t + s)) ∘ sigma1.map), |
| 61 | EqOn B.map (v s) m64AnnulusDomain ∧ B.area = m64AnnulusArea g' (v s)) ∧ |
| 62 | let R := fun p => |
| 63 | r * (F.connection t).ricci (v 0 p) |
| 64 | (mfderiv (𝓡 2) (𝓡 n) (v 0) p (EuclideanSpace.basisFun (Fin 2) ℝ 0)) |
| 65 | (mfderiv (𝓡 2) (𝓡 n) (v 0) p (EuclideanSpace.basisFun (Fin 2) ℝ 0)) + |
| 66 | r⁻¹ * (F.connection t).ricci (v 0 p) |
| 67 | (mfderiv (𝓡 2) (𝓡 n) (v 0) p (EuclideanSpace.basisFun (Fin 2) ℝ 1)) |
| 68 | (mfderiv (𝓡 2) (𝓡 n) (v 0) p (EuclideanSpace.basisFun (Fin 2) ℝ 1)) |
| 69 | HasDerivAt (fun s => ∫ p in m64AnnulusDomain, |
| 70 | m64ModulusEnergyDensity (F.metric (t + s)) r (v s) p) |
| 71 | (r⁻¹ * (∫ x in Icc (0 : ℝ) curvePeriod, |
| 72 | m64FiniteAnnulusCurrent (F.metric t) v 1 (annulusPoint x 1) - |
| 73 | m64FiniteAnnulusCurrent (F.metric t) v 1 (annulusPoint x 0)) - |
| 74 | ∫ p in m64AnnulusDomain, R p) 0 := by |
| 75 | obtain ⟨epsilon, hepsilon, htime, v, hbase, hperiod, hlower, hupper, |
| 76 | hvelocity0, hvelocity1, hfamily, -, d, h, hh, O, hO, hmap, Phi, hPhi, hv⟩ := |
| 77 | m64C2Annulus_exists_finite_energy_motion F hc0 hc1 ht sigma0 sigma1 hsigma0 hsigma1 A hA |
| 78 | have ht' : t ∈ Icc a b := Ioo_subset_Icc_self ht |
| 79 | have hmin : A.area = m64LeastAnnulusArea (F.metric t) |
| 80 | ((fun x => c0 x t) ∘ sigma0.map) ((fun x => c1 x t) ∘ sigma1.map) := by |
| 81 | rw [M64.leastAnnulusArea_comp_lifts_of_C1 |
| 82 | ((hc0.spatial_regular t ht').of_le (by norm_num)) (hc0.periodic t ht') |
| 83 | ((hc1.spatial_regular t ht').of_le (by norm_num)) (hc1.periodic t ht') sigma0 sigma1] |
| 84 | exact hminimum |
| 85 | refine ⟨epsilon, hepsilon, htime, v, hbase, hperiod, hlower, hupper, |
| 86 | hvelocity0, hvelocity1, hfamily, ?_⟩ |
| 87 | rw [hv] at hbase hperiod ⊢ |
| 88 | exact m64ParameterAnnulus_periodic_first_variation F ht A hr hmin hconformal hstrip |
| 89 | hepsilon htime hO hPhi hh hmap hbase hperiod |
| 90 | |
| 91 | end PoincareMT |