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.Modulus.MinimumChartTests |
| 2 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.Covariant.IntegrationByParts |
| 3 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.Covariant.IntegrationByPartsTests |
| 4 | |
| 5 | /-! |
| 6 | # The actual harmonic equation at arbitrary conformal modulus |
| 7 | |
| 8 | The attained area minimum supplies the coordinate tests, and covariant |
| 9 | integration by parts supplies the weighted tension equation. The modulus |
| 10 | is not normalized to one. Source: the local first variation underlying |
| 11 | Morgan--Tian Lemma 19.15, pp. 447-449. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set MeasureTheory |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | open CoordinateExponential ConnectionVariation ConjugateVariation |
| 27 | |
| 28 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] [CompactSpace M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 30 | [IsManifold (𝓡 n) ∞ M] |
| 31 | {g : RiemannianMetric n M} {c0 c1 : ℝ → M} |
| 32 | |
| 33 | /-- An actual smooth area minimum at positive conformal modulus satisfies the weighted |
| 34 | covariant harmonic equation, including at branch points. Source: Morgan--Tian (2007), Lemma |
| 35 | 19.15 and Corollary 19.16, pp. 447-449; project derivation |
| 36 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 37 | theorem m64Annulus_chart_harmonic_of_modulus_minimum |
| 38 | (A : M64Annulus g c0 c1) {r : ℝ} (hr : 0 < r) |
| 39 | (hminimum : A.area = m64LeastAnnulusArea g c0 c1) |
| 40 | (hconformal : ∀ᵐ p ∂volume.restrict m64AnnulusDomain, |
| 41 | r * m60AreaGram g A.map p 0 0 = r⁻¹ * m60AreaGram g A.map p 1 1 ∧ |
| 42 | m60AreaGram g A.map p 0 1 = 0) |
| 43 | (b : M) {U : Set LoopPlane} (hU : IsOpen U) |
| 44 | (hUinside : U ⊆ m64AnnulusInterior) |
| 45 | (hf : ContMDiffOn (𝓡 2) (𝓡 n) ∞ A.map U) |
| 46 | (hfU : MapsTo A.map U (extChartAt (𝓡 n) b).source) : |
| 47 | let u := (extChartAt (𝓡 n) b) ∘ A.map |
| 48 | let B := g.pullbackCoefficients (extChartAt (𝓡 n) b).symm |
| 49 | let e := EuclideanSpace.basisFun (Fin 2) ℝ |
| 50 | ∀ z ∈ U, |
| 51 | r • covDerivAlong (christoffelBilinear B) u (fun y => fderiv ℝ u y (e 0)) (e 0) z + |
| 52 | r⁻¹ • covDerivAlong (christoffelBilinear B) u (fun y => fderiv ℝ u y (e 1)) (e 1) z = |
| 53 | 0 := by |
| 54 | let c := extChartAt (𝓡 n) b |
| 55 | let u := c ∘ A.map |
| 56 | let B := g.pullbackCoefficients c.symm |
| 57 | let Gamma := christoffelBilinear B |
| 58 | let e := EuclideanSpace.basisFun (Fin 2) ℝ |
| 59 | let tau : LoopPlane → EuclideanSpace ℝ (Fin n) := fun x => |
| 60 | r • covDerivAlong Gamma u (fun y => fderiv ℝ u y (e 0)) (e 0) x + |
| 61 | r⁻¹ • covDerivAlong Gamma u (fun y => fderiv ℝ u y (e 1)) (e 1) x |
| 62 | have hu : ContDiffOn ℝ ∞ u U := by |
| 63 | intro x hx |
| 64 | have hc : ContMDiffAt (𝓡 n) (𝓡 n) ∞ c (A.map x) := |
| 65 | contMDiffAt_extChartAt' (by simpa only [extChartAt_source] using hfU hx) |
| 66 | exact (contMDiffAt_iff_contDiffAt.mp |
| 67 | (hc.comp x (hf.contMDiffAt (hU.mem_nhds hx)))).contDiffWithinAt |
| 68 | have htarget (x : LoopPlane) (hx : x ∈ U) : u x ∈ c.target := c.map_source (hfU hx) |
| 69 | have hB (x : LoopPlane) (hx : x ∈ U) : ContDiffAt ℝ ∞ B (u x) := |
| 70 | (g.contDiffOn_chartCoefficients b).contDiffAt |
| 71 | ((isOpen_extChartAt_target b).mem_nhds (htarget x hx)) |
| 72 | have hGamma (x : LoopPlane) (hx : x ∈ U) : ContDiffAt ℝ ∞ Gamma (u x) := |
| 73 | contDiffAt_christoffelBilinear (hB x hx) |
| 74 | (g.isInvertible_chartCoefficients b (htarget x hx)) |
| 75 | have hcompat (x : LoopPlane) (hx : x ∈ U) : IsMetricCompatibleAt B Gamma (u x) := |
| 76 | isMetricCompatibleAt_chartCoefficients g b (htarget x hx) |
| 77 | have htau : ContDiffOn ℝ ∞ tau U := by |
| 78 | intro x hx |
| 79 | have hup := hu.contDiffAt (hU.mem_nhds hx) |
| 80 | have hi (i : Fin 2) : ContDiffAt ℝ ∞ |
| 81 | (fun z => covDerivAlong Gamma u (fun y => fderiv ℝ u y (e i)) (e i) z) x := |
| 82 | contDiffAt_covDerivAlong (hGamma x hx) hup |
| 83 | ((hup.fderiv_right (m := ∞) (by simp)).clm_apply contDiffAt_const) (e i) |
| 84 | exact (((contDiffAt_const (c := r)).smul (hi 0)).add |
| 85 | ((contDiffAt_const (c := r⁻¹)).smul (hi 1))).contDiffWithinAt |
| 86 | have hpair (w : EuclideanSpace ℝ (Fin n)) : |
| 87 | EqOn (fun x => B (u x) w (tau x)) (fun _ => 0) U := by |
| 88 | apply M60.eqOn_zero_of_integral_contDiff_smul_eq_zero |
| 89 | (μ := (volume : Measure LoopPlane)) hU |
| 90 | · intro x hx |
| 91 | exact ((((hB x hx).comp x (hu.contDiffAt (hU.mem_nhds hx))).clm_apply |
| 92 | contDiffAt_const).clm_apply |
| 93 | (htau.contDiffAt (hU.mem_nhds hx))).continuousAt.continuousWithinAt |
| 94 | · intro psi hpsi hpsic hpsiU |
| 95 | let V : LoopPlane → EuclideanSpace ℝ (Fin n) := fun x => psi x • w |
| 96 | have hV : ContDiff ℝ ∞ V := hpsi.smul contDiff_const |
| 97 | have hVc : HasCompactSupport V := hpsic.smul_right |
| 98 | have hVU : tsupport V ⊆ U := |
| 99 | (tsupport_smul_subset_left psi (fun _ => w)).trans hpsiU |
| 100 | have hi (i : Fin 2) := |
| 101 | M60.covDerivAlong_trace_integration_by_parts (μ := volume) (fun _ : Fin 1 => e i) |
| 102 | hU hu hV.contDiffOn hB hGamma hcompat hVc hVU |
| 103 | simp only [Fin.sum_univ_one] at hi |
| 104 | have ht := m64Annulus_chart_test_integral_eq_zero_of_modulus_minimum |
| 105 | A hr hminimum hconformal b hU hUinside hf hfU V hV hVc hVU |
| 106 | change (∫ x, |
| 107 | r * B (u x) (covDerivAlong Gamma u V (e 0) x) (fderiv ℝ u x (e 0)) + |
| 108 | r⁻¹ * B (u x) (covDerivAlong Gamma u V (e 1) x) (fderiv ℝ u x (e 1))) = 0 at ht |
| 109 | rw [integral_add ((hi 0).1.const_mul r) ((hi 1).1.const_mul r⁻¹), |
| 110 | integral_const_mul, integral_const_mul, (hi 0).2.2, (hi 1).2.2] at ht |
| 111 | have hz : (∫ x, B (u x) (V x) (tau x)) = 0 := by |
| 112 | simp only [tau, map_add, map_smul, smul_eq_mul] |
| 113 | rw [integral_add ((hi 0).2.1.const_mul r) ((hi 1).2.1.const_mul r⁻¹), |
| 114 | integral_const_mul, integral_const_mul] |
| 115 | linarith |
| 116 | simpa only [V, map_smul, smul_apply, smul_eq_mul] using hz |
| 117 | change ∀ z ∈ U, tau z = 0 |
| 118 | intro z hz |
| 119 | apply (g.isInvertible_chartCoefficients b (htarget z hz)).injective |
| 120 | ext w |
| 121 | simp only [map_zero, zero_apply] |
| 122 | change B (u z) (tau z) w = 0 |
| 123 | have hsymm : B (u z) (tau z) w = B (u z) w (tau z) := g.symm _ _ _ |
| 124 | rw [hsymm] |
| 125 | exact hpair w hz |
| 126 | |
| 127 | end PoincareMT |