Show that If $R[X]$ is Euclidean domain then $R$ is a field [duplicate]

Let $R$ is an integral domain .

Show that If $R[X]$ is Euclidean domain then $R$ is a field .

I'll be waiting for your help. Thank you very much in advance!


More generally:

If $R[X]$ is a PID, then $R$ is a field.

Indeed:

Take $a\in R$ with $a\ne0$. Consider the ideal $I=(a,X)$. Then $I=(f)$ for some $f$. Now, $a=fg$ implies that $f$ is a constant. Finally, $X=fh$ implies that $f$ is a unit. Thus, $I=R[X]$. Write $1=ap+Xq$ and evaluate at $X=0$. You get $1=ap(0)$, which implies that $a$ is a unit.

If $R[X]$ is an Euclidean domain using degree as the Euclidean function, there is a simpler proof:

Take $a\in R$ with $a\ne0$. Write $X=aq+r$ with $r=0$ or $\deg(r)<\deg(a)$. This implies that $r=0$ because $\deg(a)=0$. Now compare the leading terms of $X=aq$ and get $1=a q_n$.