134 Jetty Kleijn and Maciej Koutny
the order of occurrences a
i
and b
j
is the same within u and v for all pairs a, b
of dependent symbols and for all 1 ≤ i ≤ #
a
(u) and 1 ≤ j ≤ #
b
(u).
Continuing our running example with Σ = {a, g, m, r, u}, we assume CA =
(Σ, Ind) is the concurrency alphabet with independence relation Ind given by:
Ind = {(r, g), (g, r), (r, u), (u, r), (m, g), (g, m), (m, u), (u, m), (a, u), (u, a)}.
Then agmr ∼
Ind
amgr ∼
Ind
amrg and so agmr ≡
Ind
amrg.
Definition 10 : traces
A trace over a concurrency alphabet (Σ,Ind ) is any equivalence class of
the trace equivalence relation ≡
Ind
, and a trace language is any set of
traces over (Σ,Ind ).
The trace containing a given word u is denoted by [u]
Ind
, and the set of
all traces over (Σ,Ind) by Σ
∗
/
≡
Ind
. Whenever the independence relation Ind
is understood, we may drop the subscript Ind. Note that the empty trace
[λ] is {λ} rather than the empty set. For the running example, [amgr] =
{amgr, agmr, amrg}.
If two words are trace equivalent, then both their lengths and alphabets
are the same
. Hence, the alphabet of a trace and its length, defined in the
natural way as alphabet(α)
df
= alphabet(u) and length(α)
df
= length(u),where
u is any word belonging to the trace α, are both well-defined notions. Also,
trace concatenation (or sequential composition, in operational terms) defined
as [u]◦[v]
df
= [uv] is a well-defined operation. This follows from the observation
that uv and u
v
are trace equivalent whenever [u] = [u
] and [v] = [v
].
Fact 11 : The set Σ
∗
/
≡
Ind
of all traces over a concurrency alphabet
(Σ,Ind) is a monoid. That is, concatenation of traces is an associative
a
operation with the empty trace [λ] as its unit.
b
a
(α ◦ β) ◦ γ = α ◦ (β ◦γ) for all α, β, γ in Σ
∗
/
≡
.
b
α ◦ [λ] = [λ] ◦ α = α for each α in Σ
∗
/
≡
.
The last result can be pushed a little bit further.
Fact 12 : The trace monoid Σ
∗
/
≡
Ind
is partially commutative in the sense
that, for any pair of traces α and β, alphabet(α)×alphabet(β) ⊆ Ind implies
α ◦ β = β ◦ α and, moreover, the converse holds whenever the alphabets of
α and β are disjoint.
We lift the prefix relationship on words to the level of traces, by stating
that a trace α is a prefix of atraceβ if β = α ◦γ for some trace γ. We denote
this by α β. Moreover, if α β and α = β then we write α β.For