User:Leigh.Samphier/Sandbox/Canonical P-adic Expansion of Rational is Eventually Periodic/Sufficient Condition

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

Let $x \in \Q_p$.

Let the canonical expansion of $x$ be eventually periodic.

Then:
 * $x$ be a rational number

Proof
Let the canonical expansion of $x$ be eventually periodic.

Lemma 6
To show that $x$ is a rational number it is sufficient to show that $y$ is a rational number.

Let
 * $\ldots d_{k - 1} \ldots d_1 d_0 d_{k - 1} \ldots d_1 d_0 d_{k - 1} \ldots d_1 d_0$

be the periodic canonical expansion of $y$.

By definition of a canonical expansion:
 * $y = d_0 + d_1 p + \ldots + d_{k-1} p^{k-1} + d_0 p^k + d_1 p^{k+1} + \ldots + d_{k-1} p^{2k-1} + d_0 p^{2k} + \ldots$

Let $a = d_0 + d_1 p + \ldots + d_{k-1} p^{k-1}$.

Then:
 * $y = a \paren { 1 + p^k + p^{2k} + \ldots }$

Lemma 7
Then:
 * $y = \dfrac a {1 - p^k}$

Hence:
 * $y$ is a rational number

It follows that $x$ is a rational number.