Documentation

CslibFrontier.Foundations.FieldTheory.Finite.BinaryFieldTable

Multiplication tables of explicit binary fields #

The modulus is found by trial division. Remainders of powers of X give the multiplication table of the power basis, shared by hardness encodings and the powering small-bias construction.

Main definitions #

Main results #

The multiplication table of the power basis modulo the binary polynomial with coefficient list g: entry (u, v) lists the coefficients of the remainder of X ^ (u + v).

theorem Cslib.BinaryField.isMulTable_powerMulTable {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {l : List Bool} {q : ℕ} (hlen : l.length = q) (α : F) (hα : (Polynomial.aeval α) (polyOfBits (l ++ [true])) = 0) (b : Module.Basis (Fin q) (ZMod 2) F) (hb : ∀ (i : Fin q), b i = α ^ ↑i) :

Remainders of powers give a multiplication table for any power basis whose generator is a root of the supplied monic binary polynomial.

The coefficient list of the modulus of the explicit binary field of degree w.

The multiplication table of the explicit binary field of degree w.

The coefficient list of the modulus is the coefficient list of leastIrreducible w.

theorem Cslib.BinaryField.exists_modulusBits_eq {w : ℕ} (hw : w ≠ 0) :
∃ (l : List Bool), modulusBits w = l ++ [true] ∧ l.length = w

The coefficient list of the modulus has length w + 1 and ends with a one.

The binary modulus word includes the monic coefficient at index w.

The table multiplies: fieldTable w is a multiplication table of the power basis of the explicit binary field of degree w.

theorem Cslib.BinaryField.fieldOfBits_basis {w : ℕ} (hw : w ≠ 0) (a : List Bool) :
fieldOfBits (basis hw) a = (equivBits hw).symm fun (j : Fin w) => a.getD (↑j) false

The element with given coordinates in the power basis is the element with these bits.

theorem Cslib.BinaryField.fieldOfBits_ofFn {w : ℕ} (hw : w ≠ 0) (v : BitString w) :

The element with the bits of v as coordinates.

theorem Cslib.BinaryField.equivBits_fieldOfBits {w : ℕ} (hw : w ≠ 0) (a : List Bool) (j : Fin w) :
(equivBits hw) (fieldOfBits (basis hw) a) j = a.getD (↑j) false

The bits of the element with given coordinates.

The coordinates [true] are those of 1.