show that $\phi(x) = 1$ if $x$ is a unit in an integral domain Suppose $D$ is an integral domain and that $\phi$ is a nonconstant function from $D$ to
the nonnegative integers such that $\phi(xy) = \phi(x)\phi(y)$. If $x$ is a unit in $D$, show that
$\phi(x) = 1$.
 A: Hint: First show that if $e$ is the identity element, then $\phi(e)=1$. This should be an easy consequence of $ee=e$. 
Then use the fact that if $x$ is a unit, and $y$ is the inverse of $x$, then $\phi(e)=\phi(xy)=\phi(x)\phi(y)$. 
Added: It is all too easy to forget about the possibility that $\phi$ takes on the value $0$. Let $\phi(e)=a$. Then since $e=e^2$, we have $\phi(e)=\phi(e^2)=\phi(e)\phi(e)$. So $a^2=a$. Thus $a=0$ or $a=1$. If $a=0$, then for any $x$, $\phi(x)=\phi(e)\phi(x)=0$.But we were told $\phi$ is non-constant. so $a=1$. 
A: Hint $\, $ By multiplicativity, $\rm\:\phi\:$ preserves $1$ and divisibility, so it preserves divisors of $1$ (= units).
$\rm(1)\quad \phi\ $ preserves $\:1\!:\ $ apply $\rm\:\phi\:$ to $\rm\:1^2 = 1\ $ to deduce $\rm\ \phi(1) = 1.$
$\rm(2)\quad \phi\ $ preserves divisibility: $\rm\,\ a\mid c\:\Rightarrow\:ab=c\:\Rightarrow\:\phi(a)\,\phi(b)=\phi(c)\:\Rightarrow\:\phi(a)\mid \phi(c)$
$\rm(3)\quad \phi\ $ preserves units: $\rm\,\ u\ $ unit $\rm\:\Rightarrow\:u\mid 1\,\ \smash{\stackrel{(2)}{\Rightarrow}}\,\ \phi(u)\mid \phi(1)\ \smash{\stackrel{(1)}{=}}\ 1\:\Rightarrow\:\phi(u)\:$ unit
