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

Online Help

All Products    Maple    MapleSim


Ordinals

  

Base

  

convert ordinals between bases

 

Calling Sequence

Parameters

Returns

Description

Examples

Compatibility

Calling Sequence

Base(a, b, output=o)

Parameters

a, b

-

ordinals, nonnegative integers, or polynomials with positive integer coefficients

o

-

(optional) literal keyword; either list (default) or inert

Returns

• 

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.

Description

• 

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.

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⁡5&comma;1&comma;4&comma;4&comma;2&comma;2&comma;1&comma;1&comma;0&comma;3

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

(2)
> 

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

b≔ω2&plus;3

(3)
> 

Base⁡a&comma;b

2&comma;ω&plus;3&comma;1&comma;ω2&plus;2&comma;0&comma;ω&plus;3

(4)
> 

l,q,r≔Log⁡a&comma;b

l,q,r≔2,ω&plus;3,ω4&plus;ω2⋅2&plus;ω&plus;3

(5)
> 

Base⁡r&comma;b

1&comma;ω2&plus;2&comma;0&comma;ω&plus;3

(6)
> 

Base⁡a&comma;b&comma;output=inert

ω2&plus;32⋅ω&plus;3&plus;ω2&plus;3⋅ω2&plus;2&plus;ω&plus;3

(7)
> 

value⁡

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

(8)

Parametric examples.

> 

Base⁡a&comma;ω2+2+x

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

> 

Base⁡a&comma;ω2+3+x

2&comma;ω&plus;3&comma;1&comma;ω2&plus;2&comma;0&comma;ω&plus;3

(9)
> 

Base⁡a&comma;ω2+3+x&comma;output=inert

ω2&plus;3+x2⋅ω&plus;3&plus;ω2&plus;3+x⋅ω2&plus;2&plus;ω&plus;3

(10)
> 

value⁡

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

(11)
> 

Base⁡a&comma;ω2+2

2&comma;ω&plus;4&comma;0&comma;ω&plus;3

(12)
> 

Base⁡a&comma;ω2+1

2&comma;ω&plus;4&comma;1&comma;1&comma;0&comma;ω&plus;3

(13)
> 

Base⁡a&comma;ω2

2&comma;ω&plus;4&comma;1&comma;2&comma;0&comma;ω&plus;3

(14)
> 

Base⁡a&comma;ω+4+x

4&comma;ω&plus;3&comma;3&comma;ω&comma;2&comma;1&comma;1&comma;ω&comma;0&comma;ω&plus;3

(15)
> 

Base⁡a&comma;ω+3

5&comma;1&comma;3&comma;ω&comma;2&comma;1&comma;1&comma;ω&plus;1

(16)
> 

Base⁡a&comma;ω+2

5&comma;1&comma;4&comma;1&comma;3&comma;ω&comma;2&comma;1&comma;1&comma;ω&plus;1&comma;0&comma;1

(17)
> 

Base⁡a&comma;ω+1

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

(18)
> 

Base⁡a&comma;ω=op⁡a

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

(19)

When the base is constant.

> 

Base⁡a&comma;5

ω⋅5&comma;1&comma;ω⋅4&comma;4&comma;ω⋅2&comma;2&comma;ω&comma;1&comma;0&comma;3

(20)
> 

Base⁡a&comma;5&comma;output=inert

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

(21)
> 

Base⁡a&comma;4

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

(22)
> 

Base⁡a&comma;3

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

(23)
> 

Base⁡a&comma;2

ω⋅5&comma;1&comma;ω⋅4&plus;2&comma;1&comma;ω⋅2&plus;1&comma;1&comma;ω&comma;1&comma;1&comma;1&comma;0&comma;1

(24)

If both a and b are integers, this is the usual base b representation.

> 

100=Base⁡100&comma;3&comma;output=inert

100=35&plus;33⋅2&plus;3

(25)

Example with nonconstant exponents.

> 

b≔ω·2+3

b≔ω⋅2&plus;3

(26)
> 

bb

ωω⋅2&plus;3⋅2&plus;ωω⋅2&plus;2⋅6&plus;ωω⋅2&plus;1⋅6&plus;ωω⋅2⋅3

(27)
> 

a≔Dec⁡+x

a≔ωω⋅2&plus;3⋅2&plus;ωω⋅2&plus;2⋅6&plus;ωω⋅2&plus;1⋅6&plus;ωω⋅2⋅2&plus;ωω&plus;1&plus;x

(28)
> 

r≔Base⁡a&comma;b

r≔ω⋅2&plus;2&comma;ω⋅2&plus;2&comma;ω⋅2&plus;1&comma;ω⋅2&plus;2&comma;ω⋅2&comma;ω⋅2&plus;2&comma;ω&comma;ω&comma;0&comma;x

(29)
> 

`+`⁡seq⁡bri,1·ri,2&comma;i=1..nops⁡r

ωω⋅2&plus;3⋅2&plus;ωω⋅2&plus;2⋅6&plus;ωω⋅2&plus;1⋅6&plus;ωω⋅2⋅2&plus;ωω&plus;1&plus;x

(30)

Compatibility

• 

The Ordinals[Base] command was introduced in Maple 2015.

• 

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

See Also

Ordinals

Ordinals[Log]

Ordinals[Ordinal]

Ordinals[Power]

value