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

Online Help

All Products    Maple    MapleSim


Ordinals[Ordinal]

construct ordinal number data structure

Ordinals[omega]

ordinal for natural numbers

type/ordinal

check for an ordinal

 

Calling Sequence

Parameters

Returns

Description

Examples

Compatibility

Calling Sequence

Ordinal(c)

Ordinal([[e1,c1], [e2,c2], ...])

omega

type(a, ordinal)

Parameters

c, c1, c2, ...

-

non-negative integers or polynomials with positive integer coefficients

e1, e2, ...

-

ordinals or non-negative integers

a

-

any expression

Returns

• 

The Ordinal calling sequences return either a non-negative integer, a polynomial with positive integer coefficients, or an ordinal data structure.

• 

The omega calling sequence returns the ordinal data structure ORDINAL([[1,1]]) representing the natural numbers.

• 

The type(a, ordinal) calling sequence returns either true or false.

Description

• 

A (non-parametric) ordinal number is represented either by a non-negative integer or by an ordinal data structure in Cantor normal form. The second option is of the form:

ORDINALe1,c1,e2,c2,...

  

where ORDINAL is a literal keyword, e1,e2,... are non-negative integers or themselves ordinal data structures, recursively, and c1,c2,... are positive integers. This represents the ordinal number:

ωe1c1+ωe2c2+

  

where ω is the ordinal representing the natural numbers  equipped with their standard ordering.

• 

Moreover, the exponents are sorted, that is, e1e2, where  is the (strict) ordering of ordinals.

• 

Finally, there must be at least one term [e1,c1], and e1 cannot be zero - an ordinal that is actually a non-negative integer is represented as such and not by an ordinal data structure.

• 

The Ordinal command constructs such an ordinal data structure. It is recommended to always use this constructor and not form the data structure directly using the ORDINAL keyword. It is safer to use the Ordinal command because it ensures that the result is a valid ordinal data structure.

• 

The omega calling sequence creates and returns an ordinal data structure, namely, ORDINAL([[1,1]]), for ω itself.

• 

The type(a, ordinal) calling sequence checks whether a is an ordinal data structure of the form described above, and if so, returns true, and otherwise false. In particular, the return value is false if a is a non-negative integer.

• 

The Ordinals package can only handle (and the Ordinal constructor can only form) ordinal numbers smaller than ϵ0, that is, ordinal numbers that can be constructed from ω and positive integers in a finite number of steps by ordinal addition, multiplication, and exponentiation.

• 

In addition to the non-parametric ordinals described earlier, the Ordinals package can also handle parametric ordinals. These are ordinals where the coefficients ci may contain parameters, that is, names, such as x or y2, occurring polynomially and with positive integer coefficients. The Ordinal command allows the construction of a parametric ordinal.

• 

All parameters are implicitly assumed to represent non-negative integers.

• 

A parametric coefficient ci in an ordinal data structure is always in expanded form.

• 

Currently the exponents ei cannot be parametric, and if they are themselves ordinals, their coefficients cannot contain parameters, either.

• 

The type(a, ordinal) calling sequence checks if a is a valid (possibly parametric) ordinal data structure, and returns true if that is the case and false otherwise. If a is an integer or a polynomial with positive integer coefficients, the result is false.

• 

If the argument to the Ordinal command represents an ordinal smaller than ω, that is, a non-negative integer, then the return value is not an ordinal data structure but either a non-negative integer, if there are no parameters, or a polynomial in the parameters with positive integer coefficients. In particular, when the Ordinal(c) calling sequence is used, where c is a non-negative integer or a polynomial with positive integer coefficients, then the return value is c.

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)

o0Ordinal2&comma;2&comma;1&comma;3&comma;0&comma;4

o0ω22&plus;ω3&plus;4

(2)

lprinto0&colon;

ORDINAL([[2, 2], [1, 3], [0, 4]])

Ordinal1&comma;1=ω

ω=ω

(3)

Coefficients that are 0 are removed automatically.

Ordinal3&comma;0&comma;2&comma;2&comma;1&comma;0&comma;0&comma;4

ω22&plus;4

(4)

Terms out of order are removed as well; smaller terms from the left are absorbed by larger terms from the right.

Ordinal4&comma;3&comma;2&comma;2&comma;3&comma;1&comma;0&comma;5

ω43&plus;ω3&plus;5

(5)

After removal of out-of-order terms, the coefficients of neighboring terms with the same exponents are combined additively.

o1Ordinal4&comma;3&comma;3&comma;2&comma;2&comma;2&comma;3&comma;1&comma;3&comma;4&comma;2&comma;3&comma;0&comma;5

o1ω43&plus;ω37&plus;ω23&plus;5

(6)

If, after all of the above simplifications, what remains represents a non-negative integer, it will be converted into one.

o2Ordinal0&comma;3&comma;2&comma;0&comma;0&comma;4

o27

(7)

typeo1&comma;ordinal

true

(8)

typeo2&comma;ordinal

false

(9)

Ordinal

0

(10)

Exponents can be ordinals themselves.

o3Ordinalo1&comma;3&comma;2&comma;1&comma;1&comma;4

o3ωω43&plus;ω37&plus;ω23&plus;53&plus;ω2&plus;ω4

(11)

o4Ordinalo3&comma;1&comma;o1&comma;2&comma;1&comma;3&comma;0&comma;4

o4ωωω43&plus;ω37&plus;ω23&plus;53&plus;ω2&plus;ω4&plus;ωω43&plus;ω37&plus;ω23&plus;52&plus;ω3&plus;4

(12)

typeo3&comma;ordinal,typeo4&comma;ordinal

true,true

(13)

lprinto4&colon;

ORDINAL([[ORDINAL([[ORDINAL([[4, 3], [3, 7], [2, 3], [0, 5]]), 3], [2, 1], [1, 4]]), 1], [ORDINAL([[4, 3], [3, 7], [2, 3], [0, 5]]), 2], [1, 3], [0, 4]])

An ordinal with two parameters.

o5Ordinalω&comma;xx+y&comma;2&comma;y2+1&comma;0&comma;4

o5ωωx2+xy&plus;ω2y2+1&plus;4

(14)

typeo5&comma;ordinal

true

(15)

Neither coefficients nor exponents can be negative.

Ordinal3&comma;2&comma;1&comma;5

Error, (in Ordinals:-Ordinal) invalid argument, [[3, 2], [1, -5]]

Ordinal3&comma;2&comma;1&comma;x5

Error, (in Ordinals:-Ordinal) invalid argument, [[3, 2], [1, x-5]]

Ordinal3&comma;2&comma;1&comma;5

Error, (in Ordinals:-Ordinal) invalid argument, [[3, 2], [-1, 5]]

Exponents cannot contain parameters.

Ordinalo5&comma;2&comma;3&comma;1

Error, (in Ordinals:-Ordinal) cannot handle parametric exponent(s)

Compatibility

• 

The Ordinals[Ordinal], Ordinals[omega] and type/ordinal commands were introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

Ordinals

Ordinals[Add]

Ordinals[LessThan]