Documentation

Complexitylib.Encoding.BitPolynomial.BlockEval.Defs

Horner evaluation of flat binary coefficient blocks #

Block j consists of at most width bits beginning at j*width, with absent bits interpreted as zero by the polynomial codec. Blocks occur in increasing polynomial degree. The count-list fold processes them from highest to lowest using the index total - tail.length - 1.

Every state has the modulus degree in bits. A zero modulus explicitly gives an empty state, and a zero count starts from the zero polynomial. The encoded evaluator reads pair (pair (pair coeffs widthWord) (pair seed modulus)) count; width and count are the lengths of their runtime words.

A coefficient block, with missing high coefficients implicitly equal to zero.

Equations
Instances For
    def Complexity.BitPolynomial.blockEvalStep (coefficient seed modulus state : List Bool) :

    One Horner step, guarded to return the empty list for a zero modulus.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Complexity.BitPolynomial.blockEvalScan (coeffs : List Bool) (width : ℕ) (seed modulus : List Bool) (total : ℕ) :

      A tail-first fold visiting coefficient indices total-1, total-2, and so on. The partial-fold semantic invariant requires the count length to be at most total.

      Equations
      Instances For
        def Complexity.BitPolynomial.blockEvalBits (coeffs : List Bool) (width : ℕ) (seed modulus count : List Bool) :

        Evaluate exactly as many coefficient blocks as there are bits in count.

        Equations
        Instances For

          The total paired-input evaluator for a flat sequence of binary coefficient blocks.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For