TITLE: Rings for which no polynomial induces the zero function
QUESTION [36 upvotes]: For any commutative ring $R$ let $R[x]$ denote the ring of polynomials with coefficients in $R$.  Any polynomial $p \in R[x]$ naturally induces a function $\hat{p} :R \rightarrow R$.  In some cases, a nonzero polynomial will induce the zero function.  For example, with $R=\mathbb{Z}_6$, the polynomials $x^5 +3x^2+2x$, $3x^4 + 5x^3 + 4x$, and $x^4 - x^3 - x^2 + x$ all induce the zero function.  Some things that I already know:

If $R$ is finite, $R = \{r_1, r_2, ... r_n\}$, then $(x-r_1)(x-r_2)...(x-r_n)$ induces the zero function.
If $R=\mathbb{Z}/p\mathbb{Z}$ then the ideal $I$ of polynomials inducing the zero function is generated by $x^p - x$ (and in fact this coincides with the polynomial given above).
If $R$ is an infinite integral domain, then no nonzero polynomial induces the zero function.
If $R$ is infinite but not an integral domain, then there may or may not be nonzero polynomials that induce the zero function. (I have examples of each.)

It's this last point that brings me here.  I would like to know if there are necessary and sufficient conditions on $R$ that ensure that $\hat{p}=0$ only for $p=0$.  Such conditions would have to be stronger than "infinite" but weaker than "infinite integral domain".  Does anybody know what those conditions are?

REPLY [7 votes]: I can prove a cleaner criterion in the Noetherian case. This does not carry over to the general case, as shown by Will Sawin's example in the comments below.
Lemma. Let $(R,\mathfrak p)$ be an Artinian local ring, and let $f \in R[x]$ of degree $n$. If there exists a set $S \subseteq R$ with $|\operatorname{im}(S \to R/\mathfrak p)| > n$ such that $f(r) = 0$ for  all $r \in S$, then $f = 0$.
Proof. We proceed by induction on the length of $R$. The case $\ell(R) = 1$ is the case where $R$ is a field, which is trivial (this is where the hypothesis $|S| > n$ is used). In general, let $(R,\mathfrak p)$ be local Artinian. Then we have a filtration
$$0 = I_0 \subsetneq \ldots \subsetneq I_s = R$$
of $R$-submodules (i.e. ideals) such that each of the subquotients $I_i/I_{i-1}$ has length $1$. Let $R' = R/I_1$, and note that $\ell(R') = \ell(R) - 1$. Therefore, by the induction hypothesis, we have $f \in I_1 R[x]$. Since $\ell(I_1) = 1$, we have $I_1 \cong R/\mathfrak p$. Thus, $I_1$ is principal, say $I_1 = (r_1)$, and $\operatorname{Ann}(r_1) = \mathfrak p$.
Hence $f = r_1 g$ for some $g \in R[x]$, which we may assume has degree $n$. Then $r_1g(r) = 0$ for all $r \in S$, so $g(r) \in \operatorname{Ann}(r_1) = \mathfrak p$ for all $r \in S$. Applying the induction hypothesis this time to $R/\mathfrak p$, we see that $g \in \mathfrak p R[x]$. Hence, $r_1 g = 0$, since $\mathfrak p \cdot r_1 = 0$. $\square$


Theorem. If $R$ is Noetherian, then there exists $f \in R[x]\setminus\{0\}$ of degree $\leq n$ with $f(r) = 0$ for all $r \in R$ if and only if $R$ has an associated prime $\mathfrak p$ such that $|R/\mathfrak p| \leq n$.


Proof. If $\mathfrak p = \operatorname{Ann}(r_0)$ is such that $|R/\mathfrak p| \leq n$, then let $\{r_1,\ldots,r_m\}$ be a set of representatives for $R/\mathfrak p$, and consider $f = r_0 \prod_{i=1}^m (x-r_i)$. Then for each $r \in R$, we have $\prod (r-r_i) \in \mathfrak p$, hence $f(r) = 0$ since $\mathfrak p \cdot r_0 = 0$. Moreover, the degree of $f$ is $m \leq n$.
Conversely, assume $|R/\mathfrak p| > n$ for every associated prime $\mathfrak p \subseteq R$, and let $f \in R[x]$ of degree $\leq n$ be such that $f(r) = 0$ for all $r \in R$. The natural map $R \to \prod_{\mathfrak p \in \operatorname{Ass}(R)} R_{\mathfrak p}$ is injective [Tag 0331]. Let $S_\mathfrak p \subseteq R_\mathfrak p$ be the image of $R \to R_\mathfrak p$ and let $f_\mathfrak p$ be the image of $f$ in $R_\mathfrak p$, for each $\mathfrak p \in \operatorname{Ass}(R)$.
Since $|R/\mathfrak p| > n$, the image of $S_\mathfrak p$ in $R_\mathfrak p/\mathfrak p = \operatorname{Frac}(R/\mathfrak p)$ has more than $n$ elements. Applying the lemma above to $R_\mathfrak p/\mathfrak p^m$ with the set $S_\mathfrak p/\mathfrak p^m$, we get that $f_\mathfrak p \in \mathfrak p^mR_\mathfrak p[x]$. By Krull's intersection theorem [Tag 00IP], this implies $f_\mathfrak p = 0$. Since this holds for all associated primes $\mathfrak p$, we conclude that $f = 0$. $\square$
Corollary. If $R$ is Noetherian, then there exists $f \in R[x]\setminus\{0\}$ with $f(r) = 0$ for all $r \in R$ if and only if $R$ has an associated prime $\mathfrak p$ such that $R/\mathfrak p$ is finite. $\square$
Remark. The first part of the proof of the does not use the Noetherian hypothesis. Moreover, the argument actually works when there exists any ideal $I$ (not necessarily prime) occurring as the annihilator of some element such that $R/I$ is finite.
Although in general rings not every annihilator is contained in an associated prime, this is true for annihilators $I$ such that $R/I$ is finite. Indeed, there are only finitely many primes in $R/I$, and a maximal one occurring as an annihilator is associated (see Eisenbud's Commutative Algebra, Prop. 3.4). Thus, allowing such $I$ does not give a more general class of examples.