The zero polynomial
zero.Rd
Test for a multivariate polynomial being zero
Details
Function is.zero()
returns TRUE
if x
is indeed
the zero polynomial. It is defined as length(vars(x))==0
for
reasons of efficiency, but conceptually it returns
x==constant(0)
.
(Use constant(0)
to create the zero polynomial).
Note
I would have expected the zero polynomial to be problematic (cf the freegroup and permutations packages, where similar issues require extensive special case treatment). But it seems to work fine, which is a testament to the robust coding in the STL.
A general mvp
object is something like
{{"x" -> 3, "y" -> 5} -> 6, {"x" -> 1, "z" -> 8} -> -7}}
which would be \(6x^3y^5-7xz^8\). The zero
polynomial is just {}
. Neat, eh?