real number and decimal expansions For any real number $x$ we define its decimal expansion as $N\cdot x_1x_2x_2\cdots$ where $N=\lfloor x\rfloor$ and 
$$x_i=\left\lfloor 10^i \left(x- \left(N+\sum_{j=1}^{i-1}\frac{x_j}{10^j}\right) \right)\right\rfloor.$$
Now I have two questions regarding this definition:


*

*Why will each $x_k$ be a digit between $0$ and $9$? That is clear in the case of $x_1$ since $x-N$ being the fractional part of $x$ will be in $[0,1)$ and so $10(x-N)\in[0,10)$. In the case of $x_2$ it is not so clear. Intuitively, if from the fractional part we subtract one tenth's of the "first digit decimal point" so we must getting something like $0.0x_2x_3\cdots$ and hence multiplying by $100$ (and taking floor) is the correct thing to do, to recover $x_2$. However I cannot seem to make this idea rigorous.

*Why can't the decimal expansion end in a string of $9's$? I think if we presumed that it did then, after some $k$ the difference between $x$ and $N.x_1\cdots x_k$ would be zero. That will be a contradiction because clearly each $x_i$ is unique. But how to justify that such a difference ultimately becomes zero?

Update: The answers posted below both use induction to prove (1). Is it correct to do it without induction as follows: Suppose $i\ge 3$ (the cases $i=1,2$ being similar). Now, 
$$10^{i-1}\left(x-\left(N+\sum_{j=1}^{i-2}\frac{x_j}{10^j}\right)\right)<1+x_{i-1}$$ by definition of the floor function. Hence $10^{i}(x-(N+\sum_{j=1}^{i-1}\frac{x_j}{10^j}))<10$ and so $x_i\le 9$. Similarly, since 
$$10^{i-1} \left(x- \left(N+\sum_{j=1}^{i-2}\frac{x_j}{10^j} \right)\right)\ge x_{i-1}$$ 
so $10^{i}\left(x-\left(N+\sum_{j=1}^{i-1}\frac{x_j}{10^j}\right)\right)\ge 0$ following which $x_i\ge 0$.
Thank you.
(Just to clarify bounty will be given to the best posted answer, even if above is correct)
 A: *

*Your attempt it correct. Alternatively, you can proove it by induction. Let's proove that $x_i$ is a digit between 0 and 9 and if you remove first $i$ digits (i.e. $x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)$), you get something in the interval $[0,10^{-i})$. The basic step for $i=1$ is clear, you already said it. The induction step looks like this: Let's suppose that it holds for $n\in\Bbb{N}$. Then $x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)$ is from the inductional propostition in the interval $[0,10^{-i})$ Therefore $10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr)\in[0,10)$ and $\left\lfloor10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr)\right\rfloor = x_{i+1}$ is a digit between 0 and 9. Also holds:
$$
\left\lfloor10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr)\right\rfloor \leq 10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr)
$$
so
$$
10^{-i-1}\left\lfloor10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr)\right\rfloor \leq \bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr) \\
10^{-i-1}x_{i+1} \leq \bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr) \\
\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr) - 10^{-i-1}x_{i+1} \geq 0 \\
\bigl(x-\bigl(N+\sum_{j=1}^{i+1}\frac{x_j}{10^j}\bigr)\bigr) \geq 0
$$
And also:
$$
10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr) - \left\lfloor10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr)\right\rfloor < 1 \\
10^{i+1}\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr) - x_{i+1} < 1 \\
\bigl(x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)\bigr) - 10^{-i-1}x_{i+1} < 10^{-i-1} \\
\bigl(x-\bigl(N+\sum_{j=1}^{i+1}\frac{x_j}{10^j}\bigr)\bigr) < 10^{-i-1}
$$
This means that $x_{i+1}$ is a digit between 0 and 9 and $\bigl(x-\bigl(N+\sum_{j=1}^{i+1}\frac{x_j}{10^j}\bigr)\bigr) \in [0,10^{-n-1})$.
Therefore the statement holds for any $i\in\Bbb{N}$. QED

*Proof by contradiction. Let's suppose that there is an $i\in\Bbb{N}$ such that all digits starting by $x_i$ are nines. Then you have:
$$
x_i=9\\
x-\bigl(N+\sum_{j=1}^{i}\frac{x_j}{10^j}\bigr)=0.\bar{9}\cdot10^{-i}=10^{-i}
$$
However, $10^{-1} \notin [0,10^{-i})$ And this is a contradiction with the statement in the answer to question 1.
A: *

*WLOG, $N=0$ (you can rescale $x$), and
$$0\le(x-0.)<1$$ starts the induction.
Then $$0\le10^n(x-0.x_1x_2\cdots x_n)<1\implies0\le10^{n+1}(x-0.x_1x_2\cdots x_n)<10$$ so that taking the floor, the next digit is one of $0,1,\cdots 9$. And in turn
$$0\le10^{n+1}(x-0.x_1x_2\cdots x_nx_{n+1})<1$$ because this is the fractional part of $10^{n+1}(x-0.x_1x_2\cdots x_nx_{n+1})$, i.e. what remains of a number after you removed the integer part.

*applying this definition, you will never get an infinite repetition of $9$, because such repetitions tend to a number with a finite expansion ($0.234999\cdots=0.234\bar9=0.235$), and by the definition, the computed digits will be zeroes, not nines.
A: Proof by example:
Let the number be $\pi$.
At a certain stage of the discovery of the decimals, assume that we have established
$$0\le10^5(\pi-3.14159)<1.$$
This implies 
$$0\le10^6(\pi-3.14159)<10$$ and it turns out that 
$$\lfloor10^6(\pi-3.14159)\rfloor=2.$$
Due to the bracketing in $[0,10)$, the new digit is perforce one of $0,1,\cdots9$.
Then by subtracting $2$ we get the fractional part of the above number, such that
$$0\le10^6(\pi-3.14159)-2=10^6(\pi-3.141592)<1$$ and we can iterate.
The process is started with $0\le\pi-3<1.$
This is indeed an inductive proof, as you can replace the concrete decimals by variables throughout.

For the second question, notice that you will never get an infinite representation like $3.1415\bar9$ because the series is numerically equal to the number $3.1416$, with the representation $3.1416\bar0$. Hence uniqueness is guaranteed.
