Abstract 1 Introduction 2 Labelled Markov Chains and Stream Semantics 3 Axiomatizing Stream Semantics 4 Blueprint for Proving Completeness 5 Step 1: Convex (Co)Algebras and the Functor 𝑮 6 Step 2: 𝗣𝗧𝗲𝗿𝗺/ as a 𝑮-coalgebra 7 Step 3: Properness of 𝑮 8 Discussion and Related Work References

A Complete Inference System for Probabilistic Infinite Trace Equivalence

Corina Cîrstea ORCID University of Southampton, UK Lawrence S. Moss ORCID Indiana University, Bloomington, IN, USA Victoria Noquez ORCID Saint Mary’s College of California, Moraga, CA, USA Todd Schmid ORCID Bucknell University, Lewisburg, PA, USA Alexandra Silva ORCID Cornell University, Ithaca, NY, USA Ana Sokolova ORCID Paris Lodron University of Salzburg, Austria
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 sets
Funding:
Corina Cîrstea: partly supported by the Leverhulme Trust Research Project Grant RPG-2020-232.
Lawrence S. Moss: Lawrence S. Moss was supported by grant #586136 from the Simons Foundation.
Alexandra Silva: ERC grant Autoprobe (no. 101002697). This work was done in part while the author was visiting the Simons Institute for the Theory of Computing.
Copyright and License:
[Uncaptioned image] © Corina Cîrstea, Lawrence S. Moss, Victoria Noquez, Todd Schmid, Alexandra Silva, and
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 theory
Acknowledgements:
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 Schmitz

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 G 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 3, we recall the syntax of Stark and Smolka’s process algebra [29] and Silva and Sokolova’s axioms for finite trace equivalence [23], which will form the basis of our inference system and allow us to state our intended soundness and completeness results.

  • In Section 4, we explain our high-level strategy for proving completeness, which follows the coalgebraic completeness method described in [22] that originates in [8, 24, 13].

  • In Section 5, we define the endofunctor G, which forms the basis of all of our developments. The functor G 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 G-coalgebra semantics, via a determinization construction that turns LMCs into G-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 G-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 G-coalgebras by providing unique solutions to finite systems of equations arising from a coalgebra structure.

  • In Section 7, we conclude our proof of completeness by establishing that G satisfies a property called properness, introduced by Milius in [14]. The proof that G is proper uses a topological characterization of congruences of finitely generated convex algebras due to Sokolova and Woraceck [27].

  • 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 X, define 𝒟(X) to be the set of finitely supported probability distributions on X. That is, θ𝒟(X) if and only if θ:X[0,1], θ(x)>0 for finitely many xX, and θ(X)=xXθ(x)=1. Since the support is finite, each θ𝒟(X) can be written in the form i=1nrixi such that ri(0,1] and xiX for each in. We write 1x for the Dirac delta at xX.

For a fixed finite set A of formal symbols called actions, a labelled Markov chain (or LMC) is a pair (X,β) consisting of a set X of states and a transition function β:X𝒟(A×X). 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 xarβy between nodes x and y whenever β(x)(a,y)=r with r>0. We typically drop the β notation whenever the transition function is clear from context.

Example 2.1.

The LMC (X,β:X𝒟(A×X)) with A={a,b}, X={x,y}, and β(x)(a,y)=β(x)(b,x)=β(y)(b,x)=β(y)(a,y)=0.5 is depicted in (2.1).

(2.1)
Stream semantics.

A word over a finite alphabet A is a finite sequence a1an (written as a juxtaposition) of elements of A. We write ε for the empty word. A stream is an infinite sequence (a1,a2,) of elements from A. We write A for the set of words and Aω for the set of streams. The set Aω carries a topology, with basis given by the cylinder sets,

Bw={(a1,,an,)a1an=w}

where wA is a word. In the notation above, Bε=Aω, 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 1 [19].

Definition 2.2.

A stream distribution is a Borel probability distribution on the space Aω. The set of all stream distributions on Aω is written Prob(Aω).

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 (X,β) be an LMC. There is a unique map β:XProb(Aω) such that for any xX and any wA and aA,

xβ(Baw)=yXβ(x)(a,y)yβ(Bw)

The map β above is the stream semantics of (X,β). Given states x,yX, we say x and y are stream equivalent if xβ=yβ.

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 F:𝖢𝖢, an F-coalgebra is a pair (X,c) consisting of an object X of 𝖢 and an arrow c:XF(X). A coalgebra homomorphism h:(X,cX)(Y,cY) is an arrow h:XY such that cYh=F(h)cX. We write Coalg𝖢(F) for the category of F-coalgebras and their homomorphisms.

The set-mapping X𝒟(X) is a functor, with action on functions given by

𝒟(f)(θ)=i=1nrif(xi)

where f:XY and θ=i=1nrixi. The set-mapping XA×X is also a functor, with the action on functions being fidA×f. By composition, 𝒟(A×) is an endofunctor on 𝖲𝖾𝗍. The point is that LMCs are precisely 𝒟(A×)-coalgebras. Unravelling the definitions, a coalgebra homomorphism between LMCs h:(X,β)(Y,ϑ) is a function h:XY such that for any xX, if β(x)=i=1nri(ai,xi), then

ϑ(h(x))=i=1nri(ai,h(xi))

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 U:𝖢𝖲𝖾𝗍. An object X in a concrete category 𝖢 is essentially a set U(X) with additional structure, and arrows XY are functions that preserve that structure. We write xX for xU(X). The category 𝖲𝖾𝗍 is of course concrete, as witnessed by the identity functor.

Definition 2.5.

Let (X,cX) and (Y,cY) be F-coalgebras where F:𝖢𝖢 and 𝖢 is concrete, xX and yY. We say x and y are behaviourally equivalent and write xy if there is a cospan (X,cX)h(Z,cZ)k(Y,cY) in Coalg𝖢(F) such that h(x)=k(y).

For LMCs, behavioural equivalence (which coincides with probabilistic bisimilarity) implies stream equivalence [21, Theorem 6.7].

Proposition 2.6.

Let (X,β) and (Y,ϑ) be LMCs, xX, yY. If xy, then xβ=yϑ.

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 (Prob(Aω),c) such that β:(X,β)(Prob(Aω),c) 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 V of variables. Consider the set of terms generated by the grammar below,

e,f::=vaeerfμve

where vV, aA, and r[0,1]. A variable v is bound in a term e if it appears within the scope of μv(), and guarded if it appears within the scope of some a(). The set 𝖯𝖳𝖾𝗋𝗆 of productive process terms is the set of terms e such that every variable v appearing in e is both guarded and bound. Given variables v1,,vn, we write 𝖯𝖳𝖾𝗋𝗆(v1,,vn) for the set of guarded terms whose free variables are contained in {v1,,vn}.

Intuitively, the operation a() is prefixing by a, and ae denotes the process that makes an a-labelled transition with probability 1 into e. The operations r are called convex sums, and erf denotes the process whose outgoing transitions are the same as e and f, but with probabilities scaled by r[0,1] and 1r respectively. The operation μv() is recursion in v, and μvg behaves exactly as g[μvg/v] does, where g[μvg/v] denotes the productive process term obtained by substituting every free occurrence of v in g with μvg. 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 e,f𝖯𝖳𝖾𝗋𝗆, aA, vV, g𝖯𝖳𝖾𝗋𝗆(v), and r[0,1], define

τ(ae)=1(a,e)τ(erf)=rτ(e)+(1r)τ(f)τ(μvg)=τ(g[μvg/v])

Then (𝖯𝖳𝖾𝗋𝗆,τ) is the syntactic LMC.

Each probabilistic process term e shares its stream semantics with a state in a finite LMC. In particular, let e be the set of probabilistic process terms f such that ea1r1anrnf. Then e is finite and τ restricts to a transition structure τe:e𝒟(A×e) [21]. We also have eτ=eτe, since eτ only depends on states reachable from e.

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 (X,β) be a finite LMC and let xX. There exists an e𝖯𝖳𝖾𝗋𝗆 such that e and x 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 (X,β) be a finite LMC and let xX. There exists an e𝖯𝖳𝖾𝗋𝗆 such that eτ=xβ.

From now on, we drop τ and simply write e instead of eτ, for e𝖯𝖳𝖾𝗋𝗆.

Example 3.4.

The state x in the LMC (2.1) has the same stream semantics as the term μv(bv0.5a(μu(au0.5bv)))). However, it appears that there is a redundancy in the LMC (2.1). Both x and y emit a and b with the same probability, and each transitions to the other with the same probability. Thus, the stream semantics of both states x and y is the unique Borel probability distribution ρ satisfying ρ(Ba1an)=0.5n for any a1an{a,b}, making x and y stream equivalent to the state z below. This one-state LMC corresponds to the process term μv(av0.5bv).

It follows that μv(bv0.5a(μu(au0.5bv))))=μv(av0.5bv).

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 e,f𝖯𝖳𝖾𝗋𝗆 are said to be provably equivalent, written ef, if e=f can be proven from axioms in Fig. 1. We write [e] for the -equivalence class of e.

e=eree1re2=e21re1(e1re2)se3=e1rs(e2s(1r)1rse3)a(e1re2)=ae1rae2μvg=μug[u/v]μvg=g[μvg/v]f=g[f/v]f=μvge1=e2ae1=ae2e1=f1e2=f2e1re2=f1rf2e1=f1en=fnk[e/v]=k[f/v]
Figure 1: Axioms for probabilistic term equivalence. Above, e,ei,f,fi𝖯𝖳𝖾𝗋𝗆, e=(e1,,en), f=(f1,,fn), g𝖯𝖳𝖾𝗋𝗆(v), and k𝖯𝖳𝖾𝗋𝗆(v1,,vn). We assume that u is not bound in g in the first axiom of the second column. The term k[e/v] is obtained by simultaneously replacing vi with ei for each in. Note that the equivalence relation axioms are implicit. The difference with the axiomatization for bisimilarity is the distributivity axiom (lower-left).

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:

efe=f():Completeness():Soundness

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 e,f𝖯𝖳𝖾𝗋𝗆. If e=f, then ef.

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 :𝖯𝖳𝖾𝗋𝗆/Prob(Aω). Once we have such factorization, we can reason as follows:

e=f([e])=([f])[e]=[f]ef

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 X and a family of binary operations p:X×XX (written infix) satisfying

x1y=xxrx=xxry=y1rx(xry)sz=xrs(ys(1r)1rsz)

An affine map, or convex algebra homomorphism, between convex algebras (X,pX) and (Y,pY) is a function h:XY that satisfies h(xpXy)=h(x)pYh(y) for each p[0,1]. The category of convex algebras and affine maps is denoted 𝖢𝖠.

A convex algebra (X,pX) is free and generated by a set BX if every map f:BY from B to the carrier of a convex algebra (Y,pY) extends to a unique affine map f#:(X,pX)(Y,pY). The set B is then the set of generators of the free algebra (X,pX). If B is a finite set, then the free algebra generated by B 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 X instead of (X,p) 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 G on 𝖢𝖠 and show that the convex algebra of Borel probability distributions Prob(Aω) carries a final G-coalgebra structure (Prob(Aω),ζ). By turning any LMC (X,β) into a G-coalgebra (𝒟(X),β) via a determinization construction (see Definition 5.11), we obtain the determinized stream semantics (X,β), β=βη:X𝒟(X)Prob(Aω) via the final coalgebra homomorphism β:(𝒟(X),β)(Prob(Aω),ζ). 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 G-coalgebra structure (𝖯𝖳𝖾𝗋𝗆/,) on the equivalence classes of terms modulo provable equivalence and show that every ffg G-coalgebra (X,β) (i.e., X 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 G-coalgebra (X,γ) is locally fg if for any xX, there is a subcoalgebra (U,γU) of (X,γ) such that xU and U is fg. A locally fg G-coalgebra (X,γ) is final if every locally fg G-coalgebra admits a unique coalgebra homomorphism into (X,γ).

The significance of (𝖯𝖳𝖾𝗋𝗆/,) being locally fg is related to the lemma below.

Lemma 4.3.

Every homomorphic image of a locally fg G-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 q has a left inverse, a coalgebra homomorphism k:(J,ρ)(𝖯𝖳𝖾𝗋𝗆/,) such that kq=id, as then

([e])=([f])ιq([e])=ιq([f])q([e])=q([f])kq([e])=kq([f])[e]=[f].

One way to do this is to show that (𝖯𝖳𝖾𝗋𝗆/,) is the final locally fg G-coalgebra. In such a case, by Lemma 4.3, (J,ρ) is also locally fg, and therefore admits the desired (necessarily unique) coalgebra homomorphism k. Indeed, by finality, since kq and id are both homomorphisms from (𝖯𝖳𝖾𝗋𝗆/,) to itself, they must be the same, i.e., kq=id.

Step 3

Lastly, we will establish sufficient conditions guaranteeing that (𝖯𝖳𝖾𝗋𝗆/,) is the final locally fg G-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 F is a finitary proper endofunctor on 𝖢𝖠 that preserves surjective affine maps. Then an F-coalgebra (Y,ω) is a final locally fg coalgebra if and only if (i) (Y,ω) is locally fg and (ii) for every ffg F-coalgebra (𝒟(X),β), there is a unique coalgebra homomorphism (𝒟(X),β)(Y,ω).

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 G-coalgebra admits a unique coalgebra homomorphism into (𝖯𝖳𝖾𝗋𝗆/,). Thus, completing Step 3 hinges on showing that the functor G is finitary, that it preserves surjective affine maps, and that G 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. 1.

    We must define G:𝖢𝖠𝖢𝖠, endow Prob(Aω) with a G-coalgebra structure ζ, turning Prob(Aω,ζ) into a final G-coalgebra.

  2. 2.

    Given an LMC (X,β), we must explain how it is determinized to yield a G-coalgebra (𝒟(X),β), 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. 3.

    We must define a coalgebra structure :𝖯𝖳𝖾𝗋𝗆/G(𝖯𝖳𝖾𝗋𝗆/) and show that (𝖯𝖳𝖾𝗋𝗆/,) is locally fg and that free fg G-coalgebras admit unique coalgebra homomorphisms into (𝖯𝖳𝖾𝗋𝗆/,).

  4. 4.

    We must show that G 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 X and a collection of convex sum operations r:X×XX indexed by r[0,1] 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 n, i.e., subsets Cn such that p,qC implies that prq=rp+(1r)qC for all r[0,1]. Moreover, for any subset Un, there is a smallest convex algebra containing U, namely the convex hull conv(U)={rp+(1r)qp,qU and r[0,1]}.

We may use the following syntax as a generalized convex sum in an arbitrary convex algebra: given r1,,rn(0,1) and x1,,xn, define

i=1nrixi=xnrn(i=1n1ri1rnxi) (5.1)

It is important to note that, technically, the base case is n=2. We can also use this notation if ri=0 for ij and rj=1, but in that case we define i=1nrixi=xj. 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 xSrxx, where S is a set and r():S[0,1] is a function such that xSrx=1 and only finitely many of the rx are non-zero.

Free convex algebras.

(𝒟(X),p) is the free convex algebra generated by the set X. Hence, for any convex algebra (Y,pY), and any function f:XY, there is a unique linear extension f#:(𝒟(X),p)(Y,pY) of f such that f#(1x)=f(x). The universal property of free convex algebras gives rise to the adjunction 𝒰, where (X)=(𝒟(X),p) is the free functor that maps a set to the free convex algebra generated by it and a function f:XY to 𝒟(f):𝒟(X)𝒟(Y), 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 ηX(x)=1x and μX=(id𝒟(X))#, and furthermore, 𝖢𝖠 is isomorphic to the category of Eilenberg-Moore algebras for 𝒟 [31]. In particular, the free convex algebra generated by a set X is the Eilenberg-Moore algebra (𝒟(X),μX). 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 𝒟(X) for the free algebra (X).

Adding a fresh element to a convex algebra.

In order to define the endofunctor G, we need the following construction on convex algebras. Given a convex algebra X, define X={}{rxr(0,1],xX}. The set X obtains a convex algebra structure with respect to the convex sum operation defined

q=rxq=(qr)xqsy=((1q)s)y
rxqsy=(qr+(1q)s)(xqrqr+(1q)sy)
Lemma 5.2.

Let X be a convex algebra. As defined above, (X,) is a convex algebra. Moreover, given rx and sy in X, rx=sy if and only if r=s and x=y.

 Remark 5.3.

We introduce some notation going forwards. We often use the notation 0x for , even implicitly, despite that 0x=0y for all x,yX.

The construction ():𝖢𝖠𝖢𝖠 is a functor whose action on convex algebra homomorphisms is given by h(rx)=rh(x) for any convex algebra homomorphism h:(X,p)(Y,p) and any xX. The homomorphism h additionally satisfies h()=. Freely adjoining is analogous to going from probability distributions to sub-probability distributions (maps θ:X[0,1] such that xXθ(x)1). The following lemma makes this precise.

Lemma 5.4.

Let 𝒟 be the finitely supported sub-probability distribution functor, and let Prob(Aω) be the set of Borel sub-probability measures on Aω. Then as convex algebras, 𝒟(X)𝒟(X) and Prob(Aω)Prob(Aω).

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 G, is one of the main contributions of this paper.

Given a convex algebra X and a convex algebra homomorphism h:XY, let

G(X)={f:AXaAraf=1}G(h)(f)(a)=rafh(xaf) (5.2)

where f(a)=rafxaf for each fG(X) and aA. Equivalently, G(h)(f)=hf. Note that in the definition of G(X) above, the sum is the usual sum of real numbers, and that we define raf=0 and leave xaf undefined when f(a)=.

Proposition 5.5.

As it is defined in (5.2), G is an endofunctor on 𝖢𝖠.

We use the following terminology to refer to the defining property of G: If f:AX has the property that araf=1, as mentioned in (5.2), we say that f satisfies the mass-splitting property, or that f 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 f:A𝒟(X) is mass splitting, i.e., fG(𝒟(X)), if and only if the total mass aAxXf(a)(x) is equal to 1. Given such a function, one can reverse-engineer a unique probability distribution θ𝒟(A×X) such that f computes the marginal f(a)=θ({a}×X) for each aA. Thus, a G-coalgebra of the form (𝒟(X),γ) represents the same data as an LMC (X,β) by reverse-engineering β(x) from γ(1x) for each xX. We think of G-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, X1+(0,1]×X, and so the description of G(X) above can also be taken as a definition of a functor H:𝖲𝖾𝗍𝖲𝖾𝗍. Indeed, G is a lifting of H to 𝖢𝖠. However, the convex algebra structure on X is not the convex algebra structure on 1+(0,1]×X obtained from (co)products in 𝖢𝖠. The convex algebra structure is instead hand-tailored to match the structure of sub-probability distributions.

In a given G-coalgebra (X,γ), we write massγ(a,x) for raγ(x), and whenever raγ(x)>0, we write nextγ(a,x) for xaγ(x). Then whenever γ(x)(a)=, massγ(a,x)=0 while nextγ(a,x) is undefined; and when massγ(a,x)>0,

γ(x)(a)=massγ(a,x)nextγ(a,x). (5.3)

where the symbol here is from X. Note that we often drop γ and write simply mass and next. In this notation, the mass-splitting property says that for all xX, we have aAmass(a,x)=1.

Given G-coalgebras (X,γ) and (Y,ω), unravelling the definitions of mass and next reveals that a function h:XY is a coalgebra homomorphism if and only if

mass(a,x)h(next(a,x))=mass(a,h(x))next(a,h(x)) (5.4)

for any aA and xX. In other words, for all xX and aA, mass(a,x)=mass(a,h(x)), and if this is greater than 0, then h(next(a,x))=next(a,h(x)) as well.

A final 𝑮-coalgebra.

We are now in the position to show that Prob(Aω) is the carrier of a final G-coalgebra. First, observe that, like 𝒟(X), Prob(Aω) is a convex algebra with the canonical convex sums, ρrθ=rρ+(1r)θ. In the proof of  Theorem 5.13, we use the 𝒟-algebra in the more general, Eilenberg-Moore, form (Prob(Aω),Σ), where

Σ(i=1nriρi)(B)=i=1nriρi(B) (5.5)
Definition 5.7.

The G-coalgebra structure (Prob(Aω),ζ) is given by, for ρProb(Aω),

ζ(ρ)(a)={if ρ(Ba)=0ρ(Ba)(Bρ(aB)/ρ(Ba))if ρ(Ba)>0 (5.6)

where for Borel B, aB={(a,a1,)(a1,)B} 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 ρProb(Aω).

 Remark 5.8.

It is important to note that nextζ(a,):Prob(Aω)Prob(Aω) is not (in general) a convex algebra homomorphism.

Theorem 5.9.

The G-coalgebra (Prob(Aω),ζ) is final. That is, for any G-coalgebra (X,γ), there is a unique coalgebra homomorphism γ:(X,γ)(Prob(Aω),ζ).

Here is a hint of a hint. We define γ(x)(Bw)[0,1] by recursion on the length of w:

γ(x)(Bε) =1 (5.7)
γ(x)(Baw) ={0if γ(x)(a)=mass(a,x)γ(next(a,x))(Bw)if γ(x)(a)

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 G-coalgebra morphism, and finally that it is the unique such map.

 Remark 5.10.

It is also true that (forgetting the convex algebra structure) Prob(Aω) is the final coalgebra of the functor H:𝖲𝖾𝗍𝖲𝖾𝗍 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 G-coalgebras as deterministic counterparts to LMCs. We now make the relationship between LMCs and G-coalgebras precise. Using the universal property of free convex algebras and the correspondence between finitely supported probability distributions θ𝒟(A×) and functions f:A𝒟() satisfying the mass-splitting property, we can construct a determinization functor Δ:Coalg𝖲𝖾𝗍(𝒟(A×))Coalg𝖢𝖠(G) as follows.

First, we define the natural transformation λY:𝒟(A×Y)G(𝒟(Y)) by

λY(θ)(a)={if sa=0sa(1saθ(a,))otherwise (5.8)

for each set Y, θ𝒟(A×Y), and aA, with sa=yYθ(a,y). After making the identification 𝒟(X)=𝒟(X), this amounts to λY(θ)(a)(x)=θ(a,x). A routine check verifies that λY is natural in Y and that for any θ𝒟(A×Y), λY(θ) satisfies the mass-splitting property.

Having constructed λ, we can now define the determinization Δ(Y,β) of the LMC (Y,β) to be the linear extension of the composition of λY after β.

Definition 5.11.

The determinization functor Δ:Coalg𝖲𝖾𝗍(𝒟(A×))Coalg𝖢𝖠(G) is the functor given by Δ(Y,β)=((𝒟(Y),μY),β) with β=(λYβ)# for any LMC (Y,β), and Δ(h)=𝒟(h) for any coalgebra homomorphism h between LMCs.

Moreover, we can show that λ is a natural isomorphism, by providing an inverse transformation χY:G(𝒟(Y))𝒟(A×Y). For hG(𝒟(Y)) with h(a)=raha, define

χY(h)(a,y)={0h(a)=raha(y)otherwise (5.9)
Proposition 5.12.

The natural transformations λ and χ are inverse to each other. Moreover, given a G-coalgebra ((𝒟(Y),μY),γ), let β:Y𝒟(A×Y) be given by β=χYγηY. Then ((𝒟(Y),μY),γ)=Δ(Y,β). As a result, a G-coalgebra is ffg iff it is a determinized finite LMC.

By Theorem 5.9, (Prob(Aω),ζ) is a final G-coalgebra, so from any LMC (Y,β), we may determinize to get a G-coalgebra Δ(Y,β) and then use finality to obtain a unique coalgebra homomorphism β:Δ(Y,β)((Prob(Aω),Σ),ζ). This yields a determinized stream semantics map β:YProb(Aω) by composition, i.e., yβ=β(1y). Fulfilling its intended purpose, determinized stream semantics does indeed coincide with stream semantics as we previously defined it.

Theorem 5.13.

For every LMC (X,β), β=β.

Proof.

Let α:𝒟(A×Prob(Aω))Prob(Aω) be given by α(θ)(Bε)=1, and for all aA, wA,

α(θ)(Baw)=ρProb(Aω)θ(a,ρ)ρ(Bw) (5.10)

For a fixed θ𝒟(A×Prob(Aω)), let us use the notation sa for ρProb(Aω)θ(a,ρ). Note that taking w in (5.10) to be the empty word ε gives sa=α(θ)(Ba).

Fix (X,β). Let us first check that a map f:XProb(Aω) satisfies the equation mentioned in Proposition 2.3 if and only if f=α𝒟(A×f)β. That is, f(x)(Baw)=yX(β(x)(a,y))(f(y)(Bw)) for all aA and wA if and only if f=α𝒟(A×f)β. This follows from:

(α𝒟(A×f)β)(x)(Baw) =ρProb(Aω)(𝒟(A×f)(β(x))(a,ρ))ρ(Bw)
=ρProb(Aω)(y:f(y)=ρβ(x)(a,y))ρ(Bw)
=yX(β(x)(a,y))(f(y)(Bw))

where the first equality is by the definition of α, the second equality is the definition of 𝒟(A×f), and the third only rearranges the sum.

In the notation of Proposition 2.3, the map =β is the unique map so that =α𝒟(A×)β. 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 ζα=G(Σ)λ, giving commutativity of the part on the right. For θ𝒟(A×Prob(Aω)), aA, and wA, we have, on the one hand:

α(θ)(Baw) =ρProb(Aω)θ(a,ρ)ρ(Bw)
ζ(α(θ))(a) ={if sa=0sa(BwρProb(Aω)θ(a,ρ)saρ(Bw))if sa0 (5.13)

We have used definitions of α from (5.10) and ζ from (5.6), that aBw=Baw and that α(θ)(Ba)=sa. On the other hand, we use the definitions of λ from (5.8) and Σ from (5.5):

λProb(Aω)(θ)(a) ={if sa=0sa(ρθ(a,ρ)sa)if sa0
G(Σ)(λProb(Aω)(θ))(a) ={if sa=0sa(BwρProb(Aω)θ(a,ρ)saρ(Bw))if sa0 (5.14)

Equations (5) and (5) now give ζα=G(Σ)λ.

We turn to the commutativity of the remaining square. First, affineness of the map β:𝒟XProb(Aω) yields βμX=Σ𝒟(β). We precompose with 𝒟(ηX), and use the monad law μX𝒟(ηX)=id𝒟X along with the definition of . Thus β=Σ𝒟(). Now apply G 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 [e]r[f]=[erf]. 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 G-coalgebra structure (𝖯𝖳𝖾𝗋𝗆/,). We then focus on two goals: The first goal is to show that the stream semantics of a productive process term e is equal to the stream distribution ([e]) obtained from the finality of (Prob(Aω),ζ). The second goal of this section is to show that (𝖯𝖳𝖾𝗋𝗆/,) is locally fg and that every ffg G-coalgebra admits a unique coalgebra homomorphism into (𝖯𝖳𝖾𝗋𝗆/,).

Defining .

Let τ(e)=i=1nri(ai,ei) and write sa=ai=ari. We define the map :𝖯𝖳𝖾𝗋𝗆/G(𝖯𝖳𝖾𝗋𝗆/) using the formulas

mass(a,[e])=ai=arinext(a,[e])=[i=1n(ri/sa)ei] (6.1)

for any -equivalence class [e]𝖯𝖳𝖾𝗋𝗆/ and aA. It can be shown by induction on derivations that (6.1) describes a well-defined map, i.e., ef implies the right-hand sides of the equations in (6.1) agree.

The following characterization of (𝖯𝖳𝖾𝗋𝗆/,) illustrates that this is a natural choice of G-coalgebra structure on 𝖯𝖳𝖾𝗋𝗆/.

Lemma 6.1.

Given e1,e2𝖯𝖳𝖾𝗋𝗆, let

τ(e1)=i=1nri(ai,fi)τ(e2)=i=1nsi(ai,fi)

If e1e2, then for any aA,

ra=sa and i=1n(ri/ra)fii=1n(si/sa)fi (6.2)

where ra=ai=ari and sa=ai=asi.

The proof of Lemma 6.1 is a rather long induction on the proof of ef. As an immediate consequence of this lemma, we obtain the following.

Lemma 6.2.

Let (𝒟(𝖯𝖳𝖾𝗋𝗆),τ)=Δ(𝖯𝖳𝖾𝗋𝗆,τ) and hΣ=([])# 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 e𝖯𝖳𝖾𝗋𝗆, e=([e]).

Proof.

By Theorem 5.9 and Theorem 5.13, e=τ(1e)=hΣ(1e)=([e]).

Theorem 6.4.

The G-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 e𝖯𝖳𝖾𝗋𝗆, there is a finite subcoalgebra (U,τU) of (𝖯𝖳𝖾𝗋𝗆,τ) containing e. So, let [e]𝖯𝖳𝖾𝗋𝗆/ and find a finite subcoalgebra (U,τU) of (𝖯𝖳𝖾𝗋𝗆,τ) containing e. Then Δ(U,τU) is a free fg subcoalgebra of Δ(𝖯𝖳𝖾𝗋𝗆,τ)=(𝒟(𝖯𝖳𝖾𝗋𝗆),τ) containing 1e. Taking the image of Δ(U,τU) under hΣ, we obtain a finite subcoalgebra (V,V)=hΣ(Δ(U,τU)) of (𝖯𝖳𝖾𝗋𝗆/,) containing [e]=hΣ(1e), as a quotient of a free fg G-coalgebra. Thus, [e] is contained in a fg subcoalgebra.

Systems of equations from 𝑮-coalgebras and their unique solutions

The next goal is to show that every ffg G-coalgebra admits a unique coalgebra homomorphism into (𝖯𝖳𝖾𝗋𝗆/,). As we remarked after Definition 5.11, every ffg G-coalgebra is of the form Δ(X,β) for some finite LMC (X,β). So, it suffices to show that every determinized finite LMC admits a unique coalgebra homomorphism into 𝖯𝖳𝖾𝗋𝗆/. As we will see, each coalgebra homomorphism Δ(X,β)(𝖯𝖳𝖾𝗋𝗆/,) corresponds to a solution to a particular system of equations.

Definition 6.5.

The guarded system of equations corresponding to the finite LMC (X,β) is the set of formal equations

𝒮(X,β)={x=(a,y)A×Xβ(x)(a,y)ay|xX} (6.4)

A solution to the guarded system of equations (6.4) is a map

φ:X𝖯𝖳𝖾𝗋𝗆such that(xX)φ(x)(a,y)A×Xβ(x)(a,y)aφ(y)

Two solutions φ,ψ are equivalent, written φψ, if φ(x)ψ(x) for all xX.

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 a(erf)=aeraf.

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 (X,β) be a finite LMC. Then 𝒮(X,β) 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

x=aAmass(a,x)anext(a,x)

where mass and next are derived from β. This tells us that a map φ:X𝖯𝖳𝖾𝗋𝗆 is a solution to 𝒮(X,β) if and only if for all xX,

φ(x)aAmass(a,x)aφ(next(a,x))

Solving systems of equations of this form is equivalent to finding G-coalgebra homomorphisms into (𝖯𝖳𝖾𝗋𝗆/,).

Lemma 6.8.

Let (X,β) be a finite LMC, and let φ:X𝖯𝖳𝖾𝗋𝗆. Define sβ:𝒟(X)𝖯𝖳𝖾𝗋𝗆/ to be the linear extension of the composition []φ:X𝖯𝖳𝖾𝗋𝗆/. Then φ is a solution to 𝒮(X,β) if and only if s:Δ(X,β)(𝖯𝖳𝖾𝗋𝗆/,) is a coalgebra homomorphism.

We immediately obtain the following theorem.

Theorem 6.9.

Let (X,β) be a finite LMC. There is a unique G-coalgebra homomorphism sβ:Δ(X,β)(𝖯𝖳𝖾𝗋𝗆/,).

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 G 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 G-coalgebra.

Lemma 7.1.

G 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 U:𝖢𝖠𝖲𝖾𝗍 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 f:XY be a monomorphism in 𝖢𝖠. Then the square below is a pullback (and conversely) in 𝖢𝖠.

Then its image under U is also a pullback and thus U(f) is a monomorphism in 𝖲𝖾𝗍: that is, f is an injective function.

For space reasons, we omit the proof that G preserves pullbacks. Using Lemma 7.1, we can establish the first required property of G.

Lemma 7.2.

The functor G:𝖢𝖠𝖢𝖠 on 𝖢𝖠 is finitary.

Proof.

We are going to use the following results:

Fact 1.

The forgetful functor U:𝖢𝖠𝖲𝖾𝗍 creates directed colimits.

Fact 2.

Let 𝖢 be a category equipped with a functor U:𝖢𝖲 that creates – hence, preserves and reflects – directed colimits. Let G:𝖢𝖢 be a lifting of an endofunctor H:𝖲𝖲, i.e., UG=HU. Then, if H preserves directed colimits, so does G.

In our situation, G 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 D:(I,)𝖢 be a directed diagram in 𝖢, and let (di:DiY)iI be a colimiting cocone for D. We want to show that (G(di):GDiGY)iI is a colimiting cocone for GD. Since U reflects colimits, it suffices to show that (UG(di):UGDiUGY)iI is a colimiting cocone for UGD. To this end, consider the directed diagram UD:(I,)𝖲. Since U preserves directed colimits, (U(di):UDiUY)iI is a colimiting cocone for UD. Now, since H is finitary, i.e., it preserves directed colimits, (HU(di):HUDiHUY)iI is a colimiting cocone of the directed diagram HUD. But HU=UG, so we can conclude that (UG(di):UGDiUGY)iI is a colimiting cocone of the directed diagram UGD, as desired.

We can now proceed with the proof of the lemma. Recall from Remark 5.6 that G (from Eq. 5.2) is a lifting of the endofunctor H. The functor H is finitary because for any set X, and any function fHX, there is the finite set Z={xXaAr>0 such that f(a)=(r,x)} with fHZ. By Fact 1, the forgetful functor U:𝖢𝖠𝖲𝖾𝗍 creates directed colimits. Thus, the conditions of Fact 2 are satisfied, and we may conclude that G is finitary.

Lemma 7.3.

G preserves surjective affine maps.

Proof.

Let h:XY be a surjective affine map. Consider G(h):GXGY. For aA, we have G(h)(g)(a)()= and G(h)(g)(a)(rx)=rh(x).

Take fGY. For each yY, denote by xy an element of X with y=h(xy). Such exists since h is surjective. We define g:AX as follows. For aA, if f(a)=, set g(a)= and if f(a)=ry, set g(a)=rxy. Then gGX and G(h)(g)=f.

The most interesting point in this section is the properness of G (see Definition 7.6). In order to verify that G is proper, we need a few lemmas regarding bisimilarity and behavioural equivalence for G-coalgebras.

Lemma 7.4.

Let (X,γ) be a G-coalgebra on 𝖢𝖠. Then bisimilarity (the largest bisimulation) on (X,c) 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 G on 𝖢𝖠.

𝖢𝖠 is complete and cocomplete [2, § 9.3, Prop. 4] and the functor G 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 G in concrete terms. The proof follows directly from the definition of bisimulation.

Lemma 7.5.

Let (X,γ) and (Y,ϑ) be G-coalgebras. Let RX×Y be a subalgebra of X×Y. Then R is a bisimulation between (X,γ) and (Y,ϑ) if and only if the following holds: whenever aA and (x,y)R, massγ(a,x)=massϑ(a,y), and if massγ(a,x)=massϑ(a,y)0, then R contains (nextγ(a,x),nextϑ(a,y)).

Without further ado, let us now proceed with the proof that G is a proper functor, in the following sense.

Definition 7.6.

Let T be a finitary monad on 𝖲𝖾𝗍 and write 𝖲𝖾𝗍T for the Eilenberg-Moore category of T. A zig-zag in Coalg𝖲𝖾𝗍T(F) is a diagram of the shape

(X,c)f1(Z2,e2)f2f3f4f2n1(Y,d)f2n(Z1,e1)(Z3,e3)(Z2n1,e2n1)
(7.1)

Write η for the unit of T. The zig-zag above relates xX with yY, written xy, if there exist elements z2kZ2k, k=1,,n1, with (setting z0=x and z2n=y)

f2k(z2k)=f2k1(z2k2),k=1,,n

The endofunctor F is said to be proper if the following statement holds: for any pair of ffg F-coalgebras (T(X),cX) and (T(Y),cY) and any two elements xX and yY with ηX(x)ηY(y), there exists a zig-zag in Coalg𝖲𝖾𝗍T(F) entirely consisting of ffg F-coalgebras that relates ηX(x) with ηY(y). We may call such a zig-zag an ffg zig-zag.

Theorem 7.7.

The functor G:𝖢𝖠𝖢𝖠 is proper.

Proof.

Consider two ffg G-coalgebras (𝒟(X),β) and (𝒟(Y),ϑ), with behaviourally equivalent states φ𝒟(X) and ψ𝒟(Y). We need to relate φ and ψ with a suitable, ffg, zig-zag. We are going to use bisimilarity B on the coproduct coalgebra222Left adjoints preserve colimits, so indeed the coproduct of free convex algebras is given by the formula 𝒟(X)+𝒟(Y)𝒟(X+Y), where the “+” on the left hand side is the coproduct in 𝖢𝖠. (𝒟(X),β)+(𝒟(Y),ϑ)(𝒟(X+Y),β+ϑ).

where ι1,ι2 denote the coproduct injections. It remains to show that B is finitely generated as a subalgebra of the product 𝖢𝖠, 𝒟(X+Y)×𝒟(X+Y). 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 𝒟(X) with the simplex in the vector space X. This can be done by seeing each Dirac delta 1x as a unit vector in X. Every congruence relation R𝒟(X)×𝒟(X) of convex algebras is a subalgebra of 𝒟(X)×𝒟(X), and so by extension can be identified with a (convex) subset of X×X2X. In particular, our B can be identified with a convex subset of 2(X+Y). As turns out, B is finitely generated as a subalgebra if and only if B is topologically closed in 2(X+Y). The following theorem is a direct consequence of Sokolova-Woracek [27, Proposition 5.9].

Theorem 7.8.

Let R2X be a congruence on the ffg convex algebra 𝒟(X)X. Then R is finitely generated as a subalgebra if and only if it is topologically closed (closed under limits of Cauchy sequences).

Lemma 7.9.

Let (𝒟(X),β) be a G-coalgebra. Then for any aA, the maps β()(a) and massβ(a,) are restrictions of -linear maps XX+1 and X respectively.

Proof.

Recall that we think of the Dirac distributions 1x as the basis vectors of X. We additionally have the unit vector 1 in X+1. For xX, write

β(x)(a)=yXrxyy

and rx=1yXrxy. Define the matrix M by

M=[rxξ|xX and ξX{}]

indexed by X×(X{}). A quick calculation verifies that indeed, for θ𝒟(X), β(θ)(a)=Mθ by linear extension. Of course, here we are thinking of θ=xXqxx as the column vector [qxxX].

Similarly, define the row matrix N=[1xX] of 1’s. Then for θ=xXqxx,

Nθ=[11][qxxX]=xXqx

We therefore have massβ(a,θ)=NMθ. Thus, both β()(a) and massβ(a,) are restrictions of linear functions.

Corollary 7.10.

Let (𝒟(X),β) be a G-coalgebra. Then for any aA, the maps β()(a) and massβ(a,) are continuous.

Proof.

Follows directly from Lemma 7.9 and that X, X+1, and are finite dimensional.

Theorem 7.11.

Let (𝒟(X),β) and (𝒟(Y),ϑ) be free finitely generated G-coalgebras. Let (B,) be the largest bisimulation between 𝒟(X) and 𝒟(Y), and regard B as a subset of 𝒟(X+Y)×𝒟(X+Y)2(X+Y). Then B is a closed set and thus is finitely generated as a subalgebra.

Proof.

We show that the topological closure B¯ of B2(X+Y) is a bisimulation between (𝒟(X),β) and (𝒟(Y),ϑ). Since B is the largest bisimulation, BB¯B.

We appeal to Lemma 7.5: Let (θ,ψ)B¯. Then there is a Cauchy sequence (θi,ψi)i such that (θi,ψi)(θ,ψ) as i. This, in particular, means that θiθ and ψiψ in the product topology. Now, for aA,

massβ(a,θ) =massβ(a,limθi)
=limmassβ(a,θi) (Corollary 7.10)
=limmassϑ(a,ψi) (Lemma 7.5)
=massϑ(a,limψi) (Corollary 7.10)
=massϑ(a,ψ)

This verifies the first condition. To verify the second, suppose that massβ(a,θ)=massϑ(a,ψ)0. Then there is an N>0 such that for all i>N, massβ(a,θi)=massϑ(a,ψi)>0. This allows for the following computation:

nextβ(a,θ)=β(θ)(a)massβ(a,θ)=()limβ(θi)(a)massβ(a,θi)=limnextβ(a,θi)

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 θi 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

(nextβ(a,θ),nextϑ(a,ψ))=lim(nextβ(a,θi),nextϑ(a,ψi))B¯

By Lemma 7.5, B¯ 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 G-coalgebra homomorphism :(𝖯𝖳𝖾𝗋𝗆/,)(Prob(Aω),ζ) satisfies e=([e]) for each e𝖯𝖳𝖾𝗋𝗆 (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 k to q in the diagram below.

(7.2)

The left inverse k in (7.2) exists if (𝖯𝖳𝖾𝗋𝗆/,) is the final locally fg G-coalgebra. In Step 2, we saw that (𝖯𝖳𝖾𝗋𝗆/,) satisfies a slightly weaker universal property, that every ffg G-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 G. 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.