A closed set in $\operatorname{Spec}(R)$ is irreducible iff $I(X)$ is prime 
Let $R$ be a ring. Prove that a closed set $X\subseteq\operatorname{Spec}(R)$ is irreducible iff $I(X)=\bigcap_{p\in X}p$ is prime.

I proved $\rightarrow$. My attempt at $\leftarrow$ is as follows:
I assume for a contradiction that $X$ is reducible. I can then write $X=(V(I_1)\cap X)\cup(V(I_2)\cap X)$ with $V(I_1),V(I_2)\subseteq\operatorname{Spec}R$ closed sets. Since each of them is contained (and not equal) in $X$, I can find $p_i\in V(I_i)$ s.t $p_1\not\subseteq p_2$ and $p_2\not\subseteq p_1$. I know that in the finite case, that would mean that the intersection above would not be prime (it's easy to prove for two prime ideals and I guess you can inductively prove it for any finite number). But is it still true for any intersection? Otherwise, how can I get a contradiction?
Thanks in advance.
 A: As you have assumed,
$$
X = (V(I_1) \cap X) \cup (V(I_2) \cap X)\\
\subseteq V(I_1) \cup V(I_2) = V(I_1 \cap I_2)
$$
The map $I$ is inclusion-reversing, so
$$
I_1I_2 \subseteq I_1 \cap I_2 \subseteq \sqrt{I_1 \cap I_2} = I(V(I_1 \cap I_2) \subseteq I(X)
$$
Since $I(X)$ is prime, $I_i \subseteq I$ for some $i$. But this implies $V(I_i) \supset V(I) = X$, and therefore $V(I_i) \cap X = X$, a contradiction.
The inclusion $I_1I_2 \subset I_1 \cap I_2$ can hardly be translated elegantly into similar property for $p_1$ and $p_2$. And Hilbert's Nullstellensatz is actually used. So I guess there is no simple solution following your idea.
A: Here is a way to prove what you want which tells you something "nice" about $X$, namely that $X$ is the closure of $\{I(X)\}$ in $\operatorname{Spec}(R)$.
First, prove that in any topological space, the closure of a point is an irreducible closed subset of that space. This is straightforward, and I leave this to you.
Next, observe that for any prime ideal $P$ of $R$, the closed subset $V(P)$ is the closure of the singleton $\{P\} \subset \operatorname{Spec}(R)$. Again, this is not so hard, and I leave this to you.
Onto your question. Since $X$ is a closed subset of $\operatorname{Spec}(R)$, $X = V(I)$ for some ideal of $R$. Since every prime $P$ in $X$ contains $I$, we have that $I(X)$ contains $I$, so $V(I(X)) \subset V(I)$. On the other hand, by definition of $I(X)$, every element of $V(I)$ contains $I(X)$, and so $V(I) \subset V(I(X))$, whence $V(I) = V(I(X))$. Since $I(X)$ is prime by hypothesis, the comments above complete the proof.
A: I think the main problem is that you tried phrasing the proof by contradiction. This is often unnecessary and seems to actually complicate the matter here. Let me first give a different approach.
Suppose that $\mathcal I(X)$ is prime. Then $X\ne\emptyset$ since $\mathcal I(\emptyset)=R$ is not prime. Now, consider some decomposition $X=X_1\cup X_2$ into non-empty closed sets. In order to show that $X$ is irreducible we have to show that one of $X_1,X_2$ is not proper (i.e. $X=X_1$ or $X=X_2$). Write $X_i=\mathcal V(I_i)\cap X$. Then
$$
X=X_1\cup X_2=(\mathcal V(I_1)\cup\mathcal V(I_2))\cap X\quad \implies \quad X\subseteq \mathcal V(I_1)\cup\mathcal V(I_2)=\mathcal V(I_1\cap I_2)
$$
by definition. Hence
$$
I_1\cap I_2\subseteq\mathcal I(\mathcal V(I_1\cap I_2))\subseteq\mathcal I(X)=I\,.
$$
But since $I$ is prime this implies that $I_1\subseteq I$ or $I_2\subseteq I$ concluding the proof.

Now on to your question: What theorem exactly are you referencing?
