Edinburgh Research Explorer Initial Algebras and Final Coalgebras Consisting of Nondeterministic Finite Trace Strategies

We study programs that perform I/O and ﬁnite or countable nondeterministic choice, up to ﬁnite trace equivalence. For well-founded programs, we characterize which strategies (sets of traces) are deﬁnable, and axiomatize trace equivalence by means of commutativity between I/O and nondeterminism. This gives the set of strategies as an initial algebra for a polynomial endofunctor on semilattices. The strategies corresponding to non-well-founded programs constitute a ﬁnal coalgebra for this functor.


Introduction
This paper is about nondeterministic programs that perform I/O.To illustrate the ideas, let us consider the following (infinitary) imperative language: M, N ::= Age?(M n ) n∈N | Happy?(M, N ) The meaning is as follows.
• The command Age?(M n ) n∈N prints Age? and pauses.If the user then enters n, it executes M n .
• The command Happy?(M, N ) prints Happy? and pauses.If the user then enters Yes or No, it executes M or N respectively.
• The command Continue?(M ) prints Continue?and pauses.If the user then enters Yes, it executes M .
• The command Bye n prints Bye n and pauses.No further input is possible.
• The command M or N nondeterministically chooses to execute M or N .
A play is an alternating sequence of outputs and inputs, e.g. has the same traces as M 0 , i.e. these commands are trace equivalent (though not bisimilar).The following questions naturally arise: (i) Given a set σ of plays, under what conditions is σ the trace set of some command?
(ii) Can we give an axiomatic theory of trace equivalence?(Cf. the axiomatic analysis of process equivalences in [1,25].)This paper's first contribution is to answer these questions.The answer to question (ii) is surprisingly simple: we take the ordinary theory of or (commutativity, associativity and idempotency), together with the fact that each I/O operation commutes with or.For example: Age(M n ) n∈N or Age(M n ) n∈N = Age(M n or M n ) n∈N We give our results not only for the language above but also for some variations, as we shall now explain.The language has two parts-I/O and nondeterminism-and each can be varied.(ii) We may include commands of the form n∈N M n .This command nondeterministically chooses n ∈ N and then executes M n .
In the second part of the paper (Section 6) we consider non-well-founded program behaviours, up to (finite) trace equivalence.We see that the familiar dualityinitial algebra for well-founded behaviours vs final coalgebra for non-well-founded ones-arises also in the setting of finite traces.The significance of these results is shown by their connection to several areas of semantics.Effects and monads.I/O operations and nondeterministic choice are examples of computational effects.A collection of effects is often described by a monad on Set [20], which can sometimes be presented by a simple theory [21].Each of our combination of effects give rise to such a monad on Set corresponding to programs modulo trace equivalence, which is moreover a tensor of the monads for I/O and nondeterminism [3,6,7,13].Game semantics.A program in the language above may be seen as playing a game (Figure 1) with one active position (indicating that the program is executing), and several passive positions (indicating that execution is paused).The games that arise in game semantics may have several active and several passive positions [19].A different terminology is used: with outputs called "P-moves" and inputs called "O-moves".Nonetheless, where finite traces are studied, the same notions of nondeterministic strategies [8,9] may be used, and our results characterize these strategies for these more general games.

Coalgebraic traces.
Several coalgebraic accounts of traces have appeared [10,15,16].Our account (though it does not subsume these) has the novelty of including both output and input actions.We briefly compare in Section 7. ) )

Yes q q
No o o

Awaiting decision to continue
Yes i i

Finished n
Fig. 1.The game that programs play against the user.

Semilattices
Given a set X, we write PX for the set of subsets, P f X for the set of finite subsets, P c X for the set of countable subsets.We write X, we write P + X for the set of inhabited (nonempty) subsets and likewise P + f X and P + c X.A semilattice is a poset (A, ) with all binary joins.It is bounded when it has a least element, an ω-semilattice when every countable subset has a supremum, an almost complete semilattice when every inhabited subset has a supremum, and a complete semilattice when every subset has a supremum.
A map A / / B of semilattices is a monotone map that preserves binary join.A map of bounded semilattices must preserve the least element, a map of ωsemilattices must preserve countable joins, a map of almost complete semilattices must preserve suprema of inhabited subsets, and a map of complete semilattices must preserve arbitrary suprema.
Rather than describing a semilattice posetally as above, we may also describe it equationally: a set A with a binary operation ∨ that is commutative, associative and idempotent.A posetal semilattice (A, ) gives an equational one by setting x ∨ y to be the join of x and y.Conversely, an equational semilattice (A, ∨) gives a posetal one by setting x y when x ∨ y = y.These constructions are inverse.A function between semilattices is a map of equational semilattices (i.e.preserves ∨) iff it is a map of posetal semilattices (i.e. is monotone and preserves binary join).
Continuing the equational style: • a bounded semilattice is a semilattice (A, ∨) with a neutral element ⊥ • an ω-semilattice is a semilattice (A, ∨) with an operation : A more abstract view: the category of semilattices is the Eilenberg-Moore category for the monad P + f on Set.Likewise the category of ω-semilattices for P + c , the category of almost complete semilattices for P + , etc. (ii) A transition system over a signature (Ar(k)) k∈K consists of a set X and function ζ :

Language
Informally x ⇒ k (y i ) i∈Ar(k) means that x outputs k and pauses, and if the user then inputs i, it executes y i .
For the sequel, we fix a signature S = (Ar(k)) k∈K .The set of commands is defined inductively by the grammar The set of commands forms a transition system.The transition relation M ⇒ k (N i ) i∈Ar(k) is inductively defined as follows.
For countable nondeterminism, we extend the syntax as follows: and include the operational rule Definition 2.2 A transition system (X, ζ) is • total when, for all x ∈ X, the set ζx is inhabited • deterministic when, for all x ∈ X, the set ζx has at most one element • finitely nondeterministic when, for all x ∈ X, the set ζx is finite • countably nondeterministic when, for all x ∈ X, the set ζx is countable • well-founded 4 when there is no infinite sequence of transitions The set of finitely nondeterministic commands, as a transition system, is total, finitely nondeterministic and well-founded.
(ii) The set of countably nondeterministic commands, as a transition system, is total, countably nondeterministic and well-founded.
Proof.We prove by induction on M that ζM is finite/countable and inhabited, and there is no infinite sequence of transitions from M . 2

Bisimulation
Although it is not used in the sequel, we briefly look at bisimulation.

Definition 2.4
A bisimulation on a transition system (X, ζ) is a a relation R on X such that x R x implies that, if x =⇒ k (y i ) i∈Ar(k) then there exists (y i ) i∈Ar(k) such that x =⇒ k (y i ) i∈Ar(k) and ∀i ∈ Ar(k).y i R y i , and vice versa.The greatest bisimulation is called bisimilarity.
For example, the commands M 0 and M 1 in Section 1 are not bisimilar.We axiomatize bisimilarity as follows.
Definition 2.5 Basic equivalence, written ≡, is the least congruence on commands sastifying the semilattice laws: Also, for the countably nondeterministic language, the ω-semilattice laws: Proposition 2.6 For both the finitely and countably nondeterministic languages, basic equivalence is bisimilarity.
Proof.Induction on ≡ shows that ≡ implies bisimilarity and that it is a bisimulation.2

Traces and Strategies
Our basic notion of interaction is as follows.
It is active-ending, passive-ending or infinite according as its length is even, odd or infinite.
As illustrated by M 0 and M 1 in Section 1, two commands are trace equivalent iff they have the same passive-ending traces; the active-ending traces are redundant.This motivates the following.

Definition 2.8
(i) A nondeterministic finite trace strategy is a set σ of passive-ending plays such that sik ∈ σ implies s ∈ σ.
(ii) An active-ending play is enabled by σ when it is either ε (the empty play), or si for s ∈ σ.
Definition 2.9 Let (X, ζ) be a transition system and x ∈ X.A play k 0 , i 0 , . . . is a trace of x when there is a sequence The strategy consisting of the passive-ending traces of x is written Traces x.
Clearly the active-ending traces of x are the plays enabled by Traces x.By contrast, the infinite traces are, in general, not derivable from Traces x.For example, in a non-well-founded extension of the language, the following commands are trace equivalent, but the infinite play (Continue?Yes.)ω is a trace of N 0 and not of N 1 .This cannot happen in a well-founded system, because there are no infinite traces.Nor can it happen in a finitely nondeterministic system, because of the following version of König's lemma.Proposition 2.10 For a finitely nondeterministic system ζ : X / / P k∈K i∈Ar(k) X and x ∈ X, an infinite play k 0 , i 0 , . . . is a trace of x iff all its passive-ending prefixes are in Traces x.
Let us look at some useful operations on strategies.Firstly, we put strategies together as follows.
Definition 2.11 For k ∈ K and a family of strategies (σ i ) i∈Ar(k) , we define the strategy 12 On commands, we can give Traces compositionally: Secondly, we decompose strategies as follows.
Definition 2. 13 Let σ be a strategy.We write Init σ for the set of k ∈ K such that (k) ∈ σ.For each such k and each i ∈ Ar(k), we define the strategy σ/ki 3 Well-founded behaviour

Commuting Equivalence
We begin with the matter of axiomatizating trace equivalence.As we shall see, the appropriate axiomatization is as follows.Definition 3.1 Commuting equivalence, written ≡ c , is the least congruence on commands that satisfies the semilattice laws (1)- (3) and commutativity between Req k? and or: Also, for the countably nondeterministic language, the ω-semilattice laws ( 4)- (6) and commutativity between Req k? and : For example, the commands M 0 and M 1 in Section 1 are commuting equivalent.Proof.This is proved by induction; the soundness of the laws follows from Proposition 2.12.For example: and these are equal since N is inhabited.Hence (8) is sound.

2
We shall now prove completeness, i.e. the converse of Proposition 3.2.We use the following.

Lemma 3.3 For every command M we have
for some L ∈ P + f K and family of commands (N k,i ) k∈L,i∈Ar(k) .For the countably nondeterministic language, L ∈ P + c K.
Likewise for the case M = M 0 or M 1 .2 Our completeness proof proceeds by characterizing trace inclusion, the preorder that relates M to N when Traces M ⊆ Traces N .
(iv) or and n∈N and Req k? for k ∈ K are all monotone, i.e. c is a precongruence.
Proof.Parts (i)-(iii) follow the construction of a posetal semilattice from an equational semilattice in Section 2.1.Monotonicity of or and n∈N follow from the least upper bound property.Monotonicity of Req k? follows from (7), because the latter may be viewed as saying that Req k? is a map of equational semilattices and hence a map of posetal semilattices.

Definability for finite nondeterminism
We shall now characterize which strategies are of the form Traces M for a finitely nondeterministic command M .We also give a second proof of completeness of ≡ c that is direct in the sense of not involving trace inclusion (but it appears not to adapt to the setting of countable nondeterminism).
We consider the following conditions on strategies.
Definition 3.7 Let σ be a strategy.
(i) For an enabled play s, a response to s is an operation k ∈ K such that sk ∈ σ.
(ii) σ is a tree when every enabled play has a unique response.
(iii) σ is total when every enabled play has at least one response.
(iv) σ is deterministic, or a partial tree, when every enabled play has at most one response.
(v) σ is finitely nondeterministic when every enabled play has only finitely many responses.
(vi) σ is finitely founded when it is finitely nondeterministic and no infinite play has all passive-ending prefixes in σ.A tree or partial tree with the latter property is also called well-founded.
Let us illustrate these conditions with examples.Proof.The plays enabled by Traces x are the active-ending traces of x.For (i) we prove that each such trace s has a response, by induction on s.The case s = ε is easy, and if s = k.i.s then there is z such that s =⇒ k (y i ) i∈Ar(k) and z = y i and s has a response in Traces z, so k.i.s has a response in Traces x.The proof of (ii)-(iii) is similar.Part (iv) follows from Proposition 2.10. 2 Let us mention the deterministic fragment.Proof.For a finitely founded, total strategy σ, let P (σ) assert that σ = Traces M , for some command M , unique up to ≡ c .We shall show that ∀k ∈ Init σ. ∀i ∈ Ar(k).P (σ/ki) implies P (σ).This implies our result because otherwise Dependent Choice gives an infinite trace whose passive-ending prefixes are all in σ.
For each k ∈ Init σ and i ∈ Ar(k), suppose P (σ/ki), so we choose a command N k,i such that Traces N k,i = σ/ki.Then we have Req k?σ/ki = σ Finally we obtain our second proof of completeness: if Traces M = Traces N = σ, then M ≡ c N .

Definability for Countable Nondeterminism
For the countably nondeterministic language, we again want to characterize those strategies σ that are of the form Traces M .As has often been observed, the situation differs from Definition 3.7(vi): we cannot rule out an infinite play having all passiveending prefixes in σ.For example, the command n∈N Continue n (Bye 3 ) has trace set which contains every passive-ending prefix of the infinite play (Continue?Yes) ω .The appropriate conditions are the following, as we shall see.
Definition 3.12 Let σ be a strategy.
(i) σ is countably nondeterministic when every enabled play has countably many responses.
(ii) For an enabled play s, a response tree to s is a tree τ such that for all t ∈ τ , the concatenation of s and t is in σ.
(iii) σ is well-foundedly total when every enabled play has a well-founded response tree.(Cf.[18,Definition 19] and [22,Appendix].) We illustrate these conditions with examples.• In our example signature, K is countable, so every strategy is countably nondeterministic.
• The following strategy is total: It is not well-foundedly total, since the enabled play Continue?Yes.has no wellfounded response tree.
The counterpart of Proposition 3.8 is as follows.
Proposition 3.13 Let (X, ζ) be a transition system, and let x ∈ X.
(i) If ζ is countably nondeterministic, then so is Traces x.
(ii) If ζ is countably nondeterministic, total and well-founded, then Traces x is wellfoundedly total.
Proof.Part (i) is analogous to Proposition 3.8(iii).To prove part (ii), we first choose, for each z ∈ X, some R(z) ∈ ζz.Any play k 0 , i 0 , . . ., k n−1 , i n−1 enabled by Traces x is a trace of x, i.e. there is a sequence The trace set of x n in the well-founded, total deterministic system (X, z → {R(z)}) is a well-founded response tree for k 0 , i 0 , . . ., k n−1 , i n−1 . 2 Theorem 3.14 A strategy σ is of the form Traces M , for some command M , iff it is countably nondeterministic and well-foundedly total.
Proof.(⇒) follows from Proposition 3.13.For (⇐), we proceed as follows.For n ∈ N, we write Play n for the set of plays k 0 , i 0 , . . ., k m with m < n.An n- We show that, for all n ∈ N, every countably nondeterministic, totally well-founded strategy σ has an n-approximant, by induction on n.
• To show it is true for 0, let τ be a tree response to ε, then the corresponding deterministic command (Proposition 3.9) is a 0-approximant of σ.
• Suppose it is true for n.For each k ∈ Init σ and i ∈ Ar(k), let M k,i be an napproximant of σ/ki.The set Init σ is countable, being the set of responses to ε.
For each n ∈ N, let M n be an n-approximant to σ.The purpose of this section is to recast our results in a way that does not mention the languages.Recall that S is our signature (Ar(k)) k∈K .The following is well-known.(i) An S-algebra consists of a set X and, for each k ∈ K, a function This leads to a standard result: The set of well-founded trees with (Req k?) k∈K is an initial Salgebra.
Our aim is to combine nondeterminism and I/O in a similar way.We generalize Definition 4.1 as follows.(i) An S-algebra in C consists of X ∈ C and, for each k ∈ K, a morphism θ k : i∈Ar(k) X / / X.
(ii) An S-algebra homomorphism (X, (θ k ) k∈K ) / / (Y, (φ k ) k∈K ) is a morphism We now formulate our results for finite nondeterminism, without mentioning the language.Theorem 4.4 (i) For a strategy σ, the following are equivalent: • σ = Traces x, for some element x of a well-founded, finitely nondeterministic, total system.• σ is finitely founded and total.
(ii) An initial S-algebra on SL (the category of semilattices) is given by the set of finitely founded total strategies, ordered by inclusion, with (Req k?) k∈K .
Proof.(ii) An S-algebra in semilattices consists of a semilattice (X, ∨) and a family (θ k ) k∈K of functions θ k : i∈Ar(k) X / / X that are homomorphisms of (equational) semilattices: A homomorphism is a function preserving ∨ and θ k for all k ∈ K. Thus an initial S-algebra in semilattices is given by the ≡ c -classes of finitely nondeterministic commands.In view of Proposition 3.10, these correspond to finitely founded, total strategies. 2 Likewise we have the following.(i) For a strategy σ, the following are equivalent: • σ = Traces x, for some element x of a well-founded, countably nondeterministic, total system.• σ is countably nondeterministic and well-foundedly total.
(ii) An initial S-algebra on ωSL (the category of ω-semilattices) is given by the set of countably nondeterministic, well-foundedly total strategies, ordered by inclusion, with (Req k?) k∈K .
The notion of almost complete semilattices (Section 2.1) gives another variation: Theorem 4.6 (i) For a strategy σ, the following are equivalent: • σ = Traces x, for some element x of a well-founded, total system.
(ii) An initial S-algebra on category of ACSL (almost complete semilattices) is given by the set of well-foundedly total strategies, ordered by inclusion, with (Req k?) k∈K .
Proof.Let C be the set of well-founded total strategies.Let λ be the maximum of ℵ 0 and the cardinalities of C and K. Thus for any strategy σ, every enabled play has λ responses.By extending the countably nondeterministic language with λary nondeterministic choice i<λ M i , we obtain analogous results to Theorem 4.5.Thus every strategy is Traces M for some command M , giving part (i).Say that a λ-semilattice is a semilattice where every inhabited subset of size λ has a supremum, and a homomorphism is a function that preserves these suprema.Then C forms an initial S-algebra in λ-semilattices.Let A be an S-algebra in almost complete semilattices, and f : C / / A the unique homomorphism of S-algebras in λ-semilattices.Any inhabited R ⊆ C has cardinality λ, so its supremum is preserved by f .Hence f is a homomorphism of almost complete semilattices.2

Initial algebra for an endofunctor
Recall that Definition 4.3 applies to any category C with products.If C also has coproducts, then S-algebras in C are algebras for the endofunctor k∈K i∈Ar(k) .Each of our categories-semilattices, ω-semilattices and almost complete semilattices-has coproducts that admit a simple explicit description.Proposition 4.7 Let (A j ) j∈J be a family of semilattices.
(i) The coproduct f j∈J A j in SL is the set of pairs (U, (a j ) j∈U ), with U ∈ P + f J and each a j ∈ A j .The order gives (U, (a j ) j∈U ) (V, (b j ) j∈V ) when U ⊆ V and a j b j for all j ∈ U .For j ∈ J, the jth embedding e j : A j / / j∈J A j sends is a → ({j}, (a) j ).
(ii) For a finite inhabited set L, the L-indexed suprema in f j∈J A j are given by l∈L (U l , (a l,j ) j∈U l ) = (V, (b j ) j∈V ) where V = l∈L U l and b j = l∈L : j∈U l a l,j .
(iii) For a family of semilattice homomorphisms (f j : A j / / B) j∈J , the cotuple sends (U, (a j ) j∈U ) to j∈U f j (a j ).
We likewise describe a coproduct c j∈J A j in ωSL, and a coproduct j∈J in ACSL.
Let us reformulate Theorems 4.4-4.6 in these terms.We shall make use of the following constructions.(i) The function Φ : Note that Φ and Ψ are inverse.Recall also Lambek's Lemma: the structure of an initial algebra is an isomorphism.Theorem 4.9 (i) An initial f k∈K i∈Ar(k) -algebra on SL is given by the set of finitely founded, total strategies, ordered by inclusion, with structure u → Φu, whose inverse is σ → Ψσ.

Final coalgebras
So far we have characterized those strategies that are of the form Traces x for some element x of a well-founded system.We now turn to non-well-founded systems.
Recall that, just as the set of well-founded trees forms an initial k∈K i∈Ar(k)algebra, so the set of all trees forms a final k∈K i∈Ar(k) -coalgebra.We shall see a similar phenomenon arising for nondeterministic systems.We treat the unrestricted case only.It is straightforward to enforce finite or countable nondeterminism and/or to enforce totality, if desired.

Proof.
Induction over plays, separating the cases (k) and k.i.s . 2 What is missing from Theorem 6.3 is a characterization of the map x → Traces x on a transition system.We give this next, using the following notions.Definition 6.4 Given a family of functions (X j / / A j ) j∈J where X j is a set and A j an almost complete semilattice, we write j∈J f j : P j∈J X j / / ⊥ j∈J A j for the The account in [15] studies coalgebras for G C,A def = C × a∈A P−, where C is a complete semilattice and A a set.This resembles our functor k∈K P i∈Ar(k) but is not an instance.In that work, the main case of interest is C = PB (in particular B = 1) giving G C,A ∼ = F B,A and again it is complete traces that are considered.
Despite the focus on complete traces, these accounts share some general structure with ours, especially the analysis of determinization in [15].See [14].
Notable areas of future work are probabilistic programs and infinite traces.

0 def= 1 def=
Happy?Yes.Age?93.Age?27.Continue?Yes.Happy?A command's traces are the plays it may give rise to.For example, let M Happy?(Bye 3 , Bye 5 or Continue?(Bye6 )) It has the following passive-ending traces (i.e.ones ending with execution paused): Happy?Happy?Yes.Bye 3 Happy?No.Bye 5 Happy?No.Continue?Happy?No.Continue?Yes.Bye 6 and the following active-ending traces (i.e.ones ending with the program executing): ε (the empty play) Happy?Yes.Happy?No.Happy?No.Continue?Yes.The following command M Happy?(Bye 3 , Bye 5 ) or Happy?(Bye 3 , Continue?(Bye 6 )) (i) The I/O part is determined by a signature, a collection of operations each with a specified arity-a set of argument indices.The language above has four I/O operations-Age, Happy, Continue and Bye-of respective arity N, {Yes, No}, {Yes} and ∅.Our results apply no matter what I/O signature is used to generate the language.

Definition 2. 1 (
i) A signature consists of a set K of operations, and for each operation k ∈ K, a set Ar(k) of argument indices.

2 Proposition 3 . 5
M c N iff Traces M ⊆ Traces N .Proof.(⇒) follows from Proposition 3.2.We prove (⇐) by induction on M .The cases M = M 0 or M 1 and M = n∈N M n follow from the least upper bound property.Suppose M = Req k?(M i ) i∈Ar(k) .Lemma 3.3 gives N ≡ c k∈L Req k?(N k,i ) i∈Ar(k) and so N. Bowler et al. / Electronic Notes in Theoretical Computer Science 341 (2018) 23-44 Traces Req k?(M i ) i∈Ar(k) ⊆ Traces k∈L Req k?(N k,i ) i∈Ar(k) i.e.Req k?(Traces M i ) i∈Ar(k) ⊆ k∈L Req k?(Traces N k,i ) i∈Ar(k) Thus k ∈ L, and for each i ∈ Ar(k) we have Traces M i ⊆ Traces N k,i implying M i c N k,i by the inductive hypothesis.Hence

Proposition 3 . 9 Proposition 3 . 10
Deterministic commands, which are given inductively by the grammar M ::= Req k?(M i ) i∈Ar(k) , correspond via M → Traces M to well-founded trees.For every finitely founded, total strategy σ we have σ = Traces M , for some command M , unique up to ≡ c .

N 2 Corollary 3 . 11 A
.Bowler et al. / Electronic Notes in Theoretical Computer Science 341 (2018)   For uniqueness, suppose σ = Traces M .Lemma 3.3 givesM ≡ c k∈L Req k?(N k,i ) i∈Ar(k) Hence σ = Traces M = Traces k∈L Req k?(N k,i ) i∈Ar(k) = k∈L Req k?(Traces N k,i ) i∈Ar(k)Hence L = Init σ and for each k ∈ Init σ and i ∈ Ar(k) we haveTraces N = σ/ki, giving N k,i ≡ c N k,i by hypothesis.So M ≡ c k∈L Req k?(N k,i ) i∈Ar(k) ≡ c k∈L Req k?(N k,i ) i∈Ar(k)strategy is of the form Traces M , for a finitely nondeterministic command M , iff it is total and finitely founded.

Definition 4 . 3
Let C be a category with products.

Definition 4 . 8
Let Strat be the set of all strategies.

Proposition 6 . 1 Definition 6 . 2
Every strategy σ is of the form Traces x for some element x of a transition system (X, ζ).Proof.Consider the system ζ : Strat / / P k∈K i∈Ar(k) Strat where ζ : σ → {(k, (σ/ki) i∈Ar(k) ) | k ∈ Init σ} Then Traces σ = σ by induction over plays, separating the cases (k) and k.i.s . 2 Our first goal is to show that Strat forms a final ⊥ k∈K i∈Ar(k) -coalgebra on the category CSL of complete semilattices.Let (A, ζ) be a ⊥ k∈K i∈Ar(k) -coalgebra on CSL.For a ∈ A, a trace of r is a play k 0 , i 0 , . . .such thata = a 0 ζ(a 0 ) = (L 0 , ((b 0 k,i ) i∈Ar(k) ) k∈L 0 ) k 0 ∈ L 0 b 0 k 0 ,i 0 = a 1 ζ(a 1 ) = (L 1 , ((b 1 k,i ) i∈Ar(k) ) k∈L 1 ) k 1 ∈ L 1 • • •The strategy consisting of the passive-ending traces of a is written Traces a.Theorem 6.3 A final ⊥k∈K i∈Ar(k) -coalgebra on CSL is given by Strat, ordered by inclusion, with structure σ → Ψσ, whose inverse is u → Φu.The unique coalgebra morphism from (A, ζ) to the final coalgebra is a → Traces a.
N.Bowleret al. / Electronic Notes in Theoretical Computer Science 341 (2018) 23-44 P k∈K i∈Ar(k) .But only complete traces, i.e. elements of A * × B, are considered, so the results are different from ours.