Solution (source code)

= Solution

Throughout, <rings> are commutative with identity and <ring homomorphisms> preserve identity. The <spectrum of a commutative ring> is $\operatorname{Spec}A=\{\mathfrak p\subset A:\mathfrak p\text{ is a prime ideal}\}$. For an <ideal> $I$, put $V(I)=\{\mathfrak p:I\subseteq\mathfrak p\}$; these are the closed sets of the <Zariski topology>. Its axioms follow from
$$
V(0)=\operatorname{Spec}A,\qquad V(A)=\varnothing,\qquad \bigcap_\lambda V(I_\lambda)=V\!\left(\sum_\lambda I_\lambda\right),\qquad V(I)\cup V(J)=V(IJ).
$$
For the last equality, a <prime ideal> containing $IJ$ must contain $I$ or $J$: if it contained neither, choose $a\in I\setminus\mathfrak p$ and $b\in J\setminus\mathfrak p$, contradicting $ab\in\mathfrak p$. The other equalities follow directly from containment. Thus arbitrary intersections and finite unions of closed sets are closed, proving that this is a <topology>.

The <Zorn lemma> says that a nonempty <partially ordered set> in which every chain has an upper bound has a maximal element. For $A\ne0$, apply it to proper <ideals> ordered by inclusion. The zero <ideal> is proper. The union of a nonempty chain is an <ideal> and is proper, because containing one would put one in a member of the chain; the empty chain has the zero <ideal> as an upper bound. There is therefore a <maximal ideal> $\mathfrak m$. If $a\notin\mathfrak m$, then $\mathfrak m+(a)=A$, so the class of $a$ in $A/\mathfrak m$ is invertible. This <quotient ring> is a <field>, making $\mathfrak m$ a <prime ideal>. Hence \b[$A\ne0\implies\operatorname{Spec}A\ne\varnothing$].

For a <ring homomorphism> $f:A\to B$, define $f^*:\operatorname{Spec}B\to\operatorname{Spec}A$ by $f^*(\mathfrak q)=f^{-1}(\mathfrak q)$. The inverse image is proper because $f(1)=1$, and primality follows from $f(ab)=f(a)f(b)$. Moreover
$$
(f^*)^{-1}(V_A(I))=V_B(IB),
$$
where $IB$ is the <ideal> generated by $f(I)$. This proves <continuity>. Inverse images also give $(g\circ f)^*=f^*\circ g^*$ and $\mathrm{id}^*=\mathrm{id}$. Thus \b[$\operatorname{Spec}$ is a contravariant <functor> from rings to topological spaces].

For the specified inclusion, the <fundamental theorem of algebra> gives the points $0$ and $(x-z)$ of $\operatorname{Spec}\mathbb C[x]$. Over $\mathbb R$, the nonzero <prime ideals> are generated either by $x-r$ with $r\in\mathbb R$, or by $(x-a)^2+b^2$ with $a\in\mathbb R$, $b>0$; all irreducible real <polynomials> have degree one or two. Contraction gives the <spectrum map for the complexification of a real polynomial ring>:
$$
\boxed{0\mapsto0,\qquad (x-z)\mapsto\begin{cases}(x-z),&z\in\mathbb R,\\((x-\operatorname{Re}z)^2+(\operatorname{Im}z)^2),&z\notin\mathbb R.\end{cases}}
$$
Indeed, a real <polynomial> vanishing at a nonreal $z$ also vanishes at $\bar z$, and is divisible by their quadratic factor; the converse is immediate. This map is surjective. Its fibers contain one point over a real linear factor, two conjugate points over an irreducible quadratic factor, and only the <generic point> over zero. It identifies complex-conjugate pairs. Since each proper <Zariski-closed set> in either one-variable <polynomial ring> is a finite set of closed points, images of closed sets are closed; hence the <Zariski topology> on the target is the <quotient topology> for this identification.