Constructing a topology turning certain sets into neighborhood bases Let $S$ be a set and, given $x\in S$, let there be given a nonempty collection $\mathcal N(x)$ of subsets of $S$ such that:
1) $x\in N$ for all $N\in\mathcal N(x)$
2) If $N,M\in\mathcal N(x)$, then there is a $P\in\mathcal N(x)$ such that $P\subset N\cap M$.
We are to show that these conditions induce a topology on $S$ turning each $\mathcal N(x)$ into a neighborhood basis at $x$.

First of all, we should have that each $N\in\mathcal N(x)$ is a neighborhood of $x$ and second that each neighborhood $A$ should have an element $N\in\mathcal N(x)$ such that $N\subset A$.
The obvious choice to try is to take $\tau=\bigcup_{x\in S}\mathcal N(x)$. However with this definition I'm rather clueless as to how to start verifying the properties listed above; for instance for the former we would have to have that an open set containing $x$ is a neighborhood of $x$.
 A: Consider the set $X=\{a,b,c\}$, where $$\mathcal N_a=\{\{a,b\}\},\ \mathcal N_c=\{\{c,b\}\}, \text{ and }\mathcal N_b=\{\{a,b,c\}\}$$ If you take just all these subsets of $X$, you won't have a topology.
Instead, try $$\tau=\{U\subseteq X\mid \text{for all $x\in U$ there is an $N\in\mathcal N_x$ with $N\subseteq U$}\}$$
This gives you a topology on $X$, though it's not a topology such that each $N\in\mathcal N_x$ is a neighborhood of $x$. There is a certain condition 3) which when added to 1) and 2) makes the so-defined topology $\tau$ a  topology such that each $\mathcal N_x$ is a neighborhood basis for $x$.
A: It isn’t enough to take $\bigcup_{x\in S}\mathscr{N}(x)$: this need not be a topology. For a very simple example of how this could happen, let $\mathscr{N}(x)=\big\{\{x\}\big\}$ for each $x\in S$. Then 
$$\bigcup_{x\in S}\mathscr{N}(x)=\big\{\{x\}:x\in S\big\}\;,$$
which is clearly not a topology on $S$. It is a base for a topology on $S$, however, namely, the discrete topology.
Let 
$$\mathscr{B}=\bigcup_{x\in S}\mathscr{N}(x)\;,$$
and show that $\mathscr{B}$ is a base for a topology with the desired property. Alternatively, try letting 
$$\tau=\{U\subseteq S:\forall x\in U\,\exists N\in\mathscr{N}(x)\,(N\subseteq U)\}\;.$$
