The polynomials which occur in the [Schwartz-Zippel lemma][1] could be defined for any commutative ring, yet the lemma is restricted to fields. This makes it inapplicable for $(1+x^n)=1+x^n(\operatorname{mod}n)$ and similar identities, and feels a bit "unnatural" to me. Why can't

> **Lemma** (Schwartz, Zippel).  
Let
$P\in F[x_1,x_2,\ldots,x_n]$
be a non-zero polynomial of total degree $d \geq 0$ over a field, $F$. Let $S$ be a finite subset of $F$ and let $r_1, r_2, \dots, r_n$ be selected at random independently and uniformly from $S$.  
Then
$\Pr[P(r_1,r_2,\ldots,r_n)=0]\leq\frac{d}{|S|}.$

be generalized to

> **Conjecture**.  
Let
$P\in R[x_1,x_2,\ldots,x_n]$
be a non-zero polynomial of total degree $d \geq 0$ over a "nice" commutative ring, $R$. Let $S$ be a finite subset of $R$ with "$\forall s, t\in S:((\exists u\in R:(u\neq 0\land su=tu))\Rightarrow s=t)$" and let $r_1, r_2, \dots, r_n$ be selected at random independently and uniformly from $S$.  
Then
$\Pr[P(r_1,r_2,\ldots,r_n)=0]\leq\frac{d}{|S|}.$

Here "nice" would be some property that is satisfied for common rings like $\mathbb Z$ or $\mathbb Z/n\mathbb Z$. For example being a subring of the direct product of a family of fields might work. (So *"nice" commutative ring* might be replaced by *subring of a commutative [(von Neumann) regular][2] ring*.) The condition "$\forall s, t\in S:(\dots)$" tries to ensure that one can apply the normal Schwartz-Zippel lemma independently to each field from the underlying family of fields. This condition is automatically satisfied for a subring of a field (like $\mathbb Z$), and can be checked easily by verifying $\operatorname{gcd}(s-t,n)=1$ for $\mathbb Z/n\mathbb Z$, hence it is no real limitation.

> **Question 1** Does this work, or am I overlooking something? (Like "$\exists u\in R$ must be replaced by $\exists u\in \prod_iF_i$", which would nearly annihilate the usefulness of the reformulation.)

> **Question 2** Is it also possible to completely omit any "niceness" requirements for the ring, maybe by modifying the condition "$\forall s, t\in S:(\dots)$" slightly?

  [1]: http://en.wikipedia.org/wiki/Schwartz%E2%80%93Zippel_lemma
  [2]: http://en.wikipedia.org/wiki/Von_Neumann_regular_ring