A map in the category P!-Coalg of. 3This work has been done with the support of EPSRC grant. GR/J84205: Frameworks for programming language semantics.
An Axiomatics for Categories of Transition Systems as Coalgebras 3
Peter Johnstone
John Power
Toru Tsujishita
Dept of Pure Mathematics
Dept of Comp Science
Dept of Mathematics
University of Cambridge
University of Edinburgh
Hokkaido University
Cambridge CB2 1SB
Edinburgh EH9 3JZ
Sapporo 060{0810
England
Scotland
Japan
Hiroshi Watanabe
James Worrell
Semantics Group
Oxford University Computing Lab
Electrotechnical Laboratory
Parks Road
Tsukuba 305-8568
Oxford OX1 3QD
Japan
England
Abstract
We consider a nitely branching transition system as a coalgebra for an endofunctor on the category Set of small sets. A map in that category is a functional bisimulation. So, we study the structure of the category of nitely branching transition systems and functional bisimulations by proving general results about the category H -Coalg of H -coalgebras for an endofunctor H on Set. We give conditions under which H -Coalg is complete, cocomplete, symmetric monoidal closed, regular, and has a subobject classi er.
1 Introduction
A nitely branching transition system is a set A together with a function from A to the set of nite subsets of A, i.e., a pair (A; : A 0! P! (A)), where P! (A) is the set of nite subsets of X . The construction P! can be made into a functor from the category Set to itself: on objects, it is as we have described it, and on arrows, it sends a function f : A 0! B to the function P! (f ) that sends a nite subset of A to its image under f in B. The functor P! , in contrast to the ordinary powerset functor P , is nitary (see De nition 3.2), a fundamental condition for us. A nitely branching transition system is precisely a coalgebra for the endofunctor P! , as a ! b precisely when b 2 (a). A map in the category P! -Coalg of 3 This
work has been done with the support of EPSRC grant
GR/J84205: Frameworks for programming language semantics and logic, and with the support of the COE budget of STA Japan, and with a visit to Hokkaido University.
P! -coalgebras from (A; ) to (B; ) consists of a function f : A 0! B that sends a subset of the form (a) precisely to f (a). This means that for every transition in B of the form f (a) ! b, there is some transition in A of the form a ! c such that f (c) = b. This is exactly a functional bisimulation of transition systems. The endofunctor P! is not the only endofunctor of interest here. For instance, one might replace it by its subfunctor P! which sends a set A to the set of nonempty nite subsets of A, corresponding to a notion of transition system in which at least one transition is always possible. Alternatively, if one wants an account of labelled transition systems, with labels in a nite set L, then replacing P! by P! (L 2 0) gives a category of coalgebras whose objects are nitely branching L-labelled transition systems, and whose maps are functional bisimulations. Replacing P! by [I; P! (O 2 0)], where [0; 0] denotes the internal hom and I and O denote xed nite sets of inputs and outputs, yields a category whose objects are nondeterministic automata. Yet another possibility would be to consider the nite multiset functorPM! : an element of M! (A) is a formal nite sum niai, where the ni are natural numbers and the ai are elements of A. This leads to a concept of `transition systems with multiplicities', where there may be more than one way of making a transition from one given state to another, and the corresponding notion of bisimulation has to keep count of the number of possible transitions from each state. Other examples of endofunctors which one can consider, along with their categories of coalgebras, +
are discussed for instance in Fiore's [7], Barr's [4], or in Jacobs and Rutten's [8]. This leads us to consider, for an arbitrary endofunctor H on Set, the structure of the category H -Coalg. We seek to show that H -Coalg is complete, cocomplete, symmetric monoidal closed, regular, and has a subobject classi er. We consider conditions on H that imply all that. All the conditions we impose on H are true of our leading examples; so the categories of nitely branching transition systems, nitely branching labelled transition systems, etcetera, all have the abovementioned structure. Although we express all our results in terms of the category Set, they apply to a wider class of categories, including all Grothendieck toposes [17], and many apply to categories such as that of !-cpo's [10]. There has recently been considerable analysis of the category H -Coalg in general. One substantial work is Barr's [4], in which he showed that (under suitable hypotheses on H ) the forgetful functor U : H -Coalg 0! Set has a right adjoint. Despite restricting his attention to Set, Barr's proof was axiomatic; but he did not extend his result to analyse the structure of H -Coalg. Some of that extension is routine; some is not. Jacobs and Rutten's tutorial [8] describes much other relevant work. Most recently, Power and Watanabe [17] and Worrell [24] investigated this question independently; to some extent, this paper represents the combination of their best results with their best proofs, aided by the input of the other two authors. The abstract category theory underlying this paper is largely based on Makkai and Pare's [15], but also involves the elements of topos theory [9]. This work also relates intimately to Aczel's non-well founded sets [1] or hypersets. For the category of coalgebras of the endofunctor giving nonempty nite subsets of a set, the subobject classi er amounts to the set of hereditarily nite hypersets [18, 19]. Once one has an account of H -Coalg and hence an algebraic account of categories of transition systems and functional bisimulations, an immediate question is about categories of bisimulations. We begin to address that question in Section 4. One of our main results gives conditions under which the category H -Coalg is regular. For any regular category E , one can build a locally ordered category Rel(E ), whose objects are those of E and whose arrows amount to binary relations in E . So, for E = H -Coalg, an object of Rel(E ) is an H -coalgebra, and a map from A to B is an equivalence class of pairs of functional bisimulations from H -coalgebras D into A and B . That is exactly how Joyal et al. addressed bisimulation in their study of
open maps for bisimulation [11], and it agrees with Milner's de nition of bisimulation for transition systems [16]. This paper is organized as follows. In Section 2, we give conditions under which H -Coalg is cocomplete and has a symmetric monoidal structure. In Section 3, we explain the notion of density, and give a condition under which H -Coalg has a small dense subcategory [17]. Density allows us to deduce that H -Coalg is complete, that the symmetric monoidal structure is closed, and that the forgetful functor to Set has a right adjoint. Then, in Section 4, we give conditions under which H -Coalg has a subobject classi er and is regular. Finally, in Section 5, we investigate a few leading examples. 2 Cocompleteness and monoidal structure
symmetric
2.1 Theorem If H is any endofunctor on Set, then H -Coalg is cocomplete and the forgetful functor U : H -Coalg 0! Set preserves colimits.
The proof is routine. A symmetric monoidal endofunctor on a symmetric monoidal category (C; ; I ) consists of an endofunctor H : C 0! C together with two natural transformations, with components H A;B : HA HB 0! H (A B ) and H^ : I 0! HI , subject to four coherence axioms to the eect that these natural transformations respect the coherence isomorphisms of the symmetric monoidal structure [5]. Often we write H for a symmetric monoidal endofunctor, leaving the rest of the structure implicit. Note that an endofunctor on Set may have more than one symmetric monoidal structure on it. (Here, as elsewhere when we refer to Set as a symmetric monoidal category, the monoidal structure is that given by cartesian product.) 2.2 Example The powerset functor P has two symmetric monoidal structures, one given by the map P : P A2PB 0! P (A2B ) sending (A ; B ) to A 2B , with unit given by sending 1 to f1g, and the other given by sending (A ; B ) to f(x; y) : x 2 A _ y 2 B g with the unit given by sending 1 to the empty set. The former is the one of primary interest, as it restricts to the subfunctor P! ; in terms of transition systems, it corresponds to synchronization. This example extends to P! (L 2 0) for nite L. 2.3 Theorem Let H be a symmetric monoidal endofunctor on any symmetric monoidal category C . (
)
0
0
0
0
0
0
0
0
Then H -Coalg has a symmetric monoidal structure that is preserved strictly by the forgetful functor U : H -Coalg 0! C . Proof Given H -coalgebras (A; ) and (B; ), de ne (A; ) (B; ) to have underlying object A B , with the map from A 2 B to H (A 2 B ) given by composing with H A;B . It is routine to verify that H -Coalg is symmetric monoidal, with unit object (I; H^ ), using the axioms on H . Moreover, by construction of the tensor product, U preserves it strictly. 2.4 Example In CSP , the paradigm for concurrency is that if P and Q pass by a transition a to P and Q respectively, then P jQ passes by the transition a to P jQ . Putting H = P! (L 2 0) and using the symmetric monoidal structure of Example 2.2, it follows that the parallel operator of CSP is modelled by the symmetric monoidal structure on H -Coalg given by Theorem 2.3. We shall account for parallelism in CCS by a more subtle result in the next section. (
)
0
0
0
0
3 Density
If P and Q are complete lattices, then any suppreserving map f : P 0! Q has a right adjoint. But that is not true for cocomplete categories C and D and colimit preserving functors from C to D, although colimits are the evident generalisation of suprema (see [14]). So one seeks a condition on a category C that implies it, and density is such a condition. 3.1 De nition A small full subcategory T is dense in C if every object X of C is a colimit of the diagram D : TX 0! C , where TX is the category whose objects are morphisms Y ! X with Y in T and whose morphisms are commutative triangles, and D maps f : Y 0! X to Y . An equivalent condition (cf. [12]) is that the functor from C to [T op ; Set] sending X to C (J (0); X ) : T op 0! Set is fully faithful. (Here J denotes the inclusion functor T 0! C .) 3.2 De nition A small category I is ltered if for any nite category J , any diagram D : J 0! I has a cocone over it. A colimit is ltered when it is a colimit of a diagram whose domain is ltered. An endofunctor on Set is nitary if it preserves ltered colimits. All of the endofunctors on Set of primary interest to us are nitary [4]. 3.3 Example P! is nitary: let A be a ltered colimit
of sets Ai . Then, given a nite subset F of A, each element of F must lie in the image of some Ai . By lteredness, it follows that there is some Ak for which all elements of F are in the image of of Ak 0! A. By a similar argument, two nite subsets of Ak have the same image in A if and only if they have the same image in some Al . This result is not true of the ordinary powerset functor P , but it also holds, by a similar proof, for the nitemultiset functor M! , and for the other variants of P! discussed in the Introduction. Corollary 6.1.1 and Proposition 2.1.5 of [15] yield 3.4 Theorem For any nitary endofunctor H on Set, the category H -Coalg has a small dense subcategory. Although implicit in the proof, it takes some eort to give an explicit description of a small dense subcategory of H -Coalg. It is easier to give an explicit description case by case. We include such an explicit description for P! in Section 5. The importance for us of Theorem 3.4 is contained in the following version of the Special Adjoint Functor Theorem (cf. [13]): 3.5 Theorem Let C be cocomplete and have a small dense subcategory, and let D be cocomplete. Then any colimit preserving functor F : C 0! D has a right adjoint. 3.6 Corollary If C is cocomplete and has a small dense subcategory, then C is complete. Proof The diagonal functor 1 : C 0! [I; C ] preserves colimits for any small category I . So it has a right adjoint. 3.7 Corollary (cf. [3]) If H is a nitary endofunctor on Set, then H -Coalg is complete, and hence locally presentable. 3.8 Corollary [4] If H is nitary, the forgetful functor U : H -Coalg 0! Set has a right adjoint. Proof U preserves colimits. We remark in passing that the existence of a right adjoint for U : H -Coalg 0! Set is equivalent to the existence of a nal coalgebra, not just for the functor H itself, but for the functor A 2 H (0) for every set A. 3.9 Corollary If H is nitary, the forgetful functor U : H -Coalg 0! Set is comonadic, expressing
H -Coalg as the category of coalgebras for a comonad on Set. Proof This follows from Beck's monadicity theorem (see [14]). To avoid possible confusion, we should emphasize that when we speak of coalgebras for a comonad G = (G; ; ), or use the notation G-Coalg, we refer to coalgebras in the sense of Eilenberg and Moore [6], rather than `mere' coalgebras for the functor G as we de ned them in the Introduction. Thus it is important to distinguish notationally between a comonad G and its underlying functor G. Comonadicity is essential to us in the next section. But it also allows us to extend Theorem 2.3 to model the parallel operator of CCS just as we modelled the parallel operator of CSP in Example 2.4. The result we need is 3.10 Theorem Given a comonad G = (G; ; ) on a symmetric monoidal category C , to give a symmetric monoidal structure on G-Coalg that is preserved by the forgetful functor is equivalent to giving a symmetric monoidal structure on the comonad G. Proof To give a symmetric monoidal adjunction between symmetric monoidal categories is to give an ordinary adjunction for which the left adjoint preserves the structure up to coherent isomorphism. That fact, together with a routine extension of the proof of Theorem 2.3, yields the result. This theorem characterizes all pointwise symmetric monoidal structures on H -Coalg. However, it is often not easy to give an explicit description of the comonad G induced by an endofunctor H (though we shall do so, for H = P! , in Section 5 below). Meanwhile, we note 3.11 Example Consider the parallel operator of CCS . If P moves under an a-action to P , then P jQ moves under an a-action to P jQ, and dually. So, for non-silent actions a, P jQ has immediate adescendants given by fRjS : R = P and Q !a S , or vice versa g: This does not in general correspond to a function H (T rans(P )) 2 H (T rans(Q)) 0! H (T rans(P jQ)), where H = P! (L 20) and Trans(Q) is the transition system generated by the syntax of Q, because P need not appear among the immediate a-descendants of itself. But by Theorem 3.10, this parallel operator must 0
0
be represented by a symmetric monoidal structure on the comonad G. 3.12 Theorem If H is a nitary endofunctor on Set, then for any symmetric monoidal structure on H -Coalg that is given pointwise, H -Coalg is symmetric monoidal closed. Proof H -Coalg is cocomplete, with U preserving colimits. Let (A; ) be any object in H -Coalg. We need to show that (A; ) 0 : H -Coalg 0! H -Coalg preserves colimits. But that follows by routine argument based on the above results, and the fact that, since Set is cartesian closed, A 2 0 : Set 0! Set preserves colimits. Although not quite a corollary of the above results, by a slightly more careful investigation of [15] (see [17]), one can obtain a result that may help in modelling dynamics of programs. For the de nitions used in this result, see [13]. 3.13 Corollary If H is symmetric monoidal and nitary, then H -Coalg is locally presentable as a closed category. This result is signi cant because the deeper results of the theory of enriched categories are based upon enrichment in a category that is locally presentable as a closed category (see [13]). So this tells us that, for all endofunctors of interest to us, the category H -Coalg is a suitable basis for enriched category theory. So for instance, considering the category of nitely branching transition systems and functional bisimulations, one may reasonably speak of a hom possessing the structure of a transition system. This could potentially be of interest in modelling dynamic properties of programs. 4 Subobject classi ers and regularity
We have seen that if H is nitary, then H -Coalg is of the form G-Coalg for a comonad G on Set. In this section, we use that fact to investigate further structure of H -Coalg, i.e., we shall prove results for the category of coalgebras for a comonad on Set, and then deduce the results we seek for H -Coalg. We rst establish a few results that will prove convenient in analysing our leading examples. A weak pullback is a commutative square that satis es the existence but not necessarily the uniqueness clause of the de nition of pullback. (If pullbacks exist in the category under consideration, a commutative
square is a weak pullback if and only if the comparison map to the pullback is a split epimorphism.) A functor weakly preserves a pullback if it takes the pullback to a weak pullback. When we refer to pullbacks of monomorphisms, we mean pullbacks of monomorphisms along arbitrary maps. 4.1 Proposition If a functor F : C 0! D weakly preserves pullbacks of monomorphisms, then it preserves pullbacks of monomorphisms, so in particular, preserves monomorphisms. Proof First observe that F preserves monomorphisms: given any map m, the identity is a (weak) pullback of m along itself if and only if m is a monomorphism. For the full result, any pullback of a monomorphism is itself a monomorphism, so is sent by F to a monomorphism. That, together with F sending the pullback to a weak pullback, is enough to deduce the result. 4.2 Proposition Given a nitary endofunctor H on Set, if H weakly preserves pullbacks, then so does U : H -Coalg 0! Set. Proof Given a pair of maps with common codomain in H -Coalg, apply U and form their pullback P in Set. Since H weakly preserves pullbacks, P has an H coalgebra structure making the pullback diagram into a diagram in H -Coalg. But H -Coalg is complete since H is nitary. Using that fact and routine diagram chasing, it follows that P is a retract of the pullback in H -Coalg, and hence the latter is sent to a weak pullback in Set. 4.3 Theorem Let G = (G; ; ) be a comonad on Set, and suppose U : G-Coalg 0! Set preserves pullbacks of monomorphisms. Then G-Coalg has a subobject classi er. Proof The construction of a subobject classi er in G-Coalg is a direct transcription of that in the case when U preserves all nite limits (see, for example, [9], 2.32); we simply have to observe that the construction given there, and the proof that it works, uses only pullbacks of monomorphisms and their preservation by U . For full details of the proof, see [10] (and see also Proposition 5.4 below). 4.4 Corollary Let H be a nitary endofunctor on Set and suppose H weakly preserves pullbacks. Then H -Coalg has a subobject classi er. Proof This follows immediately from Propositions 4.1
and 4.2 and Theorem 4.3. This result does not say that H -Coalg is a topos: if H was symmetric monoidal, we obtained a symmetric monoidal closed structure on H -Coalg, not a cartesian closed structure, and H -Coalg need not be cartesian closed. See [10] for a class of counterexamples and an investigation of related conditions. One can routinely follow some of the theory of toposes but replacing the cartesian closed structure by symmetric monoidal closed structure. For example, we have 4.5 Corollary If H is nitary and weakly preserves pullbacks, then every monomorphism in H -Coalg is an equalizer and every epimorphism in H -Coalg is extremal (i.e., does not factor through any proper subobject of its codomain). 4.6 Corollary Suppose, in addition to the hypotheses of Corollary 4.5, that H isopsymmetric monoidal. Then the functor from H -Coalg to H -Coalg sending an object A to [A; ] is monadic. We now consider regularity. This is important for extending our work from functional bisimulation to bisimulation. If a category E is regular, one can construct the locally ordered category Rel(E ). The objects of Rel(E ) are those of E , and a map in Rel(E ) amounts to a binary relation between objects of E . For the endofunctor H = P! (L 20) on Set, a bisimulation [16] amounts exactly to a map in Rel(H -Coalg). Moreover, this agrees with the account of bisimulation in terms of open maps by Joyal et al. in [11]. They used the de nition of open map to de ne a notion of functional bisimulation, then used the latter to de ne bisimulation just as we have done here. 4.7 Theorem If H is nitary and weakly preserves pullbacks, then H -Coalg is regular. Proof By Corollary 4.5, it suces to show that a pullback of an epimorphism in H -Coalg is an epimorphism. Since H weakly preserves pullbacks, so does U : H -Coalg 0! Set by Proposition 4.2. Thus, given an epimorphism f in H -Coalg, the image under U of its pullback along an arbitrary morphism is the composite of the pullback of Uf (which is an epimorphism, since U preserves epimorphisms and they are stable under pullback in Set) with the comparison map from the weak pullback to the pullback, which is a split epimorphism. Since U also re ects epimorphisms, it follows that the pullback is an epimorphism in
H -Coalg.
children.
By a similar argument (see [10]), it may be shown under the same hypotheses on H that arbitrary coproducts in H -Coalg (we know they exist, by Theorem 1) are disjoint and stable under pullback. This means that, for such an H , we have veri ed all the hypotheses of Giraud's Theorem ([9], Theorem 0.45) for the category H -Coalg, except for the one which requires equivalence relations to be eective (that is, to occur as kernel-pairs of their coequalizers). Since, as we have already remarked, H -Coalg is not a topos for our leading examples of functors H , it is clear that this nal condition must in fact fail in H -Coalg. However, for any regular category C in which not all equivalence relations are eective, there is a canonical embedding C 0! C~ of C into a regular category in which equivalence relations are eective. The objects of C~ are `formal quotients' of objects of C ; more explicitly, they are pairs (A; R) where A is an object of C and R is an equivalence relation on A. Morphisms (A; R) 0! (B; S ) in C~ are relations F : A 0! B in Rel(C ) satisfying conditions which, in Set, are equivalent to saying that F induces a function from the quotient A=R to B=S . It can be shown that, if we apply this construction to the category H -Coalg for a functor H : Set 0! Set which is nitary and weakly preserves pullbacks, the resulting category is indeed a topos. Once again, we refer to [10] for the details of the proof. 5 Examples
In this section we consider P! -coalgebras (equivalently, nitely branching transition systems) in more detail. We have seen that P! is nitary in Example 3.3, and it weakly preserves pullbacks because, if f : A 0! C and g : B 0! C and we are given nite sets A A, B B with the same image in C , then the set f(a; b) 2 A 2 B : f (a) = g(b)g is a nite subset of the pullback A 2C B mapping onto A and B . So, by the results of the last two sections, we know that P! -Coalg has a small dense subcategory, that it is comonadic over Set and that it has a subobject classi er. We shall give explicit constructions of all these. By a nitely branching tree we mean a poset T with least element, such that for each x 2 T the set fy 2 T : y xg is nite and totally ordered, and the set fz 2 T : x zg is nite (where is the covering relation associated with ). The elements of T are called nodes, the least element is called the root, and the elements covering a given node are called its 0
0
0
0
0
0
If x is a node of T , we write Tx for the tree a tree T as above together with a function assigning an element of A to each of its nodes. We begin by establishing 5.1 Lemma Let GA denote the set of A-labelled trees. Then G is a functor Set 0! Set, and carries a comonad structure G = (G; ; ). Moreover, G-Coalg is isomorphic to M! -Coalg, where M! denotes the nite-multiset functor. Proof Given f : A 0! B , Gf is the function which takes each A-labelled tree to the same tree with nodes relabelled via f . It is clear that this is functorial. The natural transformation A : GA 0! A sends an A-labelled tree to the label at its root, and A : GA 0! GGA sends an A-labelled tree T to the tree with the same underlying poset, but with each node x labelled by the A-labelled tree Tx . Again, it is easy to verify the equations for a comonad. Given a G-coalgebra (A; : A 0! GA), we make it into an M! -coalgebra by sending a 2 A to the multiset of labels of the children of the root of (a), counted with multiplicities. Conversely, given an M! -coalgebra A, we may associate an A-labelled tree with each element a of A: its nodes are all possible nite sequences of transitions starting from a, each labelled by the element reached at the end of the sequence. Now if (A; ) is a G-coalgebra, the Eilenberg{ Moore equations relating to and imply that, for any a 2 A, the root of the tree (a) is labelled a, and that for any node x of (a) (in particular, for any child of the root) the A-labelled tree (a)x coincides with (b) where b is the label at x. Thus we see that the entire A-labelled tree (a) may be reconstructed in the manner just described from the knowledge, for each b 2 A, of the multiset of labels of the children of the root of (b). This is the key to proving that the two constructions given above are inverse to each other. A nite subset of A may be regarded as a nite multiset in which each element has multiplicity at most 1. However, this does not make P! into a subfunctor of M! , since its action on morphisms is dierent; it is actually a quotient of M! | that is, there is a surjective natural transformation M! 0! P! , obtained by `forgetting multiplicities'. In the same way, the comonad corresponding to P! may be identi ed with a quotient G of the functor G de ned above; this is (in eect) done in [4], where the appropriate equivalence relation on trees is called `similarity'. However, fy 2 T : y xg. Given a set A, an A-labelled tree is
it is possible to pick out canonical `minimal' representatives of the equivalence classes, and so to identify with a subset of GA (though, once again, G is not GA a subfunctor of G). We say an equivalence relation on the nodes of an A-labelled tree is a congruence provided (i) if two nodes are identi ed, then they are at the same height and have the same label; (ii) if two nodes are identi ed, then their parents are identi ed, and (iii) if two nodes x and y are identi ed, then every child of x is identi ed with at least one child of y, and vice versa. It is easy to see that if (Ri j i 2 I ) is a family of congruences on a given tree T , then the transitive closure of their union is also a congruence; hence every tree has a unique largest congruence relation, and its quotient by this relation is strongly extensional in the sense that it admits no congruence other than the identity. We de to be the set of strongly extensional A-labelled ne GA trees. 5.2 Remark A strongly extensional A-labelled tree T is easily seen to be extensional in the sense that, if x and y are children of the same node of T and the labelled trees Tx and Ty are isomorphic, then necessarily x = y; for, given any such pair (x; y), we can construct a congruence on T which ident es them. However, this is not a sucient condition for strong extensionality: Barr [4] gives a counterexample (for unlabelled trees, or equivalently 1-labelled ones where 1 denotes a singleton set). It is worth noting that the strongly extensional 1-labelled trees correspond exactly to the hereditarily nite sets in Aczel's non-well-founded set theory [1]. To make G into a functor Set 0! Set, suppose given a function f : A 0! B ; then we apply Gf to a strongly extensional A-labelled tree by rst relabelling its nodes via f and then forming the quotient of the resulting B-labelled tree by its largest congruence. The natural transformations : G 0! IdSet and : G 0! G G are de ned in essentially the same way as for G. ; ) is a comonad on Set, = (G; 5.3 Proposition G and G-Coalg is isomorphic to P! -Coalg. -coalgebra Proof The correspondence between G structures and P! -coalgebra coalgebras on a set A is just the restriction of that described in Lemma 5.1: that is, we regard a P! -structure map x : A 0! P! A as an M! -structure map for which each of the multisets x(a) contains only elements with multiplicity at most 1, and verify that the G-coalgebra structure map
constructed from it as in 5.1 in fact takes values in the set of strongly extensional A-labelled trees. The remaining details are straightforward. We note that a labelled tree has only countably many nodes, and hence involves only countably many elements of A as labels. This is the key to proving that P! -Coalg has a small dense subcategory, consist where N is the set ing of the sub-coalgebras of GN of natural numbers. An alternative description of this subcategory was given in [17]. We may also give an explicit description of the subobject classi er in P! -Coalg. Given that 2 = f0; 1g is a subobject classi er for Set, we should expect that for P! -Coalg to be a sub-coalgebra of G 2, and this is indeed the case: 5.4 Proposition Let denote the set of strongly extensional 2-labelled trees whose labelling is increasing in the sense that, if a node is labelled 1, then all its children are labelled 1. Then is a subobject classi er for P! -Coalg. Proof Given a P! -coalgebra A and a sub-coalgebra A , we de ne its characteristic function A 0! as follows. Given a 2 A, form the tree whose nodes are nite sequences of transitions from a, as in the proof of 5.1, and label a node with 1 if and only if the corresponding sequence ends at an element of A . Conversely, given : A 0! , we have the sub-coalgebra consiting of those a 2 A such that the root of (a) is labelled 1. The two constructions are easily seen to be inverse to each other. For labelled transition systems, corresponding to the endofunctor P! (L 2 0) where L is a set of labels, the corresponding comonad can again be described in terms of labelled trees, where we now have to label the edges of the tree by elements of L as well as labelling the nodes by elements of A. (See [20].) Yet another possibility is to consider the endofunctor P! on Set that takes a set to the set of its nonempty nite subsets. The category of coalgebras now amounts to the category of nitely branching transition systems such that a transition is always possible. In this case, since P! (1) is a singleton, the nal coalgebra has only one element; but the hereditarily nite non-well-founded sets reappear as the elements of the subobject classi er for P! -Coalg. For we may identify the latter, as in 5.4, with the set of strongly extensional f0; 1g-labelled trees whose labelling is increasing, and in which every node has at least one child. But if we cut down such a tree to its subtree 0
0
+
+
+
of nodes whose parents are labelled 0, we get an arbitrary strongly extensional unlabelled tree; and conversely every such tree has a unique extension to an increasingly f0; 1g-labelled tree where every node has a child, obtained by labelling a node 1 if and only if it is childless, and inserting a chain of further nodes labelled 1 above each childless node. This example was studied in [18, 23], where an explicit description of the subobject classi er was given in terms of nonwell-founded sets. All the above examples will be considered in greater detail in [10]. References
[1] P. Aczel, Non-well-founded sets, CSLI Lecture Notes 14, Stanford University (1988). [2] P. Aczel and P.F. Mendler, A nal coalgebra theorem, Proc. CTCS, Springer Lecture Notes in Computer Science 389 (1989) 357{365. [3] J. Adamek and J. Rosicky, Locally presentable and accessible categories, L.M.S. Lecture Notes Series 189, Cambridge University Press (1994). [4] M. Barr, Terminal coalgebras in well-founded set theory, Theoretical Computer Science 114 (1993) 299{315. [5] S. Eilenberg and G.M. Kelly, Closed categories, Proc. Conf. on Categorical Algebra (La Jolla 1965), Springer{Verlag (1966) 421{562. [6] S. Eilenberg and J.C. Moore, Adjoint functors and triples, Illinois J. Math. 9 (1965) 381{398. [7] M. Fiore, A coinduction principle based on recursive datatypes based on bisimulation, Information and Computation 127 (1996) 186{198. [8] B. Jacobs and J. Rutten, A tutorial on (Co)Algebras and (Co)Induction, EATCS Bulletin 62 (1997) 222{259. [9] P.T. Johnstone, Topos Theory, L.M.S. Mathematical Monographs 10, Academic Press (1977). [10] P.T. Johnstone, A.J. Power, T. Tsujishita, H. Watanabe and J. Worrell, The structure of categories of coalgebras, in preparation.
[11] A. Joyal, M. Nielsen and G. Winskel, Bisimulation and open maps, Information and Computation 127 (1996) 164{185. [12] G.M. Kelly, Basic concepts of enriched category theory, L.M.S. Lecture Notes Series 64, Cambridge University Press (1982). [13] G.M. Kelly, Structures de ned by nite limits in the enriched context 1, Cahiers Top. et Geom. Di. 23 (1982) 3{42. [14] S. Mac Lane, Categories for the working mathematician, Graduate Texts in Mathematics 5, Springer{Verlag (1971). [15] M. Makkai and R. Pare, Accessible categories: the foundations of categorical model theory, Contemporary Mathematics 104, Amer. Math Soc. (1989). [16] R. Milner, Communication and Concurrency, Prentice{Hall (1989). [17] A.J. Power and H. Watanabe, An axiomatics for categories of coalgebras, Proc. CMCS, Electronic Notes in Theoretical Computer Science 11 (to appear). [18] T. Tsujishita, Hypersets as truth values (draft). [19] T. Tsujishita and H. Watanabe, Monoidal closedness of the category of simulations, Hokkaido University Preprint Series in Mathematics 392 (1997). [20] D. Turi, Functorial operational semantics and its denotational dual, Ph.D. thesis, Vrije Universiteit te Amsterdam (1995). [21] H. Watanabe, A criterion for the existence of subobject classi ers (draft). [22] H. Watanabe, The subobject classi er of the category of functional bisimulations (draft). [23] H. Watanabe, The category of functional bisimulations (in preparation). [24] J. Worrell, Toposes of coalgebras and hidden algebras, Proc. CMCS, Electronic Notes in Theoretical Computer Science 11 (to appear).