# Prove that $(\mathbb{Z},d)$ is a metric space

I got this from Mendelson:

Let $\mathbb {Z}$ be the set of integers.Let $p$ be a positive prime integer. Given distinct integers $m$, $n$ there´s a unique integer $t=t(m,n)$ such that:

$$m-n=p^tk$$

where $k$ is an integer not divisible by $p$. Define a function $d:\mathbb {Z} \times \mathbb {Z}\rightarrow \mathbb {R}$ by the correspondence

$$d(m,m)=0$$

and

$$d(m,n)=\frac{1}{p^t}$$

from $m \neq n.$

Prove that $(\mathbb {Z,d})$ is a metric space.

I would appreciate a better explanation to this question. I didn´t get the $t(m,n)$. This is also a distance,right?

-
What have you tried? Positiveness and symetry are almost trivial, so what about the triangle inequality? – DonAntonio Aug 10 '12 at 20:13
It might help to note that this metric, that is, this distance function, says that a pair of integers are 'close' if their difference is divisible by a large power of $p$. – Joshua Seaton Aug 10 '12 at 20:37

Let $x, y, z$ be integers. It suffices to prove that $d(x, z) \leq d(x, y) + d(y, z)$. If two of $x, y, z$ are equal, this is trivial. So we can assume they are distinct.

Let $x - y = p^k a$, where $a$ is not divisible by $p$. Let $y - z = p^s b$, where $b$ is not divisible by $p$. We can assume $k \leq s$.

Then $x - z = (x - y) + (y - z) = p^k a + p^s b = p^k(a + p^{s-k}b)$. Suppose $x - z = p^r c$, where $c$ is not divisible by $p$. Then $r \geq k$. Hence $d(x, z) = 1/p^r \leq 1/p^k = d(x, y) \leq d(x, y) + d(y, z)$. And we are done.

-

Don't think of $t(m,n)$ as a distance. Rather, consider the following:

Let $x = m-n$. Then by the fundamental theorem of arithmetic, $x$ has a (unique) prime factorization. Let $p$ be any prime. Then, $p$ has some order, call it $t$ such that $t \ge 0$ (and $t \ge 1$ if $p$ is in the prime factorization of $x$).

So, in other words, $t(m,n)$ yields the order of the prime factor $p$ of the prime factorization of $m-n$. The rest of the work just simply requires you to show that the properties of a metric space hold (or perhaps that they do not).

-
Small typo: $t \geq 1$ should be $t \geq 0$. – Joshua Seaton Aug 10 '12 at 20:34
@JSeaton Are you sure? I am explicitly stating that $p$ is a prime that appears in the prime factorization of $x$. If $t = 0$, then $p^t = 1 \Longrightarrow d(m,n) = 1 \forall m,n$. Of course, if we let $t = 0$, then every prime number appears in every integer's prime factorization. Although, I suppose you're right, since the OP statement says that $p$ is any prime... – Arkamis Aug 10 '12 at 20:37
Yes. The convention of treating an integer as an infinite product of prime powers, all but finitely appearing with an exponent of $0$, is a common one (and that's an understatement). Indeed, that's even a tacit assumption in this question. The $t$ in question is just the number of times $p$ divides the given quantity, which will most likely be zero. It is unnecessary and cumbersome to consider the cases of when $p$ divides wholly and otherwise. – Joshua Seaton Aug 10 '12 at 20:46