In mathematics, a filter or order filter is a special subset of a partially ordered set (poset), describing "large" or "eventual" elements. Filters appear in order and lattice theory, but also topology, whence they originate. The notion dual to a filter is an order ideal. Special cases of filters include ultrafilters, which are filters that cannot be enlarged, and describe nonconstructive techniques in mathematical logic. Filters on sets were introduced by Henri Cartan in 1937. Nicolas Bourbaki, in their book Topologie Générale, popularized filters as an alternative to E. H. Moore and Herman L. Smith's 1922 notion of a net; order filters generalize this notion from the specific case of a power set under inclusion to arbitrary partially ordered sets. Nevertheless, the theory of power-set filters retains interest in its own right, in part for substantial applications in topology.
Motivation In food preparation, a spaghetti or pasta filter filters out small debris or pasta fluids but retains the pasta noodles and sides. Similarly, a filter on a set or partial-order filters out the 'small-enough stuff' but retains the 'large-enough stuff'. Fix a partially ordered set (poset) P. Intuitively, a filter F is a subset of P whose members are elements large enough to satisfy some criterion. For instance, if x∈P, then the set of elements above x is a filter, called the principal filter at x. (If x and y are incomparable elements of P, then neither the principal filter at x nor y is contained in the other.) A filter F on a set S contains the subsets 'large-enough' to satisfy some conditions or contain some given things. For example, if S is the real line and x∈S, then the family of sets including x in their interior is a filter, called the neighborhood filter at x. The thing in this case is slightly larger than x, but it still does not contain any other specific point of the line. The above considerations motivate the upward closure requirement in the definition below: "large enough" objects can always be made larger. To understand the other two conditions, reverse the roles and instead consider F as a "locating scheme" to find x. In this interpretation, one searches in some space X, and expects F to describe those subsets of X that contain the goal. The goal must be located somewhere; thus the empty set ∅ can never be in F. And if two subsets both contain the goal, then one should "zoom in" to their common region. An ultrafilter describes a "perfect locating scheme" where each scheme component gives new information (either "look here" or "look elsewhere"). Compactness is the property that "every search is fruitful," or, to put it another way, "every locating scheme ends in a search result." A common use for a filter is to define properties that are satisfied by "generic" elements of some topological space. This application generalizes the "locating scheme" to find points that might be hard to write down explicitly.
Definition
A subset F of a partially ordered set (P, ≤) is a filter or dual ideal if the following are satisfied:
Downward directedness Every finite subset of F has a lower bound in F. In other words, F is non-empty and for every x, y ∈ F there is some z ∈ F such that z ≤ x and z ≤ y. Upward closure For every x ∈ F and p ∈ P, the condition x ≤ p implies p ∈ F. If, additionally, F ≠ P, then F is said to be a proper filter. Authors in set theory and mathematical logic often require all filters to be proper; this article will eschew that convention. An ultrafilter is a proper filter contained in no other proper filter except itself.
Filter bases
A subset S of F is a base or basis for F if the upwards closure of S (i.e., the smallest upwards-closed set containing S) is equal to F. Since every filter is upwards-closed, every filter is a base for itself. Moreover, if B ⊆ P is downward directed, then B generates an upper set F that is a filter (for which B is a base). Such sets are called prefilters, as well as the aforementioned filter base/basis, and F is said to be generated or spanned by B. A prefilter is proper if and only if it generates a proper filter. Given p ∈ P, the set {x : p ≤ x} is the smallest filter containing p, and sometimes written ↑ p. Such a filter is called a principal filter; p is said to be the principal element of F, or generate F.
Refinement Suppose B and C are two prefilters on P, and, for each c ∈ C, there is a b ∈ B, such that b ≤ c. Then we say that B is finer than (or refines) C; likewise, C is coarser than (or coarsens) B. Refinement is a preorder on the set of prefilters. In fact, if C also refines B, then B and C are called equivalent, for they generate the same filter. Thus passage from prefilter to filter is an instance of passing from a preordering to associated partial ordering.
Special cases Historically, filters generalized to order-theoretic lattices before arbitrary partial orders. In the case of lattices, downward direction can be written as closure under finite meets: for all x, y ∈ F, one has x ∧ y ∈ F.
Linear filters A linear (ultra)filter is an (ultra)filter on the lattice of vector subspaces of a given vector space, ordered by inclusion. Explicitly, a linear filter on a vector space X is a family B of vector subspaces of X such that if A, B ∈ B and C is a vector subspace of X that contains A, then A ∩ B ∈ B and C ∈ B. A linear filter is proper if it does not contain {0}.
Filters on a set; subbases
Given a set S, the power set P(S) is partially ordered by set inclusion; filters on this poset are often just called "filters on S," in an abuse of terminology. For such posets, downward direction and upward closure reduce to:
… excerpt ends here. Continue reading the full article.

