 degree - Maple Help

Ordinals

 degree
 leading exponent of an ordinal number
 tdegree
 trailing exponent of an ordinal number
 lcoeff
 leading coefficient of an ordinal number
 tcoeff
 trailing coefficient of an ordinal number
 lterm
 leading term of an ordinal number
 tterm
 trailing term of an ordinal number Calling Sequence degree(o, formal) tdegree(o, formal) lcoeff(o, formal) tcoeff(o, formal) lterm(o, formal) tterm(o, formal) Parameters

 o - ordinal, nonnegative integer, or polynomial with positive integer coefficients formal - (optional) literal name Returns

 • The degree and tdegree commands return the leading and trailing exponents of the ordinal number o, respectively, that is, either an ordinal or a nonnegative integer.
 • The lcoeff and tcoeff commands return the leading and trailing coefficients of the ordinal number o, respectively, that is, either a nonnegative integer or a polynomial with positive integer coefficients.
 • The lterm and tterm commands return the leading and trailing terms of the ordinal number o, respectively. The result is returned in form of a list $\left[e,c\right]$, where the exponent $e$ is either an ordinal or a nonnegative integer, and the coefficient $c$ is either a nonnegative integer or a polynomial with positive integer coefficients. Description

 • The degree(o), lcoeff(o), and lterm(o) calling sequences return the leading exponent, coefficient, and term, respectively, of the ordinal number $o$.
 • The degree (leading exponent) of $o$ is the largest exponent in $o$ with respect to the ordering of ordinals, and lcoeff and lterm return the coefficient and term, respectively, corresponding to the largest exponent.
 • The tdegree(o), tcoeff(o), and tterm(o) calling sequences return the trailing exponent, coefficient, and term, respectively, of the ordinal number $o$.
 • The trailing exponent of $o$ is the smallest exponent in $o$ with respect to the ordering of ordinals, and tcoeff and tterm return the coefficient and term, respectively, corresponding to the smallest exponent.
 • lterm is equivalent to [degree,lcoeff] and tterm is equivalent to [tdegree,tcoeff].
 • If $o$ is a nonnegative integer or a polynomial with positive integer coefficients (representing a nonnegative integer), then degree and ldegree both return $0$, and lcoeff and tcoeff both return $o$ itself.
 • If $o$ is a parametric ordinal and it cannot be determined whether the leading or trailing coefficient is nonzero, all six commands return an error, unless the option formal is given.
 • The degree, lcoeff and tcoeff commands overload the corresponding top-level routines degree, lcoeff, and tcoeff, respectively. The top-level commands are still accessible via the :- qualifier, that is, :-degree, :-lcoeff, and :-tcoeff, respectively.
 • If $o$ is a nonconstant polynomial with positive integer coefficients, then the results of degree and :-degree differ: the former returns the leading exponent of $o$ as an ordinal, namely $0$, while the latter returns the total degree of $o$ as a polynomial, that is, a positive integer. Similarly, the results of lcoeff and :-lcoeff also differ in this case, as do the results of tcoeff and :-tcoeff. Examples

 > $\mathrm{with}\left(\mathrm{Ordinals}\right)$
 $\left[{\mathrm{+}}{,}{\mathrm{.}}{,}{\mathrm{<}}{,}{\mathrm{<=}}{,}{\mathrm{Add}}{,}{\mathrm{Base}}{,}{\mathrm{Dec}}{,}{\mathrm{Decompose}}{,}{\mathrm{Div}}{,}{\mathrm{Eval}}{,}{\mathrm{Factor}}{,}{\mathrm{Gcd}}{,}{\mathrm{Lcm}}{,}{\mathrm{LessThan}}{,}{\mathrm{Log}}{,}{\mathrm{Max}}{,}{\mathrm{Min}}{,}{\mathrm{Mult}}{,}{\mathrm{Ordinal}}{,}{\mathrm{Power}}{,}{\mathrm{Split}}{,}{\mathrm{Sub}}{,}{\mathrm{^}}{,}{\mathrm{degree}}{,}{\mathrm{lcoeff}}{,}{\mathrm{log}}{,}{\mathrm{lterm}}{,}{\mathrm{\omega }}{,}{\mathrm{quo}}{,}{\mathrm{rem}}{,}{\mathrm{tcoeff}}{,}{\mathrm{tdegree}}{,}{\mathrm{tterm}}\right]$ (1)
 > $\mathrm{o1}≔\mathrm{Ordinal}\left(\left[\left[\mathrm{\omega },3\right],\left[2,x\right],\left[1,2\right],\left[0,5\right]\right]\right)$
 ${\mathrm{o1}}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{\mathbf{\omega }}{\cdot }{2}{+}{5}$ (2)
 > $\left[\mathrm{degree}\left(\mathrm{o1}\right),\mathrm{lcoeff}\left(\mathrm{o1}\right)\right]=\mathrm{lterm}\left(\mathrm{o1}\right)$
 $\left[{\mathbf{\omega }}{,}{3}\right]{=}\left[{\mathbf{\omega }}{,}{3}\right]$ (3)
 > $\left[\mathrm{tdegree}\left(\mathrm{o1}\right),\mathrm{tcoeff}\left(\mathrm{o1}\right)\right]=\mathrm{tterm}\left(\mathrm{o1}\right)$
 $\left[{0}{,}{5}\right]{=}\left[{0}{,}{5}\right]$ (4)

lterm and tterm always return a list.

 > $\mathrm{degree}\left(5\right)=\mathrm{tdegree}\left(5\right),\mathrm{lcoeff}\left(5\right)=\mathrm{tcoeff}\left(5\right),\mathrm{lterm}\left(5\right)=\mathrm{tterm}\left(5\right)$
 ${0}{=}{0}{,}{5}{=}{5}{,}\left[{0}{,}{5}\right]{=}\left[{0}{,}{5}\right]$ (5)

Nonconstant polynomial input.

 > $\mathrm{degree}\left(2{x}^{2}+1\right)\ne :-\mathrm{degree}\left(2{x}^{2}+1\right),\mathrm{lcoeff}\left(2{x}^{2}+1\right)\ne :-\mathrm{lcoeff}\left(2{x}^{2}+1\right)$
 ${0}{\ne }{2}{,}{2}{}{{x}}^{{2}}{+}{1}{\ne }{2}$ (6)

An error is returned in the parametric case if the proper exponent or coefficient cannot be determined.

 > $\mathrm{o2}≔\mathrm{Ordinal}\left(\left[\left[2,x\right],\left[1,y\right],\left[0,z\right]\right]\right)$
 ${\mathrm{o2}}{≔}{{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{\mathbf{\omega }}{\cdot }{y}{+}{z}$ (7)
 > $\mathrm{degree}\left(\mathrm{o2}\right)$
 > $\mathrm{degree}\left(\mathrm{o2},\mathrm{formal}\right)$
 ${2}$ (8)
 > ${\mathrm{\omega }}^{2}+\mathrm{o2}$
 ${{\mathbf{\omega }}}^{{2}}{\cdot }\left({1}{+}{x}\right){+}{\mathbf{\omega }}{\cdot }{y}{+}{z}$ (9)
 > $\mathrm{degree}\left(\right),\mathrm{lcoeff}\left(\right)$
 ${2}{,}{1}{+}{x}$ (10)
 > $\mathrm{tcoeff}\left(\mathrm{o2}\right)$
 > $\mathrm{tcoeff}\left(\mathrm{o2},\mathrm{formal}\right)$
 ${z}$ (11)
 > $\mathrm{o2}+3$
 ${{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{\mathbf{\omega }}{\cdot }{y}{+}\left({z}{+}{3}\right)$ (12)
 > $\mathrm{tdegree}\left(\right),\mathrm{tcoeff}\left(\right)$
 ${0}{,}{z}{+}{3}$ (13) Compatibility

 • The Ordinals[degree], Ordinals[tdegree], Ordinals[lcoeff], Ordinals[tcoeff], Ordinals[lterm] and Ordinals[tterm] commands were introduced in Maple 2015.