Definition:Let $\tau$ be a topology on a set $X$, and let $\mathcal{B} \subset \tau$. Then $\mathcal{B}$ is a basis for the topology $\tau$ if and only if every open set in $\tau$ is the union of elements of $\mathcal{B}$. If $B \in \mathcal{B}$, we say $B$ is a basis element. Note that $B$ is an element of the basis of $\mathcal{B}$, but a subset of the set $X$.

Theorem(used in proof):

Let $(X,\tau)$ be a topological space, and let $\mathcal{B}$ be a collection of subsets of $X$. Then $\mathcal{B}$ is a basis for $\tau$ if and only if

$(1) \mathcal{B} \subset \tau$ and

$(2)$ for each set $U$ in $\tau$ and point $p$ in $U$ there is a set $V$ in $\mathcal{B}$ such that $p \in V \subset U$.

Theorem(trying to prove):Suppose $X$ is a set and $\mathcal{B}$ is a collection of subsets of $X$. Then $\mathcal{B}$ is a basis for some topology if and only if

$(1)$ each point of $X$ is in some element of $\mathcal{B}$ and

$(2)$ if $U$ and $V$ are sets in $\mathcal{B}$ and $p$ is a point in $U \cap V$, there is a set $W$ in $\mathcal{B}$ such that $p \in W \subset (U \cap V)$.

I am confident with the first part however the other direction of the biconditional has been confusing me.

($\Rightarrow$)

Since $\mathcal{B}$ is a basis, $X$ can be expressed as the union of elements of $\mathcal{B}$, so each point in $X$ is in some basis element. If $U,V \in\mathcal{B}$ since $U,V$ are open, $U \cap V$ is also open.Let $x \in U \cap V$. Since $U \cap V$ is open there exists a basis element $W$ such that $x \in W \subset U \cap V$.

($\Leftarrow$)

I have been struggling deciding what I need to show for this direction. Do I need to show for every point in every open set in $\tau$, there is a subset containing the point, contained in the open set, or do I need to show every element of $\tau$ can be expressed as a union of elements satisfying $(1)$ and $(2)$. Thinking about this, I realize it is wrong to already claim there is a set $\tau$, being a topology, without having proven it.

I will try and do the latter. Since each $x \in X$ is in a set satisfying $(1)$ and $(2)$, $X$ is the union of these sets. $\varnothing$ is in the union of these sets vacuously. I am having difficulty deciding what to do, to prove the second half of this theorem. Any hints will be appreciated.