Solution (source code)

= Solution

An <affine variety> in $\mathbb A_k^n$ is the common <zero set> of a collection of <polynomials> in $k[x_1,\ldots,x_n]$, with its <Zariski topology>. We use the convention of this question that such a <variety> need not be <irreducible topological space>[irreducible]. Its <vanishing ideal> and <coordinate ring> are
$$
\boxed{I(X)=\{f:f(p)=0\text{ for every }p\in X\},\qquad A(X)=k[x_1,\ldots,x_n]/I(X).}
$$
The quotient identifies <polynomials> that give the same function on $X$, so its elements are exactly <polynomial functions> on $X$.

For affine embeddings $X\subseteq\mathbb A^n$ and $Y\subseteq\mathbb A^m$, a <morphism of affine varieties> is a map $F=(f_1,\ldots,f_m)$ with $f_i\in A(X)$ and <image> in $Y$. <Pullback> of <polynomial functions> defines the contravariant <homomorphism>
$$
\boxed{F^\#:A(Y)\longrightarrow A(X),\qquad [g]\longmapsto g\circ F.}
$$
It is well defined because any <polynomial> vanishing on $Y$ pulls back to zero on $X$, and it preserves addition, multiplication, one, and the constants in $k$.