Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Prime-side generating functions of the circle method

Definition
Vino_primes

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

analytic-number-theorycircle-methodnumber-theoryprime-numbers

Three objects underlie the prime side of the Hardy--Littlewood circle method.

The von Mangoldt exponential sum

S(α,N)=∑n<NΛ(n) e(αn),e(θ)=exp⁡(2πiθ),S(\alpha,N)=\sum_{n<N}\Lambda(n)\,e(\alpha n),\qquad e(\theta)=\exp(2\pi i\theta),S(α,N)=n<N∑​Λ(n)e(αn),e(θ)=exp(2πiθ),

is the generating function whose cube has nnn-th Fourier coefficient equal to the weighted number of representations of nnn as a sum of three prime powers. Weighting by the von Mangoldt function Λ\LambdaΛ rather than by the indicator of the primes is what makes the arithmetic in the major arcs come out in closed form.

The prime exponential sum

T(α,N)=∑p<Np primee(αp)T(\alpha,N)=\sum_{\substack{p<N\\ p\ \mathrm{prime}}}e(\alpha p)T(α,N)=p<Np prime​∑​e(αp)

is the unweighted variant, which is what one estimates when counting primes rather than prime powers.

Finally Chebyshev's function ψ(N)=∑n<NΛ(n)\psi(N)=\sum_{n<N}\Lambda(n)ψ(N)=∑n<N​Λ(n) is the value of SSS at the origin, and therefore the normalisation against which every cancellation estimate for SSS is measured.

All three are indexed by n < N rather than n ≤ N, matching Lean's Finset.range.

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

namespace Vino

/-- The von Mangoldt exponential sum `S(α, N) = ∑_{n < N} Λ(n) e(αn)`, the
prime-side generating function of the circle method. -/
noncomputable def vmSum (α : ℝ) (N : ℕ) : ℂ :=
  ∑ n ∈ Finset.range N,
    ((ArithmeticFunction.vonMangoldt n : ℝ) : ℂ) * CircleMethod.e (α * (n : ℝ))

/-- The unweighted prime exponential sum `∑_{p < N, p prime} e(αp)`. -/
noncomputable def primeSum (α : ℝ) (N : ℕ) : ℂ :=
  ∑ p ∈ (Finset.range N).filter Nat.Prime, CircleMethod.e (α * (p : ℝ))

/-- Chebyshev's function `ψ(N) = ∑_{n < N} Λ(n)`. -/
noncomputable def psi (N : ℕ) : ℝ :=
  ∑ n ∈ Finset.range N, (ArithmeticFunction.vonMangoldt n : ℝ)

end Vino
Source
R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., Cambridge Tracts in Mathematics 125, Cambridge University Press, 1997, Chapter 3, Section 3.1 (the exponential sum over primes and its von Mangoldt weighting).

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