Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Weil bound for ∑x mod pe((ax2+bx+c)/p)\sum_{x \bmod p} e((ax^2+bx+c)/p)∑xmodp​e((ax2+bx+c)/p), with equality

Proved
Weil.norm_sum_e_quadratic

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

exponential-sumsfinite-fieldsgauss-sumsnumber-theoryweil-bound

Quadratic exponential sums mod ppp. Let ppp be an odd prime, a,b,c∈Z/pZa, b, c \in \mathbb{Z}/p\mathbb{Z}a,b,c∈Z/pZ with a≢0a \not\equiv 0a≡0. Writing e(t)=e2πite(t)=e^{2\pi i t}e(t)=e2πit,

∣∑x mod pe ⁣(ax2+bx+cp)∣=p.\Big\lvert \sum_{x \bmod p} e\!\left(\frac{a x^2 + bx + c}{p}\right) \Big\rvert = \sqrt p.​xmodp∑​e(pax2+bx+c​)​=p​.

The Weil bound (deg⁡f−1)p(\deg f - 1)\sqrt p(degf−1)p​ is attained with equality in degree two: completing the square reduces the sum to a quadratic Gauss sum, whose modulus is exactly p\sqrt pp​.

Preamble
import Mathlib.NumberTheory.GaussSum
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum
import Mathlib.NumberTheory.MulChar.Lemmas
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.GroupTheory.Index
import Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.Complex.Basic
import Mathlib.Algebra.Field.GeomSum
import Mathlib.Algebra.Order.BigOperators.Group.Finset

set_option autoImplicit false
set_option linter.unusedSectionVars false
set_option linter.unusedVariables false

universe u_1 u_2

open AddChar MulChar Finset
Formal statement
namespace Weil
theorem norm_sum_e_quadratic : ∀ {p : ℕ} [inst : Fact (Nat.Prime p)], p ≠ 2 → ∀ {a : ZMod p}, a ≠ 0 → ∀ (b c : ZMod p), ‖∑ x : ZMod p, (ZMod.stdAddChar : ZMod p → ℂ) (a * x ^ 2 + b * x + c)‖ = √(↑p : ℝ) := by sorry
end Weil
Source
Ireland & Rosen, A Classical Introduction to Modern Number Theory, 2nd ed., Springer GTM 84, Ch. 8 (Gauss and Jacobi Sums)

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