colimits in the category dcpo
TRANSCRIPT
Colimits in the category DCPOAdrian Fiech
Department of Computing and Information SciencesKansas State UniversityE–mail : [email protected]
Abstract :
We establish sufficient and necessary conditions for a natural sink to be a colimit in
DCPO. Based on these conditions we show how to construct a colimit for any functor F
from a small category „ into the category DCPO. This demonstrates that the category
DCPO is cocomplete. We also investigate under what conditions the colimit object is
algebraic.
0 Introduction
Colimits play an important role in modeling subtyping relations. Given a domain of
type names D, it is common to interpret it with a functor F from the domain D into the
category DCPO, where F assigns to each type name the corresponding dcpo of semantic
values. A subtyping relation type1<type2 in D is interpreted as a continuous function
from F(type1) into F(type2). It is reasonable to require that if we have a (directed) set of
type names Q st. type¤Q is the lub of Q in D, then the dcpo corresponding to type¤Q
should be the colimit of all the dcpos corresponding to type names in Q. Existence of
arbitrary colimits is of importance when proving the soundness of the ¬2–model with
subtyping introduced in [Fiech, Schmidt 1993] and is necessary for the definition of the
powerdomain–functor on FuncDCPO (on which the ¬2–model is based) [Fiech1993]. It is
well known that the category DCPO has all colimits generated by ∑–chains where the
morphisms between dcpos are embedding–projection pairs. The colimits are exactly the
limits of these ∑–chains [Jung 1990]. It is also known that any nontrivial cartesian closed
category with the fixed–point property (e.g. DCPO÷, the category of dcpos with least
element) cannot be cocomplete [Huwig, Poigne 1990]. In the general case, where the
diagram is a small category and the underlying morphisms are arbitrary continuous
functions, the existence of such colimits in DCPO isn't known very well. A nonconstructive
proof can be found in [Meseguer 1977]. The cocompleteness of DCPO has also been
proved (in a constructive way) by Achim Jung [Jung]. He constructs the colimit object
1
with the help of "compatible" families of Scott–closed subsets of the diagram domains,
which satisfy a set of equations. In this paper we determine under what conditions a
given natural sink is a colimit. This gives us deeper insight into the underlying structure
of the colimit object. We are interested especially in how the diagram objects are embedded
into the colimit object. We give necessary and sufficient conditions for a natural sink to
be a colimit. These conditions will be helpful when proving that a dcpo is indeed a
colimit for a given functor. Following this we give a construction of a colimit for an
arbitrary functor F from a small category „ into DCPO, thereby proving that DCPO is
cocomplete. This construction shows that the usual approach to colimits doesn't work
here. The equivalence relation we generate produces a poset and not a dcpo. So we
have to add the necessary lubs in a "free" fashion, where it is not immediately clear
what "free" means as there are no "free dcpos" over posets. We also look closely at
colimits generated by algebraic dcpos. In the case of ∑-chains with embedding–projection
pairs the colimit is known to be algebraic. But this fails if we allow arbitrary continuous
functions between dcpos, so we define conditions under which the colimit object is
algebraic. We show that if (F[i]ÂX)i ´Ob(„) is a colimit for F, then it is enough to look
only at the set ›i´Ob(„)fi(F[i]) to determine if X is algebraic. We also prove that the colimit
object is algebraic if the functions between diagram objects preserve finite elements
(where „ is an arbitrary small category and all F[i]'s are algebraic).
First we start with a brief introduction to domain and category theory. We present here
only the major results needed to prove our theorems. In the next section we define the
colimit conditions and prove their correctness. We put emphasis on relating our definitions
and proofs to “real life” examples.
1 Domain and category theory
This section is a brief review of the necessary definitions in domain and category theory.
The interested reader is referred to [Jung 1990, Adamek et al 1990, Pierce 1991].
A partial order (D,<) is a set D and a binary relation < on D, which is reflexive,
antisymmetric and transitive. For a subset MúD an element x´D is called an upper
bound of M if for all m´M, m<x. An element x´D is called least upper bound (lub) of
M, ÛM, if it is an upper bound of M and if for all upper bounds x* of M x<x*. Analog
we can define lower bound and greatest lower bound Ú. The lower set of x, Łx, is
defined as Ëx := {d´D|d<x} (analog �x). A subset MúD is directed if for every finite
subset M'úM there exists an upper bound m´M for M'. A directed complete partial
2
order (dcpo) is a poset (D,<), st. every directed subset MúD has a least upper bound
‹M´D. A function f:A¨B between two posets A and B is continuous if for any
directed set MúA, f(M) is also directed and f(‹M) = ‹{f(m)|m´M} whenever ‹M
exists. An element x´(D,<) is finite if for all directed sets M with x<‹M there exists
some element m´M, st. x<m. We denote the set of all finite elements in D as K(D). The
dcpo (D,<) is algebraic if for all x´D the set M={a´K(D)|a<x} is directed and x=‹M.
A subset UúD is called Scott—open if U=ëU and if for every directed set M,
‹M´Uöm´U for some m´M. A subset VúD is Scott—closed if V=ËV and if V is
closed under directed lubs.
A category „ is a quadruple „=(O,hom,id,º) where (i) O is a class whose members are
„-objects (ii) for each pair (A,B) of „-objects hom(A,B) is a set whose members are
called „–morphism from A to B (iii) for each „–object A idA:A¨A is the A–identity
(iv) … is a composition operator assigning to each pair of morphism f:A¨B, g:B¨C
the composite morphism gºf:A¨C. We also require that fº(gºh)=(fºg)ºh (h:C¨D)
and idAºf=f, gºidB=g. The class O is usually denoted by Ob(ª) and the class of
„–morphisms Mor(ª) is defined as the disjoint union of all the sets hom(A,B) in „. The
category DCPO has as objects directed complete partial orders and as morphism
continuous functions.
Let „,Ï be categories. A functor F:„¨Ï is a function that assigns to each „–object A a
Ï–object F(A) and to each „–morphism f:A¨B a Ï–morphism F(f):F(A)¨F(B), st.
F(fºg)=F(f)ºF(g) and F(idA)=idF(A).
A sink in a category „ is a pair ((fi)i´I,A) consisting of an object A´Ob(„) and a family
of morphism fi:Ai¨A in „. If F:„¨Ï is a functor then an Ï–sink (F[i]ÂA)i´Ob(„) is
natural for F if for each „–morphism d : i¨j, fjºF[d]=fi. A colimit of F is a natural sink
(F[i]ÂC)i´Ob(„), st. for any other natural sink (F[i]ÊA)i´Ob(„) there exists a unique
morphism h:C¨A with hºfi=g i for all i´Ob(„). A category Ï is cocomplete if every
functor F from a small category „ (i.e., the class of objects in „ is a set) into Ï has a
colimit in Ï.
In the following, whenever we talk about functors from „ to DCPO, we assume that „
is a small category.
2 Colimit—condition for natural sinks
We begin this section with few examples and concepts, which will eventually lead us to
the definition of conditions characteristic for colimits in DCPO.
3
Definition 2.1
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO. We define the poset XFúX:
XF := › i´Ob(„)fi(F[i]).
If (F[i]ÂX)i´Ob(„) is a colimit, then for any other natural sink (F[i]ÊY)i´Ob(„) we must
have a unique continuous function ƒ:X¨Y, that makes all the diagrams commute. To
prove that a given natural sink is indeed a colimit, we proceed in three steps :
a) there exists a monotone function ƒ:XF¨Y that makes the diagrams commute
b) this function preserves directed lubs
c) we can extend ƒ into a continuous function ƒ:X¨Y.
In the case of an arbitrary natural sink, many things can prevent it from being a colimit,
as we see from the following examples.
Example 2.2
Let (F[i]ÂX)i´Ob(„) and (F[i]ÊY)i´Ob(„) be natural sinks , where Y is the two element cpo
{÷<¿} and for some i,j´Ob(„) we have gi(a)=¿ , gj(b)=÷ and fi(a)=a<b=fj(b).
÷
¿
a
XY
F[i] F[j]b
a
b
g
gf
fi
j
i
j
.
Obviously there is no monotone function ƒ:X¨Y that makes the diagrams commute.
This situation cannot happen if we require that whenever we have fia(a)<fib
(b), a´F[ia],
b´F[ib], we also must have F[̇ :ia¨im](a)<F[˚:ib¨im](b) for some im´Ob(„) and
˙,˚´Mor(„).
Example 2.3
In this example we have a monotone function ƒ from X to Y that makes the diagrams
commute. But this function is not continuous. The reason for this is that ∑=‹{n|n´N}
in X, but for no F[i] do we have ∑=‹{n|n´N}. The functions gi are defined as gi(n):=÷
4
and gi(∑):=¿. (See next page.)
∑
n
2
1
X
÷
¿Y
1
∑
∑
2
1
∑
n
2
1
ƒ
F[1]
F[2]
F[n]
g 1
g2
g n
.
Example 2.4
We also may have the case that there exists a continuous function ƒ from X to Y, but
this function is not unique. In our example, where all gn's are of the form ¬x.÷, we have
two continuous functions from X to Y. One of them maps ¿ to ÷, and the second maps
¿ to ¿. We can avoid this situation if we require that all x´X are lubs of the sets (Ëx)§XF
and these sets are directed.
∑
n
2
1
X
÷
¿Y
1
2
1
n
2
1
ƒ
Ì[1]
Ì[2]
Ì[n]
g 1
g2
g n
¿
.
These examples will guide us on the way to the desired results.
A very important construction is the ‹-closure of a given set. Our results relay heavily
on ‹–closures.
Definition 2.5
Let M be a subset of a cpo X. The Ü—closure of M is defined as the smallest subset M* of
X that contains M, st. for every directed NúM*, ‹N´M*.
5
It is clear that for every MúX the set M* exists. M* is the intersection of all subsets of X
that contain M and are closed under lubs.
The following definition, which is equivalent to the previous, gives us a better look at
the structure of M*.
Definition 2.6
Let X be a cpo and MúX. For every ordinal å´ORD we define M� as follows:
M0 := M
Må := {x´X|x=‹Q and Qú›∫ÔåM∫}
M* := ›å´ORDMå
Lemma 2.7
If M is a subset of a dcpo X then M* has cardinality at most 2|M|.
Proof
The set {x´X|x=‹A for some AúM} is a superset of M which is closed under directed
lubs.¸
Every continuous function ƒ from M* to Y is uniquely determined by its values on
elements in M because the subset on which two continuous function agree, is a sub-dcpo.
Furthermore, we get the following:
Lemma 2.8
Let X=M* and ƒ:X¨Y be a continuous function. For every x´X, ƒ(x) =
¤{ƒ(m)|m (́Ëx)§M}. In the case that ƒ=idX we get x=¤{m|m´(Ëx)§M}.
Proof
We use induction. The lemma holds for M. Assume that it also holds for all z´Zú›∫ÔåM∫
with ‹Z´Må. As ƒ is monotone, ƒ(‹Z) is an upper bound for the set {ƒ(m)|m´(Ë‹Z)§M}.
To see that ƒ(‹Z) is the lub of Q, notice that ƒ(‹Z) = ‹{ƒ(z)|z´Z} =
‹{¤{ƒ(m)|m´(Ëz)§M}|z´Z} = ¤{ƒ(m)|m´(ËZ)§M} < ¤{ƒ(m)|m´(ˤZ)§M}.¸
A similar concept to the ‹–closure of a set M is developed in the following definition.
Definition 2.9
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO and NúX. Define N0 :=(ËN)§XF.
The lower F—set of N, NF, is the smallest superset of N0 such that for all i´Ob(„) the set
{x´F[i]|fi(x)´NF} is Scott–closed.
6
An equivalent definition of NF is given in the following.
Definition 2.10
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO and NúX. For every ordinal å´ORD we
define N� as follows:
N0 :=(ËN)§XF
Nå := (Ë{a´XF|a=‹Q, Qú›∫ÔåN∫ and ¶ dir. Q´F[i]:fi(Q)=Q})§XF
NF := ›å´ORDNå
To construct the set NF we proceed in a similar way as when building the ‹–closure.
The difference is that we take only lubs which exist in some F[i], i´Ob(„), and also add
all elements below these lubs.
Lemma 2.11
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO and NúX. If ƒ:XF¨Y is a continuous
function and if ƒ(n)<y for all n´N0, then ƒ(n)<y for all n´NF. In the case that ƒ =
îÊ:ÊXF¨X, we get : N0<y ö NF<y.¸
Definition 2.12
Let (F[i]ÂX)i´Ob(„) be a natural sink. We define the set
LX(F) := {QF|QúX}.
So LX(F) is the set of all F–lower sets in X. It is easy to see that (LX(F),ú) is a complete
lattice. For a directed set NúLX(F), the lub is the union of all n´N.
Definition 2.13
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO. We say that the sink (F[i]ÂX)i ´Ob(„) is
well—structured if the following holds:
1. X=XF*
2. For every x´XF and every directed NúX : x<‹Nöx´NF.
Proposition 2.14
Let (F[i]ÂX)i´Ob(„) be a well–structured sink. Then X is a sub–dcpo of LX(F).
Proof
We have the canonical function [_]:X¨LX(F), where [x]=xF. Obviously [_] is one–one,
as xF=(Ëx)§XF and x=¤((Ëx)§XF) (Lemma 2.8). It remains to show that [_] is continuous.
[‹N]=(‹N)F=(Ë‹N)§XF and ‹{[n]|n´N}=›{nF|n´N}. It is obvious that ›{nF|n´N}ú
(Ë‹N)§XF. If z´(Ë‹N)§XF then z´NF as the sink is well–structured. Therefore
z´›{nF|n´N} and (Ë‹N)§XFú›{nF|n´N}.
7
¸
Lemma 2.15
Let (F[i]ÂX)i´Ob(„) be a well–structured sink. If ƒ:XF¨Y is a continuous function, then
for all x´X the set {ƒ(m)|m´(Ëx)§XF} has a lub in Y. (This set may not be directed.)
Proof
We use induction. Obviously the lemma holds for all x´XF. Let Qú›∫Ôå(XF)∫, st. for all
q´Q the lemma holds. For each q´Q we define ∑q:=¤{ƒ(x)|x´(Ëq)§XF}. It is clear that
∑q<∑r if q<r. So the set {∑q|q´Q} is directed and has a lub ∑Q=¤{ƒ(x)|x´(ËQ)§XF}.
Now for all x´XF , x<‹Q implies x´QF. From ∑Q>ƒ((ËQ)§XF)=ƒ(Q0) and Lemma 2.11,
we get ƒ(x)<∑Q for all x´(Ë(‹Q)§XF). It is now easy to see that ∑Q is the lub as
{ƒ(x)|x´(ËQ)§XF} ú {ƒ(x)|x´(Ë‹Q)§XF}.¸
Proposition 2.16
Let (F[i]ÂX)i´Ob(„) be a well–structured sink in DCPO. If ƒ:XF¨Y is a continuous
function, then there exists exactly one continuous function ƒ:X¨Y, st. ƒ|XF=ƒ.
Proof
We define the function ƒ:X¨Y as ƒ(x):=¤{ƒ(m)|m´(Ëx)§XF} and show that it is
continuous. The uniqueness follows from Lemma 2.8. The definition is correct because
of Lemma 2.15. Given ∑=‹Q in X, the set ƒ(Q) is directed as ƒ is clearly monotone.
Therefore we have ‹ƒ(Q)<ƒ(‹Q). The converse has been shown in the proof of the
previous lemma.¸
Another useful concept is the <F relation, which we define next. We also prove some
important results about the behavior of elements a<Fb. This concept will assure that the
situation in Example 2.2 cannot happen.
Definition 2.17
Let F:„¨DCPO be a functor. For every å´ORD we define the relation <� ú
(fii´Ob(„)F[i])ˇ(fii´Ob(„)F[i]) : (RT is the transitive closure of R)
<0:=R0T, where aR0bÄ ¶˙,˚´Mor(„), codom(˙)=codom(˚) : F[˙](a)<F[˚](b)
<å:=RåT, where aRåbÄa=‹Q, QúF[i] for some i´Ob(„) and for all q´Q, q<∫b (∫Ôå)
<F:=›å´ORD<å.
Example 2.18
In the following diagram we have b1<Fc as F[1¨3](b1)=b3<c and a1<b2 as
F[2¨4](a1)=a2<b2. From this we can conclude that a1<Fc as F[1¨4](b1)=b2. (See next
8
page.)
a
b
b
c
a
b
F[1]
F[2]F[3]
F[4]
1
2
2
1
3
.
Lemma 2.19
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO. If a<Fb, a´F[ia], b´F[ib] then fia(a)<fib
(b).
Proof
We will show that the lemma holds for all <å. (For some †´ORD we have <†=<F,). It is
immediately clear that the lemma holds for <0. We assume that the lemma is correct for
all <∫ (∫Ôå) and conclude that it holds for <å. If a<åb (a´F[ia], b´F[ib]) then a=‹Q and
for all q´Q, q<∫b (∫Ôå). So for all q´Q we have fia(q)<fib
(b). Because all fi's are continuous,
we get fia(a)=fia
(‹Q)=‹fia(Q)<fib
(b).¸
At this point we are ready to define the colimit–condition.
Definition 2.20
The colimit—condition for a natural sink (F[i]ÂX)i´Ob(„) in DCPO is given by
1) (F[i]ÂX)i´Ob(„) is well–structured.
2) Let a1´F[i1] and a2´F[a2]. If fi1(a1)<fi2
(a2) then a1<Fa2.
Theorem 2.21
Let (F[i]ÂX)i´Ob(„) be a natural sink in the category DCPO. (F[i]ÂX)i´Ob(„) is a colimit in
DCPO if and only if it satisfies the colimit–condition.
Proof
The theorem follows from the next three propositions.¸
Proposition 2.22
Let the colimit–condition hold for the natural sink (F[i]ÂX)i´Ob(„) in DCPO. Then
(F[i]ÂX)i´Ob(„) is a colimit in DCPO.
Proof
For any other natural sink (F[i]ÊY)i´Ob(„) we have to show that there exists a unique
continuous function ƒ:X¨Y which makes the diagrams commute.
9
First we will define a monotone function ƒ:XF¨Y. Set ƒ(a):=gi(a*) for some a*´F[i]
with fi(a*)=a. We need to show that our definition doesn't depend on the choice of
a*´F[i]. Let a1´F[i1] and a2´F[a2], st. fi1(a1)=fi2
(a2). In particular we have fi1(a1)<fi2
(a2)
and fi1(a1)>fi2
(a2). From condition (2) we get that a1<Fa2 and a1>Fa2. Now we can conclude
that gi1(a1)<gi2
(a2) and �gi1(a1)>gi2
(a2). (See Lemma 2.19.) Therefore gi1(a1)=gi2
(a2) and ƒ is
well defined. It follows immediately that ƒ is monotone. ƒ is the only function from XF
to Y that makes the diagrams commute.
Second, we have to show that ƒ preserves directed lubs. Let NúXF and ‹N´XF . It is
obvious that ‹ƒ(N)<ƒ(‹N), as ƒ is monotone. ‹ƒ(N) is bigger then ƒ(n) for all n´N.
Because of condition (1), ‹N´NF , as ‹N<‹N and ‹N´XF. We have then ‹ƒ(N)>ƒ(‹N)
because of Lemma 2.11. So ƒ preserves all directed lubs.
At last we will extend ƒ into a continuous function ƒ from X to Y. We can do it in a
unique way because of condition (1) and Proposition 2.16.¸
Proposition 2.23
If (F[i]ÂX)i´Ob(„) is a colimit in DCPO, then (F[i]ÂX)i´Ob(„) is well–structured.
Proof
a) Assume that X≠XF*. If (F[i]ÂX)i´Ob(„) is a colimit, then also (F[i]ÂXF*)i´Ob(„) must be
a colimit — the unique function ¥ : XF*¨Y is the restriction of the unique function ƒ :
X¨Y to XF*. As colimits are unique up to isomorphisms, there exists an isomorphism h
: XF*¨X, st. hºfi=fi. For every x´XF* we must have h(x)=x. We have then h(h-1(z))≠z
for every z´X\XF*. Contradiction to h being isomorphism. So (F[i]ÂX)i ´Ob(„) cannot be
a colimit.
b) Let assume that for some z´XF we have z<‹N but not z´NF. We construct the
natural sink (F[i]ÊY)i´Ob(„), where Y is the two–element cpo {÷<¿}.The functions gi are
defined in the following way :
gi : F[i] ¨ Y
÷ if f (x)´Ni F
g (x) = i ¿ if f (x)íNi F
.
Obviously the diagrams commute and all gi's are monotone. We have to check that all
gi's are continuous. So let ∑=‹∑ j́ F[i]. If for all j, gi(∑ j)=÷ then all fi(∑ j) are in NF.
Therefore fi(∑) must also be in NF as fiÊis continuous. So we have gi(∑)=÷=‹÷=‹gi(∑j).
If for some j, gi(∑j)=¿ then gi(∑)=¿ as gi is monotone. This shows that gi is continuous.
10
Now we need a unique function ƒ:X¨Y that makes the diagrams commute. The function
ƒ is determined on XF, namely ƒ(a)=÷ for a´NF and ƒ(a)=¿ for aíNF. In particular,
because zíNF, we have ƒ(z)=¿. In Lemma 2.8 we proved that if X=XF*, then a continuous
function ƒ:X¨Y is given by ƒ(x)=¤{ƒ(a)|a´(Ëx)§XF}. Therefore we must have ƒ(‹N)=¿,
as z<‹N. We also must have for all n´N, ƒ(n)=÷ as (Ën)§XFúNF. From here we find
that ƒ is not continuous. Contradiction.¸
Proposition 2.24
If (F[i]ÂX)i´Ob(„) is a colimit in DCPO, then a1<Fa2 whenever f1(a1)<f2(a2).
Proof
We assume that we have a1´F[i1] and a2´F[i2] with fi1(a1)<fi 2
(a2) and a1≤Fa2. We construct
the natural sink (F[i]ÊY)i ´Ob(„) , where Y={÷<¿}. The functions gi are defined in the
following way :
gi : F[i] ¨ Y
÷ if x< ag (x) =
i ¿ else
F 2
.
It is easy to see that the diagrams commute and that all gi's are continuous. If ∑=‹∑j
and for all j, ∑j<Fa2, then we also must have ∑<Fa2. Assume that we have a continuous
function ƒ:X¨Y which makes the diagrams commute. We must have then ƒ(f i1(a1))=¿≤
÷=ƒ(fi2(a2)), so ƒ is not monotone. Contradiction.
¸
The following example is meant to show that the conditions we stated in Example 2.2
and Example 2.4 are too strong and that what we really need are the somewhat weaker
colimit–conditions.
Example 2.25
The reader may check that the following natural sink satisfies the colimit–condition and
that X is the colimit of the diagram (F[i])i´N. For ƒ´X the set (˃)§XF is not directed and
11
in none of the dcpos F[i] do we have ∑<∑*, although ∑<∑* in X. (See next page.)
∑*
n*
1*
∑
n
1
ƒ
n
1
ƒ*
n*
1*
∑*
n*
1*
∑
n
1
n
1
ƒ*
n*
1*
∑*
n*
1*
∑
n
11
ƒ*
n*
1*
F[1]
F[n]
X
.
So far all the colimits we examined were generated by categories „ isomorphic to a
poset. It is instructive to look at a colimit generated by a category Œ which is not a poset
(we have more than one morphism between two objects i,j´Œ).
Example 2.26
The cpo X is the colimit for the dcpos F[i], i´{1,…,3}. We have ƒ(a):=a and ˙(a):=∑. To
construct the colimit object X we have to group elements in ›i´Ob(„)F[i] into equivalence
classes with respect to the relation <F. More discussion will be found in the next section.
∑
n
1
a
∑
n
1b
a
c
[a, ∑]
n
1
b
c
F[3]
F[1]
F[2]
X
ƒ˙
id
f
f
f
1
2
3
.
3 Existence of small colimits in DCPO
In this section we will construct the colimit object for an arbitrary functor F from a small
12
category „ into DCPO. Following this we will investigate under what conditions the
colimit object is algebraic.
Definition 3.1
Let F : „ ¨ DCPO be a functor. Define ÞF := fii´Ob(„)F[i] . For every a´fiF we define
the F—equality class :
[a] := {b´fiF|a<Fb and b<Fa}
<F partitions fiF into a collection of disjoint F–equality classes.
Definition 3.2
Let F : „ ¨DCPO be a functor. We define
[F] := { [a]|a´fiF }
The relation <[F] ú [F] ˇ [F] is defined as :
[a] <[F] [b] Ä a<Fb.
Obviously ([F],<[F]) is a poset.
Now we can define the natural sink (F[i]Â[F]) i´Ob(„), where fi(a):=[a]. The diagrams
obviously commute, and the functions fi are continuous. Our definition of [F] assures
that the colimit–condition (2) holds for this sink. But the set [F] is not necessary a dcpo.
We complete now the set [F] into a dcpo, which will be the colimit–object for F.
Proposition 3.3
Let F : „¨DCPO be a functor. The natural sink (F[i]Â[F]*)i´Ob(„) is a colimit in DCPO,
where [F]* is the ‹–closure of [F] in L[F](F). ([a]´[F] corresponds to [a]F´L[F](F).)
Proof
It is clear that the functions fi are continuous.
From the colimit conditions we have to show that (F[i]Â[F]*)i´Ob(„) is well–structured.
Let Q be a directed subset of [F]*úL[F](F). For every q´Q we have q=MqF , where
Mqú[F]. We also have ‹Q=(›q´QMq)F. If [a]<‹Q (i.e. [a]Fú(›q´QMq)F), it also holds
that [a]´(›q´QMq)F. Then we get [a]´({[m]|m´Mq for some q´Q})F. Obviously for
every [m]´Mq we have [m]Fú(ËQ)§[F] and therefore [a]´QF.¸
As a corollary we get :
Theorem 3.4
The category DCPO is cocomplete.¸
13
In domain theory, algebraic dcpos are of particular importance. It would be nice to
have a set of conditions which ensure that the colimit object is also algebraic. The first
guess might be that if all F[i]'s are algebraic, then the colimit object [F]* is also algebraic.
Unfortunately this doesn't hold in general, as we see from the following example.
Example 3.5
The colimit for the diagram
∑
n
2
1
ƒ
ƒ
∑ ƒ
∑
where all F[i]'s are algebraic, is the nonalgebraic dcpo (see next page) :
∑
n
2
1
ƒ
.
How can we assure that the colimit of a functor F is algebraic? First, we observe that all
finite elements in the colimit object must be in [F], as all the lubs we add when constructing
[F]* must be nonfinite elements. It is also obvious that when constructing the ‹–closure
of [F] we must stop after only one step ([F]*=[F]1 must hold). Otherwise we would
produce nonalgebraic elements. Beginning with these two facts we show that it is
enough to look only at the poset [F] to determine if [F]* is algebraic. Thereafter we
identify the finite elements in [F]*. We begin with a helpful lemma.
Lemma 3.6
Let (F[i]ÂX)i´Ob(„) be a natural sink in DCPO. For every NúX and a´K(X) : a´NF ö
a<N.
Proof
There exists a minimal å´ORD with a´Nå. If å≠0 then a<‹Q for some Qú›∫ÔåN∫.
Hence a<Q, as a is finite. But this implies that a´N∫ for some ∫Ôå, which contradicts
the minimality of å. So å=0 and a<N.¸
Proposition 3.7
14
Let (F[i]Â[F]*)i´Ob(„) be a colimit. The dcpo [F]* is algebraic if and only if for all [a]´[F],
the set (Ë[a])§K([F]*) is directed and [a]=‹((Ë[a])§K([F]*)).
Proof
(ö) : There is nothing to show.
(Ö) : We have to show that for each x´[F]* the set (Ëx)§K([F]*) is directed and
x=‹((Ëx)§K([F]*)). We use induction. Let Qú›∫Ôå[F]∫, ≈:=‹Q´[F]å. Obviously
(Ë≈)§K([F]*)≠Ø. So let [a], [b]´(Ë≈)§K([F]*). We must have [a], [b]´QF, as
(F[i]Â[F]*)i´Ob(„) is well–structured and K([F]*)ú[F]. Then there exist some q1,q2´Q
with [a]<q1, [b]<q2 (Lemma 3.6) and also q3´Q with q1, q2<q3. q3=‹((Ëq3)§K([F]*)),
and therefore for some [c]´(Ëq3)§K([F]*) : [a], [b]<[c] (use again Lemma 3.6 and the
fact that (F[i]Â[F]*)i´Ob(„) is well–structured). So (Ë≈)§K([F]*) is directed. For any other
upper bound ∂ of (Ë≈)§K([F]*) we have ∂>(Ëq)§K([F]*) and therefore ∂>‹((Ëq)§K([F]*))=q
for all q´Q. But then ∂>‹Q=≈.¸
Notice that the proposition doesn't hold if (F[i]ÂX)i ´Ob(„) is an arbitrary natural sink
(even if X=[F]*).
Lemma 3.8
Let (F[i]Â[F]*)i´Ob(„) be a colimit in DCPO. An element [a]´[F] is finite if and only if
‡i´Ob(„) ‡ dir NúF[i] : a<F‹N ö a<Fn for some n´N.
Proof
(ö) : Assume we have some NúF[i] with a<F‹N, but for no n´N a<Fn. Then for the
directed set [N]:={[n]|n´N} in [F] we have [a]<[‹N]=‹[N]. We cannot have [a]<[n]
for any [n]´[N], so [a] is not finite.
(Ö) : Let [a]<‹M. Because (F[i]Â[F]*)i´Ob(„) is a colimit we must have [a]´MF. There
exists a minimal å´ORD with [a]´Må. If å≠0 then [a]<‹Q for some Qú›∫ÔåM∫. Also
[a]≤Q as å is minimal. We must have a directed subset Q´F[i] for some i´Ob(„), st.
fi(Q)=Q (see Definition 2.1). [a]<‹Q=fi(‹Q) is possible only if a<F‹Q. Then because of
the assumption, a<Fq for some q´Q and therefore [a]<Q. So å must be equal 0 and
[a]<M. This shows that [a] is finite.¸
The previous lemma will help us to prove the following proposition.
Proposition 3.9
Let F : „¨DCPO be a functor, st. F[i] is algebraic for all i´Ob(„) and F[˙] preserves
finite elements for all ˙´Mor(„). Let then (F[i]Â[F]*)i´Ob(„) be a colimit for F in DCPO.
15
The dcpo [F]* is algebraic.
Proof
First we want to show that [a]´K([F]*) for all a´K(F[i]), i´Ob(„). Because of Lemma
3.8, it is sufficient to show that a<F‹N ö a<Fn for some n´N. We will show that the
implication holds for all <å, å´ORD. First we look at <0. If we have F[˙](a)<F[˚](‹N),
then because F[˙] preserves finite elements we must have F[˙](a)<F[˚](n) for some
n´N and therefore aR0n. For the transitive closure we use induction. Let`s have aR0ib
and bR0i‹N ö aR0
i+1‹N (b´F[j]). Because F[j] is algebraic we have b=‹((Ëb)§K(F[j])).
So we have aR0ib* for some b*´(Ëb)§K(F[j]) and also b*R0
i‹N. Therefore b*R0in for
some n´N and aR0i+1n. For <å, å´ORD we can use the same argument as for <0.
Let now [x]´[F]. For some i´Ob(„) we have x´F[i] and x=‹((Ëx)§K(F[i])). So the set
(Ë[x])§K([F]*) is nonempty as fi((Ëx)§K(F[i]))úK([F]*). If [a], [b]´(Ë[x]§K([F]*), then
also a<Fx and b<Fx (colimit–condition 2). But then a<Fq1, b<Fq2 for some q1,
q2´(Ëx)§K(F[i]) (Lemma 3.8). We must have some q3>q1, q2 with q3´(Ëx)§K(F[i]) and
hence [a],[b]<[q3]. So (Ë[x])§K([F]*) is directed. That [x]=‹(Ë[x])§K([F]*) is clear.
[F]* is algebraic follows now from Proposition 3.7.¸
4 Acknowledgment
I would like to thank Michael Huth for several months of inspiring and very fruitful
discussions on domain theory. He also was kind enough to proofread parts of the
manuscript.
5 References
Adamek J., Herrlich H., Strecker G. [1990]
Abstract and Concrete Categories, John Wiley&Sons.
Fiech A. [1993]
Category of ΖFunctors, to appear in the Proceedings of the Ninth Conference on
Mathematical Foundations of Programming Semantics (April, 1993, New Orleans)
Fiech A., Schmidt D. [1993]
Polymorphic Lambda Calculus and Subtyping, in preparation
Gierz G. [1982]
Colimits of Continuous Lattices, Journal of Pure and Applied Algebra 23, p.137-144.
Gierz G., Hofmann K.H., Keimel K., Lawson J.D., Mislove M., Scott D.S. [1980]
16
A Compendium of Continuous Lattices, Springer–Verlag, Berlin.
Huwig H., Poigne A. [1990]
A Note on Inconsistencies Caused by Fixpoints in a Cartesian Closed Category, Theoretical
Computer Science 73, p.101-112.
Jung A.
Private notes communicated by Michael Huth in April 1992.
Jung A. [1989]
Cartesian Closed Categories of Domains, CWI Tract 66, Amsterdam.
Meseguer J. [1977]
On Order–Complete Universal Algebra and Enriche Functorial Semantics, Proceedings
of the 1977 International FCT–Conference, Poznan–Kornik, Poland, September 1977,
p.294-301.
Pierce B.C. [1991]
Basic Category Theory for Computer Scientists, The MIT Press, Cambridge.
Plotkin G. [1978]
The Category of Complete Partial Order : a Tool for Making Meanings, In Proceedings
of the Summer School on Foundations of Artificial Inteligence and Computer Science,
University di Pisa.
Scott D.S. [1982]
Domains for Denotational Semantics, LNCS vol. 140, Springer Verlag.
Smyth M.B., Plotkin G.D. [1982]
The Category–Theoretic Solution of Recursive Domain Equations, SIAM Journal of
Computing, vol.11, p.761-783.
Taylor P.
Homomorphisms, Bilimits and Saturated Domains, unpublished draft communicated
by Michael Huth in April 1992.
17