TITLE: Going from a fundamental system of neighborhoods to a topology and vice versa
QUESTION [10 upvotes]: Given a topological space $(X,\tau)$ and a point $x\in X$ we can define a fundamental system of neighborhoods of $x$ (or perhaps a neighborhood base at $x$), say $\mathscr{N}(x)\subseteq2^X$, by every neighborhood $U$ of $x$ contains an element of $\mathscr{N}(x)$ and the elements of $\mathscr{N}(x)$ are themselves neighborhoods of $x$ (I'm taking a neighborhood of $x$ to be a set containing an open set containing $x$).  For example, $\{(-1/n,1/n)\}_{n\in\mathbb{N}}$ and $\{[-1/n,1/n]\}_{n\in\mathbb{N}}$ are both fundamental systems of neighborhoods of $0\in\mathbb{R}$ with the standard topology.
So right, we can go from a topological space to a fundamental system of neighborhoods at a point.  I've seen this addressed in certain situations before, but how can you go from having a fundamental system of neighborhoods at every point to a topology?  It seems to me you would take finite intersections and arbitrary unions of the various fundamental systems of neighborhoods.  But then $\{[x-1/n,x+1/n]\}_{n\in\mathbb{N},x\in\mathbb{Q}}$ would not generate the standard topology on $\mathbb{R}$.
In short, how do you go from no topology and just a bunch of sets (which you would wish to call a bunch of fundamental system of neighborhoods) to a topology?  Do you just take finite intersections and arbitrary unions of your sets?

REPLY [5 votes]: Your neighbourhood base $\mathcal V_x$ has to be non-empty and satisfy three properties:
(1) Each $V\in\mathcal V_x$ has to contain $x$.
(2) If $V_1,V_2\in\mathcal V_x$ then there is $V_3\in\mathcal V_x:V_3\subseteq V_1\cap V_2$.
(3) For each $V\in\mathcal V_x$ there is a $W\in\mathcal V_x$ such that for each $y\in W$ exists a $Y\in\mathcal V_y:Y\subseteq V$.
Then you can define $\mathcal U_x:=\{U\subseteq X\mid\exists V\in\mathcal V_x,V\subseteq U\}$ which satisfies (1) - (4) in Dune's answer. You can then proceed by defining a topology such that $\mathcal U_x$ is the neighborhood filter at $x$.
The $\left\{\left[x-\frac1n,\ x+\frac1n\right]\right\}_{n\in\mathbb{N}}$ neighborhood base would lead to the same neighborhood filter as $\left\{\left(x-\frac1n,\ x+\frac1n\right)\right\}_{n\in\mathbb{N}}$, since $\left[x-\frac1n,\ x+\frac1n\right]$ contains $\left(x-\frac1n,\ x+\frac1n\right)$, and $\left(x-\frac1n,\ x+\frac1n\right)$ contains $\left[x-\frac1{2n},\ x+\frac1{2n}\right]$.