If $R$ is a PID, $S$ an integral domain and $f: R \to S$ is an epimorphism, why is it that either $f$ is an isomorphism or $S$ is a field?
PID - Principal Ideal Domain
What I know:
If $S$ is not a field then we have to show that the function $f$ one to one since it's already an epimorphism (to show that $f$ is an isomorphism). If $f$ is not an isomorphism then we have to show that $S$ is a finite integral domain (= field).
However, I don't know how to use the facts If $R$ is a PID, $S$ an integral domain and $f: R \to S$ is an epimorphism, to prove the latter statement. Please I appreciate clear explanation. Thank you.
The correct statement is: Let $f: R \rightarrow S$ be a surjective ring homomorphism, where $S$ is an integral domain and $R$ a PID. Then either $f$ is an isomorphism or $S$ is a field.
Proof: Let $I := ker(f)$, then via the first isomorphism theorem $f$ induces an isomorphism $R/I \simeq S$. Since $S$ is an integral domain, $I$ is prime.
Case 1: $I=0$. Then $f$, being injective and surjective, is an isomorphism.
Case 2: $I \neq 0$. Since nonzero prime ideals in PIDs are maximal (see link in other answer), $I$ is maximal, so $R/I$ and a fortiori $S$ is a field.