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

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 a≽b, 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 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&colon;a→[0&comma;y)&equals;x∈b&colon;x≺by. The left difference a−b then corresponds to x∈b&colon;x≽by.

• 

The following are equivalent:

– 

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

– 

a−b and Sub⁡a&comma;b return NULL.

– 

a≺b.

– 

a<b, b&gt;a and LessThan⁡a&comma;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.

Examples

> 

with⁡Ordinals

`+`&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)
> 

a≔Ordinal⁡ω&comma;3&comma;3&comma;5&comma;1&comma;1&comma;0&comma;4

a≔ωω⋅3&plus;ω3⋅5&plus;ω&plus;4

(2)
> 

b≔Ordinal⁡ω&comma;3&comma;3&comma;3&comma;2&comma;2

b≔ωω⋅3&plus;ω3⋅3&plus;ω2⋅2

(3)
> 

c≔Sub⁡a&comma;b

c≔ω3⋅2&plus;ω&plus;4

(4)
> 

c=a−b

ω3⋅2&plus;ω&plus;4=ω3⋅2&plus;ω&plus;4

(5)
> 

b+c=a

ωω⋅3&plus;ω3⋅5&plus;ω&plus;4=ωω⋅3&plus;ω3⋅5&plus;ω&plus;4

(6)
> 

LessThan⁡a&comma;b,a<b,a<b,a≤b,a≤b

false,false,false,false,false

(7)
> 

lprint⁡Sub⁡b&comma;a

NULL

> 

lprint⁡b−a

NULL

> 

LessThan⁡b&comma;a,b<a,b<a,b≤a,b≤a

true,true,true,true,true

(8)

The inert operators are useful for display purposes:

> 

result1≔a&−b&colon;

> 

result1=value⁡result1

ωω⋅3&plus;ω3⋅5&plus;ω&plus;4−ωω⋅3&plus;ω3⋅3&plus;ω2⋅2=ω3⋅2&plus;ω&plus;4

(9)
> 

result2≔a&<b&colon;

> 

result2=value⁡result2

ωω⋅3&plus;ω3⋅5&plus;ω&plus;4≺ωω⋅3&plus;ω3⋅3&plus;ω2⋅2=false

(10)
> 

a&>=b

ωω⋅3&plus;ω3⋅5&plus;ω&plus;4⪰ωω⋅3&plus;ω3⋅3&plus;ω2⋅2

(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:

> 

sort⁡a&comma;3&comma;b&comma;ω&comma;LessThan

3&comma;ω&comma;ωω⋅3&plus;ω3⋅3&plus;ω2⋅2&comma;ωω⋅3&plus;ω3⋅5&plus;ω&plus;4

(14)

Parametric examples:

> 

r≔Ordinal⁡3&comma;1&comma;2&comma;x&comma;0&comma;2

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

(15)
> 

s≔Ordinal⁡3&comma;1&comma;1&comma;2&comma;0&comma;1

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

(16)
> 

r−s

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

> 

s−r

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

> 

t≔Ordinal⁡3&comma;1&comma;2&comma;x+1&comma;0&comma;3

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

(17)
> 

t−r

ω2&plus;3

(18)
> 

r<t

true

(19)
> 

u≔Ordinal⁡3&comma;1&comma;2&comma;2&comma;0&comma;4

u≔ω3&plus;ω2⋅2&plus;4

(20)
> 

t<u

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

> 

Eval⁡t&comma;x=x+1<u

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

> 

Eval⁡t&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