Documentation

HexModArith.Ntt.CrtInput

structure Hex.ZMod64.Ntt.CrtSelection (n bound : Nat) :

A checked catalogue selection with enough pairwise-coprime modulus product for strict symmetric reconstruction.

Instances For

    Select and validate a sufficient supported catalogue prefix.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Hex.ZMod64.Ntt.CrtSelection.moduli {n bound : Nat} (selection : CrtSelection n bound) :

      Selected moduli in the same order expected by batch CRT.

      Equations
      Instances For
        @[simp]
        theorem Hex.ZMod64.Ntt.CrtSelection.moduli_toList {n bound : Nat} (selection : CrtSelection n bound) :
        @[simp]
        theorem Hex.ZMod64.Ntt.CrtSelection.moduli_size {n bound : Nat} (selection : CrtSelection n bound) :
        selection.moduli.size = selection.primes.length
        theorem Hex.ZMod64.Ntt.CrtSelection.enough_moduli {n bound : Nat} (selection : CrtSelection n bound) :
        2 * bound < selection.moduli.toList.prod
        inductive Hex.ZMod64.Ntt.CrtMatches (reference : List Int) {n : Nat} :

        Coefficientwise congruence between a prime list and its erased residue vectors.

        Instances For
          structure Hex.ZMod64.Ntt.CrtImages {n bound : Nat} (selection : CrtSelection n bound) (left right : Array Int) :

          Erased NTT residues paired with their coefficientwise congruence proof.

          Instances For
            theorem Hex.ZMod64.Ntt.CrtMatches.length_eq {n : Nat} {reference : List Int} {primes : List NttPrime} {residues : List (Vector Int n)} (h : CrtMatches reference primes residues) :
            residues.length = primes.length
            theorem Hex.ZMod64.Ntt.CrtMatches.getElem {n : Nat} {reference : List Int} {primes : List NttPrime} {residues : List (Vector Int n)} (h : CrtMatches reference primes residues) (i : Nat) (hi : i < primes.length) (j : Fin n) :
            reference.getD (↑j) 0 % primes[i].modulus = residues[i][j] % primes[i].modulus
            def Hex.ZMod64.Ntt.CrtSelection.images? {n bound : Nat} (selection : CrtSelection n bound) (left right : Array Int) :
            Option (CrtImages selection left right)

            Run an integer convolution at every prime in a checked selection.

            Equations
            Instances For
              @[simp]
              theorem Hex.ZMod64.Ntt.CrtImages.residues_length {n bound : Nat} {selection : CrtSelection n bound} {left right : Array Int} (images : CrtImages selection left right) :
              images.residues.length = selection.primes.length
              def Hex.ZMod64.Ntt.CrtImages.residueArray {n bound : Nat} {selection : CrtSelection n bound} {left right : Array Int} (images : CrtImages selection left right) :

              Residue vectors in batch-CRT input form.

              Equations
              Instances For
                @[simp]
                theorem Hex.ZMod64.Ntt.CrtImages.residueArray_size {n bound : Nat} {selection : CrtSelection n bound} {left right : Array Int} (images : CrtImages selection left right) :
                images.residueArray.size = selection.moduli.size
                theorem Hex.ZMod64.Ntt.CrtImages.congr {n bound : Nat} {selection : CrtSelection n bound} {left right : Array Int} (images : CrtImages selection left right) (i : Fin selection.moduli.size) (j : Fin n) :
                (intPadTo n (intLinearConvolution left.toList right.toList)).getD (↑j) 0 % selection.moduli[i] = (images.residueArray.getD (↑i) (Vector.replicate n 0))[j] % selection.moduli[i]

                Each erased residue lane is congruent to the reference integer convolution at the corresponding selected modulus.