Dec - Maple Help

Ordinals

 Dec
 decrement ordinal

 Calling Sequence Dec(a)

Parameters

 a - ordinal, nonnegative integer, or polynomial with positive integer coefficients

Returns

 • ordinal data structure, nonnegative integer, polynomial with positive integer coefficients, or $\mathrm{NULL}$.

Description

 • The Dec(a) calling sequence decrements the ordinal number $a$, if possible. If $a=0$, then the return value is $\mathrm{NULL}$. Otherwise, if the trailing term is ${\mathbf{\omega }}^{e}\cdot c$, where $e$ is an ordinal and $c$ is a positive integer, then exactly one of the following happens:
 – If $e=0$ then $c$ is replaced by $c-1$.
 – If $e\ne 0$ and $c\ne 1$, then the trailing term is replaced by the sum of the two terms ${\mathbf{\omega }}^{e}\cdot \left(c-1\right)+{\mathbf{\omega }}^{\mathrm{Dec}\left(e\right)}$.
 – Otherwise, if $e\ne 0$ and $c=1$, then the trailing exponent is replaced by $\mathrm{Dec}\left(e\right)$.
 • Note that in general $\mathrm{Dec}\left(a\right)$ is not the largest ordinal number smaller than $a$, because such an ordinal does not exist if $a$ is a limit ordinal, which means its trailing degree is nonzero.
 • If $a$ is a parametric ordinal number and $c-1$ is not a polynomial with nonnegative integer coefficients, an error is raised.

Examples

 > $\mathrm{with}\left(\mathrm{Ordinals}\right):$
 > $a≔\mathrm{Ordinal}\left(\left[\left[\mathrm{\omega },2\right],\left[2,3\right],\left[0,4\right]\right]\right)$
 ${a}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{4}$ (1)
 > $\mathbf{while}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}a\ne 0\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}a≔\mathrm{Dec}\left(a\right);\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathrm{print}\left(a\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}:$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{3}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{2}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{1}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{1}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{+}{1}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{\mathbf{\omega }}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{1}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{+}{\mathbf{\omega }}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{+}{1}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}$
 ${\mathbf{\omega }}$
 ${1}$
 ${0}$ (2)
 > $\mathrm{Dec}\left(5\right)$
 ${4}$ (3)

Parametric examples.

 > $\mathrm{Dec}\left(x+3\right)$
 ${x}{+}{2}$ (4)
 > $b≔\mathrm{Ordinal}\left(\left[\left[1,3\right],\left[0,{x}^{2}+x+2\right]\right]\right)$
 ${b}{≔}{\mathbf{\omega }}{\cdot }{3}{+}\left({{x}}^{{2}}{+}{x}{+}{2}\right)$ (5)
 > $\mathrm{Dec}\left(\right)$
 ${\mathbf{\omega }}{\cdot }{3}{+}\left({{x}}^{{2}}{+}{x}{+}{1}\right)$ (6)
 > $\mathrm{Dec}\left(\right)$
 ${\mathbf{\omega }}{\cdot }{3}{+}\left({{x}}^{{2}}{+}{x}\right)$ (7)
 > $\mathrm{Dec}\left(\right)$

Compatibility

 • The Ordinals[Dec] command was introduced in Maple 2015.