Adapted from Charlie Dorsey’s Apache-2.0 Weil Bounds Toolkit for Lean Pool’s module system, Mathlib version, quality requirements and compilation performance.
Counting points on a hyperelliptic curve #
Relates points on y² = f(x) to quadratic-character sums and square/nonsquare fibers.
Compare Harcos (2015), equations (11)–(12), and Stepanov (1972).
The finite set of affine points on y² = f(x).
Equations
- KloostermanWeil.Stepanov.hyperellipticAffinePointFinset f = {z : F × F | z.2 ^ 2 = Polynomial.eval z.1 f}
Instances For
Fiber decomposition of the affine point count.
The affine point count is q + ∑ χ(f(x)).
Inputs on which the quadratic character has the specified integer value.
Equations
- KloostermanWeil.Stepanov.quadraticValueFinset f a = {x : F | (quadraticChar F) (Polynomial.eval x f) = a}
Instances For
A quadratic-character sum is the number of square inputs minus the number of nonsquare inputs.
Exact square-versus-nonsquare form of the affine point-count defect, equation (12) in the Stepanov proof.
Euler's criterion in the exact exponent convention used by the Stepanov auxiliary polynomial.
The nonsquare half of Euler's criterion in the Stepanov exponent convention.
The union of the zero-character fiber and one prescribed character
fiber, denoted N₀ + Nₐ in the source.
Equations
- KloostermanWeil.Stepanov.quadraticZeroOrValueFinset f a = {x : F | (quadraticChar F) (Polynomial.eval x f) = 0 ∨ (quadraticChar F) (Polynomial.eval x f) = a}
Instances For
The same source fiber in the power-value convention consumed by the Stepanov auxiliary polynomial.
Equations
- KloostermanWeil.Stepanov.stepanovValueFinset f a = {x : F | Polynomial.eval x f = 0 ∨ Polynomial.eval x f ^ ((Fintype.card F - 1) / 2) = a}
Instances For
The exact disjoint-cardinality decomposition #(N₀ ∪ Nₐ)=N₀+Nₐ.
Euler's criterion identifies the source N₀+N₁ fiber with the
power-value set used in equation (14).
The analogous Euler-criterion bridge for the N₀+N₋₁ fiber.
The three quadratic-character fibers partition the finite field.