Ordinals
Base
convert ordinals between bases
Calling Sequence
Parameters
Returns
Description
Examples
Compatibility
Base(a, b, output=o)
a, b
-
ordinals, nonnegative integers, or polynomials with positive integer coefficients
o
(optional) literal keyword; either list (default) or inert
By default, a list of pairs e1,c1,e2,c2,..., where each ei and ci is either an ordinal data structure, a nonnegative integer, or a polynomial with positive integer coefficients, and 0≺ci≺b for all i, where ≺ is the ordering of ordinals.
If output=inert is specified, then an inert sum of products of ordinal numbers using the inert operators &+, &. and &^, respectively, is returned.
The Base(a,b) calling sequence expresses the ordinal a in terms of powers of the base b instead of the standard base ω.
By default, the result is returned as a list of pairs e1,c1,e2,c2,... such that
a=be1⋅c1+be2⋅c2+⋯
e1≻e2≻⋯ and 0≺ci≺b for all i. Use output=inert to return the above sum-of-products form instead; see the Returns section.
This representation is unique if b≽2. If b=0 or b=1, a division by zero error is raised.
The exponents ei are not converted recursively; they are still represented in Cantor normal form (with respect to base ω).
If b≼ω, then all coefficients ci are either positive integers or polynomials with positive integer coefficients. In particular, if b=ω, then the ei and ci are just the exponents and coefficients of a in the Cantor normal form. Otherwise, if b≻ω, some of the coefficients will be proper ordinals ≽ω.
The output representation is computed by calling the Log command repeatedly: if l,q,r=Log⁡a,b, then Base⁡a,b=l,q,op⁡Base⁡r,b.
If one of a and b is a parametric ordinal and the logarithm cannot be taken, an error is 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⁡5,1,4,4,2,2,1,1,0,3
a≔ω5+ω4⋅4+ω2⋅2+ω+3
b≔Ordinal⁡2,1,0,3
b≔ω2+3
Base⁡a,b
2,ω+3,1,ω2+2,0,ω+3
l,q,r≔Log⁡a,b
l,q,r≔2,ω+3,ω4+ω2⋅2+ω+3
Base⁡r,b
1,ω2+2,0,ω+3
Base⁡a,b,output=inert
ω2+32⋅ω+3+ω2+3⋅ω2+2+ω+3
value⁡
ω5+ω4⋅4+ω2⋅2+ω+3
Parametric examples.
Base⁡a,ω2+2+x
Error, (in Ordinals:-Sub) unable to subtract 2+x from 2
Base⁡a,ω2+3+x
Base⁡a,ω2+3+x,output=inert
ω2+3+x2⋅ω+3+ω2+3+x⋅ω2+2+ω+3
Base⁡a,ω2+2
2,ω+4,0,ω+3
Base⁡a,ω2+1
2,ω+4,1,1,0,ω+3
Base⁡a,ω2
2,ω+4,1,2,0,ω+3
Base⁡a,ω+4+x
4,ω+3,3,ω,2,1,1,ω,0,ω+3
Base⁡a,ω+3
5,1,3,ω,2,1,1,ω+1
Base⁡a,ω+2
5,1,4,1,3,ω,2,1,1,ω+1,0,1
Base⁡a,ω+1
5,1,4,2,3,ω,2,2,0,2
Base⁡a,ω=op⁡a
5,1,4,4,2,2,1,1,0,3=5,1,4,4,2,2,1,1,0,3
When the base is constant.
Base⁡a,5
ω⋅5,1,ω⋅4,4,ω⋅2,2,ω,1,0,3
Base⁡a,5,output=inert
5ω⋅5+5ω⋅4⋅4+5ω⋅2⋅2+5ω+3
Base⁡a,4
ω⋅5,1,ω⋅4+1,1,ω⋅2,2,ω,1,0,3
Base⁡a,3
ω⋅5,1,ω⋅4+1,1,ω⋅4,1,ω⋅2,2,ω,1,1,1
Base⁡a,2
ω⋅5,1,ω⋅4+2,1,ω⋅2+1,1,ω,1,1,1,0,1
If both a and b are integers, this is the usual base b representation.
100=Base⁡100,3,output=inert
100=35+33⋅2+3
Example with nonconstant exponents.
b≔ω·2+3
b≔ω⋅2+3
bb
ωω⋅2+3⋅2+ωω⋅2+2⋅6+ωω⋅2+1⋅6+ωω⋅2⋅3
a≔Dec⁡+x
a≔ωω⋅2+3⋅2+ωω⋅2+2⋅6+ωω⋅2+1⋅6+ωω⋅2⋅2+ωω+1+x
r≔Base⁡a,b
r≔ω⋅2+2,ω⋅2+2,ω⋅2+1,ω⋅2+2,ω⋅2,ω⋅2+2,ω,ω,0,x
`+`⁡seq⁡bri,1·ri,2,i=1..nops⁡r
ωω⋅2+3⋅2+ωω⋅2+2⋅6+ωω⋅2+1⋅6+ωω⋅2⋅2+ωω+1+x
The Ordinals[Base] command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Ordinals[Log]
Ordinals[Ordinal]
Ordinals[Power]
value
Download Help Document