The $ N$-adic Numbers

Lemma 14.2.5   Let $ N$ be a positive integer. Then for any nonzero rational number $ \alpha$ there exists a unique $ e\in\mathbf{Z}$ and integers $ a$$ b$, with $ b$ positive, such that $ \alpha = N^e \cdot \frac{a}{b}$ with $ N\nmid a$, $ \gcd(a,b)=1$, and $ \gcd(N,b)=1$.

Proof. Write $ \alpha = c/d$ with $ c,d\in\mathbf{Z}$ and $ d>0$. First suppose $ d$ is exactly divisible by a power of $ N$, so for some $ r$ we have $ N^r\mid d$ but $ \gcd(N,d/N^r)=1$. Then

$\displaystyle \frac{c}{d} = N^{-r} \frac{c}{d/N^r}.
$

If $ N^s$ is the largest power of $ N$ that divides $ c$, then $ e=s-r$, $ a=c/N^s$, $ b=d/N^r$ satisfy the conclusion of the lemma.

By unique factorization of integers, there is a smallest multiple $ f$ of $ d$ such that $ fd$ is exactly divisible by $ N$. Now apply the above argument with $ c$ and $ d$ replaced by $ cf$ and $ df$. $ \qedsymbol$

Definition 14.2.6 ($ N$-adic valuation)   Let $ N$ be a positive integer. For any positive $ \alpha\in\mathbf{Q}$, the $ N$-adic valuation of $ \alpha$ is $ e$, where $ e$ is as in Lemma 14.2.5. The $ N$-adic valuation of 0 is $ \infty$.

We denote the $ N$-adic valuation of $ \alpha$ by $ \ord _N(\alpha)$. (Note: Here we are using ``valuation'' in a different way than in the rest of the text. This valuation is not an absolute value, but the logarithm of one.)

Definition 14.2.7 ($ N$-adic metric)   For $ x,y\in\mathbf{Q}$ the $ N$-adic distance between $ x$ and $ y$ is

$\displaystyle d_N(x,y) = N^{-\ord _N(x-y)}.
$

We let $ d_N(x,x) = 0$, since $ \ord _N(x-x)=\ord _N(0)=\infty$.

For example, $ x,y\in\mathbf{Z}$ are close in the $ N$-adic metric if their difference is divisible by a large power of $ N$. E.g., if $ N=10$ then $ 93427$ and $ 13427$ are close because their difference is $ 80000$, which is divisible by a large power of $ 10$.

Proposition 14.2.8   The distance $ d_N$ on  $ \mathbf {Q}$ defined above is a metric. Moreover, for all $ x,y,z\in\mathbf{Q}$ we have

$\displaystyle d(x,z) \leq \max(d(x,y),d(y,z)).
$

(This is the ``nonarchimedean'' triangle inequality.)

Proof. The first two properties of Definition 14.2.1 are immediate. For the third, we first prove that if $ \alpha,\beta\in\mathbf{Q}$ then

$\displaystyle \ord _N(\alpha+\beta)\geq \min(\ord _N(\alpha),\ord _N(\beta)).
$

Assume, without loss, that $ \ord _N(\alpha) \leq \ord _N(\beta)$ and that both $ \alpha$ and $ \beta$ are nonzero. Using Lemma 14.2.5 write $ \alpha=N^e(a/b)$ and $ \beta=N^f(c/d)$ with $ a$ or $ c$ possibly negative. Then

$\displaystyle \alpha + \beta = N^e \left(\frac{a}{b} + N^{f-e}\frac{c}{d}\right)
= N^e \left(\frac{ad+bcN^{f-e}}{bd}\right).
$

Since $ \gcd(N,bd)=1$ it follows that $ \ord _N(\alpha+\beta)\geq e$. Now suppose $ x,y,z\in\mathbf{Q}$. Then

$\displaystyle x-z = (x-y) + (y-z),
$

so

$\displaystyle \ord _N(x-z) \geq \min (\ord _N(x-y), \ord _N(y-z)),
$

hence $ d_N(x,z) \leq \max(d_N(x,y), d_N(y,z))$. $ \qedsymbol$

We can finally define the $ N$-adic numbers.

Definition 14.2.9 (The $ N$-adic Numbers)   The set of $ N$-adic numbers, denoted $ \mathbf {Q}_N$, is the completion of  $ \mathbf {Q}$ with respect to the metric $ d_N$.

The set $ \mathbf {Q}_N$ is a ring, but it need not be a field as you will show in Exercises 11 and 12. It is a field if and only if $ N$ is prime. Also, $ \mathbf {Q}_N$ has a ``bizarre'' topology, as we will see in Section 14.2.3.

William Stein 2012-09-24