Topology Defined by Basis

Theorem
Let $X$ be a set.

Let $\mathcal B$ be a set of subsets of $X$.

Suppose that
 * $(B1): \quad \forall A_1, A_2 \in \mathcal B: \forall x \in A_1 \cap A_2: \exists A \in \mathcal B: x \in A \subseteq A_1 \cap A_2$
 * $(B2): \quad \forall x \in X: \exists A \in \mathcal B: x \in A$
 * $\tau = \left\{{\bigcup \mathcal G: \mathcal G \subseteq \mathcal B}\right\}$

Then:
 * $T = \left( {X, \tau} \right)$ is a topological space and
 * $\mathcal B$ is a basis of $T$.

Proof
We have to prove Open Set Axioms $(O1)-(O3)$:
 * $(O1): \quad$ The union of an arbitrary subset of $\tau$ is an element of $\tau$.
 * $(O2): \quad$ The intersection of any two elements of $\tau$ is an element of $\tau$.
 * $(O3): \quad X$ is an element of $\tau$.

IT remains to prove that $\mathcal B$ is a basis of $T$.