A Complete Inference System for Probabilistic Infinite Trace Equivalence
Abstract
We present the first sound and complete axiomatization of infinite trace semantics for generative probabilistic transition systems. Our approach is categorical, and we build on recent results on proper functors over convex sets. At the core of our proof is a characterization of infinite traces as the final coalgebra of a functor over convex algebras. Somewhat surprisingly, our axiomatization of infinite trace semantics coincides with that of finite trace semantics, even though the techniques used in the completeness proof are significantly different.
Keywords and phrases:
Coalgebra, infinite trace, semantics, logic, convex setsFunding:
Corina Cîrstea: partly supported by the Leverhulme Trust Research Project Grant RPG-2020-232.Copyright and License:
Ana Sokolova; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic ; Theory of computation Formal languages and automata theoryAcknowledgements:
We thank Wojtek Rozowski for insightful discussions on related topics and the anonymous reviewers for helpful suggestions that improved the material presented in the paper. We thank the National Science Foundation and the Simons Laufer Mathematical Sciences Institute for their support of our work.Funding:
This material is based upon work supported by the National Science Foundation under Grant No. DMS-1928930, while the authors were in residence at the Mathematical Sciences Research Institute in Berkeley, California, during the Summer Research in Mathematics program of 2024.Editors:
Jörg Endrullis and Sylvain SchmitzSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Probabilistic transition systems have been studied in the semantics and verification literature for decades. There are many variants, from the simplest Rabin model [16] to systems that encompass multiple layers of randomized and non-deterministic choice. A good overview of existing systems and an expressiveness hierarchy was provided in [26, 3].
One important class of probabilistic systems are so-called generative probabilistic transition systems (GPTS). These are much like ordinary (nondeterministic) labelled transition systems, but each state is assigned a (sub-)probability distribution over outgoing transitions instead of a set of outgoing transitions. Every state in a GPTS generates a probability distribution of traces. The traces generated can be finite or infinite depending whether the GPTS models explicit termination.
In this paper, we will consider GPTS without explicit termination, also widely known in the literature as Labelled Markov Chains (LMCs), and therefore we are only interested in including infinite traces in the semantics. That is, each state of an LMC we consider generates a probability distribution on infinite traces (a.k.a. streams). The main goal of this paper is to provide an axiomatic characterization of when two states in these LMCs generate the same probability distribution on streams. We provide a syntax and an inference system to reason about distributions on streams generated by a state of an LMC, and prove that the axiomatization is both sound and complete.
Axiomatizing trace distribution semantics is difficult in general, and this is made more challenging by the presence of infinite traces. One of the seminal works on axiomatizing probabilistic behaviours is due to Stark and Smolka [29], but they studied probabilistic bisimilarity (in the sense of [11]), which is a finer equivalence than trace distributions. A decade later [25], Silva and Sokolova showed that adding one extra axiom to Stark and Smolka’s axiomatization of probabilistic bisimilarity was enough to obtain a sound and complete axiomatization of finite trace distribution equivalence. At the core of Silva and Sokolova’s completeness result was the observation that finite trace distribution equivalence coincides with bisimilarity after determinization in the category of convex algebras, algebraic structures that model the closure of convex sets under convex combinations. Stark and Smolka’s result is the probabilistic analogue of an earlier paper of Milner [15], whereas Silva and Sokolova’s is the probabilistic analogue of an earlier paper of Rabinovich [17], where it is shown that a sound and complete axiomatization of trace semantics of labelled transition systems can be obtained from an axiomatization of bisimilarity. All these works, non-deterministic and probabilistic, restrict themselves to finite traces.
To achieve our goal, we use a categorical perspective on the semantics of LMCs. This is in the spirit of [25], but there are crucial technical hurdles to overcome: First, we need to find an endofunctor on a category that models LMCs as coalgebras and allows the derivation of the stream distribution semantics in a canonical way. More specifically, we need to give a coalgebraic characterization of the map that assigns to every state of an LMC the distribution on streams that the state generates. To this end, we carefully craft the endofunctor on the category of convex algebras and convex algebra homomorphisms in Section 5. Second, we show that our endofunctor satisfies a number of desirable properties that enable a sound and complete axiomatization, including the preservation of pullbacks and properness [14]. Finally, we need to find a suitable syntax for specifying finite LMCs where stream semantics is of interest. Each of these steps pushes the boundaries of existing work on semantics and decidability of trace equivalence for automata, and they require new technical results that form the core contributions of our paper. We briefly describe our contributions below and give an outline of the paper.
-
In Section 2, we recall basic definitions on labelled Markov chains and their semantics.
-
In Section 5, we define the endofunctor , which forms the basis of all of our developments. The functor is defined on the category of convex algebras and convex algebra homomorphisms (see Definition 4.1), and makes use of an important mass-splitting property that resembles a side condition present in [6]. Crucially, we characterize stream distribution semantics as a final -coalgebra semantics, via a determinization construction that turns LMCs into -coalgebras. This construction is interesting in its own right, given its simplicity compared to existing finality-based approaches to infinite trace semantics [9, 5, 6].
-
In Section 6, we define a -coalgebra structure on the set of process terms modulo axioms, which endows the terms with an operational semantics. We show that this term coalgebra is universal among the free and finitely generated -coalgebras by providing unique solutions to finite systems of equations arising from a coalgebra structure.
-
We conclude with a discussion of related and future work, and the implications of the completeness theorem in Section 8.
Our completeness result is remarkable for two reasons: First and foremost, our axiomatization is precisely the same as Silva and Sokolova’s for finite trace semantics. In other words, both the (finite) trace distribution semantics and the stream distribution semantics give rise to the same valid equations between term expressions. Second, the completeness result uses a novel proof of properness [14, 28] that appears to hinge on the topology of bisimulations between coalgebras over convex algebras. The latter is a significant point of departure from the properness proof method of Sokolova and Woracek [28].
2 Labelled Markov Chains and Stream Semantics
In this section, we briefly recall basic definitions of labelled Markov chains, stream semantics, and the framework of universal coalgebra.
Labelled Markov chains.
Given a set , define to be the set of finitely supported probability distributions on . That is, if and only if , for finitely many , and . Since the support is finite, each can be written in the form such that and for each . We write for the Dirac delta at .
For a fixed finite set of formal symbols called actions, a labelled Markov chain (or LMC) is a pair consisting of a set of states and a transition function . An LMC is said to be finite if it has finitely many states.
One graphical depiction of a finite LMC is the directed graph with a node for each state and a decorated edge between nodes and whenever with . We typically drop the notation whenever the transition function is clear from context.
Example 2.1.
The LMC with , , and is depicted in (2.1).
| (2.1) |
Stream semantics.
A word over a finite alphabet is a finite sequence (written as a juxtaposition) of elements of . We write for the empty word. A stream is an infinite sequence of elements from . We write for the set of words and for the set of streams. The set carries a topology, with basis given by the cylinder sets,
where is a word. In the notation above, , as every stream begins with .
Recall that a Borel set is an element of the -algebra generated by the open sets of a topological space, a Borel measure is a measure defined on the Borel sets, and a Borel probability distribution is a Borel measure with total probability [19].
Definition 2.2.
A stream distribution is a Borel probability distribution on the space . The set of all stream distributions on is written .
Each state of an LMC corresponds to a unique stream distribution that records the probability of that state eventually emitting streams in a given Borel set. The following proposition is a special case of [9, Proposition 3.12].
Proposition 2.3.
Let be an LMC. There is a unique map such that for any and any and ,
The map above is the stream semantics of . Given states , we say and are stream equivalent if .
LMCs as coalgebras.
Universal coalgebra is by now a standard framework for studying state-based systems like LMCs [20]. The theory is sufficiently general for capturing systems where the states come with additional structure. Systems with structured state spaces are central to the main result of this paper, so we state the definitions below for more general categories than the category of sets and functions.
Definition 2.4.
Given an endofunctor on a category , an -coalgebra is a pair consisting of an object of and an arrow . A coalgebra homomorphism is an arrow such that . We write for the category of -coalgebras and their homomorphisms.
The set-mapping is a functor, with action on functions given by
where and . The set-mapping is also a functor, with the action on functions being . By composition, is an endofunctor on . The point is that LMCs are precisely -coalgebras. Unravelling the definitions, a coalgebra homomorphism between LMCs is a function such that for any , if , then
Coalgebra homomorphisms are precisely the maps that preserve the branching-time behaviour of probabilistic systems.
A category is concrete if there is a faithful functor . An object in a concrete category is essentially a set with additional structure, and arrows are functions that preserve that structure. We write for . The category is of course concrete, as witnessed by the identity functor.
Definition 2.5.
Let and be -coalgebras where and is concrete, and . We say and are behaviourally equivalent and write if there is a cospan in such that .
For LMCs, behavioural equivalence (which coincides with probabilistic bisimilarity) implies stream equivalence [21, Theorem 6.7].
Proposition 2.6.
Let and be LMCs, , . If , then .
The converse fails: for LMCs, behavioural equivalence is strictly finer than stream equivalence (see, e.g., [21, Figure 8]). It follows that there is no LMC structure such that is always a coalgebra homomorphism.
3 Axiomatizing Stream Semantics
In this section, we recall Stark and Smolka’s specification language for probabilistic transition systems [29] and the axioms for trace equivalence proposed by Silva and Sokolova [25].
A Specification Language for LMCs
Fix an infinite set of variables. Consider the set of terms generated by the grammar below,
where , , and . A variable is bound in a term if it appears within the scope of , and guarded if it appears within the scope of some . The set of productive process terms is the set of terms such that every variable appearing in is both guarded and bound. Given variables , we write for the set of guarded terms whose free variables are contained in .
Intuitively, the operation is prefixing by , and denotes the process that makes an -labelled transition with probability into . The operations are called convex sums, and denotes the process whose outgoing transitions are the same as and , but with probabilities scaled by and respectively. The operation is recursion in , and behaves exactly as does, where denotes the productive process term obtained by substituting every free occurrence of in with . Recursion is the source of loops in the LMCs specified by productive process terms. The intuition behind each operation on productive process terms is formalized as follows.
Definition 3.1.
For any , , , , and , define
Then is the syntactic LMC.
Each probabilistic process term shares its stream semantics with a state in a finite LMC. In particular, let be the set of probabilistic process terms such that . Then is finite and restricts to a transition structure [21]. We also have , since only depends on states reachable from .
The converse is also true. The following theorem, analogous to Kleene’s theorem for regular expressions [10], is a direct consequence of results presented in [29].
Theorem 3.2.
Let be a finite LMC and let . There exists an such that and are behaviourally equivalent.
As an immediate consequence of Theorems 3.2 and 2.6, we have that is a fully expressive specification language for states of finite LMCs.
Corollary 3.3.
Let be a finite LMC and let . There exists an such that .
From now on, we drop and simply write instead of , for .
Example 3.4.
The state in the LMC (2.1) has the same stream semantics as the term . However, it appears that there is a redundancy in the LMC (2.1). Both and emit and with the same probability, and each transitions to the other with the same probability. Thus, the stream semantics of both states and is the unique Borel probability distribution satisfying for any , making and stream equivalent to the state below. This one-state LMC corresponds to the process term .
It follows that
Axioms for stream equivalence
As we have seen from Example 3.4, even very different looking productive process terms can be stream equivalent. To facilitate reasoning about equivalence, we give a set of inference rules for deducing algebraically that two productive process terms are stream equivalent.
Definition 3.5 (Provable equivalence).
Probabilistic process terms are said to be provably equivalent, written , if can be proven from axioms in Fig. 1. We write for the -equivalence class of .
The main goal of the paper is to prove that the axioms in Fig. 1 are sound and complete to reason about stream semantics of LMCs:
Soundness was established in [21, Theorem 6.9]. The main result in this paper is completeness, which verifies [21, Conjecture 1].
Theorem 3.6 (Completeness).
Let . If , then .
4 Blueprint for Proving Completeness
The main goal of the rest of the paper is to prove Theorem 3.6, completeness of our inference system. We begin with a high-level sketch of the proof to ease the flow into the upcoming technical sections. At the core of our argument will be the fact that the semantics of terms, as given by , can be factorized:
| (4.1) |
The existence of this factorization is a consequence of soundness, which implies that factors through the quotient for a particular function . Once we have such factorization, we can reason as follows:
Now completeness follows if we can justify the step, which amounts to injectivity of . In other words, Theorem 3.6 follows if is injective. And that is precisely what we are going to prove. Before we outline the completeness proof, we need a few notions from convex algebra.
Definition 4.1.
A convex algebra is an algebraic structure consisting of a set and a family of binary operations (written infix) satisfying
An affine map, or convex algebra homomorphism, between convex algebras and is a function that satisfies for each . The category of convex algebras and affine maps is denoted .
A convex algebra is free and generated by a set if every map from to the carrier of a convex algebra extends to a unique affine map . The set is then the set of generators of the free algebra . If is a finite set, then the free algebra generated by is free finitely generated, ffg, for short. A convex algebra is finitely generated, fg, for short, if it is a homomorphic image of a free finitely generated one.
Note that we will often write instead of if the convex algebra structure is clear from the context.
Back to the intended completeness result as outlined above, we break the proof of injectivity of into 3 steps, each of independent interest.
Step 1
We identify the category of convex algebras as the right base category to define the stream semantics of LMCs. More precisely, we define a functor on and show that the convex algebra of Borel probability distributions carries a final -coalgebra structure . By turning any LMC into a -coalgebra via a determinization construction (see Definition 5.11), we obtain the determinized stream semantics , via the final coalgebra homomorphism . We then relate this determinized stream semantics to the original stream semantics defined in Proposition 2.3 using the syntactic LMC as shown in the diagram (4.1).
Step 2
We provide a -coalgebra structure on the equivalence classes of terms modulo provable equivalence and show that every ffg -coalgebra (i.e., is ffg) has a unique coalgebra homomorphism into . This is related to solving certain systems of equations in . We also show that is locally fg, in the following sense:
Definition 4.2.
A -coalgebra is locally fg if for any , there is a subcoalgebra of such that and is fg. A locally fg -coalgebra is final if every locally fg -coalgebra admits a unique coalgebra homomorphism into .
The significance of being locally fg is related to the lemma below.
Lemma 4.3.
Every homomorphic image of a locally fg -coalgebra is also locally fg.
Consider the surjective-injective factorization of the coalgebra homomorphism below.
To show that is injective, it suffices to show that the map has a left inverse, a coalgebra homomorphism such that , as then
One way to do this is to show that is the final locally fg -coalgebra. In such a case, by Lemma 4.3, is also locally fg, and therefore admits the desired (necessarily unique) coalgebra homomorphism . Indeed, by finality, since and are both homomorphisms from to itself, they must be the same, i.e., .
Step 3
Lastly, we will establish sufficient conditions guaranteeing that is the final locally fg -coalgebra. Our end goal will be to apply the following theorem, which can be obtained from a combination of [14, Corollary 5.9] and [27, Corollary 5.5].
Theorem 4.4.
Suppose that is a finitary proper endofunctor on that preserves surjective affine maps. Then an -coalgebra is a final locally fg coalgebra if and only if (i) is locally fg and (ii) for every ffg -coalgebra , there is a unique coalgebra homomorphism .
Theorem 4.4 uses the notion of a proper functor, which we will define in Definition 7.6 below.
After having completed Step 2, we will have already seen that is locally fg, and furthermore that every ffg -coalgebra admits a unique coalgebra homomorphism into .
Thus, completing Step 3 hinges on showing that the functor is finitary, that it preserves surjective affine maps, and that is proper.
Step 3 is the most technical of the three steps.
To summarize, here are our obligations stated in the three steps above:
-
1.
We must define , endow with a -coalgebra structure , turning into a final -coalgebra.
-
2.
Given an LMC , we must explain how it is determinized to yield a -coalgebra , and how its stream semantics is obtained from the final coalgebra homomorphism as . In other words, we must relate the stream semantics to the determinzed stream semantics .
-
3.
We must define a coalgebra structure and show that is locally fg and that free fg -coalgebras admit unique coalgebra homomorphisms into .
-
4.
We must show that is finitary, preserves surjective algebra homomorphisms, and is proper.
5 Step 1: Convex (Co)Algebras and the Functor
We begin executing each of the steps in Section 4. We first need some basic definitions on the category of convex algebras.
Convex algebras.
Recall that a convex algebra is an algebraic structure consisting of a set and a collection of convex sum operations indexed by satisfying the equations in Definition 4.1, and recall that we write for the category of convex algebras.
Example 5.1.
Prime examples of convex algebras are convex subsets of , i.e., subsets such that implies that for all . Moreover, for any subset , there is a smallest convex algebra containing , namely the convex hull .
We may use the following syntax as a generalized convex sum in an arbitrary convex algebra: given and , define
| (5.1) |
It is important to note that, technically, the base case is . We can also use this notation if for and , but in that case we define . Up to the convex algebra axioms, any two ways of reordering the summands of (5.1) produces equivalent terms. This justifies the slight abuse of notation , where is a set and is a function such that and only finitely many of the are non-zero.
Free convex algebras.
is the free convex algebra generated by the set . Hence, for any convex algebra , and any function , there is a unique linear extension of such that . The universal property of free convex algebras gives rise to the adjunction , where is the free functor that maps a set to the free convex algebra generated by it and a function to , and is the forgetful functor from to that forgets the algebraic structure and is identity on homomorphisms.
The free functor is a left adjoint to the forgetful functor, and clearly . It follows that is a monad on with and , and furthermore, is isomorphic to the category of Eilenberg-Moore algebras for [31]. In particular, the free convex algebra generated by a set is the Eilenberg-Moore algebra . We often omit writing the forgetful functor when no confusion arises, and (in accordance with our convention to drop the algebra structure when no confusion arises) also often just write for the free algebra .
Adding a fresh element to a convex algebra.
In order to define the endofunctor , we need the following construction on convex algebras. Given a convex algebra , define . The set obtains a convex algebra structure with respect to the convex sum operation defined
Lemma 5.2.
Let be a convex algebra. As defined above, is a convex algebra. Moreover, given and in , if and only if and .
Remark 5.3.
We introduce some notation going forwards. We often use the notation for , even implicitly, despite that for all .
The construction is a functor whose action on convex algebra homomorphisms is given by for any convex algebra homomorphism and any . The homomorphism additionally satisfies . Freely adjoining is analogous to going from probability distributions to sub-probability distributions (maps such that ). The following lemma makes this precise.
Lemma 5.4.
Let be the finitely supported sub-probability distribution functor, and let be the set of Borel sub-probability measures on . Then as convex algebras, and .
The functor
We are now ready to introduce the functor on needed to move from to . There are different ways to define such a functor, e.g. Silva and Sokolova [25] use another functor for the axiomatization of finite trace semantics. The choice of the “right” functor so that our intended results go through, i.e., the choice of this particular functor , is one of the main contributions of this paper.
Given a convex algebra and a convex algebra homomorphism , let
| (5.2) |
where for each and . Equivalently, . Note that in the definition of above, the sum is the usual sum of real numbers, and that we define and leave undefined when .
Proposition 5.5.
As it is defined in (5.2), is an endofunctor on .
We use the following terminology to refer to the defining property of : If has the property that , as mentioned in (5.2), we say that satisfies the mass-splitting property, or that is mass splitting.111The mass-splitting property was inspired by a condition in Goy and Rot’s paper [6, Proposition 4.5].
In particular, a function is mass splitting, i.e., , if and only if the total mass is equal to . Given such a function, one can reverse-engineer a unique probability distribution such that computes the marginal for each . Thus, a -coalgebra of the form represents the same data as an LMC by reverse-engineering from for each . We think of -coalgebras as the deterministic counterpart of LMCs. Their exact relationship will be made precise at the end of this section.
Remark 5.6.
Note that as a set, , and so the description of above can also be taken as a definition of a functor . Indeed, is a lifting of to . However, the convex algebra structure on is not the convex algebra structure on obtained from (co)products in . The convex algebra structure is instead hand-tailored to match the structure of sub-probability distributions.
In a given -coalgebra , we write for , and whenever , we write for . Then whenever , while is undefined; and when ,
| (5.3) |
where the symbol here is from . Note that we often drop and write simply mass and next. In this notation, the mass-splitting property says that for all , we have .
Given -coalgebras and , unravelling the definitions of mass and next reveals that a function is a coalgebra homomorphism if and only if
| (5.4) |
for any and . In other words, for all and , , and if this is greater than , then as well.
A final -coalgebra.
We are now in the position to show that is the carrier of a final -coalgebra. First, observe that, like , is a convex algebra with the canonical convex sums, . In the proof of Theorem 5.13, we use the -algebra in the more general, Eilenberg-Moore, form , where
| (5.5) |
Definition 5.7.
The -coalgebra structure is given by, for ,
| (5.6) |
where for Borel , is the Borel set obtained by prefixing.
It is easy to check that is a convex algebra homomorphism and that satisfies the mass-splitting property for each .
Remark 5.8.
It is important to note that is not (in general) a convex algebra homomorphism.
Theorem 5.9.
The -coalgebra is final. That is, for any -coalgebra , there is a unique coalgebra homomorphism .
Here is a hint of a hint. We define by recursion on the length of :
| (5.7) | ||||
One needs to show that this specifies each function as a finitely additive function on the generators of the Borel algebra, that the resulting function is a convex algebra morphism as well as a -coalgebra morphism, and finally that it is the unique such map.
Remark 5.10.
It is also true that (forgetting the convex algebra structure) is the final coalgebra of the functor mentioned in Remark 5.6. This provides a way to define the stream semantics of LMCs using finality (Proposition 2.3), i.e., without the convex algebra structure. However, other ingredients in our completeness proof do require convex algebras.
Determinization: Connecting LMCs and -coalgebras
Earlier in this section, we mentioned that one can think of -coalgebras as deterministic counterparts to LMCs. We now make the relationship between LMCs and -coalgebras precise. Using the universal property of free convex algebras and the correspondence between finitely supported probability distributions and functions satisfying the mass-splitting property, we can construct a determinization functor as follows.
First, we define the natural transformation by
| (5.8) |
for each set , , and , with . After making the identification , this amounts to . A routine check verifies that is natural in and that for any , satisfies the mass-splitting property.
Having constructed , we can now define the determinization of the LMC to be the linear extension of the composition of after .
Definition 5.11.
The determinization functor is the functor given by with for any LMC , and for any coalgebra homomorphism between LMCs.
Moreover, we can show that is a natural isomorphism, by providing an inverse transformation . For with , define
| (5.9) |
Proposition 5.12.
The natural transformations and are inverse to each other. Moreover, given a -coalgebra , let be given by . Then . As a result, a -coalgebra is ffg iff it is a determinized finite LMC.
By Theorem 5.9, is a final -coalgebra, so from any LMC , we may determinize to get a -coalgebra and then use finality to obtain a unique coalgebra homomorphism . This yields a determinized stream semantics map by composition, i.e., . Fulfilling its intended purpose, determinized stream semantics does indeed coincide with stream semantics as we previously defined it.
Theorem 5.13.
For every LMC ,
Proof.
Let be given by , and for all , ,
| (5.10) |
For a fixed , let us use the notation for . Note that taking in (5.10) to be the empty word gives .
Fix . Let us first check that a map satisfies the equation mentioned in Proposition 2.3 if and only if . That is, for all and if and only if . This follows from:
where the first equality is by the definition of , the second equality is the definition of , and the third only rearranges the sum.
In the notation of Proposition 2.3, the map is the unique map so that . So we shall show that the has this same property. We thus show the commutativity of the outer diagram below (with arrows in blue):
The top square commutes by definition of , the left part commutes as by definition of , the middle square commutes because is a coalgebra homomorphism, and the part on the bottom commutes by naturality of . The commutativity of the remaining two parts is shown below.
We first prove that , giving commutativity of the part on the right. For , , and , we have, on the one hand:
| (5.13) |
We have used definitions of from (5.10) and from (5.6), that and that . On the other hand, we use the definitions of from (5.8) and from (5.5):
| (5.14) |
We turn to the commutativity of the remaining square. First, affineness of the map yields . We precompose with , and use the monad law along with the definition of . Thus . Now apply to see the desired commutativity.
Returning to our blueprint for completeness in Section 4, Theorem 5.13 shows that arises from the final coalgebra map of .
6 Step 2: as a -coalgebra
The set of provable equivalence classes of productive process terms inherits a canonical convex algebra structure from , given by . These operations are well-defined because Fig. 1 includes the necessary axiom and they are indeed convex operations as Fig. 1 includes the convex algebra axioms. In this section, we show that also carries a canonical -coalgebra structure . We then focus on two goals: The first goal is to show that the stream semantics of a productive process term is equal to the stream distribution obtained from the finality of . The second goal of this section is to show that is locally fg and that every ffg -coalgebra admits a unique coalgebra homomorphism into .
Defining .
Let and write . We define the map using the formulas
| (6.1) |
for any -equivalence class and . It can be shown by induction on derivations that (6.1) describes a well-defined map, i.e., implies the right-hand sides of the equations in (6.1) agree.
The following characterization of illustrates that this is a natural choice of -coalgebra structure on .
Lemma 6.1.
Given , let
If , then for any ,
| (6.2) |
where and .
The proof of Lemma 6.1 is a rather long induction on the proof of . As an immediate consequence of this lemma, we obtain the following.
Lemma 6.2.
Let and be the linear extension of the quotient-by- map. Then the following diagram commutes.
| (6.3) |
In particular, is a convex algebra homomorphism, and is a homomorphic image of the determinized syntactic LMC.
Theorem 6.3.
For any , .
Proof.
By Theorem 5.9 and Theorem 5.13, .
Theorem 6.4.
The -coalgebra is locally fg.
Proof.
It follows from results due to Stark and Smolka [29] that the syntactic LMC is locally finite, in the sense that for any , there is a finite subcoalgebra of containing . So, let and find a finite subcoalgebra of containing . Then is a free fg subcoalgebra of containing . Taking the image of under , we obtain a finite subcoalgebra of containing , as a quotient of a free fg -coalgebra. Thus, is contained in a fg subcoalgebra.
Systems of equations from -coalgebras and their unique solutions
The next goal is to show that every ffg -coalgebra admits a unique coalgebra homomorphism into . As we remarked after Definition 5.11, every ffg -coalgebra is of the form for some finite LMC . So, it suffices to show that every determinized finite LMC admits a unique coalgebra homomorphism into . As we will see, each coalgebra homomorphism corresponds to a solution to a particular system of equations.
Definition 6.5.
The guarded system of equations corresponding to the finite LMC is the set of formal equations
| (6.4) |
A solution to the guarded system of equations (6.4) is a map
Two solutions are equivalent, written , if for all .
The following theorem was a key component of Stark and Smolka’s completeness proof for bisimilarity.
Theorem 6.6 (Stark-Smolka [29]).
Every guarded finite system of equations has a unique solution up to without the use of the distributivity axiom .
An immediate consequence of the above theorem is the existence and uniqueness of solutions for systems of equations that arise from LMCs.
Corollary 6.7.
Let be a finite LMC. Then has a unique solution up to .
Using the distributivity axiom, we can transform each equation in (6.4) into an equivalent system of equations of the form
where mass and next are derived from . This tells us that a map is a solution to if and only if for all ,
Solving systems of equations of this form is equivalent to finding -coalgebra homomorphisms into .
Lemma 6.8.
Let be a finite LMC, and let . Define to be the linear extension of the composition . Then is a solution to if and only if is a coalgebra homomorphism.
We immediately obtain the following theorem.
Theorem 6.9.
Let be a finite LMC. There is a unique -coalgebra homomorphism .
Hence, recalling that every ffg coalgebra arises via determinisation (see Proposition 5.12) yields that we have a unique homomorphism from any ffg coalgebra to .
7 Step 3: Properness of
In this section, we finish the outline of completeness that we stated in Section 4 by establishing that is finitary, preserves surjective affine maps, and is proper. By Theorems 4.4, 6.4, and 6.9, this allows us to conclude that is the final locally fg -coalgebra.
Lemma 7.1.
preserves pullbacks, and hence monomorphisms.
Let us mention that monomorphisms in are exactly those affine maps which are injective as set functions. This follows from the fact that is a right adjoint and thus preserves all limits, in particular all pullbacks. Recall that in any category monos are characterized as special pullbacks as in the square below. In particular, let be a monomorphism in . Then the square below is a pullback (and conversely) in .
Then its image under is also a pullback and thus is a monomorphism in : that is, is an injective function.
For space reasons, we omit the proof that preserves pullbacks. Using Lemma 7.1, we can establish the first required property of .
Lemma 7.2.
The functor on is finitary.
Proof.
We are going to use the following results:
- Fact 1.
-
The forgetful functor creates directed colimits.
- Fact 2.
-
Let be a category equipped with a functor that creates – hence, preserves and reflects – directed colimits. Let be a lifting of an endofunctor , i.e., . Then, if preserves directed colimits, so does .
In our situation, is defined in Eq. 5.2, , and . The proof of Fact 1 is routine, and similar to that of [1, Remark 3.4 (vii).(4)].
Let us briefly establish Fact 2. Let be a directed diagram in , and let be a colimiting cocone for . We want to show that is a colimiting cocone for . Since reflects colimits, it suffices to show that is a colimiting cocone for . To this end, consider the directed diagram . Since preserves directed colimits, is a colimiting cocone for . Now, since is finitary, i.e., it preserves directed colimits, is a colimiting cocone of the directed diagram . But , so we can conclude that is a colimiting cocone of the directed diagram , as desired.
We can now proceed with the proof of the lemma. Recall from Remark 5.6 that (from Eq. 5.2) is a lifting of the endofunctor . The functor is finitary because for any set , and any function , there is the finite set with . By Fact 1, the forgetful functor creates directed colimits. Thus, the conditions of Fact 2 are satisfied, and we may conclude that is finitary.
Lemma 7.3.
preserves surjective affine maps.
Proof.
Let be a surjective affine map. Consider . For , we have and .
Take . For each , denote by an element of with . Such exists since is surjective. We define as follows. For , if , set and if , set . Then and .
The most interesting point in this section is the properness of (see Definition 7.6). In order to verify that is proper, we need a few lemmas regarding bisimilarity and behavioural equivalence for -coalgebras.
Lemma 7.4.
Let be a -coalgebra on . Then bisimilarity (the largest bisimulation) on coincides with behavioural equivalence, which in turn coincides with the final coalgebra semantics.
Proof.
Behavioural equivalence always coincides with the final coalgebra semantics if the functor admits a final coalgebra, which is the case for our functor on .
is complete and cocomplete [2, § 9.3, Prop. 4] and the functor preserves (weak) pullbacks by Lemma 7.1. So satisfies the requirements of [30, Theorem 4.1]. As a consequence: (1) every bisimulation is contained in a kernel bisimulation, and hence bisimilar states are behaviourally equivalent, and (2) every kernel bisimulation is a bisimulation, yielding that behaviourally equivalent states are bisimilar.
We need one more lemma that characterises bisimilarity for in concrete terms. The proof follows directly from the definition of bisimulation.
Lemma 7.5.
Let and be -coalgebras. Let be a subalgebra of . Then is a bisimulation between and if and only if the following holds: whenever and , , and if , then contains .
Without further ado, let us now proceed with the proof that is a proper functor, in the following sense.
Definition 7.6.
Let be a finitary monad on and write for the Eilenberg-Moore category of . A zig-zag in is a diagram of the shape
| (7.1) |
Write for the unit of . The zig-zag above relates with , written , if there exist elements , , with (setting and )
The endofunctor is said to be proper if the following statement holds: for any pair of ffg -coalgebras and and any two elements and with , there exists a zig-zag in entirely consisting of ffg -coalgebras that relates with . We may call such a zig-zag an ffg zig-zag.
Theorem 7.7.
The functor is proper.
Proof.
Consider two ffg -coalgebras and , with behaviourally equivalent states and . We need to relate and with a suitable, ffg, zig-zag. We are going to use bisimilarity on the coproduct coalgebra222Left adjoints preserve colimits, so indeed the coproduct of free convex algebras is given by the formula , where the “” on the left hand side is the coproduct in . .
where denote the coproduct injections. It remains to show that is finitely generated as a subalgebra of the product , . This follows from results below, using an analytic-algebraic characterization of finitely generated congruences (kernels of convex algebra homomorphisms) of finitely generated convex algebras.
In more detail, note that we can identify any ffg algebra with the simplex in the vector space . This can be done by seeing each Dirac delta as a unit vector in . Every congruence relation of convex algebras is a subalgebra of , and so by extension can be identified with a (convex) subset of . In particular, our can be identified with a convex subset of . As turns out, is finitely generated as a subalgebra if and only if is topologically closed in . The following theorem is a direct consequence of Sokolova-Woracek [27, Proposition 5.9].
Theorem 7.8.
Let be a congruence on the ffg convex algebra . Then is finitely generated as a subalgebra if and only if it is topologically closed (closed under limits of Cauchy sequences).
Lemma 7.9.
Let be a -coalgebra. Then for any , the maps and are restrictions of -linear maps and respectively.
Proof.
Recall that we think of the Dirac distributions as the basis vectors of . We additionally have the unit vector in . For , write
and . Define the matrix by
indexed by . A quick calculation verifies that indeed, for , by linear extension. Of course, here we are thinking of as the column vector .
Similarly, define the row matrix of ’s. Then for ,
We therefore have . Thus, both and are restrictions of linear functions.
Corollary 7.10.
Let be a -coalgebra. Then for any , the maps and are continuous.
Proof.
Follows directly from Lemma 7.9 and that , , and are finite dimensional.
Theorem 7.11.
Let and be free finitely generated -coalgebras. Let be the largest bisimulation between and , and regard as a subset of . Then is a closed set and thus is finitely generated as a subalgebra.
Proof.
We show that the topological closure of is a bisimulation between and . Since is the largest bisimulation, .
We appeal to Lemma 7.5: Let . Then there is a Cauchy sequence such that as . This, in particular, means that and in the product topology. Now, for ,
| (Corollary 7.10) | ||||
| (Lemma 7.5) | ||||
| (Corollary 7.10) | ||||
This verifies the first condition. To verify the second, suppose that . Then there is an such that for all , . This allows for the following computation:
and similarly for . Above, the step tagged (*) is due to the fact that a product of continuous functions is continuous on the intersection of their domain, which in this case contains all of the as well as . Simply put, we use a known rule for computing limits of sequences of fractions: The limit of the pointwise-fractions of two sequences is the quotient of the two limits, given that the denominator sequence has non-zero limit. This tells us that
By Lemma 7.5, is a bisimulation, as desired.
At long last, we complete the proof of Theorem 7.7 with an appeal to Theorem 7.11.
Recap of the proof of completeness, Theorem 3.6
We have taken the approach outlined in Section 4 to showing that the axioms in Fig. 1 are complete with respect to the stream semantics of probabilistic process terms (Proposition 2.3). In Step 1, we observed that the semantics map coincides with determinized stream semantics (Theorem 5.13), and that in particular this meant that the final -coalgebra homomorphism satisfies for each (Theorem 6.3). Thus, it suffices to show that is injective. To this end, we observed in Section 4 that it suffices to construct a left inverse to in the diagram below.
| (7.2) |
The left inverse in (7.2) exists if is the final locally fg -coalgebra. In Step 2, we saw that satisfies a slightly weaker universal property, that every ffg -coalgebra admits a unique coalgebra homomorphism into it (Theorem 6.9). In Step 3, we verified the hypotheses of Theorem 4.4, in particular Theorem 7.7, which tells us that in fact, is the final locally fg coalgebra, as desired. This finishes the proof of completeness, Theorem 3.6.
8 Discussion and Related Work
We present the first sound and complete axiomatization of infinite trace semantics for generative probabilistic transition systems, settling a recent conjecture of Schmid, Noquez, and Moss [21]. Our completeness theorem on infinite traces is a new direction in a series of coalgebraic completeness theorems on finite trace semantics for probabilistic process calculi [25, 18], thus expanding the scope of this line of work. Our approach is categorical, and we build on recent results on proper functors over convex sets. In our proof, we use an analytic-algebraic result about convex congruences to show properness of . The particular functor which we prove to be proper has not been studied before, and the properness proof technique of [28] does not apply to it, but remarkably we could use a result concerning the geometry of convex congruences due to Sokolova and Woracek [27].
We provide a characterization of infinite traces as the final coalgebra semantics of a functor over convex algebras. Infinite traces have been studied in the context of semantics of (variants of GPTS) before: via a largest homomorphism in the (order enriched) Kleisli category of the Giry monad [32] due to Urabe and Hasuo, via a greatest fixpoint in a category of generalised relations [4] due to Cîrstea, as a final coalgebra on a free positive convex algebra (a convex algebra with a distinguished element, i.e., in the Kleisli category of the subdistribution monad) due to Kerstan and König [9], and as a subcoalgebra of the final Moore automaton on a positive convex algebra (in the Eilenberg-Moore category of the subdistribution monad) due to Goy and Rot [5, 6]. We offer a fourth characterization as a final coalgebra semantics for a new functor on convex algebras (i.e., in the Eilenberg-Moore category of the finite probability distribution monad) in Section 5. It is also the final coalgebra of a set functor.
In the future, we want to explore whether the argument we provided for properness generalizes to other endofunctors on and to endofunctors on the category of positive convex algebras used in [25, 18]. We would like to expand our completeness theorem to incorporate hypotheses, especially in the context [21] where actions are interpreted concretely as contractions on a space: If the space and the contractions are fixed, the actions might satisfy additional relations. More speculatively, it might be interesting to also go in the opposite direction: Given a set of hypotheses, can one construct a canonical space and a contraction interpretation of the actions that satisfies the hypotheses? We would also like to consider different syntax for specifying LMCs and stream measures, such as the so-called formal language of recursion [7], which connects nicely to iterative algebra. Orthogonally, we would like to explore axiomatizations of behavioural distances, in the style of quantitative equational theories [12]. Last but not least, we would like to explore unifying the results of Silva and Sokolova [25] with those of this paper.
References
- [1] J. Adámek and J. Rosicky. Locally Presentable and Accessible Categories. London Mathematical Society Lecture Note Series. Cambridge University Press, 1994.
- [2] M. Barr and Ch. Wells. Toposes, Triples and Theories. Springer, Berlin, 1985. Revised and corrected version available from URL: www.cwru.edu/artsci/math/wells/pub/ttt.html.
- [3] F. Bartels, A. Sokolova, and E.P. de Vink. A hierarchy of probabilistic system types. Theoretical Computer Science, 327:3–22, 2004. doi:10.1016/J.TCS.2004.07.019.
- [4] Corina Cîrstea. From branching to linear time, coalgebraically. Fundam. Informaticae, 150(3-4):379–406, 2017. doi:10.3233/FI-2017-1474.
- [5] Alexandre Goy. Trace semantics via determinization for probabilistic transition systems. CoRR, abs/1802.09084, 2018. arXiv:1802.09084.
- [6] Alexandre Goy and Jurriaan Rot. (In)finite trace equivalence of probabilistic transition systems. In Corina Cîrstea, editor, Coalgebraic Methods in Computer Science - 14th IFIP WG 1.3 International Workshop, CMCS 2018, volume 11202 of Lecture Notes in Computer Science, pages 100–121. Springer, 2018. doi:10.1007/978-3-030-00389-0_7.
- [7] Antonius J. C. Hurkens, Monica McArthur, Yiannis N. Moschovakis, Lawrence S. Moss, and Glen T. Whitney. The logic of recursive equations. J. Symb. Log., 63(2):451–478, 1998. doi:10.2307/2586843.
- [8] Bart Jacobs. A bialgebraic review of deterministic automata, regular expressions and languages. In Kokichi Futatsugi, Jean-Pierre Jouannaud, and José Meseguer, editors, Algebra, Meaning, and Computation, Essays Dedicated to Joseph A. Goguen on the Occasion of His 65th Birthday, volume 4060 of Lecture Notes in Computer Science, pages 375–404. Springer, 2006. doi:10.1007/11780274_20.
- [9] Henning Kerstan and Barbara König. Coalgebraic Trace Semantics for Continuous Probabilistic Transition Systems. Logical Methods in Computer Science, Volume 9, Issue 4, December 2013. doi:10.2168/LMCS-9(4:16)2013.
- [10] S. C. Kleene. Representation of events in nerve nets and finite automata. In Claude Shannon and John McCarthy, editors, Automata Studies, pages 3–41. Princeton University Press, Princeton, NJ, 1956.
- [11] Kim Guldstrand Larsen and Arne Skou. Bisimulation through probabilistic testing. Inf. Comput., 94(1):1–28, 1991. doi:10.1016/0890-5401(91)90030-6.
- [12] Radu Mardare, Prakash Panangaden, and Gordon Plotkin. Quantitative algebraic reasoning. In 2016 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–10, 2016.
- [13] Stefan Milius. A sound and complete calculus for finite stream circuits. In Proceedings of the 25th Annual IEEE Symposium on Logic in Computer Science, LICS 2010, pages 421–430. IEEE Computer Society, 2010. doi:10.1109/LICS.2010.11.
- [14] Stefan Milius. Proper functors and fixed points for finite behaviour. Log. Methods Comput. Sci., 14(3), 2018. doi:10.23638/LMCS-14(3:22)2018.
- [15] Robin Milner. A complete inference system for a class of regular behaviours. J. Comput. Syst. Sci., 28(3):439–466, 1984. doi:10.1016/0022-0000(84)90023-0.
- [16] Michael O. Rabin. Probabilistic automata. Inf. Control., 6(3):230–245, 1963. doi:10.1016/S0019-9958(63)90290-0.
- [17] Alexander Moshe Rabinovich. A complete axiomatisation for trace congruence of finite state behaviors. In Stephen D. Brookes, Michael G. Main, Austin Melton, Michael W. Mislove, and David A. Schmidt, editors, Mathematical Foundations of Programming Semantics, 9th International Conference, New Orleans, LA, USA, April 7-10, 1993, Proceedings, volume 802 of Lecture Notes in Computer Science, pages 530–543. Springer, 1993. doi:10.1007/3-540-58027-1_25.
- [18] Wojciech Rozowski and Alexandra Silva. A completeness theorem for probabilistic regular expressions. In Pawel Sobocinski, Ugo Dal Lago, and Javier Esparza, editors, Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2024, Tallinn, Estonia, July 8-11, 2024, pages 66:1–66:14. ACM, 2024. doi:10.1145/3661814.3662084.
- [19] Walter Rudin. Real and Complex Analysis. McGraw-Hill, 1966.
- [20] Jan J. M. M. Rutten. Universal coalgebra: a theory of systems. Theor. Comput. Sci., 249(1):3–80, 2000. doi:10.1016/S0304-3975(00)00056-6.
- [21] Todd Schmid, Victoria Noquez, and Lawrence S. Moss. Fractals from regular behaviours. In Paolo Baldan and Valeria de Paiva, editors, 10th Conference on Algebra and Coalgebra in Computer Science, CALCO 2023, June 19-21, 2023, Indiana University Bloomington, IN, USA, volume 270 of LIPIcs, pages 14:1–14:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. Also available at https://arxiv.org/pdf/2306.03894. doi:10.4230/LIPICS.CALCO.2023.14.
- [22] Todd Schmid, Jurriaan Rot, and Alexandra Silva. On star expressions and coalgebraic completeness theorems. In Ana Sokolova, editor, Proceedings 37th Conference on Mathematical Foundations of Programming Semantics, MFPS 2021, Hybrid: Salzburg, Austria and Online, 30th August - 2nd September, 2021, volume 351 of EPTCS, pages 242–259, 2021. doi:10.4204/EPTCS.351.15.
- [23] Alexandra Silva, Filippo Bonchi, Marcello M. Bonsangue, and Jan J. M. M. Rutten. Generalizing determinization from automata to coalgebras. Log. Methods Comput. Sci., 9(1), 2013. doi:10.2168/LMCS-9(1:9)2013.
- [24] Alexandra Silva, Marcello M. Bonsangue, and Jan J. M. M. Rutten. Non-deterministic kleene coalgebras. Log. Methods Comput. Sci., 6(3), 2010. URL: http://arxiv.org/abs/1007.3769.
- [25] Alexandra Silva and Ana Sokolova. Sound and complete axiomatization of trace semantics for probabilistic systems. In Michael W. Mislove and Joël Ouaknine, editors, Twenty-seventh Conference on the Mathematical Foundations of Programming Semantics, MFPS 2011, Pittsburgh, PA, USA, May 25-28, 2011, volume 276 of Electronic Notes in Theoretical Computer Science, pages 291–311. Elsevier, 2011. doi:10.1016/j.entcs.2011.09.027.
- [26] A. Sokolova and E.P. de Vink. Probabilistic automata: system types, parallel composition and comparison. In C. Baier, B.R. Haverkort, H. Hermanns, J.-P. Katoen, and M. Siegle, editors, Validation of Stochastic Systems: A Guide to Current Research, pages 1–43. LNCS 2925, 2004. doi:10.1007/978-3-540-24611-4_1.
- [27] Ana Sokolova and Harald Woracek. Congruences of convex algebras. Journal of Pure and Applied Algebra, 219(8):3110–3148, 2015. doi:10.1016/j.jpaa.2014.10.005.
- [28] Ana Sokolova and Harald Woracek. Proper semirings and proper convex functors. In FoSSaCS 2018, pages 331–347. LNCS 10803, 2018.
- [29] Eugene W. Stark and Scott A. Smolka. A complete axiom system for finite-state probabilistic processes. In Gordon D. Plotkin, Colin Stirling, and Mads Tofte, editors, Proof, Language, and Interaction, Essays in Honour of Robin Milner, pages 571–596. The MIT Press, 2000.
- [30] Sam Staton. Relating coalgebraic notions of bisimulation. In CALCO 2009, volume 5728, pages 191–205. LNCS 5728, 2009. doi:10.1007/978-3-642-03741-2_14.
- [31] T. Świrszcz. Monadic functors and convexity. Bull. Acad. Polon. Sci. Sér. Sci. Math. Astronom. Phys., 22:39–42, 1974.
- [32] Natsuki Urabe and Ichiro Hasuo. Coalgebraic infinite traces and Kleisli simulations. Log. Methods Comput. Sci., 14(3), 2018. doi:10.23638/LMCS-14(3:15)2018.
