 Ordinals - Maple Help

 Ordinals Ordinals crash course, or: What is $\mathrm{\omega }$?

 Short answer: $\mathbf{\omega }$ = $\mathrm{ℕ}$ endowed with its natural ordering $0<1<2<\cdots$ What if you add a largest possible element? $\mathbf{\omega }+1=\mathbf{\omega }\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}\cup \left\{\mathrm{\infty }\right\}=\left\{0<1<2<\cdots <\mathrm{\infty }\right\}$ What if you add a new smallest element? $1+\mathbf{\omega }=\left\{-\mathrm{\infty }\right\}\cup \phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}\mathbf{\omega }=\left\{-\mathrm{\infty }<0<1<2<\cdots \right\}$ $\cong \mathbf{\omega }$ So: $1+\mathbf{\omega }=\mathbf{\omega }<\mathbf{\omega }+1$ (Read "is isomorphic to" for $=$ and "is (isomorphic to) an initial segment of" for $\le$). Note that $\mathbf{\omega }$ is not isomorphic to $\mathbf{\omega }+1$, since $\mathbf{\omega }+1$ has a largest element, namely $\mathrm{\infty }$, while $\mathbf{\omega }$ does not. Moving on:

$\mathbf{\omega }+2=\left\{0<1<2<\cdots <\mathrm{\infty }<\mathrm{\infty }+1\right\}$

$2+\mathbf{\omega }=\left\{-1-\mathrm{\infty }<-\mathrm{\infty }<0<1<2<\cdots \right\}=\mathbf{\omega }$

and

Keep going: for any positive integer $n$

$\begin{array}{cc}n+\mathbf{\omega }=\mathbf{\omega }<\mathbf{\omega }+1<\mathbf{\omega }+2<\cdots <\mathbf{\omega }+n<\cdots <& {\mathbf{?}}\end{array}$

$\begin{array}{cc}{\mathbf{?}}& =\mathbf{\omega }+\mathbf{\omega }=\mathbf{\omega }\cdot 2\end{array}$  (2 copies of $\mathbf{\omega }$)

You can identify each natural number $n$ with the ordered set of integers smaller than $n$:

$n=\left\{0<1<2<\cdots

(Note: in contrast to the $0<1<2<\cdots <\mathrm{\infty }$ cases earlier, the $\cdots$ in this "definition" is finite.)

Then:

$0=\left\{\right\}=\varnothing$

$1=\left\{0\right\}=\left\{\varnothing \right\}$

$2=\left\{0<1\right\}=\left\{\varnothing <\left\{\varnothing \right\}\right\}$

$3=\left\{0<1<2\right\}=\left\{\varnothing <\left\{\varnothing \right\}<\left\{\varnothing ,\left\{\varnothing \right\}\right\}\right\}$

$4=\left\{0<1<2<3\right\}=\left\{\varnothing <\left\{\varnothing \right\}<\left\{\varnothing ,\left\{\varnothing \right\}\right\}<\left\{\varnothing ,\left\{\varnothing \right\},\left\{\varnothing ,\left\{\varnothing \right\}\right\}\right\}\right\}$

$⋮$

and, as ordered sets:

$0<1<2<\cdots <\mathbf{\omega }<\mathbf{\omega }+1<\mathbf{\omega }+2<\cdots <\mathbf{\omega }+\mathbf{\omega }<\mathbf{\omega }+\mathbf{\omega }+1<\mathbf{\omega }+\mathbf{\omega }+2<\cdots <\mathbf{\omega }+\mathbf{\omega }+\mathbf{\omega }<\cdots$

In general, you can (isomorphically) identify each set above (ordinal) with the set of all smaller ordinals. E.g.:

$\left\{0<1<2<\cdots \right\}=\mathbf{\omega }$

$\left\{0<1<2<\cdots <\mathbf{\omega }\right\}=\mathbf{\omega }+1$

$\left\{0<1<2<\cdots <\mathbf{\omega }<\mathbf{\omega }+1\right\}=\mathbf{\omega }+2$

$\left\{0<1<2<\cdots <\mathbf{\omega }<\mathbf{\omega }+1<\mathbf{\omega }+2<\cdots \right\}=\mathbf{\omega }+\mathbf{\omega }$

$\left\{0<1<2<\cdots <\mathbf{\omega }<\mathbf{\omega }+1<\mathbf{\omega }+2<\cdots <\mathbf{\omega }+\mathbf{\omega }\right\}=\mathbf{\omega }+\mathbf{\omega }+1$

$⋮$

$\mathbf{\omega }+\mathbf{\omega }\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}≕\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}\mathbf{\omega }\cdot 2$   (2 copies of $\mathbf{\omega }$)

$2+2+\cdots \phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}=2\cdot \mathbf{\omega }=\mathbf{\omega }$   ($\mathbf{\omega }$ copies of 2)

$\mathbf{\omega }+\mathbf{\omega }+\mathbf{\omega }=\mathbf{\omega }\cdot 3$

$3\cdot \mathbf{\omega }=\mathbf{\omega }$

$\underset{n\mathrm{times}}{\underset{⏟}{\mathbf{\omega }+\cdots +\mathbf{\omega }}}=\mathbf{\omega }\cdot n$   ($n$ copies of $\mathbf{\omega }$)

$n\cdot \mathbf{\omega }=\mathbf{\omega }$

$⋮$

So:

$\begin{array}{cc}0<1<2<\cdots <\mathbf{\omega }<\mathbf{\omega }+1<\cdots <\mathbf{\omega }\cdot 2<\mathbf{\omega }\cdot 2+1<\cdots <\mathbf{\omega }\cdot 3<\cdots <\mathbf{\omega }\cdot n<\cdots <& {\mathbf{?}}\end{array}$

$\begin{array}{cc}{\mathbf{?}}& =\mathbf{\omega }\cdot \mathbf{\omega }={\mathbf{\omega }}^{2}\end{array}$  ($\mathbf{\omega }$ copies of $\mathbf{\omega }$)

or, isomorphically equivalent: pairs of nonnegative integers with reverse lexicographic ordering

$\left({a}_{0},{a}_{1}\right)<\left({b}_{0},{b}_{1}\right)⇔{a}_{1}<{b}_{1}\vee \left({a}_{1}={b}_{1}\wedge {a}_{0}<{b}_{0}\right)$

Similarly:

$\mathbf{\omega }\cdot \mathbf{\omega }\cdot \mathbf{\omega }={\mathbf{\omega }}^{3}$   (3-tuples)

$\mathbf{\omega }\cdot \mathbf{\omega }\cdot \mathbf{\omega }\cdot \mathbf{\omega }={\mathbf{\omega }}^{4}$   (4-tuples)

$⋮$

$\underset{n\mathrm{times}}{\underset{⏟}{\mathbf{\omega }\cdot \dots \cdot \mathbf{\omega }}}={\mathbf{\omega }}^{n}$   ($n$-tuples)

$⋮$

What is next?

${\mathbf{\omega }}^{\mathbf{\omega }}$ ($\mathbf{\omega }$-tuples with finitely many nonzero entries)

Other interpretation: the union ${\mathbf{\omega }}^{\mathbf{\omega }}=1\subseteq \mathbf{\omega }\subseteq {\mathbf{\omega }}^{2}\subseteq \cdots \subseteq {\mathbf{\omega }}^{n}\subseteq \cdots$ of all $n$-tuples for $n\in \mathbf{\omega }$ with reverse lexicographic ordering.

The picture so far:

$0<1<2<\cdots <$

$\mathbf{\omega }<\mathbf{\omega }+1<\mathbf{\omega }+2<\cdots <$

$\mathbf{\omega }+\mathbf{\omega }=\mathbf{\omega }\cdot 2<\mathbf{\omega }\cdot 2+1<\mathbf{\omega }\cdot 2+2<\cdots <$

$\mathbf{\omega }\cdot 3<\mathbf{\omega }\cdot 3+1<\cdots <\mathbf{\omega }\cdot 4<\mathbf{\omega }\cdot 4+1<\cdots <$

$⋮$

$\mathbf{\omega }\cdot \mathbf{\omega }={\mathbf{\omega }}^{2}<{\mathbf{\omega }}^{2}+1<\cdots <{\mathbf{\omega }}^{2}+\mathbf{\omega }<{\mathbf{\omega }}^{2}+\mathbf{\omega }+1<\cdots <{\mathbf{\omega }}^{2}+\mathbf{\omega }\cdot 2<\cdots$

${\mathbf{\omega }}^{2}\cdot 2<{\mathbf{\omega }}^{2}\cdot 2+1<\cdots <{\mathbf{\omega }}^{2}\cdot 2+\mathbf{\omega }<{\mathbf{\omega }}^{2}\cdot 2+\mathbf{\omega }+1<\cdots <{\mathbf{\omega }}^{2}\cdot 2+\mathbf{\omega }\cdot 2<\cdots$

${\mathbf{\omega }}^{2}\cdot 3<{\mathbf{\omega }}^{2}\cdot 3+1<\cdots <{\mathbf{\omega }}^{2}\cdot 3+\mathbf{\omega }<\cdots <{\mathbf{\omega }}^{2}\cdot 4<{\mathbf{\omega }}^{2}\cdot 4+1<\cdots <{\mathbf{\omega }}^{2}\cdot 4+\mathbf{\omega }<\cdots$

$⋮$

${\mathbf{\omega }}^{2}\cdot \mathbf{\omega }={\mathbf{\omega }}^{3}<{\mathbf{\omega }}^{3}+1<\cdots <{\mathbf{\omega }}^{3}+\mathbf{\omega }<\cdots <{\mathbf{\omega }}^{3}+\mathbf{\omega }\cdot 2<\cdots <{\mathbf{\omega }}^{3}+{\mathbf{\omega }}^{2}<\cdots <$

${\mathbf{\omega }}^{3}\cdot 2<{\mathbf{\omega }}^{3}\cdot 2+1<\cdots <{\mathbf{\omega }}^{3}\cdot 2+\mathbf{\omega }<\cdots <{\mathbf{\omega }}^{3}\cdot 2+\mathbf{\omega }\cdot 2<\cdots <{\mathbf{\omega }}^{3}\cdot 2+{\mathbf{\omega }}^{2}<\cdots <$

${\mathbf{\omega }}^{3}\cdot 3<{\mathbf{\omega }}^{3}\cdot 3+1<\cdots <{\mathbf{\omega }}^{3}\cdot 3+\mathbf{\omega }<\cdots <{\mathbf{\omega }}^{3}\cdot 4<{\mathbf{\omega }}^{3}\cdot 4+1<\cdots <{\mathbf{\omega }}^{3}\cdot 4+\mathbf{\omega }<\cdots <$

$⋮$

${\mathbf{\omega }}^{3}\cdot \mathbf{\omega }={\mathbf{\omega }}^{4}<{\mathbf{\omega }}^{4}+1<\cdots <{\mathbf{\omega }}^{4}+\mathbf{\omega }<\cdots <{\mathbf{\omega }}^{5}<{\mathbf{\omega }}^{5}+1<\cdots <{\mathbf{\omega }}^{5}+\mathbf{\omega }<\cdots <$

${\mathbf{\omega }}^{\mathbf{\omega }}<{\mathbf{\omega }}^{\mathbf{\omega }}+1<\cdots <{\mathbf{\omega }}^{\mathbf{\omega }}+\mathbf{\omega }<\cdots <{\mathbf{\omega }}^{\mathbf{\omega }}\cdot 2<\cdots <{\mathbf{\omega }}^{\mathbf{\omega }}\cdot \mathbf{\omega }={\mathbf{\omega }}^{\mathbf{\omega }+1}<\cdots <{\mathbf{\omega }}^{\mathbf{\omega }\cdot 2}<\cdots <$

${\mathbf{\omega }}^{{\mathbf{\omega }}^{2}}<\cdots <{\mathbf{\omega }}^{{\mathbf{\omega }}^{3}}<\cdots <{\mathbf{\omega }}^{{\mathbf{\omega }}^{\mathbf{\omega }}}<\cdots <{\mathbf{\omega }}^{{\mathbf{\omega }}^{{\mathbf{\omega }}^{\mathbf{\omega }}}}<\cdots <{\mathrm{ϵ}}_{0}<\cdots$

Cantor normal form (CNF):

${\mathbf{\omega }}^{{e}_{1}}\cdot {c}_{1}+{\mathbf{\omega }}^{{e}_{2}}\cdot {c}_{2}+\cdots +{\mathbf{\omega }}^{{e}_{k}}\cdot {c}_{k}$

where

${c}_{1},{c}_{2},\mathrm{...},{c}_{k}$ are positive integers,

${e}_{1}>{e}_{2}>\cdots >{e}_{k}\ge 0$ are themselves ordinals, recursively.

CNF is proper $⇔\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}{e}_{1}<{\mathbf{\omega }}^{{e}_{1}}$.

Side note about CNF: basically only exponentiation and addition; multiplication is redundant.

{all proper CNFs} is itself an ordinal, the smallest ordinal which cannot be defined explicitly using $+,\cdot ,ˆ$.

is countable and the smallest ordinal $e$ such that $e={\mathbf{\omega }}^{e}$; no $e$ in proper CNF satisfies this fixed point equation.

There are uncountably many ordinals larger than ${ϵ}_{0}$, but the rest of this document focuses on a Maple package for ordinals in proper CNF, that is, ordinals that are smaller than ${ϵ}_{0}$ and their arithmetic. Constructing ordinals

 • Load the Ordinals package to begin.
 > $\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{ω}}{,}{\mathrm{quo}}{,}{\mathrm{rem}}{,}{\mathrm{tcoeff}}{,}{\mathrm{tdegree}}{,}{\mathrm{tterm}}\right]$ (1)
 • Use the Ordinal constructor to create the Cantor normal form of an ordinal.
 > $a:=\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[1,2\right],\left[0,3\right]\right]\right)$
 ${a}{:=}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (2)
 • Every non-negative integer is an ordinal; no constructor call required.
 > $b:=2$
 ${b}{:=}{2}$ (3)
 • The export omega represents $\mathbf{\omega }$. The following two assignments are equivalent.
 > $c:=\mathrm{ω}$
 ${c}{:=}{\mathbf{\omega }}$ (4)
 > $c:=\mathrm{Ordinal}\left(\left[\left[1,1\right]\right]\right)$
 ${c}{:=}{\mathbf{\omega }}$ (5)
 • An ordinal with a non-integer exponent.
 > $d:=\mathrm{Ordinal}\left(\left[\left[\mathrm{ω},3\right],\left[2,5\right],\left[1,1\right],\left[0,4\right]\right]\right)$
 ${d}{:=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}$ (6)
 • The functions degree, (tdegree), and lcoeff, (tcoeff) return the leading (trailing) exponent and coefficient, respectively.
 > $\mathrm{degree}\left(a\right),\mathrm{degree}\left(b\right),\mathrm{degree}\left(c\right),\mathrm{degree}\left(d\right)$
 ${3}{,}{0}{,}{1}{,}{\mathbf{\omega }}$ (7)
 > $\mathrm{tdegree}\left(a\right),\mathrm{tdegree}\left(b\right),\mathrm{tdegree}\left(c\right),\mathrm{tdegree}\left(d\right)$
 ${0}{,}{0}{,}{1}{,}{0}$ (8)
 > $\mathrm{lcoeff}\left(a\right),\mathrm{lcoeff}\left(b\right),\mathrm{lcoeff}\left(c\right),\mathrm{lcoeff}\left(d\right)$
 ${1}{,}{2}{,}{1}{,}{3}$ (9)
 > $\mathrm{tcoeff}\left(a\right),\mathrm{tcoeff}\left(b\right),\mathrm{tcoeff}\left(c\right),\mathrm{tcoeff}\left(d\right)$
 ${3}{,}{2}{,}{1}{,}{4}$ (10)
 • In Maple, the coefficients ${c}_{i}$ in the Cantor normal form of an ordinal can be parametric, which means, they may depend polynomially on variables, such as $x$ or ${y}_{2}$, with positive integer coefficients. Each parameter like this is implicitly assumed to represent a non-negative integer.
 > $e:=\mathrm{Ordinal}\left(\left[\left[3,x\right],\left[2,{x}^{2}+xy+{y}^{2}\right],\left[0,{z}_{0}^{2}+3\right]\right]\right)$
 ${e}{:=}{{\mathbf{\omega }}}^{{3}}{\cdot }{x}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{x}}^{{2}}{+}{x}{}{y}{+}{{y}}^{{2}}\right){+}\left({{z}}_{{0}}^{{2}}{+}{3}\right)$ (11)
 • The Eval command can be used to substitute integers or integer polynomials for some or all of the parameters.
 >
 ${{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}^{{2}}\right){+}\left({{z}}_{{0}}^{{2}}{+}{3}\right)$ (12)
 > $\mathrm{Eval}\left(e,\left[x=x+1,y=0,{z}_{0}=0\right]\right)$
 ${{\mathbf{\omega }}}^{{3}}{\cdot }\left({x}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{x}}^{{2}}{+}{2}{}{x}{+}{1}\right){+}{3}$ (13) Ordinal arithmetic

 • The functions Add, Mult, and Power implement addition, multiplication, and exponentiation of ordinals, respectively.
 > $\mathrm{Add}\left(a,b\right),\mathrm{Mult}\left(a,b\right),\mathrm{Power}\left(a,b\right)$
 ${{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{5}{,}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}{,}{{\mathbf{\omega }}}^{{6}}{+}{{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{3}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (14)
 • The operators +, . and ^ are overloaded for ordinals.
 > $b+a,b.a,{b}^{a}$
 ${{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}{,}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{6}{,}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{2}}{+}{2}}{\cdot }{8}$ (15)
 • There are inert versions of these operators, which are rendered in gray and are useful for display purposes.
 > $\left(a&+b\right)&+c=a+b+c$
 $\left({{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right){\mathbf{+}}{2}{\mathbf{+}}{\mathbf{\omega }}{=}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{3}$ (16)
 > $\left(b&^c\right)&.a={b}^{c}.a$
 ${\left({2}\right)}^{{\mathbf{\omega }}}{\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right){=}{{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}$ (17)
 • Parametric ordinals can be used to illustrate the rules of ordinal arithmetic. All parameters are allowed to assume the value $0$, you can add $1$ to the leading and trailing coefficients to ensure that they are nonzero for arbitrary non-negative integer values of the parameters.
 > $p:=\mathrm{Ordinal}\left(\left[\left[3,{x}_{3}+1\right],\left[2,{x}_{2}\right],\left[1,{x}_{1}\right],\left[0,{x}_{0}+1\right]\right]\right)$
 ${p}{:=}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)$ (18)
 > $q:=\mathrm{Ordinal}\left(\left[\left[2,{y}_{2}+1\right],\left[1,{y}_{1}\right],\left[0,{y}_{0}+1\right]\right]\right)$
 ${q}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)$ (19)
 • For addition, terms of lower degree are absorbed from the left and appended from the right.
 > $p&+q=p+q$
 $\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right){\mathbf{+}}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){=}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{x}}_{{2}}{+}{{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)$ (20)
 > $q&+p=q+p$
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){\mathbf{+}}\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right){=}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)$ (21)
 > $q&+z=q+z$
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){\mathbf{+}}{z}{=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}{+}{z}\right)$ (22) Multiplication

 • For multiplication, if both arguments have a nonzero constant coefficient, the coefficients of the right factor appear on the left of the product, and vice versa.
 > $p:=\mathrm{Ordinal}\left(\left[\left[3,{x}_{3}+1\right],\left[2,{x}_{2}\right],\left[1,{x}_{1}\right],\left[0,{x}_{0}+1\right]\right]\right)$
 ${p}{:=}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)$ (23)
 > $q:=\mathrm{Ordinal}\left(\left[\left[2,{y}_{2}+1\right],\left[1,{y}_{1}\right],\left[0,{y}_{0}+1\right]\right]\right)$
 ${q}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)$ (24)
 > $p&.q=p.q$
 $\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){=}{{\mathbf{\omega }}}^{{5}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{4}}{\cdot }{{y}}_{{1}}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{}{{y}}_{{0}}{+}{{x}}_{{3}}{+}{{y}}_{{0}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)$ (25)
 > $q&.p=q.p$
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right){=}{{\mathbf{\omega }}}^{{5}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{4}}{\cdot }{{x}}_{{2}}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{{x}}_{{1}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{}{{x}}_{{0}}{+}{{x}}_{{0}}{+}{{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)$ (26)
 • In particular, multiplication of an ordinal with a nonzero constant coefficient by a positive constant $z+1$ only affects the leading or constant coefficient, respectively, depending on the order.
 > $q&.\left(z+1\right)=q.\left(z+1\right)$
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){\mathbf{\cdot }}\left({z}{+}{1}\right){=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{}{z}{+}{z}{+}{{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)$ (27)
 > $\left(z+1\right)&.q=\left(z+1\right).q$
 $\left({z}{+}{1}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{}{z}{+}{z}{+}{{y}}_{{0}}{+}{1}\right)$ (28)
 • Note that this is not universally valid for $z$ instead of $z+1$.
 >
 ${z}{\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({z}{}{{y}}_{{0}}{+}{z}\right)$ (29)
 > $0&.q=0.q$
 ${0}{\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}{+}\left({{y}}_{{0}}{+}{1}\right)\right){=}{0.}$ (30)
 • If the factor on the right does not have a constant term, then it absorbs the factor on the left except for its leading power of $\mathbf{\omega }$.
 >
 $\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}\right){=}{{\mathbf{\omega }}}^{{5}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{4}}{\cdot }{{y}}_{{1}}$ (31)
 >
 $\left({z}{+}{1}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}\right){=}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({{y}}_{{2}}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{{y}}_{{1}}$ (32)
 • Some iterated products.
 >
 ${b}{:=}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (33)
 > $b&^2={b}^{2}$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{2}}{=}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{6}{+}{3}$ (34)
 > $b&^3={b}^{3}$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{3}}{=}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{6}{+}{\mathbf{\omega }}{\cdot }{6}{+}{3}$ (35)
 > $b&^4={b}^{4}$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{4}}{=}{{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{6}{+}{\mathbf{\omega }}{\cdot }{6}{+}{3}$ (36)
 > $b&^10={b}^{10}$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{10}}{=}{{\mathbf{\omega }}}^{{10}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{9}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{8}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{7}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{6}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{5}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{4}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{6}{+}{\mathbf{\omega }}{\cdot }{6}{+}{3}$ (37) Powering

 • For exponentiation, only the base can be parametric but not the exponent.
 > $p:=\mathrm{Ordinal}\left(\left[\left[3,{x}_{3}+1\right],\left[2,{x}_{2}\right],\left[1,{x}_{1}\right],\left[0,{x}_{0}+1\right]\right]\right)$
 ${p}{:=}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)$ (38)
 > $p&^3={p}^{3}$
 ${\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right)}^{{3}}{=}{{\mathbf{\omega }}}^{{9}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{8}}{\cdot }{{x}}_{{2}}{+}{{\mathbf{\omega }}}^{{7}}{\cdot }{{x}}_{{1}}{+}{{\mathbf{\omega }}}^{{6}}{\cdot }\left({{x}}_{{3}}{}{{x}}_{{0}}{+}{{x}}_{{0}}{+}{{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{5}}{\cdot }{{x}}_{{2}}{+}{{\mathbf{\omega }}}^{{4}}{\cdot }{{x}}_{{1}}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{}{{x}}_{{0}}{+}{{x}}_{{0}}{+}{{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)$ (39)
 • If the exponent does not have a constant term, then all coefficients of the base are ignored and so are all exponents except for the leading one, that is, the degree. (In the following example, the degree gets absorbed into the exponent as well, since $3\cdot \mathbf{\omega }=\mathbf{\omega }$.)
 > $p&^\mathrm{ω}={p}^{\mathrm{ω}}$
 ${\left({{\mathbf{\omega }}}^{{3}}{\cdot }\left({{x}}_{{3}}{+}{1}\right){+}{{\mathbf{\omega }}}^{{2}}{\cdot }{{x}}_{{2}}{+}{\mathbf{\omega }}{\cdot }{{x}}_{{1}}{+}\left({{x}}_{{0}}{+}{1}\right)\right)}^{{\mathbf{\omega }}}{=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}$ (40)
 • The only type of example for proper CNF ordinals where $e={b}^{e}$ is when $b=z+2$ is an integer $\ge 2$ and $e=\mathbf{\omega }$.
 > $\left(z+2\right)&^\mathrm{ω}={\left(z+2\right)}^{\mathrm{ω}}$
 ${\left(\left({z}{+}{2}\right)\right)}^{{\mathbf{\omega }}}{=}{\mathbf{\omega }}$ (41)
 • This equality is illustrated by writing non-negative integers in base $b$ representation, but in reverse order, with the least significant digit first. For example, if $z=0$ and $b=2$:

${2}^{\mathbf{\omega }}={2}^{0}\subseteq {2}^{1}\subseteq {2}^{2}\subseteq \cdots$

$=\left\{\left(\left(\left(\underset{0}{\underset{⏟}{0}}<\underset{1}{\underset{⏟}{{2}^{0}}}\right)<\underset{01}{\underset{⏟}{{2}^{1}}}<\underset{11}{\underset{⏟}{{2}^{0}+{2}^{1}}}\right)<\underset{001}{\underset{⏟}{{2}^{2}}}<\underset{101}{\underset{⏟}{{2}^{0}+{2}^{2}}}<\underset{011}{\underset{⏟}{{2}^{1}+{2}^{2}}}<\underset{111}{\underset{⏟}{{2}^{0}+{2}^{1}+{2}^{2}}}\right)<\underset{0001}{\underset{⏟}{{2}^{3}}}<\cdots \right\}$

 • Some iterated powers.
 > $\mathrm{Power}\left(\right),\mathrm{Power}\left(0\right),\mathrm{Power}\left(0,0\right),\mathrm{Power}\left(0,0,0\right),\mathrm{Power}\left(0,0,0,0\right)$
 ${1}{,}{0}{,}{1}{,}{0}{,}{1}$ (42)
 > $\mathrm{Power}\left(\right),\mathrm{Power}\left(2\right),\mathrm{Power}\left(2,2\right),\mathrm{Power}\left(2,2,2\right),\mathrm{Power}\left(2,2,2,2\right)$
 ${1}{,}{2}{,}{4}{,}{16}{,}{65536}$ (43)
 > $\mathrm{Power}\left(2,2,2,2,2\right)$
 ${2003529930406846464979072351560255750447825475569751419265016973710894059556311453089506130880933348\left[...19529 ⅆigits...\right]5775699146577530041384717124577965048175856395072895337539755822087777506072339445587895905719156736}$ (44)
 >
 ${b}{:=}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (45)
 > $b&^b={b}^{b}$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}{=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{2}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}}{\cdot }{3}$ (46)
 > $b&^\left(b&^b\right)=\mathrm{Power}\left(b,b,b\right)$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}}{=}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{2}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}}{\cdot }{3}}$ (47)
 > $b&^\left(b&^\left(b&^b\right)\right)=\mathrm{Power}\left(b,b,b,b\right)$
 ${\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\left({\mathbf{\omega }}{\cdot }{2}{+}{3}\right)}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}}}{=}{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{2}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}}{\cdot }{3}}}$ (48) Subtraction and comparison

 • If $b\le a$, then there is a unique ordinal $c$ such that $b+c=a$. This is computed using the Sub command.
 >
 ${a}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{\cdot }{2}{+}{1}$ (49)
 >
 ${b}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{3}$ (50)
 > $a&-b=\mathrm{Sub}\left(a,b\right)$
 $\left({{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right){\mathbf{-}}\left({{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{3}\right){=}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (51)
 > $a&-a=\mathrm{Sub}\left(a,a\right)$
 $\left({{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right){\mathbf{-}}\left({{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right){=}{0}$ (52)
 • If $a, then $\mathrm{Sub}\left(a,b\right)$ returns ${\mathrm{NULL}}$.
 > $\left[\mathrm{Sub}\left(b,a\right)\right]$
 $\left[{}\right]$ (53)
 • The LessThan command and the < and <= operators compare two ordinals. $\mathrm{LessThan}\left(a,b\right)$ and $a return false if and only if $\mathrm{Sub}\left(a,b\right)$ returns ${\mathrm{NULL}}$.
 > $\mathrm{LessThan}\left(a,b\right),\mathrm{LessThan}\left(a,a\right),\mathrm{LessThan}\left(b,a\right)$
 ${\mathrm{false}}{,}{\mathrm{false}}{,}{\mathrm{true}}$ (54)
 > $a
 ${\mathrm{false}}{,}{\mathrm{false}}{,}{\mathrm{true}}$ (55)
 > $a\le b,a\le a,b\le a$
 ${\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{true}}$ (56)
 • The commands Max and Min return the largest and smallest element, respectively, in a sequence or list of ordinals.
 > $l:=\left[a,\mathrm{ω},2,b\right]$
 ${l}{:=}\left[{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}{,}{\mathbf{\omega }}{,}{2}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{3}\right]$ (57)
 > $\mathrm{Max}\left(l\right),\mathrm{Min}\left(l\right)$
 ${{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}{,}{2}$ (58)
 > $\mathrm{sort}\left(l,\mathrm{LessThan}\right)$
 $\left[{2}{,}{\mathbf{\omega }}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{3}{,}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{3}\right]$ (59) Inverse operations

 • The Sub command performs subtraction on the left. It is a partial inverse of addition on the right: $\mathrm{Sub}\left(b+c,b\right)=c$ for arbitrary ordinals $b$ and $c$, and $b+\mathrm{Sub}\left(a,b\right)=a$ if $b\le a$.
 • There is no inverse for addition on the left. The following example illustrates that a difference on the right is not unique in general.
 > $1+\mathrm{ω}=2+\mathrm{ω}$
 ${\mathbf{\omega }}{=}{\mathbf{\omega }}$ (60)
 • The following examples illustrate that even though $\mathbf{\omega }<\mathbf{\omega }+1$, there is no ordinal $c$ such that $c+\mathbf{\omega }=\mathbf{\omega }+1$.
 > $x&+\mathrm{ω}=x+\mathrm{ω}$
 ${x}{\mathbf{+}}{\mathbf{\omega }}{=}{\mathbf{\omega }}$ (61)
 > $\left(\mathrm{ω}.y+x\right)&+\mathrm{ω}=\mathrm{ω}.y+x+\mathrm{ω}$
 $\left({\mathbf{\omega }}{\cdot }{y}{+}{x}\right){\mathbf{+}}{\mathbf{\omega }}{=}{\mathbf{\omega }}{\cdot }\left({y}{+}{1}\right)$ (62)
 > $\left(\left({\mathrm{ω}}^{2}\right).z+\mathrm{ω}.y+x\right)&+\mathrm{ω}=\left({\mathrm{ω}}^{2}\right).z+\mathrm{ω}.y+x+\mathrm{ω}$
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }{z}{+}{\mathbf{\omega }}{\cdot }{y}{+}{x}\right){\mathbf{+}}{\mathbf{\omega }}{=}{{\mathbf{\omega }}}^{{2}}{\cdot }{z}{+}{\mathbf{\omega }}{\cdot }\left({y}{+}{1}\right)$ (63)
 • Another way to see this is that $c+\mathbf{\omega }$ does not have a largest element no matter what $c$ is, while $\mathbf{\omega }+1$ does. Thus, a difference on the right does not exist in general.
 • The Div command performs division with remainder on the left, with a remainder that is smaller than the divisor.
 >
 ${f}{:=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}$ (64)
 >
 ${g}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{3}$ (65)
 > $q,r:=\mathrm{Div}\left(f,g\right)$
 ${q}{,}{r}{:=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{1}{,}{{\mathbf{\omega }}}^{{2}}{+}{5}$ (66)
 >
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{3}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{1}\right){\mathbf{+}}\left({{\mathbf{\omega }}}^{{2}}{+}{5}\right){=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}$ (67)
 > $r
 ${\mathrm{true}}$ (68)
 • The quotient and the remainder can be computed individually using the quo and rem commands, respectively.
 > $\mathrm{quo}\left(f,g\right),\mathrm{rem}\left(f,g\right)$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{1}{,}{{\mathbf{\omega }}}^{{2}}{+}{5}$ (69)
 • Left division is a partial inverse of right multiplication: $\mathrm{quo}\left(\mathrm{Mult}\left(g,q\right),g\right)=q$ and $\mathrm{rem}\left(\mathrm{Mult}\left(g,q\right),g\right)=0$ for arbitrary ordinals $g$, $q$, and if $\mathrm{rem}\left(f,g\right)=0$, then $\mathrm{Mult}\left(g,\mathrm{quo}\left(f,g\right)\right)=f$. Similar to addition, there is no unique inverse for left multiplication, that is, a right quotient, in general.
 >
 ${\mathbf{\omega }}{=}{\mathbf{\omega }}$ (70) Logarithms and base conversion

 • The $\mathrm{Log}\left(f,g\right)$ command returns three ordinals: a logarithm $l$, a quotient $0 and a remainder $r<{g}^{l}$, such that $f={g}^{l}\cdot q+r$.
 >
 ${f}{:=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}$ (71)
 >
 ${g}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{3}$ (72)
 > $l,q,r:=\mathrm{Log}\left(f,g\right)$
 ${l}{,}{q}{,}{r}{:=}{\mathbf{\omega }}{,}{2}{,}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}$ (73)
 > $\left(\left(g&^l\right)&.q\right)&+r={g}^{l}.q+r$
 ${\left({{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{3}\right)}^{{\mathbf{\omega }}}{\mathbf{\cdot }}{2}{\mathbf{+}}\left({{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}\right){=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}$ (74)
 > $q
 ${\mathrm{true}}$ (75)
 > $r<{g}^{l}$
 ${\mathrm{true}}$ (76)
 • The logarithm is a partial inverse of exponentiation on the right:

$f={g}^{l}\phantom{\rule[-0.0ex]{1.0ex}{0.0ex}}⇔\phantom{\rule[-0.0ex]{1.0ex}{0.0ex}}\mathrm{Log}\left(f,g\right)=l,1,0,\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}$ for arbitrary ordinals $f,g$ and $l$.

 Similar to addition and multiplication, there is in general no unique inverse for powering on the left.
 > ${2}^{\mathrm{ω}}={3}^{\mathrm{ω}}$
 ${\mathbf{\omega }}{=}{\mathbf{\omega }}$ (77)
 • The Cantor normal form can be viewed as a base-$\mathbf{\omega }$ representation for ordinals. Repeated application of the Log command yields a base-$g$ representation for an arbitrary ordinal $g\ge 2$. This is implemented in the Base command. If $g>\mathbf{\omega }$, then the coefficients in that representation need not be integers.
 > $\mathrm{Base}\left(f,g\right)$
 $\left[\left[{\mathbf{\omega }}{,}{2}\right]{,}\left[{1}{,}{\mathbf{\omega }}{+}{1}\right]{,}\left[{0}{,}{{\mathbf{\omega }}}^{{2}}{+}{5}\right]\right]$ (78)
 > $\mathrm{Base}\left(f,g,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{3}\right)}^{{\mathbf{\omega }}}{\mathbf{\cdot }}{2}{\mathbf{+}}\left({{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{3}\right){\mathbf{\cdot }}\left({\mathbf{\omega }}{+}{1}\right){\mathbf{+}}\left({{\mathbf{\omega }}}^{{2}}{+}{5}\right)$ (79)
 > $\mathrm{value}\left(\right)$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{5}$ (80)
 > $\mathrm{Base}\left(f,\mathrm{ω},\mathrm{output}=\mathrm{inert}\right)$
 ${\left({\mathbf{\omega }}\right)}^{{\mathbf{\omega }}}{\mathbf{\cdot }}{2}{\mathbf{+}}{\left({\mathbf{\omega }}\right)}^{{3}}{\mathbf{+}}{\left({\mathbf{\omega }}\right)}^{{2}}{\mathbf{\cdot }}{3}{\mathbf{+}}{5}$ (81)
 • In the binary representation, all nonzero coefficients are $1$.
 > $\mathrm{Base}\left(f,2,\mathrm{output}=\mathrm{inert}\right)$
 ${\left({2}\right)}^{{{\mathbf{\omega }}}^{{2}}{+}{1}}{\mathbf{+}}{\left({2}\right)}^{{\mathbf{\omega }}{\cdot }{3}}{\mathbf{+}}{\left({2}\right)}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\mathbf{+}}{\left({2}\right)}^{{\mathbf{\omega }}{\cdot }{2}}{\mathbf{+}}{\left({2}\right)}^{{2}}{\mathbf{+}}{1}$ (82)
 > $\mathrm{Base}\left(f,2\right)$
 $\left[\left[{{\mathbf{\omega }}}^{{2}}{+}{1}{,}{1}\right]{,}\left[{\mathbf{\omega }}{\cdot }{3}{,}{1}\right]{,}\left[{\mathbf{\omega }}{\cdot }{2}{+}{1}{,}{1}\right]{,}\left[{\mathbf{\omega }}{\cdot }{2}{,}{1}\right]{,}\left[{2}{,}{1}\right]{,}\left[{0}{,}{1}\right]\right]$ (83)
 > $\mathrm{map}\left(z→{2}^{{z}_{1}},\right)$
 $\left[{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{2}{,}{{\mathbf{\omega }}}^{{3}}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{,}{{\mathbf{\omega }}}^{{2}}{,}{4}{,}{1}\right]$ (84) Gcd and factorization

 • The Div command implements left division with remainder, and therefore any two ordinals have a greatest common left divisor.
 >
 ${u}{:=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }\left({x}{+}{1}\right){+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (85)
 >
 ${v}{:=}{{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (86)
 > $g:=\mathrm{Gcd}\left(u,v\right)$
 ${g}{:=}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (87)
 > $\mathrm{rem}\left(u,g\right),\mathrm{rem}\left(v,g\right)$
 ${0}{,}{0}$ (88)
 > $\mathrm{u1},\mathrm{v1}:=\mathrm{quo}\left(u,g\right),\mathrm{quo}\left(v,g\right)$
 ${\mathrm{u1}}{,}{\mathrm{v1}}{:=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }\left({x}{+}{1}\right){+}{\mathbf{\omega }}{+}{1}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{1}$ (89)
 >
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }\left({x}{+}{1}\right){+}{\mathbf{\omega }}{+}{1}\right){=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }\left({x}{+}{1}\right){+}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (90)
 >
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{1}\right){=}{{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (91)
 • It is not a coincidence that the coefficients and exponents of the gcd and the last few coefficients of the two input polynomials agree. As discussed in the section Multiplication earlier, and as illustrated again by the last two examples, the coefficients and exponents of the left factor in a multiplication of two ordinals with nonzero constant coefficients reappear as the rightmost coefficients and exponents of the product. This is illustrated more clearly by factoring all the polynomials involved.
 > $\mathrm{Factor}\left(u,\mathrm{output}=\mathrm{inert}\right)$
 ${5}{\mathbf{\cdot }}{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}{\mathbf{\cdot }}{3}{\mathbf{\cdot }}\left({\mathbf{\omega }}{+}{1}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{+}{1}\right){\mathbf{\cdot }}\left({x}{+}{1}\right)$ (92)
 > $\mathrm{Factor}\left(v,\mathrm{output}=\mathrm{inert}\right)$
 ${5}{\mathbf{\cdot }}{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}{\mathbf{\cdot }}{3}{\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{+}{1}\right){\mathbf{\cdot }}{2}$ (93)
 > $\mathrm{Factor}\left(g,\mathrm{output}=\mathrm{inert}\right)$
 ${5}{\mathbf{\cdot }}{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}{\mathbf{\cdot }}{3}$ (94)
 > $\mathrm{Gcd}\left(\mathrm{u1},\mathrm{v1}\right)$
 ${1}$ (95)
 > $\mathrm{Factor}\left(\mathrm{u1},\mathrm{output}=\mathrm{inert}\right)$
 $\left({\mathbf{\omega }}{+}{1}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{+}{1}\right){\mathbf{\cdot }}\left({x}{+}{1}\right)$ (96)
 > $\mathrm{Factor}\left(\mathrm{v1},\mathrm{output}=\mathrm{inert}\right)$
 $\left({{\mathbf{\omega }}}^{{2}}{+}{1}\right){\mathbf{\cdot }}{2}$ (97)
 • Any ordinal of the form ${\mathbf{\omega }}^{e}+1$ with $e>0$ is multiplicatively irreducible, since the product of two ordinals with nonzero constant coefficients and with at least two terms each has at least three terms.
 • For factoring an ordinal, first the trailing coefficient can be extracted on the left.
 > $\mathrm{q1},\mathrm{r1}:=\mathrm{quo}\left(v,5\right),\mathrm{rem}\left(v,5\right)$
 ${\mathrm{q1}}{,}{\mathrm{r1}}{:=}{{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{1}{,}{0}$ (98)
 • For factoring an ordinal with the last two terms equal to ${\mathbf{\omega }}^{e}\cdot c+1$, where $e>0$ and $c>0$, you can extract the irreducible factor ${\mathbf{\omega }}^{e}+1$ on the right.
 > $\mathrm{q2},\mathrm{r2}:=\mathrm{quo}\left(\mathrm{q1},\mathrm{ω}+1\right),\mathrm{rem}\left(\mathrm{q1},\mathrm{ω}+1\right)$
 ${\mathrm{q2}}{,}{\mathrm{r2}}{:=}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{1}{,}{0}$ (99)
 • If the trailing term ${\mathbf{\omega }}^{d}$ is not a constant (that is, if $d>0$), it can be extracted as a left factor first, and the left quotient results by left subtracting $d$ from all exponents. So far, the partial factorization can be written as:
 > $v=\left(5&.\left(\mathrm{ω}+1\right)\right)&.\mathrm{q2}$
 ${{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}{=}{5}{\mathbf{\cdot }}\left({\mathbf{\omega }}{+}{1}\right){\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{1}\right)$ (100)
 > $\mathrm{value}\left(\right)$
 ${{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}{=}{{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (101)
 • Proceeding recursively with $\mathrm{q2}$ gives the full factorization of $v$ below. In fact, the integer coefficients in the factored normal form are identical to the integer coefficients in the CNF, just in reverse order. The exponents in the factored normal form are the left differences (see section Subtraction and comparison earlier) of the exponents in the CNF, also in reverse order. In the following example, the coefficients in the CNF are $\left[2,3,1,5\right]$ and the exponents are $\left[4,2,1,0\right]$:
 > $v$
 ${{\mathbf{\omega }}}^{{4}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{3}{+}{\mathbf{\omega }}{+}{5}$ (102)
 > $\mathrm{Factor}\left(v\right)$
 $\left[{1}{,}{5}{,}{\mathbf{\omega }}{+}{1}{,}{1}{,}{\mathbf{\omega }}{+}{1}{,}{3}{,}{{\mathbf{\omega }}}^{{2}}{+}{1}{,}{2}\right]$ (103)
 > $\mathrm{Factor}\left(v,\mathrm{output}=\mathrm{inert}\right)$
 ${5}{\mathbf{\cdot }}{\left({\mathbf{\omega }}{+}{1}\right)}^{{2}}{\mathbf{\cdot }}{3}{\mathbf{\cdot }}\left({{\mathbf{\omega }}}^{{2}}{+}{1}\right){\mathbf{\cdot }}{2}$ (104)
 • For ordinals without a constant term, factoring is not unique in general. As discussed in section Multiplication earlier, such an ordinal is left divisible by any ordinal of smaller degree, for example:
 > $\mathrm{inert}:=\left(\left({\mathrm{ω}}^{2}\right).\left(x+1\right)+\mathrm{ω}.y+z\right)&.\mathrm{ω}:$$\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathrm{inert}=\mathrm{value}\left(\mathrm{inert}\right)$
 $\left({{\mathbf{\omega }}}^{{2}}{\cdot }\left({x}{+}{1}\right){+}{\mathbf{\omega }}{\cdot }{y}{+}{z}\right){\mathbf{\cdot }}{\mathbf{\omega }}{=}{{\mathbf{\omega }}}^{{3}}$ (105)
 >