Spectra of cartesian product of rings isomorphic to disjoint union of spectra I want to prove that $\operatorname{Spec}(R_1\times R_2)\cong\operatorname{Spec}(R_1)\sqcup\operatorname{Spec}(R_2).$
I tried proving that every prime ideal in $R_1\times R_2$ is of the form $p\times R_2$ for $p$ prime ideal in $R_1$ or $R_1\times p$ for $p$ prime ideal in $R_2$. Then I tried sending $p\times R_2$ to $p$ and $R_1\times q$ to $q$. But there are few things I don't completely understand.
Why is the union even disjoint? Why can't it be that $R_1=R_2$ for example, or that for some reason $R_1$ and $R_2$ share a prime ideal? What am I missing?
Any help would be appreciated.
 A: The ideals of $R_1\times R_2$ have the form $I_1\times I_2$ with $I_i$ an ideal of $R_i$.
You want to check that the only primes are of the form $p_1\times R_2$ or $R_2\times p_2$. Lets assume that there exists a prime ideal $p_1\times p_2$ with $p_i$ a propre ideal. Then take $x_i\in p_i$. We can take the elements $(x_1,1)$ and $(1,x_2)$, their product is $(x_1,x_2)\in p_1\times p_2$, but they dont verify that $(x_1,1),(1,x_2)\in p_1\times p_2$ unless $1\in p_i$ for some $i$. Which means that one of them is the total ring.
A: You are correct that if $R_1$ and $R_2$ overlap, they can share prime ideals. They can even be the exact same ring, in which case we still comfortably write $\operatorname{Spec}(R \times R) = \operatorname{Spec}(R) \sqcup \operatorname{Spec}(R)$, even though these sets are anything but disjoint.
There are two ways I can answer this. The short answer is that $\sqcup$ is an operation which takes two sets (or spaces (or schemes)) and returns a new set (or...) which contains disjoint copies of the arguments. For instance, $\mathbb R \sqcup \mathbb R$ can be thought of as two disjoint lines in the plane. $\sqcup$ is the disjoint union operation, not a notation for a union which just so happens to be disjoint.
Strictly speaking, we have the equality $\operatorname{Spec}(R_1 \times R_2) = \operatorname{Spec}(R_1) \times \{R_2\} \cup \{R_1\} \times \operatorname{Spec}(R_2)$. Now, the two components of this union are disjoint, so we write this with the disjoint union operation.
The long answer is that worrying about strict equality is the wrong philosophy to have here. Instead, we work with objects up to isomorphism. For instance, we say $\mathbb Z \subseteq \mathbb Q$ right? Wrong! $\mathbb Q$ is a set of equivalence classes of pairs of integers. If we were doing things with strict equality, we'd have to say that there is an isomorphic copy of $\mathbb Z$ within $\mathbb Q$. But this is a tedious detail that's ultimately inconsequential, and frankly obscures the truth. I will write $\mathbb Z \subseteq \mathbb Q$ without any worry about what the literal elements of either of these sets are. We don't privilege any one "copy" of the integers over any other. Instead, we treat these objects non-strictly and really worry only about them up to some notion of isomorphism.
Going back to the spectrum again, the decomposition $\operatorname{Spec}(R_1 \times R_2) = \operatorname{Spec}(R_1) \times \{R_2\} \cup \{R_1\} \times \operatorname{Spec}(R_2)$ is literally disjoint. Furthermore, $\operatorname{Spec}(R_1) \times \{R_2\}$ is isomorphic to $\operatorname{Spec}(R_1)$. Taking the product with the singleton $\{R_2\}$ forms an identical copy of $\operatorname{Spec}(R_1)$. What does it really matter if we label these elements as $\mathfrak p$ or as $\mathfrak p \times \{R_2\}$ or as $\mathfrak p$ but we write its elements upside down? If again, we only consider objects up to isomorphism, then there's no tangible difference between $\operatorname{Spec}(R_1)$ and $\operatorname{Spec}(R_1) \times \{R_2\}$. You will likely learn some category theory if you continue studying algebraic geometry, and a category theorist would think that distinguishing between these two copies of the spectrum is "evil."
To go a bit further, take $\operatorname{Spec}(\mathbb Z \times \mathbb Z) \cong \operatorname{Spec}(\mathbb Z) \sqcup \operatorname{Spec}(\mathbb Z)$. Your concern is that $\operatorname{Spec}(\mathbb Z)$ is not disjoint from itself, but what is $\mathbb Z$ anyways? Equivalence classes of pairs of natural numbers? Rationals of the form $n/1$? Equivalence classes of Cauchy sequences of rationals? Constant polynomials? Constant continuous functions $X \longrightarrow \mathbb C$? Diagonal matrices? Maybe the left and right sides of the product are strictly different interpretations of the integers. But really, who cares? I don't, and I don't want to have to care. Working with objects up to isomorphism, rather than equality, frees you from this tedium. Ultimately, we don't really write math in strict ZFC formalism; we communicate it to other humans. Treating these objects so loosely is not a strictly justified thing, but in principle the details can be recovered, and losing this strict mindset frees us from petty concerns of the literal meaning of the elements of $\mathbb Z$.
I'd also like to warn you that this is mot a blanket pass to replace every instance of $\cong$ with $=$ or vice versa! There is subtlety in what kind of isomorphism the context demands. For instance, two isomorphic normal subgroups $H, K$ of a group $G$ do not generally have isomorphic quotients $G/H, G/K$. Realizing what the appropriate notion of isomorphism is, and how far you can stretch it, is a skill that you can develop over time.
A: Here's a quick abstract nonsense proof:
The (contravariant) functor $\operatorname{Spec} : \textbf{CRing} \to \textbf{Aff}$ is a contravariant equivalence of categories between the categories of commutative rings and affine schemes, and therefore sends limits to colimits (and colimits to limits). In particular it sends products to coproducts, hence the product
\begin{equation*}
R_1 \overset{\pi_1}{\longleftarrow} R_1 \times R_2 \overset{\pi_2}{\longrightarrow} R_2
\end{equation*}
in $\textbf{CRing}$ maps to
\begin{equation*}
\operatorname{Spec}(R_1) \overset{\operatorname{Spec}(\pi_1)}{\longrightarrow} \operatorname{Spec}(R_1 \times R_2) \overset{\operatorname{Spec}(\pi_2)}{\longleftarrow} \operatorname{Spec}(R_2)
\end{equation*}
which is therefore a coproduct in $\textbf{Aff}$, hence there exists a unique isomorphism
\begin{equation*}
\operatorname{Spec}(R_1) \sqcup \operatorname{Spec}(R_2) \overset{\sim}{\leftrightarrow} \operatorname{Spec}(R_1 \times R_2)
\end{equation*}
compatible with the inclusions.
