I am looking for help in identifying a mistake in the following proof:
Let $P(x,y,z)$ be a (complex) irreducible polynomial in three variables. In other words, the algebraic variety $$Z_P:=\{(x,y,z)\in \mathbb C^3:P(x,y,z)=0\}$$ is irreducible. Now, consider the set $$Z_P':=\{(x,z):P(x,x,z)=0 \}\subset \mathbb C ^2.$$ This is basically the variety you get upon identifying the first two variables in $P$, projected down to $\mathbb C^2$ in the natural way. I want to say that $Z_P'$ is irreducible as well. Here is the idea why:
Consider the mapping $f:\mathbb C^3 \rightarrow \mathbb C^2$ given by: $$f(x,y,z)=(x,z)$$ Then it is easy to see that $f(Z_P)=Z_P'$. Since $f$ is a regular mapping between algebraic varieties, it maps irreducible subvarieties into irreducible ones, meaning that $Z_P'$ is irreducible.
The thing that bothers me is the following - had I considered the set $$Z_P'=\{x:P(x,x,x)=0\}\subset \mathbb C,$$ the same argument would show that this new $Z_P'$ is irreducible. On the other hand, $Z_P'$ is the zero set of a polynomial in one variable, and this is always reducible (assuming its degree is higher than one). But where is the issue in my original argument?
Thanks in advance.