Filters are generalized subsets


This article is part of my migration effort, moving some of my articles over from the excellent Functor Network.


TODO Add small proofs of known facts about limits using the language of filters.

Given any set XX, a filter on XX is a collection of subsets 2X\mathcal{F} \subseteq 2^X such that:

  1. XX itself is in \mathcal{F};
  2. if AA \in \mathcal{F} and BB \in \mathcal{F}, then ABA \cap B \in \mathcal{F};
  3. if AA \in \mathcal{F} and CC is any subset with ACA \subseteq C, then CC \in \mathcal{F} (this is refered to by the expression upward closure).

There are always at least two (possibly identical) filters on any set XX: one is ={X}\top = \{X\} and the other is =2X\bot = 2^X. Note that \bot is the only filter which contains the empty set, because of the upward closure property. We can put a partial order on Filter(X)\operatorname{Filter}(X), the set of filters on XX, by declaring 𝒢\mathcal{F} \leq \mathcal{G} if and only if 𝒢\mathcal{G} \subseteq \mathcal{F}. At first glance, it may seem weird to “reverse” the order, but it makes sense if you think of a filter as a way of approximating something, or as some kind of locating scheme. The usual intersection and union of sets makes Filter(X)\text{Filter}(X) into a complete lattice, i.e. any collection of filters has a least upper bound.

Any subset AXA \subseteq X may be interpreted as a filter, the principal filter A\uparrow A, defined as the collection of all subsets of XX which contain AA. The word “interpreted” here is justified by the fact the function \uparrow is actually an injection: suppose AA and BB are different subsets of XX; without loss of generality, BB does not contain AA; hence, by the very definition of the principal filter at AA, the subset BB is not an element of A\uparrow A, so the two filters A\uparrow A and B\uparrow B are different.

So we have an injection (actually, a monotone map) :2XFilter(X).\uparrow\, : 2^X \hookrightarrow \text{Filter}(X). However, many filters are not principal filters. These more complicated filters can be intuitively thought of as being “generalized subsets” of XX, where we generalize by allowing them to have some kind of “limiting” or “approximating” behavior. Let’s build a couple of examples to figure out what this means.

  • Take XX to be \mathbb{N}, the natural numbers. Consider the collection {AN:nN,nA}.\{ A \subseteq \mathbb{N} \mid \exists N \in \mathbb{N} : \forall n \geq N, n \in A \}. This is an example of a filter on \mathbb{N} which is not a principal filter (hint: what happens when you take the intersection of all elements in this filter? what happens when you do the same for a principal filter?) Intuitively speaking, if it were a subset, “points” in this filter should be “numbers” that are arbitrarily large.

  • In any topological space XX with at least one point pp, there’s always the neighborhood filter 𝒩p\mathcal{N}_p, which is exactly the collection of all neighborhoods of pp. Recall that a neighborhood of pp is a subset YXY \subseteq X having the property that its interior contains pp. This is another example of a filter that is not principal (hint: if it were a principal filter, it would have to be {p}\uparrow \{p\}, and in general {p}\{p\} is not an open set). When interpreted as a generalized subset of XX, it could be described as the set of “elements” that are “really close” to pp.

Now, if we wish to interpret filters as “generalized subsets”, we need some expanded concept of membership. Moreover, this expanded notion should stay compatible with the usual one (set membership) when we apply it to principal filters. Any point xXx \in X can be seen as a set function x:1Xx : 1 \to X from the singleton set 11 to XX. Hence we declare that “generalized points” of XX are all functions f:YXf : Y \to X, where YY is any set. Our new membership relation is the following: if 𝒢\mathcal{G} is a filter on YY and \mathcal{F} is a filter on XX, we say that ff tends to \mathcal{F} along 𝒢\mathcal{G} if and only if, for every AA \in \mathcal{F}, we have f1(A)𝒢f^{-1}(A) \in \mathcal{G}. The notation I just made up for this is lim𝒢f=.\lim_{\mathcal{G}} f = \mathcal{F}.

Given some function f:XYf : X \to Y and a filter \mathcal{F} on XX, its direct image (denoted f*f_*\mathcal{F}) is a filter on YY defined as the collection of subsets BYB \subseteq Y having the property that f1(B)f^{-1}(B) \in \mathcal{F}. Using this terminology, we may say that ff tends to 𝒢\mathcal{G} along \mathcal{F} if and only if f*𝒢f_*\mathcal{F} \leq \mathcal{G}.

There’s also the inverse image f*𝒢f^*\mathcal{G}, which is a filter on XX defined as the collection of subsets AXA \subseteq X such that there exists some B𝒢B \in \mathcal{G} with f1(B)Af^{-1}(B) \subseteq A. It’s not too hard to show that this really is a filter, and as expected the direct and inverse image form a Galois connection. More precisely, for any set function f:XYf : X \to Y, any filter \mathcal{F} on XX and any filter 𝒢\mathcal{G} on YY, we have f*𝒢f*𝒢.f_*\mathcal{F} \leq \mathcal{G} \iff \mathcal{F} \leq f^*\mathcal{G}.

As a consequence, we have the usual relations f*f*\mathcal{F} \leq f^*f_*\mathcal{F} and f*f*𝒢𝒢f_*f^*\mathcal{G} \leq \mathcal{G}. Many nice things can be said about filters using this connection, direct images, and inverse images. Here are some examples:

  • Let i:AXi : A \hookrightarrow X be the inclusion map from a subset AXA \subseteq X. Then one can check i*()i_*(\top) is exactly A\uparrow A, the principal filter at AA.

  • For any function f:XYf : X \to Y and \mathcal{F} filter on XX, we have f*=f_*\mathcal{F} = \bot if and only if =\mathcal{F} = \bot. Indeed, suppose F=F = \bot; then by the Galois connection it’s always true that f*𝒢f_*\mathcal{F} \leq \mathcal{G} for any filter 𝒢\mathcal{G} on YY, so in particular f*=f_*\mathcal{F} = \bot. On the other hand, suppose f*=f_*\mathcal{F} = \bot; by definition this means all subsets of YY have their preimage a member of \mathcal{F}; in particular f1()=f^{-1}(\varnothing) = \varnothing \in \mathcal{F}, whence =\mathcal{F} = \bot. One similar argument shows that for any filter 𝒢\mathcal{G} on YY, we have 𝒢=\mathcal{G} = \top if and only if f*𝒢=f^*\mathcal{G} = \top.

  • Let XX be a topological space, let AXA \subseteq X be any subset, let xXx \in X be some point and let 𝒩x\mathcal{N}_x be the filter of neighborhoods around xx. Denote i:AXi : A \hookrightarrow X the inclusion map. Then i*(𝒩x)=i^*(\mathcal{N}_x) = \bot if and only if the point xx is not in the closure of AA. The gist of the argument is that any neighborhood of xx that does not intersect AA (such a neighborhood exists if and only if xx is not in the closure of AA) can be arbitrarily extended to a larger neighborhood, possibly with many connected components.