TITLE: If $f(u(x), v(y))=f(x, y)$, can we conclude that either $u(x)=x$ or $v(y)=y$?
QUESTION [7 upvotes]: Suppose $k$ is an algebraically closed field, and $f\in k[x, y]$ is
  an irreducible polynomial in two variables. Furthermore, suppose that $f(u(x),
v(y))=f(x, y)$ for every $x, y\in k$, where $u\in k[x]$, $v\in k[y]$ are
  polynomials of one variable. Can we conclude that either $u(x)=x$ or
  $v(y)=y$?

I think the answer is "yes". I am thinking maybe we can use some sort of degree argument, but there could be some cancellations if we try to expand $f(u(x), v(y))$. 
This question naturally arose to me when I was reading Section 1.4 "Rational Maps" in Basic Algebraic Geometry by Shafarevich. But, as far as I can tell, it is not directly related to any of the results presented there.

REPLY [3 votes]: You can have $f(x,y)=x+y$, and then $u$ can shift by a constant, with $v$ shifting in reverse.