a categorical axiomatics for bisimulation

26
BRICS RS-98-22 Cattani et al.: A Categorical Axiomatics for Bisimulation BRICS Basic Research in Computer Science A Categorical Axiomatics for Bisimulation Gian Luca Cattani John Power Glynn Winskel BRICS Report Series RS-98-22 ISSN 0909-0878 September 1998

Upload: independent

Post on 12-Nov-2023

1 views

Category:

Documents


0 download

TRANSCRIPT

BR

ICS

RS

-98-22C

attanietal.:A

CategoricalA

xiomatics

forBisim

ulation

BRICSBasic Research in Computer Science

A Categorical Axiomatics for Bisimulation

Gian Luca CattaniJohn PowerGlynn Winskel

BRICS Report Series RS-98-22

ISSN 0909-0878 September 1998

Copyright c 1998, BRICS, Department of Computer ScienceUniversity of Aarhus. All rights reserved.

Reproduction of all or part of this workis permitted for educational or research useon condition that this copyright notice isincluded in any copy.

See back inner page for a list of recent BRICS Report Series publications.Copies may be obtained by contacting:

BRICSDepartment of Computer ScienceUniversity of AarhusNy Munkegade, building 540DK–8000 Aarhus CDenmarkTelephone: +45 8942 3360Telefax: +45 8942 3255Internet: [email protected]

BRICS publications are in general accessible through the World WideWeb and anonymous FTP through these URLs:

http://www.brics.dkftp://ftp.brics.dkThis document in subdirectoryRS/98/22/

A Categori al Axiomati s for BisimulationGian Lu a Cattani1, John Power2;�, Glynn Winskel11BRICSy, University of Aarhus, Denmark2LFCS, University of Edinburgh, S otlandSeptember 1998Abstra tWe give an axiomati ategory theoreti a ount of bisimulation inpro ess algebras based on the idea of fun tional bisimulations as openmaps. We work with 2-monads, T , on Cat. Operations on pro esses,su h as nondeterministi sum, pre�xing and parallel omposition aremodelled using fun tors in the Kleisli ategory for the 2-monad T .We may de�ne the notion of open map for any su h 2-monad; in ex-amples of interest, that agrees exa tly with the usual notion of fun -tional bisimulation. Under a ondition on T , namely that it be adense KZ-monad, whi h we de�ne, it follows that fun tors in Kl(T )preserve open maps, i.e., they respe t fun tional bisimulation. We fur-ther investigate stru tures on Kl(T ) that exist for axiomati reasons,primarily be ause T is a dense KZ-monad, and we study how thosestru tures help to model operations on pro esses. We outline how thisanalysis gives ideas for modelling higher order pro esses. We on ludeby making omparison with the use of presheaves and profun tors tomodel pro ess al uli.�This work is supported by EPSRC grant GR/J84205: Frameworks for programminglanguage semanti s and logi .yBasi Resear h in Computer S ien e, Centre of the Danish National Resear h Foun-dation.

Introdu tionWe seek a ategory theoreti axiomati a ount of bisimulation as studied in on urren y, for instan e by Milner [16℄. There have been several ategorytheoreti approa hes to bisimulation [8, 10℄. One of them, initiated by Joyal,Nielsen, and Winskel [10℄, uses the notion of open map to de�ne fun tionalbisimulation, then de�nes a bisimulation to be a span of epimorphi openmaps. That work has only partly been axiomati : they developed a parti ular onstru tion, namely the presheaf onstru tion, and studied properties of the2- ategory generated by it. Here, we adopt their de�nition of open map,but onsider a lass of onstru tions that are de�ned axiomati ally. Ourwork, although essentially generalising theirs, suggests ways of modellinghigher order pro esses that were not present (be ause of size problems) inthe presheaf approa h, but on the ontrary, does not dire tly in lude thenatural way of representing higher order pro esses in terms of internal homsthat has been suggested for presheaf models [22, 7℄. We shall expand on thisin Se tion 6.To model bisimulation using open maps in presheaf ategories, one startswith a notion of observation, su h as a tra e. Based upon that, one de�nesa small ategory of path obje ts (observation shapes), P, where an arrow isunderstood as witnessing an extension of one path by another. Then one onsiders the presheaf ategory [Pop;Set℄. Following [10, 9℄, one de�nes anopen map in [Pop;Set℄ relative to the ategory P and the Yoneda embeddingof P into [Pop;Set℄. A key example is given by the ategory of syn hronisa-tion trees over a set of labels L. These are the presheaves over the partialorder ategory L+ of �nite non empty strings over L, ordered by the pre�xordering. In this ase, epimorphi open maps orrespond to, so alled, zig-zagmorphisms that are fun tional bisimulations. The indu ed bisimulation rela-tion obtained by onsidering spans of su h epimorphi open maps oin ideswith Park-Milner's strong bisimulation [10℄. This dis ussion applies equallyto other notions of observation, su h as those arising from non interleavingmodels.Various questions arise here. First, typi ally in on urren y, one doesnot onsider arbitrarily bran hing trees. It is more usual to onsider �nitelybran hing trees, or trees for whi h the bran hing is limited, for instan e tobeing ountable. Se ond, in the ase of the ombined presen e of higherorder and names as in the Higher-Order �- al ulus, it is not lear whetherthe presheaf onstru tion is suÆ ient (see [5℄ for a more detailed dis us-1

sion).Third, it is not lear how to model weak notions of bisimulation. Ifwe an give an axiomati a ount of some of the relevant onstru tions, weare in a better position to address su h issues. An axiomati a ount also lari�es the reasoning behind the various de isions. So in this paper, wedo not take presheaf ategories for granted, but give an axiomati develop-ment of pre isely what stru ture we want in order to model on urren y andwhat onstru tions arise in manipulating that stru ture. For on reteness,we restri t our attention for the bulk of the paper to the operations neededin modelling CCS pro esses by syn hronisation trees. We o asionally re-fer to more involved examples that were treated using presheaf ategoriesin [22, 6, 5℄.We �rst observe that, given a ategory of observations, P, the basi oper-ations of CCS lead us to onsider the free ompletion of the ategory Punder ountable olimits: for our hoi e of P, that is equivalent to the ategory of ountably bran hing trees, as we shall see in Se tion 2. The onstru tion of ountable olimit ompletions extends to a 2-monad T on Cat with strong ategory theoreti properties, as explained in Se tions 2 and 3. Moreover, the onstru tions we wish to onsider, su h as nondeterministi sum or parallel omposition, arise from maps in Kl(T ), the Kleisli 2- ategory for T . That istypi al of basi onstru tions on P and of other ategories of observations.Under a ondition on a 2-monad T , namely that it be a denseKZ-monad,whi h we shall de�ne and whi h holds of all our leading examples, we ande�ne the notion of open map in ea h TC (for C a small ategory) andprove that maps in the Kleisli 2- ategory of T preserve all open maps. Thenotion of open map agrees, in our leading examples, with the usual notionof fun tional bisimulation. That forms the ontent of Se tion 3.We next onsider the stru ture of Kl(T ) for a 2-monad T on Cat thatsatis�es various onditions true of our examples. In parti ular, we show thatKl(T ) has �nite oprodu ts and �nite produ ts and that they agree, andthat it has a symmetri monoidal stru ture. From these fa ts, it follows thatthe various onstru tions on pro esses, su h as taking nondeterministi sum,applying a parallel operator, and pre�xing, preserve open maps. It also givesus a andidate for higher order stru ture (though outside Kl(T )), allowinga possible way to model a pro ess passing extension of CCS. This analysisforms Se tions 4 and 5.Finally, in Se tion 6, we ompare, espe ially as far as higher order is on erned, this work with that of [22, 6, 5, 7℄ using presheaves and profun torsto model pro ess al uli, and we suggest dire tions for future resear h.2

We do not address weak bisimulation at all here. In no way do we suggestthat it is unimportant. But it is su h a large issue that it requires a full paperdevoted to it. There are deli ate points involved. First, we do have some ideasabout how one might approa h it dire tly, as it amounts to an operation thattakes a tree representing strong bisimulation and repla ing it by a tree that isessentially but not quite a quotient, representing weak bisimulation. We hopethat our axiomati s may allow that, but we are not sure yet. Se ond, it isnot lear to us yet whether dire tly modelling weak bisimulation is the mostinteresting development. It may be better to develop a notion of ontextualequivalen e, using strong bisimulation as a te hnique, along the lines of thedevelopment of testing equivalen e. So we defer a detailed analysis of theissues to later work.To indu e bisimulation from fun tional bisimulation, it suÆ es to onsiderspans of epimorphi fun tional bisimulations. We are areful that all our onstru tions respe t su h spans, but we do not onsider them expli itlythrough the ourse of the paper.1 A Motivating ExampleFor on reteness, we onsider the pro ess al ulus CCS (assuming a �xedset of labels) as in [16℄ with models given by labelled syn hronisation trees;but our analysis holds more generally (see [10℄).De�nition 1.1 Let L be a set, not in luding the the letter � among its el-ements. Let �L = f�a j a 2 Lg, and de�ne the ategory L whose obje ts arestrings of arbitrary length, possibly in�nite, of elements of L[ �L[f�g, wherea map from p to q is a pre�xing of q by p, with omposition given by ompos-ing in lusions. The ategory L" is the full sub ategory of non empty stringsand L+ is the restri tion of L" to strings of �nite length.The omputation trees of all CCS pro esses are generated by two oper-ations freely applied to omputation paths. First, given pro esses P and Q,their nondeterministi sum has omputation tree determined by the disjointsum of the omputation trees of P and Q. Se ond, given pro esses P and Qand an a tion a, the omputation tree for a:(P + Q) is given by identifyingthe omputation trees for a:P and a:Q on the �rst step. So, to representthe omputation trees of nondeterministi sum and of pre�xing, we extendthe ategory L by freely adding �nite oprodu ts to model nondeterministi 3

sum and oequalisers to allow omputation paths to agree for a while as theypro eed. This is equivalent to freely adding �nite olimits [15℄. Thus we haveProposition/Example 1.2 The ategory of �nitely bran hing syn hronisa-tion trees with �nitely many maximal bran hes is equivalent to the free �nite olimit ompletion T!L" of the ategory L".This gives only a limited a ount of re ursion, as we have not allowed�nitely bran hing trees with more than �nitely many maximal bran hes.Moreover, in order to add value passing to CCS, one approa h has beento extend a binary nondeterministi operator to a ountable one [16℄. Thatyields the ategory of ountably bran hing trees, and we haveProposition/Example 1.3 1. The ategory of ountably bran hing syn- hronisation trees over L [ �L [ f�g, ST !, is equivalent to the free ountable olimit ompletion T!1L+ of L+.2. The ategory of �nitely bran hing syn hronisation trees over L[�L[f�g,ST f , is a full sub ategory of ST !.More generally,Proposition/Example 1.4 For any regular ardinal � > !, the ategory ofsyn hronisation trees with bran hing less than � is the free ompletion T�L+of L+ under olimits of size less than �.This line of argument applies not only to strings but to a range of no-tions of path obje ts, giving one reason to onsider, for any small ategoryC of path obje ts, the ategories T!C , T!1C , and more generally T�C offree olimit ompletions of C under �nite, ountable, and less than � size olimits respe tively. We shall soon have other reasons to onsider TC forvarious C , not just C = L+, even while restri ting our attention to trees,as they are needed to model many-sorted operations on trees to representnondeterministi sum and the like. So we seek an axiomati a ount of these onstru tions. 4

2 The general settingIn order to make our �rst observation, we need some de�nitions.De�nition 2.1 A 2-monad on Cat is a 2-fun tor T : Cat �! Cat, i.e.,a fun tor that sends natural transformations to natural transformations, re-spe ting domains, odomains and omposites of natural transformations, to-gether with 2-natural transformations � : T 2 ) T and � : id ) T , i.e.,natural transformations that respe t the 2- ategori al stru ture of Cat, sub-je t to three axioms expressing asso iativity of � and the fa t that � a ts asleft and right unit for �.Considerable detail of 2-monads and the ategory theoreti onstru tionsasso iated with them appears in [12℄, but we shall try to make this paper rea-sonably self- ontained in regard to 2-monads. The reason 2-monads interestus here is be ause we haveProposition 2.2 For any regular ardinal, �, T� extends to a 2-monad onCat.Returning to CCS as modelled by syn hronisation trees, an operationsu h as nondeterministi sum respe ts the stru ture of the omputation treesof P and Q. More pre isely, the fun tor + : TL+ � TL+ �! TL+ stri tlypreserves olimits of spe i�ed size. We shall show later that, for a general C(and in parti ular, when C = L+) TC � TC is of the form TD for anothersmall ategory D (= C+C ). So we are led to onsider stri t olimit preservingfun tors from TD to TC . These are arrows in the Kleisli 2- ategory for T ,whi h is de�ned as follows.De�nition 2.3 Given a 2-monad T on Cat, the Kleisli 2- ategory has asobje ts ategories of the form TC , and arrows those fun tors H : TC �! TDsu h that �DT (H) = H�C , with omposition given by usual omposition offun tors. An arrow in Kl(T ) may equivalently be des ribed as any fun torfrom C to TD . The 2- ells are those natural transformations � su h that�DT (�) = ��C .Proposition 2.4 The ategory of ountably bran hing syn hronisation treesover a �xed set of labels, ST !, together with fun tors from �nite produ tsof the ategory ST ! to itself that preserve the tree stru ture, form a fullsub ategory of the Kleisli ategory Kl(T!1).5

This result extends dire tly to syn hronisation trees of any bounded de-gree of bran hing, say �, with respe t to Kl(T�), with � a regular ardinalstri tly bigger than �.The situation is not so straightforward with other operators like pre�xingand parallel omposition. In fa t we annot expe t them to be dire tlyrepresented by arrows in Kl(T ). For instan e the parallel omposition ofpro esses does not distribute over the sum (P j(Q + R) 6�= (P jQ) + (P jR)).However, a more areful analysis we arry out in Se tion 5 will representthese other key operators in terms of arrows of Kl(T ) and hen e allow us todedu e axiomati ally that they respe t bisimulation too.Remark: The analysis ondu ted so far also gives us an idea about how tomodel higher order stru ture. Consider an extension of CCS that allows thepassing of pro esses. To model that, we must onsider a pro ess that maya ept some pro ess and produ e a pro ess, something like a �-abstra tion( f. [18℄). So we want a notion of higher order obje t. Consideration ofKl(T ) immediately provides one possibility: there is a natural isomorphismbetween the ategory Kl(T )[T (C � D ); TE ℄ and Cat[C ;Cat[D ; TE ℄℄. So onemight onsider the ategory Cat[D ; TE ℄ (or [D ; TE ℄ for short) as a possiblehigher order onstru t. But note that unless Kl(T ) is symmetri monoidal losed (whi h is rare), this onstru tion is not iterable within Kl(T ). Itmay however be iterable within a monoidal losed sub ategory of Kl(T ) bymimi king the way in whi h profun tors are onsidered monoidal losed in[22, 7℄. For example, suppose T is T! giving the ountable olimit ompletionof a ategory. If a ategory D is ountable in the strong sense that both itsobje ts and maps form ountable sets, then its ountable olimit ompletionTD is equivalent to [D op ;Set!℄, the full sub ategory of presheaves over Din whi h every set is ountable. The full sub ategory of Kl(T ) onsisting ofobje ts TC where C is ountable is monoidal losed; if D and E are ountablethen [D ; TE ℄ is isomorphi to T (D op �E) where the \fun tion spa e" D op �Eis also ountable. An analogous observation holds for � olimit ompletions,with in�nite ardinal size � repla ing ! and ountability.An obje t of [D ; TE ℄ is equivalent to a fun tor from TD to TE in Kl(T ),whi h in the ase of �nitely bran hing trees, is how we model operators onpro esses su h as nondeterministi sum. We shall return to this onstru tionwhen we analyse fun tional bisimulation in the next se tion.6

3 Fun tional bisimulations as open mapsWe now show how the notion of fun tional bisimulation in our examples maybe identi�ed with the notion of open map. Again, this holds more generally,as explained in [10℄, but for on reteness, we shall ontinue to restri t ourattention to CCS as modelled by syn hronisation trees, and the notion offun tional bisimulation there. For any 2-monad T on Cat, we an de�ne thenotion of open map on TC for arbitrary C , f [10℄.De�nition 3.1 Given a 2-monad T on Cat and a small ategory C , anarrow h : X �! Y in TC is open if for any ommuting square�C ( ) //p

��

�C (m) X��

h�C ( 0) //q Ywith m : ! 0 in C , there exists a map�C ( ) //p

��

�C (m) X��

h�C ( 0) 77r//q Ysu h that the two triangles ommute.Note that the diagonal map, r, need not be unique and typi ally is notunique. Working through the de�nition in examples, one veri�es that openmaps orrespond to fun tional bisimulations [10℄.A fundamental property of pro ess al uli (like CCS) is that onstru -tions involved in modelling the pro ess onstru tors preserve fun tional bisim-ulations, e.g., if P is fun tionally bisimilar to P 0, then P +Q must be fun -tionally bisimilar to P 0 +Q, and dually. This is exa tly to say, in modellingCCS by �nitely bran hing trees, that open maps are preserved by the fun tor+ : TC � TC �! TC :Thus we want a ondition on T satis�ed by all our examples and su h thatfun tors in Kl(T ) preserve open maps. The �rst major result of the papergives su h a ondition. First, we need some de�nitions.7

De�nition 3.2 A KZ-monad is a 2-monad for whi h the multipli ation � :T 2 =) T is left adjoint to �T with ounit of the adjun tion given by theidentity, where � is the unit of the 2-monad, i.e., for every small ategory C ,the fun tor �C : T 2C �! TC is left adjoint to the fun tor �TC : TC �! T 2C ,and the adjun tions are preserved by fun tors H : C �! D . It is equivalent toask that � be right adjoint to T�, with the identity being the unit (see [13, 21℄).The notion of KZ-monad was introdu ed to study parti ular features of2-monads given by free ompletions under lasses of olimits [13℄. But theydo not hara terise su h free ompletions, as the following example shows.Example 3.3 Consider the 2-monad on Cat that sends every ategory tothe one obje t one arrow ategory 1. It is a KZ-monad trivially, but it doesnot give free ompletions under a lass of olimits be ause C typi ally is nota full sub ategory of 1.Notation:� Given a 2-monad T on Cat, let ~�C : TC �! [C op;Set℄ denote the fun torthat sends an obje t X to the fun tor TC (�C�;X) : C op �! Set.� Given fun tors H : C �! D and J : C �! C 0, the left Kan extension of Halong J is given by a fun tor LanJH : C 0 �! D and a natural transformation� : H ) (LanJH)J that is universal among su h natural transformations,i.e., given any fun tor K : C 0 �! D and any natural transformation � : H )KJ , there exists a unique natural transformation : LanJH ) K su h that� = J�.If it exists, a left Kan extension is unique up to oherent isomorphism.If J is fully faithful and a left Kan extension exists, then � is ne essarily anisomorphism. The left Kan extension always exists if C is a small ategory andD is o omplete (see [15℄, [11℄ or [3℄ for more detail on left Kan extensions,see [6℄ for appli ations to on urren y).De�nition 3.4 A 2-monad T on Cat is dense if for every small ategory C ,the fun tors �C : C �! TC and ~�C : TC �! [C op;Set℄ are fully faithful, andfor any H : C �! D, the fun tor LanyC (yDH) : [C op;Set℄ �! [D op;Set℄,where yC : C �! [C op;Set℄ is the Yoneda embedding, restri ts to TH :TC �! TD up to oherent isomorphism.8

In our examples, �C is the in lusion of a ategory C into its free olimit ompletion of spe i�ed size; we shall not need an expli it des ription of �C .Moreover, �C : C �! TC is always fully faithful, and it follows by a generaltheorem [11℄ that, sin e ea h obje t of TC is a olimit of a diagram in C ,the fun tor ~�C : TC �! [C op;Set℄ is also fully faithful, and for every givenfun tor H : C �! D , the fun tor LanyC (yDH) : [C op;Set℄ �! [D op;Set℄restri ts to TH : TC �! TD up to oherent isomorphism. We haveProposition 3.5 If � is any regular ardinal, T� is a dense KZ-monad.Now we an state our �rst major theorem.Theorem 3.6 Let T be a 2-monad on Cat for whi h �C : C �! TC and~�C : TC �! [C op;Set℄ are fully faithful for every C . Then T is a dense KZ-monad if and only if every fun tor F : TC �! TD in Kl(T ) is the restri tionof LanyC (~�DF�C ) : [C op ;Set℄ �! [D op;Set℄ up to oherent isomorphism.Moreover, under the equivalent onditions, every F in Kl(T ) is a left Kanextension of F�C : C �! TD along �C : C �! TC .Proof: Suppose T is dense and KZ, and let F : TC �! TD be a fun torin Kl(T ). Then F = �DK where K = F�C : C �! TD . Using the density ondition applied to K and the de�nition of KZ-monad, and the fa t thatleft Kan extensions into o omplete ategories (su h as [(TD )op;Set℄) are olimits, so are preserved by fun tors with right adjoints, gives the result.For the onverse, given H : C �! D , let F = TH. By naturality of �and sin e ~�D�D = yD : D �! [D op;Set℄ by fully faithfulness of �D , it followsthat ~�DF�C = yDH, so T is dense.To see that T is KZ, �rst observe that �C : T 2C �! TC is a fun tor inKl(T ) sin e, by the monad laws, it respe ts the stru ture of T . So, up toisomorphism, �C is the restri tion of LanyTC (~�C�C �TC ) = LanyTC ~�C . But, byfully faithfulness of ~�C , the fun tor �TC : TC �! T 2C is the restri tion of thefun tor sending K�[C op;Set℄ to [C op;Set℄(~�C�;K), but this latter fun toris the right adjoint of LanyTC ~�C . Sin e ~�C and ~�TC are both fully faithful, itfollows that �C is left adjoint to �TC .For the �nal statement of the theorem, given any K : TC �! TD , itfollows by fully faithfulness of ~�C : TC �! [C op ;Set℄ that ~�DK is isomorphi to Lan~�C (~�DK)~�C . Moreover, sin e �C is fully faithful, the Yoneda embed-ding yC : C �! [C op;Set℄ equals ~�C �C . Hen e any natural transformation9

� : F�C ) K�C , indu es a natural transformation from ~�DF�C : C �![TD op;Set℄ to Lan~�C (~�DK)yC , hen e by de�nition of left Kan extension, anatural transformation�� : LanyTC (~�DF�C )) Lan~�C (~�DK) :The result follows immediately from fully faithfulness of ~�D and the two ommutativities up to oherent isomorphism. 2Corollary 3.7 Given a dense KZ-monad T on Cat, for every C , �C is theleft Kan extension of id : TC �! TC along �TC : TC �! T 2C and is therestri tion of [�C ;Set℄ : [TC op ;Set℄ �! [C op; Set℄.Corollary 3.8 Let T be a dense KZ-monad on Cat. Then every fun torin Kl(T ) preserves open maps.Proof: Given a small ategory C , one may de�ne open maps in [C op;Set℄just as we did in TC , with openness relative to the Yoneda embedding yC :C �! [C op ;Set℄. It was stated in [6℄ (a proof will appear in the forth omingPhD thesis of the �rst author of this paper) that all fun tors of the formLanyC (yDH) : [C op ;Set℄ �! [D op;Set℄ preserve open maps. Sin e �C and ~�Care both fully faithful, a map in TC is open if and only if its image under ~�Cis open. Putting that together with Theorem 3.6 yields the result. 2We regard this orollary as fundamental for the reasons outlined above.In order to a ount for bisimulation at higher types, we need to extend thenotion of open map from ategories of the form TC to ategories of the form[D ; TE ℄. By onstru tion, Cat[C ; [D ; TE ℄℄ is isomorphi to Kl(T )[T (C �D ); TE ℄. So, putting C = 1 and onsidering this isomorphism on maps ofthe two ategories, we see that to give a map in [D ; TE ℄ is to give a naturaltransformation between fun tors in Kl(T ) from TC to TD . The weakestplausible de�nition isDe�nition 3.9 A map � : X �! Y in [D ; TE ℄, i.e., a natural transfor-mation between X and Y is open if every omponent of the orrespondingnatural transformation in Kl(T ),�� def= �ET (�) ;is open in TE. 10

Thus, Corollary 3.8 gives usProposition 3.10 For every fun tor F : TE �! T A in Kl(T ), ompositionwith F sends open maps in [D ; TE ℄ to open maps in [D ; T A ℄.Trivially, using the omposition in Kl(T ), omposition with respe t to Dalso preserves open maps. This suggests a notion of fun tional bisimulationat higher types arising from ategory theoreti prin iples. Obviously, it mustbe tested against on erns arising naturally from on urren y, but we defersu h investigations here.Remark: It might seem tempting in De�nition 3.9 to de�ne � to be open ifevery omponent �D, for D an obje t of D , was open in TE. This de�nitionwould have had a signi� ant drawba k. Its hoi e would have meant thatopen maps were no longer losed under horizontal omposition in Kl(T ),i.e., � open in [D ; TE ℄ and � open in [E; TF℄ would not have implied that� � � was open in [D ; TF℄. In other words, restri ting the 2- ells of Kl(T )to be open a ording to this hoi e of de�nition would not have yielded asub-2- ategory of Kl(T ). In omputational terms, the de�nition would nothave enfor ed that bisimilar abstra tions a ted on the same input pro ess togive bisimilar outputs. This is surely the minimal requirement one expe ts ofbisimulation for higher-order pro esses (the requirement is obviously satis�edby De�nition 3.9). Note that the de�nition of open map and bisimulationin [22, 7℄, arising from the monoidal losed stru ture of profun tors, is astri ter way to ensure that horizontal omposition preserves openness thanthe ondition of De�nition 3.9 above.Theorem 3.6 is of fundamental importan e. It an be used to hara teriseall dense KZ-monads on Cat. The notion of dense KZ-monad is the entralnew mathemati al notion we introdu e in this paper. It in ludes all monadsthat arise as free ompletions under a lass of olimits, and it is possible,using Theorem 3.6, to hara terise dense KZ-monads in those terms. Thatis beyond the s ope of this paper (see [17℄), but we do remark that the pre isestatement is very subtle. For instan e,Example 3.11 There exists a dense KZ-monad T for whi h there is no lass S of small ategories su h that for every small ategory C , the ategoryTC is the free ompletion of C under olimits of diagrams with shape in S.Consider T0 = 0 (0 being the empty ategory) with TC given by freely adding11

an initial obje t to C for all other C . Suppose our laim was false. Sin eT0 is empty, it follows that every ategory in S must be nonempty. The free ompletion of C under olimits of diagrams with shape in S is given by atrans�nite indu tion. At every step in that onstru tion, one adds a new olimit. But sin e ea h ategory in S is nonempty, ea h new olimit addedmust have an arrow into it from a pre-existing obje t, so ultimately from anobje t of C . So at no point in the trans�nite indu tion does one introdu e aninitial obje t, a ontradi tion.4 Stru ture of Kl(T ) for dense KZ-monadsBased upon our results of the previous two se tions, in parti ular Corol-lary 3.8, in this se tion we investigate the stru ture of ategories of the formKl(T ) for dense KZ-monads T . Of ourse, that in ludes (size bounded) olimit ompletions as illustrated in Se tion 3.Routinely, as for any monad on a ategory with oprodu ts, we haveProposition 4.1 For any 2-monad T on Cat, the 2- ategory Kl(T ) has oprodu ts, with the oprodu t of TC and TD in Kl(T ) given by the on-stru tion T (C + D ) in Cat.This does not immediately appear to be of omputational interest, al-though it does generalise a domain theoreti property on ! � Cpo whi h isused to model onditional statements. However, we shall soon show that,under a mild extra ondition, T (C + D ) is isomorphi to TC �TD , and thatis important to us as the latter onstru tion is used in de�ning nondetermin-isti sum for example. It will follow that Kl(T ) has �nite produ ts, with theprodu t in Kl(T ) of TC and TD given by T (C + D ). But �rst, we haveTheorem 4.2 If T is a dense KZ-monad on Cat, then Kl(T ) is a sym-metri monoidal 2- ategory, with TC TD given by T (C � D ).Proof: To give a symmetri monoidal stru ture on Kl(T ) that extends the�nite produ t stru ture on Cat is equivalent to showing that the strength onT orresponding to its Cat-enri hment is ommutative. What that means isas follows. For ea h obje t X of C , onsider the fun tor tX : D �! T (C �D )determined by �C�D omposed with the fun tor into C hoosing the obje tX. Every map f : X �! Y in C determines a natural transformation12

from tX to tY . Sin e the isomorphism between Kl(T )[TD ; T (C � D )℄ andCat[D ; T (C � D )℄ is an isomorphism of ategories, we obtain a fun tor t :C �TD �! T (C �D ). Dually, we obtain a fun tor �t : TC �D �! T (C �D ).To obtain a symmetri monoidal stru ture on Kl(T ), it suÆ es to show thatthe two ways of using these onstru tions to obtain a fun tor �T : TC�TD �!T (C � D ), either by �rst applying t, then applying T�t, then applying �, ordually, give the same result.To see that, re all that for every fun tor F : C �! TD , the lifting ofF to Kl(T ) is given, up to isomorphism, by the restri tion of LanyC (yDF ).And �C : T 2C �! TC is the restri tion, up to isomorphism, of [�C ;Set℄ :[TC op;Set℄ �! [C op ;Set℄. The result now follows by tedious al ulation ofthe extension of the two omposites to the presheaf ategories. 2In the proof of the Theorem 4.2, we have shownProposition 4.3 If T is a dense KZ-monad on Cat and X is an obje t ofTD , then TC �= TC � 1 //id�X TC � TD //

T T (C � D )is in Kl(T ).This opens a se ond ategory theoreti ally natural andidate for mod-elling pro ess passing CCS. For any 2-monad on Cat, the Kleisli 2- ategoryKl(T ) embeds fully into the 2- ategory T�Alg, whi h is the other major onstru tion one studies given a 2-monad (see [1℄). It follows from the Theo-rem 4.2 that for any dense KZ-monad T on Cat subje t to a size onditionthat all our leading examples satisfy, the 2- ategory T�Alg is symmetri monoidal losed [14℄. That losed stru ture is another andidate for mod-elling higher order stru ture. It is not lear how to de�ne the notion of openmap in this setting, but one might restri t attention to ategories in Kl(T )and ategories generated by applying a higher order onstru tion to them; itmay be possible to de�ne open maps for any su h ategory similarly to theprevious se tion; but we leave that for further work.For any regular ardinal �, T��Alg is the 2- ategory of small ategorieswith olimits of size up to � and fun tors that preserve them stri tly.As promised before, we now onsider onstru tions of the form TC �TD .We �rst mention that if T is a KZ-monad and TH stri tly preserves any lass13

of olimits, for H : C ! D any fun tor between any two small ategories,then it follows that every fun tor in Kl(T ) preserves that lass of olimits.However, be ause of a parti ularly subtle but important di�eren e in ategorytheory between the notions of stri t preservation and ordinary preservationof a olimit, it need not follow that every fun tor in Kl(T ) stri tly preservesthe lass of olimits. We avoid analysing that distin tion in the statement ofthe theorem, although resolutions are well known to us [11℄. SuÆ e it to saythat it follows from routine ategory theory that all our examples satisfy thehypotheses of the following theorem.Theorem 4.4 Let T be a dense KZ-monad on Cat, and suppose every TChas �nite oprodu ts given by restri tion from [C op;Set℄, and every fun torin Kl(T ) stri tly preserves �nite oprodu ts. Then the ategory TC � TD isisomorphi to T (C + D ) naturally in C and D and oherently with respe t tothe asso iative, ommutative, and unitary stru tures of binary produ t and oprodu t.Proof: Using the universal property of the Kleisli onstru tion, and usingthe universal properties of produ ts and oprodu ts, in order to de�ne afun tor H : T (C + D ) �! TC � TD , we give fun tors from C to ea h of TCand TD and from D to ea h of TC and TD . We de�ne them by �C and the onstant at the initial obje t of TD , and by duality.We de�ne K : TC � TD �! T (C + D ) by sending (X;Y ) to (T i0)X +(T i1)Y , where i0 : C �! C + D and i1 : C �! C + D are the left and right oproje tions respe tively.We must show that H and K are mutually inverse. They are obvi-ously natural in C and D . To see that KH = idT (C+D ) , �rst see thatKH�C+D = �C+D , whi h may be he ked on ea h omponent. That followsroutinely sin e T i0 stri tly preserves the initial obje t, and dually. Now, sin e�nite oprodu ts are given by restri tion from [C op;Set℄ and using routinemanipulation of diagrams, the ommutativity extends to T (C + D ).To see thatHK = idTC�TD , we must verify that �0HK = �0 and �1HK =�1, where �0 and �1 are the �rst and se ond proje tions from TC � TDrespe tively. By de�nition, �0H and �1H both lie in Kl(T ), so preserve�nite oprodu ts stri tly. Restri ting our attention to �0, the other asebeing dual, it suÆ es to show that (�0H � �0H)(T i0 � T i1) sends (X;Y )to (X; 0), where 0 is the initial obje t of TC . Again, this amounts to two ommutativities. 14

For the �rst, observe that �0H = �CT (�C; 0), so pre omposing with T i0yields the identity sin e (�C ; 0)io = �C and by one of the monadi unit laws,giving the desired ommutativity.For the se ond, by a similar al ulation, it suÆ es to show that the liftingof the onstant fun tor 0 : D �! TC to TD is the onstant fun tor at theinitial obje t 0 of TC . But by Theorem 3.6, the lifting is given by the leftKan extension of 0 : D �! TC along �C : C �! TC ; and one an he k by al ulation that that is ne essarily the onstant at 0. 2As promised before, this theorem allows us to onsider onstru tions ofthe form TC � TC �! TC , as required to model nondeterministi sum forexample, as fun tors of the form TD �! TC in Kl(T ). So, su h fun torspreserve open maps, hen e fun tional bisimulations, as desired.Remark: Theorem 4.4 is an instan e of a limit/ olimit oin iden e [19, 20,4℄. In parti ular, by ategori al folklore, the oprodu t in Kl(T ), T (C + D )is also a bi ategori al version of produ t be ause both Kl(T )[TC ; T (C + D )℄and Kl(T )[TD ; T (C +D )℄ have oprodu ts that are preserved by ompositionand the oproje tionsT (i) : TC �! T (C + D ) � T (D ) : T (j)have right adjoints (that be ome proje tions for the produ t). Su h a resultallows us to on lude that T (C +D ) is a produ t in a bi ategori al sense [21℄but not in the stri t sense we are asserting; that is, from the limit/ olimit oin iden e we ould only dedu e (in prin iple) an equivalen e T (C + D ) 'TC � TD but not an isomorphism as we do in the proof of Theorem 4.4.Nonetheless the link of Theorem 4.4 to the more general question of whenlimits and olimits of ertain diagrams of adjoint pairs oin ide is worthexploring in greater detail also to see under what ondition one an obtainlimits in the usual ategori al sense rather than in the bi ategori al one.5 Parallel Composition and Pre�xingWe already mentioned in Se tion 2 that parallel omposition and pre�xingare not modelled as dire tly as the sum. Prompted by the desire to give anaxiomati treatment of these operations, we arry out some further analysisof Kl(T ). We on entrate �rst on the lass of examples given by the free ompletions under all olimits up to a ertain size �.15

De�nition 5.1 Let (�)? be the 2-monad on Cat that freely adds to a small ategory a stri t initial obje t.De�nition 5.2 For any regular ardinal �, let C� be the 2-monad on Catthat takes a small ategory C to its free ompletion under all onne ted ol-imits of size less than �.Proposition 5.3 The 2-monad on Cat, T� that takes a small ategory C toits free ompletion under all olimits of size less than � an be fa tored asT� = C�((�)?) :Corollary 5.4 For small ategories C and D ,Kl(C�)[T�C ; T�D ℄ �= Kl(T�)[T�C ? ; T�D ℄Proof: Kl(C�)[T�C ; T�D ℄ = Kl(C�)[C�C ? ; T�D ℄�= Cat[C? ; T�D ℄�= Kl(T�)[T�C? ; T�D ℄ 2Hen e there is a way of representing onne ted olimit preserving fun torsbetween T�C and T�D as arrows of Kl(T�).We now onsider pre�xing and parallel omposition for CCS.5.0.1 Pre�xing:Let a 2 L. De�ne prea : L+? ! L+ as follows? 7! ap 7! apBy post- omposing prea with �L+ we obtain a fun tor L+? ! T�(L+), i.e., a onne ted olimit preserving fun tor,Prea : T�(L+)! T�(L+):This de�nes pre isely the usual pre�xing operator on trees.16

5.0.2 Parallel Composition:One starts from a fun tor jj : L? � L? ! T�(L)that indu es an arrow jj! : T�(L? � L?)! T�(L) in Kl(T ). In order to getj : T�(L)� T�(L)! T�(L)one needs to embed T�(L) � T�(L) into T�(L? � L?). Re all that T� is ommutative and note that, if i : L ! L? is the unit at L of the 2-monad,(�)?, and � : L? ! T�(L?) is the unit at L? of the 2-monad T�, thenLan~i(�L?) : T�(L)! T�(L?) exists, hen e we an form the embeddingT�(L)� T�(L) //

Lan~i(�L?)�Lan~i(�L?)T�(L?)� T�(L?) //

�T(L?;L?) T�(L? � L?) :Call the omposite above e, and de�ne j = jj!e. By Proposition 4.3, �Tpreserves olimits in both arguments separately, hen e j preserves onne ted olimits in both arguments separately.In [22, 5℄ expli it des riptions based on de omposition results for presheaveswere given of pre�xing and parallel omposition. In [5℄ it was suggested howto re over expli it des riptions in the above terms when T is repla ed by thepresheaf ompletion.Turning to bisimulation, we haveProposition 5.5 Any onne ted olimit preserving fun tor between T�(C )and T�(D ) preserves epimorphi open maps.Corollary 5.6 Pre�xing and parallel omposition fun tors on syn hronisa-tion trees preserve bisimulation.We on lude this se tion by showing a way of axiomatising the situation justdes ribed, where the omposite of two 2-monads gives rise to a third onetogether with ongruen e properties with respe t to bisimulation from openmaps. Let R be a dense KZ-monad on Cat and let S be another 2-monadon Cat (not ne essarily KZ). By a distributive law of S over R one mean anatural transformation Æ : SR) RS that preserves multipli ations ad unitsof the two 2-monads [2℄. If su h a distributive law is given, then a 2-monad17

stru ture is indu ed on the omposite fun tor T = RS. So we have ( f.Corollary 5.4) Kl(R)[TC ; TD ℄ �= Kl(T )[TSC ; TD ℄ :In parti ular, one obtains a fun tor in Kl(R) from a fun tor F : TSC ! TDin Kl(T ), by pre omposing F with R�SC : TC = RSC ! RSSC = TSC ,where � : Id ) S is the unit of S. Moreover, at ea h C , R�SC sends openmaps with respe t to SC to open maps with respe t to SSC , as we sawin Corollary 3.6. So, if one has that, in TC , being open with respe t to Cimplies being open with respe t to SC , then the every fun tor in Kl(R) ofdomain TC preserves open maps with respe t to C .In our ase this spe ialises to S = (�)? and R = C�. Although this mayseem a heavy way to axiomatise something for whi h we have given only onesubstantial example, note that even in this single ase it is easier to he kthat it satis�es all the needed requirements than it is to provide a dire tproof.6 Con lusions and further workWe have onsidered dense KZ-monads T on Cat, and dedu ed the exis-ten e of various stru tures on the 2- ategory Kl(T ) that allow us to givean axiomati a ount of fun tional bisimulation, showing that various on-stru tors su h as pre�xing, nondeterministi sum, and a parallel operator,may axiomati ally be seen as preserving fun tional bisimulations. We haveproved, under an additional ondition, that Kl(T ) has �nite produ ts and oprodu ts (and they agree), and a symmetri monoidal stru ture, and it sup-ports some higher order stru ture. The axioms all hold of for KZ-monadsindu ed by free olimit ompletions as outlined in Se tion 3.The obvious losely related work, in fa t work on whi h our Theorem 3.6depends, was that of [6℄ whi h onsidered ategories of presheaves and pro-fun tors. In fa t, the free ompletion under all olimits of a small ategory Cis equivalent to the ategory [C op ;Set℄. A proof appears in [11℄. It is one ofthe fundamental theorems of ategory theory. However, the free ompletionunder all olimits, unlike our examples of Se tion 3, does not form a 2-monadon Cat. The reason is size: if C is a small ategory, then so are T!C , T!1C ,and T�C , but [C op ;Set℄ is not, so it is not an obje t of Cat. However, one an pass to a larger universe of sets. Doing this allows us to see some of theresults about presheaf ategories and profun tors in our terms. Spe i� ally,18

our work here gives independent proofs that the 2- ategory of free omple-tions under all olimits, with stri t olimit preserving fun tors, has all �niteprodu ts and oprodu ts (and they agree), and is symmetri monoidal, withsymmetri monoidal stru ture given by T (C � D ).In fa t, more is true of this parti ular 2- ategory, well-known to bebiequivalent to the bi ategory of profun tors. In parti ular, unlike examplesgiven by dense KZ-monads in general, it is symmetri monoidal losed andso provides models for higher order pro esses (see [22, 7℄). In the light of theabove paragraph, that onstru tion an also be seen axiomati ally, by on-sidering a full sub ategory of Kl(T ) for a parti ular dense KZ-monad T . ByRemark 2, ending Se tion 2, the same axiomatisation would be appropriatefor any KZ-monad T of the form T� for an in�nite ardinal �; the monoidal losure of profun tors would ut down to monoidal losed stru ture on fullsub ategories of Kl(T ) whose obje ts TD were subje t to a size restri tionon D . One of our major goals in further work is to study bisimulation onhigher order pro esses in more depth.Another main goal for future work is the study of weaker forms of equiva-len e. An obvious su h lass of equivalen es to onsider here are those givenby weak bisimulation. That involves a onstru tion that takes a tree to an-other tree, broadly but not pre isely by a quotienting operation. Anotherobvious lass of equivalen es here are those given by ontextual equivalen e,for instan e testing or failures equivalen e. We hope to pursue one of thoseequivalen es too.Finally, we seek an operational a ount of the stru tures we are develop-ing. As in [7℄, this may provide new versions of pro ess passing al uli witha �rm semanti foundation.Referen es[1℄ R. Bla kwell, G.M. Kelly, and A.J. Power. Two-dimensional monadtheory. Journal of Pure and Applied Algebra, 59:1{41, 1989.[2℄ M. Barr, C. Wells. Toposes, Triples and Theories. Springer-Verlag,1985.[3℄ F. Bor eux. Handbook of Categori al Algebra, vol. 1. CUP, 1994.19

[4℄ G. L. Cattani, M. Fiore, and G. Winskel. A Theory of Re ur-sive Domains with Appli ations to Con urren y. In Pro eedings ofLICS '98, pages 214{225, 1998.[5℄ G. L. Cattani, I. Stark, and G. Winskel. Presheaf Models for the �-Cal ulus. In Pro eedings of CTCS '97, LNCS 1290, pages 106{126,1997.[6℄ G. L. Cattani and G. Winskel. Presheaf Models for Con urren y.In Pro eedings of CSL' 96, LNCS 1258, pages 58{75, 1997.[7℄ G. L. Cattani and G. Winskel. On bisimulation for higher orderpro esses. Manus ript, 1998.[8℄ B. Ja obs and J. Rutten. A tutorial on (Co)algebras and(Co)indu tion. EACTS Bulletin 62 (1997) 222-259.[9℄ A. Joyal and I. Moerdijk. A ompleteness theorem for open maps.Annals of Pure and Applied Logi , 70:51{86, 1994.[10℄ A. Joyal, M. Nielsen, and G. Winskel. Bisimulation from openmaps. Information and Computation, 127:164{185, 1996.[11℄ G.M. Kelly. Basi on epts of enri hed ategory theory. LondonMath. So . Le ture Note Series 64, CUP, 1982.[12℄ G.M. Kelly and R. Street. Review of the elements of 2- ategories.In Pro eedings of Sydney Category Theory Seminar 1972/73, LNM420, pages. 75{103, Springer-Verlag, 1974.[13℄ A. Ko k. Monads for whi h stru tures are adjoint to units. Journalof Pure and Applied Algebra, 104:41{59, 1995[14℄ A. Ko k. Closed ategories generated by ommutative monads.Journal of the Australian Mathemati al So iety, 12:405{424, 1971.[15℄ S. Ma Lane. Categories for the working mathemati ian. Springer-Verlag, 1971.[16℄ R. Milner. Communi ation and on urren y. Prenti e Hall, 1989.20

[17℄ A. J. Power, G. L. Cattani and G. Winskel. A representation resultfor free o ompletions. Submitted for publi ation.[18℄ D. Sangiorgi. Bisimulation for higher-order pro ess al uli. Infor-mation and Computation, 131(2):141{178, 1996.[19℄ D. S. S ott. Continuous latti es. In F.W. Lawvere, editor, Toposes,Algebrai Geometry and Logi , LNM 274, pages 97{136. Springer-Verlag, 1972.[20℄ M.B. Smyth and G. D. Plotkin. The ategory-theoreti solu-tion of re ursive domain equations. SIAM Journal of Computing,11(4):761{783, 1982.[21℄ R. Street. Fibrations in Bi ategories. Cahiers de Topologie etG�eom�etrie Di��erentielle, XXI(2):111-160, 1980.[22℄ G. Winskel. A presheaf semanti s of value-passing pro esses. InPro eedings of CONCUR'96, LNCS 1119, pages 98{114, 1996.

21

Recent BRICS Report Series Publications

RS-98-22 Gian Luca Cattani, John Power, and Glynn Winskel.A Cate-gorical Axiomatics for Bisimulation. September 1998. ii+21 pp.Appears in Sangiorgi and de Simone, editors,ConcurrencyTheory: 9th International Conference, CONCUR ’98 Proceed-ings, LNCS 1466, 1998, pages 581–596.

RS-98-21 John Power, Gian Luca Cattani, and Glynn Winskel.A Repre-sentation Result for Free Cocompletions. September 1998.

RS-98-20 Søren Riis and Meera Sitharam.Uniformly Generated Submod-ules of Permutation Modules. September 1998. 35 pp.

RS-98-19 Søren Riis and Meera Sitharam.Generating Hard TautologiesUsing Predicate Logic and the Symmetric Group. September1998. 13 pp.

RS-98-18 Ulrich Kohlenbach. Things that can and things that can’t bedone in PRA. September 1998. 24 pp.

RS-98-17 Roberto Bruni, Jose Meseguer, Ugo Montanari, and VladimiroSassone.A Comparison of Petri Net Semantics under the Collec-tive Token Philosophy. September 1998. 20 pp. To appear in4thAsian Computing Science Conference, ASIAN ’98 Proceedings,LNCS, 1998.

RS-98-16 Stephen Alstrup, Thore Husfeldt, and Theis Rauhe.MarkedAncestor Problems. September 1998.

RS-98-15 Jung-taek Kim, Kwangkeun Yi, and Olivier Danvy. Assessingthe Overhead of ML Exceptions by Selective CPS Transforma-tion. September 1998. 31 pp. To appear in the proceedings ofthe 1998 ACM SIGPLAN Workshop on ML, Baltimore, Mary-land, September 26, 1998.

RS-98-14 Sandeep Sen.The Hardness of Speeding-up Knapsack. August1998. 6 pp.

RS-98-13 Olivier Danvy and Morten Rhiger.Compiling Actions by PartialEvaluation, Revisited. June 1998. 25 pp.

RS-98-12 Olivier Danvy. Functional Unparsing. May 1998. 7 pp. Thisreport supersedes the earlier report BRICS RS-98-5. Extendedversion of an article to appear in Journal of Functional Pro-gramming.