Producer-side conversion from machine-word residues to quoted naturals.
Instances For
Interpret natural coefficients as residues. This is a semantic conversion, never part of the closed Boolean certificate computation.
Equations
- Hex.MvPoly.Kernel.toResidues p a = Hex.MvPoly.Kernel.CoeffMap.map (fun (c : Nat) => Hex.ZMod64.ofNat p c) a
Instances For
Reading back producer residues is exact, with no support assumptions.
Reading and quoting a bounded natural coefficient leaves it unchanged.
The encoding is injective on the executable coefficient carrier.
Executable canonical lists quote to canonical residue lists.
Canonical natural residues have canonical executable denotation lists.
Quoting commutes with modular addition.
Quoting commutes with modular multiplication.
Quoting commutes with scalar multiplication.
Quoting commutes with negation.
Natural scalars may be unreduced; multiplication reduces them modulo p.
Reading modular negation agrees with executable negation.
Reading the modular identity gives the executable list identity.
Semantic denotation in the executable residue polynomial ring.
Equations
Instances For
The empty residue list denotes zero.
The residue-list identity denotes the polynomial identity.
Modular addition denotes polynomial addition on canonical inputs.
Modular multiplication denotes polynomial multiplication on canonical inputs.
Modular negation denotes polynomial negation on canonical inputs.
Modular scalar multiplication denotes multiplication by a residue constant.
Modular subtraction denotes polynomial subtraction on canonical inputs.
Canonical residue lists are uniquely determined by their denotation.
The existing structural zero test is exact for canonical residue lists.
The existing structural equality test is exact for canonical residue lists.
A producer polynomial quotes to a canonical residue list.
The complete producer-to-kernel encoding round trip.