This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (June 2017) (Learn how and when to remove this template message)

In mathematical order theory, an ideal is a special subset of a partially ordered set (poset). Although this term historically was derived from the notion of a ring ideal of abstract algebra, it has subsequently been generalized to a different notion. Ideals are of great importance for many constructions in order and lattice theory.
A subset I of a partially ordered set (P,ideal, if the following conditions hold:^{[1]}^{[2]}
While this is the most general way to define an ideal for arbitrary posets, it was originally defined for lattices only. In this case, the following equivalent definition can be given: a subset I of a lattice (P,if and only if it is a lower set that is closed under finite joins (suprema), i.e., it is nonempty and for all x, y in I, the element xy of P is also in I.^{[3]}
The dual notion of an ideal, i.e., the concept obtained by reversing all with , is a filter.
Some authors use the term ideal to mean a lower set, i.e., they include only condition 2 above.^{[4]}^{[5]}^{[6]} With this weaker definition, an ideal of a lattice seen as a poset is not closed under joins, so it is not necessarily an ideal of the lattice.^{[6]} popflock.com resource uses only "ideal/filter (of order theory)" and "lower/upper set" to avoid confusion.
Frink ideals, pseudoideals and Doyle pseudoideals are different generalizations of the notion of a lattice ideal.
An ideal or filter is said to be proper if it is not equal to the whole set P.^{[3]}
The smallest ideal that contains a given element p is a principal ideal and p is said to be a principal element of the ideal in this situation. The principal ideal p for a principal p is thus given by p = {x in P  x p}.
An important special case of an ideal is constituted by those ideals whose settheoretic complements are filters, i.e. ideals in the inverse order. Such ideals are called prime ideals. Also note that, since we require ideals and filters to be nonempty, every prime ideal is necessarily proper. For lattices, prime ideals can be characterized as follows:
A subset I of a lattice (P,
It is easily checked that this is indeed equivalent to stating that P\I is a filter (which is then also prime, in the dual sense).
For a complete lattice the further notion of a completely prime ideal is meaningful. It is defined to be a proper ideal I with the additional property that, whenever the meet (infimum) of some arbitrary set A is in I, some element of A is also in I. So this is just a specific prime ideal that extends the above conditions to infinite meets.
The existence of prime ideals is in general not obvious, and often a satisfactory amount of prime ideals cannot be derived within ZF (ZermeloFraenkel set theory without the axiom of choice). This issue is discussed in various prime ideal theorems, which are necessary for many applications that require prime ideals.
An ideal I is maximal if it is proper and there is no proper ideal J that is a strictly greater set than I. Likewise, a filter F is maximal if it is proper and there is no proper filter that is strictly greater.
When a poset is a distributive lattice, maximal ideals and filters are necessarily prime, while the converse of this statement is false in general.
Maximal filters are sometimes called ultrafilters, but this terminology is often reserved for Boolean algebras, where a maximal filter (ideal) is a filter (ideal) that contains exactly one of the elements {a, ¬a}, for each element a of the Boolean algebra. In Boolean algebras, the terms prime ideal and maximal ideal coincide, as do the terms prime filter and maximal filter.
There is another interesting notion of maximality of ideals: Consider an ideal I and a filter F such that I is disjoint from F. We are interested in an ideal M that is maximal among all ideals that contain I and are disjoint from F. In the case of distributive lattices such an M is always a prime ideal. A proof of this statement follows.
However, in general it is not clear whether there exists any ideal M that is maximal in this sense. Yet, if we assume the Axiom of Choice in our set theory, then the existence of M for every disjoint filteridealpair can be shown. In the special case that the considered order is a Boolean algebra, this theorem is called the Boolean prime ideal theorem. It is strictly weaker than the Axiom of Choice and it turns out that nothing more is needed for many order theoretic applications of ideals.
The construction of ideals and filters is an important tool in many applications of order theory.
Ideals were introduced first by Marshall H. Stone, who derived their name from the ring ideals of abstract algebra. He adopted this terminology because, using the isomorphism of the categories of Boolean algebras and of Boolean rings, the two notions do indeed coincide.
Ideals and filters are among the most basic concepts of order theory. See the introductory books given for order theory and lattice theory, and the literature on the Boolean prime ideal theorem.