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.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Moving.MapLocalFlux |
| 3 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.Derivative.Second.LogDerivative |
| 4 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.Derivative.Second.DerivativeChain |
| 5 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.IntegralRegularization |
| 6 | import PoincareLib.Geometry.RicciFlow.Curvature.Estimates.ScalarTrace |
| 7 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Euclidean |
| 8 | local macro "D.laplacian_nonneg_of_isLocalMin" : term => |
| 9 | `(PoincareMT.LeviCivitaData.laplacian_nonneg_of_isLocalMinAt $(Lean.mkIdent `D)) |
| 10 | |
| 11 | /-! |
| 12 | # Logarithmic regularization across annular branch points |
| 13 | |
| 14 | A nonnegative conformal density may vanish. Its positive shifted logarithm |
| 15 | still satisfies the curvature lower bound at every zero, by the ordinary |
| 16 | Euclidean minimum principle. The estimate below is local near the point. |
| 17 | |
| 18 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 19 | 447-449. |
| 20 | -/ |
| 21 | |
| 22 | set_option autoImplicit false |
| 23 | set_option backward.isDefEq.respectTransparency false |
| 24 | |
| 25 | open Set Filter MeasureTheory |
| 26 | open scoped Manifold ContDiff Topology |
| 27 | |
| 28 | namespace PoincareMT |
| 29 | |
| 30 | private theorem annulus_second_fderiv_log_add |
| 31 | {a : LoopPlane → ℝ} {p : LoopPlane} (ha : ContDiffAt ℝ 2 a p) |
| 32 | (ε : ℝ) (hpos : a p + ε ≠ 0) (v : LoopPlane) : |
| 33 | fderiv ℝ (fun q => fderiv ℝ (fun r => Real.log (a r + ε)) q v) p v = |
| 34 | fderiv ℝ (fun q => fderiv ℝ a q v) p v / (a p + ε) - |
| 35 | (fderiv ℝ a p v) ^ 2 / (a p + ε) ^ 2 := by |
| 36 | have hfirst : (fun q => fderiv ℝ (fun r => a r + ε) q v) =ᶠ[𝓝 p] |
| 37 | fun q => fderiv ℝ a q v := by |
| 38 | filter_upwards [ha.eventually (by norm_num)] with q hq |
| 39 | rw [((hq.differentiableAt (by norm_num)).hasFDerivAt.add_const ε).fderiv] |
| 40 | have hfirstp := congrArg (fun L : LoopPlane →L[ℝ] ℝ => L v) |
| 41 | ((ha.differentiableAt (by norm_num)).hasFDerivAt.add_const ε).fderiv |
| 42 | rw [M60.second_fderiv_log (ha.add contDiffAt_const) hpos v, |
| 43 | hfirst.fderiv_eq, hfirstp] |
| 44 | |
| 45 | /-- A regular-locus conformal curvature inequality extends through every zero after a |
| 46 | positive logarithmic shift. No nonvanishing or discreteness assumption on the zero set is |
| 47 | needed. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; project |
| 48 | derivation |
| 49 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 50 | theorem m64Annulus_log_add_laplacian_lower_bound |
| 51 | {a : LoopPlane → ℝ} {O : Set LoopPlane} {p : LoopPlane} {K ε : ℝ} |
| 52 | (hO : IsOpen O) (hp : p ∈ O) (ha : ContDiffOn ℝ ∞ a O) |
| 53 | (hnonneg : ∀ q ∈ O, 0 ≤ a q) (hK : 0 ≤ K) (hε : 0 < ε) |
| 54 | (hregular : 0 < a p → |
| 55 | ((fderiv ℝ a p (EuclideanSpace.single (0 : Fin 2) 1)) ^ 2 + |
| 56 | (fderiv ℝ a p (EuclideanSpace.single (1 : Fin 2) 1)) ^ 2) / a p - |
| 57 | 2 * K * (a p) ^ 2 ≤ |
| 58 | fderiv ℝ (fun q => fderiv ℝ a q (EuclideanSpace.single (0 : Fin 2) 1)) p |
| 59 | (EuclideanSpace.single (0 : Fin 2) 1) + |
| 60 | fderiv ℝ (fun q => fderiv ℝ a q (EuclideanSpace.single (1 : Fin 2) 1)) p |
| 61 | (EuclideanSpace.single (1 : Fin 2) 1)) : |
| 62 | -2 * K * a p ≤ |
| 63 | fderiv ℝ (fun q => fderiv ℝ (fun r => Real.log (a r + ε)) q |
| 64 | (EuclideanSpace.single (0 : Fin 2) 1)) p (EuclideanSpace.single (0 : Fin 2) 1) + |
| 65 | fderiv ℝ (fun q => fderiv ℝ (fun r => Real.log (a r + ε)) q |
| 66 | (EuclideanSpace.single (1 : Fin 2) 1)) p |
| 67 | (EuclideanSpace.single (1 : Fin 2) 1) := by |
| 68 | let b0 : LoopPlane := EuclideanSpace.single (0 : Fin 2) 1 |
| 69 | let b1 : LoopPlane := EuclideanSpace.single (1 : Fin 2) 1 |
| 70 | have hap : ContDiffAt ℝ ∞ a p := ha.contDiffAt (hO.mem_nhds hp) |
| 71 | have hap2 : ContDiffAt ℝ 2 a p := hap.of_le (WithTop.coe_le_coe.mpr le_top) |
| 72 | have hpos : 0 < a p + ε := add_pos_of_nonneg_of_pos (hnonneg p hp) hε |
| 73 | by_cases hpa : 0 < a p |
| 74 | · rw [annulus_second_fderiv_log_add hap2 ε hpos.ne' b0, |
| 75 | annulus_second_fderiv_log_add hap2 ε hpos.ne' b1] |
| 76 | have hreg := hregular hpa |
| 77 | have hraw := M60.log_regularization_inequality |
| 78 | (a := a p) (ε := ε) (b := |
| 79 | fderiv ℝ (fun q => fderiv ℝ a q b0) p b0 + |
| 80 | fderiv ℝ (fun q => fderiv ℝ a q b1) p b1) |
| 81 | (c := 1 + K * a p) |
| 82 | (q := (fderiv ℝ a p b0) ^ 2 + (fderiv ℝ a p b1) ^ 2) |
| 83 | hpa hε (add_nonneg (sq_nonneg _) (sq_nonneg _)) (by |
| 84 | convert hreg using 1 |
| 85 | ring) |
| 86 | have hbound : -2 * K * a p ≤ -2 * K * (a p) ^ 2 / (a p + ε) := by |
| 87 | apply (le_div_iff₀ hpos).mpr |
| 88 | nlinarith [mul_nonneg (mul_nonneg hK hpa.le) hε.le] |
| 89 | calc |
| 90 | -2 * K * a p ≤ -2 * K * (a p) ^ 2 / (a p + ε) := hbound |
| 91 | _ ≤ _ := by convert hraw using 1 <;> ring |
| 92 | · have hz : a p = 0 := le_antisymm (le_of_not_gt hpa) (hnonneg p hp) |
| 93 | have hlog : ContDiffAt ℝ ∞ (fun q => Real.log (a q + ε)) p := |
| 94 | (hap.add contDiffAt_const).log hpos.ne' |
| 95 | have hmin : IsLocalMin (fun q => Real.log (a q + ε)) p := by |
| 96 | filter_upwards [hO.mem_nhds hp] with q hq |
| 97 | rw [hz, zero_add] |
| 98 | exact Real.strictMonoOn_log.monotoneOn hε |
| 99 | (add_pos_of_nonneg_of_pos (hnonneg q hq) hε) |
| 100 | (le_add_of_nonneg_left (hnonneg q hq)) |
| 101 | let D := (RiemannianMetric.euclideanMetric 2).euclideanLeviCivitaData |
| 102 | have hnonneg := D.laplacian_nonneg_of_isLocalMin |
| 103 | (contMDiffAt_iff_contDiffAt.mpr hlog) hmin |
| 104 | rw [D.laplacian_euclideanMetric hlog, Fin.sum_univ_two] at hnonneg |
| 105 | rw [M60.fderiv_column (hlog.of_le (WithTop.coe_le_coe.mpr le_top)) b0 b0, |
| 106 | M60.fderiv_column (hlog.of_le (WithTop.coe_le_coe.mpr le_top)) b1 b1] |
| 107 | simpa only [hz, mul_zero, EuclideanSpace.basisFun_apply] using hnonneg |
| 108 | |
| 109 | end PoincareMT |