Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Weyl sum Sk(α;N)=∑x<Ne(αxk)S_k(\alpha;N)=\sum_{x<N}e(\alpha x^k)Sk​(α;N)=∑x<N​e(αxk)

Definition
CircleMethod_weylsum

by tabbott · Sep 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

analytic-number-theorycircle-methodexponential-sumsnumber-theory

The Weyl sum of degree kkk is the exponential sum

Sk(α;N)  =  ∑x=0N−1e ⁣(αxk),e(θ)=exp⁡(2πiθ).S_k(\alpha; N) \;=\; \sum_{x=0}^{N-1} e\!\left(\alpha x^{k}\right),\qquad e(\theta)=\exp(2\pi i\theta).Sk​(α;N)=x=0∑N−1​e(αxk),e(θ)=exp(2πiθ).

This is the generating function of the circle method specialised to the set of kkk-th powers, and it is the object whose size controls Waring's problem: by the fundamental counting identity,

∫01Sk(α;N)s e(−nα) dα  =  #{(x1,…,xs)∈[0,N)s:x1k+⋯+xsk=n}.\int_0^1 S_k(\alpha; N)^{s}\, e(-n\alpha)\,d\alpha \;=\; \#\{(x_1,\dots,x_s) \in [0,N)^s : x_1^{k}+\cdots+x_s^{k}=n\}.∫01​Sk​(α;N)se(−nα)dα=#{(x1​,…,xs​)∈[0,N)s:x1k​+⋯+xsk​=n}.

For k=1k=1k=1 the sum is geometric and is completely understood: ∣S1(α;N)∣≤min⁡(N,12∥α∥)|S_1(\alpha;N)| \le \min(N, \frac{1}{2\|\alpha\|})∣S1​(α;N)∣≤min(N,2∥α∥1​). For k≥2k \ge 2k≥2 there is no closed form, and bounding SkS_kSk​ is the central difficulty of the subject. Weyl's inequality supplies a bound whenever α\alphaα admits a rational approximation a/qa/qa/q with qqq neither very small nor very large; Vinogradov's mean value method and, more recently, decoupling give stronger bounds for large kkk.

Formalization Note. The summation index xxx ranges over Finset.range N, that is 0≤x<N0 \le x < N0≤x<N, and is coerced from N\mathbb{N}N to R\mathbb{R}R before being raised to the natural power kkk. The degenerate cases N=0N = 0N=0 (empty sum) and k=0k = 0k=0 (every term equal to e(α)e(\alpha)e(α)) are permitted and behave as expected.

Definition code
import Definitions.Def_CircleMethod_char
import Mathlib.Algebra.BigOperators.Group.Finset.Basic

namespace CircleMethod

/-- The Weyl sum of degree `k`: `weylSum k α N = ∑_{0 ≤ x < N} e(α x^k)`. -/
noncomputable def weylSum (k : ℕ) (α : ℝ) (N : ℕ) : ℂ :=
  ∑ x ∈ Finset.range N, e (α * (x : ℝ) ^ k)

end CircleMethod
Source
R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., Cambridge Tracts in Mathematics 125, Cambridge University Press, 1997, Section 2.1 (Weyl sums) and Chapter 4 (Waring's problem); H. Weyl, Ueber die Gleichverteilung von Zahlen mod. Eins, Mathematische Annalen 77 (1916), 313-352.

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