This article includes a list of general references, but it remains largely unverified because it lacks sufficient corresponding inline citations. (June 2017) (Learn how and when to remove this template message) |

In mathematics, a **filter** is a special subset of a partially ordered set. Filters appear in order and lattice theory, but can also be found in topology, from where they originate. The dual notion of a filter is an order ideal.

Filters were introduced by Henri Cartan in 1937^{[1]}^{[2]} 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.

## Motivation

Intuitively, a filter in a partially ordered set (*poset*), *P*, is a subset of *P* that includes as members those elements that are large enough to satisfy some given criterion. For example, if *x* is an element of the poset, then the set of elements that are above *x* is a filter, called the **principal filter** at *x*. (If *x* and *y* are incomparable elements of the poset, then neither of the principal filters at *x* and *y* is contained in the other one, and conversely.)

Similarly, a filter on a set contains those subsets that are sufficiently large to contain some given *thing*. For example, if the set is the real line and *x* is one of its points, then the family of sets that include *x* in their interior is a filter, called the **filter of neighbourhoods** of *x*. The *thing* in this case is slightly larger than *x*, but it still doesn't contain any other specific point of the line.

The above interpretations explain conditions 1 and 3 in the section General definition: Clearly the empty set is not "large enough", and clearly the collection of "large enough" things should be "upward-closed". However, they do not really, without elaboration, explain condition 2 of the general definition. For, why should two "large enough" things contain a *common* "large enough" thing?

Alternatively, a filter can be viewed as a "locating scheme": When trying to locate something (a point or a subset) in the space *X*, call a filter the collection of subsets of *X* that might contain "what is looked for". Then this "filter" should possess the following natural structure:

- A locating scheme must be non-empty in order to be of any use at all.
- If two subsets,
*E*and*F*, both might contain "what is looked for", then so might their intersection. Thus the filter should be closed with respect to finite intersection. - If a set
*E*might contain "what is looked for", so does every superset of it. Thus the filter is upward-closed.

An **ultrafilter** can be viewed as a "perfect locating scheme" where *each* subset *E* of the space *X* can be used in deciding whether "what is looked for" might lie in *E*.

From this interpretation, **compactness** (see the mathematical characterization below) can be viewed as the property that "no location scheme can end up with nothing", or, to put it another way, "always something will be found".

The mathematical notion of **filter** provides a precise language to treat these situations in a rigorous and general way, which is useful in analysis, general topology and logic.

## General definition: Filter on a partially ordered set

A subset F of a partially ordered set (*P*, ≤) is a **filter** if the following conditions hold:

- F is non-empty.
- F is
**downward directed**: For every*x*,*y*∈*F*, there is some*z*∈*F*such that*z*≤*x*and*z*≤*y*. - F is an
**upper set**or**upward-closed**: For every*x*∈*F*and*y*∈*P*,*x*≤*y*implies that*y*∈*F*.

A filter is **proper** if it is not equal to the whole set P.
This condition is sometimes added to the definition of a filter.

While the above definition is the most general way to define a filter for arbitrary posets, it was originally defined for lattices only. In this case, the above definition can be characterized by the following equivalent statement:
A subset F of a lattice (*P*, ≤) is a filter, if and only if it is a non-empty upper set that is closed under finite infima (or meets), i.e., for all *x*, *y* ∈ *F*, it is also the case that *x* ∧ *y* is in *F*.^{[3]}^{:184}
A subset S of F is a **filter basis** if the upper set generated by S is all of F. Note that every filter is its own basis.

The smallest filter that contains a given element *p* ∈ *P* is a **principal filter** and p is a **principal element** in this situation.
The principal filter for p is just given by the set and is denoted by prefixing p with an upward arrow: .

The dual notion of a filter, i.e. the concept obtained by reversing all ≤ and exchanging ∧ with ∨, is **ideal**.
Because of this duality, the discussion of filters usually boils down to the discussion of ideals.
Hence, most additional information on this topic (including the definition of **maximal filters** and **prime filters**) is to be found in the article on ideals.
There is a separate article on ultrafilters.

## Filter on a set

### Definition of a filter

There are two competing definitions of a "filter on a set," both of which require that a filter be a *dual ideal*.^{[4]}
One definition defines "filter" as a synonym of "dual ideal" while the other defines "filter" to mean a dual ideal that is also *proper*.

**Warning**: It is recommended that readers always check how "filter" is defined when reading mathematical literature.

Definition: Adual ideal^{[4]}on a set S is a non-empty subset F ofP(S) with the following properties:

- F is
closed under finite intersections: IfA,B∈F, then so is their intersection.

- This property implies that if ∅ ∉
Fthen F has the finite intersection property.- F is
upward closed/isotone:^{[5]}IfA∈FandA⊆B, thenB∈F, for all subsets B of S. .

- This property entails that
S∈F(sinceFis a non-empty subset ofP(S)).

Given a set S, a canonical partial ordering ⊆ can be defined on the powerset **P**(*S*) by subset inclusion, turning (**P**(*S*), ⊆) into a lattice.
A "dual ideal" is just a filter with respect to this partial ordering.
Note that if *S* = ∅ then there is exactly one dual ideal on S, which is **P**(*S*) = {∅}.

#### Filter definition 1: Dual ideal

The article uses the following definition of "filter on a set."

Definition: Afilteron a set S is a dual ideal on S. Equivalently, a filter on S is just a filter with respect the canonical partial ordering (P(S), ⊆) described above.

#### Filter definition 2: Proper dual ideal

The other definition of "filter on a set" is the original definition of a "filter" given by Henri Cartan, which required that a filter on a set be a dual ideal that does *not* contain the empty set:

Original/Alternative definition: Afilter^{[4]}on a set S is a dual ideal on S with the following additional property:

- F is
proper^{[6]}/non-degenerate:^{[7]}The empty set is not in F (i.e. ∅ ∉F).

**Note**: This article does*not*require that a filter be proper.

The only non-proper filter on S is **P**(*S*).
Much mathematical literature, especially that related to Topology, defines "filter" to mean a *non-degenerate* dual ideal.

### Filter bases, subbases, and comparison

- Filter bases and subbases

A subset B of **P**(*S*) is called a **prefilter**, **filter base**, or **filter basis** if B is non-empty and the intersection of any two members of B is a superset of some member(s) of B.
If the empty set is not a member of B, we say B is a **proper filter base**.

Given a filter base B, the filter generated or spanned by B is defined as the minimum filter containing B. It is the family of all those subsets of S which are supersets of some member(s) of B. Every filter is also a filter base, so the process of passing from filter base to filter may be viewed as a sort of completion.

For every subset T of **P**(*S*) there is a smallest (possibly nonproper) filter F containing T, called the filter generated or spanned by T.
Similarly as for a filter spanned by a *filter base*, a filter spanned by a *subset* T is the minimum filter containing T.
It is constructed by taking all finite intersections of T, which then form a filter base for F.
This filter is proper if and only if every finite intersection of elements of T is non-empty, and in that case we say that T is a **filter subbase**.

- Finer/equivalent filter bases

If B and C are two filter bases on S, one says C is **finer** than B (or that C is a **refinement** of B) if for each *B*_{0} ∈ *B*, there is a *C*_{0} ∈ *C* such that *C*_{0} ⊆ *B*_{0}.
If also B is finer than C, one says that they are **equivalent filter bases**.

- If B and C are filter bases, then C is finer than B if and only if the filter spanned by C contains the filter spanned by B. Therefore, B and C are equivalent filter bases if and only if they generate the same filter.
- For filter bases A, B, and C, if A is finer than B and B is finer than C then A is finer than C. Thus the refinement relation is a preorder on the set of filter bases, and the passage from filter base to filter is an instance of passing from a preordering to the associated partial ordering.

### Examples

- Let S be a set and C be a non-empty subset of S. Then {
*C*} is a filter base. The filter it generates (i.e., the collection of all subsets containing C) is called the**principal filter**generated by C. - A filter is said to be a
**free filter**if the intersection of all of its members is empty. A proper principal filter is not free. Since the intersection of any finite number of members of a filter is also a member, no proper filter on a finite set is free, and indeed is the principal filter generated by the common intersection of all of its members. A nonprincipal filter on an infinite set is not necessarily free. - The Fréchet filter on an infinite set S is the set of all subsets of S that have finite complement. A filter on S is free if and only if it includes the Fréchet filter.
- More generally, if is a measure space for which , the collection of all such that forms a filter. The Fréchet filter is the case where and is the counting measure.

- Every uniform structure on a set X is a filter on
*X*×*X*. - A filter in a poset can be created using the Rasiowa–Sikorski lemma, often used in forcing.
- The set is called a
*filter base of tails*of the sequence of natural numbers . A filter base of tails can be made of any net using the construction , where the filter that this filter base generates is called the net's*eventuality filter.*Therefore, all nets generate a filter base (and therefore a filter). Since all sequences are nets, this holds for sequences as well.

## Filters in model theory

For every filter *F* on a set *S*, the set function defined by

is finitely additive — a "measure" if that term is construed rather loosely. Therefore, the statement

can be considered somewhat analogous to the statement that holds "almost everywhere".
That interpretation of membership in a filter is used (for motivation, although it is not needed for actual *proofs*) in the theory of ultraproducts in model theory, a branch of mathematical logic.

## Filters in topology

In topology and analysis, filters are used to define convergence in a manner similar to the role of sequences in a metric space.

In topology and related areas of mathematics, a filter is a generalization of a net. Both nets and filters provide very general contexts to unify the various notions of limit to arbitrary topological spaces.

A sequence is usually indexed by the natural numbers, which are a totally ordered set. Thus, limits in first-countable spaces can be described by sequences. However, if the space is not first-countable, nets or filters must be used. Nets generalize the notion of a sequence by requiring the index set simply be a directed set. Filters can be thought of as sets built from multiple nets. Therefore, both the limit of a filter and the limit of a net are conceptually the same as the limit of a sequence.

### Neighbourhood bases

Let *X* be a topological space and *x* a point of *X*.

- Take
*N*_{x}to be the**neighbourhood filter**at point*x*for*X*. This means that*N*_{x}is the set of all topological neighbourhoods of the point*x*. It can be verified that*N*_{x}is a filter. A**neighbourhood system**is another name for a**neighbourhood filter**. - To say that
*N*is a**neighbourhood base**at*x*for*X*means that each subset*V*_{0}of X is a neighbourhood of*x*if and only if there exists*N*_{0}∈*N*such that*N*_{0}⊆*V*_{0}. Every neighbourhood base at*x*is a filter base that generates the neighbourhood filter at*x*.

### Convergent filter bases

Let *X* be a topological space and *x* a point of *X*.

- To say that a filter base
*B***converges**to*x*, denoted*B*→*x*, means that for every neighbourhood*U*of*x*, there is a*B*_{0}∈*B*such that*B*_{0}⊆*U*. In this case,*x*is called a limit of*B*and*B*is called a**convergent filter base**. - Every neighbourhood base
*N*of*x*converges to*x*.- If
*N*is a neighbourhood base at*x*and*C*is a filter base on*X*, then*C*→*x*if*C*is finer than*N*. If*N*is the upward closed neighborhood filter, then the converse holds as well: any basis of a convergent filter refines the neighborhood filter. - If
*Y*⊆*X*, a point*p ∈ X*is called a**limit point**of*Y*in*X*if and only if each neighborhood*U*of*p*in*X*intersects*Y*. This happens if and only if there is a filter base of subsets of*Y*that converges to*p*in*X*.

- If
- For
*Y*���*X*, the following are equivalent:- (i) There exists a filter base
*F*whose elements are all contained in*Y*such that*F*→*x*. - (ii) There exists a filter
*F*such that*Y*is an element of*F*and*F*→*x*. - (iii) The point
*x*lies in the closure of*Y*.

- (i) There exists a filter base

Indeed:

(i) implies (ii): if *F* is a filter base satisfying the properties of (i), then the filter associated to *F* satisfies the properties of (ii).

(ii) implies (iii): if *U* is any open neighborhood of *x* then by the definition of convergence *U* contains an element of *F*; since also *Y* is an element of *F*,
*U* and *Y* have non-empty intersection.

(iii) implies (i): Define . Then *F* is a filter base satisfying the properties of (i).

### Clustering

Let X be a topological space and *x* a point of *X*.

**Definition**: A filter base B on X is said to**cluster**at x (or have x as a cluster point) if and only if each element of B has non-empty intersection with each neighbourhood of x.

- If a filter base B clusters at x and is finer than a filter base C, then C also clusters at x.
- Every limit of a filter base is also a cluster point of the base.
- A filter base B that has x as a cluster point may not converge to x. But there is a finer filter base that does. For example, the filter base of finite intersections of sets of the subbase
*B*∩ N_{x}. - For a filter base B, the set ∩{cl(
*B*_{0}) |*B*_{0}∈*B*} is the set of all cluster points of B (the closure of*B*_{0}is cl(*B*_{0})). Assume that X is a complete lattice.- The limit inferior of B is the infimum of the set of all cluster points of B.
- The limit superior of B is the supremum of the set of all cluster points of B.
- B is a convergent filter base if and only if its limit inferior and limit superior agree; in this case, the value on which they agree is the limit of the filter base.

### Properties of a topological space

Let *X* be a topological space.

*X*is a Hausdorff space if and only if every filter base on*X*has at most one limit.*X*is compact if and only if every filter base on*X*clusters or has a cluster point.*X*is compact if and only if every filter base on*X*is a subset of a convergent filter base.*X*is compact if and only if every ultrafilter on*X*converges.

### Functions between topological spaces

Let X and Y be topological spaces, let A be a filter base on X, and let *f*: *X* → *Y* be a function.
The image of A under f, denoted by *f*[*A*], is defined as the set *f*[*A*] = { *f* (*a*) | *a* ∈ *A* }, which necessarily forms a filter base on Y.

- f is continuous at
*x*∈*X*if and only if for every filter base A on X,*A*→*x*implies*f*[*A*] →*f*(*x*).

### Cauchy filters

Let be a metric space.

- To say that a filter base
*B*on*X*is**Cauchy**means that for each real number ε > 0, there is a*B*_{0}∈*B*such that the metric diameter of*B*_{0}is less than ε. - Take (
*x*) to be a sequence in metric space_{n}*X*. (*x*) is a Cauchy sequence if and only if the filter base {{_{n}*x*_{N},*x*_{N +1}, ...} |*N*∈ {1,2,3,...} } is Cauchy.

More generally, given a uniform space *X*, a filter *F* on *X* is called a **Cauchy filter** if for every entourage *U* there is an *A* ∈ *F* with (*x*, *y*) ∈ *U* for all *x*, *y* ∈ *A*. In a metric space this agrees with the previous definition. *X* is said to be complete if every Cauchy filter converges. Conversely, on a uniform space every convergent filter is a Cauchy filter. Moreover, every cluster point of a Cauchy filter is a limit point.

A compact uniform space is complete: on a compact space each filter has a cluster point, and if the filter is Cauchy, such a cluster point is a limit point. Further, a uniformity is compact if and only if it is complete and totally bounded.

Most generally, a Cauchy space is a set equipped with a class of filters declared to be Cauchy. These are required to have the following properties:

- for each
*x*in*X*, the ultrafilter at*x*,*U*(*x*), is Cauchy. - if
*F*is a Cauchy filter, and*F*is a subset of a filter*G*, then*G*is Cauchy. - if
*F*and*G*are Cauchy filters and each member of*F*intersects each member of*G*, then*F*∩*G*is Cauchy.

The Cauchy filters on a uniform space have these properties, so every uniform space (hence every metric space) defines a Cauchy space.

## See also

- Filters in topology – Use of filters to describe and characterize all basic topological notions and results.
- Filtration (mathematics)
- Filtration (probability theory) – model of information available at a given point of a random process
- Filtration (abstract algebra)
- Generic filter
- Ideal (set theory) – A non-empty family of sets that is closed under finite unions and subsets.
- Net (mathematics) ��� A generalization of a sequence of points

## Notes

**^**H. Cartan, "Théorie des filtres",*CR Acad. Paris*,**205**, (1937) 595–598.**^**H. Cartan, "Filtres et ultrafiltres",*CR Acad. Paris*,**205**, (1937) 777–779.**^**B.A. Davey and H.A. Priestley (1990).*Introduction to Lattices and Order*. Cambridge Mathematical Textbooks. Cambridge University Press.- ^
^{a}^{b}^{c}Dugundji 1966, pp. 211-213. **^**Dolecki & Mynard 2016, pp. 27-29.**^**Goldblatt, R.*Lectures on the Hyperreals: an Introduction to Nonstandard Analysis*. p. 32.**^**Narici & Beckenstein 2011, pp. 2-7.

## References

- Nicolas Bourbaki, General Topology (Topologie Générale), ISBN 0-387-19374-X (Ch. 1-4): Provides a good reference for filters in general topology (Chapter I) and for Cauchy filters in uniform spaces (Chapter II)
- Burris, Stanley N., and H.P. Sankappanavar, H. P., 1981.
*A Course in Universal Algebra.*Springer-Verlag. ISBN 3-540-90578-2. - Dolecki, Szymon; Mynard, Frederic (2016).
*Convergence Foundations Of Topology*. New Jersey: World Scientific Publishing Company. ISBN 978-981-4571-52-4. OCLC 945169917.

- Dugundji, James (1966).
*Topology*. Boston: Allyn and Bacon. ISBN 978-0-697-06889-7. OCLC 395340485. - MacIver, David,
*Filters in Analysis and Topology*(2004)*(Provides an introductory review of filters in topology and in metric spaces.)* - Narici, Lawrence; Beckenstein, Edward (2011).
*Topological Vector Spaces*. Pure and applied mathematics (Second ed.). Boca Raton, FL: CRC Press. ISBN 978-1584888666. OCLC 144216834. - Stephen Willard,
*General Topology*, (1970) Addison-Wesley Publishing Company, Reading Massachusetts.*(Provides an introductory review of filters in topology.)* - Willard, Stephen (2004) [1970].
*General Topology*. Dover Books on Mathematics (First ed.). Mineola, N.Y.: Dover Publications. ISBN 978-0-486-43479-7. OCLC 115240. - Wilansky, Albert (2013).
*Modern Methods in Topological Vector Spaces*. Mineola, New York: Dover Publications, Inc. ISBN 978-0-486-49353-4. OCLC 849801114.

## Further reading

- George M. Bergman; Ehud Hrushovski: Linear ultrafilters, Comm. Alg., 26 (1998) 4079–4113.