Topological Spaces
This post motivates the definition of a topological space using the concept of a filter.

In each mathematical subject, we generally study some sort of "structure" and "structure-preserving maps" (i.e. homomorphisms). The abstraction of this idea leads to category theory.
Topological spaces enable us to define continuous maps; they serve as the domain and codomain of a class of continuous functions. The structure that they possess which is preserved by continuous functions is a particular convergence structure.
Metric Spaces and Sequences
First, let's consider metric spaces. A function \(f : X \rightarrow Y\) between two metric spaces is continuous if and only if it preserves the convergence of sequences, that is, for any sequence \((x_n)_{n \in \mathbb{N}}\), a function is continuous if and only if \(\lim_{n \to \infty} f(x_n) = f(L)\) whenever \(\lim_{n \to \infty}x_n = L\) for some \(L \in X\). Thus, metric spaces possess a particular convergence structure (convergent sequences) that is preserved by continuous maps.
In a metric space, the metric enables us to define limits. It provides a quantitative notion of "nearness", that is, it tells us how near two points of a metric space are by assigning a number that indicates the distance between the points.
Filters
Let's consider a qualitative notion of "nearness". Consider a set \(X\) and a point \(x \in X\). Let's designate a particular subset \(N \subseteq X\) containing \(x\) as a "neighborhood" of \(x\). The points within \(N\) are, in some sense, "near" \(x\). What conditions should we apply for this notion of "neighborhood" to be coherent? First of all, any superset of a neighborhood of a point should again be a neighborhood of that point. Also, the intersection of two neighborhoods of a point should again be a neighborhood of a point. This leads immediately to the following notion:
Definition (Filter on a Set) A filter on a set \(X\) is a non-empty family \(\mathcal{F}\) of subsets of \(X\) such that the following conditions hold:
- If \(A \in \mathcal{F}\) and \(A \subseteq B \subseteq X\), then \(B \in \mathcal{F}\) (\(F\) is upward closed)
- If \(A,B \in \mathcal{F}\), then \(A \cap B \in \mathcal{F}\) (\(\mathcal{F}\) has all meets)
Every filter enjoys the finite intersection property, which means that the intersection of any finite family of elements of the filter is again an element of the filter. This can be demonstrated by induction. For the empty family \(\emptyset\), the restricted intersection \(\cap \emptyset = \{x \in X : \forall A \in \mathcal{F}, x \in A\}\) is vacuously equal to the set \(X\) which is an element of every filter since it is a superset of all elements of the filter. If the finite intersection property holds for all families \(F\) of length \(n\), then \( \cap (F \cup \{A\}) = \cap F \cap A \in \mathcal{F}\) for any element \(A \in \mathcal{F}\), and so this extends to families of length \(n+1\).
Every filter enjoys the unrestricted union property, which means that the union of any family of elements of the filter is again an element of the filter. To see this, just note that any such union is necessarily a superset of an element of the filter, and hence, since the filter is upward closed, it is again an element of the filter.
Neighborhood Filters
Thus, we require that set of neighborhoods of a point to comprise a filter of sets. This leads to the following (tenative) definition:
Definition (Neighborhood Filter - Tentative) A neighborhood filter on a set \(X\) at a point \(x \in X\) is a filter of sets \(\mathcal{N}_x\) on \(X\) such that \(x \in N\) for every \(N \in \mathcal{N}_x\).
Thus, a neighborhood filter is just a designation of a particular filter of sets such that each set contains a given point. We will refine this definition later. This leads to another (tentative) definition.
Neighborhood Spaces
Definition (Neighborhood Space - Tentative) A neighborhood space \(\mathcal{N} = \{\mathcal{N}_x : x \in X\}\) on a set \(X\) is a designation of a unique neighborhood filter \(\mathcal{N}_x\) for each point \(x \in X\).
We can now state what it means for a filter to converge to a point in the context of a neighborhood space.
Filter Convergence
Definition (Filter Convergence) A filter of sets \(\mathcal{F}\) on a set \(X\) converges to a point \(x \in X\) within a neighborhood space \(\mathcal{N}\), written \(\mathcal{F}\downarrow x\), if \(\mathcal{N}_x \subseteq \mathcal{F}\).
In other words, if a given filter contains every neighborhood of a point, then it converges to that point. This means that it becomes arbitrarily close to the point. We also say that \(\mathcal{F}\) refines \(\mathcal{N}_x\), which just means that \(\mathcal{N}_x \subseteq \mathcal{F}\). Intuitively, a filter is "finer" than another if it contains all of the other filter's sets plus additional sets. Thus, any filter that refines the neighborhood filter at a point converges to that point.
Filter Bases
It is often convenient and natural to work with a so-called filter basis.
Definition (Filter Basis) A subset \(\mathcal{B} \subseteq \mathcal{F}\) of a filter of sets \(\mathcal{F}\) on a set \(X\) is a filter basis if the upper set generated by \(\mathcal{B}\) (i.e. the smallest, upward-closed set containing \(\mathcal{B}\)) is \(\mathcal{F}\). Moreover, if \(\mathcal{B}\) is any non-empty, downward directed family of subsets of \(X\), then \(\mathcal{B}\) generates a unique filter. A family of subsets is downward directed if, whenever \(A,B\) are elements of the family, there is some element \(C\) of the family such that \(C \subseteq A\) and \(C \subseteq B\), which is equivalent to \(C \subseteq A \cap B\).
As an example, the set of all tails of a sequence on a metric space comprises a filter basis.
Definition (Filter Basis Convergence) A filter basis \(\mathcal{B}\) on a set \(X\) converges to a point \(x \in X\), written \(\mathcal{B}\downarrow x\), if \(\mathcal{F}\downarrow x\) for the filter \(\mathcal{F}\) generated by \(\mathcal{B}\).
We can now define the image of a filter under a map.
Definition (Image of a Filter) The image of a filter of sets \(\mathcal{F}\) on a set \(X\) under a map \(f : X \rightarrow Y\) is the filter \(f(\mathcal{F})\) which is the filter generated by the filter basis \(\{f(A) : A \in \mathcal{F}\}\). The image \(f(\mathcal{B})\) of a filter basis \(\mathcal{B}\) is defined similarly as \(\{f(B) : B \in \mathcal{B}\}\).
Continuous Maps
We can now state a (tentative) definition of a continuous map.
Definition (Continuous Map) A map \(f : X \rightarrow Y\) between two neighbhorhood spaces \(X\) and \(Y\) is continuous if \(f(\mathcal{F})\downarrow f(x)\) whenever \(\mathcal{F}\downarrow x\) for each point \(x \in X\) and filter \(\mathcal{F}\) on \(X\).
Relating Points
Now, there is one technical problem with the tentative definition of a neighborhood space: each neighborhood filter is potentially unrelated to the others and there is no uniform way to demonstrate the continuity of a map. In other words, there is no way to relate the points in the space to each other. The solution is to designate a sort of "basis" for the entire neighborhood space. More precisely, we will designate a family of subsets \(\tau\) of a set \(X\) such that \(\tau_x = \{N \in \tau : x \in N\}\) is a basis for \(\mathcal{N}_x\). In this version, we no longer choose each neighborhood filter directly, but rather specify its basis, which determines the neighborhood filter. This leads to the following definition.
Neighborhood Spaces, Redefined
Definition (Neighborhood Space) A neighborhood space is a family of subsets \(\tau\) of a set \(X\) such that the family \(\tau_x = \{N \in \tau : x \in N\}\) is a filter basis for a filter \(\mathcal{N}_x\), called the neighborhood filter at the point \(x\).
Note that each element \(U \in \tau\) is necessarily a neighborhood of each of its points (in general, if \(N\) is a neighborhood of \(x\) and \(y \in N\) this does not imply that \(N\) is a neighborhood of \(y\)). Such neighborhoods are called open neighborhoods. Thus, every element of \(\tau\) is an open neighborhood.
Note that, the definition above is equivalent to the following definition:
Definition (Neighborhood Space) A neighborhood space consists of a set \(X\) and a collection of subsets \(\mathcal{N}_x\) (called neighborhoods of \(x\)), one for each \(x \in X\), such that the following conditions are satisfied:
- \(\mathcal{N}_x\) is not empty.
- \(x \in N\) for every \(N \in \mathcal{N}_x\).
- If \(N \in \mathcal{N}_x\) and \(N \subseteq N'\), then \(N' \in \mathcal{N}_x\).
- If \(N,N' \in \mathcal{N}_x\), then \(N \cap N' \in \mathcal{N}_x\).
- For each \(N \in \mathcal{N}_x\), there exists a neighborhood \(U \in \mathcal{N}_x\) such that \(U \subseteq N\) and \(U\) is a neighborhood of all of its points.
Let's establish a few properties of open neighborhoods for a neighborhood space \((X,\mathcal{N})\).
- The set \(X\) is an open neighborhood, since it is an element of every upward-closed set, and hence a neighborhood of each point.
- Likewise, the empty set \(\emptyset\) is vacuously open, since it is a neighborhood of all of its points (of which there are none); in other words, to falsify the claim that it is open, a counterexample consisting of an element of the empty set of which the empty set is not a neighborhood must be produced, but no such counterexample exists since the empty set contains no elements).
- The intersection of two open sets \(U, U'\) is an open set, since, for any element \(x \in U \cap U'\), \(x \in U\) and \(x \in U'\) and thus, since \(U\) and \(U'\) are open, they are neighborhoods of \(x\), so, since neighborhood filters have all meets, \(U \cap U'\) is again a neighborhood of \(x\). Since \(x\) was arbitrary, \(U \cap U'\) is a neighborhood of each of its points.
- The prior argument extends to intersections of finite families.
- The union of two open sets \(U, U'\) is an open set, since, for any element \(x \in U \cup U'\), either \(x \in U\) or \(x \in U'\); if \(x \in U\), then, since \(U\) is open, it is a neighborhood of \(x\), and, since neighborhood filters are upward closed and \(U \subseteq U \cup U'\), \(U \cup U'\) is a neighborhood of \(x\). Likewise, if \(x \in U'\) then \(U \cup U'\) is a neighborhood of \(x\). Since \(x\) was arbitrary, \(U \cup U'\) is a neighborhood of each of its points.
- The prior argument extends to unions of families of sets.
Topological Spaces
Our next goal is to attempt to characterize the space \(X\) entirely in terms of its open neighborhoods. We generalize the properties established in the preceding section and arrive at the following definition.
Definition (Topological Space) A topological space consists of a set \(X\) together with a family \(\tau\) (called a topology) of subsets of \(X\), called open sets, such that the following conditions are satisfied:
- \(X\) is open and \(\emptyset\) is open
- Any intersection of a finite family of open sets is open
- Any union of a family of open sets is open
In the context of a topological space, a neighborhood of a point \(x \in X\) is a set \(N\) such that there exists an open set \(U \subseteq N\) with \(x \in U\). Every open set is therefore a neighborhood, called an open neighborhood.
Notice that, since open sets are basic in topological spaces, the concept of a neighborhood must be defined, and, conversely, since neighborhoods are basic in neighborhood spaces, open neighborhoods must be defined.
We will now define continuous functions in terms of open sets, and show that each definition is equivalent to the definition based on filter convergence.
Definition (Continuity at a Point) A map \(f : X \rightarrow Y\) between topological spaces \(X\) and \(Y\) is continuous at the point \(x \in X\) if, for every open neighborhood \(U\) of \(f(x)\), there exists an open neighborhood \(V \subseteq X\) such that \(f(V) \subseteq U\).
Definition (Continuity) A map \(f : X \rightarrow Y\) between topological spaces \(X\) and \(Y\) is continuous if \(f^{-1}(U)\) is open in \(X\) whenever \(U\) is open in \(Y\).
First, we show that a map is continuous in the latter sense if and only if it is continuous at every point.
Theorem 1 A map \(f : X \rightarrow Y\) between topological spaces \(X\) and \(Y\) is continuous if and only if it is continuous at every point \(x \in X\).
Proof. Suppose \(f\) is continuous at every point of \(X\). Let \(U \subseteq Y\) be any open set. If \(f^{-1}(U)\) is empty, then it is open, since the empty set is open. Thus, suppose \(f^{-1}(U)\) is non-empty. For each element \(x \in f^{-1}(U)\), since \(f\) is continuous at \(x\), there exists an open neighborhood \(V_x \subseteq X\) of \(x\) such that \(f(V_x) \subseteq U\). Then \(f^{-1}(U) = \cup_{x \in f^{-1}(U)}V_x\), which is open.
Conversely, suppose that \(f\) is continuous. Let \(U\) be any open neighborhood of \(f(x)\) for any point \(x \in X\). Then \(f^{-1}(U)\) is an open neighborhood of \(x\) since \(f\) is continuous, and \(f(f^{-1}(U)) \subseteq U\).
Now we want to show that continuity so defined is equivalent to the preservation of filter convergence.
Theorem 2 A map \(f : X \rightarrow Y\) between topological spaces is continuous if and only if for each filter \(\mathcal{F}\) in \(X\) such that \(\mathcal{F}\downarrow x\), the filter \(f(\mathcal{F})\downarrow f(x)\).
Proof. Suppose that \(f\) is continuous and \(\mathcal{F}\downarrow x\) for any filter \(\mathcal{F}\) on \(X\). We want to show that \(\mathcal{N}_{f(x)} \subseteq f(\mathcal{F})\). Let \(N\) be any neighborhood of \(f(x)\). Then, \(N\) contains an open set \(U\) containing \(f(x)\) and, since \(f\) is continuous, \(f^{-1}(U)\) is open in \(X\) and contains \(x\). Since \(\mathcal{F}\downarrow x\), this means that \(\mathcal{N}_x \subseteq \mathcal{F}\), and thus, since \(f^{-1}(U) \in \mathcal{N}_x \), \(f^{-1}(U) \in \mathcal{F}\). Then \(f(f^{-1}(U)) \in f(\mathcal{F})\) by definition. Since \(f(f^{-1}(U)) \subseteq U \subseteq N\), it follows that \(N \in f(\mathcal{F})\) since \(f(\mathcal{F})\) is upward closed.
Conversely, suppose that \(\mathcal{F} \downarrow f(x)\) whenever \(\mathcal{F} \downarrow x\). We will show that \(f\) is continuous at each point \(x \in X\). Let \(x \in X\) be any point and \(U \subseteq Y\) be any open set containing \(f(x)\). In particular, \(\mathcal{N}_x \downarrow x\) and thus \(f(\mathcal{N}_x) \downarrow f(x)\), which means that \(\mathcal{N}_{f(x)} \subseteq f(\mathcal{N}_x)\). Since \(U\) is an open neighborhood of \(f(x)\), \(U \in \mathcal{N}_{f(x)}\) and so \(U \in f(\mathcal{N}_x)\). Thus, by definition, this means that there exists some neighborhood \(N \in \mathcal{N}_x\) such that \(f(N) \subseteq U\). Then, since \(N\) is a neighborhood of \(x\), there exists an open neighborhood \(V \subseteq N\) of \(x\). Then, \(f(V) \subseteq f(N) \subseteq U\), and \(f\) is continuous at \(x\).
Equivalence
Our last goal is to demonstrate that neighborhood spaces and topological spaces are equivalent.
First, we prove that each open set is a neighborhood of all of its points.
Theorem 3 A subset of a topological space is open if and only if it is a neighborhood of each of its points.
Proof. Let \(U\) be any open set in a topological space \(X\). If \(U\) is empty, then it is vacuously a neighborhood of each of its points. If \(U\) is non-empty, then, for each point \(x \in U\), \(U\) is a neighborhood of \(x\) by definition.
Conversely, if \(N\) is a subset of \(X\) such that it is a neighborhood of each of its points, then, for each point \(x \in N\), by definition, there exists an open set \(U_x \subseteq N\) such that \(x \in U\). Since \(N = \cap_{x \in N}U_x\), \(N\) is open.
Next, we prove that, for every topological space, there is a corresponding neighborhood space.
Theorem 4 For any topological space \((X,\tau)\) there exists a corresponding neighborhood space \(N(X,\tau)\).
Proof. Define \(N(X,\tau) = (X,\mathcal{N})\) where \(\mathcal{N} = \{\mathcal{N}_x : x \in X\}\) and \(\mathcal{N}_x\) is the set of all topological neighborhoods of \(x\). We will demonstrate that this satisfies all of the properties of a neighborhood space.
- Note that \(\mathcal{N}_x\) is not empty since \(X\) is a neighborhood of \(x\).
- By the definition of a neighborhood in a topological space, \(x \in N\) for each \(N \in \mathcal{N}_x\).
- If \(N \in \mathcal{N}_x\), then, if \(N \subseteq N'\), by definition of a neighborhood, there exists an open set \(U \subseteq N\) such that \(x \in U\). But then, \(U \subseteq N \subseteq N'\), and hence \(N' \in \mathcal{N}_x\).
- If \(N,N' \in \mathcal{N}_x\), then, there exist open sets \(U \subseteq N\) and \(U' \subseteq N'\) such that \(x \in U\) and \(x \in U'\). Then \(x \in U \cap U'\) and \(U \cap U'\) is open and \(U \cap U' \subseteq N \cap N'\), so \(N \cap N' \in \mathcal{N}_x\).
- If \(N \in \mathcal{N}_x\), then, by definition, there exists an open set \(U \subseteq N\) such that \(x \in U\). By the theorem above, \(U\) is a neighborhood of each of its points.
Next, we prove that, for every neighborhood space, there is a corresponding topological space.
Theorem 5 For any neighborhood space \((X,\mathcal{N})\), there exists a corresponding topological space \(T(X,\mathcal{N})\).
Proof. Define \(T(X,\mathcal{N}) = (X,\tau)\), where \(\tau\) the set of all open neighborhoods of the neighborhood space. First, \(X \in\mathcal{N}_x\) for all \(x \in X\) since \(X\) is a superset of all neighborhoods and hence \(X\) is open. Also, \(\emptyset\) is vacuously open, since it is a neighborhood of each of its points (of which there are none). If \(U\) and \(U'\) are open, then \(U \cap U'\) is open since it is likewise a neighborhood of each of its points. By induction, the intersection of any finite family of open sets is open. Consider any family \(\mathcal{F}\) of open sets. If \(\mathcal{F}\) is empty, then \(\cup\mathcal{F} = \emptyset\), which is open. If \(\mathcal{F}\) is non-empty, then, for each point \(x \in \cup\mathcal{F}\), by definition, there exists an open set \(U \in \mathcal{F}\) such that \(x \in U\). Since \(U \subseteq \cup\mathcal{F}\), it follows that \(\cup\mathcal{F}\) is a neighborhood of \(x\). Thus, \(\cup\mathcal{F}\) is a neighborhood of each of its points, and is open.
We want to show that \(N(T(X,\mathcal{N})) = (X,\mathcal{N})\) and \(T(N(X,\tau)) = (X,\tau)\).
We will first show that \((X,\tau) = T(N(X,\tau))\).
Theorem 6 \((X,\tau) = T(N(X,\tau))\) for any topological space \((X,\tau)\), i.e. if we convert a topological space to its corresponding neighborhood space and then convert this neighborhood space to its corresponding topological space, we recover the original topological space.
Proof. Suppose that \(U\) is open in \((X,\tau)\). Then, by Theorem 3, \(U\) is a neighborhood of each of its points, so \(U\) is an open neighborhood in the neighborhood space \(N(X,\tau)\), which means that \(U\) is an open set in \(T(N(X,\tau))\). Conversely, suppose \(U\) is open in \(T(N(X,\tau))\). This means that it is an open neighborhood in \(N(X,\tau)\), which means that it is a neighborhood of each of its points, which, by Theorem 3, means that it is an open set in \((X,\tau)\).
Thus, the equivalence is essentially by construction.
Next, we will show that \(N(T(X,\mathcal{N})) = (X,\mathcal{N})\). We first prove another theorem.
Theorem 7 In a neighborhood space, a subset \(N\) is a neighborhood of a point \(x\) if and only if it contains an open neighborhood containing \(x\).
Proof. Suppose \(N\) contains an open neighborhood \(U\) such that \(x \in U\). Then, since \(U \subseteq N\), \(N\) is likewise a neighborhood of \(x\). Conversely, suppose that \(N\) is neighborhood of a point \(x\). Then, by the definition of a neighborhood space, there exists an open neighborhood \(U\) of \(x\) such that \(U \subseteq N\).
Theorem 8 \(N(T(X,\mathcal{N})) = (X,\mathcal{N})\), i.e. if we convert a neighborhood space to its corresponding topological space and then convert this topological space to its corresponding neighborhood space, we recover the original topological space.
Proof. If \(N \in \mathcal{N}_x\) for any \(x \in X\), then by Theorem 7, \(N\) contains an open neighborhood \(U\) of \(x\). This means that \(U\) is an open set in \(T(X, \mathcal{N})\), and so \(N\) is a neighborhood of \(x\) in \(T(X, \mathcal{N})\), which further means that \(N\) is a neighborhood of \(x\) in \(N(T(X, \mathcal{N}))\). Conversely, if \(N\) is a neighborhood of \(x\) in \(N(T(X, \mathcal{N}))\), then, \(N\) is a topological neighborhood, which means that it contains an open set \(U\) which is open in \(T(X, \mathcal{N})\) and contains \(x\), which means that \(U\) is an open neighborhood in \((X,\mathcal{N})\), which means, by Theorem 7, that \(N\) is a neighborhood of \(x\). Thus, \(N(T(X,\mathcal{N})) = (X,\mathcal{N})\) since each neighborhood of one is a neighborhood of the other.
Thus, we finally have the following theorem.
Theorem 9 The category of neighborhood spaces is equivalent to the category of topological spaces.
Proof. The mappings \(T\) and \(N\) described previously represent functors between the respective categories. Theorems 6 and 8 demonstrate that these are inverses. Theorem 2 demonstrates that a continuous map between topological spaces is also a continuous map of neighborhood spaces. Thus, the categories are isomorphic and hence equivalent.
Example
We now return to the example of the convergence of sequence in a metric space. An open set in a metric space is a set \(U\) such that there exists an open ball \(B_r(x) \subseteq U\) around each point of \(x\). Thus, a neighborhood is a set \(N\) such that there exists such an open set \(U\) with \(U \subseteq N\). Each sequence gives rise to a filter basis, the basis of the tails \((a_{m+n})_{n \in \mathbb{N}}\) of the sequence (suffixes of the sequence starting from the \(m\)-th element of the sequence). When we say that \(\lim_{n \to \infty}(a_n)_{n \in \mathbb{N}} = L\), this means that, for any open ball \(B_r(L)\) around \(L\), there exists some tail \((a_{m+n})_{n \in \mathbb{N}} \subseteq B_r(L)\). Suppose that \(\lim_{n \to \infty}(a_n)_{n \in \mathbb{N}} = L\). Let \(N\) be any neighborhood of \(L\). Then, there exists an open ball \(B_r(L) \subseteq N\) of radius \(r\) around \(L\) and a tail \((a_{m+n})_{n \in \mathbb{N}}\) such that \((a_{m+n})_{n \in \mathbb{N}} \subseteq B_r(L) \subseteq N\). Since the tails are a basis for the filter \(\mathcal{F}\), it follows that \(N \in \mathcal{F}\) and thus \(\mathcal{F}\downarrow L\). Conversely, suppose that \(\mathcal{F} \downarrow L\). Let \(B_r(L)\) be an open ball of any radius \(r\) around \(L\). Since \(\mathcal{F} \downarrow L\), this means that \(\mathcal{N}_L \subseteq \mathcal{F}\), and since \(B_r(L) \in \mathcal{N}_L\), it follows that \(B_r(L) \in \mathcal{F}\). Since the tails form a basis, there is some tail \((a_{m+n})_{n \in \mathbb{N}}\) such that \((a_{m+n})_{n \in \mathbb{N}}\subseteq B_r(L)\), which means that \(\lim_{n \to \infty}(a_n)_{n \in \mathbb{N}} = L\) since \(B_r(L)\) was arbitrary.
Conclusion
Thus, we have determined the meaning of the axioms for a topological space: they indicate that the open sets form an aggregate basis for the neighborhood filters at each point (such that the restriction to the open sets containing a point is a basis for the neighborhood filter at that point) and this endows each topological space with a convergence structure that allows us to define the convergence of filters and then to define continuous functions as homomorphisms that preserve filter convergence.