5

I am struggling to define addition of objects which are similar to decimal-expansions.

In this post, we refer to the decimal-expansion-like things as "wumbers".

Our goal is to write something like:

$\forall v,w \in \mathbb{W}$, $\quad v + w = \text{<SOMETHING>}$.

For any natural numbers, you can pad the left of the associated string with any number of zeros you like.

$582 = 000582 = 0000000000000000000582$

However, my wumbers never stop having non-zero digits as you go farther and farther to the left. This is because a wumber is simply a sign (+ or -) and a function from $\mathbb{Z}$ to the symbols $\begin{Bmatrix} 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\end{Bmatrix}$.

I am most of the way to defining a reasonable form of addition, but I could use some help filling in the gaps.

What is a "Wumber"?

Definition of Wumber

A wumber is an ordered pair $(F, S)$ such that $S$ is one of the symbols "+" or `"-" and $F$ is a function from $\mathbb{Z}$ to the digits $\begin{Bmatrix} 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\end{Bmatrix}$ such that $\not\exists z \in \mathbb{Z}: \forall Z \geq z, F(Z) = 9 \text{ or } \forall Z \leq z, F(Z) = 9$.

Definition of $\mathbb{W}$

$\mathbb{W}$ denotes the set of all wumbers.

Difference Between Wumbers and Decimal Expansions

The primary difference between the decimal-expansion of a real-number and a wumber is that the digits of a wumber are not eventually all zero as you go to the left.

There exists a wumber $W$ such that $\sum_{z \in \mathbb{Z}}^{\text{ }} 10^{z}*W(z)$ is not defined because the coefficient for very large powers of $10$ is not zero.

Definition of the degree of a Wumber

Let $\text{deg}$ be a mapping from the set of all wumbers $\mathbb{W}$ to the set $\mathbb{Z} \cup \begin{Bmatrix} \infty \end{Bmatrix}$ is defined as follows:

$\forall W \in \mathbb{W}$,
$\qquad \text{deg}(W) = $
$\qquad \qquad \begin{cases} \infty, & \text{if } \forall n \in \mathbb{Z} \exists m \in \mathbb{Z}: W(m) \neq 0 \\ \text{min} \begin{Bmatrix} n \in \mathbb{Z}: \forall m \geq n, \quad W(m) = 0 \end{Bmatrix} & \text{otherwise } \end{cases}$

Converting Wumbers to Real Numbers $(W^{\mathbb{R}})$

Let $W \in \mathbb{W}$.

If $\exists d \in \mathbb{Z}$ such that $d = \text{deg}(W)$ then

$W^{\mathbb{R}} = \sum_{z \in \mathbb{Z}}^{\text{ }} 10^{z}*W(z)$

$W^{\mathbb{R}}$ is the sum of $10^{k}*W(k)$ taken over all $k \in \mathbb{Z}$

Also, wumber $W$ is said to be a real wumber.

Converting Real Numbers to Wumbers $(x^{\mathbb{W}})$

For any real number $x$, $x^{\mathbb{W}}$ is the unique wumber $W$ such that $W^{\mathbb{R}} = x$

Definition of "Natural Wumber"

For any real wumber $W \in \mathbb{W}$, $W$ is natural if and only if $W^{\mathbb{R}}$ is a natural number.

How do we Add Wumbers?

An answer to this question is a non-trivial definition of addition which extends addition of real-numbers to $\mathbb{W}$.

$\forall V, W \in \mathbb{W}$ if $V$ and $W$ are real, then $V + W = V^{\mathbb{R}} + W^{\mathbb{R}}$

Example

$\qquad$ Let $W = (``+", F)$ such that $F$ is a mapping from $\mathbb{Z}$ to the digits $\begin{Bmatrix} 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\end{Bmatrix}$ such that:

$\qquad\qquad$ $F[0] = 5$
$\qquad\qquad$ $F[1] = 1$
$\qquad\qquad$ $F[-1] = 2$
$\qquad\qquad$ $F[a] = 0 \forall a \in \mathbb{Z}: \geq 2$
$\qquad\qquad$ $F[b] = 0 \forall b \in \mathbb{Z}b \leq -2$

Then, $F^{\mathbb{R}} = 15.2$

$\qquad$ Let $V = ("-", G)$ such that $G$ is a mapping from $\mathbb{Z}$ to the digits $\begin{Bmatrix} 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\end{Bmatrix}$ such that:

$\qquad\qquad$ $G[0] = 2$
$\qquad\qquad$ $G[1] = 4$
$\qquad\qquad$ $G[-1] = 6$
$\qquad\qquad$ $G[a] = 0$ $\forall a \in \mathbb{Z}: \geq 2$
$\qquad\qquad$ $G[b] = 0$ $\forall b \in \mathbb{Z}b \leq -2$

Then, $V^{\mathbb{R}} = 42.6$

So, $V + W = V^{\mathbb{R}} + W^{\mathbb{R}} = 42.6 + 15.2 = 57.8$.

The issue is when the co-efficient on large powers of $10$ are never eventually always zero...

If you add a non-real wumber $V$ to a real wumber $W$ to produce non-real wumber $X$ then for all sufficiently large indices $k$, the $X[k] = V[k]$

Suppose that we have $F$ from $\mathbb{Z}$ to the digits such that:

  • $F(k) = 0$ for negative indices $k$
  • $F(k) = 0$ for odd positive indices $k > 0$
  • $F(k) = 1$ for even non-negative indices $k \geq 0$

Then $W = ("+", F(k))$ is a non-real wumber.

$W = \dots 101010101 \dots 10101.00000 \dots 0000 \dots$

You can add a number like $500$ or $\pi$ to a non-real wumber.

$W + 500 + \pi = \dots 101010101 \dots 1010604.14519 \dots [\text{ more digits of } \pi] \dots$

After we define how to add a real number to a wumber we could define how to add any arbitrary pair of wumbers.

If I ask you for the $k^{\text{th}}$ element of $V + W$ you should be able to:

  1. truncate $V$ at index $p$
  2. truncate $W$ at index $p$
  3. add the truncated wumbers together
  4. say that $\forall k, p \in \mathbb{Z}$ and $\forall V, W \in \mathbb{W}$, $(V + W)[k] = T(V, p)[k] + T(W, p)[k]$.

The truncation $T$ of wumber $V$ at index $k$ has the properties:

  • $T(V, k)[z] = V[z]$ for all $z \in \mathbb{Z}$ if $z \leq k$
  • $T(V, k)[z] = 0$ for all $z \in \mathbb{Z}$ if $z > k$
  • $T(V, k)$ is a real-wumber even if $V$ is a non-real wumber.

Existence of a something we will call a "Common Additive"

Instead of greatest-common-factor we could have a "greatest-common-additive".

I am thinking that it is probably the case that $\forall V, W \in \mathbb{W}$, if $V$ and $W$ are non-real then $\exists X \in \mathbb{W}$ such that:

  • $X$ is a non-real wumber.
  • $V = X + V^{\prime}$
  • $W = X + W^{\prime}$
  • $V^{\prime}$ is a real wumber
  • $W^{\prime}$ is a real wumber

Then, $V + W = (2*X) + (V^{\prime} + W^{\prime})$

  • $(2*X)$ is a non-real wumber.
  • $(V^{\prime} + W^{\prime})$ is a real wumber.

So, adding two non-real wumbers can be expressed as adding a real wumber to a non-real wumber.

I am not sure how we would define $(2*X)$ for non-real $X$.

Maybe if $X$ was a "binary wumber" (a mapping from $\mathbb{Z}$ to $\begin{Bmatrix} 0, 1\end{Bmatrix}$ then $\forall k \in (2*X)(k) = X(k - 1)$

How can we define the addition of two non-real wumbers?

Was there a Question in There Somewhere ?

An answer to this question is a non-trivial definition of addition which extends addition of real-numbers to $\mathbb{W}$.

How do you add two decimal expansions together when there exists non-zero co-efficient for $10^{k}$ where $k$ is very large.

  • 16
    You may be interested in the $p$-adic numbers. – Noah Schweber Aug 21 '22 at 01:32
  • 2
    Why are you bothering with a sign? ...99999999. is already the additive inverse of 1, i.e. it's -1. – JonathanZ Aug 21 '22 at 01:58
  • 2
    I think what you propose is very close to $10$-adic numbers which is the $g=10$ case of $g$-adic numbers. – Somos Aug 21 '22 at 02:19
  • Incidentally, I claim that your "non-real wumber" $W = \dots 010101$ is realer than it looks. Can you figure out what number it is? (Hint: what is $99 \cdot W$?) – Ravi Fernando Aug 21 '22 at 03:21
  • Also, to expand on my "snappy" comment: Not only do you have "$-1$" without having to carry around a negative sign, you can in fact find additive inverses for any wumber, without having to resort to a negative sign. – JonathanZ Aug 25 '22 at 00:10
  • Also note that the system of $10$-adic numbers has zero-divisors; unlike $p$-adic numbers where $p$ is prime. – GEdgar Aug 25 '22 at 00:31

2 Answers2

3

You get a nice theory if you only insist on digits going infinitely to the left but not to the right. These numbers are called $10$-adic integers, you do not need a sign, and addition and multiplication are defined by carrying infinitely many times. The reason you don't need a sign is that

$$\dots 999 + 1 = 0$$

so $\dots 999$ is already equal to $-1$! You can also think of this in terms of the geometric series identity

$$\sum_{k \ge 0} 9 \cdot 10^k = \frac{9}{1 - 10} = -1$$

which is a perfectly valid computation in the $10$-adic integers because this series converges with respect to a suitable topology. In the $10$-adic numbers $10$ is considered to be "small" and bigger powers of $10$ are even smaller; check out the $p$-adic absolute value for more on this.

It's more typical to consider the $p$-adic integers when $p$ is a prime, for a few reasons. First, if $n$ has prime factors $p_i$, the Chinese remainder theorem can be used to show that the $n$-adic integers $\mathbb{Z}_n$ (not to be confused with the integers $\bmod n$) canonically decompose as a direct product of rings

$$\mathbb{Z}_n \cong \prod_i \mathbb{Z}_{p_i}$$

(the multiplicity of $p_i$ as a prime factor of $n$ doesn't matter). Second, this direct product decomposition implies that $\mathbb{Z}_n$ is only an integral domain if $n$ is a power of a prime.

So the $10$-adic integers are not an integral domain; what this means is that there are nonzero $10$-adic integers whose product is zero. The idea is that some $10$-adic integers are divisible by $2$ infinitely many times, and some are divisible by $5$ infinitely many times, and if you take their product you get something which is divisible by $10$ infinitely many times. In fact we can say more: there are two very special $10$-adic integers

$$e = \dots 890625$$ $$d = \dots 109376$$

with the property that $e^2 = e, d^2 = d, e + d = 1$, and $ed = 0$! These $10$-adic integers explicitly exhibit the Chinese remainder theorem isomorphism $\mathbb{Z}_{10} \cong \mathbb{Z}_2 \times \mathbb{Z}_5$ in the sense that every $10$-adic integer can be written uniquely as $x = ex + dx$ where $ex$ is the "$2$-adic part" of $x$ and $dx$ is the "$5$-adic part." The $10$-adic expansions of $e$ and $d$ can be computed by writing them as $10$-adic limits

$$e = \lim_{n \to \infty} 5^{2^n}$$ $$d = \lim_{n \to \infty} 16^{5^n}$$

as explained in this answer, which among other things makes the infinite divisibility by $5$ and $2$ respectively clear. If you like you can enjoy checking digit by digit that $e + d = 1$ even though this is in no way obvious from the limit definitions above.

Here are some fun exercises you can try to get your hands dirty with how arithmetic in the $10$-adic integers works:

  1. If $p, q$ are two integers such that $\gcd(p, q) = 1$ show that $\frac{p}{q}$ exists in the $10$-adic integers (in the sense that there is a $10$-adic integer which, when multiplied by $q$, gives $p$) if and only if $\gcd(q, 10) = 1$. These are the rational $10$-adic integers.

  2. Show that, as for ordinary decimals, the $10$-adic expansion of a $10$-adic integer is periodic iff it is rational. What is the $10$-adic expansion of $\frac{1}{7}$?

  3. (Harder) If $x$ is a $10$-adic integer, when does $\frac{1}{x}$ exist? That is, when does there exist another $10$-adic integer $y$ such that $xy = 1$?

  4. (Hard) Show that $\sqrt{41}$ exists in the $10$-adic integers in the sense that there exists a $10$-adic integers $x$ satisfying $x^2 = 41$. How many square roots are there? What are their last $6$ digits? (In order to solve this, in addition to learning about the Chinese remainder theorem you will likely also need Hensel's lemma.)

Qiaochu Yuan
  • 468,795
  • You can also tack on finitely many digits going to the right after the decimal point; this gives the $10$-adic numbers, and now it's possible to divide by $10$. But addition and multiplication aren't well-defined if you ask for the digits to be infinite going both ways. – Qiaochu Yuan Aug 25 '22 at 02:58
2

Having done something similar a while back, what I did for my "wumbers"* is to say "I consider myself to know a wumber $x$ if: If someone gives me an $N>0$, I can give them the 'last' $N$ digits of $x$".

So, what's $a+b$ for arbitrary wumbers $a$ and $b$? Well, give me an $N$. Since $a$ and $b$ are wumbers, they can give me their last $N$ digits - those are just positive integers. Now, add those together, and throw away anything that overflows above $N$ digits. Those are the last $N$ digits of $(a+b)$. So by this I consider that I know the wumber $a+b$. Done!

Well, not actually "Done". See, there's a consistency requirement. If I ask for $N_1$ tail digits of $x$, and then ask for $N_2$ tail digits of the same wumber $x$, then, letting $N_0 = \min(N_1, N_2)$, I require that the two answers agree on their last $N_0$ digits. I forgot to mention that in my first paragraph, but if we don't require this then our wumbers could be thrashing around forever as we take longer and longer tails.

So to fully define $a+b$ you have to show that the consistency of $a$ and consistency of $b$ imply that our definition of $a+b$ is also consistent. Which is actually pretty easy.

(P.S. Just wait until you figure out how to multiply wumbers. You can use the same "consistent tails" definition to do it. Then see what $....999999 \ \ * \ \ ...99999$ is. It's fun!)


*I called my "wumbers" "infinite decimals" ($\mathbb D$), which I though was pretty clever sounding, but it actually sounds way too much like "infinitesimal" when you say it for it to be usable. But can I suggest that you include something in your name to specify that you are using base $10$? Because you can do this in other bases, but you get different structures (i.e. non-isomorphic rings) depending on which base you use.

JonathanZ
  • 12,727