< - Maple Help

Ordinals[Sub]

left ordinal subtraction

-

left ordinal subtraction

&-

inert left ordinal subtraction

Ordinals[LessThan]

strict ordinal comparison

Ordinals[<]

strict ordinal comparison

Ordinals[<=]

non-strict ordinal comparison

&<, &>

inert strict ordinal comparison

&<=, &>=

inert non-strict ordinal comparison

 Calling Sequence Sub(a, b) a - b a &- b LessThan(a, b) a < b a > b a <= b a >= b a &< b a &> b a &<= b a &>= b

Parameters

 a, b - ordinals, nonnegative integers, or polynomials with positive integer coefficients

Returns

 • Sub and - return an ordinal data structure, a nonnegative integer, a polynomial with positive integer coefficients, or $\mathrm{NULL}$.
 • LessThan, <, >, <=, and >= return either true or false.

Description

 • The Sub(a, b) and a - b calling sequences perform left subtraction of ordinal numbers.
 – If $a\succcurlyeq b$, where $\succcurlyeq$ is the non-strict ordering of ordinal numbers, both return the unique ordinal number $c$ satisfying $b+c=a$. In particular, the return value is $0$ if and only if $a=b$.
 – Otherwise, if $a\prec b$, the return value is $\mathrm{NULL}$.
 • The LessThan(a, b) and a < b calling sequences compare the two ordinal numbers $a$  and $b$ with respect to the strict ordering $\prec$ of ordinal numbers, which means, they return $\mathrm{true}$ if and only if $a\prec b$, and $\mathrm{false}$ otherwise.
 • The a <= b calling sequence compares $a$ and $b$ with respect to the non-strict ordering $\preccurlyeq$, that is, it returns $\mathrm{true}$ if and only if $a=b$ or $a\prec b$, and $\mathrm{false}$ otherwise.
 • The a > b and a >= b calling sequences are equivalent to b < a and b <= a, respectively.
 • Mathematically, $a\prec b$ if and only if the well-ordering represented by $a$ is isomorphic to an initial segment of the well-ordering represented by $b$, that is, there is an element $y\in b$ and a monotone bijection $f:a\to \mathrm{\left[}0,y\mathrm{\right)}\phantom{\rule[-0.0ex]{1.0ex}{0.0ex}}=\left\{x\in b:\phantom{\rule[-0.0ex]{1.0ex}{0.0ex}}x\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}{\prec }_{b}\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}y\right\}$. The left difference $a-b$ then corresponds to $\left\{x\in b:\phantom{\rule[-0.0ex]{1.0ex}{0.0ex}}x\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}{\succcurlyeq }_{b}\phantom{\rule[-0.0ex]{0.5ex}{0.0ex}}y\right\}$.
 • The following are equivalent:
 – There is no ordinal number $c$ satisfying $b+c=a$.
 – $a-b$ and $\mathrm{Sub}\left(a,b\right)$ return $\mathrm{NULL}$.
 – $a\prec b$.
 – $a, $b>a$ and $\mathrm{LessThan}\left(a,b\right)$ return $\mathrm{true}$.
 – $a\ge b$ and $b\le a$ return $\mathrm{false}$.
 • The &- calling sequence is the inert form of left ordinal subtraction. No actual subtraction is performed, but the result will be rendered as an inert difference, with parentheses around the arguments if necessary.
 • The &<, &>, &<= and &>= calling sequences are inert forms of strict and non-strict ordinal comparison, respectively. No actual comparison is performed, but the result will be rendered as an inert relation, with parentheses around the arguments if necessary.
 • Applying the value command will turn the inactive &-, &<, &>, &<= and &>= operators into the corresponding active counterparts, causing the ordinal subtraction or comparison, respectively, to be computed as described above.
 • All above calling sequences support parametric ordinals. If $a$ or $b$ is a parametric ordinal and the left difference $a-b$ cannot be determined, 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)
 > $a≔\mathrm{Ordinal}\left(\left[\left[\mathrm{ω},3\right],\left[3,5\right],\left[1,1\right],\left[0,4\right]\right]\right)$
 ${a}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}$ (2)
 > $b≔\mathrm{Ordinal}\left(\left[\left[\mathrm{ω},3\right],\left[3,3\right],\left[2,2\right]\right]\right)$
 ${b}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}$ (3)
 > $c≔\mathrm{Sub}\left(a,b\right)$
 ${c}{≔}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{4}$ (4)
 > $c=a-b$
 ${{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{4}{=}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{4}$ (5)
 > $b+c=a$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}{=}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}$ (6)
 > $\mathrm{LessThan}\left(a,b\right),a
 ${\mathrm{false}}{,}{\mathrm{false}}{,}{\mathrm{false}}{,}{\mathrm{false}}{,}{\mathrm{false}}$ (7)
 > $\mathrm{lprint}\left(\mathrm{Sub}\left(b,a\right)\right)$
 NULL
 > $\mathrm{lprint}\left(b-a\right)$
 NULL
 > $\mathrm{LessThan}\left(b,a\right),b
 ${\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{true}}$ (8)

The inert operators are useful for display purposes:

 > $\mathrm{result1}≔a&-b:$
 > $\mathrm{result1}=\mathrm{value}\left(\mathrm{result1}\right)$
 $\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}\right){\mathbf{-}}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}\right){=}{{\mathbf{\omega }}}^{{3}}{\cdot }{2}{+}{\mathbf{\omega }}{+}{4}$ (9)
 > $\mathrm{result2}≔a&
 > $\mathrm{result2}=\mathrm{value}\left(\mathrm{result2}\right)$
 $\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}\right){\mathbf{\prec }}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}\right){=}{\mathrm{false}}$ (10)
 > $a&>=b$
 $\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}\right){\mathbf{⪰}}\left({{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}\right)$ (11)

Any of the arguments can be a nonnegative integer:

 > $\mathrm{ω}-3$
 ${\mathbf{\omega }}$ (12)
 > $3<\mathrm{ω}$
 ${\mathrm{true}}$ (13)

The sort command can be used to sort a list of ordinals in increasing order:

 > $\mathrm{sort}\left(\left[a,3,b,\mathrm{ω}\right],\mathrm{LessThan}\right)$
 $\left[{3}{,}{\mathbf{\omega }}{,}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{,}{{\mathbf{\omega }}}^{{\mathbf{\omega }}}{\cdot }{3}{+}{{\mathbf{\omega }}}^{{3}}{\cdot }{5}{+}{\mathbf{\omega }}{+}{4}\right]$ (14)

Parametric examples:

 > $r≔\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[2,x\right],\left[0,2\right]\right]\right)$
 ${r}{≔}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{x}{+}{2}$ (15)
 > $s≔\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[1,2\right],\left[0,1\right]\right]\right)$
 ${s}{≔}{{\mathbf{\omega }}}^{{3}}{+}{\mathbf{\omega }}{\cdot }{2}{+}{1}$ (16)
 > $r-s$
 > $s-r$
 > $t≔\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[2,x+1\right],\left[0,3\right]\right]\right)$
 ${t}{≔}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }\left({x}{+}{1}\right){+}{3}$ (17)
 > $t-r$
 ${{\mathbf{\omega }}}^{{2}}{+}{3}$ (18)
 > $r
 ${\mathrm{true}}$ (19)
 > $u≔\mathrm{Ordinal}\left(\left[\left[3,1\right],\left[2,2\right],\left[0,4\right]\right]\right)$
 ${u}{≔}{{\mathbf{\omega }}}^{{3}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{4}$ (20)
 > $t
 > $\genfrac{}{}{0}{}{t}{\phantom{x=x+1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{t}}{x=x+1}
 > $\genfrac{}{}{0}{}{t}{\phantom{x=x+2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{t}}{x=x+2}
 ${\mathrm{false}}$ (21)

Compatibility

 • The Ordinals[Sub], -, &-, Ordinals[LessThan], Ordinals[<], Ordinals[<=], &<, &> and &<=, &>= commands were introduced in Maple 2015.