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.Analysis.L1.FourierUniqueness |
| 2 | |
| 3 | /-! |
| 4 | # Real L1 trigonometric uniqueness |
| 5 | |
| 6 | On one period [0,2*pi], zero sine and cosine moments imply zero almost |
| 7 | everywhere. Source: the complex Fourier uniqueness argument in M64's |
| 8 | second-stress-cutoff derivation, supporting Lemaire, Lemma 5.1, p. 99. |
| 9 | |
| 10 | Morgan--Tian context: Lemma 19.15, printed pp. 447-449. This project analytic helper |
| 11 | supports the actual annular minimizer and boundary regularity construction. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option warningAsError true |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | open Set Filter MeasureTheory |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- Real integrable functions are determined by all integer sine and cosine moments on one |
| 24 | period. Source: M64's second-stress-cutoff derivation. Source/construction: |
| 25 | proof-work/tasks/M64/derivations/2026-09-26-second-stress-cutoff.md, Remaining Fourier |
| 26 | uniqueness step. -/ |
| 27 | theorem m64L1Trigonometric_eq_zero {f : ℝ → ℝ} |
| 28 | (hf : IntegrableOn f (Icc 0 (2 * Real.pi))) |
| 29 | (hc : ∀ j : ℤ, (∫ x in Icc 0 (2 * Real.pi), Real.cos (j * x) * f x) = 0) |
| 30 | (hs : ∀ j : ℤ, (∫ x in Icc 0 (2 * Real.pi), Real.sin (j * x) * f x) = 0) : |
| 31 | f =ᵐ[volume.restrict (Icc 0 (2 * Real.pi))] (fun _ => 0) := by |
| 32 | have hi : IntegrableOn (fun x => (f x : ℂ)) (Icc 0 (2 * Real.pi)) := |
| 33 | Complex.ofRealCLM.integrable_comp hf |
| 34 | have hchar (j : ℤ) (x : ℝ) : |
| 35 | fourier j (x : AddCircle (2 * Real.pi)) = |
| 36 | (Real.cos (j * x) : ℂ) + (Real.sin (j * x) : ℂ) * Complex.I := by |
| 37 | rw [fourier_coe_apply] |
| 38 | have he : (2 * (Real.pi : ℂ) * Complex.I * j * x / (2 * Real.pi)) = |
| 39 | ((j * x : ℝ) : ℂ) * Complex.I := by |
| 40 | push_cast |
| 41 | field_simp [Complex.ofReal_ne_zero.mpr Real.pi_ne_zero] |
| 42 | rw [Complex.ofReal_mul, Complex.ofReal_ofNat, he, Complex.exp_ofReal_mul_I] |
| 43 | have hzero := m64L1Fourier_eq_zero (by positivity : (0 : ℝ) < 2 * Real.pi) hi (by |
| 44 | intro j |
| 45 | have hci : IntegrableOn (fun x => Real.cos (j * x) * f x) (Icc 0 (2 * Real.pi)) := |
| 46 | hf.bdd_mul |
| 47 | (Real.continuous_cos.comp (continuous_const.mul continuous_id)).aestronglyMeasurable |
| 48 | (Eventually.of_forall fun x => by |
| 49 | simpa only [Real.norm_eq_abs] using Real.abs_cos_le_one (j * x)) |
| 50 | have hsi : IntegrableOn (fun x => Real.sin (j * x) * f x) (Icc 0 (2 * Real.pi)) := |
| 51 | hf.bdd_mul |
| 52 | (Real.continuous_sin.comp (continuous_const.mul continuous_id)).aestronglyMeasurable |
| 53 | (Eventually.of_forall fun x => by |
| 54 | simpa only [Real.norm_eq_abs] using Real.abs_sin_le_one (j * x)) |
| 55 | have hciC : IntegrableOn (fun x => ((Real.cos (j * x) * f x : ℝ) : ℂ)) |
| 56 | (Icc 0 (2 * Real.pi)) := Complex.ofRealCLM.integrable_comp hci |
| 57 | have hsiC : IntegrableOn (fun x => ((Real.sin (j * x) * f x : ℝ) : ℂ)) |
| 58 | (Icc 0 (2 * Real.pi)) := Complex.ofRealCLM.integrable_comp hsi |
| 59 | calc |
| 60 | _ = ∫ x in Icc 0 (2 * Real.pi), |
| 61 | ((Real.cos (j * x) * f x : ℝ) : ℂ) + |
| 62 | ((Real.sin (j * x) * f x : ℝ) : ℂ) * Complex.I := by |
| 63 | apply integral_congr_ae |
| 64 | exact Eventually.of_forall fun x => by |
| 65 | change fourier j (x : AddCircle (2 * Real.pi)) * (f x : ℂ) = _ |
| 66 | rw [hchar] |
| 67 | push_cast |
| 68 | ring |
| 69 | _ = 0 := by |
| 70 | rw [integral_add hciC (hsiC.mul_const Complex.I), |
| 71 | integral_mul_const, integral_complex_ofReal, integral_complex_ofReal, hc, hs] |
| 72 | simp) |
| 73 | filter_upwards [hzero] with x hx |
| 74 | exact Complex.ofReal_eq_zero.mp hx |
| 75 | |
| 76 | end PoincareMT |