Canonical P-adic Expansion of Rational is Eventually Periodic/Necessary Condition

Theorem
Let $\struct {\Q_p, \norm {\,\cdot\,}_p}$ be the $p$-adic numbers for some prime $p$.

Let $x$ be a rational number.

Then:
 * the canonical expansion of $x$ is eventually periodic

Proof
Let $x$ be a rational number.

Let $\ldots d_n \ldots d_2 d_1 d_0. d_{-1} d_{-2} \ldots d_{-m}$ be the canonical expansion of $x$.

It is sufficient to show that the canonical expansion $\ldots d_n \ldots d_2 d_1 d_0$ is eventually periodic.

Let $y$ be the $p$-adic number with canonical expansion:
 * $\ldots d_n \ldots d_2 d_1 d_0$

We have:
 * $y = x - \ds \sum_{i \mathop = -m}^{-1} d_i p^i$

So:
 * $y$ is a rational number

By definition of $p$-adic integer:
 * $y$ is a $p$-adic integer

Let:
 * $y = \dfrac a b : a, b$ are coprime

From Characterization of Rational P-adic Integer:
 * $p \nmid b$

Let $n \in \N$.

From :
 * $b, p^n$ are coprime

From :
 * $\exists c_n, d_n \in \Z : c_n b + d_n p^n = 1$

Lemma

 * $\exists A_n, r_n \in \Z$ :
 * $0 \le A_n \le p^n - 1$
 * $\dfrac {a - \paren{p^n - 1} b } {p^n} \le r_n \le \dfrac a {p^n}$
 * $a = A_n b + r_n p_n$

Lemma

 * $\exists n_0 \in \N : \forall n \ge n_0 : -b \le r_n \le 0$