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.Circle.PhaseDifferential |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Modulus.CircleCurrent |
| 3 | |
| 4 | /-! The actual phase of a modulus-conformal area minimum satisfies |
| 5 | the weighted scalar equation. Harmonicity is derived from the genuine |
| 6 | circle current and zero tension. Source: MT Lemma 19.15, pp. 447-449. -/ |
| 7 | |
| 8 | noncomputable section |
| 9 | set_option autoImplicit false |
| 10 | set_option warningAsError true |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open Set Filter MeasureTheory |
| 14 | open scoped Manifold ContDiff Topology |
| 15 | |
| 16 | namespace PoincareMT |
| 17 | |
| 18 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] [CompactSpace M] [T2Space M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 20 | {a b : ℝ} {F : RicciFlow n M (Icc a b)} {circumference : ℝ} |
| 21 | |
| 22 | /-- The actual local phase of a weighted conformal minimum satisfies the weighted scalar |
| 23 | elliptic equation derived from zero tension. Source: Morgan--Tian (2007), Lemma 19.15 and |
| 24 | Corollary 19.16, pp. 447-449; project derivation |
| 25 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 26 | theorem m64CirclePhase_modulus_equation |
| 27 | (P : M62.CircleProductData F circumference) (t : ℝ) |
| 28 | {c0 c1 : ℝ → P.charts.Point} (A : M64Annulus (P.flow.metric t) c0 c1) |
| 29 | {r : ℝ} (hr : 0 < r) |
| 30 | (hminimum : A.area = m64LeastAnnulusArea (P.flow.metric t) c0 c1) |
| 31 | (hconformal : ∀ᵐ p ∂volume.restrict m64AnnulusDomain, |
| 32 | r * m60AreaGram (P.flow.metric t) A.map p 0 0 = |
| 33 | r⁻¹ * m60AreaGram (P.flow.metric t) A.map p 1 1 ∧ |
| 34 | m60AreaGram (P.flow.metric t) A.map p 0 1 = 0) |
| 35 | (hA : ContMDiffOn (𝓡 2) (𝓡 (n + 1)) ∞ A.map m64AnnulusInterior) |
| 36 | {L : LoopPlane → ℝ} (hL : ContDiffOn ℝ ∞ L m64AnnulusInterior) |
| 37 | (hquot : EqOn (P.circle.quotient ∘ L) (Prod.snd ∘ A.map) m64AnnulusInterior) |
| 38 | {p : LoopPlane} (hp : p ∈ m64AnnulusInterior) : |
| 39 | r * fderiv ℝ (fderiv ℝ L) p (EuclideanSpace.single (0 : Fin 2) 1) |
| 40 | (EuclideanSpace.single (0 : Fin 2) 1) + |
| 41 | r⁻¹ * fderiv ℝ (fderiv ℝ L) p (EuclideanSpace.single (1 : Fin 2) 1) |
| 42 | (EuclideanSpace.single (1 : Fin 2) 1) = 0 := by |
| 43 | have hreg := hL.contDiffAt (isOpen_m64AnnulusInterior.mem_nhds hp) |
| 44 | have hdL : DifferentiableAt ℝ (fderiv ℝ L) p := |
| 45 | (hreg.fderiv_right (m := ∞) (by simp)).differentiableAt (by simp) |
| 46 | have hcol (i : Fin 2) : (fun q => fderiv ℝ L q (EuclideanSpace.single i 1)) =ᶠ[𝓝 p] |
| 47 | m64AnnulusCircleCurrent P t A.map i := by |
| 48 | filter_upwards [isOpen_m64AnnulusInterior.mem_nhds hp] with q hq |
| 49 | apply m64CirclePhase_current P t |
| 50 | ((hA.contMDiffAt (isOpen_m64AnnulusInterior.mem_nhds hq)).mdifferentiableAt (by simp)) |
| 51 | ((hL.contDiffAt (isOpen_m64AnnulusInterior.mem_nhds hq)).differentiableAt (by simp)) |
| 52 | filter_upwards [isOpen_m64AnnulusInterior.mem_nhds hq] with z hz |
| 53 | exact hquot hz |
| 54 | have hder (i : Fin 2) : |
| 55 | fderiv ℝ (fderiv ℝ L) p (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) = |
| 56 | fderiv ℝ (m64AnnulusCircleCurrent P t A.map i) p (EuclideanSpace.single i 1) := by |
| 57 | have h := congrArg (fun B : LoopPlane →L[ℝ] ℝ => B (EuclideanSpace.single i 1)) |
| 58 | (hcol i).fderiv_eq |
| 59 | rw [fderiv_clm_apply hdL (differentiableAt_const _)] at h |
| 60 | simpa using h |
| 61 | rw [hder 0, hder 1] |
| 62 | have hpoint : annulusPoint (p 0) (p 1) = p := by ext i; fin_cases i <;> rfl |
| 63 | have hdiv := |
| 64 | m64AnnulusCircleCurrent_divergence_zero_of_modulus_minimum P P.circle.positive t A hr |
| 65 | hminimum hconformal hA (x := p 0) (s := p 1) (hpoint.symm ▸ hp) |
| 66 | rw [hpoint] at hdiv |
| 67 | exact hdiv |
| 68 | |
| 69 | end PoincareMT |