Subbase of a topology containing prime ideals (commutative ring) Let $A$ be a commutative ring.  Prove that the set of the ideal primes of $A$, along with $A$, is a subbase of some topology on (the subjacent set of) $A$ and that the complements of the prime ideals are irreducible closed sets under that topology.
I have to show that there is some topology where the prime ideals of the ring are open sets and generate the topology. I know the definition for prime ideal but I have no intuition or idea of what topology could be generated by them. I would appreciate some ideas or hints to solve the exercise.
 A: Any (!) collection of subsets $\mathcal{B}$ of a set $X$ provides a subbase for a topology on $X$. The open subsets are the  unions of the finite intersections of sets in $\mathcal{B}$. The axioms for a topology are easy to check. In the exercise, we have $X=|A|$ (the underlying set of a commutative ring $A$) and $\mathcal{B} = \{\mathfrak{p} \subseteq X : \mathfrak{p} \text{ prime ideal}\}$. Hence, the open subsets are the unions of the finite intersections of prime ideals. There is no need to verify the axioms for a topology in this example, since this is true in great generality as mentioned above.
Let us look at some specific example, the ring of integers $\mathbb{Z}$. The prime ideals are $(0)$ and $(p)$, where $p$ is a prime number. Their finite intersections are $(0)$ and $(n)$, where $n$ is a square-free positive integer. Thus, an example of an open subset is $(0) \cup (5) \cup (3) = \{0,\pm 3,\pm 5,\pm 6, \pm 10,\dotsc\}$. By the way, if $A$ is a noetherian commutative ring, then the open sets are precisely the unions of the radical ideals.
Anyway, the exercise only demands to show that $X \setminus \mathfrak{p}$ is an irreducible closed subset of $X=|A|$. It is closed, since $\mathfrak{p}$ is open by construction. It is irreducible: First, it is non-empty since $\mathfrak{p} \neq A$ (this is part of the definition of a prime ideal). Next, if $X \setminus \mathfrak{p} = S \cup T$ with closed subsets $S,T$, then $\mathfrak{p} = U \cap V$, where $U := X \setminus S$ and $V := X \setminus T$ are open. We have to show that $U=\mathfrak{p}$ or $V=\mathfrak{p}$, because then $S=X \setminus \mathfrak{p}$ or $T=X \setminus \mathfrak{p}$, as required.
Let me recall the following characterization of prime ideals $\mathfrak{p}$. If $I,J$ are ideals and $I \cap J \subseteq \mathfrak{p}$, then $I \subseteq \mathfrak{p}$ or $J \subseteq \mathfrak{p}$. This will be the key ingredient in the proof.
Now assume $\mathfrak{p} = U \cap V$ with open subsets $U,V \subseteq X$. Write $U = \cup_i I_i$, where each $I_i$ is a finite intersection of prime ideals (in particular an ideal) and analogously $V = \cup_j J_j$. For each $i,j$, we have $I_i \cap J_j \subseteq \mathfrak{p}$, hence $I_i \subseteq \mathfrak{p}$ or $J_j \subseteq \mathfrak{p}$. If we have $I_i \not\subseteq \mathfrak{p}$ for some $i$, it follows that $J_j \subseteq \mathfrak{p}$ for all $j$ and hence $V \subseteq \mathfrak{p}$. But we also have $\mathfrak{p} = U \cap V \subseteq V$, so that $V=\mathfrak{p}$, and we are done. If we don't have $I_i \not\subseteq \mathfrak{p}$ for some $i$, i.e. we have $I_i \subseteq \mathfrak{p}$ for all $i$, we may deduce $U=\mathfrak{p}$ as above. This concludes the proof.
