Schwartz-Zippel Lemma
In mathematics, the Schwartz–Zippel Lemma is a tool commonly used in probabilistic polynomial identity testing.
Schwartz, Jacob T. “Fast probabilistic algorithms for verification of polynomial identities.” Journal of the ACM (JACM) 27.4 (1980): 701-717.
Zippel, Richard. “Probabilistic algorithms for sparse polynomials.” International symposium on symbolic and algebraic manipulation. Berlin, Heidelberg: Springer Berlin Heidelberg, 1979.
For an m-variate polynomial g g g, the degree of a term of g g g is the sum of the exponents of the variables in the term.
Let F \mathbb{F} F be any field, and let g : F m → F g : \mathbb{F}^m \rightarrow \mathbb{F} g:Fm→F be a nonzero m-variate polynomial of total degree at most d d d. Then on any finite set S ⊆ F S \subseteq F S⊆F,
Pr x ← S m [ g ( x ) = 0 ] ≤ d / ∣ S ∣ \Pr_{x\leftarrow S^m}[g(x)=0]\leq d/\vert S \vert x←SmPr[g(x)=0]≤d/∣S∣
Here, x ← S m x\leftarrow S^m x←Sm denotes an x x x drawn uniformly at random from the product set S m S^m Sm, and ∣ S ∣ \vert S \vert ∣S∣ denotes the size of S S S. In words, if x x x is chosen uniformly at random from S m S^m Sm, then the probability that g ( x ) = 0 g(x) = 0 g(x)=0 is at most d / ∣ S ∣ d/\vert S \vert d/∣S∣.
In particular, any two distinct polynomials of total degree at most d d d can agree on at most a d / ∣ S ∣ d/\vert S \vert d/∣S∣ fraction of points in S m S^m Sm.