General Topology/Filters

Definition (filter):

Let ${\displaystyle X}$ be a set. A filter on ${\displaystyle X}$ is a set ${\displaystyle {\mathcal {F}}}$ of subsets of ${\displaystyle X}$ (ie. ${\displaystyle {\mathcal {F}}\subseteq {\mathcal {P}}(X)}$) which satisfies the following conditions:

1. ${\displaystyle \emptyset \notin {\mathcal {F}}}$
2. ${\displaystyle {\mathcal {F}}\neq \emptyset }$
3. ${\displaystyle A\in {\mathcal {F}}\wedge A\subseteq B\Rightarrow B\in {\mathcal {F}}}$ (closure under supersets)
4. ${\displaystyle A,B\in {\mathcal {F}}\Rightarrow A\cap B\in {\mathcal {F}}}$ (closure under finite intersections)

Example (neighbourhood filter):

Let ${\displaystyle X}$ be a topological space and let ${\displaystyle x\in X}$ be a point. The set ${\displaystyle N(x)}$ of all neighbourhoods of ${\displaystyle x}$ is a filter.

Note that the set of open neighbourhoods of a point does not in general form a filter.

Definition (filter convergence):

Let ${\displaystyle X}$ be a topological space, ${\displaystyle x\in X}$, and let ${\displaystyle {\mathcal {F}}}$ be a filter on ${\displaystyle X}$. We say that ${\displaystyle {\mathcal {F}}}$ converges to ${\displaystyle x}$ if and only if ${\displaystyle N(x)\subseteq {\mathcal {F}}}$.

Definition (filter base):

Let ${\displaystyle {\mathcal {F}}}$ be a filter on a set ${\displaystyle X}$. A filter base of ${\displaystyle {\mathcal {F}}}$ is a set ${\displaystyle {\mathcal {B}}\subset {\mathcal {F}}}$ such that for all ${\displaystyle S\in {\mathcal {F}}}$, there exists ${\displaystyle T\in {\mathcal {B}}}$ such that ${\displaystyle T\subseteq S}$.

Note in particular that the bases are required to be contained within the filter.

Definition (filter subbase):

Let ${\displaystyle {\mathcal {F}}}$ be a filter on a set ${\displaystyle X}$. A set ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {F}}}$ is said to be a subbasis of ${\displaystyle {\mathcal {F}}}$ if and only if for every ${\displaystyle A\in {\mathcal {F}}}$, there exist ${\displaystyle B_{1},\ldots ,B_{n}\in {\mathcal {B}}}$ such that ${\displaystyle B_{1}\cap \cdots \cap B_{n}\subseteq A}$.

Note in particular that the subbases are required to be contained within the filter. Note also that we use the terms base and basis interchangeably; both versions are in use. Note finally that a filter base of a filter ${\displaystyle {\mathcal {F}}}$ is a filter subbase of ${\displaystyle {\mathcal {F}}}$.

Proposition (characterisation of filter subbases):

Let ${\displaystyle X}$ be a set and let ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {P}}(X)}$. ${\displaystyle {\mathcal {B}}}$ is a filter subbase of some filter ${\displaystyle {\mathcal {F}}}$ if and only if for any finite set ${\displaystyle A_{1},\ldots ,A_{n}}$ of elements of ${\displaystyle {\mathcal {B}}}$, we have that ${\displaystyle A_{1}\cap \cdots \cap A_{n}\neq \emptyset }$. In this case, ${\displaystyle {\mathcal {F}}}$ is uniquely determined by ${\displaystyle {\mathcal {B}}}$.

Proof: Suppose first that whenever ${\displaystyle A_{1},\ldots ,A_{n}}$ are elements of ${\displaystyle {\mathcal {B}}}$, then ${\displaystyle A_{1}\cap \cdots \cap A_{n}\neq \emptyset }$. Then define

${\displaystyle {\mathcal {F}}:=\{B\subseteq X|\exists A_{1},\ldots ,A_{n}\in {\mathcal {B}}:A_{1}\cap \cdots \cap A_{n}\subseteq B}$.

We claim that ${\displaystyle {\mathcal {F}}}$ is a filter. Indeed, the empty set can't be in ${\displaystyle {\mathcal {F}}}$, since every intersection of elements of ${\displaystyle {\mathcal {B}}}$ is, by assumption, nonempty. Further, whenever ${\displaystyle B\in {\mathcal {F}}}$ and ${\displaystyle C\supseteq B}$, then ${\displaystyle C\in {\mathcal {F}}}$. Finally, suppose that ${\displaystyle B,C\in {\mathcal {F}}}$, and choose ${\displaystyle A_{1},\ldots ,A_{n}\in {\mathcal {B}}}$ so that ${\displaystyle A_{1}\cap \cdots \cap A_{n}\subseteq B}$ and ${\displaystyle D_{1},\ldots ,D_{m}\in {\mathcal {B}}}$ so that ${\displaystyle D_{1}\cap \cdots \cap D_{m}\subseteq C}$, then

${\displaystyle A_{1}\cap \cdots \cap A_{n}\cap D_{1}\cap \cdots \cap D_{m}\subseteq B\cap C}$,

so that ${\displaystyle B\cap C\in {\mathcal {F}}}$. Now suppose that ${\displaystyle {\mathcal {B}}}$ is the subbasis of some filter ${\displaystyle {\mathcal {F}}}$, and let ${\displaystyle A_{1},\ldots ,A_{n}\in {\mathcal {B}}}$. Since ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {F}}}$ and ${\displaystyle {\mathcal {F}}}$ is a filter, ${\displaystyle A_{1}\cap \cdots \cap A_{n}\in {\mathcal {F}}}$, so that ${\displaystyle A_{1}\cap \cdots \cap A_{n}\neq \emptyset }$.

Let now ${\displaystyle {\mathcal {F}}'}$ be an arbitrary filter that has ${\displaystyle {\mathcal {B}}}$ as a subbasis. Then ${\displaystyle {\mathcal {F}}'\subseteq {\mathcal {F}}}$ by the definition of a subbasis. Now since ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {F}}'}$, we also have ${\displaystyle {\mathcal {F}}\subseteq {\mathcal {F}}'}$, so that ${\displaystyle {\mathcal {F}}={\mathcal {F}}'}$. ${\displaystyle \Box }$

Proposition (characterisation of filter bases):

Let ${\displaystyle X}$ be a set and ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {P}}(X)}$. ${\displaystyle {\mathcal {B}}}$ is the basis of some filter ${\displaystyle {\mathcal {F}}}$ if and only if for each ${\displaystyle A_{1},\ldots ,A_{n}\in {\mathcal {B}}}$, there exists ${\displaystyle B\in {\mathcal {B}}}$ so that ${\displaystyle B\subseteq A_{1}\cap \cdots \cap A_{n}}$. In this case, ${\displaystyle {\mathcal {F}}}$ is uniquely determined by ${\displaystyle {\mathcal {B}}}$.

Proof: Suppose first that ${\displaystyle {\mathcal {B}}}$ is the filter basis of some filter ${\displaystyle {\mathcal {F}}}$. Since ${\displaystyle {\mathcal {F}}}$ is a filter and ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {F}}}$, we find that ${\displaystyle A_{1}\cap \cdots \cap A_{n}\in {\mathcal {F}}}$, so that there exists ${\displaystyle B\in {\mathcal {B}}}$ such that ${\displaystyle B\subseteq A_{1},\ldots ,A_{n}}$ since ${\displaystyle {\mathcal {B}}}$ is a filter basis of ${\displaystyle {\mathcal {F}}}$. Suppose now that ${\displaystyle {\mathcal {B}}}$ has the property that intersections of finitely many elements of ${\displaystyle {\mathcal {B}}}$ contain an element of ${\displaystyle {\mathcal {B}}}$. Define

${\displaystyle {\mathcal {F}}:=\{C\subseteq X|\exists B\in {\mathcal {B}}:B\subseteq C\}}$.

Then ${\displaystyle {\mathcal {F}}}$ is readily seen to be a filter since ${\displaystyle {\mathcal {B}}}$ can't contain the empty set and by some routine arguments, and ${\displaystyle {\mathcal {B}}}$ is a filter base of it, since it is certainly contained in ${\displaystyle {\mathcal {F}}}$. Now note that ${\displaystyle {\mathcal {B}}}$ is also a subbasis of ${\displaystyle {\mathcal {F}}}$, so that ${\displaystyle {\mathcal {F}}}$ is uniquely determined by ${\displaystyle {\mathcal {B}}}$, using the characterisation of filter subbases. ${\displaystyle \Box }$

Proposition (filter basis from filter subbasis):

Let ${\displaystyle \phi }$ be a filter which is generated by a subbasis ${\displaystyle {\mathcal {B}}}$. Then a filter basis for ${\displaystyle \phi }$ is given by

${\displaystyle {\mathcal {B}}':=\{B_{1}\cap \cdots \cap B_{n}|n\in \mathbb {N} ,B_{1},\ldots ,B_{n}\in {\mathcal {B}}\}}$.

Proof: We have ${\displaystyle {\mathcal {B}}\subseteq {\mathcal {B}}'}$, so that ${\displaystyle \phi \subseteq \phi '}$, where ${\displaystyle \phi '}$ is the filter generated by ${\displaystyle {\mathcal {B}}'}$. But since ${\displaystyle \phi }$ is closed under finite intersections, ${\displaystyle {\mathcal {B}}'\subseteq \phi }$, and hence ${\displaystyle \phi '\subseteq \phi }$. We conclude ${\displaystyle \phi =\phi '}$. ${\displaystyle \Box }$

Definition (convergence of filter base):

Let ${\displaystyle {\mathcal {B}}}$ be the base of a filter ${\displaystyle {\mathcal {F}}}$ on the topological space ${\displaystyle X}$. We say that ${\displaystyle {\mathcal {B}}}$ converges to a point ${\displaystyle x\in X}$ if and only if ${\displaystyle N(x)\subseteq {\mathcal {F}}}$.

Analogous to real analysis, we can rephrase continuity in terms of filter convergence. In general, filters are supposed to play the role for topological spaces that sequences play for finite-dimensional real normed spaces; we will see many theorems that are analogous to those on ${\displaystyle \mathbb {R} ^{n}}$, with sequences replaced by filters.

Proposition (characterisation of continuity by filter convergence):

Let ${\displaystyle X,Y}$ be topological spaces and ${\displaystyle f:X\to Y}$ a function. ${\displaystyle f}$ is continuous if and only if for each filter ${\displaystyle \phi }$ on ${\displaystyle X}$ that converges to a point ${\displaystyle x\in X}$, the filter base ${\displaystyle f(\phi )}$ converges to ${\displaystyle f(x)}$.

Proof: Note that continuity is equivalent to continuity at each point. Further, ${\displaystyle f}$ being continuous at a point ${\displaystyle x\in X}$ means that for each open neighbourhood ${\displaystyle V\subseteq Y}$ of ${\displaystyle f(x)}$ we find an open neighbourhood ${\displaystyle U}$ of ${\displaystyle x}$ so that ${\displaystyle f(U)\subseteq V}$, which in turn implies that ${\displaystyle f(\phi )}$ is a filter base for a filter that contains ${\displaystyle N(f(x))}$. On the other hand, if ${\displaystyle f}$ has the property that every filter ${\displaystyle \phi }$ of ${\displaystyle X}$ convergent to ${\displaystyle x}$ has the property that ${\displaystyle f(\phi )}$ converges to ${\displaystyle f(x)}$, note that ${\displaystyle f(N(x))}$ converges to ${\displaystyle x}$, so that for every neighbourhood ${\displaystyle V}$ of ${\displaystyle f(x)}$ we may choose ${\displaystyle W\in N(x)}$ so that ${\displaystyle f(W)\subseteq V}$, and then, since ${\displaystyle W\in N(x)}$, we may choose ${\displaystyle U\subseteq W}$ open, ${\displaystyle x\in U}$ and still have ${\displaystyle f(U)\subseteq V}$, so that ${\displaystyle f}$ is continuous at ${\displaystyle x}$. ${\displaystyle \Box }$

Proposition (intersection of filters is a filter):

Whenever ${\displaystyle ({\mathcal {F}}_{\alpha })_{\alpha \in A}}$ is a family of filters on a set ${\displaystyle X}$, the intersection

${\displaystyle {\mathcal {F}}:=\bigcap _{\alpha \in A}{\mathcal {F}}_{\alpha }}$

is a filter.

Proof: That ${\displaystyle X}$ and intersections of finite subsets are contained in ${\displaystyle {\mathcal {F}}}$ is a special case of intersection preserving closure properties. Similarly, we can also regard taking supersets as an operation, with input a set of a single set and output a family of sets encompassing all supersets, so that we also obtain closure under taking supersets of ${\displaystyle {\mathcal {F}}}$, so that a filter becomes a set of sets of sets. ${\displaystyle \Box }$

Proposition (family of filters has a greatest lower bound):

Let ${\displaystyle ({\mathcal {F}}_{\alpha })_{\alpha \in A}}$ be a family of filters on a set ${\displaystyle X}$. Then the intersection of the filters constitutes a least upper bound of the ${\displaystyle {\mathcal {F}}_{\alpha }}$.

Proof: This follows from the fact that the greatest lower bound structure of certain algebraic structures is their intersection, regarding filters as algebraic structures as above. ${\displaystyle \Box }$

Proposition (extension of filters by a set):

Let ${\displaystyle {\mathcal {F}}}$ be a filter on a set ${\displaystyle X}$ and let ${\displaystyle S\subseteq X}$. ${\displaystyle {\mathcal {F}}}$ can be extended to a filter that contains ${\displaystyle S}$ if and only if ${\displaystyle S}$ has nonempty intersection with al elements of ${\displaystyle {\mathcal {F}}}$.

Proof: Suppose first that ${\displaystyle S}$ intersects nontrivially with all elements of ${\displaystyle {\mathcal {F}}}$. Then the union of ${\displaystyle {\mathcal {F}}}$ and ${\displaystyle \{S\}}$ forms a filter subbasis, so that the filter generated by ${\displaystyle S}$ and ${\displaystyle {\mathcal {F}}}$ is a filter that contains ${\displaystyle {\mathcal {F}}}$ and ${\displaystyle S}$. Conversely, whenever ${\displaystyle {\mathcal {G}}}$ is a filter that contains ${\displaystyle {\mathcal {F}}}$ and ${\displaystyle S}$, then for any element ${\displaystyle T\in {\mathcal {F}}}$ we have ${\displaystyle T\in {\mathcal {G}}}$ and ${\displaystyle S\in {\mathcal {G}}}$ so that ${\displaystyle S\cap T\neq \emptyset }$. ${\displaystyle \Box }$

Proposition (existence of least upper bound of two filters):

Let ${\displaystyle {\mathcal {F}}}$ and ${\displaystyle {\mathcal {G}}}$ be two filters on a set ${\displaystyle X}$. There will exist a filter ${\displaystyle {\mathcal {H}}}$ that contains both ${\displaystyle {\mathcal {F}}}$ and ${\displaystyle {\mathcal {G}}}$ (and hence a minimal such filter) if and only if whenever ${\displaystyle S\in {\mathcal {F}}}$ and ${\displaystyle T\in {\mathcal {G}}}$, then ${\displaystyle S\cap T\neq \emptyset }$.

Proof: Necessity is clear as in the extension of filters by a set. Sufficiency follows since whenever the condition is satisfied, ${\displaystyle {\mathcal {F}}\cup {\mathcal {G}}}$ forms the subbasis of a filter by the characterisation of filter subbases. ${\displaystyle \Box }$

Proposition (filter is ultrafilter iff it contains any set or its complement):

Let ${\displaystyle X}$ be a set and let ${\displaystyle \phi }$ be a filter on ${\displaystyle X}$. ${\displaystyle \phi }$ is an ultrafilter if and only if for every set ${\displaystyle A\subseteq X}$, ${\displaystyle \phi }$ contains either ${\displaystyle A}$ or ${\displaystyle X\setminus A}$.

Proof: Suppose that ${\displaystyle \phi }$ is an ultrafilter, and let ${\displaystyle A\subseteq X}$. Then if neither ${\displaystyle A\in \phi }$ nor ${\displaystyle B\in \phi }$, and if we assume that neither ${\displaystyle A}$ nor ${\displaystyle X\setminus A}$ intersect all elements of ${\displaystyle \phi }$, we find elements ${\displaystyle E,F\in \phi }$ so that ${\displaystyle E\cap A=\emptyset }$ and ${\displaystyle F\cap B=\emptyset }$, and then ${\displaystyle E\cap F=E\cap F\cap X=E\cap F\cap (A\cup B)=E\cap F\cap A\cup E\cap F\cap B=\emptyset }$, contradicting ${\displaystyle \phi }$ being a filter. But then either ${\displaystyle A}$ or ${\displaystyle X\setminus A}$ has nonempty intersection with all elements of ${\displaystyle \phi }$, so that we may extend ${\displaystyle \phi }$ by one of the two sets, in contradiction to ${\displaystyle \phi }$ being maximal.

Suppose now that ${\displaystyle \phi }$ contains either ${\displaystyle A}$ or ${\displaystyle X\setminus A}$ for all ${\displaystyle A\subseteq X}$. Suppose that ${\displaystyle \phi }$ was not maximal. Then we find ${\displaystyle B\subset X}$ by which we may extend ${\displaystyle \phi }$, to obtain a larger filter ${\displaystyle \psi \supsetneq \phi }$ (after adding suitable supersets). But since ${\displaystyle B\notin \phi }$, we have ${\displaystyle X\setminus B\in \phi \subset \psi }$ and hence ${\displaystyle B,X\setminus B\in \phi }$ and yet ${\displaystyle B\cap X\setminus B=\emptyset }$, so that ${\displaystyle \psi }$ is not a filter. ${\displaystyle \Box }$

Proposition (characterisation of compactness by filter convergence):

Let ${\displaystyle X}$ be a topological space. ${\displaystyle X}$ is compact if and only if every filter on ${\displaystyle X}$ can be refined to a filter that converges to some point in ${\displaystyle X}$.

(On the condition of the ultrafilter lemma.)

Proof: Let ${\displaystyle X}$ be a compact topological space, and let ${\displaystyle F}$ be any ultrafilter whose underlying set is ${\displaystyle X}$. If ${\displaystyle F}$ does not converge to any point, then for each ${\displaystyle x\in X}$, the set ${\displaystyle E_{x}}$ of open neighbourhoods of ${\displaystyle x}$ that are not in ${\displaystyle F}$ is nonempty. Instead of choosing one open neighbourhood from each ${\displaystyle E_{x}}$ (which would require the axiom of choice), we define

${\displaystyle {\mathcal {U}}:=\bigcup _{x\in X}E_{x}}$.

This is an open cover of ${\displaystyle X}$, and since ${\displaystyle X\}$ is compact, we may choose a finite subcover, that is, some points ${\displaystyle x_{1},\ldots ,x_{n}}$ and open neighbourhoods ${\displaystyle U_{x_{j}}\in E_{x_{j}}}$ (${\displaystyle j\in \{1,\ldots ,n\}}$) such that

${\displaystyle X=U_{x_{1}}\cup \cdots \cup U_{x_{n}}}$.

Now ${\displaystyle F}$ was supposed to be an ultrafilter, and all ultrafilters have the property that for each subset of the set on which they are defined, they contain either that subset or its complement. Therefore, ${\displaystyle F}$ contains the complement of each ${\displaystyle U_{x_{j}}}$ (${\displaystyle j\in \{1,\ldots ,n\}}$) and hence the intersection of all these complements, which is empty by de Morgan's rule.

Conversely, suppose that every filter on ${\displaystyle X}$ may be refined to a filter that converges to a point of ${\displaystyle X}$, and let ${\displaystyle (U_{\alpha })_{\alpha \in A}}$ be an open cover of ${\displaystyle X}$. Suppose that ${\displaystyle (U_{\alpha })_{\alpha \in A}}$ doesn't have any finite subcover. Then by de Morgan, finite intersections of sets of the form ${\displaystyle X\setminus U_{\alpha }}$ are never empty, so that these sets form a subbasis of a filter ${\displaystyle \phi }$, which by assumption may be refined to contain ${\displaystyle N(x)}$ for some ${\displaystyle x\in X}$. But then no ${\displaystyle U_{\alpha }}$ can contain ${\displaystyle x}$, for otherwise both ${\displaystyle U_{\alpha }\in \phi }$ and ${\displaystyle X\setminus U_{\alpha }\in \phi }$, whereas ${\displaystyle U_{\alpha }\cap (X\setminus U_{\alpha })=\emptyset }$. ${\displaystyle \Box }$

Definition (ultrafilter):

An ultrafilter on a set ${\displaystyle X}$ is a maximal element of the set of all filters on ${\displaystyle X}$ ordered by inclusion.

Theorem (ultrafilter lemma):

Let ${\displaystyle X}$ be a set and let ${\displaystyle {\mathcal {F}}}$ be a filter on ${\displaystyle X}$. Then there exists a filter ${\displaystyle {\mathcal {F}}_{\infty }}$ which contains ${\displaystyle {\mathcal {F}}}$ and is an ultrafilter.

(On the condition of the axiom of choice.)

Proof: Observe that the set of filters that contain ${\displaystyle {\mathcal {F}}}$ has the property that every ascending chain has an upper bound; indeed, the union of that chain is one, since it is still a filter and contains ${\displaystyle {\mathcal {F}}}$. Hence, Zorn's lemma yields a maximal element among those filters that contain ${\displaystyle {\mathcal {F}}}$, and this filter must also be maximal, since any larger filter would also contain ${\displaystyle {\mathcal {F}}}$. ${\displaystyle \Box }$

Note: It has been proven that one can't prove the ultrafilter lemma from Zermelo–Fraenkel axioms alone, but some form of the axiom of choice is needed. Still, the ultrafilter lemma does not imply the axiom of choice in ZF, that is, it is strictly weaker than the axiom of choice.

Proposition (filter limits in R1 spaces are topologically indistinguishable):

Let ${\displaystyle X}$ be an R1 topological space, let ${\displaystyle \phi }$ be a filter in ${\displaystyle X}$ and let finally ${\displaystyle x,y\in X}$ so that ${\displaystyle \phi }$ converges to both ${\displaystyle x}$ and ${\displaystyle y}$. Then ${\displaystyle x}$ and ${\displaystyle y}$ are topologically indistinguishable.

Proof: If ${\displaystyle x,y}$ were topologically distinguishable, the R1 property allows to pick ${\displaystyle U,V\subseteq X}$ open so that ${\displaystyle U\cap V=\emptyset }$ and ${\displaystyle x\in U}$ and ${\displaystyle y\in V}$. Since ${\displaystyle {\mathcal {F}}}$ converges to ${\displaystyle x}$ and ${\displaystyle y}$, ${\displaystyle V\in {\mathcal {F}}}$ and ${\displaystyle U\in {\mathcal {F}}}$ in contradiction to ${\displaystyle U\cap V=\emptyset }$. ${\displaystyle \Box }$

Proposition (filter limits in Hausdorff spaces are unique):

Let ${\displaystyle X}$ be a Hausdorff space, and let ${\displaystyle {\mathcal {F}}}$ be a filter on ${\displaystyle X}$. Then ${\displaystyle {\mathcal {F}}}$ may converge at most to one point.

Proof: If ${\displaystyle x,y\in X}$ and ${\displaystyle x\neq y}$, then ${\displaystyle x,y}$ are topologically distinguishable since ${\displaystyle X}$ is Hausdorff and in particular T0. Hence, as Hausdorff spaces are also R1, we apply the fact that filter limits in R1 spaces are topologically indistinguishable. ${\displaystyle \Box }$

Proposition (characterisation of closed sets by filter convergence):

Let ${\displaystyle X}$ be a topological space and ${\displaystyle A\subseteq X}$. Then ${\displaystyle A}$ is closed if and only if for every filter generated by subsets of ${\displaystyle A}$ that converges to some ${\displaystyle x\in X}$, we have ${\displaystyle x\in A}$.

Proof: Suppose first that ${\displaystyle A}$ is closed. Then let ${\displaystyle \phi }$ be a filter as in the theorem statement, and ${\displaystyle x}$ one of its limits. Suppose that ${\displaystyle x\notin A}$. By the convergence, ${\displaystyle X\setminus A\in \phi }$, being a neighbourhood of ${\displaystyle x}$. But then ${\displaystyle \phi }$ is not generated by subsets of ${\displaystyle A}$, because these are closed under finite intersection, and ${\displaystyle X\setminus A}$ contains none of them.

Suppose now that ${\displaystyle A}$ has the given property. Recall that a set is closed if and only if it contains its boundary. Hence, let ${\displaystyle x\in \partial A}$, and consider the filter

${\displaystyle \phi }$ generated by ${\displaystyle \{A\cap M|M\in N(x)\}}$,

where ${\displaystyle N(x)}$ is the neighbourhood system of ${\displaystyle x}$; this is a filter because ${\displaystyle x\in \partial A}$, so that ${\displaystyle \emptyset \notin \phi }$. ${\displaystyle \phi }$ converges to ${\displaystyle x}$, because every neighbourhood of ${\displaystyle x}$ is a superset of some set of ${\displaystyle \phi }$, so that ${\displaystyle N(x)\subset \phi }$. Hence, ${\displaystyle x\in A}$. ${\displaystyle \Box }$

Definition (cluster):

Let ${\displaystyle X}$ be a set, ${\displaystyle \phi }$ a filter on ${\displaystyle X}$, and ${\displaystyle A\subseteq X}$. ${\displaystyle \phi }$ is said to cluster at ${\displaystyle A}$ iff ${\displaystyle A\cap F\neq \emptyset }$ for all ${\displaystyle F\in \phi }$.

In this way, we may reformulate the criterion for the existence of a filter containing another filter and a given set: If ${\displaystyle \phi }$ is a filter and ${\displaystyle A}$ a set, then there exists a filter ${\displaystyle \psi }$ with ${\displaystyle A\in \psi }$ and ${\displaystyle \phi \subset \psi }$ iff ${\displaystyle \phi }$ clusters at ${\displaystyle A}$.

Proposition (characterisation of closedness by clustering):

Let ${\displaystyle X}$ be a topological space and ${\displaystyle A\subseteq X}$. Then ${\displaystyle A}$ is closed if and only if whenever ${\displaystyle x\in X}$ so that ${\displaystyle N(x)}$ clusters at ${\displaystyle A}$, then ${\displaystyle x\in A}$.

Proof: Recall that a set is closed if and only if it contains its boundary. The proposition is a mere reformulation of that statement, because the union of ${\displaystyle A}$ and ${\displaystyle \partial A}$ are the ${\displaystyle x\in X}$ so that ${\displaystyle N(x)}$ clusters at ${\displaystyle A}$. ${\displaystyle \Box }$

Definition (principal ultrafilter):

Let ${\displaystyle X}$ be a set. A principal ultrafilter is a filter ${\displaystyle \phi }$ on ${\displaystyle X}$ such that there exists an element ${\displaystyle x\in X}$ so that ${\displaystyle \phi =\phi _{x}:=\{A\subseteq X|x\in A\}}$.

Definition (non-principal ultrafilter):

Let ${\displaystyle X}$ be a set. A non-principal ultrafilter on ${\displaystyle X}$ is an ultrafilter ${\displaystyle \phi }$ on ${\displaystyle X}$ that is not a principal ultrafilter.

Proposition (non-principal ultrafilters exist):

Let ${\displaystyle X}$ be an infinite set. Then there exists a non-principal ultrafilter on ${\displaystyle X}$.

(On the condition of the ultrafilter lemma.)

Proof: Consider the filter on ${\displaystyle X}$ that is given by the cofinite sets. Upon extending it to an ultrafilter by the ultrafilter lemma, we obtain an ultrafilter ${\displaystyle \phi }$ that contains all cofinite sets. In particular, it cannot contain a point set ${\displaystyle \{x\}}$, since otherwise ${\displaystyle \{x\}\in \phi }$ and ${\displaystyle X\setminus \{x\}\in \phi }$. ${\displaystyle \Box }$

Exercises

1. Let ${\displaystyle X}$ be a topological space which is not compact. Prove that the set ${\displaystyle {\mathcal {F}}}$ of all complements of compact subsets of ${\displaystyle X}$ is a filter. Prove that if ${\displaystyle X}$ is compact, then ${\displaystyle {\mathcal {F}}}$ is not a filter.
2. Suppose that ${\displaystyle \phi }$ is an ultrafilter on a set ${\displaystyle X}$, and let ${\displaystyle A_{1},\ldots ,A_{n}\subseteq X}$ be finitely many subsets of ${\displaystyle X}$. Prove that if ${\displaystyle \phi }$ does not contain any of the ${\displaystyle A_{j}}$, it does not contain ${\displaystyle A_{1}\cup \cdots \cup A_{n}}$.
3. Let ${\displaystyle X,Y}$ be sets and ${\displaystyle f:X\to Y}$ a function. Prove that ${\displaystyle f}$ is injective iff for all filters ${\displaystyle \phi }$ in ${\displaystyle Y}$, ${\displaystyle f^{-1}(\phi )=\{f^{-1}(A)|A\in \phi \}}$ is a filter.