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.Supported.ModulusEnergyVariation |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Free.UniformizationEnergy |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Weighted.AnnulusEnergyIdentity |
| 4 | import Mathlib.Analysis.Calculus.LocalExtr.Basic |
| 5 | |
| 6 | /-! |
| 7 | # Actual supported stationarity at the conformal modulus |
| 8 | |
| 9 | At an attained modulus-conformal area minimum, weighted energy equals |
| 10 | area. Every admitted supported competitor has area at least the minimum |
| 11 | and at most its weighted energy. The actual differentiated weighted |
| 12 | energy consequently has derivative zero, including at branch points. |
| 13 | |
| 14 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 15 | 447-449. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter MeasureTheory |
| 21 | open scoped Manifold ContDiff Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] [CompactSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | {g : RiemannianMetric n M} {c0 c1 : ℝ → M} |
| 30 | |
| 31 | /-- Actual area minimality at any positive conformal modulus implies zero derivative of |
| 32 | every genuine admissible supported weighted-energy variation. No weighted stationarity |
| 33 | premise is introduced. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. |
| 34 | 447-449; project derivation |
| 35 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 36 | theorem m64Annulus_supported_modulus_stationarity_of_minimum_of_eqOn |
| 37 | (A : M64Annulus g c0 c1) {r : ℝ} (hr : 0 < r) |
| 38 | (hminimum : A.area = m64LeastAnnulusArea g c0 c1) |
| 39 | (hconformal : ∀ᵐ p ∂volume.restrict m64AnnulusDomain, |
| 40 | r * m60AreaGram g A.map p 0 0 = r⁻¹ * m60AreaGram g A.map p 1 1 ∧ |
| 41 | m60AreaGram g A.map p 0 1 = 0) |
| 42 | {v : ℝ × LoopPlane → M} {epsilon : ℝ} (hepsilon : 0 < epsilon) |
| 43 | {O K : Set LoopPlane} (hO : IsOpen O) (hK : IsCompact K) |
| 44 | (hKO : K ⊆ O) (hKdomain : K ⊆ m64AnnulusDomain) |
| 45 | (hv : ContMDiffOn 𝓘(ℝ, ℝ × LoopPlane) (𝓡 n) ∞ v |
| 46 | (Ioo (-epsilon) epsilon ×ˢ O)) |
| 47 | (hadmissible : ∀ s ∈ Ioo (-epsilon) epsilon, |
| 48 | ∃ B : M64Annulus g c0 c1, EqOn B.map (fun p => v (s, p)) m64AnnulusDomain) |
| 49 | (hcenter : ∀ p, v (0, p) = A.map p) |
| 50 | (hfix : ∀ s ∈ Ioo (-epsilon) epsilon, ∀ z ∉ K, |
| 51 | v (s, z) = v (0, z)) : |
| 52 | HasDerivAt |
| 53 | (fun s => ∫ p in m64AnnulusDomain, |
| 54 | m64ModulusEnergyDensity g r (fun z => v (s, z)) p) 0 0 := by |
| 55 | let E := fun s => ∫ p in m64AnnulusDomain, |
| 56 | m64ModulusEnergyDensity g r (fun z => v (s, z)) p |
| 57 | have hzero : (0 : ℝ) ∈ Ioo (-epsilon) epsilon := ⟨by linarith, hepsilon⟩ |
| 58 | have hmapzero : (fun z => v (0, z)) = A.map := funext hcenter |
| 59 | have henergy0 : E 0 = A.area := by |
| 60 | simp only [E, hmapzero] |
| 61 | exact m64_weightedEnergy_eq_area_of_ae_modulus_conformal A hr hconformal |
| 62 | have hint (s : ℝ) (hs : s ∈ Ioo (-epsilon) epsilon) : |
| 63 | IntegrableOn (m64ModulusEnergyDensity g r (fun z => v (s, z))) |
| 64 | m64AnnulusDomain volume := by |
| 65 | obtain ⟨B, hB⟩ := hadmissible s hs |
| 66 | exact (B.weightedGramEnergy_integrable r).congr |
| 67 | (m64ModulusEnergyDensity_ae_eq_of_eqOn g r hB) |
| 68 | have hcomparison (s : ℝ) (hs : s ∈ Ioo (-epsilon) epsilon) : A.area ≤ E s := by |
| 69 | obtain ⟨B, hB⟩ := hadmissible s hs |
| 70 | have henergy : m64ClassicalWeightedGramEnergy g B r = E s := |
| 71 | integral_congr_ae (m64ModulusEnergyDensity_ae_eq_of_eqOn g r hB) |
| 72 | calc |
| 73 | A.area = m64LeastAnnulusArea g c0 c1 := hminimum |
| 74 | _ ≤ B.area := m64LeastAnnulusArea_le_annulus B |
| 75 | _ ≤ m64ClassicalWeightedGramEnergy g B r := |
| 76 | B.area_le_weightedGramEnergy hr (B.weightedGramEnergy_integrable r) |
| 77 | _ = E s := henergy |
| 78 | have hlocal : IsLocalMin E 0 := by |
| 79 | filter_upwards [isOpen_Ioo.mem_nhds hzero] with s hs |
| 80 | rw [henergy0] |
| 81 | exact hcomparison s hs |
| 82 | have hd := (m64ModulusEnergy_hasDerivAt_of_supported_variation g r hepsilon |
| 83 | hO hK hKO hKdomain hv hfix hint).2 |
| 84 | have hdE : DifferentiableAt ℝ E 0 := hd.differentiableAt |
| 85 | simpa only [hlocal.deriv_eq_zero] using hdE.hasDerivAt |
| 86 | |
| 87 | end PoincareMT |