# Smallest subring closed under a rational function

Let $R$ be an integral domain and $K$ its field of fractions. Let $p(x), q(x) \in R[x]$ with $q$ monic. Let $f(x) = p(x)/q(x)$ and suppose $f(x) \not \in R[x]$ (i.e., $q(x)$ does not divide $p(x)$.)

Let $S$ be the smallest subring of $K$ containing $R$ that is closed under $f$. In other words, if $a \in S$ and $q(a) \ne 0$, then $f(a) \in S$. (Since $K$ itself is closed under $f$, and closure under $f$ is preserved under arbitrary intersections, the smallest subring $S$ exists.)

Must $S$ be a field?

(Motivation: If the answer is "no", then $S$ is a non-field counterexample to this question.)

Notes (taken from the answers to the above question):

1. If the assumption that $q$ is monic is dropped, there are easy counterexamples. For example, if $R=\mathbb{Z}$ and $f(x) = x(x-1)/2$, then $S = R = \mathbb{Z}$.

2. If it helps, there is no loss of generality in assuming that $\deg p < \deg q$. Since $q$ is monic, we may divide $p(x)/q(x) = s(x) + r(x)/q(x)$ where $s(x), r(x) \in R[x]$ and $\deg r < \deg q$; any ring containing $R$ is closed under the polynomial $s(x)$, so we may consider $r(x)/q(x)$ instead.

-

No. Take a local ring $R$ having a residue field $k$ that is not algebraically closed. Then there exists a non-constant monic polynomial $\overline{q}\in k[x]$ without a root in $k$. Lift that polynomial to a monic polynomial $q\in R[x]$. Then by assumption $q(r)$ is a unit in $R$ for every $r\in R$. Hence $R$ is closed under $f:=\frac{1}{q}$ but $R$ needs not be a field.