Documentation

HexPolyFast.CyclicRemainder

The monic polynomial x^n - 1 used for cyclic convolution.

Equations
Instances For

    The monic polynomial x^n + 1 used for negacyclic convolution.

    Equations
    Instances For
      theorem Hex.DensePoly.size_cyclicModulus {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (n : Nat) (hn : 0 < n) (hone : 1 ≠ 0) :

      Over a nontrivial ring, the positive-length cyclic modulus has size n + 1.

      theorem Hex.DensePoly.size_negacyclicModulus {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (n : Nat) (hn : 0 < n) (hone : 1 ≠ 0) :

      Over a nontrivial ring, the positive-length negacyclic modulus has size n + 1.

      theorem Hex.DensePoly.cyclicModulus_monic {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (n : Nat) (hn : 0 < n) (hone : 1 ≠ 0) :

      The positive-length cyclic modulus is monic over a nontrivial ring.

      theorem Hex.DensePoly.negacyclicModulus_monic {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (n : Nat) (hn : 0 < n) (hone : 1 ≠ 0) :

      The positive-length negacyclic modulus is monic over a nontrivial ring.

      A monomial and the monomial obtained by reducing its exponent modulo n are congruent modulo x^n - 1.

      theorem Hex.DensePoly.foldl_monomials_eq {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (p : DensePoly R) :
      List.foldl (fun (q : DensePoly R) (i : Nat) => q + monomial i (p.coeff i)) 0 (List.range p.size) = p

      Summing a polynomial's coefficient monomials reconstructs the polynomial.

      Cyclic folding preserves the residue modulo x^n - 1.

      The cyclic coefficient fold is exactly the canonical monic remainder modulo x^n - 1.

      theorem Hex.DensePoly.mulCyclic_eq_modByMonic {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : MulPlan R) (n : Nat) (hn : 0 < n) (hone : 1 ≠ 0) (a b : DensePoly R) :
      mulCyclic plan n hn a b = (a * b).modByMonic (cyclicModulus n) ⋯

      Planned cyclic multiplication is polynomial remainder modulo x^n - 1.

      A monomial and its signed exponent reduction are congruent modulo x^n + 1.

      Negacyclic folding preserves the residue modulo x^n + 1.

      The negacyclic coefficient fold is exactly the canonical monic remainder modulo x^n + 1.

      theorem Hex.DensePoly.mulNegacyclic_eq_modByMonic {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : MulPlan R) (n : Nat) (hn : 0 < n) (hone : 1 ≠ 0) (a b : DensePoly R) :
      mulNegacyclic plan n hn a b = (a * b).modByMonic (negacyclicModulus n) ⋯

      Planned negacyclic multiplication is polynomial remainder modulo x^n + 1.