Adapted from Charlie Dorsey’s Apache-2.0 Weil Bounds Toolkit for Lean Pool’s module system, Mathlib version, quality requirements and compilation performance.
Finite-field and Dickson-polynomial algebra #
The finite-field notation, elementary Kloosterman sums and Dickson-polynomial identities used in the Carlitz recurrence. See Carlitz (1969) for the method.
The prime residue ring used as the base field when p is prime.
Equations
Instances For
Polynomials over the prime residue ring.
Equations
Instances For
Base-field one-parameter Kloosterman sum in the source-normalized sign convention.
Equations
- KloostermanWeil.Dickson.baseKloosterman p t = ∑ x : KloostermanWeil.Dickson.Fp p, if x = 0 then 0 else ZMod.stdAddChar (x + t * x⁻¹)
Instances For
Carlitz's multiplicative polynomial weight, specialized to K(1,t). It is only used on monic polynomials; the zero-constant case is extended by zero.
Equations
- KloostermanWeil.Dickson.etaPoly p t f = if (Polynomial.coeff f) 0 = 0 then 0 else ZMod.stdAddChar (-Polynomial.nextCoeff f - t * ((Polynomial.coeff f) 1 / (Polynomial.coeff f) 0))
Instances For
Canonical monic polynomial with prescribed lower coefficients.
Equations
- KloostermanWeil.Dickson.monicFromCoeffs p n a = Polynomial.X ^ n + ∑ i : Fin n, Polynomial.C (a i) * Polynomial.X ^ ↑i
Instances For
The degree-n coefficient sum in the Carlitz L-polynomial.
Equations
- KloostermanWeil.Dickson.A p t n = ∑ a : Fin n → KloostermanWeil.Dickson.Fp p, KloostermanWeil.Dickson.etaPoly p t (KloostermanWeil.Dickson.monicFromCoeffs p n a)
Instances For
Degree one coefficient is the base Kloosterman sum.
The index of the final lower coefficient of a positive-degree monic polynomial.
Equations
- KloostermanWeil.Dickson.lastIndex n hn = ⟨n - 1, ⋯⟩