Polynomials for which the induced polynomial map is zero Let $R$ be a commutative ring with $1$.
Out of curiosity, I wonder what is the state of art about $I_R=\{P\in R[X]\mid P(r)=0 \mbox{ for all }r\in R\}$.
This an ideal of $R[X]$, which can be rewritten as $I_R=\displaystyle\bigcap_{r\in R}(X-r)R[X]$.
What I know is that $I_R=(0)$ if $R$ is an infinite integral domain, and obviously nonzero if $R$ is finite.
There are several questions which came into my mind.
Questions.

*

*a. Is there a nice way to characterize rings $R$ such that $I_R\neq (0)$?
b. As a related subquestion, can we characterize rings $R$ such that every nonzero polynomial has finitely many roots in $R$ ?


*Is $I_R$ a principal ideal ?


*When $I_R\neq (0)$, what can we say about the minimal degree of a nonzero element of $I_R$ , especially when $R$ is finite ? Does all degrees $d\geq 2$ can happen?
Some thoughts. First of all, I'm not sure Question 1. will have a simple answer. If $R$ is infinite, one may have both cases happening: if $R$ is an infinite integral domain, then $I_R=(0)$, while if $R=\mathbb{F}_2^{\mathbb{N}}$, $I_R$ contains $X^2-X$ (and I'm pretty confident that $I_R=(X^2-X)$ in this case).
Concerning the computation of $I_R$, one may observe the following. Assume $char(R)=c>0$, and let $p$ be the smallest prime divisor of $c$. Let $f_R=\displaystyle\prod_{i=0}^{p-1}(X-i\cdot 1_R)$.
It is easy to check that the ideals $(X-i\cdot 1_R)R[X], 0\leq i\leq p-1$ are pairwise comaximal, so any element of $I_R$ is a multiple of $f_R$. Since $f_R$ is monic, any nonzero $P\in I_R$ has degree $\geq p$.
Note that if $R=\mathbb{F}_{q}$ where $q=p^r$, we have $I_R=(X^q-X)R[X]$, so the minimal degree can be $>p$ if $r>1$.
However, there are some cases where the minimal degree is exactly $p$
For example, if $R=\mathbb{Z}/4\mathbb{Z}$, $\bar{2}X(X-\bar{1})\in I_R$.
More generally, if $R=\mathbb{Z}/n\mathbb{Z}$, and $p$ is the smallest prime divisor of $n$, $\overline{n/p}f_R\in I_R$.
I have not thought about Question 2. seriously, but it would surprised if the answer would be Yes. A potential counterexample would probably be $R=\mathbb{Z}/4\mathbb{Z}$ ( since both  $\bar{2}X(X-\bar{1})$ and $X(X-\bar{1}) (X-\bar{2})(X-\bar{3})$ lie in $I_R$, it is doubtful that $I_R$ is principal) but I have not worked it out yet.
Edit. In fact, if $R=\mathbb{Z}/4\mathbb{Z}$, we have $I_R=\Bigl(\bar{2}X(X-\bar{1}),X(X-\bar{1}) (X-\bar{2})(X-\bar{3})\Bigr)$. I'm quite sure that this ideal is not principal, but i've not found a convincing argument yet.
Edit 2. The ideal above is indeed not principal.
Any insight on any of these questions would be nice.
 A: Nice question! This isn't a complete answer to Q1 but I answer Q3 below (all degrees occur). All rings below are commutative.
Let's call a polynomial $f(x) \in R[x]$ vanishing if it lies in $I_R$ and let's call $R$ vanishable if $I_R \neq 0$, and write $(x)_n = x(x-1) \dots (x-(n-1)))$ for the falling factorial. Some observations:

*

*Any finite ring is vanishable, since $I_R$ contains $\prod_{r \in R} (x - r)$.

*If $F$ is a field, then $I_F = (x^q - x)$ if $F = \mathbb{F}_q$ is finite and $I_F = 0$ if $F$ is infinite. So $F$ is vanishable iff it's finite.

*A vanishing polynomial in $(R \times S)[x]$ is precisely, using the isomorphism $(R \times S)[x] \cong R[x] \times S[x]$, a pair of vanishing polynomials in $R$ and in $S$. Hence $I_{R \times S} = I_R \times I_S$, and $R \times S$ is vanishable iff both $R$ and $S$ are, and in particular a finite product of vanishable rings is vanishable.

*If a polynomial $f(x) \in R[x]$ is vanishing then its image in any localization $f(x) \in S^{-1} R[x]$ is also vanishing. So $S^{-1} I_R$ maps to $I_{S^{-1} R}$. If the localization $R \to S^{-1} R$ is injective then $S^{-1} I_R = I_{S^{-1} R}$, and in particular $R$ is vanishable iff $S^{-1} R$ is. So an integral domain $R$ is vanishable iff $\text{Frac}(R)$ is iff $\text{Frac}(R)$ is a finite field $\mathbb{F}_q$ iff $R$ is finite (by Wedderburn's little theorem).

*A vanishing polynomial in an infinite product $(\prod R_i)[x]$ of rings is a tuple of vanishing polynomials in each $R_i[x]$ of bounded degree. It follows that an infinite product $\prod R_i$ is vanishable iff each $R_i$ is vanishable and the minimal degree of a vanishing polynomial is bounded (by a constant not depending on $i$). Call a ring $R$ $d$-vanishable if it's vanishable with a vanishing polynomial of degree $\le d$; then we're saying that an infinite product of $d$-vanishable rings is $d$-vanishable.

*If $R$ has characteristic $0$ (meaning the unit map $\mathbb{Z} \to R$ is injective) then a vanishing polynomial $f(x) \in I_R$ must be divisible by $x - n$ for each integer $n \in \mathbb{Z}$. The same holds for the image of $f$ in the localization $\mathbb{Q} \otimes R$, where we can argue that the maximal ideals $x - n$ are coprime (or more simply that we can repeatedly factor $f(x) = (x - n) g(x)$ and substitute another integer $m$ to get $(m - n) g(m) = 0$, hence $g(m) = 0$, hence $f(x) = (x - n)(x - m) g(x)$, and so forth) to conclude that the image of $f$ in $\mathbb{Q} \otimes R$ vanishes. It follows that $f$ must have torsion coefficients. In particular, if $R$ is torsion-free then $I_R = 0$.

*

*The torsion-free hypothesis cannot be dropped; if $R = \mathbb{Z}[\epsilon]/(m \epsilon, \epsilon^2)$ where $m \ge 2$ is a positive integer then $f(x) = \epsilon (x)_m$ is vanishing even though $R$ has characteristic $0$.



*If $R$ has characteristic $n$ it breaks up canonically into a finite direct product of rings of prime power characteristic $p^k$ (by CRT), and so (by a previous observation) is vanishable iff each of these rings is vanishable. So we can assume WLOG that $n = p^k$ is a prime power. In this case every vanishing polynomial is divisible by $(x)_p$.

*$R$ admits a canonical map $R \to \prod_P R/P$ to a product of integral domains, whose kernel is the nilradical $\text{Nil}(R)$. A vanishing polynomial $f \in I_R$ must project to a vanishing polynomial in each of these quotients, hence if $R/P$ is infinite must be $0 \bmod P$. So we can say that if 1) every minimal prime ideal of $R$ has infinite index and 2) $R$ has no nilpotents then $I_R = 0$; this generalizes the observation about integral domains.

*

*If $R$ has nilpotent elements of bounded order and $R/\text{Nil}(R)$ is vanishable then $R$ is vanishable. This is because, given a nonzero vanishing polynomial in $R/\text{Nil}(R)[x]$, we can lift it to a polynomial $f(x) \in R[x]$, and then if the nilpotent elements of $R$ have order at most $d$ then $f(x)^d \in I_R$. This power of $f$ is nonzero because it is nonzero $\bmod \text{Nil}(R)$ and is in $I_R$ because, by hypothesis, $f(r) \in \text{Nil}(R)$ for all $r \in R$.

*If $R/\text{Nil}(R)$ is not vanishable then any $f \in I_R$ must have nilpotent coefficients.



This last observation about nilpotents can be used to produce examples of $R$ such that the minimal degree of a (nonzero) polynomial in $I_R$ is an arbitrary positive integer $\ge 2$, which answers Q3. Consider the ring
$$R = \mathbb{F}_q[\epsilon_1, \epsilon_2, \dots ]/(\epsilon_1, \epsilon_2, \dots )^d$$
obtained by adjoining countably many nilpotents of order $d$ to $\mathbb{F}_q$ and then further declaring that all monomials in the $\epsilon_i$ of degree $d$ also vanish; this implies in particular that all sums of products of the $\epsilon_i$ are nilpotent of order $\le d$.

Claim: $f(x) = (x^q - x)^d \in I_R$ has minimal degree $dq$, and in fact $I_R = ((x^q - x)^d)$.

Proof. Begin by writing any $g_0(x) \in I_R$ as $g_0(x) = (x^q - x) g_1(x)$. Every element $x \in R$ can be written uniquely in the form $x = r + \epsilon$ where $r \in \mathbb{F}_q$ and $\epsilon$ is nilpotent. If $p(x) = x^q - x$ then this gives
$$p(r + \epsilon) = p(r) + p(\epsilon) = \epsilon(-1 + \epsilon^{q-1})$$
and hence $g_0(r + \epsilon) = 0$ for all nilpotent $\epsilon$ means (using that $-1 + \epsilon^{q-1}$ is a unit) that $\epsilon g_1(r + \epsilon) = 0$ for all $r \in \mathbb{F}_q$ and all nilpotent $\epsilon$. Working $\bmod \epsilon^2$ (here I might need to assume that $\epsilon$ is one of the $\epsilon_k$ but this is fine) this gives that $g_1(r) = 0 \bmod \epsilon$, and taking $\epsilon$ to be some $\epsilon_k$ which does not occur in the coefficients of $g_1$ (this is where we need countably many nilpotents) gives that in fact $g_1(r) = 0$ for all $r \in \mathbb{F}_q$, hence $g_1(x) = (x^q - x) g_2(x)$ for some polynomial $g_2(x)$.
Now the same argument as before gives that $\epsilon^2 g_2(r + \epsilon) = 0$ for all $r \in \mathbb{F}_q$ and all nilpotent $\epsilon$, and as before working $\bmod \epsilon^3$ (as long as $d \le 3$) gives $g_2(r) = 0 \bmod \epsilon$ for all nilpotents $\epsilon$ and hence $g_2(r) = 0$ for all $r \in \mathbb{F}_q$. Continuing in this way we find that
$$g_0(x) = (x^q - x)^d g_d(x)$$
which is necessary and sufficient for $g_0(x) \in I_R$ since every nilpotent has order $\le d$. $\Box$
What this example and others like the infinite products suggest is that non-Noetherian examples can be wacky but that the Noetherian case (or something like that) ought to be easier to characterize.
