Use of filters to describe and characterize all basic topological notions and results.
The power set lattice of the set with the upper set colored dark green. It is a filter, and even a principal filter. It is not an ultrafilter, as it can be extended to the larger nontrivial filter by including also the light green elements. Because cannot be extended any further, it is an ultrafilter.
Filters in topology, a subfield of mathematics, can be used to study topological spaces and define all basic topological notions such as convergence, continuity, compactness, and more. Filters, which are special families of subsets of some given set, also provide a common framework for defining various types of limits of functions such as limits from the left/right, to infinity, to a point or a set, and many others. Special types of filters called ultrafilters have many useful technical properties and they may often be used in place of arbitrary filters.
Filters have generalizations called prefilters (also known as filter bases) and filter subbases, all of which appear naturally and repeatedly throughout topology. Examples include neighborhood filters/bases/subbases and uniformities. Every filter is a prefilter and both are filter subbases. Every prefilter and filter subbase is contained in a unique smallest filter, which they are said to generate. This establishes a relationship between filters and prefilters that may often be exploited to allow one to use whichever of these two notions is more technically convenient. There is a certain preorder on families of sets, denoted by that helps to determine exactly when and how one notion (filter, prefilter, etc.) can or cannot be used in place of another. This preorder's importance is amplified by the fact that it also defines the notion of filter convergence, where by definition, a filter (or prefilter) converges to a point if and only if where is that point's neighborhood filter. Consequently, subordination also plays an important role in many concepts that are related to convergence, such as cluster points and limits of functions. In addition, the relation which denotes and is expressed by saying that is subordinate to also establishes a relationship in which is to as a subsequence is to a sequence (that is, the relation which is called subordination, is for filters the analog of "is a subsequence of").
Filters were introduced by Henri Cartan in 1937 and subsequently used by Bourbaki in their book Topologie Générale as an alternative to the similar notion of a net developed in 1922 by E. H. Moore and H. L. Smith.
Filters can also be used to characterize the notions of sequence and net convergence. But unlike[note 1] sequence and net convergence, filter convergence is defined entirely in terms of subsets of the topological space and so it provides a notion of convergence that is completely intrinsic to the topological space; indeed, the category of topological spaces can be equivalently defined entirely in terms of filters. Every net induces a canonical filter and dually, every filter induces a canonical net, where this induced net (resp. induced filter) converges to a point if and only if the same is true of the original filter (resp. net). This characterization also holds for many other definitions such as cluster points. These relationships make it possible to switch between filters and nets, and they often also allow one to choose whichever of these two notions (filter or net) is more convenient for the problem at hand.
However, assuming that "subnet" is defined using either of its most popular definitions (which are those given by Willard and by Kelley), then in general, this relationship does not extend to subordinate filters and subnets because as detailed below, there exist subordinate filters whose filter/subordinate–filter relationship cannot be described in terms of the corresponding net/subnet relationship; this issue can however be resolved by using a less commonly encountered definition of "subnet", which is that of an AA–subnet.
The archetypical example of a filter is the neighborhood filter at a point in a topological space which is the family of sets consisting of all neighborhoods of
By definition, a neighborhood of some given point is any subset whose topological interior contains this point; that is, such that Importantly, neighborhoods are not required to be open sets; those are called open neighborhoods.
Listed below are those fundamental properties of neighborhood filters that ultimately became the definition of a "filter."
A filter on is a set of subsets of that satisfies all of the following conditions:
Not empty: – just as since is always a neighborhood of (and of anything else that it contains);
Does not contain the empty set: – just as no neighborhood of is empty;
Closed under finite intersections: If – just as the intersection of any two neighborhoods of is again a neighborhood of ;
Upward closed: If then – just as any subset of that contains a neighborhood of will necessarily be a neighborhood of (this follows from and the definition of "a neighborhood of ").
Generalizing sequence convergence by using sets − determining sequence convergence without the sequence
A sequence in is by definition a map from the natural numbers into the space
The original notion of convergence in a topological space was that of a sequence converging to some given point in a space, such as a metric space.
With metrizable spaces (or more generally first–countable spaces or Fréchet–Urysohn spaces), sequences usually suffices to characterize, or "describe", most topological properties, such as the closures of subsets or continuity of functions.
But there are many spaces where sequences can not be used to describe even basic topological properties like closure or continuity.
This failure of sequences was the motivation for defining notions such as nets and filters, which never fail to characterize topological properties.
Nets directly generalize the notion of a sequence since nets are, by definition, maps from an arbitrary directed set into the space A sequence is just a net whose domain is with the natural ordering. Nets have their own notion of convergence, which is a direct generalization of sequence convergence.
Filters generalize sequence convergence in a different way by considering only the values of a sequence.
To see how this is done, consider a sequence which is by definition just a function whose value at is denoted by rather than by the usual parentheses notation that is commonly used for arbitrary functions.
Knowing only the image (sometimes called "the range") of the sequence is not enough to characterize its convergence; multiple sets are needed.
It turns out that the needed sets are the following,[note 2] which are called the tails of the sequence :
These sets completely determine this sequence's convergence (or non–convergence) because given any point, this sequence converges to it if and only if for every neighborhood (of this point), there is some integer such that contains all of the points This can be reworded as:
every neighborhood must contain some set of the form as a subset.
Or more briefly: every neighborhood must contain some tail as a subset.
It is this characterization that can be used with the above family of tails to determine convergence (or non–convergence) of the sequence
Specifically, with the family of sets in hand, the function is no longer needed to determine convergence of this sequence (no matter what topology is placed on ).
By generalizing this observation, the notion of "convergence" can be extended from sequences/functions to families of sets.
The above set of tails of a sequence is in general not a filter but it does "generate" a filter via taking its upward closure (which consists of all supersets of all tails). The same is true of other important families of sets such as any neighborhood basis at a given point, which in general is also not a filter but does generate a filter via its upward closure (in particular, it generates the neighborhood filter at that point). The properties that these families share led to the notion of a filter base, also called a prefilter, which by definition is any family having the minimal properties necessary and sufficient for it to generate a filter via taking its upward closure.
Nets versus filters − advantages and disadvantages
Like sequences, nets are functions and so they have the advantages of functions.
For example, like sequences, nets can be "plugged into" other functions, where "plugging in" is just function composition.
Theorems related to functions and function composition may then be applied to nets.
One example is the universal property of inverse limits, which is defined in terms of composition of functions rather than sets and it is more readily applied to functions like nets than to sets like filters (a prominent example of an inverse limit is the Cartesian product).
Filters may be awkward to use in certain situations, such as when switching between a filter on a space and a filter on a dense subspace 
In contrast to nets, filters (and prefilters) are families of sets and so they have the advantages of sets.
For example, if is surjective then the image under of an arbitrary filter or prefilter is both easily defined and guaranteed to be a prefilter on 's domain, whereas it is less clear how to pullback (unambiguously/without choice) an arbitrary sequence (or net) so as to obtain a sequence or net in the domain (unless is also injective and consequently a bijection, which is a stringent requirement). Similarly, the intersection of any collection of filters is once again a filter whereas it is not clear what this could mean for sequences or nets.
Because filters are composed of subsets of the very topological space that is under consideration, topological set operations (such as closure or interior) may be applied to the sets that constitute the filter.
Taking the closure of all the sets in a filter is sometimes useful in functional analysis for instance.
Theorems and results about images or preimages of sets under a function may also be applied to the sets that constitute a filter; an example of such a result might be one of continuity's characterizations in terms of preimages of open/closed sets or in terms of the interior/closure operators.
Special types of filters called ultrafilters have many useful properties that can significantly help in proving results.
One downside of nets is their dependence on the directed sets that constitute their domains, which in general may be entirely unrelated to the space In fact, the class of nets in a given set is too large to even be a set (it is a proper class); this is because nets in can have domains of anycardinality.
In contrast, the collection of all filters (and of all prefilters) on is a set whose cardinality is no larger than that of
Similar to a topology on a filter on is "intrinsic to " in the sense that both structures consist entirely of subsets of and neither definition requires any set that cannot be constructed from (such as or other directed sets, which sequences and nets require).
In this article, upper case Roman letters like denote sets (but not families unless indicated otherwise) and will denote the power set of A subset of a power set is called a family of sets (or simply, a family) where it is over if it is a subset of Families of sets will be denoted by upper case calligraphy letters such as
Whenever these assumptions are needed, then it should be assumed that is non–empty and that etc. are families of sets over
The terms "prefilter" and "filter base" are synonyms and will be used interchangeably.
Warning about competing definitions and notation
There are unfortunately several terms in the theory of filters that are defined differently by different authors.
These include some of the most important terms such as "filter."
While different definitions of the same term usually have significant overlap, due to the very technical nature of filters (and point–set topology), these differences in definitions nevertheless often have important consequences.
When reading mathematical literature, it is recommended that readers check how the terminology related to filters is defined by the author.
For this reason, this article will clearly state all definitions as they are used.
Unfortunately, not all notation related to filters is well established and some notation varies greatly across the literature (for example, the notation for the set of all prefilters on a set) so in such cases this article uses whatever notation is most self describing or easily remembered.
The theory of filters and prefilters is well developed and has a plethora of definitions and notations, many of which are now unceremoniously listed to prevent this article from becoming prolix and to allow for the easy look up of notation and definitions.
Their important properties are described later.
For any two families declare that if and only if for every there exists some in which case it is said that is coarser than and that is finer than (or subordinate to)  The notation may also be used in place of
If and then are said to be equivalent (with respect to subordination).
A directed set is a set together with a preorder, which will be denoted by (unless explicitly indicated otherwise), that makes into an (upward) directed set; this means that for all there exists some such that For any indices the notation is defined to mean while is defined to mean that holds but it is not true that (if is antisymmetric then this is equivalent to ).
A net in  is a map from a non–empty directed set into
The notation will be used to denote a net with domain
Set or prefilter of tails/sections of Also called the eventuality filter base generated by (the tails of) If is a sequence then is also called the sequential filter base.
(Eventuality) filter of/generated by (tails of) 
Tail or section of a net starting at  where is a directed set.
Warning about using strict comparison
If is a net and then it is possible for the set which is called the tail of after, to be empty (for example, this happens if is an upper bound of the directed set).
In this case, the family would contain the empty set, which would prevent it from being a prefilter (defined later).
This is the (important) reason for defining as rather than or even and it is for this reason that in general, when dealing with the prefilter of tails of a net, the strict inequality may not be used interchangeably with the inequality
The following is a list of properties that a family of sets may possess and they form the defining properties of filters, prefilters, and filter subbases. Whenever it is necessary, it should be assumed that
The family of sets is:
Proper or nondegenerate if Otherwise, if then it is called improper or degenerate.
Directed downward if whenever then there exists some such that
This property can be characterized in terms of directedness, which explains the word "directed": A binary relation on is called (upward) directed if for any two there is some satisfying Using in place of gives the definition of directed downward whereas using instead gives the definition of directed upward. Explicitly, is directed downward (resp. directed upward) if and only if for all there exists some "greater" such that (resp. such that ) − where the "greater" element is always on the right hand side, − which can be rewritten as (resp. as ).
Closed under finite intersections (resp. unions) if the intersection (resp. union) of any two elements of is an element of
If is closed under finite intersections then is necessarily directed downward. The converse is generally false.
Upward closed or Isotone in  if or equivalently, if whenever and some set satisfies Similarly, is downward closed if An upward (respectively, downward) closed set is also called an upper set or upset (resp. a lower set or down set).
The family which is the upward closure of is the unique smallest (with respect to ) isotone family of sets over having as a subset.
Many of the properties of defined above and below, such as "proper" and "directed downward," do not depend on so mentioning the set is optional when using such terms. Definitions involving being "upward closed in " such as that of "filter on " do depend on so the set should be mentioned if it is not clear from context.
A family is/is a(n):
Ideal if is downward closed and closed under finite unions.
Dual ideal on  if is upward closed in and also closed under finite intersections. Equivalently, is a dual ideal if for all 
Explanation of the word "dual": A family is a dual ideal (resp. an ideal) on if and only if the dual of which is the family
is an ideal (resp. a dual ideal) on In other words, dual ideal means "dual of an ideal". The dual of the dual is the original family, meaning 
Filter on  if is a properdual ideal on That is, a filter on is a non−empty subset of that is closed under finite intersections and upward closed in Equivalently, it is a prefilter that is upward closed in In words, a filter on is a family of sets over that (1) is not empty (or equivalently, it contains ), (2) is closed under finite intersections, (3) is upward closed in and (4) does not have the empty set as an element.
Warning: Some authors, particularly algebrists, use "filter" to mean a dual ideal; others, particularly topologists, use "filter" to mean a proper/non–degenerate dual ideal. It is recommended that readers always check how "filter" is defined when reading mathematical literature. However, the definitions of "ultrafilter," "prefilter," and "filter subbase" always require non-degeneracy. This article uses Henri Cartan's original definition of "filter", which required non–degeneracy.
The power set is the one and only dual ideal on that is not also a filter. Excluding from the definition of "filter" in topology has the same benefit as excluding from the definition of "prime number": it obviates the need to specify "non-degenerate" (the analog of "non-unital" or "non-") in many important results, thereby making their statements less awkward.
Prefilter or filter base if is proper and directed downward. Equivalently, is called a prefilter if its upward closure is a filter. It can also be defined as any family that is equivalent to some filter. A proper family is a prefilter if and only if  A family is a prefilter if and only if the same is true of its upward closure.
If is a prefilter then its upward closure is the unique smallest (relative to ) filter on containing and it is called the filter generated by A filter is said to be generated by a prefilter if in which is called a filter base for
Unlike a filter, a prefilter is not necessarily closed under finite intersections.
π–system if is closed under finite intersections. Every non–empty family is contained in a unique smallest π–system called the π–system generated by which is sometimes denoted by It is equal to the intersection of all π–systems containing and also to the set of all possible finite intersections of sets from :
A π–system is a prefilter if and only if it is proper. Every filter is a proper π–system and every proper π–system is a prefilter but the converses do not hold in general.
A prefilter is equivalent to the π–system generated by it and both of these families generate the same filter on
Filter subbase and centered if and satisfies any of the following equivalent conditions:
has the finite intersection property, which means that the intersection of any finite family of (one or more) sets in is not empty; explicitly, this means that whenever then
Assume that is a filter subbase. Then there is a unique smallest (relative to ) filter containing called the filter generated by, and is said to be a filter subbase for this filter. This filter is equal to the intersection of all filters on that are supersets of The π–system generated by denoted by will be a prefilter and a subset of Moreover, the filter generated by is equal to the upward closure of meaning  However, if and only if is a prefilter (although is always an upward closed filter subbase for ).
A –smallest (meaning smallest relative to ) prefilter containing a filter subbase will exist only under certain circumstances. It exists, for example, if the filter subbase happens to also be a prefilter. It also exists if the filter (or equivalently, the π–system) generated by is principal, in which case is the unique smallest prefilter containing Otherwise, in general, a –smallest prefilter containing might not exist. For this reason, some authors may refer to the π–system generated by as the prefilter generated by However, if a –smallest prefilter does exist (say it is denoted by ) then contrary to usual expectations, it is not necessarily equal to "the prefilter generated by " (that is, is possible). And if the filter subbase happens to also be a prefilter but not a π-system then unfortunately, "the prefilter generated by this prefilter" (meaning ) will not be (that is, is possible even when is a prefilter), which is why this article will prefer the accurate and unambiguous terminology of "the π–system generated by ".
Subfilter of a filter and that is a superfilter of  if is a filter and where for filters,
Importantly, the expression "is a superfilter of" is for filters the analog of "is a subsequence of". So despite having the prefix "sub" in common, "is a subfilter of" is actually the reverse of "is a subsequence of." However, can also be written which is described by saying " is subordinate to " With this terminology, "is subordinate to" becomes for filters (and also for prefilters) the analog of "is a subsequence of," which makes this one situation where using the term "subordinate" and symbol may be helpful.
There are no prefilters on (nor are there any nets valued in ), which is why this article, like most authors, will automatically assume without comment that whenever this assumption is needed.
The singleton set is called the indiscrete or trivial filter on  It is the unique minimal filter on because it is a subset of every filter on ; however, it need not be a subset of every prefilter on
The dual ideal is also called the degenerate filter on  (despite not actually being a filter). It is the only dual ideal on that is not a filter on
If is a topological space and then the neighborhood filter at is a filter on By definition, a family is called a neighborhood basis (resp. a neighborhood subbase) at if and only if is a prefilter (resp. is a filter subbase) and the filter on that generates is equal to the neighborhood filter The subfamily of open neighborhoods is a filter base for Both prefilters also form a bases for topologies on with the topology generated being coarser than This example immediately generalizes from neighborhoods of points to neighborhoods of non–empty subsets
is an elementary prefilter if for some sequence of points
is an elementary filter or a sequential filter on  if is a filter on generated by some elementary prefilter. The filter of tails generated by a sequence that is not eventually constant is necessarily not an ultrafilter. Every principal filter on a countable set is sequential as is every cofinite filter on a countably infinite set. The intersection of finitely many sequential filters is again sequential.
The set of all cofinite subsets of (meaning those sets whose complement in is finite) is proper if and only if is infinite (or equivalently, is infinite), in which case is a filter on known as the Fréchet filter or the cofinite filter on  If is finite then is equal to the dual ideal which is not a filter. If is infinite then the family of complements of singleton sets is a filter subbase that generates the Fréchet filter on As with any family of sets over that contains the kernel of the Fréchet filter on is the empty set:
The intersection of all elements in any non–empty family is itself a filter on called the infimum or greatest lower bound of which is why it may be denoted by Said differently, Because every filter on has as a subset, this intersection is never empty. By definition, the infimum is the finest/largest (relative to ) filter contained as a subset of each member of 
If are filters then their infimum in is the filter  If are prefilters then is a prefilter that is coarser than both (that is, ); indeed, it is one of the finest such prefilters, meaning that if is a prefilter such that then necessarily  More generally, if are non−empty families and if then and is a greatest element of 
Let and let
The supremum or least upper bound of denoted by is the smallest (relative to ) dual ideal on containing every element of as a subset; that is, it is the smallest (relative to ) dual ideal on containing as a subset.
This dual ideal is where is the π–system generated by
As with any non–empty family of sets, is contained in some filter on if and only if it is a filter subbase, or equivalently, if and only if is a filter on in which case this family is the smallest (relative to ) filter on containing every element of as a subset and necessarily
Let and let
The supremum or least upper bound of denoted by if it exists, is by definition the smallest (relative to ) filter on containing every element of as a subset.
If it exists then necessarily  (as defined above) and will also be equal to the intersection of all filters on containing
This supremum of exists if and only if the dual ideal is a filter on
The least upper bound of a family of filters may fail to be a filter. Indeed, if contains at least 2 distinct elements then there exist filters for which there does not exist a filter that contains both
If is not a filter subbase then the supremum of does not exist and the same is true of its supremum in but their supremum in the set of all dual ideals on will exist (it being the degenerate filter ).
If are prefilters (resp. filters on ) then is a prefilter (resp. a filter) if and only if it is non–degenerate (or said differently, if and only if mesh), in which case it is one of the coarsest prefilters (resp. the coarsest filter) on that is finer (with respect to ) than both this means that if is any prefilter (resp. any filter) such that then necessarily  in which case it is denoted by 
Let and let which makes a prefilter and a filter subbase that is not closed under finite intersections. Because is a prefilter, the smallest prefilter containing is The π–system generated by is In particular, the smallest prefilter containing the filter subbase is not equal to the set of all finite intersections of sets in The filter on generated by is All three of the π–system generates, and are examples of fixed, principal, ultra prefilters that are principal at the point is also an ultrafilter on
Let be a topological space, and define where is necessarily finer than  If is non–empty (resp. non–degenerate, a filter subbase, a prefilter, closed under finite unions) then the same is true of If is a filter on then is a prefilter but not necessarily a filter on although is a filter on equivalent to
The set of all dense open subsets of a (non–empty) topological space is a proper π–system and so also a prefilter. If the space is a Baire space, then the set of all countable intersections of dense open subsets is a π–system and a prefilter that is finer than If (with ) then the set of all such that has finite Lebesgue measure is a proper π–system and free prefilter that is also a proper subset of The prefilters and are equivalent and so generate the same filter on
The prefilter is properly contained in, and not equivalent to, the prefilter consisting of all dense subsets of Since is a Baire space, every countable intersection of sets in is dense in (and also comeagre and non–meager) so the set of all countable intersections of elements of is a prefilter and π–system; it is also finer than, and not equivalent to,
There are many other characterizations of "ultrafilter" and "ultra prefilter," which are listed in the article on ultrafilters. Important properties of ultrafilters are also described in that article.
A non–empty family of sets is/is an:
Ultra if and any of the following equivalent conditions are satisfied:
For every set there exists some set such that (or equivalently, such that ).
For every set there exists some set such that
This characterization of " is ultra" does not depend on the set so mentioning the set is optional when using the term "ultra."
For every set (not necessarily even a subset of ) there exists some set such that
Ultra prefilter if it is a prefilter that is also ultra. Equivalently, it is a filter subbase that is ultra. A prefilter is ultra if and only if it satisfies any of the following equivalent conditions:
This condition can be restated as: is partitioned by and its dual
For any if then (a filter with this property is called a prime filter).
This property extends to any finite union of two or more sets.
is a maximal filter on ; meaning that if is a filter on such that then necessarily (this equality may be replaced by ).
If is upward closed then So this characterization of ultrafilters as maximal filters can be restated as:
Because subordination is for filters the analog of "is a subnet/subsequence of" (specifically, "subnet" should mean "AA–subnet," which is defined below), this characterization of an ultrafilter as being a "maximally subordinate filter" suggests that an ultrafilter can be interpreted as being analogous to some sort of "maximally deep net" (which could, for instance, mean that "when viewed only from " in some sense, it is indistinguishable from its subnets, as is the case with any net valued in a singleton set for example),[note 5] which is an idea that is actually made rigorous by ultranets. The ultrafilter lemma is then the statement that every filter ("net") has some subordinate filter ("subnet") that is "maximally subordinate" ("maximally deep").
A consequence of the ultrafilter lemma is that every filter is equal to the intersection of all ultrafilters containing it.
Assuming the axioms of Zermelo–Fraenkel (ZF), the ultrafilter lemma follows from the Axiom of choice (in particular from Zorn's lemma) but is strictly weaker than it. The ultrafilter lemma implies the Axiom of choice for finite sets. If only dealing with Hausdorff spaces, then most basic results (as encountered in introductory courses) in Topology (such as Tychonoff's theorem for compact Hausdorff spaces and the Alexander subbase theorem) and in functional analysis (such as the Hahn–Banach theorem) can be proven using only the ultrafilter lemma; the full strength of the axiom of choice might not be needed.
The kernel is useful in classifying properties of prefilters and other families of sets.
The kernel of a family of sets is the intersection of all sets that are elements of
If then and this set is also equal to the kernel of the π–system that is generated by
In particular, if is a filter subbase then the kernels of all of the following sets are equal:
(1) (2) the π–system generated by and (3) the filter generated by
If is a map then
Equivalent families have equal kernels.
Two principal families are equivalent if and only if their kernels are equal.
Classifying families by their kernels
A family of sets is:
Free if or equivalently, if this can be restated as
A filter is free if and only if is infinite and contains the Fréchet filter on as a subset.
Fixed if in which case, is said to be fixed by any point
The principal filter at is the filter A filter is principal at if and only if
Countably deep if whenever is a countable subset then 
If is a principal filter on then and
and is also the smallest prefilter that generates
Family of examples: For any non–empty the family is free but it is a filter subbase if and only if no finite union of the form covers in which case the filter that it generates will also be free. In particular, is a filter subbase if is countable (for example, the primes), a meager set in