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.Annulus.CircleCurrent |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Annulus.IntrinsicTension |
| 3 | |
| 4 | /-! |
| 5 | # Actual closed and divergence-free annular circle current |
| 6 | |
| 7 | Torsion-freeness makes the circle current closed for every smooth map. |
| 8 | The genuine zero tension of an attained conformal minimum makes it |
| 9 | divergence-free. Both identities hold at rank-zero points as well. |
| 10 | |
| 11 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 12 | 447-449. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter MeasureTheory |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {a b : ℝ} {F : RicciFlow n M (Icc a b)} {circumference : ℝ} |
| 28 | |
| 29 | /-- The actual circle current is closed, by commutation of the two parameter velocities and |
| 30 | parallelism of the circle unit field. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary |
| 31 | 19.16, pp. 447-449; project derivation |
| 32 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 33 | theorem m64AnnulusCircleCurrent_closed |
| 34 | (P : M62.CircleProductData F circumference) (t : ℝ) |
| 35 | {f : LoopPlane → P.charts.Point} {O : Set LoopPlane} (hO : IsOpen O) |
| 36 | (hf : ContMDiffOn (𝓡 2) (𝓡 (n + 1)) ∞ f O) |
| 37 | {x s : ℝ} (hp : annulusPoint x s ∈ O) : |
| 38 | fderiv ℝ (m64AnnulusCircleCurrent P t f 1) (annulusPoint x s) |
| 39 | (EuclideanSpace.single (0 : Fin 2) 1) = |
| 40 | fderiv ℝ (m64AnnulusCircleCurrent P t f 0) (annulusPoint x s) |
| 41 | (EuclideanSpace.single (1 : Fin 2) 1) := by |
| 42 | have hfp := hf.contMDiffAt (hO.mem_nhds hp) |
| 43 | rw [m64AnnulusCircleCurrent_horizontal_derivative P t hfp, |
| 44 | m64AnnulusCircleCurrent_vertical_derivative P t hfp] |
| 45 | have hxy := M62.pullback_congr (P.flow.connection t) |
| 46 | (γ := fun y => f (annulusPoint y s)) |
| 47 | (Y := fun y => mfderiv (𝓡 2) (𝓡 (n + 1)) f (annulusPoint y s) |
| 48 | (EuclideanSpace.single (1 : Fin 2) 1)) |
| 49 | (Z := fun y => curveVelocity (fun r => f (annulusPoint y r)) s) (x := x) (by |
| 50 | filter_upwards [(m64AnnulusPoint_horizontal_hasDerivAt s x).continuousAt |
| 51 | (hO.mem_nhds hp)] with y hy |
| 52 | exact (m64Annulus_vertical_velocity |
| 53 | ((hf.contMDiffAt (hO.mem_nhds hy)).mdifferentiableAt (by simp))).symm) |
| 54 | have hyx := M62.pullback_congr (P.flow.connection t) |
| 55 | (γ := fun r => f (annulusPoint x r)) |
| 56 | (Y := fun r => mfderiv (𝓡 2) (𝓡 (n + 1)) f (annulusPoint x r) |
| 57 | (EuclideanSpace.single (0 : Fin 2) 1)) |
| 58 | (Z := fun r => curveVelocity (fun y => f (annulusPoint y r)) x) (x := s) (by |
| 59 | filter_upwards [(m64AnnulusPoint_vertical_hasDerivAt x s).continuousAt |
| 60 | (hO.mem_nhds hp)] with r hr |
| 61 | exact (m64Annulus_horizontal_velocity |
| 62 | ((hf.contMDiffAt (hO.mem_nhds hr)).mdifferentiableAt (by simp))).symm) |
| 63 | have hpoint : ContMDiff 𝓘(ℝ, ℝ × ℝ) (𝓡 2) ∞ |
| 64 | (fun q : ℝ × ℝ => annulusPoint q.1 q.2) := by |
| 65 | apply contMDiff_iff_contDiff.mpr |
| 66 | apply (contDiff_piLp 2).mpr |
| 67 | intro i |
| 68 | fin_cases i |
| 69 | · simpa [annulusPoint] using (contDiff_fst : ContDiff ℝ ∞ (Prod.fst : ℝ × ℝ → ℝ)) |
| 70 | · simpa [annulusPoint] using (contDiff_snd : ContDiff ℝ ∞ (Prod.snd : ℝ × ℝ → ℝ)) |
| 71 | have htor := M62.pullback_velocity_commute (P.flow.connection t) |
| 72 | (fun y r => f (annulusPoint y r)) (hO.preimage hpoint.continuous) |
| 73 | (hf.comp hpoint.contMDiffOn (fun _ hq => hq)) hp |
| 74 | rw [hxy, hyx, htor] |
| 75 | |
| 76 | variable [T2Space M] [CompactSpace M] |
| 77 | |
| 78 | /-- The actual area minimum supplies the divergence equation; harmonicity of a phase or |
| 79 | absence of branches is not an input. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary |
| 80 | 19.16, pp. 447-449; project derivation |
| 81 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 82 | theorem m64AnnulusCircleCurrent_divergence_zero_of_conformal_minimum |
| 83 | (P : M62.CircleProductData F circumference) (hcirc : 0 < circumference) (t : ℝ) |
| 84 | {c0 c1 : ℝ → P.charts.Point} (A : M64Annulus (P.flow.metric t) c0 c1) |
| 85 | (hminimum : A.area = m64LeastAnnulusArea (P.flow.metric t) c0 c1) |
| 86 | (hconformal : ∀ᵐ p ∂volume.restrict m64AnnulusDomain, |
| 87 | m60AreaGram (P.flow.metric t) A.map p 0 0 = m60AreaGram (P.flow.metric t) A.map p 1 1 ∧ |
| 88 | m60AreaGram (P.flow.metric t) A.map p 0 1 = 0) |
| 89 | (hA : ContMDiffOn (𝓡 2) (𝓡 (n + 1)) ∞ A.map m64AnnulusInterior) |
| 90 | {x s : ℝ} (hp : annulusPoint x s ∈ m64AnnulusInterior) : |
| 91 | fderiv ℝ (m64AnnulusCircleCurrent P t A.map 0) (annulusPoint x s) |
| 92 | (EuclideanSpace.single (0 : Fin 2) 1) + |
| 93 | fderiv ℝ (m64AnnulusCircleCurrent P t A.map 1) (annulusPoint x s) |
| 94 | (EuclideanSpace.single (1 : Fin 2) 1) = 0 := by |
| 95 | let : Fact (0 < circumference) := ⟨hcirc⟩ |
| 96 | have hfp := hA.contMDiffAt (isOpen_m64AnnulusInterior.mem_nhds hp) |
| 97 | rw [m64AnnulusCircleCurrent_horizontal_derivative P t hfp, |
| 98 | m64AnnulusCircleCurrent_vertical_derivative P t hfp] |
| 99 | have hxx := M62.pullback_congr (P.flow.connection t) |
| 100 | (γ := fun y => A.map (annulusPoint y s)) |
| 101 | (Y := fun y => mfderiv (𝓡 2) (𝓡 (n + 1)) A.map (annulusPoint y s) |
| 102 | (EuclideanSpace.single (0 : Fin 2) 1)) |
| 103 | (Z := fun y => curveVelocity (fun z => A.map (annulusPoint z s)) y) (x := x) (by |
| 104 | filter_upwards [(m64AnnulusPoint_horizontal_hasDerivAt s x).continuousAt |
| 105 | (isOpen_m64AnnulusInterior.mem_nhds hp)] with y hy |
| 106 | exact (m64Annulus_horizontal_velocity |
| 107 | ((hA.contMDiffAt (isOpen_m64AnnulusInterior.mem_nhds hy)).mdifferentiableAt |
| 108 | (by simp))).symm) |
| 109 | have hyy := M62.pullback_congr (P.flow.connection t) |
| 110 | (γ := fun r => A.map (annulusPoint x r)) |
| 111 | (Y := fun r => mfderiv (𝓡 2) (𝓡 (n + 1)) A.map (annulusPoint x r) |
| 112 | (EuclideanSpace.single (1 : Fin 2) 1)) |
| 113 | (Z := fun r => curveVelocity (fun z => A.map (annulusPoint x z)) r) (x := s) (by |
| 114 | filter_upwards [(m64AnnulusPoint_vertical_hasDerivAt x s).continuousAt |
| 115 | (isOpen_m64AnnulusInterior.mem_nhds hp)] with r hr |
| 116 | exact (m64Annulus_vertical_velocity |
| 117 | ((hA.contMDiffAt (isOpen_m64AnnulusInterior.mem_nhds hr)).mdifferentiableAt |
| 118 | (by simp))).symm) |
| 119 | rw [hxx, hyy] |
| 120 | have hzero := m64Annulus_intrinsic_tension_eq_zero_of_conformal_minimum |
| 121 | (P.flow.connection t) A hminimum hconformal hA hp |
| 122 | have hscalar := congrArg (fun v => (P.flow.metric t).inner (A.map (annulusPoint x s)) v |
| 123 | (P.charts.circleUnit (A.map (annulusPoint x s)))) hzero |
| 124 | simpa only [map_add, add_apply, map_zero, zero_apply] using hscalar |
| 125 | |
| 126 | end PoincareMT |