Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Weyl's inequality, degree 222

Proved
CircleMethod.weyl_inequality_deg_two

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

analytic-number-theorycircle-methodexponential-sumsnumber-theory

Weyl's inequality in degree two, for a general quadratic phase. For every ε>0\varepsilon>0ε>0 there is a constant C=C(ε)C=C(\varepsilon)C=C(ε) such that whenever gcd⁡(∣a∣,q)=1\gcd(|a|,q)=1gcd(∣a∣,q)=1, q≥1q\ge1q≥1, and ∣α−aq∣≤1q2\left|\alpha-\frac{a}{q}\right|\le\frac{1}{q^{2}}​α−qa​​≤q21​,

∣∑x=0N−1e ⁣(αx2+βx)∣  ≤  C N1+ε(1q+1N+qN2)1/2,\left|\sum_{x=0}^{N-1}e\!\left(\alpha x^{2}+\beta x\right)\right|\;\le\;C\,N^{1+\varepsilon}\left(\frac{1}{q}+\frac{1}{N}+\frac{q}{N^{2}}\right)^{1/2},​x=0∑N−1​e(αx2+βx)​≤CN1+ε(q1​+N1​+N2q​)1/2,

for every real β\betaβ and every N≥1N\ge1N≥1.

This is the first genuinely non-trivial exponential sum estimate of the subject and the natural entry point to the general case. The proof requires exactly one squaring step: ∣S∣2=∑x,ye(α(x2−y2)+β(x−y))|S|^2=\sum_{x,y}e(\alpha(x^2-y^2)+\beta(x-y))∣S∣2=∑x,y​e(α(x2−y2)+β(x−y)), and writing y=x+hy=x+hy=x+h turns the phase into 2αhx+(terms independent of x)2\alpha h x+(\text{terms independent of }x)2αhx+(terms independent of x), which is linear in xxx. The geometric sum bound then gives min⁡ ⁣(N,12∥2αh∥)\min\!\left(N,\frac{1}{2\|2\alpha h\|}\right)min(N,2∥2αh∥1​) for each hhh, and summing over hhh using the rational approximation to α\alphaα produces the stated bound.

The saving is real: when qqq lies in the range Nδ≤q≤N2−δN^{\delta}\le q\le N^{2-\delta}Nδ≤q≤N2−δ the right-hand side is O(N1−δ/2+ε)O(N^{1-\delta/2+\varepsilon})O(N1−δ/2+ε), a power better than the trivial bound NNN. Outside that range the estimate is trivially true, which is intended — those are the major arcs, where the sum genuinely is of size comparable to NNN.

Formalization Note. The linear coefficient β\betaβ is unconstrained, so this is the full quadratic case, not just the pure square. The exponents 1+ε1+\varepsilon1+ε and 1/21/21/2 are real powers. The constant CCC is quantified after ε\varepsilonε and before all of N,q,a,α,βN,q,a,\alpha,\betaN,q,a,α,β; a solver must not weaken this by letting CCC depend on NNN, which would make the statement vacuous.

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_inequality_deg_two {ε : ℝ} (hε : 0 < ε) :
    ∃ C : ℝ, 0 < C ∧ ∀ (N q : ℕ) (a : ℤ) (α β : ℝ), 0 < N → 0 < q →
      Nat.Coprime a.natAbs q → |α - (a : ℝ) / (q : ℝ)| ≤ 1 / (q : ℝ) ^ 2 →
      ‖∑ x ∈ Finset.range N, e (α * (x : ℝ) ^ 2 + β * (x : ℝ))‖
        ≤ C * (N : ℝ) ^ (1 + ε) *
          ((1 / (q : ℝ) + 1 / (N : ℝ) + (q : ℝ) / (N : ℝ) ^ 2) ^ ((1 : ℝ) / 2)) := by sorry

end CircleMethod
Source
H. Weyl, Ueber die Gleichverteilung von Zahlen mod. Eins, Mathematische Annalen 77 (1916), 313-352; stated as Lemma 2.4 in R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., 1997, specialised to degree k = 2.

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