TITLE: show that $\phi(x) = 1$ if $x$ is a unit in an integral domain
QUESTION [5 upvotes]: 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$.

REPLY [3 votes]: 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