Fermat's Little Theorem and Hilbert's Nullstellensatz I'm having a lot of difficulty understanding just what the Nullstellensatz is saying, and how it can be applied to a specific example that I cooked up.
Let $k$ be a field. Suppose that a polynomial $f(x_1, x_2, \ldots, x_n)$ vanishes on the subvariety $V(x_1 - x_2)$ of $\mathbb{A}^n$, by which I mean $f(a_1, a_2, \ldots, a_n) = 0$ for all $a_1, a_2, \ldots, a_n$ in $k$ with $a_1 = a_2$.
By the Nullstellensatz, $f \in \sqrt{(x_1 - x_2)} = (x_1 - x_2)$ because the ideal is prime. That means $f$ is divisible by $x_1 - x_2$.
So far, so good. (Right?)
Now let $k = \mathbb{F}_p$ and choose $f(x, y) = x^p - y$. By Fermat's Little Theorem, $f(a, a) = 0$ for all $a$ in $\mathbb{F}_p$, which means $f$ vanishes on the diagonal of $\mathbb{A}^2$. The above argument should imply that $x^p - y$ is divisible by $x - y$, but it isn't. What's going on?
 A: As was immediately pointed out in the comments, the Nullstellensatz only applies when $k$ is algebraically closed. Nevertheless, I'm still interested in the extent to which it's true that $x_i - x_j$ divides $f$ whenever $f(x_1, \ldots, x_n)$ vanishes on $V(x_i - x_j)$.
It turns out all we need is that $k$ be an infinite domain.
Vanishing Lemma. Let $k$ be an integral domain with $1$, and suppose $k$ is infinite. Let $f \in k[x_1, \ldots, x_n]$. If $f(a_1, \ldots, a_n) = 0$ for all $(a_1, \ldots, a_n)$ in $k^n$, then $f = 0$.
Proof. By induction on $n$ as described here, noting that the inequality $\# V(f) \le \deg f$ holds for any nonzero $f$ as soon as $k$ has no zero divisors. ▮
Proof of claim. Now suppose $f(x_1, \ldots, x_n)$ vanishes on $V(x_i - x_j)$. Without loss of generality, $i = 1$ and $j = 2$. The polynomial
$$g(x_2, \ldots, x_n) = f(x_2, x_2, x_3, \ldots, x_n)$$
vanishes on $k^{n-1}$, so $g = 0$. But that means $f$ lies in the kernel of the evaluation homomorphism induced by $x_1 \mapsto x_2$, which is the ideal $(x_1 - x_2) \subset k[x_1, \ldots, x_n]$ (by the "factor theorem"). ▮
