# Complete lattice

In mathematics, a complete lattice is a partially ordered set in which all subsets have both a supremum (join) and an infimum (meet). A conditionally complete lattice satisfies at least one of these properties for bounded subsets. For comparison, in a general lattice, only pairs of elements need to have a supremum and an infimum. Every non-empty finite lattice is complete, but infinite lattices may be incomplete.
Complete lattices appear in many applications in mathematics and computer science. Both order theory and universal algebra study them as a special class of lattices.
Complete lattices must not be confused with complete partial orders (CPOs), a more general class of partially ordered sets. More specific complete lattices are complete Boolean algebras and complete Heyting algebras (locales).

## Formal definition

A complete lattice is a partially ordered set (L, ≤) such that every subset A of L has both a greatest lower bound (the infimum, or meet) and a least upper bound (the supremum, or join) in (L, ≤).
The meet is denoted by $\bigwedge A$, and the join by $\bigvee A$.
In the special case where A is the empty set, the meet of A is the greatest element of L. Likewise, the join of the empty set is the least element of L. Then, complete lattices form a special class of bounded lattices.

### Complete sublattices

A sublattice M of a complete lattice L is called a complete sublattice of L if for every subset A of M the elements $\bigwedge A$ and $\bigvee A$, as defined in L, are actually in M.
If the above requirement is lessened to require only non-empty meet and joins to be in M, the sublattice M is called a closed sublattice of L.

### Complete semilattices

The terms complete meet-semilattice or complete join-semilattice is another way to refer to complete lattices since arbitrary meets can be expressed in terms of arbitrary joins and vice versa (for details, see completeness).
Another usage of "complete meet-semilattice" refers to a meet-semilattice that is bounded complete and a complete partial order. This concept is arguably the "most complete" notion of a meet-semilattice that is not yet a lattice (in fact, only the top element may be missing).
See semilattices for further discussion between both definitions.

### Conditionally Complete Lattices

A lattice is said to be "conditionally complete" if it satisfies either or both of the following properties:
* Any subset bounded above has the least upper bound.
* Any subset bounded below has the greatest lower bound.

## Examples

* Any non-empty finite lattice is trivially complete.
* The power set of a given set when ordered by inclusion. The supremum is given by the union and the infimum by the intersection of subsets.
* The non-negative integers ordered by divisibility. The least element of this lattice is the number 1 since it divides any other number. Perhaps surprisingly, the greatest element is 0, because it can be divided by any other number. The supremum of finite sets is given by the least common multiple and the infimum by the greatest common divisor. For infinite sets, the supremum will always be 0 while the infimum can well be greater than 1. For example, the set of all even numbers has 2 as the greatest common divisor. If 0 is removed from this structure it remains a lattice but ceases to be complete.
* The subgroups of any given group under inclusion. (While the infimum here is the usual set-theoretic intersection, the supremum of a set of subgroups is the subgroup generated by the set-theoretic union of the subgroups, not the set-theoretic union itself.) If e is the identity of G, then the trivial group {e} is the minimum subgroup of G, while the maximum subgroup is the group G itself.
* The ideals of a ring, when ordered by inclusion. The supremum is given by the sum of ideals and the infimum by the intersection.
* The open sets of a topological space, when ordered by inclusion. The supremum is given by the union of open sets and the infimum by the interior of the intersection.

### Non-examples

* The empty set is not a complete lattice. If it were a complete lattice, then in particular the empty set would have an infimum and supremum in the empty set, a contradiction.
* The rational numbers $\mathbb {Q}$ with the usual order ≤ is not a complete lattice. It is a lattice with $\bigwedge \{x,y\}=\min\{x,y\}$ and $\bigvee \{x,y\}=\max\{x,y\}$. However, $\mathbb {Q}$ itself has no infimum or supremum, nor does $\{x\in \mathbb {Q} |x^{2}<2\}$.

## Locally finite complete lattices

A complete lattice L is said to be locally finite if the supremum of any infinite subset is equal to the supremal element. Denoting this supremal element "1", the condition is equivalently that the set $\{y\in L~|~y\leq x\}\,\!$ is finite for any $1\neq x\in L$. This notation may clash with other notation, as in the case of the lattice (N, |), i.e., the non-negative integers ordered by divisibility. In this locally finite lattice, the infimal element denoted "0" for the lattice theory is the number 1 in the set N and the supremal element denoted "1" for the lattice theory is the number 0 in the set N.

## Morphisms of complete lattices

The traditional morphisms between complete lattices, taking the complete lattices as the objects of a category, are the complete homomorphisms (or complete lattice homomorphisms). These are characterized as functions that preserve all joins and all meets. Explicitly, this means that a function f: L→M between two complete lattices L and M is a complete homomorphism if
* $f\left(\bigwedge A\right)=\bigwedge \{f(a)\mid a\in A\}$ and
* $f\left(\bigvee A\right)=\bigvee \{f(a)\mid a\in A\}$,
for all subsets A of L. Such functions are automatically monotonic, but the condition of being a complete homomorphism is in fact much more specific. For this reason, it can be useful to consider weaker notions of morphisms, such as those that are only required to preserve all joins (giving a category Sup) or all meets (giving a category Inf), which are indeed inequivalent conditions. These notions may also be considered as homomorphisms of complete meet-semilattices or complete join-semilattices, respectively.

### Galois connections and adjoints

Furthermore, morphisms that preserve all joins are equivalently characterized as the lower adjoint part of a unique Galois connection. For any pair of preorders X and Y, a Galois connection is given by a pair of monotone functions f and g from X to Y such that for each pair of elements x of X and y of Y
    $f(x)\leq y\iff x\leq g(y)$
where f is called the lower adjoint and g is called the upper adjoint. By the adjoint functor theorem, a monotone map between any pair of preorders preserves all joins if and only if it is a lower adjoint and preserves all meets if and only if it is an upper adjoint.
As such, each join-preserving morphism determines a unique upper adjoint in the inverse direction that preserves all meets. Hence, considering complete lattices with complete semilattice morphisms (of either type, join-preserving or meet-preserving) boils down to considering Galois connections as one's lattice morphisms. This also yields the insight that three classes of morphisms discussed above basically describe just two different categories of complete lattices: one with complete homomorphisms and one with Galois connections that captures both the meet-preserving functions (upper adjoints) and their dual join-preserving mappings (lower adjoints).
A particularly important class of special cases arises between lattices of subsets of X and Y, i.e., the power sets ⁠$P(X)$⁠ and ⁠$P(Y)$⁠, given a function ⁠$f$⁠ from X to Y. In these cases, the direct image and inverse image maps induced by ⁠$f$⁠ between the power sets are upper and lower adjoints to each other, respectively.

## Free construction and completion
### Free "complete semilattices"

The construction of free objects depends on the chosen class of morphisms. Functions that preserve all joins (i.e. lower adjoints of Galois connections) are called free complete join-semilattices.
The standard definition from universal algebra states that a free complete lattice over a generating set $S$ is a complete lattice $L$ together with a function $i:S\rightarrow L$, such that any function $f$ from $S$ to the underlying set of some complete lattice $M$ can be factored uniquely through a morphism $f^{\circ }$ from $L$ to $M$. This means that $f(s)=f^{\circ }(i(s))$ for every element $s$ of $S$, and that $f^{\circ }$ is the only morphism with this property. Hence, there is a functor from the category of sets and functions to the category of complete lattices and join-preserving functions which is left adjoint to the forgetful functor from complete lattices to their underlying sets.
Free complete lattices can thus be constructed such that the complete lattice generated by some set $S$ is just the powerset $2^{S}$, the set of all subsets of $S$ ordered by subset inclusion. The required unit $i:S\rightarrow 2^{S}$ maps any element $s$ of $S$ to the singleton set $\{s\}$. Given a mapping $f$ as above, the function $f^{\circ }:2^{S}\rightarrow M$ is defined by
    $f^{\circ }(X)=\bigvee \{f(s)|s\in X\}$.
Then $f^{\circ }$ transforms unions into suprema and thus preserves joins.
These considerations also yield a free construction for morphisms that preserve meets instead of joins (i.e. upper adjoints of Galois connections). The above can be dualized: free objects are given as powersets ordered by reverse inclusion, such that set union provides the meet operation, and the function $f^{\circ }$ is defined in terms of meets instead of joins. The result of this construction is known as a free complete meet-semilattice. It can be noted that these free constructions extend those that are used to obtain free semilattices, where finite sets need to be considered.

### Free complete lattices

The situation for complete lattices with complete homomorphisms is more intricate. In fact, free complete lattices generally do not exist. Of course, one can formulate a word problem similar to the one for the case of lattices, but the collection of all possible words (or "terms") in this case would be a proper class, because arbitrary meets and joins comprise operations for argument sets of every cardinality.
This property in itself is not a problem: as the case of free complete semilattices above shows, it can well be that the solution of the word problem leaves only a set of equivalence classes. In other words, it is possible that the proper classes of all terms have the same meaning and are thus identified in the free construction. However, the equivalence classes for the word problem of complete lattices are "too small," such that the free complete lattice would still be a proper class, which is not allowed.
Now, one might still hope that there are some useful cases where the set of generators is sufficiently small for a free, complete lattice to exist. Unfortunately, the size limit is very low, and we have the following theorem:
    The free complete lattice on three generators does not exist; it is a proper class.
A proof of this statement is given by Johnstone. The original argument is attributed to Alfred W. Hales; see also the article on free lattices.

### Completion

If a complete lattice is freely generated from a given poset used in place of the set of generators considered above, then one speaks of a completion of the poset. The definition of the result of this operation is similar to the above definition of free objects, where "sets" and "functions" are replaced by "posets" and "monotone mappings". Likewise, one can describe the completion process as a functor from the category of posets with monotone functions to some category of complete lattices with appropriate morphisms that are left adjoint to the forgetful functor in the converse direction.
As long as one considers meet- or join-preserving functions as morphisms, this can easily be achieved through the so-called Dedekind–MacNeille completion. For this process, elements of the poset are mapped to (Dedekind-) cuts, which can then be mapped to the underlying posets of arbitrary complete lattices in much the same way as done for sets and free complete (semi-) lattices above.
The aforementioned result that free complete lattices do not exist entails that an according free construction from a poset is not possible either. This is easily seen by considering posets with a discrete order, where every element only relates to itself. These are exactly the free posets on an underlying set. Would there be a free construction of complete lattices from posets, then both constructions could be composed, which contradicts the negative result above.

## Representation

G. Birkhoff's book Lattice Theory contains a very useful representation method. It associates a complete lattice to any binary relation between two sets by constructing a Galois connection from the relation, which then leads to two dually isomorphic closure systems. Closure systems are intersection-closed families of sets. When ordered by the subset relation ⊆, they are complete lattices.
A special instance of Birkhoff's construction starts from an arbitrary poset (P,≤) and constructs the Galois connection from the order relation ≤ between P and itself. The resulting complete lattice is the Dedekind-MacNeille completion. When this completion is applied to a poset that already is a complete lattice, then the result is isomorphic to the original one. Thus, we immediately find that every complete lattice is represented by Birkhoff's method, up to isomorphism.
The construction is utilized in formal concept analysis, where one represents real-word data by binary relations (called formal contexts) and uses the associated complete lattices (called concept lattices) for data analysis. The mathematics behind formal concept analysis therefore is the theory of complete lattices.
Another representation is obtained as follows: A subset of a complete lattice is itself a complete lattice (when ordered with the induced order) if and only if it is the image of an increasing and idempotent (but not necessarily extensive) self-map. The identity mapping has these two properties. Thus all complete lattices occur.

## Further results

Besides the previous representation results, there are some other statements that can be made about complete lattices, or that take a particularly simple form in this case. An example is the Knaster–Tarski theorem, which states that the set of fixed points of a monotone function on a complete lattice is again a complete lattice. This is easily seen to be a generalization of the above observation about the images of increasing and idempotent functions.