
Proof Metric Spaces
Let p be a fixed prime number, and define d : Z × Z → R by d(m;m) = 0 for all
m ∈ Z and d(m; n) = 1/r
r when m != n and p^(r1) is the highest power of p which
divides m − n. Show that d is a metric on Z.
The 1st condition holds since d(m,m)=0
What I started to do is try and write r in terms m & n and then substitute that into d(m,n) =1/r... This seems wrong to me(Lipssealed).. Im seriously stumped with this question.

Okay, you clearly have d(x,x)= 0 and that d(x,y)> 0 if $\displaystyle x\ne y$.
Also clear is that d(x,y)= d(y,x).
The only hard part is the "triangle inequality": $\displaystyle d(x,y)\le d(x,z)+ d(z,y)$
If x= y or z= y or x= z, that is trivial so you can assume they are all different.
I think the crucial part is to note that if $\displaystyle p^n$ divides both x z and z y then it also divides x y= (x z)+ (z y).