type/polynom
check for a polynomial
Calling Sequence
Parameters
Description
Examples
type(a, polynom)
type(a, polynom(d))
type(a, polynom(d, v))
a
-
any expression
d
(optional) type name for the coefficient domain
v
(optional) variable(s)
The call type(a, polynom(d, v)) checks to see if a is a polynomial in the variables v with coefficients in the domain d. A typical calling sequence is
type⁡a,polynom⁡integer,x
which tests to see if a is a polynomial in x over the integers.
The parameter v can be a single indeterminate, or can be a list or set of indeterminates. The latter case tests for a multivariate polynomial.
If v is omitted, then it is taken to be a set of all the indeterminates of type name appearing in a. Thus the function will check that a is a polynomial in all of its variables.
The domain specification d should be a type name, such as rational or algnum (algebraic number). If the domain specification is given as anything then no restriction is placed on the coefficients. If d is omitted, then it defaults to type constant.
type⁡x2+y−z,polynom
true
type⁡sin⁡x+y,polynom⁡anything,x
false
type⁡sin⁡x+y,polynom⁡anything,y
type⁡f⁡1⁢x+212,polynom
type⁡x2+y33,polynom⁡anything,x,y
type⁡x+12,polynom⁡integer
type⁡x+12,polynom⁡rational
type⁡sin⁡x2+12⁢sin⁡x,polynom⁡rational
type⁡sin⁡x2+12⁢sin⁡x,polynom⁡rational,sin⁡x
See Also
indets
polynom
type
type/constant
type/monomial
type/ratpoly
Download Help Document