Short-index products in prime fields #
A total evaluator averages the logarithm formula over every multiplicative generator. Each sum uses a uniform short-index evaluator. No generator is selected, and the unreduced product and full powers occur only in correctness proofs. Composite moduli, including zero and one, return zero. The modulus is binary and the index width is polynomial-time unary.
Main definitions #
Cslib.Complexity.generatorCount: the number of accepted canonical generators.Cslib.Complexity.primeFieldProduct: the total generator-average product evaluator.Cslib.Complexity.primeFieldRangeProduct: a product with a binary factor count.
Main results #
Cslib.Complexity.primeFieldProduct_spec: agreement with the prime-field product.Cslib.Complexity.primeFieldRangeProduct_cast: agreement over the genuine binary indices.Cslib.Complexity.CountingFunction.prod_primeField_bits: the conservative F_(a+4) bound.
References #
- [OAI26f], Section 2, Products in a finite field. Averaging replaces the source's generator selection; the existing algebraic average theorem supplies correctness.
- The binary factor count adapts the
LeanCanny.CountingHierarchy.BinaryModularProductmodule at lean-canny commit970f28a5ecefc1327402ade16c068aa4b1b2c183.
Count canonical generators by their total Boolean test; nonprime moduli give zero.
Total product evaluator on residue factors. Its inputs contain no unreduced product.
For a prime modulus it returns the canonical product residue; for every other modulus it
returns zero, even though powMod itself has the fixed value one at modulus zero.
The accepted natural representatives count the algebraic generator set exactly.
The generator count vanishes on every nonprime modulus.
The evaluator returns a canonical residue whenever the modulus is positive.
Counting the accepted generator tests costs one level beyond the tests themselves.
The generator-average evaluator is in F_(a+3), including on every nonprime input. The strict certificates of composition and summation bound every query and intermediate output.
A binary factor count and a uniform factor evaluator add three counting function levels.
Short-index prime-field products of F_a factors lie in F_(a+4), with total zero default on every nonprime modulus. The modulus is polynomial-time binary, and width polynomial-time unary; factor, query, intermediate and output lengths follow from strict certificates. The stronger F_(a+3) bound comes from averaging rather than selecting a generator.
A same-level predicate restricts the product by replacing excluded factors with one. This includes an empty allowed domain and does not add a counting level.