A filter F on a set S is a set of subsets of S with the following properties:
- S is in F.
- The empty set is not in F.
- If A and B are in F, then so is their intersection.
- If A is in F and A ⊆ B ⊆ S, then B is in F.
Filters are useful in topology: they play the role of sequences in metric spaces. The set of all neighbourhoods of a point x in a topological space is a filter, called the neighbourhood filter of x. A filter which is a superset of the neighbourhood filter of x is said to converge to x. Note that in a non-Hausdorff space a filter can converge to more than one point.
Of particular importance are maximal filters, which are called ultrafilters. A standard application of Zorn's lemma shows that every filter is a subset of some ultrafilter.
For any filter F on a set S, the set function defined by
Filters as described above are subsets of a particular lattice, namely the power set of S. Filters can be also be defined in other lattices - see lattice for details.