User blog:Rgetar/Bijective storing ordinals in infinite computer memory

Infinite computer memory is sequence of bits. They can be enumerated: bit 0, bit 1, bit 2 etc.

ω
Ordinals up to ω are natural numbers. Natural numbers can be represented in binary form, that is as sequence of bits, which can be enumerated from the right. Natural number can be stored in computer memory as binary number, that is

bit 0 is bit 0 of the natural number

bit 1 is bit 1 of the natural number

bit 2 is bit 2 of the natural number

...

ω2
Ordinals up to ω2 can be represented as ωc1 + c0, where c0, c1 - natural numbers.

Way of storing ordinals up to ω2 in computer memory:

bit 0 is bit 0 of c0

bit 1 is bit 0 of c1

bit 2 is bit 1 of c0

bit 3 is bit 1 of c1

bit 4 is bit 2 of c0

bit 5 is bit 2 of c1

bit 6 is bit 3 of c0

bit 7 is bit 3 of c1

...

ω3
Ordinals up to ω3: ω2c2 + ωc1 + c0, where c0, c1, c2 - natural numbers.

bit 0 is bit 0 of c0

bit 1 is bit 0 of c1

bit 2 is bit 0 of c2

bit 3 is bit 1 of c0

bit 4 is bit 1 of c1

bit 5 is bit 1 of c2

bit 6 is bit 2 of c0

bit 7 is bit 2 of c1

bit 8 is bit 2 of c2

...

Similarly for any ωn, where n is natural number (first n bits are bits 0 of coefficients, second n bits are bits 1 of coefficients, etc.)

ωω
What about ωω? Ordinals up to ωω: sum of ωici, where i are natural numbers, in order of decreasing i. If we try to use the same way as for ωn, then all memory will be filled with bits 0 of coefficients, and all others bits will not be stored in memory, so, the ordinals will not be stored in memory.

So, let's try to use offsets:

bit 0 is bit 0 of c0

bit 1 is bit 1 of c0

bit 2 is bit 0 of c1

bit 3 is bit 2 of c0

bit 4 is bit 1 of c1

bit 5 is bit 0 of c2

bit 6 is bit 3 of c0

bit 7 is bit 2 of c1

bit 8 is bit 1 of c2

bit 9 is bit 0 of c3

bit 10 is bit 4 of c0

bit 11 is bit 3 of c1

bit 12 is bit 2 of c2

bit 13 is bit 1 of c3

bit 14 is bit 0 of c4

bit 15 is bit 5 of c0

bit 16 is bit 4 of c1

bit 17 is bit 3 of c2

bit 18 is bit 2 of c3

bit 19 is bit 1 of c4

bit 20 is bit 0 of c5

...

ωω2
Ordinals up to ωω: similarly to ωω, but now i are ordinals up to ω2 (and in general: ordinals up to ωα are sums of ωici terms, where i are ordinals up to α in decreasing order).

bit 0 is bit 0 of c0

bit 1 is bit 0 of cω

bit 2 is bit 1 of c0

bit 3 is bit 0 of c1

bit 4 is bit 1 of cω

bit 5 is bit 0 of cω + 1

bit 6 is bit 2 of c0

bit 7 is bit 1 of c1

bit 8 is bit 0 of c2

bit 9 is bit 2 of cω

bit 10 is bit 1 of cω + 1

bit 11 is bit 0 of cω + 2

bit 12 is bit 3 of c0

bit 13 is bit 2 of c1

bit 14 is bit 1 of c2

bit 15 is bit 0 of c3

bit 16 is bit 3 of cω

bit 17 is bit 2 of cω + 1

bit 18 is bit 1 of cω + 2

bit 19 is bit 0 of cω + 3

...

ωω3
bit 0 is bit 0 of c0

bit 1 is bit 0 of cω

bit 2 is bit 0 of cω2

bit 3 is bit 1 of c0

bit 4 is bit 0 of c1

bit 5 is bit 1 of cω

bit 6 is bit 0 of cω + 1

bit 7 is bit 1 of cω2

bit 8 is bit 0 of cω2 + 1

bit 9 is bit 2 of c0

bit 10 is bit 1 of c1

bit 11 is bit 0 of c2

bit 12 is bit 2 of cω

bit 13 is bit 1 of cω + 1

bit 14 is bit 0 of cω + 2

bit 15 is bit 2 of cω2

bit 16 is bit 1 of cω2 + 1

bit 17 is bit 0 of cω2 + 2

bit 18 is bit 3 of c0

bit 19 is bit 2 of c1

bit 20 is bit 1 of c2

bit 21 is bit 0 of c3

bit 22 is bit 3 of cω

bit 23 is bit 2 of cω + 1

bit 24 is bit 1 of cω + 2

bit 25 is bit 0 of cω + 3

bit 26 is bit 3 of cω2

bit 27 is bit 2 of cω2 + 1

bit 28 is bit 1 of cω2 + 2

bit 29 is bit 0 of cω2 + 3

...

Similarly for ωωn, n - natural number.

ωω 2
For ωω 2 we need additional offsets:

bit 0 is bit 0 of c0

bit 1 is bit 1 of c0

bit 2 is bit 0 of c1

bit 3 is bit 0 of cω

bit 4 is bit 2 of c0

bit 5 is bit 1 of c1

bit 6 is bit 0 of c2

bit 7 is bit 1 of cω

bit 8 is bit 0 of cω + 1

bit 9 is bit 0 of cω2

bit 10 is bit 3 of c0

bit 11 is bit 2 of c1

bit 12 is bit 1 of c2

bit 13 is bit 0 of c3

bit 14 is bit 2 of cω

bit 15 is bit 1 of cω + 1

bit 16 is bit 0 of cω + 2

bit 17 is bit 1 of cω2

bit 18 is bit 0 of cω2 + 1

bit 19 is bit 0 of cω3

bit 20 is bit 4 of c0

bit 21 is bit 3 of c1

bit 22 is bit 2 of c2

bit 23 is bit 1 of c3

bit 24 is bit 0 of c4

bit 25 is bit 3 of cω

bit 26 is bit 2 of cω + 1

bit 27 is bit 1 of cω + 2

bit 28 is bit 0 of cω + 3

bit 29 is bit 2 of cω2

bit 30 is bit 1 of cω2 + 1

bit 31 is bit 0 of cω2 + 2

bit 32 is bit 1 of cω3

bit 33 is bit 0 of cω2 + 1

bit 34 is bit 0 of cω4

...

General rule
1. Create any function f(α) of ordinal α less than some ordinal to natural number such as for all values n = f(α) there is finite number of possible ordinals α.

2. First bits are bits 0 for cα such as f(α) = 0 in order of increading α.

3. Next bits are bits 1 for cα such as f(α) = 0 in order of increading α, then bits 0 for cα such as f(α) = 1 in order of increading α.

4. Next bits are bits 2 for cα such as f(α) = 0 in order of increading α, then bits 1 for cα such as f(α) = 1 in order of increading α, then bits 0 for cα such as f(α) = 2 in order of increading α.

5. Next bits are bits 3 for cα such as f(α) = 0 in order of increading α, then bits 2 for cα such as f(α) = 1 in order of increading α, then bits 1 for cα such as f(α) = 2 in order of increading α, then bits 0 for cα such as f(α) = 3 in order of increading α.

6. Etc.

ε0
For example, for ordinals up to ε0 we may use the function: number of terms of Cantor normal form without coefficient of ordinal plus values of this function for all of its ω exponents.

List of all ordinals such as this function f(α) = n for n from 0 to 8:

n = 0

0

(1 ordinal)

n = 1

1

(1 ordinal)

n = 2

2

ω

(2 ordinals)

n = 3

3

ω + 1

ω2

ωω

(4 ordinals)

n = 4

4

ω + 2

ω2

ω2 + 1

ω3

ωω + 1

ωω + 1

ωω 2

ωω ω

(9 ordinals)

n = 5

5

ω + 3

ω2 + 1

ω2 + 2

ω2 + ω

ω3 + 1

ω4

ωω + 2

ωω + ω

ωω + 1 + 1

ωω + 2

ωω2

ωω 2 + 1

ωω 2 + 1

ωω 3

ωω ω + 1

ωω ω + 1

ωω ω + 1

ωω ω 2

ωω ω ω

(20 ordinals)

n = 6

6

ω + 4

ω2 + 2

ω3

ω2 + 3

ω2 + ω + 1

ω3 + 2

ω3 + ω

ω4 + 1

ω5

ωω + 3

ωω + ω + 1

ωω + 1 + 2

ωω + 1 + ω

ωω + 2 + 1

ωω + 3

ωω2 + 1

ωω2 + 1

ωω 2 + 2

ωω 2 + ω

ωω 2 + 1 + 1

ωω 2 + 2

ωω 2 + ω

ωω 3 + 1

ωω 3 + 1

ωω 4

ωω ω + 2

ωω ω + ω

ωω ω + 1 + 1

ωω ω + 2

ωω ω + ω

ωω ω + 1 + 1

ωω ω + 1 + 1

ωω ω + 2

ωω ω2

ωω ω 2 + 1

ωω ω 2 + 1

ωω ω 2 + 1

ωω ω 3

ωω ω ω + 1

ωω ω ω + 1

ωω ω ω + 1

ωω ω ω + 1

ωω ω ω 2

ωω ω ω ω

(45 ordinals)

n = 7

7

ω + 5

ω2 + 3

ω3 + 1

ω2 + 4

ω2 + ω + 2

ω2 + ω2

ω3 + 3

ω3 + ω + 1

ω3 + ω2

ω4 + 2

ω4 + ω

ω5 + 1

ω6

ωω + 4

ωω + ω + 2

ωω + ω2

ωω + 1 + 3

ωω + 1 + ω + 1

ωω + 1 + ω2

ωω + 1 + ωω

ωω + 2 + 2

ωω + 2 + ω

ωω + 3 + 1

ωω + 4

ωω2 + 2

ωω2 + ω

ωω2 + 1 + 1

ωω2 + 2

ωω3

ωω 2 + 3

ωω 2 + ω + 1

ωω 2 + ω2

ωω 2 + ωω

ωω 2 + 1 + 2

ωω 2 + 1 + ω

ωω 2 + 2 + 1

ωω 2 + 3

ωω 2 + ω + 1

ωω 2 + ω + 1

ωω 3 + 2

ωω 3 + ω

ωω 3 + 1 + 1

ωω 3 + 2

ωω 3 + ω

ωω 4 + 1

ωω 4 + 1

ωω 5

ωω ω + 3

ωω ω + ω + 1

ωω ω + ω2

ωω ω + ωω

ωω ω + 1 + 2

ωω ω + 1 + ω

ωω ω + 2 + 1

ωω ω + 3

ωω ω + ω + 1

ωω ω + ω + 1

ωω ω + 1 + 2

ωω ω + 1 + ω

ωω ω + 1 + 1 + 1

ωω ω + 1 + 2

ωω ω + 1 + ω

ωω ω + 2 + 1

ωω ω + 2 + 1

ωω ω + 3

ωω ω2 + 1

ωω ω2 + 1

ωω ω2 + 1

ωω ω 2 + 2

ωω ω 2 + ω

ωω ω 2 + 1 + 1

ωω ω 2 + 2

ωω ω 2 + ω

ωω ω 2 + 1 + 1

ωω ω 2 + 1 + 1

ωω ω 2 + 2

ωω ω 2 + ω

ωω ω 3 + 1

ωω ω 3 + 1

ωω ω 3 + 1

ωω ω 4

ωω ω ω + 2

ωω ω ω + ω

ωω ω ω + 1 + 1

ωω ω ω + 2

ωω ω ω + ω

ωω ω ω + 1 + 1

ωω ω ω + 1 + 1

ωω ω ω + 2

ωω ω ω + ω

ωω ω ω + 1 + 1

ωω ω ω + 1 + 1

ωω ω ω + 1 + 1

ωω ω ω + 2

ωω ω ω2

ωω ω ω 2  + 1

ωω ω ω 2 + 1

ωω ω ω 2 + 1

ωω ω ω 2 + 1

ωω ω ω 3

ωω ω ω ω  + 1

ωω ω ω ω + 1

ωω ω ω ω + 1

ωω ω ω ω + 1

ωω ω ω ω + 1

ωω ω ω ω 2

ωω ω ω ω ω

(108 ordinals)

n = 8

8

ω + 6

ω2 + 4

ω3 + 2

ω4

ω2 + 5

ω2 + ω + 3

ω2 + ω2 + 1

ω3 + 4

ω3 + ω + 2

ω3 + ω2

ω3 + ω2 + 1

ω32

ω4 + 3

ω4 + ω + 1

ω4 + ω2

ω5 + 2

ω5 + ω

ω6 + 1

ω7

ωω + 5

ωω + ω + 3

ωω + ω2 + 1

ωω + 1 + 4

ωω + 1 + ω + 2

ωω + 1 + ω2

ωω + 1 + ω2 + 1

ωω + 1 + ω3

ωω + 1 + ωω + 1

ωω + 12

ωω + 2 + 3

ωω + 2 + ω + 1

ωω + 2 + ω2

ωω + 2 + ωω

ωω + 3 + 2

ωω + 3 + ω

ωω + 4 + 1

ωω + 5

ωω2 + 3

ωω2 + ω + 1

ωω2 + ω2

ωω2 + ωω

ωω2 + 1 + 2

ωω2 + 1 + ω

ωω2 + 2 + 1

ωω2 + 3

ωω3 + 1

ωω3 + 1

ωω 2 + 4

ωω 2 + ω + 2

ωω 2 + ω2

ωω 2 + ω2 + 1

ωω 2 + ω3

ωω 2 + ωω + 1

ωω 2 + ωω + 1

ωω 2 2

ωω 2 + 1 + 3

ωω 2 + 1 + ω + 1

ωω 2 + 1 + ω2

ωω 2 + 1 + ωω

ωω 2 + 2 + 2

ωω 2 + 2 + ω

ωω 2 + 3 + 1

ωω 2 + 4

ωω 2 + ω + 2

ωω 2 + ω + ω

ωω 2 + ω + 1 + 1

ωω 2 + ω + 2

ωω 2 + ω2

ωω 3 + 3

ωω 3 + ω + 1

ωω 3 + ω2

ωω 3 + ωω

ωω 3 + 1 + 2

ωω 3 + 1 + ω

ωω 3 + 2 + 1

ωω 3 + 3

ωω 3 + ω + 1

ωω 3 + ω + 1

ωω 3 + ω2

ωω 4 + 2

ωω 4 + ω

ωω 4 + 1 + 1

ωω 4 + 2

ωω 4 + ω

ωω 5 + 1

ωω 5 + 1

ωω 6

ωω ω + 4

ωω ω + ω + 2

ωω ω + ω2

ωω ω + ω2 + 1

ωω ω + ω3

ωω ω + ωω + 1

ωω ω + ωω + 1

ωω ω + ωω 2

ωω ω 2

ωω ω + 1 + 3

ωω ω + 1 + ω + 1

ωω ω + 1 + ω2

ωω ω + 1 + ωω

ωω ω + 2 + 2

ωω ω + 2 + ω

ωω ω + 3 + 1

ωω ω + 4

ωω ω + ω + 2

ωω ω + ω + ω

ωω ω + ω + 1 + 1

ωω ω + ω + 2

ωω ω + ω2

ωω ω + 1 + 3

ωω ω + 1 + ω + 1

ωω ω + 1 + ω2

ωω ω + 1 + ωω

ωω ω + 1 + 1 + 2

ωω ω + 1 + 1 + ω

ωω ω + 1 + 2 + 1

ωω ω + 1 + 3

ωω ω + 1 + ω + 1

ωω ω + 1 + ω + 1

ωω ω + 1 + ω2

ωω ω + 1 + ωω

ωω ω + 2 + 2

ωω ω + 2 + ω

ωω ω + 2 + 1 + 1

ωω ω + 2 + 2

ωω ω + 2 + ω

ωω ω + 3 + 1

ωω ω + 3 + 1

ωω ω + 4

ωω ω2 + 2

ωω ω2 + ω

ωω ω2 + 1 + 1

ωω ω2 + 2

ωω ω2 + ω

ωω ω2 + 1 + 1

ωω ω2 + 1 + 1

ωω ω2 + 2

ωω ω3

ωω ω 2 + 3

ωω ω 2 + ω + 1

ωω ω 2 + ω2

ωω ω 2 + ωω

ωω ω 2 + 1 + 2

ωω ω 2 + 1 + ω

ωω ω 2 + 2 + 1

ωω ω 2 + 3

ωω ω 2 + ω + 1

ωω ω 2 + ω + 1

ωω ω 2 + ω2

ωω ω 2 + ωω

ωω ω 2 + 1 + 2

ωω ω 2 + 1 + ω

ωω ω 2 + 1 + 1 + 1

ωω ω 2 + 1 + 2

ωω ω 2 + 1 + ω

ωω ω 2 + 2 + 1

ωω ω 2 + 2 + 1

ωω ω 2 + 3

ωω ω 2 + ω + 1

ωω ω 2 + ω + 1

ωω ω 2 + ω + 1

ωω ω 3 + 2

ωω ω 3 + ω

ωω ω 3 + 1 + 1

ωω ω 3 + 2

ωω ω 3 + ω

ωω ω 3 + 1 + 1

ωω ω 3 + 1 + 1

ωω ω 3 + 2

ωω ω 3 + ω

ωω ω 4 + 1

ωω ω 4 + 1

ωω ω 4 + 1

ωω ω 5

ωω ω ω + 3

ωω ω ω + ω + 1

ωω ω ω + ω2

ωω ω ω + ωω

ωω ω ω + 1 + 2

ωω ω ω + 1 + ω

ωω ω ω + 2 + 1

ωω ω ω + 3

ωω ω ω + ω + 1

ωω ω ω + ω + 1

ωω ω ω + ω2

ωω ω ω + ωω

ωω ω ω + 1 + 2

ωω ω ω + 1 + ω

ωω ω ω + 1 + 1 + 1

ωω ω ω + 1 + 2

ωω ω ω + 1 + ω

ωω ω ω + 2 + 1

ωω ω ω + 2 + 1

ωω ω ω + 3

ωω ω ω + ω + 1

ωω ω ω + ω + 1

ωω ω ω + ω + 1

ωω ω ω + 1 + 2

ωω ω ω + 1 + ω

ωω ω ω + 1 + 1 + 1

ωω ω ω + 1 + 2

ωω ω ω + 1 + ω

ωω ω ω + 1 + 1 + 1

ωω ω ω + 1 + 1 + 1

ωω ω ω + 1 + 2

ωω ω ω + 1 + ω

ωω ω ω + 2 + 1

ωω ω ω + 2 + 1

ωω ω ω + 2 + 1

ωω ω ω + 3

ωω ω ω2 + 1

ωω ω ω2 + 1

ωω ω ω2 + 1

ωω ω ω2 + 1

ωω ω ω 2  + 2

ωω ω ω 2  + ω

ωω ω ω 2 + 1 + 1

ωω ω ω 2 + 2

ωω ω ω 2 + ω

ωω ω ω 2 + 1 + 1

ωω ω ω 2 + 1 + 1

ωω ω ω 2 + 2

ωω ω ω 2 + ω

ωω ω ω 2 + 1  + 1

ωω ω ω 2 + 1 + 1

ωω ω ω 2 + 1 + 1

ωω ω ω 2 + 2

ωω ω ω 2 + ω

ωω ω ω 3  + 1

ωω ω ω 3 + 1

ωω ω ω 3 + 1

ωω ω ω 3 + 1

ωω ω ω 4

ωω ω ω ω  + 2

ωω ω ω ω  + ω

ωω ω ω ω + 1 + 1

ωω ω ω ω + 2

ωω ω ω ω + ω

ωω ω ω ω + 1 + 1

ωω ω ω ω + 1 + 1

ωω ω ω ω + 2

ωω ω ω ω + ω

ωω ω ω ω + 1  + 1

ωω ω ω ω + 1 + 1

ωω ω ω ω + 1 + 1

ωω ω ω ω + 2

ωω ω ω ω + ω

ωω ω ω ω + 1  + 1

ωω ω ω ω + 1 + 1

ωω ω ω ω + 1 + 1

ωω ω ω ω + 1 + 1

ωω ω ω ω + 2

ωω ω ω ω2

ωω ω ω ω 2   + 1

ωω ω ω ω 2  + 1

ωω ω ω ω 2 + 1

ωω ω ω ω 2 + 1

ωω ω ω ω 2 + 1

ωω ω ω ω 3

ωω ω ω ω ω   + 1

ωω ω ω ω ω  + 1

ωω ω ω ω ω + 1

ωω ω ω ω ω + 1

ωω ω ω ω ω + 1

ωω ω ω ω ω + 1

ωω ω ω ω ω 2

ωω ω ω ω ω ω

(268 ordinals)

bit 0 is bit 0 of c0

bit 1 is bit 1 of c0

bit 2 is bit 0 of c1

bit 3 is bit 2 of c0

bit 4 is bit 1 of c1

bit 5 is bit 0 of c2

bit 6 is bit 0 of cω

bit 7 is bit 3 of c0

bit 8 is bit 2 of c1

bit 9 is bit 1 of c2

bit 10 is bit 1 of cω

bit 11 is bit 0 of c3

bit 12 is bit 0 of cω + 1

bit 13 is bit 0 of cω2

bit 14 is bit 0 of cωω

bit 15 is bit 4 of c0

bit 16 is bit 3 of c1

bit 17 is bit 2 of c2

bit 18 is bit 2 of cω

bit 19 is bit 1 of c3

bit 20 is bit 1 of cω + 1

bit 21 is bit 1 of cω2

bit 22 is bit 1 of cωω

bit 23 is bit 0 of c4

bit 24 is bit 0 of cω + 2

bit 25 is bit 0 of cω2

bit 26 is bit 0 of cω2 + 1

bit 27 is bit 0 of cω3

bit 28 is bit 0 of cωω + 1

bit 29 is bit 0 of cωω + 1

bit 30 is bit 0 of cωω 2

bit 31 is bit 0 of cωω ω

bit 32 is bit 5 of c0

bit 33 is bit 4 of c1

bit 34 is bit 3 of c2

bit 35 is bit 3 of cω

bit 36 is bit 2 of c3

bit 37 is bit 2 of cω + 1

bit 38 is bit 2 of cω2

bit 39 is bit 2 of cωω

bit 40 is bit 1 of c4

bit 41 is bit 1 of cω + 2

bit 42 is bit 1 of cω2

bit 43 is bit 1 of cω2 + 1

bit 44 is bit 1 of cω3

bit 45 is bit 1 of cωω + 1

bit 46 is bit 1 of cωω + 1

bit 47 is bit 1 of cωω 2

bit 48 is bit 1 of cωω ω

bit 49 is bit 0 of c5

bit 50 is bit 0 of cω + 3

bit 51 is bit 0 of cω2 + 1

bit 52 is bit 0 of cω2 + 2

bit 53 is bit 0 of cω2 + ω

bit 54 is bit 0 of cω3 + 1

bit 55 is bit 0 of cω4

bit 56 is bit 0 of cωω + 2

bit 57 is bit 0 of cωω + ω

bit 58 is bit 0 of cωω + 1 + 1

bit 59 is bit 0 of cωω + 2

bit 60 is bit 0 of cωω2

bit 61 is bit 0 of cωω 2 + 1

bit 62 is bit 0 of cωω 2 + 1

bit 63 is bit 0 of cωω 3

bit 64 is bit 0 of cωω ω + 1

bit 65 is bit 0 of cωω ω + 1

bit 66 is bit 0 of cωω ω + 1

bit 67 is bit 0 of cωω ω 2

bit 68 is bit 0 of cωω ω ω

...

Another way
1. Create notation for all ordinals up to some ordinal.

2. If in this notation ordinals can be expressed in different ways, then choose a unique "standard form" of ordinals.

3. Count number of symbols used in this notation (let this number is n).

4. Enumerate these symbols beginning from 0 in any order.

5. Now ordinals in this notation are numbers in n-ry numbering system. Get n-ry numbers from ordinals.

6. Enumerate ordinals in order of increasing of these numbers, beginning from 0.

7. Convert the new number to binary form and write it to the computer memory.

For example, my "computer format" for ordinals up to BHO uses 8 symbols: 0, 1, +,,, , ⟨, ⟩. These symbols may be enumerated:

0. 0

1. 1

2. +

3. ,

4. (

5. )

6. ⟨

7. ⟩

We may count natural numbers beginning from 0, converting them to octal form, then, using this correspondence, to "computer format" of ordinals, and enumerate these ordinals, ignoring nonsence and "non-standard forms", then convert these numbers to binary form and write them to the computer memory.