Kloosterman's bound for every modulus:
ProvedMathlibGap.norm_kloosterman_sum_leexponential-sumskloosterman-sumsmathlib-gapnumber-theory
For an integer and integers , the Kloosterman sum is
where and is the inverse of modulo . Let be the number of distinct prime factors of , let
be the squarefull part of , and put . Then
For squarefree this is Kloosterman's classical bound with the explicit loss . Prime moduli use when , coprime moduli split by twisted multiplicativity, and higher prime powers use the trivial bound . In Lean, is ZMod.stdAddChar on ZMod c, written as in ZMod.norm_kloosterman_sum_pow_four_le, and is written out in full.
Preamble
import Mathlib
Formal statement
namespace MathlibGap
theorem norm_kloosterman_sum_le (c : ℕ) [NeZero c] (m n : ℤ) :
‖∑ x : (ZMod c)ˣ,
ZMod.stdAddChar ((m : ZMod c) * (x : ZMod c) + (n : ZMod c) * (x : ZMod c)⁻¹)‖ ≤
(3 : ℝ) ^ ((c.primeFactors.card : ℝ) / 4) *
((∏ p ∈ c.primeFactors.filter (fun p => 2 ≤ c.factorization p),
p ^ c.factorization p : ℕ) : ℝ) ^ (1 / 4 : ℝ) *
(c : ℝ) ^ (3 / 4 : ℝ) * (Nat.gcd (Int.gcd m n) c : ℝ) ^ (1 / 4 : ℝ) := by sorry
end MathlibGapSource
H. D. Kloosterman, On the representation of numbers in the form ax^2+by^2+cz^2+dt^2, Acta Math. 49 (1926), 407-464 (the fourth-moment bound at primes), extended to every modulus by twisted multiplicativity. Built on the platform theorems ZMod.norm_kloosterman_sum_pow_four_le (7d546b74) and ZMod.kloosterman_sum_crt (5ab331bd). Formalized for Prove2Me, Lindelöf hypothesis mission, milestone 17 (fourth moment of zeta).