In his book Introduction to Topology, Bert Mendelson asks to prove that
$(\Bbb Z,d_p)$
is a metric space, where $p$ is a fixed prime and
$d_p(m,n)=\begin{cases} 0 \;,\text{ if }m=n \cr {p^{-t}}\;,\text{ if } m\neq n\end{cases}$
where $t$ is the multiplicty with which $p$ divides $m-n$. Now, it is almost trivial to check the first three properties, namely, that
$d(m,n) \geq 0$
$d(m,n) =0 \iff m=n$
$d(m,n)=d(n,m)$
and the only laborious was to check the last property (the triangle inequality). I proceeded as follows:
Let $a,b,c$ be integers, and let
$a-b=p^s \cdot k$
$b-c=p^r \cdot l$
where $l,k$ aren't divisible by $p$.
Then $a-c=(a-b)+(b-c)=p^s \cdot k+p^r \cdot l$
Now we have three cases, $s>r$, $r>s$ and $r=s$. We have respectively:
$a-c=(a-b)+(b-c)=p^r \cdot(p^{s-r} \cdot k+ l)=p^r \cdot Q$ $a-c=(a-b)+(b-c)=p^{s} \cdot( k+p^{r-s} \cdot l)=p^s \cdot R$ $a-c=(a-b)+(b-c)=p^s \cdot (k+l)=p^s \cdot T$
In any case,
$d\left( {a,c} \right) \leqslant d\left( {a,b} \right) + d\left( {b,c} \right)$
since
$\eqalign{ & \frac{1}{{{p^r}}} \leqslant \frac{1}{{{p^s}}} + \frac{1}{{{p^r}}} \cr & \frac{1}{{{p^s}}} \leqslant \frac{1}{{{p^s}}} + \frac{1}{{{p^r}}} \cr & \frac{1}{{{p^s}}} \leqslant \frac{1}{{{p^s}}} + \frac{1}{{{p^s}}} \cr} $
It might also be the case $k+l=p^u$ for some $u$ so that the last inequality is
$\frac{1}{{{p^{s + u}}}} \leqslant \frac{1}{{{p^s}}} + \frac{1}{{{p^s}}}$
$(1)$ Am I missing something in the above? The author asks to prove that in fact, if $t=t_p(m,n)$ is the exponent of $p$, that
$t\left( {a,c} \right) \geqslant \min \left\{ {t\left( {a,b} \right),t\left( {b,c} \right)} \right\}$
That seems to follow from the above arguement, since if $s \neq r$ then
$t\left( {a,c} \right) = t\left( {a,b} \right){\text{ or }}t\left( {a,c} \right) = t\left( {b,c} \right)$
and if $s=r$ then
$t\left( {a,c} \right) \geqslant t\left( {a,b} \right){\text{ or }}t\left( {a,c} \right) \geqslant t\left( {b,c} \right)$
$(2)$ Is there any further reading you can suggest on $p$-adicity?