Tumblers

(unfinished) TODO:
    weak subtractoin
    make the connection to group theory
    make the connection to p-adic number
    make the connection to Huffman encoding
    make connection with IP addresses
Tumblers, as used in classic Xanadu, and discussed in this 1984 document, are a transfinite number system, comprised of a series of integers. For example
A = 1.2.133
B = 0.3.10
Let me extract the nth integer from a tumbler with array access syntax A[n]. Tumblrs may start with some number of 0 elements. Let me define ~A to be the index of the first non-zero element. So that
A[i] = 0 for i < ~A   
The numbers have an ordering > operation so that
A > B => A[i] > B[i] 
          for i < ~A
I'm sure there is some connection with p-adic numbers, but I don't know exactly right now.
They can be very useful because they model section/subsection behaviour. Like the real numbers, there is an infinite number of tumblers between any two non-identical tumblers. This means, given any two tumblrs (A and B were A>B) from a set of tumblrs, you can always insert a new tumblr (C) tumble into the set, such that C lies between A and B ( A>C>B).

Addition (+)

Addition + is a non-commutative operation where
C = A + B => C[i] = { A[i]         if i < ~B
                      B[i]         if i > ~B
                      A[i] + B[i]  if i = ~B }
so that
  1.2.133
+ 0.3.10
  ---------
  1.5.10
This non-associative addition has the interpretation of applying a distance to a position. So if you are in chapter 1, section 2 paragraph 133 then your position is 1.2.133. If you then wich to jump forward 3 sections and go to start on paragraph 10, then you simply add 0.3.10 to your position tumblr and you will now be on chapter 1, as before, section 2+3=5, and paragraph 10, ie 1.5.10.

Subtraction (-)

Observer then addition of two Tumblrs throws away information. Given C and B, there are multiple Tubmblers A such that A+B=C. Thus defining subtraction is not straight forward.

Strong Subtraction (s-)

In strong subtraction s- we define an operation whos inverse is additionr B + (A s- B) = A
let C = A s- B
A[i] = B[i] for i < ~C
C[~C] = A[~C] - B[~C]
C[i] = A[i] for i > ~C
Thus
let D = B + C

for i < ~C:
  D[i] = B[i] = A[i]

for i > ~C:
  D[i] = A[i]

and:
 D[~C] = B[~C] + C[~C] 
       = B[~C] + A[~C] - B[~C]
       = A[~C]


thus D[i] = A[i] for all i. 
       => D = A

Weak Subtraction (w-)