Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Weighted exponential sums and ternary representation counts

Definition
Helfgott_WeightedCounting

by raresbuhai · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

circle-methodfourier-analysisgoldbachnumber-theory

For a complex coefficient sequence aaa, define its exponential sum on the unit circle by

Sa(α)=∑n≥0ane(nα).S_a(\alpha)=\sum_{n\ge0}a_n e(n\alpha).Sa​(α)=n≥0∑​an​e(nα).

For three coefficient sequences a,b,ca,b,ca,b,c, define the finite ternary representation count

Ra,b,c(N)=∑i+j+k=Naibjck.R_{a,b,c}(N)=\sum_{i+j+k=N}a_i b_j c_k.Ra,b,c​(N)=i+j+k=N∑​ai​bj​ck​.

The summation includes zero indices; in the von Mangoldt application their weights vanish. The complex series is the ordinary infinite sum, with its convergence hypotheses supplied by the separate counting theorem. These definitions retain the full tails of the Gaussian-based smoothings used by Helfgott; they do not truncate the exponential sums at NNN.

Definition code
import Mathlib.Analysis.Fourier.AddCircle

open scoped BigOperators

namespace Helfgott

noncomputable def expSum (a : ℕ → ℂ) (α : AddCircle (1 : ℝ)) : ℂ :=
  ∑' n : ℕ, a n * fourier (n : ℤ) α

def tripleIndices (N : ℕ) : Finset ((ℕ × ℕ) × ℕ) :=
  ((Finset.range (N + 1) ×ˢ Finset.range (N + 1)) ×ˢ Finset.range (N + 1)).filter
    (fun t => t.1.1 + t.1.2 + t.2 = N)

noncomputable def tripleCount (a b c : ℕ → ℂ) (N : ℕ) : ℂ :=
  ∑ t ∈ tripleIndices N, a t.1.1 * b t.1.2 * c t.2

end Helfgott
Source
H. A. Helfgott, The ternary Goldbach conjecture is true, arXiv:1312.7748v2, equations (1.3) and (7.49), §1.3 and §7.4 (printed pp. 69–71 for the conclusion). https://arxiv.org/abs/1312.7748 . General coefficient interface for the weighted sums, with a_n=Λ(n)η(n/x) in the paper. Written by Codex.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me