Documentation

HexMvPoly.KernelResidue

Modular addition of coefficients.

Equations
Instances For

    Modular multiplication of coefficients.

    Equations
    Instances For

      Negation by multiplication by the residue of -1. Pattern matching on the modulus keeps the coefficient path within natural addition, multiplication, modulus, and structural recursion.

      Equations
      Instances For

        Merge canonical residue lists, reducing every coefficient collision.

        Equations
        Instances For

          Multiply translated rows with modular products and balanced modular merges.

          Equations
          Instances For

            Negate residue coefficients and remove zero results.

            Equations
            Instances For

              Multiply by an arbitrary natural-number scalar modulo the modulus.

              Equations
              Instances For

                Subtraction of canonical residue lists.

                Equations
                Instances For

                  Canonical exponents and nonzero coefficients strictly below the modulus.

                  Equations
                  Instances For

                    Check canonical form and the residue bound on untrusted certificate data.

                    Equations
                    Instances For

                      The Boolean check is equivalent to canonical residue form.

                      The multiplicative identity, including the trivial residue ring.

                      Equations
                      Instances For

                        The modular identity is canonical for every modulus.

                        theorem Hex.MvPoly.Kernel.addMod_canonical (p : Nat) {n : Nat} {a b : PolyList Nat} (ha : CanonicalMod p n a) (hb : CanonicalMod p n b) :
                        CanonicalMod p n (addMod p a b)

                        Modular addition preserves canonical residue form for every modulus.

                        theorem Hex.MvPoly.Kernel.mulMod_canonical (p : Nat) {n : Nat} {a b : PolyList Nat} (ha : CanonicalMod p n a) (hb : CanonicalMod p n b) :
                        CanonicalMod p n (mulMod p a b)

                        Modular multiplication preserves canonical residue form for every modulus.

                        theorem Hex.MvPoly.Kernel.negMod_canonical (p : Nat) {n : Nat} {a : PolyList Nat} (ha : CanonicalMod p n a) :

                        Modular negation preserves canonical residue form for every modulus.

                        theorem Hex.MvPoly.Kernel.smulMod_canonical (p c : Nat) {n : Nat} {a : PolyList Nat} (ha : CanonicalMod p n a) :
                        CanonicalMod p n (smulMod p c a)

                        Modular scaling preserves canonical form for every modulus and scalar.

                        theorem Hex.MvPoly.Kernel.subMod_canonical (p : Nat) {n : Nat} {a b : PolyList Nat} (ha : CanonicalMod p n a) (hb : CanonicalMod p n b) :
                        CanonicalMod p n (subMod p a b)

                        Modular subtraction preserves canonical residue form for every modulus.