theorem
Hex.DensePoly.eval_toPolynomial
{R : Type u}
[CommSemiring R]
[DecidableEq R]
(p : DensePoly R)
(x : R)
:
Horner evaluation of a dense polynomial agrees with evaluation after conversion to Mathlib's polynomial representation.
noncomputable def
Hex.DensePoly.specialize
{R : Type u}
[CommRing R]
[DecidableEq R]
(f : DensePoly (DensePoly R))
(a : R)
:
Specialize the coefficient variable of a dense bivariate polynomial while retaining its outer polynomial variable.
Equations
- f.specialize a = ∑ i ∈ Finset.range f.size, (Polynomial.monomial i) ((f.coeff i).eval a)
Instances For
@[simp]
theorem
Hex.DensePoly.coeff_specialize
{R : Type u}
[CommRing R]
[DecidableEq R]
(f : DensePoly (DensePoly R))
(a : R)
(n : ℕ)
:
Specialization evaluates each stored coefficient, with the dense zero extension supplying the coefficients outside the stored range.
@[simp]
The zero dense polynomial specializes to the zero Mathlib polynomial.
noncomputable def
Hex.DensePoly.evalBivariate
{R : Type u}
[CommRing R]
[DecidableEq R]
(f : DensePoly (DensePoly R))
(a b : R)
:
R
Evaluate a dense bivariate polynomial at (a, b).
Equations
- f.evalBivariate a b = Polynomial.eval b (f.specialize a)