# Free lattice

In mathematics, in the area of order theory, a free lattice is the free object corresponding to a lattice. As free objects, they have the universal property.

## Formal definition

Because the concept of a lattice can be axiomatised in terms of two operations $\wedge$ and $\vee$ satisfying certain identities, the category of all lattices constitute a variety (universal algebra), and thus there exist (by general principles of universal algebra) free objects within this category: lattices where only those relations hold which follow from the general axioms.
These free lattices may be characterised using the relevant universal property. Concretely, free lattice is a functor $F$ from sets to lattices, assigning to each set $X$ the free lattice $F(X)$ equipped with a set map $\eta \colon X\longrightarrow F(X)$ assigning to each $x\in X$ the corresponding element $\eta (x)\in F(X)$. The universal property of these is that there for any map $f\colon X\longrightarrow L$ from $X$ to some arbitrary lattice $L$ exists a unique lattice homomorphism ${\tilde {f}}\colon F(X)\longrightarrow L$ satisfying $f={\tilde {f}}\circ \eta$, or as a commutative diagram: ${\begin{array}{cccc}X&{\stackrel {\eta }{\longrightarrow }}&F(X)\\&\!\forall f\searrow &{\Bigg \downarrow }\exists _{1}{\tilde {f}}\!\!\!\!\!\!\!\!\!\!&\quad \\&&L\end{array}}$ The functor $F$ is left adjoint to the forgetful functor from lattices to their underlying sets.
It is frequently possible to prove things about the free lattice directly using the universal property, but such arguments tend to be rather abstract, so a concrete construction provides a valuable alternative presentation.

### Semilattices

In the case of semilattices, an explicit construction of the free semilattice $F_{\vee }(X)$ is straightforward to give; this helps illustrate several features of the definition by way of universal property. Concretely, the free semilattice $F_{\vee }(X)$ may be realised as the set of all finite nonempty subsets of $X$, with ordinary set union as the join operation $\vee$. The map $\eta \colon X\longrightarrow F_{\vee }(X)$ maps elements of $X$ to singleton sets, i.e., $\eta (x)=\{x\}$ for all $x\in X$. For any semilattice $L$ and any set map $f\colon X\longrightarrow L$, the corresponding universal morphism ${\tilde {f}}\colon F_{\vee }(X)\longrightarrow L$ is given by ${\tilde {f}}(S)=\bigvee _{x\in S}f(x)\qquad {\text{for all }}S\in F_{\vee }(X)$ where $\bigvee$ denotes the semilattice operation in $L$.
This form of ${\tilde {f}}$ is forced by the universal property: any $S\in F_{\vee }(X)$ can be written as a finite union of elements on the form $\eta (x)$ for some $x\in X$, the equality in the universal property says ${\tilde {f}}{\bigl\eta (x){\bigr )}=f(x)$, and finally the homomorphism status of ${\tilde {f}}$ implies ${\tilde {f}}(S_{1}\cup S_{2})={\tilde {f}}(S_{1})\vee {\tilde {f}}(S_{2})$ for all $S_{1},S_{2}\in F_{\vee }(X)$. Any extension of ${\tilde {f}}$ to infinite subsets of $X$ (if there even is one) need however not be uniquely determined by these conditions, so there cannot in $F_{\vee }(X)$ be any elements corresponding to infinite subsets of $X$.

### Lower semilattices

It is similarly possible to define a free functor $F_{\wedge }$ for lower semilattices, but the combination $F_{\wedge }(F_{\vee }(X))$ fails to produce the free lattice $F(X)$ in several ways, because $F_{\wedge }$ treats $F_{\vee }(X)$ as just a set:
* the join operation $\vee$ is not extended to the new elements of $F_{\wedge }(F_{\vee }(X))$,
* the existing partial order on $F_{\vee }(X)$ is not respected; $F_{\wedge }$ views $a$ and $a\vee b$ as unrelated, not understanding it should make $a\wedge (a\vee b)=a$.
The actual structure of the free lattice $F(X)$ is considerably more intricate than that of the free semilattice.

## Word problem

| | | x∧z∧(x∨y) | ≤$_~$ | x∧z |
| by 5. | since | x∧z | ≤$_~$ | x∧z |
| by 1. | since | x∧z | = | x∧z |
| | | x∧z | ≤$_~$ | x∧z∧(x∨y) |
| by 7. | since | x∧z | ≤$_~$ | x∧z | and | | | x∧z | ≤$_~$ | x∨y |
| by 1. | since | x∧z | = | x∧z | | by 6. | since | x∧z | ≤$_~$ | x |
| | | | | | | by 5. | since | x | ≤$_~$ | x |
| | | | | | | by 1. | since | x | = | x |
The word problem for free lattices has some interesting aspects. Consider the case of bounded lattices, i.e. algebraic structures with the two binary operations ∨ and ∧ and the two constants (nullary operations) 0 and 1. The set of all well-formed expressions that can be formulated using these operations on elements from a given set of generators X will be called W(X). This set of words contains many expressions that turn out to denote equal values in every lattice. For example, if a is some element of X, then a ∨ 1 = 1 and a ∧ 1 =a. The word problem for free bounded lattices is the problem of determining which of these elements of W(X) denote the same element in the free bounded lattice FX, and hence in every bounded lattice.
The word problem may be resolved as follows. A relation ≤$_~$ on W(X) may be defined inductively by setting w ≤$_~$ v if and only if one of the following holds:
* w = v (this can be restricted to the case where w and v are elements of X),
* w = 0,
* v = 1,
* w = w$_1$ ∨ w$_2$ and both w$_1$ ≤$_~$ v and w$_2$ ≤$_~$ v hold,
* w = w$_1$ ∧ w$_2$ and either w$_1$ ≤$_~$ v or w$_2$ ≤$_~$ v holds,
* v = v$_1$ ∨ v$_2$ and either w ≤$_~$ v$_1$ or w ≤$_~$ v$_2$ holds,
* v = v$_1$ ∧ v$_2$ and both w ≤$_~$ v$_1$ and w ≤$_~$ v$_2$ hold.
This defines a preorder ≤$_~$ on W(X), so an equivalence relation can be defined by w ~ v when w ≤$_~$ v and v ≤$_~$ w. One may then show that the partially ordered quotient space W(X)/~ is the free bounded lattice FX. The equivalence classes of W(X)/~ are the sets of all words w and v with w ≤$_~$ v and v ≤$_~$ w. Two well-formed words v and w in W(X) denote the same value in every bounded lattice if and only if w ≤$_~$ v and v ≤$_~$ w; the latter conditions can be effectively decided using the above inductive definition. The table shows an example computation to show that the words x∧z and x∧z∧(x∨y) denote the same value in every bounded lattice. The case of lattices that are not bounded is treated similarly, omitting rules 2. and 3. in the above construction.
The solution of the word problem on free lattices has several interesting corollaries. One is that the free lattice of a three-element set of generators is infinite. In fact, one can even show that every free lattice on three generators contains a sublattice which is free for a set of four generators. By induction, this eventually yields a sublattice free on countably many generators. This property is reminiscent of SQ-universality in groups.
The proof that the free lattice in three generators is infinite proceeds by inductively defining
    p$_{n+1}$ = x ∨ (y ∧ (z ∨ (x ∧ (y ∨ (z ∧ p$_n$)))))
where x, y, and z are the three generators, and p$_0$ = x. One then shows, using the inductive relations of the word problem, that p$_{n+1}$ is strictly greater than p$_n$, and therefore all infinitely many words p$_n$ evaluate to different values in the free lattice FX.

## The complete free lattice

Another corollary is that the complete free lattice (on three or more generators) "does not exist", in the sense that it is a proper class. The proof of this follows from the word problem as well. To define a complete lattice in terms of relations, it does not suffice to use the finitary relations of meet and join; one must also have infinitary relations defining the meet and join of infinite subsets. For example, the infinitary relation corresponding to "join" may be defined as
    $\operatorname {sup} _{N}:(f:N\to FX)$
Here, f is a map from the elements of a cardinal N to FX; the operator $\operatorname {sup} _{N}$ denotes the supremum, in that it takes the image of f to its join. This is, of course, identical to "join" when N is a finite number; the point of this definition is to define join as a relation, even when N is an infinite cardinal.
The axioms of the pre-ordering of the word problem may be adjoined by the two infinitary operators corresponding to meet and join. After doing so, one then extends the definition of $p_{n}$ to an ordinally indexed $p_{\alpha }$ given by
    $p_{\alpha }=\operatorname {sup} \{p_{\beta }\mid \beta <\alpha \}$
when $\alpha$ is a limit ordinal. Then, as before, one may show that $p_{\alpha +1}$ is strictly greater than $p_{\alpha }$. Thus, there are at least as many elements in the complete free lattice as there are ordinals, and thus, the complete free lattice cannot exist as a set, and must therefore be a proper class.