Real numbers have at most two decimal expansions

I'm trying to prove that every real number has at most two decimal expansions, but I'm still not completely certain on some of the details. Here is my attempt. I then have some questions on it.

Let $$x \in \mathbb{R}$$ has two distinct decimal expansions, given by $$x = \sum\limits_{i=0}^{\infty} a_i 10^{-i} = \sum\limits_{i=0} b_i 10^{-i}.$$ Let $$N > 0$$ be the smallest index for which $$a_N \neq b_N$$. So for all $$i < N$$, we have $$a_i = b_i$$. Without loss of generality, suppose that $$b_N > a_N$$. We have \begin{align*} x & = \sum\limits_{i=0}^{\infty} a_i 10^{-i} \\ & = \sum\limits_{i=0}^{N-1} a_i 10^{-i} + a_N 10^{-N} + \sum\limits_{i=N+1}^{\infty} a_i 10^{-i} \\ & \leq \sum\limits_{i=0}^{N-1} a_i 10^{-i} + a_N 10^{-N} + \sum\limits_{i=N+1}^{\infty} 9 \cdot 10^{-i} \\ & = \sum\limits_{i=0}^{N-1} a_i 10^{-i} + a_N 10^{-N} + 10^{-N} \\ & = \sum\limits_{i=0}^{N-1} a_i 10^{-i} + (a_N + 1)10^{-N} \\ & \leq \sum\limits_{i=0}^{N-1} a_i 10^{-i} + b_N 10^{-N} \\ & \leq \sum\limits_{i=0}^{N-1} b_i 10^{-i} + b_N 10^{-N} + \sum\limits_{i=N+1}^{\infty} b_i 10^{-i} \\ & = x. \end{align*} As $$x = x$$, we require that each line be an equality. We have equality if and only if $$a_i = 9$$ for all $$i > N$$, $$b_N = a_N + 1$$, and $$b_i = 0$$ for all $$i > N$$. As we can repeat this construction with any two distinct decimal representations for $$x$$, we conclude that $$x$$ has, at most, two decimal expansions.

Here are my questions.

1. By including $$i = 0$$, I believe I've generalized this argument to any real number, provided that I allow $$a_0$$ and $$b_0$$ to be any integers, even multi-digits, but require $$a_i, b_i \in \{0, 1, \ldots, 9\}$$ for $$i \geq 1$$.

2. To that same point, I'm asserting $$N > 0$$ because I'm taking for granted that the positive integers have unique decimal expansions and there, surely, isn't any issue of terminating in $$9$$'s. Is that ok?

3. Am I correct that I'm just trying to equate every single line because $$x=x$$? I've written two equivalent expressions for the same thing, so every line must be an equality.

4. I'm not totally sold on whether this generalized to any possible decimal expansions. I think the idea is that I took two arbitrary decimal expansions for $$x$$ which differed somewhere, and I could also turn one into a decimal that terminates in $$9$$'s and the other into a decimal that terminates in $$0$$'s, so these must be the only possible expansions. Is that correct?

I'd appreciate any clarifications and critiques of this above proof.

• I think your proof is fine, although perhaps the last paragraph could be expanded a bit. Your observation (4) is correct and I think a proof by contradiction using (4) makes the argument a bit clearer. However, (2) is incorrect e.g. 1 = 0.999.... Also, note that there can be no possibility of non-unique digits before the decimal point. Non-unique expansions only arise because decimal expansions denote a limiting process -- the infinite series. So (1) doesn't really need to be proved. Commented Jan 11, 2022 at 19:27
• @legionwhale How would you suggest expanding the last paragraph? I'm trying to think of an argument by contradiction, but that would probably take the form "assume there are three decimal expansions," so I'd have an extra set of digits to work with (unless I'm missing something). Commented Jan 11, 2022 at 20:16
• The proof by contradiction effectively the same as your proof, but with a different balance for the amount of explanation for each step. I'll write it in an answer. Commented Jan 11, 2022 at 22:33

Proof sketch: Let $$x \in (0,1)$$ for now. Suppose $$x$$ has two different decimal expansions:

$$x=0.a_1a_2a_3...$$ $$x=0.b_1b_2b_3...$$

Then $$a_i \neq b_i$$ for some $$i$$. WLOG $$a_i > b_i$$. Then:

$$x \ge 0.a_1...a_i000...$$ $$x \le 0.b_1...b_i999... = 0.b_1...(b_i+1)000...$$

So $$a_i = (b_i+1)$$ or $$x>x$$. Suppose $$\{a_{i+1},a_{i+2}...\}\neq\{0\}$$. Then, $$\exists j$$ with $$j>i$$, $$a_j \ge 1$$. But then, $$x-x\ge10^{-j}>0$$, which is a contradiction. Similarly if $$b_j < 9$$ for any $$j >i$$. The result follows.

The last part is the sort of additional justification that I personally feel your proof would benefit from. I don't necessarily think that it's immediately obvious why equality only happens in the case you described. As I also remarked, I'm not sure it's entirely necessary to comment on extending this to all of $$\mathbb{R}$$, but here's one way you could immediately justify it.

Corollary: Every number $$x \in \mathbb{R}$$ has at most two decimal expansions.

Hint: WLOG let $$x > 0$$. Then, for some $$n \in \mathbb{N}$$, $$\frac{x}{10^n} \in (0,1)$$.

(This doesn't cover $$x=0$$, but that case is easy to verify.)