# Proving the universal mapping property for polynomial rings

I am studying from Patrick Morandi's Field and Galois Theory, and I am stuck on Problem 6 from Section 1 (on page 13).

Verify the following universal mapping property for polynomial rings:

1. Let $A$ be a ring containing a field $F$. If $a_1,\dots,a_n \in A$, show that there is a unique ring homomorphism $\varphi : F[x_1,\dots,x_n] \to A$ with $\varphi(x_i) = a_i$ for each $i$.
2. Moreover, suppose that $B$ is a ring containing $F$, together with a function $f : \{ x_1,\dots,x_n \} \to B$, satisfying the following property: For any ring $A$ containing $F$ and elements $a_1,\dots,a_n \in A$, there is a unique ring homomorphism $\varphi : B \to A$ with $\varphi(f(x_i)) = a_i$. Show that $B$ is isomorphic to $F[x_1,\dots,x_n]$.

The list of errata for the book says that we must assume that all the rings are commutative and the ring homomorphisms are $F$-homomorphisms (that is, they are ring homomorphisms that fix $F$).

I have proved the first part as follows: let $\mathbf{a} = (a_1,\dots,a_n)$. The evaluation map $ev_\mathbf{a} : F[x_1,\dots,x_n] \to A$ given by $ev_\mathbf{a}(f(x_1,\dots,x_n)) = f(a_1,\dots,a_n)$ is an $F$-homomorphism with $ev_\mathbf{a}(x_i) = a_i$ for each $i$. Moreover, if $\varphi$ is any $F$-homomorphism from $F[x_1,\dots,x_n]$ to $A$ with $\varphi(x_i) = a_i$, then we must necessarily have that \begin{align} \varphi\left( \sum_{k_1,\dots,k_n} c_{k_1,\dots,k_n} x_1^{k_1} \cdots x_n^{k_n} \right) &= \sum_{k_1,\dots,k_n} c_{k_1,\dots,k_n} \varphi(x_1)^{k_1} \cdots \varphi(x_n)^{k_n}\\ &= \sum_{k_1,\dots,k_n} c_{k_1,\dots,k_n} a_1^{k_1} \cdots a_n^{k_n}\\ &= ev_\mathbf{a}\left( \sum_{k_1,\dots,k_n} c_{k_1,\dots,k_n} x_1^{k_1} \cdots x_n^{k_n} \right). \end{align} Thus, the existence and uniqueness of $\varphi$ has been established.

I am stuck in proving the second part. From the previous result, we have a unique $F$-homomorphism $\Phi : F[x_1,\dots,x_n] \to B$ given by evaluation at $(f(x_1),\dots,f(x_n))$, and my intuition is that this is the required isomorphism. But I am not able to make much progress.

To show that $\Phi$ is injective, the idea I have in mind is as follows: given $0 \neq g \in \ker(\Phi)$, choose the ring $A$ and elements $a_1,\dots,a_n$ in such a way that $g(a_1,\dots,a_n) \neq 0$, thereby arriving at a contradiction. To show that $\Phi$ is surjective, my intuition is that the uniqueness of the map $\varphi$ should play a role, since we will have used only the existence in showing injectivity.

Am I on the right track? I haven't been able to convert these thoughts into a proof yet, and I would really appreciate some hints. Thanks in advance!

Let $A = B$ and $a_i = f(x_i)$. The first part says that there exists a unique $F$-homomorphism $\varphi : F[x_1,\dots,x_n] \to B$ such that $\varphi(x_i) = f(x_i)$ for each $i$.
Let $A = F[x_1,\dots,x_n]$ and $a_i = x_i$. The hypothesis in the second part says that there exists a unique $F$-homomorphism $\psi : B \to F[x_1,\dots,x_n]$ such that $\psi(f(x_i)) = x_i$ for each $i$.
Consider $\psi \circ \varphi : F[x_1,\dots,x_n] \to F[x_1,\dots,x_n]$. It is an $F$-homomorphism satisfying $\psi \circ \varphi (x_i) = x_i$. But, $\operatorname{id}_{F[x_1,\dots,x_n]}:F[x_1,\dots,x_n] \to F[x_1,\dots,x_n]$ is also an $F$-homomorphism satisfying $\operatorname{id}_{F[x_1,\dots,x_n]}(x_i) = x_i$. Taking $A = F[x_1,\dots,x_n]$ and $a_i = x_i$, the uniqueness condition in the first part says that $\operatorname{id}_{F[x_1,\dots,x_n]} = \psi \circ \varphi$.
Consider $\varphi \circ \psi : B \to B$. It is an $F$-homomorphism satisfying $\varphi \circ \psi (f(x_i)) = f(x_i)$. But, $\operatorname{id}_B : B \to B$ is also an $F$-homomorphism satisfying $\operatorname{id}_B(f(x_i)) = f(x_i)$. Taking $A = B$ and $a_i = f(x_i)$, the uniqueness condition in the hypotheses of the second part says that $\operatorname{id}_B = \varphi \circ \psi$.
Hence, $F[x_1,\dots,x_n] \cong B$.