Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exponential generating function fA(θ)=∑a∈Ae(aθ)f_A(\theta)=\sum_{a\in A}e(a\theta)fA​(θ)=∑a∈A​e(aθ)

Definition
CircleMethod_genfun

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

analytic-number-theorycircle-methodgenerating-functionsnumber-theory

Given a finite set A⊆ZA\subseteq\mathbb{Z}A⊆Z, its exponential generating function is

fA(θ)  =  ∑a∈Ae(aθ),e(θ)=exp⁡(2πiθ).f_A(\theta) \;=\; \sum_{a\in A} e(a\theta), \qquad e(\theta)=\exp(2\pi i\theta).fA​(θ)=a∈A∑​e(aθ),e(θ)=exp(2πiθ).

This is the central object of the Hardy--Littlewood circle method. It is a trigonometric polynomial whose coefficients record the indicator function of AAA, and it linearises addition: the sss-th power fA(θ)sf_A(\theta)^sfA​(θ)s expands as ∑(a1,…,as)∈Ase ⁣((a1+⋯+as)θ)\sum_{(a_1,\dots,a_s)\in A^s} e\!\left((a_1+\cdots+a_s)\theta\right)∑(a1​,…,as​)∈As​e((a1​+⋯+as​)θ), so that the coefficient of e(nθ)e(n\theta)e(nθ) counts representations of nnn as a sum of sss elements of AAA. Combined with the orthogonality relation ∫01e(mθ) dθ=[ m=0 ]\int_0^1 e(m\theta)\,d\theta=[\,m=0\,]∫01​e(mθ)dθ=[m=0] this yields

∫01fA(θ)s e(−nθ) dθ  =  #{(a1,…,as)∈As:a1+⋯+as=n}.\int_0^1 f_A(\theta)^s\, e(-n\theta)\,d\theta \;=\; \#\{(a_1,\dots,a_s)\in A^s : a_1+\cdots+a_s=n\}.∫01​fA​(θ)se(−nθ)dθ=#{(a1​,…,as​)∈As:a1​+⋯+as​=n}.

The method proceeds by estimating this integral: on the major arcs, where θ\thetaθ is close to a rational with small denominator, fAf_AfA​ is large and admits an asymptotic evaluation; on the minor arcs it is small and contributes an error term.

Formalization Note. AAA is a Finset of integers, so fAf_AfA​ is a finite sum and no convergence hypotheses are needed. Taking A={xk:0≤x<N}A = \{x^k : 0 \le x < N\}A={xk:0≤x<N} recovers the Weyl sum relevant to Waring's problem.

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

namespace CircleMethod

/-- The exponential generating function of a finite set `A` of integers:
`f A θ = ∑_{a ∈ A} e(aθ)`. -/
noncomputable def f (A : Finset ℤ) (θ : ℝ) : ℂ := ∑ a ∈ A, e ((a : ℝ) * θ)

end CircleMethod
Source
R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., Cambridge Tracts in Mathematics 125, Cambridge University Press, 1997, Section 1.1, equation (1.3) (the generating function of the circle method).

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