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

Online Help

All Products    Maple    MapleSim


Ordinals

 

Ordinals crash course, or: What is ω?

Constructing ordinals

Ordinal arithmetic

Multiplication

Powering

Subtraction and comparison

Inverse operations

Logarithms and base conversion

Gcd and factorization

Ordinals crash course, or: What is ω?

Short answer: ω =  endowed with its natural ordering 0<1<2<

What if you add a largest possible element?

ω&plus;1&equals;ω&equals;0<1<2<<

What if you add a new smallest element?

1&plus;ω&equals;ω&equals;<0<1<2<

ω

So:

1&plus;ω&equals;ω<ω&plus;1

(Read "is isomorphic to" for &equals; and "is (isomorphic to) an initial segment of" for ).

Note that ω is not isomorphic to ω&plus;1, since ω&plus;1 has a largest element, namely , while ω does not.

 Moving on:

ω&plus;2&equals;0<1<2<<<&plus;1

2&plus;ω&equals;1<<0<1<2<&equals;ω

 and

2&plus;ω&equals;1&plus;ω&equals;ω< &omega;&plus;1<ω&plus;2

 Keep going: for any positive integer n

n&plus;ω&equals;ω<ω&plus;1<ω&plus;2<<ω&plus;n<<&quest;

 Answer:

&quest;&equals;ω&plus;ω&equals;ω2  (2 copies of ω)

 You can identify each natural number n with the ordered set of integers smaller than n:

n&equals;0<1<2<<n1

 (Note: in contrast to the 0<1<2<< cases earlier, the  in this "definition" is finite.)

 Then:

0&equals;&equals;

1&equals;0&equals;

2&equals;0<1&equals;<

3&equals;0<1<2&equals;<<&comma;

4&equals;0<1<2<3&equals;<<&comma;<&comma;&comma;&comma;

 and, as ordered sets:

0<1<2<<ω<ω&plus;1<ω&plus;2<<ω&plus;ω<ω&plus;ω&plus;1<ω&plus;ω&plus;2<<ω&plus;ω&plus;ω<

 In general, you can (isomorphically) identify each set above (ordinal) with the set of all smaller ordinals. E.g.:

0<1<2<&equals;ω

0<1<2<<ω&equals;ω&plus;1

0<1<2<<ω<ω&plus;1&equals;ω&plus;2

0<1<2<<ω<ω&plus;1<ω&plus;2<&equals;ω&plus;ω

0<1<2<<ω<ω&plus;1<ω&plus;2<<ω&plus;ω&equals;ω&plus;ω&plus;1

 Beyond addition:

ω&plus;ωω2   (2 copies of ω)

2&plus;2&plus;&equals;2ω&equals;ω   (ω copies of 2)

ω&plus;ω&plus;ω&equals;ω3

3ω&equals;ω

ω&plus;&plus;ωn times&equals;ωn   (n copies of ω)

nω&equals;ω

 So:

0<1<2<<ω<ω&plus;1<<ω2<ω2&plus;1<<ω3<<ωn<<&quest;

 Answer:

&quest;&equals;ωω&equals;ω2  (ω copies of ω)

 or, isomorphically equivalent: pairs of nonnegative integers with reverse lexicographic ordering

a0&comma;a1<b0&comma;b1a1<b1a1&equals;b1a0<b0

 Similarly:

ωωω&equals;ω3   (3-tuples)

ωωωω&equals;ω4   (4-tuples)

ωωn times&equals;ωn   (n-tuples)

 What is next?

ωω (ω-tuples with finitely many nonzero entries)

 Other interpretation: the union ωω&equals;1ωω2ωn of all n-tuples for nω with reverse lexicographic ordering.

 The picture so far:

0<1<2<<

ω<ω&plus;1<ω&plus;2<<

ω&plus;ω&equals;ω2<ω2&plus;1<ω2&plus;2<<

ω3<ω3&plus;1<<ω4<ω4&plus;1<<

ωω&equals;ω2<ω2&plus;1<<ω2&plus;ω<ω2&plus;ω&plus;1<<ω2&plus;ω2<

ω22<ω22&plus;1<<ω22&plus;ω<ω22&plus;ω&plus;1<<ω22&plus;ω2<

ω23<ω23&plus;1<<ω23&plus;ω<<ω24<ω24&plus;1<<ω24&plus;ω<

ω2ω&equals;ω3<ω3&plus;1<<ω3&plus;ω<<ω3&plus;ω2<<ω3&plus;ω2<<

ω32<ω32&plus;1<<ω32&plus;ω<<ω32&plus;ω2<<ω32&plus;ω2<<

ω33<ω33&plus;1<<ω33&plus;ω<<ω34<ω34&plus;1<<ω34&plus;ω<<

ω3ω&equals;ω4<ω4&plus;1<<ω4&plus;ω<<ω5<ω5&plus;1<<ω5&plus;ω<<

ωω<ωω&plus;1<<ωω&plus;ω<<ωω2<<ωωω&equals;ωω&plus;1<<ωω2<<

ωω2<<ωω3<<ωωω<<ωωωω<<ϵ0<

 Cantor normal form (CNF):

ωe1c1&plus;ωe2c2&plus;&plus;ωekck

 where

c1&comma;c2&comma;...&comma;ck are positive integers,

e1&gt;e2&gt;&gt;ek0 are themselves ordinals, recursively.

CNF is proper e1<ωe1.

 Side note about CNF: basically only exponentiation and addition; multiplication is redundant.

 &varepsilon;0&equals;{all proper CNFs} is itself an ordinal, the smallest ordinal which cannot be defined explicitly using &plus;&comma;&comma;ˆ.

 &varepsilon;0&equals;ωωωω is countable and the smallest ordinal e such that e&equals;ωe; no e in proper CNF satisfies this fixed point equation.

 There are uncountably many ordinals larger than ϵ0, but the rest of this document focuses on a Maple package for ordinals in proper CNF, that is, ordinals that are smaller than ϵ0 and their arithmetic.

Constructing ordinals

• 

Load the Ordinals package to begin.

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;&omega;&comma;quo&comma;rem&comma;tcoeff&comma;tdegree&comma;tterm

(1)
• 

Use the Ordinal constructor to create the Cantor normal form of an ordinal.

a:=Ordinal3&comma;1&comma;1&comma;2&comma;0&comma;3

a:=ω3&plus;ω2&plus;3

(2)
• 

Every non-negative integer is an ordinal; no constructor call required.

b:=2

b:=2

(3)
• 

The export omega represents ω. The following two assignments are equivalent.

c:=&omega;

c:=ω

(4)

c:=Ordinal1&comma;1

c:=ω

(5)
• 

An ordinal with a non-integer exponent.

d:=Ordinal&omega;&comma;3&comma;2&comma;5&comma;1&comma;1&comma;0&comma;4

d:=ωω3&plus;ω25&plus;ω&plus;4

(6)
• 

The functions degree, (tdegree), and lcoeff, (tcoeff) return the leading (trailing) exponent and coefficient, respectively.

degreea&comma;degreeb&comma;degreec&comma;degreed

3&comma;0&comma;1&comma;ω

(7)

tdegreea&comma;tdegreeb&comma;tdegreec&comma;tdegreed

0&comma;0&comma;1&comma;0

(8)

lcoeffa&comma;lcoeffb&comma;lcoeffc&comma;lcoeffd

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

(9)

tcoeffa&comma;tcoeffb&comma;tcoeffc&comma;tcoeffd

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

(10)
• 

In Maple, the coefficients ci in the Cantor normal form of an ordinal can be parametric, which means, they may depend polynomially on variables, such as x or y2, with positive integer coefficients. Each parameter like this is implicitly assumed to represent a non-negative integer.

e:=Ordinal3&comma;x&comma;2&comma;x2&plus;xy&plus;y2&comma;0&comma;z02&plus;3

e:=ω3x&plus;ω2x2+xy+y2&plus;z02+3

(11)
• 

The Eval command can be used to substitute integers or integer polynomials for some or all of the parameters.

Evale&comma;x&equals;0 

ω2y2&plus;z02+3

(12)

Evale&comma;x&equals;x&plus;1&comma;y&equals;0&comma;z0&equals;0

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

(13)

Ordinal arithmetic

• 

The functions Add, Mult, and Power implement addition, multiplication, and exponentiation of ordinals, respectively.

Adda&comma;b&comma;Multa&comma;b&comma;Powera&comma;b

ω3&plus;ω2&plus;5&comma;ω32&plus;ω2&plus;3&comma;ω6&plus;ω42&plus;ω33&plus;ω2&plus;3

(14)
• 

The operators +, . and ^ are overloaded for ordinals.

b&plus;a&comma;b&period;a&comma;ba

ω3&plus;ω2&plus;3&comma;ω3&plus;ω2&plus;6&comma;ωω2&plus;28

(15)
• 

There are inert versions of these operators, which are rendered in gray and are useful for display purposes.

a &+ b &+ c&equals;a&plus;b&plus;c

ω3&plus;ω2&plus;3&plus;2&plus;ω&equals;ω3&plus;ω3

(16)

b &^ c &. a&equals;bc&period;a

2ωω3&plus;ω2&plus;3&equals;ω4&plus;ω22&plus;ω3

(17)
• 

Parametric ordinals can be used to illustrate the rules of ordinal arithmetic. All parameters are allowed to assume the value 0, you can add 1 to the leading and trailing coefficients to ensure that they are nonzero for arbitrary non-negative integer values of the parameters.

p:=Ordinal3&comma;x3&plus;1&comma;2&comma;x2&comma;1&comma;x1&comma;0&comma;x0&plus;1

p:=ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1

(18)

q:=Ordinal2&comma;y2&plus;1&comma;1&comma;y1&comma;0&comma;y0&plus;1

q:=ω2y2+1&plus;ωy1&plus;y0+1

(19)
• 

For addition, terms of lower degree are absorbed from the left and appended from the right.

p &+ q&equals;p&plus;q

ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1&plus;ω2y2+1&plus;ωy1&plus;y0+1&equals;ω3x3+1&plus;ω2x2+y2+1&plus;ωy1&plus;y0+1

(20)

q &+ p&equals;q&plus;p

ω2y2+1&plus;ωy1&plus;y0+1&plus;ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1&equals;ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1

(21)

q &+ z&equals;q&plus;z

ω2y2+1&plus;ωy1&plus;y0+1&plus;z&equals;ω2y2+1&plus;ωy1&plus;y0+1+z

(22)

Multiplication

• 

For multiplication, if both arguments have a nonzero constant coefficient, the coefficients of the right factor appear on the left of the product, and vice versa.

p:=Ordinal3&comma;x3&plus;1&comma;2&comma;x2&comma;1&comma;x1&comma;0&comma;x0&plus;1

p:=ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1

(23)

q:=Ordinal2&comma;y2&plus;1&comma;1&comma;y1&comma;0&comma;y0&plus;1

q:=ω2y2+1&plus;ωy1&plus;y0+1

(24)

p &. q&equals;p&period;q

ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1ω2y2+1&plus;ωy1&plus;y0+1&equals;ω5y2+1&plus;ω4y1&plus;ω3x3y0+x3+y0+1&plus;ω2x2&plus;ωx1&plus;x0+1

(25)

q &. p&equals;q&period;p

ω2y2+1&plus;ωy1&plus;y0+1ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1&equals;ω5x3+1&plus;ω4x2&plus;ω3x1&plus;ω2y2x0+x0+y2+1&plus;ωy1&plus;y0+1

(26)
• 

In particular, multiplication of an ordinal with a nonzero constant coefficient by a positive constant z&plus;1 only affects the leading or constant coefficient, respectively, depending on the order.

q &. z&plus;1&equals;q&period;z&plus;1

ω2y2+1&plus;ωy1&plus;y0+1z+1&equals;ω2y2z+z+y2+1&plus;ωy1&plus;y0+1

(27)

z&plus;1 &. q&equals;z&plus;1&period;q

z+1ω2y2+1&plus;ωy1&plus;y0+1&equals;ω2y2+1&plus;ωy1&plus;y0z+z+y0+1

(28)
• 

Note that this is not universally valid for z instead of z&plus;1.

z &amp;&period; q&equals;Evalrhs&comma;z&equals;z1 

zω2y2+1&plus;ωy1&plus;y0+1&equals;ω2y2+1&plus;ωy1&plus;zy0+z

(29)

0 &. q&equals;0&period;q

0ω2y2+1&plus;ωy1&plus;y0+1&equals;0.

(30)
• 

If the factor on the right does not have a constant term, then it absorbs the factor on the left except for its leading power of ω.

p &amp;&period; Evalq&comma;y0&equals;1 &equals;p&period;Evalq&comma;y0&equals;1 

ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1ω2y2+1&plus;ωy1&equals;ω5y2+1&plus;ω4y1

(31)

z&plus;1 &amp;&period; Evalq&comma;y0&equals;1 &equals;z&plus;1&period;Evalq&comma;y0&equals;1 

z+1ω2y2+1&plus;ωy1&equals;ω2y2+1&plus;ωy1

(32)
• 

Some iterated products.

b&omega; &period; 2&plus;3

b:=ω2&plus;3

(33)

b &^ 2&equals;b2

ω2&plus;32&equals;ω22&plus;ω6&plus;3

(34)

b &^ 3&equals;b3

ω2&plus;33&equals;ω32&plus;ω26&plus;ω6&plus;3

(35)

b &^ 4&equals;b4

ω2&plus;34&equals;ω42&plus;ω36&plus;ω26&plus;ω6&plus;3

(36)

b &^ 10&equals;b10

ω2&plus;310&equals;ω102&plus;ω96&plus;ω86&plus;ω76&plus;ω66&plus;ω56&plus;ω46&plus;ω36&plus;ω26&plus;ω6&plus;3

(37)

Powering

• 

For exponentiation, only the base can be parametric but not the exponent.

p:=Ordinal3&comma;x3&plus;1&comma;2&comma;x2&comma;1&comma;x1&comma;0&comma;x0&plus;1

p:=ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1

(38)

p &^ 3&equals;p3

ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+13&equals;ω9x3+1&plus;ω8x2&plus;ω7x1&plus;ω6x3x0+x0+x3+1&plus;ω5x2&plus;ω4x1&plus;ω3x3x0+x0+x3+1&plus;ω2x2&plus;ωx1&plus;x0+1

(39)
• 

If the exponent does not have a constant term, then all coefficients of the base are ignored and so are all exponents except for the leading one, that is, the degree. (In the following example, the degree gets absorbed into the exponent as well, since 3ω&equals;ω.)

p &^ &omega;&equals;p&omega;

ω3x3+1&plus;ω2x2&plus;ωx1&plus;x0+1ω&equals;ωω

(40)
• 

The only type of example for proper CNF ordinals where e&equals;be is when b&equals;z&plus;2 is an integer 2 and e&equals;ω.

z&plus;2 &^ &omega;&equals;z&plus;2&omega;

z+2ω&equals;ω

(41)
• 

This equality is illustrated by writing non-negative integers in base b representation, but in reverse order, with the least significant digit first. For example, if z&equals;0 and b&equals;2:

2ω&equals;202122

&equals;00<201<2101<20&plus;2111<22001<20&plus;22101<21&plus;22011<20&plus;21&plus;22111<230001<

• 

Some iterated powers.

Power&comma;Power0&comma;Power0&comma;0&comma;Power0&comma;0&comma;0&comma;Power0&comma;0&comma;0&comma;0

1&comma;0&comma;1&comma;0&comma;1

(42)

Power&comma;Power2&comma;Power2&comma;2&comma;Power2&comma;2&comma;2&comma;Power2&comma;2&comma;2&comma;2

1&comma;2&comma;4&comma;16&comma;65536

(43)

Power2&comma;2&comma;2&comma;2&comma;2

2003529930406846464979072351560255750447825475569751419265016973710894059556311453089506130880933348[...19529 &DifferentialD;ⅈgⅈts...]5775699146577530041384717124577965048175856395072895337539755822087777506072339445587895905719156736

(44)

b&omega; &period; 2&plus;3

b:=ω2&plus;3

(45)

b &^ b&equals;bb

ω2&plus;3ω2&plus;3&equals;ωω2&plus;32&plus;ωω2&plus;26&plus;ωω2&plus;16&plus;ωω23

(46)

b &^ b &^ b&equals;Powerb&comma;b&comma;b

ω2&plus;3ω2&plus;3ω2&plus;3&equals;ωωω2&plus;32&plus;ωω2&plus;26&plus;ωω2&plus;16&plus;ωω23

(47)

b &^ b &^ b &^ b&equals;Powerb&comma;b&comma;b&comma;b

ω2&plus;3ω2&plus;3ω2&plus;3ω2&plus;3&equals;ωωωω2&plus;32&plus;ωω2&plus;26&plus;ωω2&plus;16&plus;ωω23

(48)

Subtraction and comparison

• 

If ba, then there is a unique ordinal c such that b&plus;c&equals;a. This is computed using the Sub command.

a:=&omega;2 &period; 3&plus;&omega; &period; 2&plus;1

a:=ω23&plus;ω2&plus;1

(49)

b:=&omega;2 &period; 3&plus;&omega;&plus;3

b:=ω23&plus;ω&plus;3

(50)

a &- b&equals;Suba&comma;b

ω3&plus;ω2&plus;3ω23&plus;ω&plus;3&equals;ω3&plus;ω2&plus;3

(51)

a &- a&equals;Suba&comma;a

ω3&plus;ω2&plus;3ω3&plus;ω2&plus;3&equals;0

(52)
• 

If a<b, then Suba&comma;b returns NULL.

Subb&comma;a

(53)
• 

The LessThan command and the < and <= operators compare two ordinals. LessThana&comma;b and a<b return false if and only if Suba&comma;b returns NULL.

LessThana&comma;b&comma;LessThana&comma;a&comma;LessThanb&comma;a

false&comma;false&comma;true

(54)

a<b&comma;a<a&comma;b<a

false&comma;false&comma;true

(55)

ab&comma;aa&comma;ba

false&comma;true&comma;true

(56)
• 

The commands Max and Min return the largest and smallest element, respectively, in a sequence or list of ordinals.

l:=a&comma;&omega;&comma;2&comma;b

l:=ω3&plus;ω2&plus;3&comma;ω&comma;2&comma;ω23&plus;ω&plus;3

(57)

Maxl&comma;Minl

ω3&plus;ω2&plus;3&comma;2

(58)

sortl&comma;LessThan

2&comma;ω&comma;ω23&plus;ω&plus;3&comma;ω3&plus;ω2&plus;3

(59)

Inverse operations

• 

The Sub command performs subtraction on the left. It is a partial inverse of addition on the right: Subb&plus;c&comma;b&equals;c for arbitrary ordinals b and c, and b&plus;Suba&comma;b&equals;a if ba.

• 

There is no inverse for addition on the left. The following example illustrates that a difference on the right is not unique in general.

1&plus;&omega;&equals;2&plus;&omega;

ω&equals;ω

(60)
• 

The following examples illustrate that even though ω<ω&plus;1, there is no ordinal c such that c&plus;ω&equals;ω&plus;1.

x &+ &omega;&equals;x&plus;&omega;

x&plus;ω&equals;ω

(61)

&omega;&period;y&plus;x &+ &omega;&equals;&omega;&period;y&plus;x&plus;&omega;

ωy&plus;x&plus;ω&equals;ωy+1

(62)

&omega;2&period;z&plus;&omega;&period;y&plus;x &+ &omega;&equals;&omega;2&period;z&plus;&omega;&period;y&plus;x&plus;&omega;

ω2z&plus;ωy&plus;x&plus;ω&equals;ω2z&plus;ωy+1

(63)
• 

Another way to see this is that c&plus;ω does not have a largest element no matter what c is, while ω&plus;1 does. Thus, a difference on the right does not exist in general.

• 

The Div command performs division with remainder on the left, with a remainder that is smaller than the divisor.

f:=&omega;&omega;&period; 2&plus;&omega;3&plus;&omega;2 &period; 3&plus;5

f:=ωω2&plus;ω3&plus;ω23&plus;5

(64)

g:=&omega;2 &period; 2&plus;&omega;&plus;3

g:=ω22&plus;ω&plus;3

(65)

q&comma;r:=Divf&comma;g

q&comma;r:=ωω2&plus;ω&plus;1&comma;ω2&plus;5

(66)

g &. q &+ r&equals;g&period;q&plus;r

ω22&plus;ω&plus;3ωω2&plus;ω&plus;1&plus;ω2&plus;5&equals;ωω2&plus;ω3&plus;ω23&plus;5

(67)

r<g

true

(68)
• 

The quotient and the remainder can be computed individually using the quo and rem commands, respectively.

quof&comma;g&comma;remf&comma;g

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

(69)
• 

Left division is a partial inverse of right multiplication: quoMultg&comma;q&comma;g&equals;q and remMultg&comma;q&comma;g&equals;0 for arbitrary ordinals g, q, and if remf&comma;g&equals;0, then Multg&comma;quof&comma;g&equals;f. Similar to addition, there is no unique inverse for left multiplication, that is, a right quotient, in general.

2 &period; &omega;&equals;3 &period; &omega;

ω&equals;ω

(70)

Logarithms and base conversion

• 

The Logf&comma;g command returns three ordinals: a logarithm l, a quotient 0<q<g and a remainder r<gl, such that f&equals;glq&plus;r.

f:=&omega;&omega;&period; 2&plus;&omega;3&plus;&omega;2 &period; 3&plus;5

f:=ωω2&plus;ω3&plus;ω23&plus;5

(71)

g:=&omega;2 &period; 2&plus;&omega;&plus;3

g:=ω22&plus;ω&plus;3

(72)

l&comma;q&comma;r:=Logf&comma;g

l&comma;q&comma;r:=ω&comma;2&comma;ω3&plus;ω23&plus;5

(73)

g &^ l &. q &+ r&equals;gl&period;q&plus;r

ω22&plus;ω&plus;3ω2&plus;ω3&plus;ω23&plus;5&equals;ωω2&plus;ω3&plus;ω23&plus;5

(74)

q<g

true

(75)

r<gl

true

(76)
• 

The logarithm is a partial inverse of exponentiation on the right:

f&equals;glLogf&comma;g&equals;l&comma;1&comma;0&comma; for arbitrary ordinals f&comma;g and l.

  

Similar to addition and multiplication, there is in general no unique inverse for powering on the left.  

2&omega;&equals;3&omega;

ω&equals;ω

(77)
• 

The Cantor normal form can be viewed as a base-ω representation for ordinals. Repeated application of the Log command yields a base-g representation for an arbitrary ordinal g2. This is implemented in the Base command. If g&gt;ω, then the coefficients in that representation need not be integers.

Basef&comma;g

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

(78)

Basef&comma;g&comma;output&equals;inert

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

(79)

value

ωω2&plus;ω3&plus;ω23&plus;5

(80)

Basef&comma;&omega;&comma;output&equals;inert

ωω2&plus;ω3&plus;ω23&plus;5

(81)
• 

In the binary representation, all nonzero coefficients are 1.

Basef&comma;2&comma;output&equals;inert

2ω2&plus;1&plus;2ω3&plus;2ω2&plus;1&plus;2ω2&plus;22&plus;1

(82)

Basef&comma;2

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

(83)

mapz&rarr;2z1&comma;

ωω2&comma;ω3&comma;ω22&comma;ω2&comma;4&comma;1

(84)

Gcd and factorization

• 

The Div command implements left division with remainder, and therefore any two ordinals have a greatest common left divisor.

u:=&omega;&omega;&period;x&plus;1&plus;&omega;3&plus;&omega;2 &period; 3&plus;&omega;&plus;5

u:=ωωx+1&plus;ω3&plus;ω23&plus;ω&plus;5

(85)

v:=&omega;4 &period; 2&plus;&omega;2 &period; 3&plus;&omega;&plus;5

v:=ω42&plus;ω23&plus;ω&plus;5

(86)

g:=Gcdu&comma;v

g:=ω23&plus;ω&plus;5

(87)

remu&comma;g&comma;remv&comma;g

0&comma;0

(88)

u1&comma;v1:=quou&comma;g&comma;quov&comma;g

u1&comma;v1:=ωωx+1&plus;ω&plus;1&comma;ω22&plus;1

(89)

g &amp;&period; u1&equals;g&period;u1

ω23&plus;ω&plus;5ωωx+1&plus;ω&plus;1&equals;ωωx+1&plus;ω3&plus;ω23&plus;ω&plus;5

(90)

g &amp;&period; v1&equals;g&period;v1

ω23&plus;ω&plus;5ω22&plus;1&equals;ω42&plus;ω23&plus;ω&plus;5

(91)
• 

It is not a coincidence that the coefficients and exponents of the gcd and the last few coefficients of the two input polynomials agree. As discussed in the section Multiplication earlier, and as illustrated again by the last two examples, the coefficients and exponents of the left factor in a multiplication of two ordinals with nonzero constant coefficients reappear as the rightmost coefficients and exponents of the product. This is illustrated more clearly by factoring all the polynomials involved.

Factoru&comma;output&equals;inert

5ω&plus;123ω&plus;1ωω&plus;1x+1

(92)

Factorv&comma;output&equals;inert

5ω&plus;123ω2&plus;12

(93)

Factorg&comma;output&equals;inert

5ω&plus;123

(94)

Gcdu1&comma;v1

1

(95)

Factoru1&comma;output&equals;inert

ω&plus;1ωω&plus;1x+1

(96)

Factorv1&comma;output&equals;inert

ω2&plus;12

(97)
• 

Any ordinal of the form ωe&plus;1 with e&gt;0 is multiplicatively irreducible, since the product of two ordinals with nonzero constant coefficients and with at least two terms each has at least three terms.

• 

For factoring an ordinal, first the trailing coefficient can be extracted on the left.

q1&comma;r1:=quov&comma;5&comma;remv&comma;5

q1&comma;r1:=ω42&plus;ω23&plus;ω&plus;1&comma;0

(98)
• 

For factoring an ordinal with the last two terms equal to ωec&plus;1, where e&gt;0 and c&gt;0, you can extract the irreducible factor ωe&plus;1 on the right.

q2&comma;r2:=quoq1&comma;&omega;&plus;1&comma;remq1&comma;&omega;&plus;1

q2&comma;r2:=ω32&plus;ω3&plus;1&comma;0

(99)
• 

If the trailing term ωd is not a constant (that is, if d&gt;0), it can be extracted as a left factor first, and the left quotient results by left subtracting d from all exponents. So far, the partial factorization can be written as:

v&equals;5 &. &omega;&plus;1 &. q2

ω42&plus;ω23&plus;ω&plus;5&equals;5ω&plus;1ω32&plus;ω3&plus;1

(100)

value

ω42&plus;ω23&plus;ω&plus;5&equals;ω42&plus;ω23&plus;ω&plus;5

(101)
• 

Proceeding recursively with q2 gives the full factorization of v below. In fact, the integer coefficients in the factored normal form are identical to the integer coefficients in the CNF, just in reverse order. The exponents in the factored normal form are the left differences (see section Subtraction and comparison earlier) of the exponents in the CNF, also in reverse order. In the following example, the coefficients in the CNF are 2&comma;3&comma;1&comma;5 and the exponents are 4&comma;2&comma;1&comma;0:

v

ω42&plus;ω23&plus;ω&plus;5

(102)

Factorv

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

(103)

Factorv&comma;output&equals;inert

5ω&plus;123ω2&plus;12

(104)
• 

For ordinals without a constant term, factoring is not unique in general. As discussed in section Multiplication earlier, such an ordinal is left divisible by any ordinal of smaller degree, for example:

inert:=&omega;2&period;x&plus;1&plus;&omega;&period;y&plus;z &. &omega;&colon;inert&equals;valueinert

ω2x+1&plus;ωy&plus;zω&equals;ω3

(105)

See Also

Ordinals