Book1 PDF
Book1 PDF
Book1 PDF
Lattice theory
1.1
1.1.1
Partial orders
Binary Relations
A binary relation R on a set X is a set of pairs of elements of X. That is, R X 2 . We write xRy as a
synonym for (x, y) R and say that R holds at (x, y). We may also view R as a square matrix of 0s and
1s, with rows and columns each indexed by elements of X. Then Rxy = 1 just when xRy.
The following attributes of a binary relation R in the left column satisfy the corresponding conditions on
the right for all x, y, and z. We abbreviate xRy and yRz to xRyRz.
(xRy)
xRx
(xRx)
xRy x = y
xRyRz xRz
xRy yRx
xRyRx x = y
xRy
empty
reflexive
irreflexive
identity
transitive
symmetric
antisymmetric
clique
For any given X, three of these attributes are each satisfied by exactly one binary relation on X, namely
empty, identity, and clique, written respectively , 1X , and KX . As sets of pairs these are respectively
the empty set, the set of all pairs (x, x), and the set of all pairs (x, y), for x, y X. As square X X
matrices these are respectively the matrix of all 0s, the matrix with 1s on the leading diagonal and 0s off
the diagonal, and the matrix of all 1s.
defined by xRy y Rx.
This
Each of these attributes holds of R if and only if it holds of its converse R,
extends to Boolean combinations of these attributes, those formed using and, or, and not, such as
reflexive and either not transitive or antisymmetric. For example we will be defining certain concepts such
as partial order and equivalence relation, via such Boolean combinations, mainly using and. Thus if R is
and similarly for the other concepts we define. This is the Duality Principle. Its
a partial order so is R,
importance will emerge gradually as we make use of it.
When X is empty so is X 2 , whence there is only one binary relation on X, namely the empty relation. Now
all the attributes listed above are universal in the sense that the variables in their definitions are universally
quantified: for all x, y, z; none are existentially quantified, as in there exists w. By convention, when X
1
is empty a universal statement about X is true; we say it holds vacuously. Hence the single binary relation
on the empty set enjoys all of these attributes.
2
1.1.2
Preorders
A preorder or ordered set is a pair (X, ) where X is a set and is a reflexive transitive binary relation
on X. A partial order is an antisymmetric preorder. An equivalence relation is a symmetric preorder.
A familiar example of a preorder is given by the set of points in the line together with the binary relation
left-of. This relation is certainly not symmetric. However it is antisymmetric, and hence a partial order,
since two distinct points cannot both be left of each other.
We may make this example more general by taking instead the set of points in the plane, still ordered by
the binary relation left-of. We consider vertically aligned points to be left of each other. This relation is still
not symmetric, but now it is not antisymmetric either.
The relation of being vertically aligned is an equivalence relation.
The relation of being strictly to the left of is an irreflexive transitive relation.
The identity relation 1X and the clique KX are both preorders. Other names for 1X are equality, =, and
the discrete order, while KX is called the codiscrete or chaotic order. The empty relation however is
not a preorder because it is not reflexive, unless X is empty.
There are four reflexive binary relations on a doubleton, corresponding to the four subsets of the two pairs
(0, 1) and (1, 0), since reflexivity requires the other two pairs. All four of these reflexive relations are
transitive, giving four ways to preorder a doubleton.
In order to find a reflexive relation that is not a preorder we require 3 elements. The relation R on {0, 1, 2}
satisfying only 0R0R1R1R2R2 (5 pairs) is reflexive but not transitive.
Each of the set of integers, the set of rationals, and the set of reals forms a partial order under their usual
ordering.
Any set of subsets of a set, ordered by set inclusion, forms a partial order. For if X Y X then for every
element x, x X iff x Y , whence X = Y .
The natural numbers ordered by the relation x|y, defined as y = zx for some natural number z, is a partial
order with least element 1 and greatest element 0.
Finite partial orders are conveniently depicted as Hasse diagrams. This is a two-dimensional representation
of a directed acyclic graph all of whose edges are drawn without arrowheads but which are assumed to be
directed upwards.
1.1.3
Suborders
(X, ) is a suborder of (Y, 0 ) when X Y and is the restriction of 0 to X. That is, for all x, x0 X,
x x0 if and only if x 0 x0 .
The set (Z, ) of integers with their usual order is a suborder of the set (R, ) of reals with their usual order.
Any set of subsets of X ordered by inclusion is a suborder of the power set of X ordered by inclusion.
The properties of reflexivity, irreflexivity, transitivity, symmetry, antisymmetry, and cliquehood are all preserved by suborders. That is, if a preorder is reflexive so are its suborders, and so on. Hence any suborder
of a preorder is a preorder, any suborder of a partial order is a partial order, and similarly for equivalence
relations.
1.1.4
Direct Products
The direct product (X, ) of a pair ((Y1 , 1 ), (Y2 , 2 )) consists of the set X of all pairs (y1 , y2 ) such that
y1 Y1 and y2 Y2 , and ordered by such that (y1 , y2 , ) (y10 y20 ) just when y1 1 y10 and y2 2 y20 .
For example the direct product (R, )2 of the ordered set of reals with itself is the real plane ordered so that
any two points p and q satisfy p q just when p is below and to the left of q. The direct product of the unit
interval [0, 1] with the set of all reals is a strip in the plane of unit width or height (depending on which axis
we associate each of the two sets with), ordered as for (R, )2 .
For an arbitrary index set I, (X, ) is the direct product of the family (Yi , i )iI when X is the cartesian
product of (Yi )iI and x x0 just when xi i x0i for all i I.
1.1.5
Monotone functions
Given two preorders (X, X ) and (Y, Y ), a function f : X Y is called monotone when x X x0 implies
f (x) Y f (x0 ).
The squaring function on the natural numbers is monotone with respect to their usual order, as can be
inferred from the nonnegative slope of its graph. However the squaring function on the integers is not
monotone, since for example we have 2 1 but not (2)2 (1)2 . This is clear from the negative slope
of x2 for x < 0.
The identity function on any preorder, defined as f (x) = x, is monotone. So is any constant function.
Given three sets X, Y , and Z and functions f : X Y , g : Y Z, the composition g f : X Z of g
with f satisfies (g f )(x) = g(f (x)). Sometimes g f is written as f ; g.
It can be seen that the composition of monotone functions is a monotone function.
Two monotone functions f : X Y and g : Y X form an isomorphism pair when g f = 1X and
f g = 1Y . When there exists such an isomorphism pair between X and Y we say that X and Y are
isomorphic. Isomorphism of preorders (X, ) and (Y, ) formalizes the intuitive idea that the two orders
are identical except for the choice of underlying sets.
For example the ordered sets (Z, ) and (Z, ) consisting of the integers ordered in each direction are
isomorphic, with the isomorphism given by negation, and more generally by any function fn : Z Z defined
as fn (x) = n x.
1.1.6
Cliques
A clique of a preorder P is a suborder of that preorder that is a clique. A maximal clique P is one that is
not a proper subset of any clique of P .
The skeleton of a preorder P is the partial order whose elements are the maximal cliques of P . (This term
is borrowed from category theory.)
We shall call an endoskeleton of a preorder P a suborder of P consisting of one element from each maximal
clique of P .
Cliques carry no more information than their underlying sets, and every preorder can be represented as a
partially ordered set of cliques. Up to isomorphism therefore, a preorder can be represented as a partially
ordered set labeled with numbers, each label giving the cardinality of its associated clique. To be more
precise the numbers should be cardinals, since they may be infinite.
1.1.7
Chains
Elements x and y are comparable in a preorder when either x y or y x, and otherwise are incomparable.
The binary relation of comparability may be seen to be reflexive and symmetric but not in general transitive.
A chain or linear order or total order is a partial order in which all pairs of elements are comparable.
A preorder (Y, 0 ) augments (X, ) when Y = X and x y implies x 0 y. Hence a chain can be described
as a partial order with no proper augment that is a partial order. (But a chain can always be augmented to
a clique.)
A linearization of a partial order P is a chain augmenting P , i.e. a maximal antisymmetric augment of P .
Theorem 1 Every partial order (X, ) in which x and y are incomparable has an augment in which they
are comparable.
Proof:
Form 0 by adding to all pairs (x0 , y 0 ) for which x0 x and y y 0 . The result contains (x, y)
since x x and y y. It remains reflexive since nothing is removed. It is transitive because for any triple
x0 0 y 0 z, where x0 0 y 0 is one of the added pairs, we have y y 0 z whence (x0 , z) will also have been
added, and similarly for z x0 0 y 0 . It is antisymmetric because if x0 0 y 0 0 x0 then y y 0 0 x0 x
contradicting incomparability of x and y. Hence it is a partial order extending (X, ) and containing (x, y).
Even though in some cases we may have added infinitely many pairs by this construction merely to get x y,
the construction is actually minimal: it yields the least augment of P for which x y in that augment. For
if x0 x and y y 0 , then in any augment of P containing x y must contain x0 y 0 , by transitivity.
A maximal chain of a partial order is one such that every element not in the chain is incomparable with
some element of the chain.
Kuratowskis Lemma. Every partial order contains a maximal chain.
This is one of a number of equivalent forms of the Axiom of Choice. Another form is that for every set X
of disjoint nonempty sets there exists a set Y such that for every set Z X, Y Z is a singleton. (Thus
Y chooses a representative of each set in X.) A closely related form is that the cartesian product of a
family Xi of nonempty sets is nonempty. Hence there exists an I-tuple in the product, which makes a choice
of an element from each Xi . Yet another form is that every set can be well-ordered. (An ordered set is
well-ordered when every suborder has a least element.)
The proposition of exercise 8 at the end of the section is also often referred to as Kuratowskis Lemma; the
two are close enough that little harm can result from using the same name for both.
These alternatives can all be derived from each other, so the question of which to take as the the Axiom
of Choice is arbitrary. A reasonable choice is whichever one seems either the most or least obvious to you,
depending on whether you are for or against it.
Our next mission is to show that every partial order has a linearization. The following notions will be helpful
here.
S
S
Given a family (X, i )iI of preorders on a fixed set X, its union (X, i i ) is defined so that x( i i )y
just when there exists i I for which x i y. This is the ordinary notion of union applied to the i s
regarded as subsets of X 2 .
Lemma 2 If the family (X, i )iI forms
a chain under augmentation (that is, for every pair i , j one is
S
a subset of the other), its union (X, i i ) is a partial order.
(It is important to realize that there are two levels of partial ordering here: we are partially ordering partial
orders, and the elements of the chain in the lemma are themselves partial orders (X, i ).)
S
Proof:
Abbreviate i i to just . Every i is reflexive whence so is . For transitivity suppose
x y z. Then x i y j z for some i and j. Let 0 denote whichever of i and j augments the other.
Then x 0 y 0 z, whence x 0 z, whence x z. For antisymmetry, suppose x y x. Then by the same
reasoning as for transitivity we have x 0 y 0 x, whence x = y.
Theorem 3 (AC) Every partial order (X, ) has a linearization.
(The (AC) is shorthand for Assuming the Axiom of Choice, .)
Proof:
Take the set of all partial orderings of X, ordered by augmentation, and take a maximal chain
containing the given partial order, possible by Kuratowskis Lemma. By the preceding lemma the union of
this chain is a partial order. By the previous theorem, if any two elements are incomparable in this order
then the order may be extended, contradicting its maximality. Hence it is linear.
Theorem 4 (AC) Given any two incomparable elements of a partial order, there exist linearizations of the
order containing these elements in either order.
Proof:
Use the above two theorems, first to extend the partial order in each of the two ways in which
x y and y x, and then to extend the results to two chains.
Corollary 5 (AC) The intersection of the set of linearizations of a partial order is that partial order.
1.1.8
Exercises
1. For each of the attributes empty, reflexive, irreflexive, identity, symmetric, antisymmetric, and clique,
give an expression in n for the number of binary relations on X having that attribute.
2. For each attribute listed above determine the size of the smallest X such that (i) for every attribute
above there exists a relation on X satisfying but not ; (ii) there exists a relation R on X such that X
satisfies but no other attribute on the list.
3. For any set X, show that the partial orders on X are in 1-1 correspondence with the irreflexive transitive
binary relations on X.
4. Formalize and prove the statement that a preorder partially orders its maximal cliques.
5. Show that every endoskeleton of a poset P is isomorphic to the skeleton of P .
6. Show that a partial order is a chain just when its complement is transitive.
7. Show that any two finite chains of the same cardinality are isomorphic. (In contrast it can be shown that
there are uncountably many nonisomorphic linear orderings of a countably infinite set. Of these, only four
are dense (between every two elements lies another), distinguished by whether they have a least and/or a
greatest element.)
8. (Kuratowskis Lemma) Show that every chain in a partial order extends to a maximal chain. (That is,
every partial order contains a maximal chain having a specified subchain.)
9. Show that union of binary relations preserves reflexivity and symmetry, but not in general transitivity or
antisymmetry.
1.2
Lattices
1.2.1
Bounds
Let (X, ) be a poset. We say that an element x X is an upper bound of a subset Y X, or that x
bounds Y from above, when for all y Y , y x. The dual notion is lower bound : x bounds Y from
below when x y for all y Y . By the Duality Principle everything we have to say below about upper
bounds applies equally well, with in place of , to lower bounds.
The least upper bound (lub) of Y , also called supremum (sup), is that upper bound of Y which is less or
equal to every upper bound of Y . A set Y need not have a sup, for example the set of integers in the real
line, or for that matter the line itself.
However when the sup does exist it is unique. For if x and x0 are both upper bounds then in order for them
to both be least we must have x x0 and x0 x, whence x = x0 by antisymmetry.
The sup of a set may or may not belong to the set. For example the closed interval [0, 1] of reals contains
its sup, namely 1, whereas neither the open interval (0, 1) nor the half open interval [0, 1) contain their sup,
which again is 1 in each case.
The dual notion to least upper bound is greatest lower bound (glb), or infimum (inf).
1.2.2
Semilattices
First definition. A semilattice is a partial order (X, ) in which every doubleton {x, y} has a least upper
bound, denoted x y and called the join of x and y. Even though the relation is partial (i.e. not linear
as an order), the operation is total (x y is well-defined for all elements x, y of X).
With this definition there is a dual notion, that of lower semilattice (so semilattice in the above means
upper semilattice), in which every doubleton has a greatest lower bound, denoted x y and called their
meet.
Examples.
1. Any chain forms both an upper and a lower semilattice, with x y being the max (larger) of x and y and
x y being their min (smaller).
2. The power set of a set, ordered by inclusion, forms an upper semilattice with as union, and a lower
semilattice with as intersection.
3. The set of all strings over some alphabet, ordered by the prefix relation (x xy for all strings x, y), forms
a lower semilattice, x y being the longest common prefix of strings x and y. It does not however form an
upper semilattice: if x and y do not stand in the prefix relation then they have no upper bound at all, let
alone a least such.
4. Here are all the posets (up to isomorphism) with at most 3 elements, marked U if an upper semilattice
and L if a lower.
1.2. LATTICES
U L
UL
UL
@
@ U
@
@ L
UL
(The empty set is vacuously both an upper and lower semilattice, and likewise the singleton, almost as
vacuously.)
We may define in terms of via the following equivalence.
xy z
iff
x z and y z
(1.1)
When this equivalence is satisfied, we deduce that x y is a common upper bound of x and y by setting
z = x y, thereby satisfying the left hand side and hence the right. We deduce that it is the least upper
bound by taking z to be any common upper bound of x and y, thereby satisfying the right hand side and
hence the left.
Exercise 1 below asks you to show that the equational theory of a semilattice includes the equations x (y
z) = (x y) z (associativity), x y = y x (commutativity), and x x = x (idempotence).
Second Definition. A semilattice (X, ) is a pair consisting of a set X and a binary operation which is
associative, commutative, and idempotent.
This is our first example of an algebra. An algebra is defined to consist of a set and operations of various
arities on that set.
With this definition there is no classification of semilattices into upper and lower, only a pure notion of
semilattice. Changing the notation to (X, ) does not change the concept, only the symbol.
But then we may define in terms of by defining x y as x y = y. Exercise 2 asks you to show that
so defined is a partial order, and that Equation 1.1 then gives back the binary operation we started with.
Here the opportunity arises for duality to enter: we could just as well have defined x y as x y = x,
although for sanity we would then have either written the given operation as or the resulting relation as
x y.
1.2.3
Lattices
1.2.4
Distributive Lattices
A lattice of fundamental importance is the two-element chain (2, , ). It is the only two-element lattice.
This lattice features prominently in logic as the lattice of truth values.
The equational theory of the two-element lattice goes beyond that of lattices, for it includes the distributivity law
x (y z) = (x y) (x z).
A distributive lattice is a lattice satisfying this law.
Despite the 19th century logician Peirces conviction otherwise, not every lattice is distributive. The canonical
counterexamples are the following two lattices, labeled to indicate the breakdown.
@
x y @ z
@
@
@
@ x
y
A
z
A
A
Although (x y) (x z) x (y z) holds in these examples, and indeed in every lattice (Exercise 4),
(x y) (x z) x (y z) fails in both.
It is natural to ask whether there are yet more laws to be discovered for (2, , ). The answer is that we
now have a complete axiomatization: the theory of (2, , ) is just the theory of distributive lattices. Before
stating and proving this theorem we first define some auxiliary notions.
Define a lattice term over a set V of variables to be a finite binary tree1 whose leaves are labeled with
variables from V and whose remaining nodes are labeled with or .
An order filter of a poset (X, ) is a subset Y X such that for all y Y and x X, if y x then
x Y . (The dual notion is order ideal .) An order filter is proper when it is a proper subset of X, i.e. not
X itself, and is principal when it has a least element.
To each nonempty proper2 order filter A of the poset (2V , ) (the set of all subsets of V ordered by inclusion)
associate a term formed as a join of meets, called a normal term.3 For each element of A, a nonempty set
of variables since A is proper, form the meet of those variables. Then form the join of all those meets, of
which there is at least one since A is nonempty.
This specification determines the term only up to associativity and commutativity of its operations.4 Since
these remaining choices do not affect the value of the term we may safely dispense with a more detailed
specification and simply regard normal terms as only being defined up to associativity and commutativity.5
In any lattice L the normal term associated to A denotes the function LV L obtained from an assignment
of elements of L to variables (i.e. an element of LV ) by evaluating the term. On reflection one sees that for
1 In the sense of a parse tree, i.e. these are trees having a root node, with all edges directed away from the root, and the
order of the immediate descendants of each node matters.
2 When working with lattices with a constant 0 denoting the least element we allow the empty filter as well. Independently,
in the presence of a constant 1 denoting the greatest element we also allow the improper filter.
3 Some readers will recognize this as disjunctive normal form with the additional requirement that the set of disjunctions is
closed under conjoining disjuncts with variables.
4 Idempotence however is catered for, namely by by working with subsets of V and 2V rather than multisets.
5 Had we insisted on a specific term we could alphabetize the variables within each meet, and then put the meets in a suitably
defined lexicographic order, and associate each meet and the join say to the left, at the expense of pointlessly longer arguments.
1.2. LATTICES
the lattice (2, , ) this function is the characteristic function of the given order filter A, i.e. the function
from 2V to 2 which is 1 on the members of A and 0 on the nonmembers.
n
Another name for order filter of 2V is monotone V -ary Boolean operation. With n = |V | there are 22
n-ary Boolean operations. The fraction of these which are monotone, for n from 1 to 7, is 3/4, 6/16, 20/256,
168/65536, 7581/4294967296, 7828354/18446744073709551616, and 2414682040998/340282366920938463463
374607431768211456. While the denominators are easily enumerated, having a simple closed form, the
paradoxically harder task of enumerating the smaller numerators goes by the name of Dedekinds problem.
There being two constant functions of each arity, we must subtract 2 from each numerator for the case at
hand of distributive lattices without constants.
Lemma 6 The normal terms are in bijection with the nonconstant monotone Boolean operations.
Proof:
This follows directly from the fact that a normal term denotes the monotone function that
produced it, and from the definition of normal term as that produced by a nonconstant monotone function,
i.e. nonempty proper order ideal, from 2V to 2.
Lemma 7 Every lattice-theoretic term is equivalent to a normal term, with the equivalence holding in
every distributive lattice and hence being an equation of the theory of distributive lattices.
Proof: We begin by pushing down the s. Choose any subterm of of the form x (y z) such that
x does not contain subterms of that form (otherwise we would choose the latter subterm), and rewrite it as
(xy)(xz). This transformation is justified by the distributivity law in the sense that, for any distributive
lattice L and any assignment of elements of L to variables of , the transformation leaves unchanged the
value of every subterm. (While this should be intuitively clear just by reflecting on how evaluation works, a
formal proof would proceed by induction on the height of subterms starting from the variables, whose values
the transformation leaves unchanged.)
Now define an inversion of to be a pair consisting of an occurrence of a above an occurrence of a
in the parse tree of , not necessarily immediately above. A rewriting step of the above kind eliminates the
inversion at the top of the rewritten subterm, and creates no new inversions. (Although x is duplicated it
contains no inversions, and although the is duplicated no inversion associated with that is duplicated.)
Hence this transformation can be repeated only as many times as there were inversions in at the outset.
The result of so transforming exhaustively is a term of the form (1 , . . . , k ) where the operations of
are all and those of the i s are all .
Duplicate variables within each meet may now be eliminated by associativity and commutativity to bring
the duplicates together. and then eliminating them using idempotence of . The same technique permits
duplicate meets to be eliminated.
We now have a subset of 2V which we must make an order filter. If there exists a meet i and a variable
p of such that i p 6= j for any j k, then expand the set of s by taking k+1 = i p. This step
is justified by x = x (x y) with x = i and y = p, and we say that i subsumes i p. Iterate until
the set is closed under conjunction with variables of . The result is now a normal term equivalent in every
distributive lattice to the one we started with.
We now have enough ammunition to make short work of the theorem promised at the beginning of this
section.
Theorem 8 The equational theory of 2 is that of distributive lattices.
Proof:
It suffices to show that every equational property of 2 holds in an arbitrary distributive lattice.
Now for = to hold in 2 is the same thing as saying that they denote the same monotone Boolean formula.
10
But then by Lemma 7 they are equivalent in every distributive lattice to a common normal term, and hence
to each other.
1.2.5
Exercises
1. Show that the operation defined by Equation 1.1 is commutative, associative, and idempotent.
2. (i) Given an associative commutative idempotent binary operation , show that the binary relation x y
defined by x y = y is a partial order. (ii) Show that plugging this partial order into Equation 1.1 yields
the given .
3. Give an example of an algebra (L, , ) satisfying associativity, commutativity, and idempotence of both
operations and the first absorption equation but not the second.
4. Express the inequality (x y) (x z) x (y z) as an equation. Show that the inequality (and hence
the equation) holds in every lattice.
5. Show that a lattice is distributive if and only if it satisfies x (y z) = (x y) (x z) (the dual
distributivity law).
6. For each of the following subsets of the ordered set (2X , ) indicate whether it is an order ideal and
whether it is an order filter. In each case if it is such then indicate whether it is principal. If the answer
depends on properties of X, say how. (i) All subsets. (ii) The nonempty subsets. (iii) The proper subsets.
(iv) Those subsets containing a given element x. (v) Those subsets not containing a given element x.
1.3
Monoids
A semigroup is a pair (X, ) where X is a set and is an associative binary operation, one satisfying
x (y z) = (x y) z. The operation is generically called multiplication and its result the product of its
arguments.
A monoid is a triple (X, , 1) where (X, ) is a semigroup and 1 is an element of X satisfying 1 x = x = x 1.
We call 1 the identity of the monoid.
A group G is a monoid such that for every x G there exists y G, called the inverse of x, satisfying
x y = 1 = y x. This condition uniquely determines the inverse of x, for if x has two inverses y and y 0 , we
have y = y 1 = y x y 0 = 1 y 0 = y 0 .
A commutative monoid satisfies x y = y x. Commutative groups are called abelian.
Examples
1. Any singleton {x} with a binary operation and a constant trivially forms a one-element semigroup,
monoid, and group, and abelian at that.
2. The triple (N, +, 0) of natural numbers with the addition operation + and the additive identity 0 forms
a commutative monoid.
3. The triple (Z, +, 0) of integers forms an abelian group.
4. Both (N, , 1) and (Z, , 1) are monoids, but neither is a group. However (Q {0}, , 1), the nonzero
rationals under multiplication, is an abelian group.
5. (Zn , +, 0) is the abelian group of integers modulo n.
6. The set X of all finite strings over a set X (the alphabet of X ) forms a monoid under concatenation of
strings with identity element the empty string. It is commutative just when X has at most one element, in
which case it is (isomorphic to) (N, +, 0).
1.3. MONOIDS
11
7. The set F of all functions f : A A forms a monoid under function composition, with the identity
function providing the identity.
8. For n 1, the set of all n n integer-valued matrices forms a monoid under matrix multiplication, with
the n n identity matrix Inn as the monoid identity.
9. The set of all functions on the reals, under addition of functions defined by (f + g)(x) = f (x) + g(x), with
the constantly zero function as identity, forms a commutative monoid.
Monoids are not the exclusive domain of the mathematician. Here is a basic example from electrical engineering.
Suppose we have inexhaustible supplies of each of several types of electronic black boxes each having a male
connector at one end and a matching female connector at the other end, with all male connectors being
identical and likewise for the female. Associated with each type of box is its behavior, defined in some
way. We may plug these boxes together (in a straight line - no loops allowed) to form assemblies which
also have certain behaviors. This determines an operation xy on behaviors, such that xy is the behavior of
the assembly obtained by plugging the output of an assembly with behavior x into the input of one with
behavior y.
The order in which the two connections are made when building a three-box assembly does not matter
to build xyz you can start with either xy or yz. This shows that the operation is associative and hence that
the set M of all behaviors obtainable in this way form a semigroup. Treating the absence of boxes as an
assembly, M is a monoid.
1.3.1
Submonoids
Given a monoid M = (X, , 1), we say that a subset Y of X is closed when it contains 1, and for all y, y 0 in
Y , y y 0 is also in Y . Let Y : Y 2 Y be the binary operation on Y satisfying y Y y 0 = y y 0 for all y, y 0 in
Y ; call Y the restriction of to Y . Then (Y, Y , 1) must be a monoid. For if not it must violate one of the
three monoid equations, but then M would violate that equation with the same values for the variables of
that equation.
We call such a (Y, Y , 1) a submonoid of (X, , 1).
For example the monoid (N, +, 0) of natural numbers under addition is a submonoid of the monoid (Z, +, 0)
of integers under addition.
The monoid of all functions f : A A, denoted AA , yields many examples of useful submonoids: its
injections, its surjections, its bijections (constituting the largest submonoid of AA that is a group), its
continuous functions (defined for an appropriate topology on A), its monotone functions (when A is partially
ordered), and so on. In turn AA is itself a submonoid, namely of the monoid of all binary relations on A
under composition of binary relations.
The monoid (Zp , , 1) of integers modulo a prime p under multiplication has a submonoid forming an Abelian
group, obtained simply by omitting 0.
Related notions are subsemigroup and subgroup. A subsemigroup of a semigroup is a subset of the semigroup
closed under the operation of the semigroup. A subgroup of a group is a nonempty subset of the group closed
under both the unary and binary operations of the group (and hence containing the identity).
The union of two submonoids of M need not be a monoid. For example consider the submonoid of (N, +, 0)
consisting of all even numbers, and that consisting of all multiples of 3. Their union contains 2 and 3 but
not 5 and hence is not a submonoid of (N, +, 0).
Intersection however is better behaved.
12
Proof:
For any k-ary operation fj and elements x1 , . . . , xk in the intersection, fj (x1 , . . . , xk ) must be in
every submonoid in S, whence it must be in the intersection.
V
It followsWthat the submonoids of an algebra formW a complete lattice, with
provided by intersection.
However
is not union. Let us now see just what is.
A subset Y of a monoid M is said to generate M when M has no proper submonoid which includes Y .
For example (N, +, 0) is generated by {1}. Furthermore any set of generators of (N, +, 0) must contain 1,
since omitting 1 yields a proper submonoid.
Proposition 1 Let M = (X, , 1) be a monoid, and let Y be a subset of X. Then M0 = (Z, 0 , 1) is a
submonoid of M generated by Y if and only if M0 is the intersection of all submonoids of M containing Y .
Proof:
(If) Y is a subset of M0 because the intersection of a set of sets each including Y must itself
include Y . M0 is an intersection of submonoids and hence a submonoid. So no proper submonoid of M0
can include Y , whence M0 is generated by Y .
(Only if) If M0 is a submonoid of M generated by Y , and M00 is a submonoid of M including Y , then
the intersection of M0 and M00 is a submonoid of them both and including Y . But M0 has no such proper
submonoids, whence the intersection is M 0 , making M0 a submonoid of M00 . Hence M0 is a submonoid of
every submonoid of M including Y , and hence must be the intersection of the set of such.
Another way to say this is that Y generates the least submonoid of M that includes Y . It can be seen that
there is exactly one submonoid of M generated by any given subset Y of M.
Instead of forming the submonoid generated by Y as an intersection, we may form it as a union as follows.
Given a monoid M = (X, , 1), let FM : 2X 2X be defined by FM (Y ) = Y {1} {y y 0 | y, y 0 Y }.
Thus FM (Y ) consists of the elements of Y together with 1 and those elements that can be formed from
i
(Y ) = F (F (. . . F (Y ) . . .)) (FM repeated i times), and
elements of Y via
of . Define FM
S one application
i
define FM (Y ) = i1 F (Y ).
Thus FM
(Y ) consists of those elements of the monoid representable as a finite product of elements of Y ,
including Y itself and the empty product 1.
i
Proof:
Any two elements y, y 0 in FM
(Y ) must be in FM
(Y ) for some i, whence y y 0 is in FM
(Y ) and
includes Y since FM (Y ) does. Thus FM (Y ) is a monoid including Y . Now for any submonoid M M
i
that includes Y we have FM (Y ) FM (M 0 ) = M 0 , and by induction FM
(Y ) M0 for all i 1. Hence
0
1.3.2
Direct Products
The direct product (X1 , 1 , 11 ) (X2 , 2 , 12 ) of two monoids is (X1 X2 , , (11 , 12 )) where : (X1 X2 )2
X1 X2 is a binary operation defined as (x1 , x2 ) (y1 , y2 ) = (x1 1 y1 , x2 2 y2 ).
It can be seen that (11 , 12 ) is the identity for . Furthermore is associative. For if it were not then
associativity would fail in in either coordinate 1 or 2, whence associativity would fail for the corresponding
monoid, a contradiction. Hence the direct product of two monoids is itself a monoid.
1.3. MONOIDS
13
For example the direct product of the monoid (N, +, 0) with itself yields the lattice points (points with integer
coordinates) of the upper right quadrant of the plane, under the operation of vector addition ((x, y)+(x0 , y 0 ) =
(x + x0 , y + y 0 )), with identity the origin. With R in place of N we obtain the whole quadrant.
Direct product generalizes
to an arbitrary family straightforwardly.
Q
(Xi , i , 1i )iI is ( iI Xi , , 1) where (x y)i = xi i yi and 1i = 1i .
That is, the direct product of a family has for its underlying set the cartesian product of the family of
underlying sets, and is equipped with a binary operation which acts as i in the i-th coordinate and a
constant 1 which acts as 1i in the i-th coordinate.
The direct product of semigroups and groups is defined similarly. The direct product of a family of semigroups
is as for monoids but with the identity (1i )iI omitted. The direct product of a family of groups is as for
1
monoids but with an inverse operation defined as (xi )1
iI = (xi )iI .
1.3.3
Monoid Homomorphisms
A monoid homomorphism from (X, X , 1X ) to (Y, Y , 1Y ) is a function f : X Y such that (i) f (xX x0 ) =
f (x) Y f (x0 ) for all x, x0 X, and (ii) f (1X ) = 1Y . The second condition is omitted for semigroup
homomorphisms. A group homomorphism is just a monoid homomorphism, in which case it automatically
satisfies the condition h(x1 ) = h(x)1 , since h(x)h(x1 ) = h(xx1 ) = h(1) = 1 whence h(x1 ) = h(x)1 .
Monoid homomorphisms, or just homomorphisms in this chapter, are traditionally referred to as linear
functions.
The function h : (N, +, 0) (Zn , +, 0) defined as h(m) = mmodn is a homomorphism, as is h : (Z, +, 0)
(Zn , +, 0) defined similarly.
Consider (RR , +, 0), the monoid under addition of all functions on the reals. The derivative operator on
the submonoid consisting of the differentiable such functions is a homomorphism, since d(f + g)/dx =
df /dx + dg/dx and d0/dx = 0.
The identity function on a monoid M is trivially a monoid homomorphism.
The restriction of the identity function to a submonoid M0 of M is an injective homomorphism from M0
into M, called the inclusion of M0 into M.
The function 1 : M N M defined as 1 ((x, y)) = x is a homomorphism, called the first projection
of M N onto M. The second Q
projection 2 : M N N is defined similarly as 2 ((x, y)) = y. More
generally the i-th projection i : iI Mi Mi is defined as i (x) = xi .
Whereas inclusions are injective, projections are surjective.
An isomorphism of monoids is a bijective homomorphism. When there exists an isomorphism between
two monoids we say that they are isomorphic. An isomorphism of a monoid onto itself is called an
automorphism.
1.3.4
xy =x y .
For example the identity relation (x
= y implies x = y) and the complete relation (x
= y always) are
semigroup congruences on any semigroup. The relation x = 0 = y or x 6= 0 6= y (an equivalence relation
with two classes, {0} and the rest) is a congruence on (N, +) but not on (Z, +) since 1
6 1+1.
= 1 but 1+1
=
The relation same parity (both even or both odd) is a congruence on both (N, +) and (Z, +).
14
An equivalence relation on a set X partitions X into blocks called equivalence classes. When the equivalence relation is a congruence the blocks are called congruence classes. We write [x]
= for the congruence
class containing a specified element x.
The congruence classes of a semigroup S = (X, ) forms a semigroup under the operation 0 defined by
[x] 0 [y] = [x y], called the quotient of S by
=, written S/
=. The definition of a congruence ensures that
0
is well-defined in that it does not depend on the choice of representative x of the class [x]: any other y in
the same class would yield the same result.
A quotient of a monoid is a monoid, with identity [1]. A quotient of a group is a group, with identity [1] and
an inverse [x]1 = [x1 ] for each class [x].
The kernel of a homomorphism h : M N, written kerh, is the binary relation
= on XM defined by x
=y
just when h(x) = h(y).
Proposition 3 A binary relation on XM is a congruence on M just when it is the kernel of a homomorphism
f : M N for some N.
Proof:
It can be seen that the kernel of a homomorphism is a congruence. Conversely any congruence
determines a quotient, whose kernel is that congruence.
to be a semigroup of equivalence classes. The function h : S S/
We have defined the quotient S/ =
=
defined by h(x) = [x] can be seen to be a homomorphism, which we also refer to as a quotient when there
is no ambiguity. Note that such a quotient is always surjective.
A congruence x
= y being the set of pairs (x, y) for which x
= y, the intersection
=1
=2 of two congruences
and
on
a
semigroup
S
then
has
the
property
that
x(
)y
holds
just
when
x
=1
=2
=1 =2
=1 y and x
=2 y.
Proposition 4 The intersection of two congruences is itself a congruence.
2 y y 0 .
1 y y 0 and similarly x x0 =
Proof:
If x(
=1
=2 )y, then x
=1 y and x0
=1 y 0 , whence x x0 =
0
0
Hence x x (=1
=2 )y y .
This generalizes immediately to the intersection of any family (
=i )iI of congruences on a semigroup S.
1.3.5
Ideals
We have already encountered ideals in the context of ordered sets. Essentially the same notion arises for
semigroups and monoids, though the following elementary definition does not make this connection apparent.
An ideal of a semigroup S = (X, ) is a nonempty subset Z X such that for all z Z and x X, x+z Z
if and only if x Z, and z + x Z if and only if x Z.
The if direction of the definition ensures that every ideal of S is a subsemigroup of S. The only if
direction however rules out some subsemigroups. For example the subsemigroup of (N, +) omitting just 1 is
not an ideal because 2 Z and 2 + 1 Z but 1 6 Z.
The semigroup X of strings on X has two extremal ideals, the singleton {} and X itself. In between
there is for each n the ideal In consisting of all strings of length a multiple of n. There is also for each subset
Y X the ideal Y of all strings on Y .
Theorem 10 If Z and Z 0 are ideals of S so is Z Z 0 .
T
Proof:
x i Zi iff i[x Zi ] iff i[(x + z Z and x Z Z 0 iff [x Z and x Z 0 ] iff [x + z Z and
x + z Z 0 ] iff x + z Z Z 0 .
1.3. MONOIDS
This generalizes immediately to the intersection
15
T
The ideal generated by a subset X of a semigroup S is the least ideal of S containing X. The above
theorem ensures that the least such ideal exists, namely the intersection of those ideals containing X.
The following observation relates semigroup ideals to congruences and to ideals in other structures besides
semigroups.
Proposition 5 Z is an ideal of S = (X, ) if and only if it is the inverse image of the identity 1 of a monoid
M under a semigroup homomorphism h : S M.
Proof:
(If) Let Z = h1 (1). Let z Z and x X. Then h(x z) = h(x) h(z) = h(x), so x Z iff
x z Z.
y iff there exist z, z 0 Z such that x z = y z 0 , making
(Only if) Let Z be an ideal of S. Define x =
=a
congruence. Now for any x X and z Z, [x] + [z] = [x + z] = [x], whence the quotient S/
= is a monoid
with identity [z] = Z. Hence Z is the inverse image of [z] under this quotient.
We may now make the connection with order ideals. Recall that an order ideal of an ordered set (X, ) is
the inverse image of the least element of a partial order (Y, ) under a monotone function f : X Y . The
least element plays an analogous role to that of the monoid identity. Note that X need have neither a least
element nor be antisymmetric; the notion of order ideal is defined for any ordered set. By the same token,
the notion of monoid ideal does not depend on the identity of the monoid, and could have been defined more
generally for any semigroup.
A principal ideal of a monoid M is an ideal generated by a single element of M.
Theorem 11 (Principal Ideal Theorem for Z.) Every ideal I in (Z, +, 0) is principal.
Proof:
If I contains only one number it must be 0, which then generates I. Otherwise, let x < y be two
consecutive numbers in I as close together as any pair in I. From x
= y and y x
= y x we infer y
= 2y x,
whence 2y x is also in I, and more generally I must contain x + n(y x) for all n Z, an arithmetic
progression infinite in both directions. There is now no room in I for additional numbers without violating
the hypothesis that x and y are as close as any pair in I. That I contains 0 determines the alignment of this
progression, which can then be seen to consist of all multiples of y x. Hence y x generates I.
1.3.6
Exercises
congruence containing 2 = 5? What are the corresponding answers for (Z, +)? (Remember 1
= 1).
7. Show that for any natural number n, the binary relation x is congruent to y mod n, defined as
ab[x + an = y + bn], is a congruence on any submonoid of (Z, +, 0), in particular on (N, +, 0).
16
8. Show that in X each of the following three relations between strings x and y is a congruence: of equal
length; agree in their first n symbols; contain the same number of occurrences of each symbol.
9. Given homomorphisms h : M N, h0 : M N0 , define their product h h0 : M N N0 as
(h h0 )(x) = (h(x), h0 (x)). Show ker(h h0 ) = ker(h) ker(h0 ). Generalize to an arbitrary family (hi )iI of
homomorphisms.
10. Show that a subset Z of a monoid M is a submonoid of M if it is an ideal of M, but not necessarily
conversely.
11. Show that a subset Z of a group G is a subgroup of G if and only if it is an ideal of G.
1.4
1.4.1
Closure Systems
A closure system can be defined in terms of either a closure operator or a closure property. Either one
determines the other.
A function f : X X on a poset (X, ) is a closure operator on X when it is monotone, idempotent
(f (f (x)) = f (x)), and increasing (x f (x)).
Examples
2
1. The poset 2X of all binary relations on X has a number of associated closure operators: reflexive
closure, transitive closure, reflexive transitive closure, symmetric closure, and equivalence closure (reflexive,
symmetric, transitive).
2. Existential quantification is a closure operator, in that if (x) (x) then x(x) x(x);
xx(x) = x(x); and (x) x(x).
3. Implication p q and disjunction p q, as a function of q with p held fixed, are both closure operators
since they are clearly monotone and idempotent, and furthermore increasing as q (p q) and q (p q).
A closure property on a partial order X is a subset C X such that for any subset D C, the inf of
D in X belongs to C, i.e. C is closed under infs in X. Since the inf in X of the empty subset must be
the greatest element of X, it follows that any partial order X having a closure property contains a greatest
element 1 and moreover 1 must belong to every closure property on X.
Moreover, all X-infs of subsets of C are also C-infs of those subsets since they are in C, whence C is a
complete semilattice, being closed under C-infs. However C need not even have X-sups (of its subsets), let
alone be closed under them.
Examples The properties reflexive, transitive, and symmetric, as applied to binary relations on a set X, are
2
closure properties on 2X ordered as usual, namely by inclusion. This is because given any set of relations
satisfying one of these properties, the intersection of that set also satisfies that property. The intersection
of the empty set is taken to be X 2 itself, the maximal binary relation, called KX , which satisfies all of these
properties.
Theorem 12 In a complete lattice, closure operators and closure properties are in 1-1 correspondence.
Proof:
The closure property determined by a closure operator is the property of being a fixpoint of the
operator. Conversely the closure operator determined by a closure property is the function mapping x to
the infimum of the set of upper bounds on x in the property.
This theorem motivates the following definition. A closure system is a complete lattice with a closure
operator, or equivalently with a closure property.
17
1.4.2
Galois Connections
Given two posets (X, ), (Y, ), a Galois connection between them consists of two functions f : X Y ,
g : Y X, called polarities, such that for all x X and y Y , y f (x) if and only if x g(y), which we
will call the Galois condition.
Examples
1. The canonical example of a Galois connection is that between sets6 of structures and sets of propositions
given a binary relation s |= p of satisfaction between structures s and propositions p. The theory (C)
of a set C of structures is the set of those propositions satisfied by every structure in C. Conversely the
models M() of a set of propositions consists of those structures satisfying every proposition in .
Here the two posets (more correctly partially ordered sets) consist of the set 2 of all sets of structures and
the set 2 of all sets of propositions, both ordered by inclusion. The two polarities are M : 2 2 and
: 2 2 .
To see that these are polarities, suppose that we have sets C of structures and of propositions. Then both
(C) and C M() are equivalent to the statement, for every structure s C and proposition p ,
s |= p. Hence they are equivalent to each other and thus meet the Galois condition.
2. Another example obtained in essentially the same way starts with a poset (P, ) and takes both X and Y to
be the power set of P , the set of all subsets of P . Given a subset Q P , define L(Q) = {p P |q Q.p q}
and U(Q) = {p P |q Q.q p}. That is, L(Q) consists of all lower bounds of the set Q while U(Q)
consists of all upper bounds. Then for all subsets Q, Q0 of P , we have Q L(Q0 ) iff Q0 U(Q) because
both express q Qq 0 Q0 .q q 0 .
3. The polarities of the previous two examples were obtained from a binary relation in essentially the
same way. Here we give a nontrivially different example. Let bxc denote the greatest integer n such that
x float(n). (We shall be pedantic here and first convert integers to reals via float : Z |R when
comparing them to reals.) This defines an antimonotone function from ( |R, ) to (Z, ) (it would be
monotone had we chosen to order the reals with instead of ). With this ordering, float : Z |R is
also antimonotone. Then we have x float(n) iff n bxc. That is, bc and float() are the polarities
of a Galois connection between ( |R, ) and (Z, ).
4. With ( |R, ) and (Z, ) we obtain essentially the same Galois connection but with de (ceiling) in place
of bc (floor), where dxe denotes the least integer greater or equal to x.
An equivalent formulation of the Galois condition consists of the following three conditions.
(i) Both f and g are antimonotone.
(ii) For all x X, x g(f (x)).
(iii) For all y Y , y f (g(y)).
6 These will usually be proper classes. For simplicity of exposition we blur the usual distinction between class and set in this
section.
18
Theorem 13 The Galois condition holds if and only if conditions (i)-(iii) above hold.
Proof:
(i) Let x x0 in X. Substituting f (x) for y in the Galois condition makes the left hand side true, whence
the right hand side, x g(f (x)), holds for all x X. Hence x0 g(f (x0 )), and therefore x g(f (x0 )). So
by the Galois condition f (x0 ) f (x), that is, f is antimonotone. By symmetry of the two polarities, g is
also antimonotone.
(ii) Substituting f (x) for y in the Galois condition makes it f (x) f (x) if and only if x g(f (x))), whence
(i).
(iii) is argued symmetrically.
(If) Given (i)-(iii) we wish to show the Galois condition. So suppose y f (x) for some x X and y Y .
By (i) g(f (x)) g(y), which with (ii) yields x g(y) giving one half of the Galois condition. The other half
is argued symmetrically.
For the moment the main use we make of this theorem is in the proof of the next very important theorem. We
remark in passing however that it foreshadows its generalization to two equivalent definitions of adjunction,
in the chapter on category theory.
Theorem 14 The composites gf : X X and f g : Y Y of the polarities of a Galois connection are
closure operations.
Proof: The previous theorem established the antimonotonicity of the polarities, whence their composites
are monotone. It also established that x g(f (x)) and y f (g(y)), that is, both composites are increasing.
It remains to show that the composites are idempotent.
In fact we shall show the stronger result that f gf = f , and by symmetry gf g = g.
First, since x gf (x), by antimonotonicity of f we have f gf (x) f (x). Second, by symmetry we have
y f g(y) for all y Y , which is made f (x) f gf (x) by substituting f (x) for y. Combining first and
second then gives f gf (x) = f (x) as promised.
The importance of this theorem is that any notion of satisfaction between models and propositions induces
a corresponding Galois connection, which in turn induces two closure operators. One operator, theory-ofmodels, M, maps any set of propositions to its deductive closure (M()). This is the theory consisting
of all propositions true of every model of . The members of (M()) are called the consequences of .
The other operator, M, maps any set C of structures to what we shall call its homologue closure7 M((C)).
The members of M((C)) are the homologues of C, namely those structures satisfying all the propositions
holding of every structure in C.
For example consider structures of the form (X, , ) where and are arbitrary binary operations on a
set X, and sentences of the form t = u where t, u are terms built from variables using the operation symbols
and . Say that structure s satisfies t = u when for every assignment of elements of s to variables of t and
u, the two terms evaluate to the same element. Then the deductive closure of the axiomatization of lattices,
namely the equations for associativity, commutativity, and idempotence of each of the two operations, along
with the two absorption laws, is the equational theory of lattices. When we add the distributivity law to
the deductive closure becomes the equational theory of distributive lattices.
On the other side, the homologue closure of the (unique) two-element lattice is the set of distributive lattices.
7 This term was proposed by Bill Rounds in response to the authors request, posted to a logic mailing list, for a suitable
name for the concept.
19
When it is known, from context or otherwise, what the relevant operations are (in this case two binary
operations), we may abbreviate the above conditions on the structures, propositions, and the satisfaction
relation by talking simply of equational consequences and equational homologues.
Theorem 15 Polarities map sups to infs.
W
W
V
Proof:
Let X 0 be a subset of X having a sup X 0 . We shall showWthat f ( X 0 ) = f (X 0 ) where
f :WX Y is a polarity of aWGalois connection.
NowWfor every x X 0 , x X 0 whence by antimonotonicity
V
0
0
0
f ( X ) f (x). Hence f ( X ) f (X ), i.e. f ( X 0 ) is a lower bound of f (X 0 ).
0
0
Now
x g(y) for every
W 0 consider any lower bound y of f (X ). By the GaloisWcondition,
W 0x X , whence
0
X g(y). So again usingWthe Galois
V condition, y f ( X ). This shows that f ( X ) is the greatest
lower bound of f (X 0 ), i.e. f ( X 0 ) = f (X 0 ).
Corollary 16 The set of models of the union of two sets of axioms is the intersection of the sets of models
of each set of axioms taken separately. Furthermore this generalizes to any number of sets of axioms. On
the other side, the theory of the union of two sets of structures is the intersection of the theories of the sets
taken separately.
This corollary is a case where abstraction does not yield any additional insights or simplifications than a
more direct proof. After all, it is obvious that the models of the union of two theories 1 and 2 are exactly
those structures that are models of 1 , and models of 2 , and similarly for propositions satisfied by the
structures in two sets C1 and C2 .
In fact it might seem that we were lucky to be able to prove the abstract result at all, since we had no reason
to suppose that everything true of our concrete example holds in every Galois connection. We now provide
such a reason in the form of the theorem following these definitions.
A Galois connection is called concrete when it the one determined by two sets A, B and a binary relation
R A B between them. That is, the posets are the respective power sets of A and B, while the polarities
f : 2A 2B , g : 2B 2A are defined by f (A0 ) = {b|a A0 .aRb} and g(B 0 ) = {a|b B 0 .aRb}, for A0 A
and B 0 B.
Our canonical example of a Galois connection was concrete: A was a set (or class) of structures, B a set
or class of propositions, and R the satisfaction relation |= .
Given a Galois connection G = (X, Y, f, g), a representation of G is another Galois connection G0 =
(X 0 , Y 0 , f 0 , g 0 ) together with functions F : X X 0 , G : Y Y 0 such that for all x X and y Y ,
f 0 (F (x)) = F (f (x) and g 0 (F (y)) = F (g(y)). We say that F (x) represents x and likewise F (y) represents y.
When F is injective we call the representation an embedding and say that G embeds in G0 .
We call a Galois connection representable when it embeds in a concrete Galois connection.
Theorem 17 Every Galois connection (X, Y, f, g) is representable.
Proof:
Take A = X and B = Y . Define R such that aRb holds just when either there exists x X such
that a x and b f (x), or there exists y Y such that a g(y) and b y. Exercise 5 completes this
proof.
1.4.3
Exercises
1. Show that U(Q) L(U(Q))Wis either empty or a singleton. When empty, show that
when a singleton, that it is { Q}.
Q is undefined, and
20
1.5
1.5.1
Fixpoints
Complete Lattices
We defined a lattice to be a semilattice that is also a lower semilattice, which is to say that it is a partial
order all of whose finite nonempty subsets have both least upper and greatest lower bounds. When finite
nonempty is omitted we obtain the following notions.
An upper complete semilattice is an upper semilattice each of whose subsets has a sup, and dually for
lower complete semilattices. A complete lattice is a lattice whose two semilattices are both complete, i.e.
every subset has both a sup and an inf.
Examples.
1. The power set lattice (2X , , ) is a complete lattice for any choice of X, even empty or uncountable.
2. The closed unit interval [0, 1] of reals is a complete lattice. Every subset of such a bounded set of reals
has a sup and an inf. The whole real line however is not, as unbounded subsets lack a sup or inf.
3. The set S of all subalgebras of an algebra is partially ordered by the subalgebra relation (why?), and is
closed under arbitrary intersection. Hence every subset T of S has an inf. It is less obvious that it also has
a sup, which we now show via the following general theorem.
Theorem 18 Every complete semilattice L is a complete lattice.
Proof: We carry out the argument
for upper complete semilattices, the other case being simply the dual.
W
For any subset X of L, let p = LX, the sup of the set of lower bounds of X. Since every x X is an
upper bound of LX, p is a simultaneouslyVa lower bound of X and an upper bound of Y . This makes p the
greatest lower bound of X, showing that X exists.
1.5.2
We shall shortly have occasion to ask whether a sublattice M of a complete lattice L is itself a complete
lattice. This is a more delicate question than it looks, as can be illustrated with the usual Dedekind-cut
definition of real numbers as lower sets of rationals. (With this definition we pick up two extra reals:
as the empty set and as the set Q of all rationals; these could be dropped, but keeping them allows us
to say that the reals form a complete lattice.) This definition is unambiguous for irrational reals, but to
1.5. FIXPOINTS
21
complete the definition for the case of rational reals we must decide (uniformly for all rationals, for simplicity)
whether the lower set is closed (i.e. contains the rational it represents). If we decide yes then let us name
the set of reals so defined C for closed, and if no then O for open; C and O are distinct in the sense that
they are distinct subsets of 2Q , though intuitively they should serve equally well as the definition of the set
R of reals.
Now the point of having reals as opposed to rationals is to have a complete lattice under the standard
arithmetic ordering, one in which every set (every bounded set if we drop ) of reals has a sup and a inf.
So let us check that O and C both have sups and infs for all their subsets.
Our first test case is the subset of positive reals, whose inf had better be 0. The inf in 2Q of the positive
C-reals is {q 0}, which is indeed the C-real 0. However the inf in 2Q of the positive O-reals is also {q 0},
whereas the O-real for 0 is {q < 0}. Apparently O is defective!
Our second test case is the subset of negative reals, whose sup had better be 0. In both cases we get the sup
in 2Q to be {q < 0}, which is the O-real for 0. So C is broken too!
This situation is straightened out by taking sups and infs not in 2Q but in C or O itself. The inf in O of the
positive O-reals is indeed {q < 0}, the O-real for 0, and dually for C.
Thus it is important to be clear about which lattice one is taking sups and infs in. We shall sometimes write
supL X or infL X to indicate that the sup or inf of X is being taken in L, and sometimes refer to these as
L-sups or L-infs. We shall say that a sublattice of a lattice L is closed under L-sups when it contains all
its L-sups, and complete in L when it is closed under both L-sups and L-infs.
1.5.3
The requirement for complete lattices that every subset of a partial order have a sup is very strong. In some
situations we may have to settle for sups only of certain kinds of subsets, giving rise to a kind of structure
that is not only not a complete lattice but not even a lattice.
A subset Y of a partial order P is called directed when it is nonempty and any two elements of it have an
upper bound in Y . The dual of directed is filtered .
W
A complete partial order , or CPO, is a partial order such that Y is defined for all directed subsets Y .
Often this notion is defined with nonempty chain in place of directed. This gives rise to a slightly
different notion from the above, in which case the term chain-complete partial order, or chain-CPO, is
sometimes used to distinguish it from a CPO. Since every nonempty chain is a directed set, every CPO is a
chain-CPO.
A pointed CPO is a CPO with a least element. The presence of a least element is essential for the fixpoint
theorems below.
Examples
1. The CPO of finite and infinite strings ( , w) ordered by the prefix relation u v w defined as w = uv
for some v . Any directed set in this CPO must be a chain. The sup of any finite nonempty chain is its
longest element, while the sup of any infinite chain is the infinite string whose i-th letter is the letter that
appears in the i-th position of all strings in the chain of length at least i. That chain need not (but may)
include its sup. This is a pointed CPO, having the empty string as its least element.
2. The CPO of all partial functions on the natural numbers, ordered by inclusion. A directed set here is a
set of functions all having the same value wherever they are defined. The sup of a directed set is then simply
its union (treating functions as their graphs, i.e. sets of pairs). This is a pointed CPO, having the every
undefined function as its least element.
Thus far the only kind of function on posets and lattices that we have considered is the monotone function,
22
which preserves order. It can be seen (Exercise 1) that a function between partial orders is monotone just
when it preserves sups of finite directed sets. This characterization of monotone functions in terms of which
sups they preserve motivates the following definitions.
A function between partial orders is called chain-continuous. continuous, finitely additive, or completely additive, when it preserves sups of nonempty chains, directed sets, nonempty finite sets, or all sets,
respectively.
Certain implications between types of functions are made evident by these definitions. Thus every completely
additive function is monotone, continuous, finitely additive, and chain-continuous. Every finitely additive
function is monotone. And since nonempty chains are directed every continuous function is chain-continuous.
1.5.4
Fixpoint Theorems
We come now to Tarskis fixpoint theorem8 for monotone functions in complete lattices, adopted by Scott
for the foundation of an elegant theory of computation.
A fixpoint of a function f : L L on lattices is an element y of L satisfying f (y) = y. A pre-fixpoint of f
satisfies y f (y); the dual notion is post-fixpoint.
Theorem 19 (Tarski, 1942, publ. 1955) Let f : L L be a monotone function on a complete lattice L.
Let P L be the set {x | x f (x)} of all pre-fixpoints of f , and let F P be the set {x | f (x) = x} of all
fixpoints of f . Then F is a suborder of P that by itself is a complete lattice (its sups and infs are not those
of L).
W
Proof:
Let Y F be any set of fixpoints. Take Z = LP Y and u = L Z. Then for any z Z,
z f (z) f (u), whence
W f (u)Wis an upperVbound of Z, so u f (u), u being the least such upper bound.
Hence u P , so u = P Z = P LP Y = P Y . Hence u LP Y = Z. Also f (u) f (f (u)) (by u f (u)
and monotonicity of f ), so f (u) P . Thus f (u) LPVf (Y ) = LP (Y ) = Z. Hence f (u) u. Therefore
f (u) = u and so u F . Hence for every subset Y of F , P Y is in F , making F a complete sublattice of P .
Since a complete lattice has a least element, it follows that every monotone function on a complete lattice
has a least fixpoint.
The following is the more commonly used fixpoint theorem in computational settings. Its advantage is that it
caters for structures with diverging branches that do not reunite higher up, expressing a notion of conflicting
alternatives.
Theorem 20 Every continuous function on a pointed CPO has a least fixpoint.
Proof:
Let f (y) denote the set {y, f (y), f (f (y)), . . .}. If y f (y) then by monotonicity
W
Wof f , f (y)
all fixpoints of f , since f () is the least upper bound. But if z is a fixpoint of f then z, so
f () f (z) = z, and so on, whence z is an upper bound on f ().
A more general theorem unifying both of the above is possible: every monotone function on a CPO has a
least fixed point. However the extant proofs are quite a bit longer than the two special cases proved above.
8 This is often called the Tarski-Knaster theorem. A 1927 paper listing only Knaster as the author but acknowledging Tarskis
collaboration showed the theorem for the case of the complete lattice of all subsets of a set. Much later Tarski working alone
proved the general version given here.
1.6. QUANTALES
1.5.5
23
Exercises.
1. Show that a function between partial orders is monotone just when it preserves sups of finite directed
sets.
2. Show that among the subalgebras of an algebra, the least upper bound bound of any set of such subalgebras
is the subalgebra generated by the union of that set.
3. Show that if M is a sublattice of L, supM X supL X and inf M X inf L X. Infer that if M is closed
under L-sups or L-infs then (i) it is closed under M -sups or M -infs respectively and (ii) it is a complete
lattice in itself.
4. Show that C and O are closed under 2Q -infs and 2Q -sups respectively, and C O under both, where C
and O are the sets of order ideals of the chain Q of rationals described in section 1.5.2. Infer that C, O,
and C O as lattices are each complete in themselves. Which of them are complete in 2Q ? What is the
corresponding situation for C O?
5. For monotone f : L L on a complete lattice L, show that for any pre-fixpoint z of f the set of fixpoints
of f above z form a complete lattice. Infer that for any monotone increasing (f (x) x) function there exists
a least monotone increasing idempotent f : L L with f (x) f (x) for all x L.
1.6
Quantales
1.6.1
W
W
A quantale (X, W, ) is aWstructure suchWthat (X, )Wis a complete semilattice, (X, ) is a semigroup, and
the equations x Y = (x Y ), and ( Y ) x = (Y x) hold for all x X and Y X. (Notation:
x Y = {x y|y Y }.)
W
A quantale with unit is a quantale (X, , , 1) containing a constant 1 such that (X, , 1) is a monoid. A
commutative quantale is one satisfying x y = y x.
W
For doubleton subsets Y = {x, y} we write {x, y} as x y. The sup operation partially orders a quantale
as for semilattices: x y holds just when x y = y.
Examples
1. Writing for the set of all finite stringsSover an alphabet , the power
S set 2 of all formal languages
over that alphabet forms a quantale (2 , , ) under arbitrary union Y of a set Y of languages and
concatenationSU V of two languages U and V defined as {uv|u U, v W }. Expanding this structure with
Modifying this example by replacing by + , the set of all finite nonempty strings, yields a quantale with
no element available to serve as a unit. Many other modifications are possible, such as taking all strings of
length at least 7, all strings of length a multiple (nonzero if you want to eliminate the unit) of some integer,
etc.
S
A2
A2
2. Let A be a set. Then
S the power set 2 of all binary relations R on A forms a quantale (2 , , ; )
under arbitrary union Y of a set Y of relations and composition R; S defined as {(a, c)|b A.(a, b)
2 S
R (b, c) S}. This example too can be expanded to a quantale with unit (2A , , ; , 1A ) where 1A is the
identity relation {(a, a)|a A}.
V
3. The structure (N {},
V , +) is a quantale where N is the natural numbers, + is numeric addition,
x + = = + x, and Y is the least element of Y (since V
every subset of N has a least element). The
same structure expanded to include 0 as a constant, (N {}, , +, 0), is a quantale with unit.
24
This example has many variants based on the natural numbers N, integers Z, rationals Q, and reals R. In
all examples containing at least one positive number, must be included. Furthermore it must contain a
least element (the bottom of the complete semilattice), whence if the quantale is unbounded below (e.g. if
it contains infinitely many negative integers) then it must include .
As the first example might suggest, elements of quantales behave very much like binary relations on a fixed
set A. The table of kinds of binary relations in Section 1 has its counterpart here, at least for some of the
notions.
W
Let Q = (X, , ) be a quantale. The empty relation corresponds to the least
W element 0 of Q, the identity
relation to the unit 1 when it exists, and the clique to the top element > = X.
An element x of Q is called reflexive when it satisfies 1 x, and irreflexive when it satisfies x 1 = 0.
It is called transitive when it satisfies xx x.
1.6.2
Operations on Quantales
All the operations we have seen for semilattices and semigroups generalize straightforwardly to quantales.
W
W0
Subquantales Given a quantale Q = (X, , ), a quantale (X 0 , , 0 )Wis a subquantale
of Q when X 0 X
W
0
0
0
0
such that is the restriction of to Y , and for all subsets Y X ,
Y = Y.
The modifications listed above to Example 1 are all subquantales of that example.
W
W
Direct
two
(X1 , 1 , 1 ), (X2 , 2 , 2 ), their direct product is the quantale (X1
W Product Given
W
W quantales
W
X2 , , ). Here Y = ( 1 Y1 , 2 Y2 ) where Y X1 X2 and Y1 = {y X1 |z X2 .(y, z) Y }, and
similarly for Y2 , while (x1 , x2 ) (y1 , y2 ) = (x1 y1 , x2 y2 ).
W
Direct product generalizes as usual to any family h(Xi , i , i )iiI of quantales where I is an arbitrary set
used to index the family.
W
W
Homomorphisms Given two quantales (X1 , 1 , 1 ), (X2 , 2 , 2 ), a homomorphism is a function h W
: X1
X
which
is
simultaneously
a
semilattice
homomorphism
and
a
semigroup
homomorphism.
That
is,
h(
2
1Y)=
W
2 h(Y ) for all Y X, and h(x 1 y) = h(x) 2 h(y) for all x, y X1 .
W
W
A homomorphism h : (X1 , 1 , 1 , 11 ) (X2 , 2 , 2 , 12 ) between two quantales with unit is a homomorphism
of quantales that furthermore preserves the unit, i.e. h(11 ) = 12 .
1.6.3
Residuation
W
Associated to any quantale
(X, , ) are two binary operations of residuation. The right9 residual
of x by
W
W
y is defined as y\x = {z|y z x}. The left residual of x by y is defined dually as x/y = {z|z y x}.
The two residuals coincide (y\x = x/y) in a commutative quantale.
Equivalently the two residuals can be defined as follows.
xy z
iff
iff
y x\z
x z/y
Exercise 4 shows that this definition is equivalent to the first definition. Exercise 5 shows that x and x\,
as functions of their right hand argument, are the polarities of a Galois connection. From (one direction of)
9 The
name is confusing since the divisor y is on the left. The point is that the residue after division is on the right.
1.6. QUANTALES
25
the second formulation of a Galois connection we infer that x; (x\y) y and x\(x; y) y (because of the
exercises need to take the order dual of the quantale on one side).
Residuation has a logical interpretation that is made more visible by writing x\y as x y, i.e. implication,
x y as x ` y, entailment, and x; y as x, y, conjunction (rather than x y, which already has a separate
meaning in a quantale, and which besides is commutative, which quantalic conjunction need not be).
In this notation the first inequality of the second formulation of a Galois connection becomes x, x y ` y,
recognizable as the logical inference rule modus ponens. The second inequality becomes y ` x (x, y),
which is the more boring statement that y is weaker than the implication of x, y by x.
Polarities map sups to infs. However we have taken the order dual of one copy of the quantale, so with
respect to the original quantale the polarity x preserves sups (which we already had from the definition
of quantale), while the polarity x preserves infs, in particular x (y z) = (x y) (x z).
1.6.4
Star
W
Associated with any quantale (X, , ) is a unary operation x+ of transitive closure, defined as the least
transitive element greater or equal to x. That is, it satisfies (i) x x+ , (ii) x+ x+ x+ , and (iii) x+ y
for any y satisfying (i) and (ii) when substituted for x+ .
The reflexive transitive closure or star x of x is defined as 1 x+ .
Theorem 21 x\x is reflexive and transitive.
Define a preserver of x to be an element y satisfying x y x. Then x (x\x) x makes x\x a preserver
of x, while y x\x for any preserver of x makes x\x the weakest preserver of x.
Thus if x y x we may infer from (x\x) x\x and the monotonicity of star that x y x.
1.6.5
Exercises
W
1. Give
examples of (a) a quantale of binary relations without unit; (b) a quantale (X, , ) such that
V
(X, , ) is not a quantale; (c) a quantale whose semigroup is a group (and show that there are no further
examples).
W
2. Furnish the monoid (C, +, 0) of complex numbers with a suitable
making it a quantale.
3. Show that any quantale whose semigroup is a group has exactly one element.
4. Show that the second (iff) definition of the residuals is equivalent to the first definition.
5. Show that for a fixed element x of a quantale Q, the operations x y and x\y (each as a function of y)
form the polarities of a Galois connection between the quantale and its order dual.
6. Derive logics cut rule x y, y z ` x z as a property of a quantale.