2 is prime, the characteristic fact both packed correspondences need to
name the generic field over F_2. Stated once here rather than inside each
namespace, since the two copies were identical.
2 is a prime modulus, so Hex.ZMod64 2 is a field and the generic
quotient-field construction applies to Hex.FpPoly 2.
The packed irreducible modulus viewed inside the generic FpPoly 2
representation.
Equations
Instances For
The generic FpPoly 2 modulus inherits positive degree from the packed
single-word modulus, whose degree is the fixed extension degree n > 0.
Packed irreducibility transports across the GF2Poly ≃+* FpPoly 2
conversion layer.
The generic finite-field model corresponding to the packed single-word
GF(2^n) wrapper.
Equations
Instances For
Interpret a packed single-word field element inside the generic quotient field model.
Equations
Instances For
Repack the canonical representative of a generic quotient-field element as a
single-word GF(2^n) element.
Equations
Instances For
Embedding a single-word element in the generic model and repacking recovers
it: the packed val is already the canonical representative.
Repacking a generic element and re-embedding recovers it: the round trip loses nothing because both sides store the same reduced residue.
The single-word embedding is additive: packed XOR-then-reduce agrees with
addition in the generic quotient field.
The single-word embedding is multiplicative: the packed carry-less multiply-then-reduce agrees with multiplication in the generic quotient field.
The packed single-word field wrapper is ring-equivalent to the generic finite-field construction over the transported modulus.
Equations
- HexGF2Mathlib.GF2n.equiv = { toFun := HexGF2Mathlib.GF2n.toGeneric, invFun := HexGF2Mathlib.GF2n.ofGeneric, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯ }
Instances For
Single-word packed field elements are indexed by their bounded canonical word representatives.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
A single-word GF(2^n) has 2 ^ n elements, read off the val bound
rather than transported across the ring equivalence.
Reduced packed representatives modulo f, isolated from the field wrapper
so Mathlib-side finite support can be transported before the final public
GF2nPoly cardinality statements are proved.
Equations
Instances For
The executable packed quotient wrapper is exactly the reduced-representative subtype used for finite support.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encode a reduced packed representative as a bounded binary index.
Equations
Instances For
Decode a bounded binary index into the corresponding reduced packed representative.
Equations
Instances For
Decoding a bounded index and re-encoding it returns the index.
Encoding a reduced representative and decoding it returns the representative.
Reduced packed representatives are equivalent to the finite binary index space determined by the modulus degree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The packed irreducible modulus viewed inside the generic FpPoly 2
representation.
Instances For
The generic FpPoly 2 modulus inherits positive degree from the packed
modulus, which carries it as the explicit hypothesis hdeg : 0 < f.natDegree.
This positivity is not derivable from hirr alone: Hex.GF2Poly.Irreducible
(HexGF2/Euclid.lean:57) is f ≠ 0 ∧ ∀ a b, a * b = f → a.natDegree = 0 ∨ b.natDegree = 0, which admits the unit f = 1 (its only factorisations
1 = 1 * 1 have both factors of degree 0), and toFpPoly 1 = 1 has degree 0.
Throughout HexGF2, positive degree is taken from a separate hypothesis, never
from irreducibility. So the arbitrary-degree wrapper requires 0 < f.natDegree
exactly as the single-word GF2n wrapper requires hn : 0 < n above; the
toFpPoly transport preserves it via degree?_toFpPoly.
Packed irreducibility transports across the GF2Poly ≃+* FpPoly 2
conversion layer.
The generic finite-field model corresponding to the packed arbitrary-degree
GF(2^n) wrapper.
Equations
Instances For
Interpret a packed quotient-field element inside the generic quotient field model.
Equations
Instances For
Repack the canonical representative of a generic quotient-field element as a
packed GF(2^n) residue.
Equations
Instances For
FpPoly.degree of a transported packed polynomial equals its packed degree.
Reduction-compatibility bridge. Packed remainder reduction modulo f
transports across the GF2Poly ≃+* FpPoly 2 conversion layer to the generic
quotient-ring reduction GFqRing.reduceMod. This is the missing transport that
lets the GF2nPoly quotient round-trip / add / mul obligations follow from the
already-proved packed-level ring equivalence.
Equality of generic finite-field elements from equality of canonical representatives.
The canonical representative of a packed element embedded into the generic
model is simply its packed value, transported to FpPoly 2.
Embedding a packed residue in the generic model and repacking recovers it:
the packed value is already reduced modulo f.
Repacking a generic element and re-embedding recovers it.
The packed-quotient embedding is additive.
The packed-quotient embedding is multiplicative.
The packed arbitrary-degree field wrapper is ring-equivalent to the generic finite-field construction over the transported modulus.
Equations
- HexGF2Mathlib.GF2nPoly.equiv = { toFun := HexGF2Mathlib.GF2nPoly.toGeneric, invFun := HexGF2Mathlib.GF2nPoly.ofGeneric, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯ }
Instances For
Packed arbitrary-degree field elements are indexed by reduced packed representatives below the modulus degree.
Equations
Instances For
The packed quotient by f has 2 ^ deg f elements, counted through its
reduced-representative subtype.