If X is a set, a filter on X is a set F of subsets of X such that ∅∈F; if A,B∈F then A∩B∈F; if A⊆X and there is some B∈F such that B⊆A, then A∈F. For example, if x∈X then the set of all subsets of X that include x is a filter on X. A basis for the filter F is a subset B⊆F such that if A∈F then there is some B∈B such that B⊆A.
If X is a set, a topology on X is a set O of subsets of X such that: ∅,X∈O; if Uα∈O for all α∈I, then ⋃α∈IUα∈O; if I is finite and Uα∈O for all α∈I, then ⋂α∈IUα∈O. If N⊆X and x∈X, we say that N is a neighborhood of x if there is some U∈O such that x∈U⊆N. In particular, an open set is a neighborhood of every element of itself. A basis for a topology O is a subset B of O such that if x∈X then there is some B∈B such that x∈B, and such that if B1,B2∈B and x∈B1∩B2, then there is some B3∈B such that x∈B3⊆B1∩B2.
On the one hand, suppose that X is a topological space with topology O. For each x∈X, let Fx be the set of neighborhoods of x; we call Fx the neighborhood filter of x. It is straightforward to verify that Fx is a filter for each x∈X. If N∈Fx, there is some U∈Fx that is open, and for each y∈U we have N∈Fy.
On the other hand, suppose X is a set, for each x∈X there is some filter Fx, and: if N∈Fx then x∈N; if N∈Fx then there is some U∈Fx such that if y∈U then N∈Fy. We define O in the following way: The elements U of O are those subsets of X such that if x∈U then U∈Fx. Vacuously, ∅∈O, and it is immediate that X∈O. If Uα∈O, α∈I and x∈U=⋃α∈IUα then there is at least one α∈I such that x∈Uα and so Uα∈Fx. As x∈Uα⊆U and Fx is a filter, we get U∈Fx. If I is finite and Uα∈I, α∈I, let U=⋂α∈IUα. If x∈U, then for each α∈I, x∈Uα, and hence for each α∈I, Uα∈Fx. As Fx is a filter, the intersection of any two elements of it is an element of it, and thus the intersection of finitely many elements of it is an element of it, so U∈Fx, showing that U∈O. This shows that O is a topology. We will show that a set N is a neighborhood of a point x if and only if N∈Fx.
If N∈Fx, then let V={y∈N:N∈Fy}. There is some U0∈Fx such that if y∈U0 then N∈Fy. If y∈U0 then N∈Fy, which implies that y∈N, and hence U0⊆V. U0⊆V and U0∈Fx imply that V∈Fx, which implies that x∈V. If y∈V then N∈Fy, and hence there is some U∈Fy such that if z∈U then N∈Fz. If z∈U then N∈Fz, which implies that z∈N, and hence U⊆V. U⊆V and U∈Fy imply that V∈Fy. Thus, if y∈V then V∈Fy, which means that V is open, x∈V⊆N tells us that N is a neighborhood of x.
If a set N is a neighborhood of a point x, then there is some open set U with x∈U⊆N. U being open means that if y∈U then U∈Fy. As x∈U we get U∈Fx, and as U⊂N we get N∈Fx. Therefore a set N is a neighborhood of a point x if and only if N∈Fx.
In conclusion: If X is a topological space and for each x∈X we define Fx to be the neighborhood filter of x, then these filters satisfy the two conditions that if N∈Fx then x∈N and that if N∈Fx there is some U∈Fx such that if y∈U then N∈Fy. In the other direction, if X is a set and for each point x∈X there is a filter Fx and the filters satisfy these two conditions, then there is a topology on X such that these filters are precisely the neighborhood filters of each point.