Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Second moment of a Weyl sum: ∫01∣S∣2=N\int_0^1|S|^2=N∫01​∣S∣2=N

Proved
CircleMethod.moment_two

by tabbott · Sep 2, 2026 · Mathlib c5ea003 (Lean v4.30.0)

analytic-number-theorycircle-methodnumber-theorywaring-problem

The second moment of a Weyl sum of degree k≥1k\ge1k≥1 is exactly the length:

∫01∣∑x<Ne(θxk)∣2dθ  =  N.\int_0^1\left|\sum_{x<N}e(\theta x^{k})\right|^{2}d\theta\;=\;N.∫01​​x<N∑​e(θxk)​2dθ=N.

By orthogonality the integral counts pairs (x,y)∈[0,N)2(x,y)\in[0,N)^2(x,y)∈[0,N)2 with xk=ykx^{k}=y^{k}xk=yk, and since t↦tkt\mapsto t^{k}t↦tk is injective on the natural numbers for k≥1k\ge1k≥1, only the diagonal survives. Exact, with no error term and no ε\varepsilonε.

This is the base case j=1j=1j=1 of Hua's inequality ∫01∣S∣2j≪N2j−j+ε\int_0^1|S|^{2^{j}}\ll N^{2^{j}-j+\varepsilon}∫01​∣S∣2j≪N2j−j+ε, and it is the trivial instance of the mean-value estimates on which the minor-arc analysis rests.

Preamble
import Definitions.Def_CircleMethod_waring
import Definitions.Def_CircleMethod_weylsum
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.NumberTheory.Divisors
import Mathlib.Data.Fintype.Pi
open Finset
Formal statement
namespace CircleMethod

theorem moment_two {k : ℕ} (hk : 1 ≤ k) (N : ℕ) :
    (∫ θ in (0:ℝ)..1, ‖∑ x ∈ range N, e (θ * (x : ℝ) ^ k)‖ ^ 2) = (N : ℝ) := by sorry

end CircleMethod
Source
L.-K. Hua, On Waring's problem, Quarterly Journal of Mathematics 9 (1938), 199-202; R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., Cambridge Tracts in Mathematics 125, Cambridge University Press, 1997, Lemma 2.5 (the case j = 1).

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