# Is there a numeral system for real numbers that is always unique, but still has the usual convenient properties?

For each integer $$b\ge 2,$$ we know that representations of real numbers are usually unique in the base-$$b$$ positional notation. The only time that uniqueness fails is if the form ends in a tail of $$0$$'s or a tail of $$(b-1)$$'s, in which case it is easy to convert between these dual representations. However, the fact that multiple representations are ever possible forces the mathematician to be additionally careful in writing some proofs. For example, in the standard application of Cantor's diagonal argument to show that the continuum is uncountable, one has to be careful to mention that we are constructing the rows using only terminating forms when there are dual representations and that the (anti-)diagonal element constructed is not somehow a dual form of one of the those terminating forms.

Question: Can a numeral system be constructed which represents all real numbers uniquely and only real numbers while still admitting some or all of the following convenient properties of the ordinary positional notation, and perhaps additional nice properties of its own:

1. Being exponentially more efficient than unary, meaning the number of distinct integers represented by at most a certain number of digits is something like the number of distinct symbols in the system to the power of the number of digits.
2. Admitting convenient pen-and-paper and computer algorithms for performing the arithmetic operations of addition, subtraction, multiplication, division and exponentiation, at least when integers or rationals are involved.
3. Allowing for the existence of some convenient divisibility rules of integers, though not necessarily the same ones as those admitted by base-$$b.$$
4. Having predictable (eg. periodic/cyclic) patterns in the representations of some large classes of real numbers, like the rationals.

If these properties are not possible to fulfill, I would still be interested in a system where there is uniqueness at the cost of losing these features. References to non-standard numeral systems that aim for such a goal (or perhaps other goals of convenience) would be appreciated.

• I mean, not what you are looking for probably, but you can just throwout all the infinite tails of $b-1$'s. E.g. in base 10, we can just consider the collection of decimal expansions that do not have an infinite tail of 9's. Sep 7 '20 at 19:56
• Could you be interested in continued fractions? Sep 7 '20 at 20:05
• @Favst Hm, then you should also complain about the usual restriction that the decimal point symbol is allowed only once Sep 7 '20 at 20:07
• I think your dream world in the real numbers is hopeless. Go read about $p$-adic numbers instead, which contain the rational numbers and where there are genuinely unique digit representations. (Continued fractions, mentioned in another comment, are awful for arithmetic operations.)
– KCd
Sep 7 '20 at 20:13
• Not really related to your question, but positional notation can also make sense for values of $b$ which are not integers $\ge 2$. Knuth's Art of Computer Programming, in Volume 2 if I recall, has a nice discussion of base $-2$, base $\sqrt{2}$, and base $2i$. Sep 7 '20 at 20:40

What you are searching for can not exist. For example, suppose we want to represent real numbers in the half- open interval $$[0,1)$$. As the length of the representation increases the set of reals represented becomes dense in $$[0,1)$$. This implies that $$1$$ can be represented arbitrarily closely by finite length representations. Given some natural continuity assumptions about the kind of representation used, this implies that there is a infinite length representation of $$1$$ aside from a finite representation of $$1$$. Thus, the representation of $$1$$ is not unique.

One important and convenient property of a representation is that you can compare them and decide between the real numbers they correspond to which is the larger or smaller. This is a kind of monotonicity property and if it is not a continuity then there would be gaps of unrepresentable real numbers.

This illustrates a basic topological difference between the continuum of real numbers and a very different discontinuum of limits of finite representation systems somewhat similar to the Cantor set.

• What kind of natural assumptions are we talking about? Sep 7 '20 at 22:40
• @Favst The assumption that an arbitrarily close finite length representation implies the existence of an infinite length representation. Essentailly continuity of representation. Sep 7 '20 at 23:07
• I get the argument that there will always be infinitely long representations of numbers arbitrarily close to $1$. But why does it follow that there is an infinitely long representation of $1$? If that comes from the continuity assumptions, I'm not sure that that kind of continuity is necessarily wanted in such a system. Sep 7 '20 at 23:23
• @Favst Your convenient properties practically lead to continuity because, otherwise, you can always find arbitrary mappings of infinite representations to real numbers, but then they will be inconvenient and impractical to use. Sep 7 '20 at 23:39
• The usual decimal system plus the rule of no infinite trailing 9s works fine and is not continuous in this sense. I think the the OP's not "unnecessarily restricting the way that the symbols are used" is the issue, but it's not clear to me that that would imply continuity. I do agree that this kind of topological argument demonstrates a barrier. Sep 7 '20 at 23:53

The first thing that came to mind is something like "base $$n$$ but don't allow tails of the "digit" $$(n-1)$$ in expansions". But the OP said "the idea of unnecessarily restricting the way that the symbols are used is unattractive to me." If we allow a few more things to be represented together with the real numbers, then there may be another option.

## Gonshor's sign expansion

(Part of this section is a modification of my answer to Construction of an infinite number type and other ideas, since I don't have another tidy description of the sign expansion idea to quote.)

The "surreal numbers", or just the "surreals", are a proper class-sized object containing an isomorphic copy of any ordered field. For our purposes, you can just think of them as something that contains all of the reals and also some extra numbers like "infinitesimals" that are positive but less than $$\frac1n$$ for any positive integer $$n$$.

There is a way of writing surreal numbers called "Gonshor's sign expansion". Basically, every surreal number is a "string" of $$+$$s and $$-$$s (actually a map from an ordinal to $$\{+,-\}$$). For the finite strings, this matches somewhat closely to tally marks and binary "decimals". $$"=0$$, $$+"=1$$, $$++"=2$$, $$+++"=3$$, $$-"=-1$$, $$--"=-2$$, etc. $$+-"=\frac12=.1_2$$, $$\underline{++}+-\underline{++-+---+-}"=\underline{10}\,\,. \underline{110100010}\,1_2$$, etc.

These expansions are nice because the ordering of surreals is obvious ($$\cdots+">\cdots">\cdots-"$$) and the negative of a surreal is obtained by just switching all of the signs.

### Rationals and Reals

Similar to binary, you can represent all reals with a finite string or a string indexed by the natural numbers (thought of as the ordinal $$\omega$$). For example, since $$\frac53=1.101010\ldots_2$$, we have $$++-+-+-+-\cdots"=\frac53$$. And $$\pi=+++---+--+----+++\cdots"$$, etc. And we can identify the rational numbers as those with a finite expansion or an expansion indexed by the naturals that is eventually periodic and not eventually constant.

### Extra Numbers

Some expansions indexed by the naturals do not correspond to real numbers, though. If there is no sign change, then we get something beyond the bounds of the reals: we have $$---\cdots" for any real $$r$$. If there is a sign change, but the signs are eventually constant, then we get something closer to a rational number than any other real number could be. For example, $$++----\cdots"$$ is greater than $$1$$ (since it starts with $$++"$$), but less than $$++"=2$$ or $$++-"=3/2$$ or $$++--"=5/4$$ or $$9/8$$, etc. Similarly, $$+-+++\cdots"$$ is less than $$1$$ (since it starts with $$+-"$$), but greater than $$1/2$$ or $$3/4$$ or $$7/8$$, etc.

## Modified sign expansions

The sign expansions that are finite or indexed by naturals have some of the nice properties requested in the OP, but they are not efficient for representing the integers, and hence don't have any nice divisibility rules for integers either.

We can fix this by combining the Gonshor expansions that represent reals with binary expansions. Let's add a dot to mean something like "convert the finitely many symbols to the left to a binary integer" where starting with $$+$$ or $$-$$ tells you the sign of the number.

For example, $$+-+.+--"=4+1++--"=101.01_2=5+\frac14=++++++--"$$. And $$-+--."=-1011_2=-11$$, etc. Then we would keep the efficiency and divisibility rules of binary, without losing anything.

(It's clear what things mean when we only use this new dot when there are only finitely many signs before the dot. I haven't given it much thought, but it may be reasonable to use it for other surreals by exploiting the base 2 variant of Cantor normal form.)