# Trouble with Open Set Basis in Zariski

I am working on proving a characterization of irreducibility of $\mathrm{spec}(A)$, where $A$ is commutative unital ring.

My text defined $X_f$ for some $f \in A$ to be the complement of $V(f)$ which is the set of prime ideals in the spec containing $f$. Further, we showed that the $X_f$ form a basis for the open sets. I have no topology background, but I assume this mean any open set in my space can be written as a union of the $X_f$?

Just to be fully clear the definition of irreducible we take is that any two non empty open sets in the spec have a non empty intersection.

Now I didn't have any trouble proving the characterization, but my proof didn't use arbitrary open sets, I just used open sets from the basis. I am led to believe this is sufficient but I would like to prove it. That is, I would like to prove something of the form

Let $X$ be a nonempty topological space. Let $B$ be a basis of open sets. Then if $b_1, b_2 \in B$ such that $b_1,b_2 \neq \emptyset$ implies that $b_1 \cap b_2 \neq \emptyset$ then for all $O_1, O_2$ arbitrary non empty open sets in $X$, $O_1 \cap O_2 \neq \emptyset$.

Any help appreciated.

Yes, everything you've said is correct. First:

Definition: A basis for a topology $\mathscr T$ on $X$ is a collection of open sets $\mathcal B\subset\mathscr T$ such that

$1)$ for any $p\in X$ and open set $U$ containing $p$, there exists $B\in\mathcal B$ such that $p\in B\subseteq U$

$2)$ for any $B_1,B_2\in\mathcal B$ and $p\in B_1\cap B_2$, there exists $B_3\in\mathcal B$ such that $p\in B_3\subseteq B_1\cap B_2$.

Now, we come to the first thing you claimed:

Proposition: Any open subset $U\subseteq X$ can be written as a union of elements of $\mathcal B$.

Proof: For each $p\in U$, there exists $B_p\in\mathcal B$ such that $p\in B_p\subseteq U$. Therefore $U=\cup_{p\in U}B_p$.

Proposition: If for any basis elements $B_1,B_2\in\mathcal B$, we have $B_1\cap B_2\neq\emptyset$, then for any nonempty open subsets $U_1,U_2\subseteq X$, we must have $U_1\cap U_2\neq\emptyset$.
Proof: Let $U_1,U_2\subseteq X$ be nonempty and open. Choose $p_i\in U_i$ and $B_i\in\mathcal B$ such that $p_i\in B_i\subseteq U_i$. Then there exists some $p\in B_1\cap B_2\subseteq U_1\cap U_2$, so the latter is nonempty.
Yes, $\{X_f\}$ is the basis of topology means that the set is open iff it is the union (maybe infinite or empty) of sets from $\{X_f\}$. In particular, any non-empty open set contains a non-empty subset from the basis (because it is a union of several such). Choose any non-empty $b_1\subset O_1, b_2\subset O_2$ from the basis and you are done.