# Let $\phi$ be a Euclidean function, prove that if $a|b$ and $\phi (a) = \phi (b)$, then $a\sim b$

Let $\phi$ be a Euclidean function, prove that if $a|b$ and $\phi (a) = \phi (b)$, then $a\sim b$.

So this means that $b=\gamma a$ for some $\gamma$, but beyond this I haven't been able to get everywhere. The quotient-divisor property seems like the thing I need to use but despite playing around with it for a while now I just can't figure out the trick. Essentially I'm trying to show that $\gamma$ is a unit, but so far no luck.

Can anyone help? Thanks.

-
How does $\phi$ behave when applied to the product of 2 integers? – Thom Tyrrell Dec 18 '12 at 20:37
Well in general $\phi (nm)\geq \phi (n)$, for any integral domain on which a euclidean function can be defined. – Thoth Dec 18 '12 at 20:39

Write $$a=bq+r$$
$$a|a, a|b \Rightarrow a|r \,.$$
From here, you should get that $r =0$, otherwise you have $a|r$ and $\phi(r)< \phi(b)=\phi(a)$.