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 c5ea003 (Lean v4.30.0)

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.
Read-back

What the Lean code literally says, in plain math · claude-opus-5

Read-back: weyl_inequality_deg_two

What the declaration asserts. Fix a real number ε\varepsilonε (supplied implicitly) and assume ε>0\varepsilon > 0ε>0. The statement then claims the existence of a real constant CCC with C>0C > 0C>0 such that the following holds for every choice of a natural number NNN, a natural number qqq, an integer aaa, and real numbers α\alphaα and β\betaβ:

if

  • N>0N > 0N>0,
  • q>0q > 0q>0,
  • gcd⁡(∣a∣,q)=1\gcd(|a|, q) = 1gcd(∣a∣,q)=1 (the coprimality is asserted between the natural-number absolute value of aaa and qqq), and
  • ∣α−aq∣≤1q2\displaystyle \left| \alpha - \frac{a}{q} \right| \le \frac{1}{q^{2}}​α−qa​​≤q21​ (a non-strict inequality, with the quotient a/qa/qa/q formed in the reals),

then

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

Meaning of the symbols. The function eee is the bundle's own additive character, defined by

e(θ)  =  exp⁡ ⁣(2πi θ)(θ∈R),e(\theta) \;=\; \exp\!\left( 2\pi i\,\theta \right) \qquad (\theta \in \mathbb{R}),e(θ)=exp(2πiθ)(θ∈R),

a complex-valued function of a real argument. The summation index xxx ranges over the finite set {0,1,…,N−1}\{0, 1, \dots, N-1\}{0,1,…,N−1} (the first NNN natural numbers, starting at 000 and excluding NNN); each such xxx is cast to a real number before being squared and multiplied by α\alphaα, so the summand is e(αx2+βx)e(\alpha x^{2} + \beta x)e(αx2+βx) and the sum is a complex number. The double-bar ∥⋅∥\|\cdot\|∥⋅∥ is the norm on C\mathbb{C}C, i.e. the complex modulus. On the right-hand side, N1+εN^{1+\varepsilon}N1+ε and the outer exponent 1/21/21/2 are real-exponent powers of the real numbers NNN and 1q+1N+qN2\tfrac{1}{q} + \tfrac{1}{N} + \tfrac{q}{N^{2}}q1​+N1​+N2q​ respectively, while the exponents 222 occurring in q2q^{2}q2, x2x^{2}x2 and N2N^{2}N2 are natural-number exponents. All of NNN, qqq, aaa appear on the right-hand side and in the hypotheses cast into R\mathbb{R}R.

Quantifier structure and dependencies. The constant CCC is chosen after ε\varepsilonε but before NNN, qqq, aaa, α\alphaα, β\betaβ: a single CCC must serve uniformly for all admissible tuples (N,q,a,α,β)(N, q, a, \alpha, \beta)(N,q,a,α,β), and CCC may depend on ε\varepsilonε. Existence of CCC is asserted, not uniqueness, and no explicit value or upper bound for CCC is given; CCC is only required to be positive. The claim is an implication, not an equivalence.

Scope of the hypotheses, and what is not assumed. The real number β\betaβ is entirely unconstrained — no relation whatsoever is imposed between β\betaβ and α\alphaα, aaa, qqq, or NNN. No relation is imposed between qqq and NNN (in particular qqq is not required to satisfy q≤Nq \le Nq≤N, nor N≤qN \le qN≤q, nor anything of the kind), so the case qqq enormously larger than NNN is included, as is q=1q = 1q=1. There is no upper bound on ε\varepsilonε: it may be arbitrarily large as well as arbitrarily small, provided it is positive. The integer aaa may be negative or zero; the coprimality condition is stated for ∣a∣|a|∣a∣, so it is insensitive to the sign of aaa, and when a=0a = 0a=0 it forces q=1q = 1q=1. The positivity assumptions N>0N > 0N>0 and q>0q > 0q>0 ensure the divisions a/qa/qa/q, 1/q21/q^{2}1/q2, 1/q1/q1/q, 1/N1/N1/N and q/N2q/N^{2}q/N2 are all divisions by nonzero reals, so no junk value from division by zero arises; correspondingly the sum is over a nonempty index set, and when N=1N = 1N=1 it consists of the single term e(0)=1e(0) = 1e(0)=1. The base 1q+1N+qN2\tfrac{1}{q} + \tfrac{1}{N} + \tfrac{q}{N^{2}}q1​+N1​+N2q​ of the outer power is strictly positive under these hypotheses. The Diophantine hypothesis ∣α−a/q∣≤1/q2|\alpha - a/q| \le 1/q^{2}∣α−a/q∣≤1/q2 is satisfiable for every q>0q > 0q>0 (for instance by α=a/q\alpha = a/qα=a/q itself), so the universally quantified implication is not vacuous.

Definitions in scope but unused. The bundle also brings into scope the generating function f(A,θ)=∑a∈Ae(aθ)f(A, \theta) = \sum_{a \in A} e(a\theta)f(A,θ)=∑a∈A​e(aθ) for a finite set A⊆ZA \subseteq \mathbb{Z}A⊆Z, and the distance-to-nearest-integer function nrm(θ)=∣θ−round(θ)∣\mathrm{nrm}(\theta) = |\theta - \mathrm{round}(\theta)|nrm(θ)=∣θ−round(θ)∣. Neither of these appears in the statement being read back; the only bundle definition it uses is the character eee.

Proof status. The declaration is stated with its proof left as an unfilled placeholder; no proof is provided.

Human review
  • Endorsed by tianyipeng · Sep 2, 2026

  • Endorsed by tabbott · Sep 2, 2026

    Confirmed by the mission captain (proposal self-audit).

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