# Math Help - Proof Metric Spaces

1. ## Proof Metric Spaces

Let p be a fixed prime number, and de fine 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^(r-1) 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.. Im seriously stumped with this question.

2. Okay, you clearly have d(x,x)= 0 and that d(x,y)> 0 if $x\ne y$.

Also clear is that d(x,y)= d(y,x).

The only hard part is the "triangle inequality": $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 $p^n$ divides both x- z and z- y then it also divides x- y= (x- z)+ (z- y).