Documentation

HexGF2Mathlib.Algebra

@[instance_reducible]

The packed F₂[x] representation is a Mathlib commutative ring, with the executable packed operations.

Equations

The Euclidean rank of a packed polynomial. Zero has rank zero and a nonzero polynomial has rank one greater than its degree.

Equations
Instances For
    @[instance_reducible]

    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.
    @[instance_reducible]

    The gcd-domain interface uses the packed executable gcd, not Mathlib's separate recursive Euclidean-domain implementation.

    Equations

    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.

    @[instance_reducible]
    noncomputable instance HexGF2Mathlib.GF2n.field {n : } {irr : UInt64} {hn : 0 < n} {hn64 : n < 64} {hirr : (Hex.GF2Poly.ofUInt64Monic irr n).Irreducible} :
    Field (Hex.GF2n n irr hn hn64 hirr)

    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
    @[instance_reducible]
    noncomputable instance HexGF2Mathlib.GF2nPoly.field {f : Hex.GF2Poly} {hirr : f.Irreducible} [hdeg : Fact (0 < f.natDegree)] :

    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