< - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

Parameters

Returns

Description

Examples

Compatibility

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 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 ab, where  is the non-strict ordering of ordinal numbers, both return the unique ordinal number c satisfying b&plus;c&equals;a. In particular, the return value is 0 if and only if a=b.

– 

Otherwise, if ab, 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 ab, 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 ab, and false otherwise.

• 

The a > b and a >= b calling sequences are equivalent to b < a and b <= a, respectively.

• 

Mathematically, ab 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 yb and a monotone bijection f&colon;a[0&comma;y)&equals;xb&colon;xby. The left difference ab then corresponds to xb&colon;xby.

• 

The following are equivalent:

– 

There is no ordinal number c satisfying b&plus;c&equals;a.

– 

ab and Suba&comma;b return NULL.

– 

ab.

– 

a<b, b&gt;a and LessThana&comma;b return true.

– 

ab and ba 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 ab cannot be determined, an error will be raised.

Examples

withOrdinals

`+`&comma;`.`&comma;`<`&comma;<=&comma;Add&comma;Base&comma;Dec&comma;Decompose&comma;Div&comma;Eval&comma;Factor&comma;Gcd&comma;Lcm&comma;LessThan&comma;Log&comma;Max&comma;Min&comma;Mult&comma;Ordinal&comma;Power&comma;Split&comma;Sub&comma;`^`&comma;degree&comma;lcoeff&comma;log&comma;lterm&comma;ω&comma;quo&comma;rem&comma;tcoeff&comma;tdegree&comma;tterm

(1)

aOrdinalω&comma;3&comma;3&comma;5&comma;1&comma;1&comma;0&comma;4

aωω3&plus;ω35&plus;ω&plus;4

(2)

bOrdinalω&comma;3&comma;3&comma;3&comma;2&comma;2

bωω3&plus;ω33&plus;ω22

(3)

cSuba&comma;b

cω32&plus;ω&plus;4

(4)

c=ab

ω32&plus;ω&plus;4=ω32&plus;ω&plus;4

(5)

b+c=a

ωω3&plus;ω35&plus;ω&plus;4=ωω3&plus;ω35&plus;ω&plus;4

(6)

LessThana&comma;b,a<b,a<b,ab,ab

false,false,false,false,false

(7)

lprintSubb&comma;a

NULL

lprintba

NULL

LessThanb&comma;a,b<a,b<a,ba,ba

true,true,true,true,true

(8)

The inert operators are useful for display purposes:

result1a&−b&colon;

result1=valueresult1

ωω3&plus;ω35&plus;ω&plus;4ωω3&plus;ω33&plus;ω22=ω32&plus;ω&plus;4

(9)

result2a&<b&colon;

result2=valueresult2

ωω3&plus;ω35&plus;ω&plus;4ωω3&plus;ω33&plus;ω22=false

(10)

a&>=b

ωω3&plus;ω35&plus;ω&plus;4ωω3&plus;ω33&plus;ω22

(11)

Any of the arguments can be a nonnegative integer:

ω3

ω

(12)

3<ω

true

(13)

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

sorta&comma;3&comma;b&comma;ω&comma;LessThan

3&comma;ω&comma;ωω3&plus;ω33&plus;ω22&comma;ωω3&plus;ω35&plus;ω&plus;4

(14)

Parametric examples:

rOrdinal3&comma;1&comma;2&comma;x&comma;0&comma;2

rω3&plus;ω2x&plus;2

(15)

sOrdinal3&comma;1&comma;1&comma;2&comma;0&comma;1

sω3&plus;ω2&plus;1

(16)

rs

Error, (in Ordinals:-Sub) cannot determine if x is nonzero

sr

Error, (in Ordinals:-Sub) cannot determine if x is nonzero

tOrdinal3&comma;1&comma;2&comma;x+1&comma;0&comma;3

tω3&plus;ω2x+1&plus;3

(17)

tr

ω2&plus;3

(18)

r<t

true

(19)

uOrdinal3&comma;1&comma;2&comma;2&comma;0&comma;4

uω3&plus;ω22&plus;4

(20)

t<u

Error, (in Ordinals:-Sub) unable to subtract 2 from x+1

Evalt&comma;x=x+1<u

Error, (in Ordinals:-Sub) unable to subtract

Evalt&comma;x=x+2<u

false

(21)

Compatibility

• 

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