Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Completing the square in a quadratic exponential sum

Proved
Weil.sum_addChar_quadratic

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

exponential-sumsfinite-fieldsgauss-sumsnumber-theoryweil-bound

Let FFF be a finite field of characteristic ≠2\ne 2=2, let ψ\psiψ be an additive character of FFF valued in C\mathbb{C}C, and let a,b,c∈Fa, b, c \in Fa,b,c∈F with a≠0a \ne 0a=0. Then

∑x∈Fψ(ax2+bx+c)=ψ ⁣(c−b24a)∑x∈Fψ(ax2).\sum_{x \in F} \psi(a x^2 + bx + c) = \psi\!\left(c - \frac{b^2}{4a}\right) \sum_{x \in F} \psi(a x^2).x∈F∑​ψ(ax2+bx+c)=ψ(c−4ab2​)x∈F∑​ψ(ax2).

The substitution x↦x−b/(2a)x \mapsto x - b/(2a)x↦x−b/(2a) is a bijection of FFF and turns the general quadratic into a pure square plus the constant c−b2/(4a)c - b^2/(4a)c−b2/(4a); that constant leaves the modulus unchanged. The hypothesis on the characteristic is needed for 222 (hence 444) to be invertible.

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 sum_addChar_quadratic : ∀ {F : Type u_1} [inst : Field F] [inst_1 : Fintype F] (ψ : AddChar F ℂ), ringChar F ≠ 2 → ∀ {a : F}, a ≠ 0 → ∀ (b c : F), ∑ x : F, (ψ : F → ℂ) (a * x ^ 2 + b * x + c) = (ψ : F → ℂ) (c - b ^ 2 / (4 * a)) * ∑ x : F, (ψ : F → ℂ) (a * x ^ 2) := by sorry
end Weil
Source
Lidl & Niederreiter, Finite Fields, 2nd ed., Cambridge, Ch. 5 (Exponential Sums), Theorems 5.4, 5.11, 5.15, 5.30, 5.38

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