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
Ordinal(c)
Ordinal([[e1,c1], [e2,c2], ...])
omega
type(a, ordinal)
c, c1, c2, ...
-
non-negative integers or polynomials with positive integer coefficients
e1, e2, ...
ordinals or non-negative integers
a
any expression
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.
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:
ORDINAL⁡e1,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:
ωe1⋅c1+ωe2⋅c2+⋯
where ω is the ordinal representing the natural numbers ℕ equipped with their standard ordering.
Moreover, the exponents are sorted, that is, e1≻e2≻⋯, 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.
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
o0≔Ordinal⁡2,2,1,3,0,4
o0≔ω2⋅2+ω⋅3+4
lprint⁡o0:
ORDINAL([[2, 2], [1, 3], [0, 4]])
Ordinal⁡1,1=ω
ω=ω
Coefficients that are 0 are removed automatically.
Ordinal⁡3,0,2,2,1,0,0,4
ω2⋅2+4
Terms out of order are removed as well; smaller terms from the left are absorbed by larger terms from the right.
Ordinal⁡4,3,2,2,3,1,0,5
ω4⋅3+ω3+5
After removal of out-of-order terms, the coefficients of neighboring terms with the same exponents are combined additively.
o1≔Ordinal⁡4,3,3,2,2,2,3,1,3,4,2,3,0,5
o1≔ω4⋅3+ω3⋅7+ω2⋅3+5
If, after all of the above simplifications, what remains represents a non-negative integer, it will be converted into one.
o2≔Ordinal⁡0,3,2,0,0,4
o2≔7
type⁡o1,ordinal
true
type⁡o2,ordinal
false
Ordinal⁡
0
Exponents can be ordinals themselves.
o3≔Ordinal⁡o1,3,2,1,1,4
o3≔ωω4⋅3+ω3⋅7+ω2⋅3+5⋅3+ω2+ω⋅4
o4≔Ordinal⁡o3,1,o1,2,1,3,0,4
o4≔ωωω4⋅3+ω3⋅7+ω2⋅3+5⋅3+ω2+ω⋅4+ωω4⋅3+ω3⋅7+ω2⋅3+5⋅2+ω⋅3+4
type⁡o3,ordinal,type⁡o4,ordinal
true,true
lprint⁡o4:
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.
o5≔Ordinal⁡ω,x⁢x+y,2,y2+1,0,4
o5≔ωω⋅x2+x⁢y+ω2⋅y2+1+4
type⁡o5,ordinal
Neither coefficients nor exponents can be negative.
Ordinal⁡3,2,1,−5
Error, (in Ordinals:-Ordinal) invalid argument, [[3, 2], [1, -5]]
Ordinal⁡3,2,1,x−5
Error, (in Ordinals:-Ordinal) invalid argument, [[3, 2], [1, x-5]]
Ordinal⁡3,2,−1,5
Error, (in Ordinals:-Ordinal) invalid argument, [[3, 2], [-1, 5]]
Exponents cannot contain parameters.
Ordinal⁡o5,2,3,1
Error, (in Ordinals:-Ordinal) cannot handle parametric exponent(s)
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]
Download Help Document