Explicit binary fields of every degree #
A binary polynomial is coded by the natural number whose binary digits, least significant first,
are its coefficients (Cslib.polyOfCode). The irreducible polynomial of degree w with the least
code (Cslib.leastIrreducible) is found by exhaustive search through the 2 ^ w codes in
[2 ^ w, 2 ^ (w + 1)) (Cslib.exists_code_leastIrreducible).
Cslib.BinaryField w is the field 𝔽₂[X] / (g) for g = Cslib.leastIrreducible w. For w ≠ 0
its power basis 1, α, …, α ^ (w - 1) at the root α of g (Cslib.BinaryField.basis) encodes
its elements by w bits via an additive equivalence (Cslib.BinaryField.equivBits), so it has
2 ^ w elements (Cslib.BinaryField.card); the class of a binary polynomial of degree less than
w is encoded by its coefficients (Cslib.BinaryField.equivBits_mk). Bit strings of length
b ≤ w embed as the polynomials of degree less than b (Cslib.BinaryField.embed).
The modulus is explicit: its code is the least code of an irreducible binary polynomial of degree
w, which is computed by trial division (Cslib.AffineDisperser.leastIrreducibleCode), so the
field arithmetic is a computation on bit strings. This is why the field is the quotient
AdjoinRoot g rather than Mathlib's GaloisField 2 w: the splitting field of X ^ (2 ^ w) - X
comes with no basis. In AdjoinRoot g the power basis is the coefficient list itself, for every
degree w.
For w = 0 the modulus is X and the field has two elements; the basis and the encoding by bits
need w ≠ 0.
Main definitions #
Cslib.polyOfCode: the binary polynomial with a given code.Cslib.leastIrreducible: the irreducible binary polynomial of degreewwith the least code (Xwhenw = 0).Cslib.BinaryField: the explicit binary field of degreew.Cslib.BinaryField.basis: its power basis over𝔽₂.Cslib.BinaryField.equivBits: its additive equivalence withBitString w.Cslib.BinaryField.embed: the embedding of bit strings of lengthb ≤ w.
Main results #
Cslib.irreducible_leastIrreducible,Cslib.monic_leastIrreducible,Cslib.natDegree_leastIrreducible:leastIrreducible wis monic and irreducible, of degreewwhenw ≠ 0.Cslib.exists_code_leastIrreducible: the code ofleastIrreducible plies in[2 ^ p, 2 ^ (p + 1)), and no smaller code is irreducible of degreep.Cslib.BinaryField.card: the field has2 ^ welements.Cslib.BinaryField.equivBits_mk: the encoding of a polynomial of degree less thanwis its list of coefficients.
References #
The binary polynomial whose coefficients, from the constant term up, are the binary digits of
m, least significant first.
Instances For
Appending the bit b below the code m multiplies by X and adds the constant b.
The code m ≠ 0 gives a nonzero polynomial of degree ⌊log₂ m⌋.
The code m ≠ 0 gives a polynomial of degree ⌊log₂ m⌋.
Every binary polynomial has a code.
There is an irreducible binary polynomial of every positive degree p: the minimal polynomial
of a primitive element of 𝔽_{2 ^ p}.
The irreducible binary polynomial of degree p with the least code (X when p = 0, where no
irreducible polynomial exists).
Instances For
The least irreducible binary polynomial of degree zero is X, by the convention of
Cslib.leastIrreducible.
leastIrreducible w is irreducible for every degree w, including w = 0.
For p ≠ 0, leastIrreducible p has degree p.
The exhaustive search: leastIrreducible p is polyOfCode m for a code
2 ^ p ≤ m < 2 ^ (p + 1) such that no smaller code is irreducible of degree p.
leastIrreducible w is monic for every degree w, as every nonzero binary polynomial is.
The explicit binary field of degree w: binary polynomials modulo the irreducible
polynomial of degree w with the least code.
Instances For
The modulus is irreducible, so the quotient is a field.
The explicit binary field is a field.
The explicit binary field is finite, through its coordinates in the power basis.
Equality in the explicit binary field, decided classically.
The explicit binary field has characteristic two.
The power basis 1, α, …, α ^ (w - 1) at the root α of the modulus, for w ≠ 0.
Instances For
The basis vector i is the power α ^ i of the root.
The encoding by bits: the w coordinates in the power basis, for w ≠ 0, as an additive
equivalence BinaryField w ≃+ BitString w.
Instances For
Bit j of an element is its coordinate j in the power basis.
The explicit binary field of degree w ≠ 0 has 2 ^ w elements.
The encoding of the class of a binary polynomial of degree less than w is its list of
coefficients.
The embedding of bit strings of length b ≤ w: a bit string is the polynomial with these
coefficients, padded with zeros to length w.