1 | initial version |
Will something like this work?
sage: is_polynomial = lambda s: all(s.is_polynomial(v) for v in s.variables())
sage: var("x y z")
(x, y, z)
sage: is_polynomial(x)
True
sage: is_polynomial(3+x+x**7)
True
sage: is_polynomial(3+x*exp(x))
False
sage: is_polynomial(3*x*y)
True
sage: is_polynomial(3*x*y+sin(y))
False