 Decompose - Maple Help

Ordinals

 Decompose
 exponentially decompose an ordinal number Calling Sequence Decompose(a, output=o) Parameters

 a - ordinal or non-negative integer o - (optional) literal keyword; either list (default) or inert Returns

 • If output=list (the default), a list of ordinals and non-negative integers is returned. Unless a=0 or a=1, any integers in the list are strictly greater than $1$.
 • Otherwise, if output=inert is specified, an inert exponentiation of ordinal numbers using the inert operator &^ is returned. Description

 • The Decompose(a) calling sequence computes an exponential normal form ${a}_{1}^{{a}_{2}^{{\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}}^{{⋰}^{{a}_{n}}}}}$ of $a$ as an iterated power of ordinals and non-negative integers ${a}_{1},{a}_{2},\dots ,{a}_{n}$ that cannot be decomposed any further as a power of strictly smaller ordinals.
 • The composition factors have the following additional properties, which ensure uniqueness of the decomposition.
 i. Trivial cases: $a=1\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}⇔\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}n=0$, and if $a=0$, then $n=1$ and ${a}_{1}=0$.
 ii. If $a\ge 2$ is an integer, then ${a}_{k}$ are all integers $\ge 2$.
 iii. If ${a}_{k}\ge 2$ is an integer, then it is not a perfect power, that is, it cannot be written as ${b}^{c}$ for integers $b,c\ge 2$.
 iv. If ${a}_{k}$ is not an integer, then either $k=n=1$ and $a={a}_{k}=\mathbf{\omega }$, or ${a}_{k}$ has at least two nonzero terms in the Cantor normal form.
 v. If $a$ is not an integer, then there is an index $i\in \left\{1,\dots ,n\right\}$ such that ${a}_{i}$ is not an integer and ${a}_{i+1},\dots ,{a}_{n}$  are all integers $\ge 2$.
 vi. If $i\ge 2$, then ${a}_{1}=\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}\cdots \phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}={a}_{i-2}=2$ and $\mathrm{degree}\left({a}_{i}\right)\ge 1>0=\mathrm{tdegree}\left({a}_{i}\right)$. (Moreover, either ${a}_{i-1}\ge 2$ is an integer, or it has at least two nonzero terms.)
 • Exponential decomposition is a one-sided inverse of powering, in the sense that $\mathrm{value}\left(\mathrm{Decompose}\left(a,\mathrm{output}=\mathrm{inert}\right)\right)=a$.
 • The ordinal $a$ can be parametric. However, if the complete decomposition cannot be computed in such a case, an error will be raised. 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{Decompose}\left({\mathrm{ω}}^{\mathrm{ω}}\right)$
 $\left[{2}{,}{2}{,}{2}{,}{\mathbf{\omega }}{+}{1}\right]$ (2)

Using output=inert. The result can be verified using value.

 > $\mathrm{Decompose}\left({\mathrm{ω}}^{\mathrm{ω}},\mathrm{output}=\mathrm{inert}\right)$
 ${\left({2}\right)}^{{\left({2}\right)}^{{\left({2}\right)}^{{\mathbf{\omega }}{+}{1}}}}$ (3)
 > $\mathrm{value}\left(\right)$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}$ (4)
 > $\mathrm{Decompose}\left({\mathrm{ω}}^{\mathrm{ω}+1}\right)$
 $\left[{2}{,}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}\right]$ (5)

Any ordinal $\ne \mathbf{\omega }$ with a single term can be decomposed.

 > $\mathrm{Decompose}\left(\mathrm{.}\left(\mathrm{ω},3\right)\right)$
 $\left[{3}{,}{\mathbf{\omega }}{+}{1}\right]$ (6)
 > $\mathrm{Decompose}\left({\mathrm{ω}}^{3}\right)$
 $\left[{2}{,}{3}{,}{\mathbf{\omega }}{+}{1}\right]$ (7)
 > $\mathrm{Decompose}\left(\mathrm{.}\left({\mathrm{ω}}^{2},3\right)\right)$
 $\left[{3}{,}{\mathbf{\omega }}{\cdot }{2}{+}{1}\right]$ (8)
 > $\mathrm{Decompose}\left(\mathrm{.}\left({\mathrm{ω}}^{\mathrm{ω}+1},2\right),\mathrm{output}=\mathrm{inert}\right)$
 ${\left({2}\right)}^{{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}}$ (9)
 > $\mathrm{value}\left(\right)$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}{+}{1}}{\cdot }{2}$ (10)

The following equality is not a decomposition into strictly smaller ordinals, and therefore $\mathbf{\omega }$ is indecomposable.

 > $2&^\mathrm{ω}={2}^{\mathrm{ω}}$
 ${\left({2}\right)}^{{\mathbf{\omega }}}{=}{\mathbf{\omega }}$ (11)
 > $\mathrm{Decompose}\left(\mathrm{ω}\right)$
 $\left[{\mathbf{\omega }}\right]$ (12)

More than one term.

 > $b≔{\mathrm{ω}}^{2}+\mathrm{ω}$
 ${b}{≔}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}$ (13)
 > $a≔{\mathrm{ω}}^{b+2}+{\mathrm{ω}}^{b+1}$
 ${a}{≔}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{+}{2}}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{+}{1}}$ (14)
 > $\mathrm{Decompose}\left(a,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}\right)}^{{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}}$ (15)
 > $c≔a+\mathrm{.}\left({\mathrm{ω}}^{b},3\right)$
 ${c}{≔}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{+}{2}}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{+}{1}}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}}{\cdot }{3}$ (16)
 > $\mathrm{Decompose}\left(c,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{+}{3}\right)}^{{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}}$ (17)
 > $p≔{\left(\mathrm{ω}+2\right)}^{2}$
 ${p}{≔}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{2}$ (18)
 > $\mathrm{Decompose}\left(p,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({\mathbf{\omega }}{+}{2}\right)}^{{2}}$ (19)
 > $q≔{\left(\mathrm{ω}+3\right)}^{p}$
 ${q}{≔}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{2}}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}}{\cdot }{3}$ (20)
 > $\mathrm{Decompose}\left(q,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({\mathbf{\omega }}{+}{3}\right)}^{{\left({\mathbf{\omega }}{+}{2}\right)}^{{2}}}$ (21)
 > $r≔{\left(\mathrm{ω}+5\right)}^{q}$
 ${r}{≔}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{2}}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}}{\cdot }{3}}$ (22)
 > $\mathrm{Decompose}\left(r,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({2}\right)}^{{\left({\mathbf{\omega }}{+}{3}\right)}^{{\left({\mathbf{\omega }}{+}{2}\right)}^{{2}}}}$ (23)
 > $f≔\mathrm{Ordinal}\left(\left[\left[8,1\right],\left[7,2\right],\left[6,3\right],\left[5,2\right],\left[4,3\right],\left[3,2\right],\left[2,3\right],\left[1,2\right],\left[0,3\right]\right]\right)$
 ${f}{≔}{{\mathbf{\omega }}}^{{8}}{+}{{\mathbf{\omega }}}^{{7}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{6}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{5}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{4}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (24)
 > $\mathrm{Decompose}\left(f,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\left({2}\right)}^{{2}}}$ (25)

Non-negative integers can be decomposed as well.

 > $\mathrm{Decompose}\left(2417851639229258349412352,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({2}\right)}^{{\left({3}\right)}^{{\left({2}\right)}^{{2}}}}$ (26)

Parametric examples.

 > $u≔\mathrm{Ordinal}\left(\left[\left[2,x\right],\left[1,3x\right],\left[0,3\right]\right]\right)$
 ${u}{≔}{{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{\mathbf{\omega }}{\cdot }\left({3}{}{x}\right){+}{3}$ (27)
 > $\mathrm{Decompose}\left(u\right)$
 > $\mathrm{Decompose}\left(\genfrac{}{}{0}{}{u}{\phantom{x=x+1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{u}}{x=x+1},\mathrm{output}=\mathrm{inert}\right)$
 ${\left({\mathbf{\omega }}{\cdot }\left({x}{+}{1}\right){+}{3}\right)}^{{2}}$ (28)
 > $v≔\mathrm{Ordinal}\left(\left[\left[\mathrm{ω}+3,1\right],\left[\mathrm{ω}+2,x\right],\left[\mathrm{ω}+1,1\right]\right]\right)$
 ${v}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{+}{3}}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{+}{2}}{\cdot }{x}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{+}{1}}$ (29)
 > $\mathrm{Decompose}\left(v,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{\mathbf{\omega }}\right)}^{{\mathbf{\omega }}{+}{1}}$ (30) Compatibility

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