How to prove homomorphism identity I have problems to do the problem in http://www.math.helsinki.fi/kurssit/alggeom/h1.gif
Let $k$ be a commutative ring and $f\in k[X_1,\ldots,X_n]$. 
Let $k^\prime,k^{\prime\prime}$ be commutative $k$-algebras and $\varphi:k^\prime\to k^{\prime\prime}$ be a $k$-homomorphism. Prove that for every $x\in k^{\prime n}$ we have
$$f(\varphi^n(x^\prime))=\varphi (f(x^\prime))$$
So I see by definition in What are the notations $k^{\prime n}$ and $\varphi^n$ in algebra? that
$$\varphi^n(x')=(\varphi(x_1'),\varphi(x_2'),\ldots,\varphi(x_n'))$$
where $x_i'$ are the components of $x'$, and $(k')^n$ is $k'\times k'\times\cdots\times k'$ ($n$ times).
$$f(\varphi^n(x^\prime))=f((\varphi(x_1^\prime),\varphi(x_2^\prime)\ldots\varphi(x_n^\prime))).$$ But what theorem allows me to swap $f$ and $\varphi$, i.e. to prove that
$$f((\varphi(x_1^\prime),\varphi(x_2^\prime)\ldots\varphi(x_n^\prime)))=\varphi (f(x^\prime))?$$ Do I need some induction on $n$ or degree of $f$ or some commutative diagram of homomorphism?
 A: No, the only thing that you need is that $\varphi:k^\prime\to k^{\prime\prime}$ is a $k$-homomorphism and that coefficients of $f$ lie in $k$. You could do an induction but it is an overkill, you can directly write this : $f := \sum a_{i_1,\ldots,i_n} X_1^{i_1} \ldots X_n^{i_n}$ with the $a_{i_1,\ldots,i_n} \in k$, and write $ x = (x_1,\ldots,x_n)\in {k'}^n$. Then $\varphi(f(x)) = \varphi\left( \sum a_{i_1,\ldots,i_n} x_1^{i_1} \ldots x_n^{i_n} \right) = \sum a_{i_1,\ldots,i_n} \varphi(x_1)^{i_1} \ldots \varphi(x_n)^{i_n}$ because $\varphi:k^\prime\to k^{\prime\prime}$ is a $k$-homomorphism, and the latter is what you call $f(\varphi^n (x))$. (I used $x$ instead of $x'$ for the element in $k'$.)
A: Let $f = \sum a_{i_1i_2\cdots i_n}X_1^{i_1}X_2^{i_2}\cdots X_n^{i_n}.$ Then $\phi(f(x)) = \sum a_{i_1i_2\cdots i_n}\phi(x_1^{i_1})\phi(x_2^{i_2})\cdots \phi(x_n^{i_n}).$ On the other hand, $f(\phi(x)^n) = f(\phi(x_1), \phi(x_2), \cdots , \phi(x_n)) =  \sum a_{i_1i_2\cdots i_n}\phi(x_1^{i_1})\phi(x_2^{i_2})\cdots \phi(x_n^{i_n}).$
