Colimits in the Category DCPO

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 MuD 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 U. The lower set of x, Ex, is defined as Ex := {d D|d<x} (analog ex). A subset MuD is directed if for every finite subset M'uM there exists an upper bound m M for M'. A directed complete partial 2 order (dcpo) is a poset (D,<), st. every directed subset MuD 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 MuA, 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 UuD is called Scott–open if U=eU and if for every directed set M, ‹M Uom U for some m M. A subset VuD is Scott–closed if V=EV and if V is closed under directed lubs. A category „ is a quadruple „=(O,hom,id,o) 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) o is a composition operator assigning to each pair of morphism f:A B, g:B C the composite morphism gof:A C. We also require that fo(goh)=(fog)oh (h:C D) and idAof=f, goidB=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 „,I be categories. A functor F:„ I is a function that assigns to each „–object A a I–object F(A) and to each „–morphism f:A B a I–morphism F(f):F(A) F(B), st. F(fog)=F(f)oF(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:„ I is a functor then an I–sink (F[i]ÂA)i Ob(„) is natural for F if for each „–morphism d : i j, fjoF[d]=fi. A colimit of F is a natural sink (F[i]ÂC)i Ob(„), st. for any other natural sink (F[i]EA)i Ob(„) there exists a unique morphism h:C A with hofi=gi for all i Ob(„). A category I is cocomplete if every functor F from a small category „ (i.e., the class of objects in „ is a set) into I has a colimit in I. 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.