Documentation

CslibFrontier.Foundations.FieldTheory.Finite.BinaryFieldArithmetic

Table-free multiplication in explicit binary fields #

Multiplication scans one operand's coefficient word, shifting the other modulo the supplied polynomial and accumulating the product. Both live words have the degree of the modulus at every scan boundary, by Cslib.modMulBits_spec.

Main definitions #

Main results #

Search for the modulus in code order using a candidate and a trial divisor counter, without allocating lists of candidates or divisors.

The outer search uses the same degree and irreducibility predicate as the modulus specification. A native irreducibility test can therefore supply the predicate directly.

The counter scan selects exactly the modulus used by the table-based evaluator.

Multiply coordinate words using the supplied modulus bits, with zero padding or truncation to its degree. A caller can reuse the same modulus across many products.

@[simp]

The product always has the supplied modulus's coordinate width.

The table-free algorithm computes multiplication in the same power basis as fieldMul (fieldTable w).