The packed F₂[x] representation is a Mathlib commutative ring, with the
executable packed operations.
The Euclidean rank of a packed polynomial. Zero has rank zero and a nonzero polynomial has rank one greater than its degree.
Instances For
The packed F₂[x] representation is a Euclidean domain whose quotient and
remainder are the executable long-division operations from hex-gf2.
Equations
- One or more equations did not get rendered due to their size.
The gcd-domain interface uses the packed executable gcd, not Mathlib's separate recursive Euclidean-domain implementation.
Mathlib's gcd operation on packed polynomials is definitionally the
executable hex-gf2 gcd.
Mathlib's recursive Euclidean gcd agrees with the executable packed gcd.
Over F₂[x], mutual divisibility determines equality because 1 is the only
unit.
The packed single-word quotient is a Mathlib field, with its executable
core operations retained. Its positive extension degree is part of the type,
so unlike GF2nPoly it needs no extra nontriviality hypothesis.
Equations
- HexGF2Mathlib.GF2n.field = Field.ofMinimalAxioms (Hex.GF2n n irr hn hn64 hirr) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
The packed quotient is a Mathlib field once the modulus is nonconstant.
The degree hypothesis is not redundant. Hex.GF2Poly.Irreducible asks that f
be nonzero with no factorization into two positive-degree parts, which the
constant 1 satisfies, and Hex.GF2nPoly 1 _ is the trivial ring where
0 = 1. Carried as a Fact so that instance synthesis can find it: a caller
with a genuine modulus supplies it once, and the committed packed entries in
hex-gfq carry natDegree_pos to build it from.
Equations
- HexGF2Mathlib.GF2nPoly.field = Field.ofMinimalAxioms (Hex.GF2nPoly f hirr) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯