Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Weyl differencing: ∣S∣2|S|^2∣S∣2 as a difference sum

Proved
CircleMethod.weyl_squaring

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

analytic-number-theorycircle-methodexponential-sumsnumber-theory

The opening move of Weyl differencing. For any real-valued function φ\varphiφ on the natural numbers and any NNN,

(∑x=0N−1e(φ(x)))(∑x=0N−1e(φ(x)))‾  =  ∑x=0N−1∑y=0N−1e(φ(x)−φ(y)).\left(\sum_{x=0}^{N-1}e(\varphi(x))\right)\overline{\left(\sum_{x=0}^{N-1}e(\varphi(x))\right)} \;=\; \sum_{x=0}^{N-1}\sum_{y=0}^{N-1} e\bigl(\varphi(x)-\varphi(y)\bigr).(x=0∑N−1​e(φ(x)))(x=0∑N−1​e(φ(x)))​=x=0∑N−1​y=0∑N−1​e(φ(x)−φ(y)).

The left-hand side is ∣S∣2|S|^2∣S∣2 for SSS the exponential sum; the right-hand side replaces the phase φ\varphiφ by its differences. When φ\varphiφ is a polynomial of degree kkk, substituting y=x+hy=x+hy=x+h makes the inner phase φ(x+h)−φ(x)\varphi(x+h)-\varphi(x)φ(x+h)−φ(x) a polynomial of degree k−1k-1k−1 in xxx for each fixed hhh. Iterating the manoeuvre k−1k-1k−1 times reduces a degree-kkk Weyl sum to linear sums, which the geometric bound ∣∑x<Ne(xθ)∣≤min⁡ ⁣(N,12∥θ∥)\left|\sum_{x<N}e(x\theta)\right|\le\min\!\left(N,\frac{1}{2\|\theta\|}\right)​∑x<N​e(xθ)​≤min(N,2∥θ∥1​) already controls. Each squaring costs a square root in the final estimate, which is the origin of the exponent 21−k2^{1-k}21−k in Weyl's inequality.

Formalization Note. Stated as an equation in C\mathbb{C}C between SS‾S\overline{S}SS and the double sum, rather than in R\mathbb{R}R using ∣S∣2|S|^2∣S∣2, so that it can be chained with other complex identities without casting. No hypotheses on φ\varphiφ or NNN; the case N=0N=0N=0 gives 0=00=00=0.

Preamble
import Definitions.Def_CircleMethod_genfun
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
import Mathlib.NumberTheory.Divisors
import Mathlib.Data.Fintype.Pi
open Finset
Formal statement
namespace CircleMethod

theorem weyl_squaring (φ : ℕ → ℝ) (N : ℕ) :
    (∑ x ∈ Finset.range N, e (φ x)) * (starRingEnd ℂ) (∑ x ∈ Finset.range N, e (φ x))
      = ∑ x ∈ Finset.range N, ∑ y ∈ Finset.range N, e (φ x - φ y) := by sorry

end CircleMethod
Source
R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., 1997, Section 2.2, opening of the proof of Lemma 2.3 (the Weyl differencing / squaring step).

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