Documentation

MIPRE.Foundations.Introspection.FieldPolynomialProg

Uniform evaluation of field coefficient vectors #

Coefficients are listed in increasing degree order. The program constructs the field modulus once, then uses Horner's rule. Its ambient polynomial bound also holds on malformed inputs: every step preserves the modulus and evaluation point, and the accumulator's bit length can only decrease.

This file does not parse answers or claim correctness of the Pauli decider. It supplies the arithmetic operation needed by its two line tests.

Evaluation of a coefficient list in increasing degree order.

Equations
Instances For
    @[simp]
    theorem MIPRE.Introspection.FieldPolynomialProgram.evalCoeffs_cons {R : Type u_1} [Semiring R] (x c : R) (coeffs : List R) :
    evalCoeffs x (c :: coeffs) = evalCoeffs x coeffs * x + c
    theorem MIPRE.Introspection.FieldPolynomialProgram.evalCoeffs_ofFn {R : Type u_1} [CommSemiring R] (x : R) {n : ℕ} (f : Fin n → R) :
    evalCoeffs x (List.ofFn f) = ∑ i : Fin n, f i * x ^ ↑i

    This is the coefficient-vector evaluation used by the line-test semantics.

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

      Horner evaluation with an explicit modulus, point and initial accumulator. The initial accumulator is useful for the correctness induction; ordinary polynomial evaluation initializes it to the field's zero vector.

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

        One ambient program, uniform in both field width and coefficient count.

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

          Canonical fixed-length vectors evaluate to the expected power sum.