
degreevec - exponents of the leading term of a polynomial

Calling sequence:
degreevec(poly [ , order ])
degreevec(expr [ , indets ]  [ , order ])
indets  ---> [ expr_1 ...]

Parameter:
poly           --  polynomial
expr, expr_1   --  expressions
order          --  optionally LexOrder, DegreeOrder or DegInvLexOrder

Overloading:

1

Summary:

degreevec returns a listcontaining the exponents of the leading term of
a polynomial. If x1^e1 *...* xm^em is the leading term of the polynomial
then the list [e1,...,em] is returned. For a zero polynomial a list containing
0s is returned.

With the option order the desired term orderingcan be given. If no order is
given then the lexicographical one is used.

The first argument of degreevec is allowed to be a polynomial or an expression
and optionally a listof indeterminates.  An expression is converted into a
polynomial in the specified indeterminates (see function poly). degreevec
returns FAIL if the expression cannot be converted into a polynomial. degreevec

is a kernel function.

>>  degreevec(x^3+x^2*y^2+2, [x,y]);

      [ 3, 0 ]

>>  degreevec(x^3+x^2*y^2+2, [x,y], DegreeOrder);

      [ 2, 2 ]

>>  p := poly(x^2*z+x*z^3+1, [x]): degreevec(p);

      [ 2 ]

>>  degreevec(0, [x,y,z]);

      [ 0, 0, 0 ]

See also:  degree , ldegree , lterm , nthterm , poly

