Distributive Laws for Monotone Specifications

09/04/2017
by   Jurriaan Rot, et al.
Radboud Universiteit
0

Turi and Plotkin introduced an elegant approach to structural operational semantics based on universal coalgebra, parametric in the type of syntax and the type of behaviour. Their framework includes abstract GSOS, a categorical generalisation of the classical GSOS rule format, as well as its categorical dual, coGSOS. Both formats are well behaved, in the sense that each specification has a unique model on which behavioural equivalence is a congruence. Unfortunately, the combination of the two formats does not feature these desirable properties. We show that monotone specifications - that disallow negative premises - do induce a canonical distributive law of a monad over a comonad, and therefore a unique, compositional interpretation.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

05/13/2016

A Corpus-based Toy Model for DisCoCat

The categorical compositional distributional (DisCoCat) model of meaning...
03/31/2021

A categorical framework for congruence of applicative bisimilarity in higher-order languages

Applicative bisimilarity is a coinductive characterisation of observatio...
08/29/2019

Cellular Monads from Positive GSOS Specifications

We give a leisurely introduction to our abstract framework for operation...
02/04/2021

Operational Semantics with Hierarchical Abstract Syntax Graphs

This is a motivating tutorial introduction to a semantic analysis of pro...
04/07/2020

A categorical approach to secure compilation

We introduce a novel approach to secure compilation based on maps of dis...
04/27/2022

A biset-enriched categorical model for Proto-Quipper with dynamic lifting

Quipper and Proto-Quipper are a family of quantum programming languages ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Structural operational semantics (SOS) is an expressive and popular framework for defining the operational semantics of programming languages and calculi. There is a wide variety of specification formats that syntactically restrict the full power of SOS, but guarantee certain desirable properties to hold [2]. A famous example is the so-called GSOS format [6]. Any GSOS specification induces a unique interpretation which is compositional with respect to (strong) bisimilarity.

In their seminal paper [23], Turi and Plotkin introduced an elegant mathematical approach to structural operational semantics, where the type of syntax is modeled by an endofunctor and the type of behaviour is modeled by an endofunctor . Operational semantics is then given by a distributive law of over . In this context, models are bialgebras, which consist of a -algebra and a -coalgebra over a common carrier. One major advantage of this framework over traditional approaches is that it is parametric in the type of behaviour. Indeed, by instantiating the theory to a particular functor , one can obtain well behaved specification formats for probabilistic and stochastic systems, weighted transition systems, streams, and many more [15, 16, 5].

Turi and Plotkin introduced several kinds of natural transformations involving and , the most basic one being of the form . If is a functor representing labelled transition systems, then a typical rule that can be represented in this format is the following:

(1)

This rule should be read as follows: if can make an -transition to , and an -transition to , then can make an -transition to . Any specification of the above kind induces a unique supported model, which is a -coalgebra over the initial algebra of . If represents a signature and represents labelled transition systems, then this model is a transition system of which the state space is the set of closed terms in the signature, and, informally, a term makes a transition to another term if and only if there is a rule in the specification justifying this transition.

A more interesting kind is an abstract GSOS specification, which is a natural transformation of the form , where is the free monad for (assuming it exists). If is the functor that models (image-finite) transition systems, and is a functor representing a signature, then such specifications correspond to classical GSOS specifications [23, 5]. As opposed to the basic format, GSOS rules allow complex terms in conclusions, as in the following rule specifying a constant :

(2)

where is some other operator in the signature (represented by ), which can itself be defined by some GSOS rules. The term is constructed from a constant and a unary operator from the signature, as opposed to the conclusion of the rule in (1), which consists of a single operator and variables. Indeed, the free monad occurring in an abstract GSOS specification is precisely what allows a complex term such as in the conclusion.

Dually, one can consider coGSOS specifications, which are of the form , where is the cofree comonad for (assuming it exists). In the case of image-finite labelled transition systems, this format corresponds to the safe ntree format [23]. A typical coGSOS rule is the following:

(3)

This rule uses two steps of lookahead in the premise; this is supported by the cofree comonad in the natural transformation. The symbol represents a negative premise, which is satisfied whenever does not make an -transition.

Both GSOS and coGSOS specifications induce distributive laws, and as a consequence they induce unique supported models on which behavioural equivalence is a congruence. The two formats are incomparable in terms of expressive power: GSOS specifications allow rules that involve complex terms in the conclusion, whereas coGSOS allows arbitrary lookahead in the arguments. It is straightforward to combine GSOS and coGSOS as a natural transformation of the form , called a biGSOS specification, generalising both formats. However, such specifications are, in some sense, too expressive: they do not induce unique supported models, as already observed in [23]. For example, the rules and above (which are GSOS and coGSOS respectively) can be combined into a single biGSOS specification. Suppose this combined specification has a model. By the axiom for , there is a transition in this model. However, is there a transition ? If there is not, then by the rule for , there is; but if there is such a transition, then it is not derivable, so it is not in the model! Thus, a supported model does not exist. In fact, it was recently shown that, for biGSOS, it is undecidable whether a (unique) supported model exists [18].

The use of negative premises in the above example (and in [18]) is crucial. In the present paper, we introduce the notion of monotonicity of biGSOS specifications, generalising monotone abstract GSOS [9]. In the case that is a functor representing labelled transition systems, this corresponds to the absence of negative premises, but the format does allow lookahead in premises as well as complex terms in conclusions. Monotonicity requires an order on the functor —technically, our definition of monotonicity is based on the similarity order [11] induced on the final coalgebra.

We show that if there is a pointed DCPO structure on the functor , then any monotone biGSOS specification yields a least model as its operational interpretation. Indeed, monotone specifications do not necessarily have a unique model, but it is the least model which makes sense operationally, since this corresponds to the natural notion that every transition has a finite proof. Our main result is that if the functor has a DCPO structure, then every monotone specification yields a canonical distributive law of the free monad for over the cofree comonad for . Its unique model coincides with the least supported model of the specification. As a consequence, behavioural equivalence on this model is a congruence.

However, the conditions of these results are a bit too restrictive: they rule out labelled transition systems, the main example. The problem is that the functors typically used to model transition systems either fail to have a cofree comonad (the powerset functor) or to have a DCPO structure (the finite or countable powerset functor). In the final section, we mitigate this problem using the theory of (countably) presentable categories and accessible functors. This allows us to relax the requirement of DCPO structure only to countable sets, given that the functor is countably accessible (this is weaker than being finitary, a standard condition in the theory of coalgebras) and the syntax consists only of countably many operations each with finite arity. In particular, this applies to labelled transition systems (with countable branching) and certain kinds of weighted transition systems.

Related work

The idea of studying distributive laws of monads over comonads that are not induced by GSOS or coGSOS specifications has been around for some time (e.g., [5]), but, according to a recent overview paper [16], general bialgebraic formats (other than GSOS or coGSOS) which induce such distributive laws have not been proposed so far. In fact, it is shown by Klin and Nachyła that the general problem of extending biGSOS specifications to distributive laws is undecidable [17, 18]. The current paper shows that one does obtain distributive laws from biGSOS specifications when monotonicity is assumed (negative premises are disallowed). A fundamentally different approach to positive formats with lookahead, not based on the framework of bialgebraic semantics but on labelled transition systems modeled very generally in a topos, was introduced in [22]. It is deeply rooted in labelled transition systems, and hence seems incomparable to our approach based on generic coalgebras for ordered functors. An abstract study of distributive laws of monads over comonads and possible morphisms between them is in [19], but it does not include characterisations in terms of simpler natural transformations.

Structure of the paper

Section 2 contains the necessary preliminaries on bialgebras and distributive laws. In Section 3 we recall the notion of similarity on coalgebras, which we use in Section 4 to define monotone specifications and prove the existence of least supported models. Section 5 contains our main result: canonical distributive laws for monotone biGSOS specifications. In Section 6, this is extended to countably accessible functors.

Notation

We use the categories of sets and functions, of preorders and monotone functions, and of pointed DCPOs and continuous maps. By we denote the (contravariant) power set functor; is the countable power set functor and the finite power set functor. Given a relation , we write and for its left and right projection, respectively. Given another relation we denote the composition of and by . We let . For a set , we let . The graph of a function is . The image of a set under is denoted simply by , and the inverse image of by . The pairing of two functions with a common domain is denoted by and the copairing (for functions with a common codomain) by . The set of functions from to is denoted by . Any relation can be lifted pointwise to a relation on ; in the sequel we will simply denote such a pointwise extension by the relation itself, i.e., for functions we have iff for all , or, equivalently, .

Acknowledgements

The author is grateful to Henning Basold, Marcello Bonsangue, Bartek Klin and Beata Nachyła for inspiring discussions and suggestions.

2 (Co)algebras, (co)monads and distributive laws

We recall the necessary definitions on algebras, coalgebras, and distributive laws of monads over comonads. For an introduction to coalgebra see [21, 13]. All of the definitions and results below and most of the examples can be found in [16], which provides an overview of bialgebraic semantics. Unless mentioned otherwise, all functors considered are endofunctors on .

2.1 Algebras and monads

An algebra for a functor consists of a set and a function . An (algebra) homomorphism from to is a function such that . The category of algebras and their homomorphisms is denoted by .

A monad is a triple where is a functor and and are natural transformations such that and . An (Eilenberg-Moore, or EM)-algebra for is a -algebra such that and . We denote the category of EM-algebras by .

We assume that a free monad for exists. This means that there is a natural transformation such that is a free algebra on the set of generators, that is, the copairing of

is an initial algebra for . By Lambek’s lemma, is an isomorphism. Any algebra induces a -algebra , and therefore by initiality a -algebra , which we call the inductive extension of . In particular, the inductive extension of is . This construction preserves homomorphisms: if is a homomorphism from to , then it is also a homomorphism from to .

Example 1.

An algebraic signature (a countable collection of operator names with finite arities) induces a polynomial functor , meaning here a countable coproduct of finite products. The free monad constructs terms, that is, is given by the grammar where ranges over and ranges over the operator names (and is the arity of ), so in particular is the set of closed terms over .

2.2 Coalgebras and comonads

A coalgebra for the functor consists of a set and a function . A (coalgebra) homomorphism from to is a function such that . The category of -coalgebras and their homomorphisms is denoted by .

A comonad is a triple consisting of a functor and natural transformations and satisfying axioms dual to the monad axioms. The category of Eilenberg-Moore coalgebras for , defined dually to EM-algebras, is denoted by .

We assume that a cofree comonad for exists. This means that there is a natural transformation such that is a cofree coalgebra on the set , that is, the pairing of

is a final coalgebra for . Any coalgebra induces a -coalgebra , and therefore by finality a -coalgebra , which we call the coinductive extension of . In particular, the coinductive extension of is . This construction preserves homomorphisms: if is a homomorphism from to , then it is also a homomorphism from to .

Example 2.

Consider the functor for a fixed set . Coalgebras for are called stream systems. There exists a final -coalgebra, whose carrier can be presented as the set of all streams over , i.e., where is the set of natural numbers. For a set , . Given , its coinductive extension maps a state to its infinite unfolding. The final coalgebra of consists of finite and infinite streams over , that is, elements of . For a set , .

Example 3.

Labelled transition systems are coalgebras for the functor , where is a fixed set of labels. Image-finite transition systems are coalgebras for the functor , and coalgebras for are transition systems which have, for every action and every state , a countable set of outgoing -transitions from . A final coalgebra for does not exist (so there is no cofree comonad for it). However, both and have a final coalgebra, consisting of possibly infinite rooted trees, edge-labelled in , modulo strong bisimilarity, where for each label, the set of children is finite respectively countable. The cofree comonad of respectively , applied to a set , consist of all trees as above, node-labelled in .

Example 4.

A complete monoid is a (necessarily commutative) monoid together with an infinitary sum operation consistent with the finite sum [8]. Define the functor by and, for , . A weighted transition system over a set of labels is a coalgebra . Similar to the case of labelled transition systems, we obtain weighted transition systems whose branching is countable for each label as coalgebras for the functor , where is defined by . We note that this only requires a countable sum on to be well-defined and, by further restricting to finite support, weighted transition systems are defined for any commutative monoid (see, e.g., [15]). Labelled transition systems are retrieved by taking the monoid with two elements and logical disjunction as sum. Another example arises by taking the monoid of non-negative reals extended with a top element , with the supremum operation.

2.3 GSOS, coGSOS and distributive laws

Given a signature, a GSOS rule [6] of arity is of the form

(4)

where and are the number of positive and negative premises respectively; are labels; , are pairwise distinct variables, and is a term over these variables. An abstract GSOS specification is a natural transformation of the form

As first observed in [23], specifications in the GSOS format are generalised by abstract GSOS specifications, where models the signature and .

A safe ntree rule (as taken from [16]) for is of the form where and are countable possibly infinite sets, the , , , are variables, and ; the and are all distinct and they are the only variables that occur in the rule; the dependency graph of premise variables (where positive premises are seen as directed edges) is well-founded, and is either a variable or a term built of a single operator from the signature and the variables. A coGSOS specification is a natural transformation of the form

As stated in [23], every safe ntree specification induces a coGSOS specification where models the signature and .

A distributive law of a monad over a comonad is a natural transformation so that , , and . A -bialgebra is a triple where is a set, is an EM-algebra for and is an EM-coalgebra for , such that .

Every distributive law induces, by initiality, a unique coalgebra such that is -bialgebra. If is the cofree comonad for , then is the coinductive extension of a -coalgebra , which we call the operational model of . Behavioural equivalence on the operational model is a congruence. This result applies in particular to abstract GSOS and coGSOS specifications, which both extend to distributive laws of monad over comonad.

A lifting of a functor to is a functor making the following commute:

where the vertical arrows represent the forgetful functor, sending a coalgebra to its carrier. Further, a monad on is a lifting of a monad on if is a lifting of , and . A lifting of to is defined similarly.

Distributive laws of over are in one-to-one correspondence with liftings of to (see [14, 23]). If is the cofree comonad for , then , hence a further equivalent condition is that lifts to . In that case, the operational model of a distributive law can be retrieved by applying the corresponding lifting to the unique coalgebra .

3 Similarity

In this section, we recall the notion of simulations of coalgebras from [11], and prove a few basic results concerning the similarity preorder on final coalgebras.

An ordered functor is a pair of functors and such that

commutes, where the arrow from to is the forgetful functor. Thus, given an ordered functor, there is a preorder for any set , and for any map , is monotone.

The (canonical) relation lifting of is defined on a relation by

For a detailed account of relation lifting, see, e.g., [12]. Let be an ordered functor. The lax relation lifting is defined as follows:

Let and be -coalgebras. A relation is a simulation (between and ) if . The greatest simulation between coalgebras and is called similarity, denoted by , or if , or simply if and are clear from the context.

Given a set and an ordered functor , we define the ordered functor by

The induced notion of simulation can naturally be expressed in terms of the original one:

Lemma 1.

Let be the similarity relation between coalgebras and . Then for any relation , we have iff and for all : .

Given an ordered functor we write

for the similarity order induced by on the cofree coalgebra . We discuss a few examples of ordered functors and similarity—see [11] for many more.

Example 5.

For the functor ordered by (pointwise) subset inclusion, a simulation as defined above is a (strong) simulation in the standard sense. For elements , we have iff there exists a (strong) simulation between the underlying trees of and , so that related pairs agree on labels in .

Example 6.

For any , the functor , where , can be ordered as follows: iff or , for all . If then consists of finite and infinite sequences of the form with and for each (cf. Example 2). For we have if does not terminate before does, and and agree on labels in and on each position where is defined.

Lemma 2.

Coalgebra homomorphisms preserve similarity: if then .

In the remainder of this section we state a few technical properties concerning similarity on cofree comonads, which will be necessary in the following sections. The proofs use Lemma 2 and a few basic, standard properties of relation lifting.

Pointwise inequality of coalgebras implies pointwise similarity of coinductive extensions:

Lemma 3.

Let be an ordered functor, and let and be -coalgebras on a common carrier . If then .

Recall from Section 2 that any -homomorphism yields a -homomorphism between coinductive extensions. A similar fact holds for inequalities.

Lemma 4.

Let be an ordered functor where preserves weak pullbacks, and let , and .

  • If then , and conversely,

  • if then .

4 Monotone biGSOS specifications

As discussed in the introduction, GSOS and coGSOS have a straightforward common generalisation, called biGSOS specifications. Throughout this section we assume is an ordered functor, has a cofree comonad and has a free monad.

Definition 1.

A biGSOS specification is a natural transformation of the form . A triple consisting of a set , an algebra and a coalgebra (i.e., a bialgebra) is called a -model if the following diagram commutes:

If , then one can obtain biGSOS specifications from concrete rules in the ntree format, which combines GSOS and safe ntree, allowing lookahead in premises, negative premises and complex terms in conclusions.

Of particular interest are -models on the initial algebra :

(5)

(Notice that .) We call these supported models. Indeed, for labelled transition systems, this notion coincides with the standard notion of the supported model of an SOS specification (e.g., [2]).

In the introduction, we have seen that biGSOS specifications do not necessarily induce a supported model. But even if they do, such a model is not necessarily unique, and behavioural equivalence is not even a congruence, in general, as shown by the following example.

Example 7.

In this example we consider a signature with constants and , and unary operators and . Consider the specification (represented by concrete rules) on labelled transition systems where and are not assigned any behaviour, and and are given by the following rules:

The behaviour of is independent of its argument . Which transitions can occur in a supported model? First, for any there is a transition . Moreover, a transition can be in the model, although it does not need to be. But if it is there, it is supported by an infinite proof.

In fact, one can easily construct a model in which the behaviour of is different from that of —for example, a model where does not make any transitions, whereas for some . Then behavioural equivalence is not a congruence; is bisimilar to , but is not bisimilar to .

The above example features a specification that has many different interpretations as a supported model. However, there is only one which makes sense: the least model, which only features finite proofs. It is sensible to speak about the least model of this specification, since it does not contain any negative premises. More generally, absence of negative premises can be defined based on an ordered functor and the induced similarity order.

Definition 2.

A biGSOS specification is monotone if the restriction of to corestricts to , for any set .

If represents an algebraic signature, then monotonicity can be conveniently restated as follows (c.f. [7], where monotone GSOS is characterised in a similar way). For every operator :

for every set and every . Thus, in a monotone specification, if simulates for each , then the behaviour of is “less than” the behaviour of .

In the case of labelled transition systems, it is straightforward that monotonicity rules out (non-trivial use of) negative premises. Notice that the example specification in the introduction consisting of rules (2) and (3), which does not have a model, is not monotone. This is no coincidence: every monotone biGSOS specification has a model, if is a pointed DCPO, as we will see next. In fact, the proper canonical choice is the least model, corresponding to behaviour obtained in finitely many proof steps.

4.1 Models of monotone specifications

Let be a monotone biGSOS specification. Suppose is a pointed DCPO. Then the set of coalgebras , ordered pointwise, is a pointed DCPO as well.

Consider the function , defined as follows:

(6)

Since is an isomorphism, a function is a fixed point of if and only if it is a supported model of (Equation (5)). We are interested in the least supported model. To show that it exists, since is a pointed DCPO, it suffices to show that is monotone.

Lemma 5.

The function is monotone.

Proof.

Suppose and . By Lemma 3, we have . From standard properties of relation lifting we derive and now the result follows by monotonicity of (assumption) and monotonicity of ( is ordered). ∎

Corollary 1.

If is a pointed DCPO and is a monotone biGSOS specification, then has a least supported model.

The condition of the Corollary is satisfied if is of the form (c.f. Example 6), that is, for some functor (where the element in the singleton 1 is interpreted as the least element of the pointed DCPO). Consider, as an example, the functor of finite and infinite streams over . Any specification that does not mention termination (i.e., a specification for the functor ) yields a monotone specification for .

Example 8.

Consider the following specification (in terms of rules) for the functor of (possibly terminating) stream systems over the natural numbers. It specifies a unary operator , a binary operator , infinitely many unary operators (one for each ), and constants , :

where and denote addition and multiplication of natural numbers, respectively. This induces a monotone biGSOS specification; the rule for is GSOS nor coGSOS, since it uses both lookahead and a complex conclusion. By the above Corollary, it has a model. The coinductive extension maps to the increasing stream of positive integers, and is the stream . But does not represent an infinite stream, since is undefined.

The case of labelled transition systems is a bit more subtle. The problem is that and are not DCPOs, in general, whereas the functor does not have a cofree comonad. However, if the set of closed terms is countable, then is a pointed DCPO, and thus Corollary 1 applies. The specification in Example 7 can be viewed as a specification for the functor , and it has a countable set of terms. Therefore it has, by the Corollary, a least supported model. In this model, the behaviour of is empty, for any .

5 Distributive laws for biGSOS specifications

In the previous section we have seen how to construct a least supported model of a monotone biGSOS specification, as the least fixed point of a monotone function. In the present section we show that, given a monotone biGSOS specification, the construction of a least model generalizes to a lifting of the free monad to the category of -coalgebras. It then immediately follows that there exists a canonical distributive law of the monad over the comonad , and that the (unique) operational model of this distributive law corresponds to the least supported model as constructed above.

In order to proceed we define a -ordered functor as an ordered functor (Section 3) where is replaced by . Below we assume that is -ordered, and and are as before (having a free monad and cofree comonad respectively).

Example 9.

A general class of functors that are -ordered are those of the form , where the singleton is interpreted as the least element and all other distinct elements are incomparable (see Example 6). Another example is the functor of labelled transition systems with arbitrary branching, but this example can not be treated here because there exists no cofree comonad for it. The case of labelled transition systems is treated in Section 6.

Let be the set of -coalgebras with carrier , pointwise ordered as a DCPO by the order on . The lifting of to that we are about to define maps a coalgebra to the least coalgebra , w.r.t. the above order on , making the following diagram commute.

Equivalently, is the least fixed point of the operator defined by

Following the proof of Lemma 5 it is easy to verify:

Lemma 6.

For any , the function is monotone.

For the lifting of , we need to show that the above construction preserves coalgebra morphisms.

Theorem 1.

The functor defined by

is a lifting of the functor .

Proof.

Let and be -coalgebras. We need to prove that, if is a coalgebra homomorphism from to , then is a homomorphism from to .

The proof is by transfinite induction on the iterative construction of and as limits of the ordinal-indexed initial chains of and respectively. For the limit (and base) case, given a (possibly empty) directed family of coalgebras and another directed family , such that for all , we have by continuity of and assumption.

Let and be such that . To prove: , i.e., commutativity of the outside of:

From left to right, the first square commutes by naturality of (and the fact that it is an isomorphism), the second by assumption that is a -coalgebra homomorphism from to (and therefore a -coalgebra homomorphism) and the assumption that is a coalgebra homomorphism from to , the third by naturality of , and the fourth by naturality of and . ∎

We show that the (free) monad lifts to . This is the heart of the matter. The main proof obligation is to show that is a coalgebra homomorphism from to , for any -coalgebra .

Theorem 2.

The monad on lifts to the monad on , if preserves weak pullbacks.

The lifting gives rise to a distributive law of monad over comonad.

Theorem 3.

Let be a monotone biGSOS specification, where is -ordered and preserves weak pullbacks. There exists a distributive law of the free monad over the cofree comonad such that the operational model of is the least supported model of .

Proof.

By Theorem 2, we obtain a lifting of to . As explained in the preliminaries, such a lifting corresponds uniquely to a distributive law of the desired type. The operational model of is obtained by applying the lifting to the unique coalgebra . But that coincides, by definition of the lifting, with the least supported model as defined in Section 4. ∎

It follows from the general theory of bialgebras that the unique coalgebra morphism from the least supported model to the final coalgebra is an algebra homomorphism, i.e., behavioural equivalence on the least supported model of a monotone biGSOS specification is a congruence.

Labelled transition systems

The results above do not apply to labelled transition systems. The problem is that the cofree comonad for the functor does not exist. A first attempt would be to restrict to the finitely branching transition systems, i.e., coalgebras for the functor . But this functor is not -ordered, and indeed, contrary to the case of GSOS and coGSOS, even with a finite biGSOS specification one can easily generate a least model with infinite branching, so that a lifting as in the previous section can not exist.

Example 10.

Consider the following specification on (finitely branching) labelled transition systems, involving a unary operator and a constant :

The left rule for constructs an infinite chain of transitions from for any , so in particular for . The right rule takes the transitive closure of transitions from , so in the least model there are infinitely many transitions from .

The model in the above example has countable branching. One might ask whether it can be adapted to generate uncountable branching, i.e., that we can construct a biGSOS specification for the functor , such that the model of this specification would feature uncountable branching. However, as it turns out, this is not the case, at least if we assume to be a polynomial functor (a countable coproduct of finite products, modelling a signature with countably many operations each of finite arity), and the set of labels to be countable. This is shown more generally in the next section.

6 Liftings for countably accessible functors

In the previous section, we have seen that one of the most important instances of the framework—the case of labelled transition systems—does not work, because of size issues: the functors in question either do not have a cofree comonad, or are not DCPO-ordered. In the current section, we solve this problem by showing that, if both functors are reasonably well-behaved, then it suffices to have a DCPO-ordering of only on countable sets.

More precisely, let be the full subcategory of countable sets, with inclusion . We assume that is an ordered functor on , and that its restriction to countable sets is -ordered:

This is a weaker assumption than in Section 5: before, every set was assumed to be a pointed DCPO, whereas here, they only need to be pointed DCPOs when is countable (and just a preorder otherwise).

Example 11.

The functor coincides with the -ordered functor when restricted to countable sets, hence it satisfies the above assumption. Notice that is not -ordered. The functor does not satisfy the above assumption.

The functor , for the complete monoid (Example 4), is ordered as a complete lattice [20], so also -ordered. Similar to the above, the functor is -ordered when restricted to countable sets, i.e., satisfies the above assumption.

We define to be the full subcategory of -coalgebras whose carrier is a countable set, with inclusion . The associated forgetful functor is denoted by .

The pointed DCPO structure on each , for countable, suffices to carry out the fixed point constructions from the previous sections for coalgebras over countable sets, if we assume that preserves countable sets. Notice, moreover, that the (partial) order on the functor is still necessary to define the simulation order on , and hence speak about monotonicity of biGSOS specifications. The proof of the following theorem is essentially the same as in the previous section.

Theorem 4.

Suppose preserves countable sets, and is an ordered functor which preserves weak pullbacks and whose restriction to is -ordered. Let be the restriction of to . Any monotone biGSOS specification gives rise to a lifting of the monad to .

In the remainder of this section, we will show that, under certain assumptions on and , the above lifting extends to a lifting of the monad from to , and hence a distributive law of the monad over the cofree comonad . It relies on the fact that, under certain conditions, we can present every coalgebra as a (filtered) colimit of coalgebras over countable sets.

We use the theory of locally (countably, i.e., -) presentable categories and (countably) accessible categories. Because of space limits we can not properly recall that theory in detail here (see [4]); we only recall a concrete characterisation of when a functor on is countably accessible, since that will be assumed both for and later on. On , a functor is countably accessible if for every set and element , there is an injective function from a finite set and an element such that . Intuitively, such functors are determined by how they operate on countable sets.

Example 12.

Any finitary functor is countably accessible. Further, the functors and (c.f. Example 11) are countably accessible if is countable.

A functor is called strongly countably accessible if it is countably accessible and additionally preserves countable sets, i.e., it restricts to a functor . We will assume this for our “syntax” functor . If correponds to a signature with countably many operations each of finite arity (so is a countable coproduct of finite products) then is strongly countably accessible.

The central idea of obtaining a lifting to from a lifting to is to extend the monad on along the inclusion . Concretely, a functor extends if there is a natural isomorphism . A monad on extends a monad on if extends with some isomorphism such that and . This notion of extension is generalised naturally to arbitrary locally countably presentable categories. Monads on the category of countably presentable objects can always be extended.

Lemma 7.

Let be a locally countably presentable category, with the subcategory of countably presentable objects. Any monad on extends uniquely to a monad on , along .

Since is countably accessible,