Polynomials as lists of their low coefficients #
Mathlib's Polynomial.ofCoeffList builds a polynomial from its coefficients, the constant
coefficient first. This file evaluates such a polynomial by Horner's rule on the list
(Polynomial.evalCoeffList), bounds its degree by the length of the list less one, lists the first
n coefficients of a polynomial (Polynomial.coeffsBelow), which give the polynomial back when
its degree is less than n. An interactive verifier receives polynomials in this form.
Main definitions #
Polynomial.evalCoeffList: Horner evaluation of a coefficient list.Polynomial.coeffsBelow: the coefficients ofX ^ 0, …,X ^ (n - 1).
Main results #
Polynomial.eval_ofCoeffList: evaluation is Horner's rule.Polynomial.natDegree_ofCoeffList_le: the degree is at most the length of the list less one.Polynomial.ofCoeffList_coeffsBelow: low coefficients determine a polynomial of small degree.
The value at z of the polynomial with coefficient list l, the constant coefficient first,
by Horner's rule.
Instances For
The empty coefficient list evaluates to 0.
Horner's step: a :: l evaluates to a + z * evalCoeffList z l.
The value of the polynomial with coefficient list l is given by Horner's rule.
The polynomial with coefficient list l has degree at most l.length - 1.
The coefficients of X ^ 0, …, X ^ (n - 1) of a polynomial, in this order.
Instances For
coeffsBelow P n has length n.
The first n coefficients of a polynomial of degree less than n give the polynomial back.