Ordinals[Sub]
left ordinal subtraction
-
&-
inert left ordinal subtraction
Ordinals[LessThan]
strict ordinal comparison
Ordinals[`<`]
Ordinals[`<=`]
non-strict ordinal comparison
&<, &>
inert strict ordinal comparison
&<=, &>=
inert non-strict ordinal comparison
Calling Sequence
Parameters
Returns
Description
Examples
Compatibility
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
a, b
ordinals, nonnegative integers, or polynomials with positive integer coefficients
Sub and - return an ordinal data structure, a nonnegative integer, a polynomial with positive integer coefficients, or NULL.
LessThan, <, >, <=, and >= return either true or false.
The Sub(a, b) and a - b calling sequences perform left subtraction of ordinal numbers.
If a≽b, where ≽ 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≺b, the return value is NULL.
The LessThan(a, b) and a < b calling sequences compare the two ordinal numbers a and b with respect to the strict ordering ≺ of ordinal numbers, which means, they return true if and only if a≺b, and false otherwise.
The a <= b calling sequence compares a and b with respect to the non-strict ordering ≼, that is, it returns true if and only if a=b or a≺b, and false otherwise.
The a > b and a >= b calling sequences are equivalent to b < a and b <= a, respectively.
Mathematically, a≺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∈b and a monotone bijection f:a→[0,y)=x∈b:x≺by. The left difference a−b then corresponds to x∈b:x≽by.
The following are equivalent:
There is no ordinal number c satisfying b+c=a.
a−b and Sub⁡a,b return NULL.
a≺b.
a<b, b>a and LessThan⁡a,b return true.
a≥b and b≤a return 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.
with⁡Ordinals
`+`,`.`,`<`,<=,Add,Base,Dec,Decompose,Div,Eval,Factor,Gcd,Lcm,LessThan,Log,Max,Min,Mult,Ordinal,Power,Split,Sub,`^`,degree,lcoeff,log,lterm,ω,quo,rem,tcoeff,tdegree,tterm
a≔Ordinal⁡ω,3,3,5,1,1,0,4
a≔ωω⋅3+ω3⋅5+ω+4
b≔Ordinal⁡ω,3,3,3,2,2
b≔ωω⋅3+ω3⋅3+ω2⋅2
c≔Sub⁡a,b
c≔ω3⋅2+ω+4
c=a−b
ω3⋅2+ω+4=ω3⋅2+ω+4
b+c=a
ωω⋅3+ω3⋅5+ω+4=ωω⋅3+ω3⋅5+ω+4
LessThan⁡a,b,a<b,a<b,a≤b,a≤b
false,false,false,false,false
lprint⁡Sub⁡b,a
NULL
lprint⁡b−a
LessThan⁡b,a,b<a,b<a,b≤a,b≤a
true,true,true,true,true
The inert operators are useful for display purposes:
result1≔a&−b:
result1=value⁡result1
ωω⋅3+ω3⋅5+ω+4−ωω⋅3+ω3⋅3+ω2⋅2=ω3⋅2+ω+4
result2≔a&<b:
result2=value⁡result2
ωω⋅3+ω3⋅5+ω+4≺ωω⋅3+ω3⋅3+ω2⋅2=false
a&>=b
ωω⋅3+ω3⋅5+ω+4⪰ωω⋅3+ω3⋅3+ω2⋅2
Any of the arguments can be a nonnegative integer:
ω−3
ω
3<ω
true
The sort command can be used to sort a list of ordinals in increasing order:
sort⁡a,3,b,ω,LessThan
3,ω,ωω⋅3+ω3⋅3+ω2⋅2,ωω⋅3+ω3⋅5+ω+4
Parametric examples:
r≔Ordinal⁡3,1,2,x,0,2
r≔ω3+ω2⋅x+2
s≔Ordinal⁡3,1,1,2,0,1
s≔ω3+ω⋅2+1
r−s
Error, (in Ordinals:-Sub) cannot determine if x is nonzero
s−r
t≔Ordinal⁡3,1,2,x+1,0,3
t≔ω3+ω2⋅x+1+3
t−r
ω2+3
r<t
u≔Ordinal⁡3,1,2,2,0,4
u≔ω3+ω2⋅2+4
t<u
Error, (in Ordinals:-Sub) unable to subtract 2 from x+1
Eval⁡t,x=x+1<u
Error, (in Ordinals:-Sub) unable to subtract
Eval⁡t,x=x+2<u
false
The Ordinals[Sub], -, &-, Ordinals[LessThan], Ordinals[`<`], Ordinals[`<=`], &<, &> and &<=, &>= commands were introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Ordinals
Ordinals[Max]
Ordinals[Ordinal]
sort
value
Download Help Document