1. Introduction
Our initial motivation for this work has been the provision of generic recipes for constructing graph models for concurrent quantales and concurrent Kleene algebras (Hoare et al. Reference Hoare, Möller, Struth and Wehrman2011), including quantitative ones. This seems important because real-world models of concurrent programmes that are compatible with concurrent Kleene algebras are rare, and this impedes the transfer of the successes of sequential Kleene algebras into concurrency verification. Concurrent Kleene algebras axiomatise the sequential and parallel compositions
$\cdot$
and
$\|$
of concurrent and distributed systems as well as their finite unbounded sequential and parallel iterations and impose, in particular, that the two compositions interact via a lax interchange law
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU1.png?pub-status=live)
Two classical models of concurrent Kleene algebra are languages over finite words with respect to sequential and shuffle composition in interleaving concurrency, and languages over partial orders or partial words (pomsets) with respect to serial and parallel composition in true concurrency. The relation
$\le$
is interpreted as set inclusion in these models.
In both models, the language-level algebras are constructed by lifting structural properties of compositions from single objects – single words, single posets, single pomsets – to power sets. In fact, both liftings are instances of the classical Stone-type duality between
$(n+1)$
-ary relations and n-ary operators (or modalities) on power set boolean algebras that is due to Jónsson and Tarski (Reference Jónsson and Tarski1951), Goldblatt (Reference Goldblatt1989), here in the special case of ternary relations and binary operators.
In the word model, for instance, the ternary relations on words are
$u=v\cdot w$
and
$u\in v\| w$
. The binary operators on power sets are
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU2.png?pub-status=live)
In the poset model, the first ternary relation on posets is
$P=P_1\cdot P_2$
provided
$P_1\cdot P_2$
is defined (more precisely,
$P_1\cdot P_2$
is disjoint union, which is only defined if
$P_1$
and
$P_2$
are disjoint, with additional arrows from each element of
$P_1$
to each element of
$P_2$
). The second ternary relation is
$P\preceq P_1\| P_2$
provided
$P_1\| P_2$
is defined (
$P_1\| P_2$
is disjoint union and the relation
$\preceq$
holds if there is a bijective order morphism from
$P_1\| P_2$
to P). The binary operators on power sets are
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU3.png?pub-status=live)
Both constructions generalise further to weighted words and weighted po(m)sets (Droste et al. Reference Droste, Kuich and Vogler2009) and beyond that – yet ignoring interchange – to arbitrary functions
$X\to Q$
from partial monoids or ternary relations over X into quantales Q (Dongol et al. Reference Dongol, Hayes and Struth2016, Reference Dongol, Hayes and Struth2021). The binary operations on function spaces
$Q^X$
then become convolutions of the form
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU4.png?pub-status=live)
where
$\bullet$
indicates composition in Q, and the convolution algebra on the function space
$Q^X$
is again a quantale.
This raises the question how concurrent quantales and similar structures on
$Q^X$
could be constructed from ternary relations on X and value quantales Q, and in particular how the above lax interchange law and its variants on
$Q^X$
arise from properties in X and Q. This question is not only of structural interest. Operationally, checking relational properties on X tends to be much simpler than those on
$Q^X$
, and the first activity supports a generic construction recipe for models of concurrent quantales and Kleene algebras if the construction of
$Q^X$
from X and Q is uniform. The rest of this article investigates this question.
First, in Section 2, we summarise the previous approach to relational convolution in
$Q^X$
(Dongol et al. Reference Dongol, Hayes and Struth2021), where X is a set equipped with a ternary relation and Q a quantale, and recall the basic lifting construction, namely that
$Q^X$
forms a quantale if X satisfies a relational associativity law and Q is a quantale. Further,
$Q^X$
forms a unital quantale if a suitable set of relational units is present in X and Q is itself unital.
In Section 3, we derive novel correspondence results between relational interchange laws on X and algebraic interchange laws on Q and
$Q^X$
. These are indeed modal correspondences that generalise those between relational structures and boolean algebras with operators in the context of Jónsson-Tarski duality to the weighted setting. Proposition 11 shows that interchange laws on X and Q give rise to those on
$Q^X$
. In addition, under mild nondegeneracy conditions on Q, interchange laws on Q and
$Q^X$
give rise to those on X (Proposition 14). Similarly, under mild nondegeneracy conditions on X, interchange laws on X and
$Q^X$
give rise to those on Q (Proposition 15). In combination, these correspondence triangles show that interchange laws on X and Q are precisely what is needed to obtain such laws on
$Q^X$
.
Additional correspondence triangles are presented in Section 4. First, we prove such results for sets of relational units in X and quantalic units on Q and
$Q^X$
and show how the above nondegeneracy conditions simplify in the presence of units. Secondly, we show how correspondences for (semi-)associativity and commutativity laws arise from those for interchange.
Equipped with these correspondences, we then introduce relational interchange monoids and interchange quantales in Section 5 and summarise the individual correspondences for these structures in the main theorem of this article (Theorem 5). It yields a correspondence triangle between relational interchange monoids X, interchange quantales Q and interchange quantales
$Q^X$
. Interchange quantales are essentially concurrent quantales without commutativity assumptions on the ‘parallel’ composition. In addition, we prove a generalised Eckmann-Hilton argument, which shows that certain small interchange laws, as known from concurrent Kleene algebras, are subsumed by the one presented above.
In light of the duality between
$(n+1)$
-ary relations and boolean algebras with n-ary operators, the natural question arises how a more general duality between X, Q and
$Q^X$
can be obtained. Partial results are already known (Harding et al. Reference Harding, Walker and Walker2018). We leave the general case for future work.
In Section 6, we specialise Theorem 5 to a correspondence triangle for interchange semirings and Kleene algebras and to concurrent semirings and Kleene algebras, which requires finiteness and grading assumptions on ternary relations (Theorem 6).
Finally, in Sections 7–10 we apply the general constructions from Theorems 5 and 6 to the examples from concurrency theory mentioned above. In Section 7, we construct the concurrent quantale and Kleene algebra of Q-weighted shuffle languages using an isomorphism between relational monoids and certain multimonoids (Galmiche and Larchey-Wendling Reference Galmiche and Larchey-Wendling2006; Kudryavtseva and Mazorchuk Reference Kudryavtseva and Mazorchuk2015). Shuffle languages are used, for instance, in the rely-guarantee method for shared-variable concurrency (de Roever et al. Reference de Roever, de Boer, Hannemann, Hooman, Lakhnech, Poel and Zwiers2001). In Sections 9 and 10, we construct the concurrent quantale and Kleene algebra of Q-weighted digraph languages and those of isomorphism classes of finite digraphs. To prepare for these constructions, Section 8 introduces partial interchange monoids, which are special cases of relational interchange monoids. It then suffices to show that graphs under the operations
$\cdot$
and
$\|$
outlined form such monoids. The specialisation to (weighted) partial orders and partial words or pomsets, which are isomorphism classes of labelled partial orders, is then straightforward. Pomsets languages yield partial order semantics of true concurrency (Vogler Reference Vogler1992), for instance in the context of Petri nets. They are receiving renewed attention for verifying weak memory models, where ad hoc methods currently seem to proliferate.
In sum, our results yield uniform construction principles for (weighted) concurrent quantales and Kleene algebras from simpler structures such as ternary relations, multimonoids and similar ordered monoidal structures: to construct such convolution algebras or power set algebras it suffices to know the underlying relational structure, the rest is then automatic. This may certainly be of use for constructing Kleene-algebraic semantics for real-world concurrent programmes, as mentioned. Beyond that, our results provide valuable structural insights for future duality results.
2. Relational Convolution: A Summary
In this section, we summarise the general approach to the construction of quantale-valued convolution algebras from ternary relations.
Relational convolution (Dongol et al. Reference Dongol, Hayes and Struth2021) has its origins in Jónsson and Tarski’s boolean algebras with operators (Jónsson and Tarski Reference Jónsson and Tarski1951), Rota’s foundations of combinatorics (Rota Reference Rota1964), Schützenberger’s approach to language theory (Berstel and Reutenauer Reference Berstel and Reutenauer1984; Droste et al. Reference Droste, Kuich and Vogler2009), Goguen’s L-fuzzy maps and relations (Goguen Reference Goguen1967) and arguably (Connes Reference Connes1995) Heisenberg’s first article on the foundations of quantum mechanics (Heisenberg Reference Heisenberg1925). The group algebras used in the representation theory of finite groups (Lang Reference Lang2003) and, more generally, category algebras are other sources of inspiration.
Here, convolution is an operation in the algebra of functions
$X\to Q$
from a set X into a complete lattice Q equipped with an additional operation
$\bullet$
of composition and constrained by a ternary relation R on X, which we identify with a predicate of type
$X\to X\to X\to \mathbb{B}$
. It is defined as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU5.png?pub-status=live)
where the right-hand side abbreviates
$\bigvee \{f\, y \bullet g\, z\mid R^x_{yz}\}$
and
$\bigvee$
denotes the supremum in Q. It is well known that the function space
$Q^X$
forms a complete lattice when the order and sups in Q are extended pointwise (Abramsky and Jung Reference Abramsky and Jung1994). Yet the convolution
$\ast$
need not satisfy any algebraic laws on
$Q^X$
, unless conditions on R and Q are imposed.
This situation is reminiscent of modal correspondence theory, where conditions on relational Kripke frames force algebraic properties of modal operators and vice versa, or more generally to dualities between categories of
$(n+1)$
-ary relational structures and those of boolean algebras with n-ary operators (Jónsson and Tarski Reference Jónsson and Tarski1951; Goldblatt Reference Goldblatt1989). In fact, R is a ternary relational structure and
$\ast$
a binary modality similar to the product of the Lambek calculus (Lambek Reference Lambek1958), the chop operation of interval temporal logics (Moszkowski and Manna Reference Moszkowski and Manna1983) or the separating conjunction of separation logic (O’Hearn et al. Reference O’Hearn, Reynolds and Yang2001), but generalised to a Q-weighted setting.
Example 1. Let X be an incidence algebra of closed intervals (over
$\mathbb{R}$
, say) (Rota Reference Rota1964), with interval composition [p,q][r,s] equal to [p,s] if
$q=r$
, and undefined otherwise. Let
$R^x_{yz}$
hold if the composition of intervals y and z is defined and equal to x. Let
$Q=\mathbb{B}$
be the (complete) lattice of booleans with
$\bullet$
as meet. Functions
$X\to \mathbb{B}$
are then predicates ranging over intervals in X. The predicate
$f\ast g$
holds of an interval x whenever it can be decomposed into a prefix interval y and a suffix interval z such that
$x=yz$
and
$f\, y$
and
$g\, z$
both hold. This captures the semantics of the binary chop modality of interval temporal logics (Moszkowski and Manna Reference Moszkowski and Manna1983).
It is well known that chop is associative in the convolution algebra
$\mathbb{B}^X$
due to associativity of meet in
$\mathbb{B}$
and associativity of interval fusion in X – up to definedness.
Definition 2 (Rosenthal 1990) A quantale Q is a complete lattice equipped with an associative composition
$\bullet$
that preserves sups in both arguments: for all
$a,b\in Q$
and
$A,B\subseteq Q$
,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU6.png?pub-status=live)
A quantale is unital if
$\bullet$
has a unit 1.
We write 0 for the least and
$\top$
for the greatest element of Q with respect to the lattice order. Sup-preservation implies that
$x \bullet 0 = 0 = 0 \bullet x$
.
Convolution is then associative in
$Q^X$
if the relational structure (X,R) is relationally associative:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU7.png?pub-status=live)
This yields one direction of a correspondence between the ternary relation or Kripke frame R and convolution
$\ast$
viewed as a binary modality. Similarly, convolution is commutative in
$Q^X$
if (X,R) is relationally commutative:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU8.png?pub-status=live)
To construct a unit of convolution, we first equip (X,R) with a set of units. Their definition is similar to those in an object-free category (Mac Lane Reference Mac Lane1998). An element
$e\in X$
is a left relational unit in (X,R) if
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU9.png?pub-status=live)
Similarly, x is a right relational unit in (X,R) if
$\exists x\in X.\ R^x_{xe}$
and
$\forall x,y\in X.\ R^x_{ye}\Rightarrow x =y$
.
We write E for the set of all left and right relational units of (X,R) and call this relational structure unital if every element of X has a left and right unit.
Then, if X, or more precisely (X,R), is unital with set of relational units E and if the quantale Q is unital with unit of composition 1, then convolution has the indicator function
$\mathit{id}_E:X\to Q$
as its left and right unit, where
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU10.png?pub-status=live)
In particular, each
$x\in X$
has a unique left unit and a unique right one if the relational structure (X,R) is relationally associative (Cranch et al. Reference Cranch, Doherty and Struth2020). With the Kronecker delta
$\delta_x: X\to \mathbb{B}$
defined as
$\delta_x\, y$
equal to 1 if
$x=y$
and to 0 otherwise, therefore,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU11.png?pub-status=live)
The convolution algebras on
$Q^X$
can now be described as follows.
Definition 3.
-
(1) A relational magma (X,R) is a set X equipped with a ternary relation R.
-
(2) A relational semigroup is a relationally associative relational magma.
-
(3) A relational monoid is a unital relational semigroup.
Relational monoids are well known in category theory. They are monoids in the monoidal category
$\mathbf{Rel}$
with the standard tensor.
Theorem. (Reference Dongol, Hayes and StruthDongol et al. 2021)
-
(1) If X is a relational semigroup and Q a quantale, then
$Q^X$ is a quantale.
-
(2) If R is an abelian relational semigroup and Q an abelian quantale, then
$Q^X$ is an abelian quantale.
-
(3) If R is a relational monoid and Q is a unital quantale, then
$Q^X$ is a unital quantale.
Example 4. Let
$(X^\ast, \cdot,\varepsilon)$
be the free monoid over X. For
$u,v,w\in X^\ast$
define
$R^u_{vw} \Leftrightarrow u = v\cdot w$
. This makes X a relational monoid with
$E=\{\varepsilon\}$
. For any quantale Q, the convolution algebra is the quantale
$Q^{X^\ast}$
of Q-weighted languages over X and
$\mathbb{B}^{X^\ast}$
is the usual language quantale over X. Convolution is (weighted) language product. This construction generalises to arbitrary monoids.
Words are finitely decomposable in that each word can only be split into finitely many prefix/suffix pairs. All sups in convolutions therefore remain finite and Q can be replaced by an arbitrary semiring. This yields the usual weighted languages formalised as rational power series in the sense of Schützenberger and Eilenberg (Berstel and Reutenauer Reference Berstel and Reutenauer1984; Droste et al. Reference Droste, Kuich and Vogler2009).
Example 5. Let X be a set. Define the composition
$\cdot :(X\times X)\times (X\times X)\to (X\times X)$
such that
$(a,b)\cdot (c,d)$
is equal to (a,d) if
$b=c$
and undefined otherwise. For
$x,y,z\in X\times X$
, let
$R^x_{yz}$
hold if and only if
$y\cdot z$
is defined and equal to x, and let
$E=\{(a,a)\mid a \in X\}$
be the identity relation on X. This turns
$(X\times X,R,E)$
into a relational monoid, which is also known as pair groupoid. For any quantale Q, the convolution algebra
$Q^{X\times X}$
over the pair groupoid on X is the quantale of Q-valued binary relations over X, while
$\mathbb{B}^{X\times X}$
is simply the quantale of binary relations over X. Convolution is (weighted) relational composition. This convolution quantale is studied in Goguen’s seminal article on fuzzy relations (Goguen Reference Goguen1967).
The construction specialises first to quantales of weighted closed intervals in linear orders, as in Example 1, which can be represented by ordered pairs (a,b) in which
$a\le b$
. Categorically, it is given by a poset (X,R), for
$R\subseteq X\times X$
, regarded as a posetal category. This makes incidence algebras a special case of a category algebra.
A second specialisation are possibly infinitary matrices with matrix product as convolution, as studied by Heisenberg (Reference Heisenberg1925). When X is finite, (semi)rings and similar algebras can be taken again as value algebras. Alternatively, it can be assumed that
$f(x)\bullet g(z)=0$
for all buy finitely many
$(x,y)\in X\times X$
. Binary relations are of course boolean-valued matrices with relational composition as matrix product.
A third specialisation, using the one-object groupoid, yields group algebras if convolution is finitely supported in the sense just explained.
Example 6. As a generalisation of incidence algebras, one can define a ternary relation
$R^x_{yz}$
on the arrows of an arbitrary (small) category if arrows y and z can be composed and are equal to x. Further, one can define E as the set of all identity arrows. It is then easy to see that the arrows of any (small) category form a relational monoid (Cranch et al. Reference Cranch, Doherty and Struth2020) that can be lifted to a convolution quantale. This can be specialised to a category algebra into a (semi)ring or similar structure if convolution is finitely supported.
Example 7. Define a composition
$\oplus$
on the set of partial functions or heaplets of type
$X\rightharpoonup Y$
such that
$f \oplus g$
is
$f\cup g$
if
$\mathit{dom}\, f\cap \mathit{dom}\, g =\emptyset$
and undefined otherwise. The set
$Y^X$
can be used to model the heap memory area with addresses in X, values in Y and
$\oplus$
as heaplet addition. For
$f,g,h:X\rightharpoonup Y$
let
$R^f_{gh}$
hold if and only if
$g\oplus h$
is defined and equal to f. Then, R is relationally associative and commutative; the empty partial function (which is undefined everywhere) is its relational unit. For any abelian quantale Q, the convolution algebra is the abelian quantale
$Q^{(Y^X)}$
of Q-weighted assertions of separation logic over the set
$Y^X$
of heaps. Convolution is separating conjunction (Dongol et al. Reference Dongol, Hayes and Struth2016). The standard assertion algebra of separation logic is formed by
$\mathbb{B}^{(Y^X)}$
. The abelian relational monoid of heaplets is not a category (Cranch et al. Reference Cranch, Doherty and Struth2020).
3. Correspondences for Interchange Laws
Theorem 2 generalises to correspondences between quantales with two compositions and
related by seven interchange laws, as they appear in concurrent Kleene algebras, and relational structures with suitable relational constraints. The choice of the interchange laws is explained further in Section 5; the six small interchange laws are precisely those that can be derived from the seventh in the presence of suitable units, using a generalised Eckmann-Hilton argument. We start with the relational structures.
Definition 8. A relational bi-magma is a set X equipped with two ternary relations
and
. It is unital if
and
are unital with sets of relational units
and
, respectively.
The constraints considered on a bi-magma X are, for
$t,u,v,w,x,y,z\in X$
, the relational interchange laws
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn1.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn2.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn3.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn4.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn5.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn6.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn7.png?pub-status=live)
They are represented by the relationships between the trees in X shown in Figure 1.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_fig1.png?pub-status=live)
Figure 1. Trees representing the relational interchange laws.
Next, we turn to quantales. As their monoidal structure emerges in our constructions, we generalise.
Definition 9.
-
(1) A prequantale (Rosenthal Reference Rosenthal1990) is a structure
$(Q,\le,\bullet)$ such that
$(Q,\le)$ is a complete lattice and the binary operation
$\bullet$ on Q preserves sups in both arguments. It is unital if
$\bullet$ has unit 1.
-
(2) A bi-prequantale is a structure
such that
and
are both prequantales. It is unital if
has unit
and
unit
.
A quantale is thus nothing but a prequantale with associative composition.
For
$a,b,c,d\in Q,$
we define the algebraic interchange laws
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn8.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn9.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn10.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn11.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn12.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn13.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn14.png?pub-status=live)
The interchange laws of odd index are the most significant laws of concurrent Kleene algebra (Hoare et al. Reference Hoare, Möller, Struth and Wehrman2011). Those of even index need to be added if is not commutative.
Interestingly, the syntax trees of these laws in Q, as shown in Figure 2, have the structure of the trees representing the relational interchange laws in X in Figure 1. The following example provides some intuition.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_fig2.png?pub-status=live)
Figure 2. Syntax trees of the algebraic interchange laws.
Example 10. Let
$X=Q$
,
and
. Then, for instance,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU12.png?pub-status=live)
and likewise for the other terms in interchange laws. The relational and algebraic interchange laws then translate into each other. For instance, for (RI7) and (I7),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU13.png?pub-status=live)
that is,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU14.png?pub-status=live)
With this particular encoding, the relational interchange laws simply represent the algebraic ones.
In general, however, the relationship between relational and algebraic convolution is more complex. The left-to-right translation in Example 10 can therefore fail.
For functions
$f,g:X\to Q,$
we define the convolutions
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU15.png?pub-status=live)
They can be represented using trees in X, Q and
$Q^X$
as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU16.png?pub-status=live)
Convolution thus translates trees with the same structure in X and Q into trees in
$Q^X$
.
One can then prove modal correspondences between relational and algebraic interchange laws. First, we show that relational interchange laws in X and algebraic interchange laws in Q yield algebraic interchange laws in the convolution algebra on
$Q^X$
. This generalises the well-known modal correspondence from ternary Kripke frames to binary modal operators, which occur for instance in substructural logics, first to more than one relation and second to a weighted setting.
Proposition 11. Let X be a relational bi-magma and Q a bi-prequantale. Then, (
$RI_k$
) in X and (
$I_k$
) in Q imply (
$I_k$
) in
$Q^X$
, for each
$1\leq k\leq 7$
.
Proof. Suppose that holds in X and further that
holds in Q. Then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU17.png?pub-status=live)
proves (I7) in
$Q^X$
. Alternatively, using trees,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU18.png?pub-status=live)
The proofs for the small interchange laws are similar and left to the reader. In particular, that of (I3) from (RI3) and that of (I4) from (RI4) are related by opposition: one can be obtained from the other by swapping the operands of ,
,
and
and the lower indices of
and
, that is, by reversing the algebraic syntax trees in Q and the trees in X for the relational interchange laws. The same holds for the proof of (I5) from (RI5) and that of (I6) from (RI6).
The correspondences from X and Q to
$Q^X$
form one of three kinds of ‘two-cells’ in correspondence triangles. They show how Q-valued interchange laws arise in convolution algebras from relational interchange laws and interchange laws on a suitable value algebra.
Next we show the remaining two, namely that, under mild nondegeneracy conditions on Q, algebraic interchange laws in
$Q^X$
force relational interchange laws in X, and that under mild nondegeneracy conditions on X, algebraic interchange laws in
$Q^X$
force algebraic interchange laws in Q. We begin with a definition and some lemmas.
For all
$x,y\in X$
and
$a\in Q$
, we define the function
$\delta^a_x:X\to Q$
by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU19.png?pub-status=live)
and the function
$(-\mid -):Q\to\mathbb{B}\to Q$
, for all
$a\in Q$
and
$P:\mathbb{B}$
, by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU20.png?pub-status=live)
Obviously,
$\delta^a_x\, y = (a\mid x = y)$
.
Lemma 12. Let X be a relational bi-magma and Q a bi-prequantale. For all
$a,b,c,d\in Q$
and
$x,t,u,v,w\in X$
,
-
(1)
-
(2)
-
(3)
-
(4)
-
(5) properties (1)–(4) hold with colours interchanged.
Proof. For (4), we use the proof of Proposition 11 to calculate
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU21.png?pub-status=live)
Alternatively, using trees,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU22.png?pub-status=live)
All other proofs are similar and left to the reader. In particular, (3) follows from (2) by opposition.
The next lemma shows that the trees represented by the relational interchange laws can be expressed in terms of deltas and convolution in the presence of the following mild nondegeneracy conditions on Q:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn15.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn16.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn17.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn18.png?pub-status=live)
Lemma 13. Let X be a relational bi-magma and Q a bi-prequantale. Then
-
(1)
, and the converse implication follows from (D1),
-
(2)
and the converse implication follows from (D2),
-
(3)
and the converse implication follows from (D3),
-
(4)
and the converse implication follows from (D4),
-
(5) properties (1)–(5) hold with colours interchanged, including in the nondegeneracy conditions.
Proof. For (4), suppose . Then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU23.png?pub-status=live)
by Lemma 12(4). For the converse implication, using the elements
$a,b,c,d\in Q$
that are guaranteed to satisfy
by (D4),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU24.png?pub-status=live)
by Lemma 12(4) and therefore .
All other proofs are similar and left to the reader. (3) follow from (2) by opposition.
Intuitively, convolutions of delta functions represent trees in X in the function space
$Q^X$
by creating their ‘shadows’ in Q – which requires nondegeneracy. The case of Lemma 13(4) and its dual are shown in Figure 3.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_fig3.png?pub-status=live)
Figure 3.
representing
using
in Lemma 13(4) together with its dual.
We are now prepared to prove our second correspondence result, namely that algebraic interchange laws in
$Q^X$
force relational interchange laws in X subject to mild nondegeneracy conditions on Q.
Proposition 14. Let X be a relational bi-magma and Q a bi-prequantale. Then
$(D_{\lceil\frac{k}{2}\rceil})$
in Q and
$(I_k)$
in
$Q^X$
imply
$(RI_k)$
in X, for each
$1\le k\le 7$
.
Proof. Suppose
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU25.png?pub-status=live)
for some
$a,b,c,d\in Q$
and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU26.png?pub-status=live)
Then, using Lemma 13(4),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU27.png?pub-status=live)
proves
$(RI_7)$
. The remaining proofs are similar. Those for
$(RI_3)$
and
$(RI_4)$
and those for
$(RI_5)$
and
$(RI_6)$
are related by opposition.
Finally, we prove the third correspondence result for interchange laws, namely that algebraic interchange laws on
$Q^X$
force those on Q, subject to the following mild nondegeneracy conditions on X:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn19.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn20.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn21.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn22.png?pub-status=live)
.
Proposition 15. Let X be a relational bi-magma and Q a bi-prequantale. Then
$(RD_{\lceil\frac{k}{2}\rceil})$
in X and
$(I_k)$
in
$Q^X$
imply
$(I_k)$
in Q, for each
$1\le k\le 7$
.
Proof. Suppose for some
$a,b,c,d\in Q$
and let
for some
$t,u,v,w\in X$
. Then, using Lemma 13(4),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU28.png?pub-status=live)
proves
$(I_7)$
in Q. The remaining proofs are similar. Those for
$(RD_3)$
and
$(RD_4)$
and those for
$(RD_5)$
and
$(RD_6)$
are related by opposition.
It may be helpful to check the proofs of Propositions 14 and 15 with the diagrams in Figure 3. The nondegeneracy conditions are necessary. Indeed, if Q is a singleton set, then so is
$Q^X$
and hence it will obey all axioms independently of X. Similarly, if all products on Q vanish, then
$Q^X$
will automatically satisfy many axioms as all convolutions will be trivial.
This finishes the proof of the correspondence triangles for interchange laws in X, Q and
$Q^X$
. The result of Proposition 11 shows that interchange laws in X and Q give us interchange laws in
$Q^X$
for free; Propositions 14 and 15 show us that all interchange laws in the convolution algebra arise this way. To construct a convolution algebra satisfying an interchange law, it therefore suffices to find a suitable relational structure satisfying a relational interchange law, which is often much easier.
4. Further Correspondences
The next step towards modal correspondence results for concurrent quantales and Kleene algebras consists in the study of correspondence triangles for units and the monoidal structure on a quantale, completing those outlined in Section 2.
We start with units. When the relational bi-magma X and the bi-prequantale Q are both unital, units can be defined in
$Q^X$
as in Section 2:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU29.png?pub-status=live)
Theorem 2 then shows that
$Q^X$
is a unital quantale if Q is a unital quantale and both compositions are associative and unital in X. We restate the three kinds of correspondences for units in the weaker setting of relational magmas and prequantales.
Proposition 16. Let X be a relational magma and Q a prequantale.
-
(1) If X and Q are unital, then so is
$Q^X$ .
-
(2) If
$Q^X$ is unital and
$1\neq 0$ in Q, then so is X.
-
(3) If
$Q^X$ is unital and
$E\neq \emptyset$ in X, then so is Q.
Proof. In the following we write
$\delta_x$
and likewise for
$\delta^1_x$
.
-
(1) If X and Q are unital, then
\begin{align*}(f\ast \mathit{id}_E)\, x&=\bigvee \{f\, y \bullet \delta_e\, z \mid R^x_{yz} \land E^e\}\\&=\bigvee \{f\, y \bullet 1 \mid \exists e.\ R^x_{ye} \land E^e\}\\&=(f\, x \mid \exists e.\ R^x_{xe} \land E^e)\\&= f\, x,\end{align*}
-
(2) If
$\mathit{id}_E$ is the right unit in
$Q^X$ , then
\begin{equation*}(1\mid (y=x))= \delta_y\, x= (\delta_y\ast \mathit{id}_E)\, x= (1\mid \exists e.\ R^x_{ye} \land E^e). \end{equation*}
$1\neq 0$ . Then,
$x=y$ implies
$\exists e.\ R^x_{xe} \land E^e$ , the existence axiom for right relational units, and
$\exists e.\ R^x_{ye} \land E^e$ implies that
$x=y$ , the uniqueness axiom. The proofs for left units follow by opposition.
-
(3) If
$\mathit{id}_E$ is the right unit in
$Q^X$ , then
\begin{equation*} a\bullet 1= (a\bullet 1\mid \exists e.\ R^x_{xe} \land E^e)=\bigvee\{\delta_x\, x \mid \exists e.\ R^x_{xe} \land E^e\}= (\delta^a_x \ast \mathit{id}_E)\, x= \delta^a_x\, x= a \end{equation*}
In the presence of non-trivial units in X and Q, the nondegeneracy conditions for interchange laws in Propositions 14 and 15 simplify. Condition (D1) becomes trivial with , condition (D2) with
and condition (D3) by opposition. Condition (D4) reduces to
but remains non-trivial. It becomes trivial when
. It is easy to check that the nondegeneracy conditions (RD1)–(RD3) become trivial in a similar way, using the fact that
holds for all
and
for all
. Once again, (RD4) becomes trivial when
.
Corollary 17. Let X be a unital relational bi-magma satisfying and Q a unital bi-prequantale satisfying
. Then
$(I_k)$
holds in
$Q^X$
if and only if
$(I_k)$
holds in Q and
$(RI_k)$
holds in X, for each
$1\le k\le 7$
.
In the only-if directions, functions
$\delta_x$
can now be used. This leads to a simpler relationship between deltas and ternary relations than in Lemma 13.
Corollary 18. Let X be a relational magma and Q a unital prequantale with
$1\neq 0$
. Then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU33.png?pub-status=live)
It is therefore compelling to see
$\mathbb{B}$
as the sublattice over
$\{0,1\}$
of Q and write
$R^x_{yz} = (\delta_y\ast\delta_z)\, x$
or even
$(f\ast g)\, x = \bigvee_{y,z} f\, y \bullet g\, z \bullet R^x_{yz}$
, similar to a coend. Figure 4 shows how the presence of units affects the right-hand term in (RI7).
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_fig4.png?pub-status=live)
Figure 4. Nondegeneracy condition (D4) in the presence of units.
Next, we present a correspondence result for relational units that is useful in Section 5.
Lemma 19. Let X be a unital bi-magma and Q a unital bi-prequantale.
-
(1) If
in X and
in Q, then
in
$Q^X$ .
-
(2) If
in
$Q^X$ and
in Q, then
in X.
-
(3) If
in
$Q^X$ and
in X, then
in Q.
Proof.
-
(1) Let
and
. Then,
, for all
$x\in X$ , and therefore
.
-
(2) Let
. If
, then
, for all
$x\in X$ , and therefore
.
-
(3) Let
and
. Then,
, for all
$x\in X$ .
Corollary 20. Let X be a unital bi-magma with and Q a unital bi-prequantale with
. Then
in
$Q^X$
if and only
in X and
in Q.
Because of the symmetry in the definitions of unital bi-magmas and bi-prequantales, Lemma 19 and Corollary 20 hold with colours swapped. We do not spell them out explicitly.
Next we turn to correspondence triangles for relational monoids and quantales. In fact, the correspondences between interchange laws can be specialised to obtain the associativity laws for a quantale. The relational interchange law (RI3), , becomes the relational semi-associativity law
$\exists y. R^x_{uy} \wedge R^y_{vw}\Rightarrow \exists y.\ R^y_{u\, v} \wedge R^x_{y\, w}$
when colours are switched off; (RI4) translates into the opposite implication. Both laws establish relational associativity. Similarly, the interchange laws (I3) and (I4),
and
, become the semi-associativity laws
$a\bullet (b\bullet c)\le (a\bullet b)\bullet c$
and
$(a\bullet b)\bullet c\le a \bullet (b\bullet c)$
. This yields the following corollary to Propositions 11, 14 and 15.
Corollary 21. Let X be a relational magma and Q a prequantale.
-
(1) If X is relationally associative and Q associative, then
$Q^X$ is associative.
-
(2) If
$Q^X$ is associative and some
$a,b,c\in Q$ satisfy
$a\bullet (b\bullet c)\neq 0\neq (a\bullet b) \bullet c$ , then X is relationally associative.
-
(3) If
$Q^X$ is associative and some
$x,y,z,u,v,w\in X$ satisfy
$R^x_{uz}$ ,
$R^x_{yw}$
$R^z_{vw}$ and
$R^y_{uv}$ , then Q is associative.
Similar correspondences between semi-associativity laws are straightforward, but not as interesting for our purposes. In the presence of units, Corollary 21 simplifies further.
Corollary 22. Let X be a unital relational magma satisfying
$E\neq \emptyset$
and Q a unital prequantale satisfying
$1\neq 0$
. Then,
$Q^X$
is associative if and only if X is relationally associative and Q is associative.
Finally, the correspondence triangles between interchange laws can also be specialised to commutativity laws. The relational interchange law (RI2), , specialises to
$R^x_{uv} \Rightarrow R^x_{vu}$
when colours are switched off while the interchange law (I2),
, becomes
$a\bullet b\le b\bullet a$
. This yields another corollary to Propositions 11, 14 and 15.
Corollary 23. Let X be a relational magma and Q a prequantale.
-
(1) If X is relationally commutative and Q abelian, then
$Q^X$ is abelian.
-
(2) If
$Q^X$ is abelian and there exist
$a,b\in Q$ with
$a\bullet b\neq 0$ , then X is relationally commutative.
-
(3) If
$Q^X$ is abelian and there exist
$x,y,z\in X$ with
$R^x_{yz}$ , then Q is abelian.
In the presence of units, this corollary simplifies further.
Corollary 24. Let X be a unital relational magma satisfying
$E\neq \emptyset$
and Q a unital quantale satisfying
$1\neq 0$
. Then
$Q^X$
is abelian if and only if X is relationally commutative and Q abelian.
The correspondence triangles in this section thus extend those for interchange laws in a compositional way to units and monoidal laws by specialisation. We summarise them in the following sections to correspondence triangles for concurrent quantales and Kleene algebras.
5. Relational Interchange Monoids and Interchange Quantales
We now start shifting the focus from correspondence theory to construction recipes for quantales with interchange laws, and in particular concurrent quantales. To avoid nondegeneracy conditions, we assume that relational magmas and quantales are unital and impose an order between units: and
.
Yet first we prove a weak variant of the classical Eckmann-Hilton argument (Eckmann and Hilton Reference Eckmann and Hilton1962). Its standard version shows that if a unital bi-magma, a set equipped with composition and unit
and composition
with unit
, satisfies the strong interchange law
, then
,
and
coincide, and they are associative and commutative. We show how these properties generalise if strong interchange is weakened to (I7). In this case, all interchange laws with lower indices become derivable. This of course requires ordered bi-magmas, where the underlying set is partially ordered and the two compositions l and l preserve the order in both arguments.
Lemma 25 (weak Eckmann-Hilton) Let be an ordered bi-magma in which (I7) holds. Then
, and (I1)–(I6) are derivable whenever
.
The proofs, like the classical Eckmann-Hilton ones, substitute l and l in (I7) and are straightforward. Analogous results hold for relational bi-magmas because of the various correspondence results in the previous section and Lemma 25.
Lemma 26. Let be a unital relational bi-magma in which (RI7) holds. Then
, and (RI1)–(RI6) hold whenever
.
Proof. First, for all
$e\in S$
, and with (RI7) in the fourth step,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU34.png?pub-status=live)
Second, let and assume (RI7). Then,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU35.png?pub-status=live)
proves (RI6). The proofs of (RI1), (RI2), (RI3) and (RI5) from (RI7) are similar and left to the reader.
Next we package the correspondence results from previous sections using suitable algebraic structures and relate these with concurrent quantales and later with concurrent Kleene algebras.
Definition 27. A relational interchange monoid is a structure such that
and
are ordered relational monoids and the relational interchange law (RI7) holds.
Definition 28. An interchange quantale is a structure such that
and
are (unital) quantales, and the interchange law (I7) holds.
In light of Lemmas 25 and 26, we always assume that relational interchange monoids and interchange quantales have one single unit that is shared between the relations and compositions, respectively. The following result then summarises these two lemmas.
Corollary 29.
-
(1) In every relational interchange monoid, (RI1)–(RI6) are derivable.
-
(2) In every unital interchange quantale, (I1)–(I6) are derivable.
The correspondence results from Sections 3 and 4 can now be summarised in terms of interchange monoids and interchange quantales as well.
Theorem.
-
(1) If X is a relational interchange monoid and Q an interchange quantale, then
$Q^X$ is an interchange quantale.
-
(2) If
$Q^X$ is an interchange quantale and
$1\neq 0$ , then X is a relational interchange monoid.
-
(3) If
$Q^X$ is an interchange quantale and
$E\neq \emptyset$ , then Q is an interchange quantale.
Proof. The correspondence for associativity and units in the subquantales is given by Corollary 21 and Proposition 16; that for interchange between the subquantales is given by Propositions 11, 14 and 15.
Theorem 5 shows that, up to mild nondegeneracy assumptions, all interchange quantales of type
$X\to Q$
are obtained from a relational interchange monoid on X and an interchange quantale Q. To build such quantales, one should therefore look for relational interchange monoids, and the advantage is that fewer properties need to be checked.
Interchange quantales generalise concurrent quantales and are strongly related to concurrent Kleene algebras (Hoare et al. Reference Hoare, Möller, Struth and Wehrman2011). The difference is that here we do not assume that ‘parallel composition’ is commutative. Yet Theorem 5 adapts easily to the commutative case. For a concurrent quantale in
$Q^X$
, an interchange monoid X with relationally commutative
and an interchange quantale Q with commutative
is needed. A variant of Theorem 5 then follows from Corollaries 24 and 17. In particular, the nondegeneracy assumptions simplify to non-triviality assumptions for units and unit sets.
An interesting specialisation of Theorem 5 is the case of
$Q=\mathbb{B}$
, which forms an interchange quantale with both compositions being meet and both units of composition 1. In particular, in the booleans,
$0\neq 1$
. The interchange law (I7) holds trivially because
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU36.png?pub-status=live)
in any semilattice by associativity and commutativity of meet.
Corollary 30.
$\mathbb{B}^X\cong \mathcal{P}\, X$
is an interchange quantale if and only if X is a relational interchange monoid.
In this case, by Corollary 18 and Lemma 13, ,
and likewise for the other relational nondegeneracy conditions.
6. Interchange Kleene Algebras
We mentioned in Section 2 that in many classical convolution algebras, including Rota’s incidence algebras and the formal power series of Schützenberger and Eilenberg’s approach to formal languages, the underlying set X has a finite decomposition property (Rota calls partial orders with this property locally finite Rota Reference Rota1964). As infinite sups are then not needed to express convolutions, one can specialise quantales to semirings and Kleene algebras, and in particular concurrent Kleene algebras. We work out the details in this section.
Definition 31. A dioid is a semiring
$(S,+,\bullet,0,1)$
in which addition is idempotent.
Hence
$(S,+,0)$
is a sup-semilattice ordered by
$a\le b\Leftrightarrow a+b=b$
and least element 0. Moreover,
$\bullet$
preserves
$\le$
in both arguments. A quantale can thus be seen as a complete dioid.
Definition 32. An interchange semiring is a structure such that
and
are dioids, and the interchange law (I7) holds.
The six small interchange laws are of course derivable in this setting.
Definition 33.
-
(1) A Kleene algebra is a dioid with a unary star operation
$^\star$ that satisfies the unfold and induction axioms
\begin{align*} 1+a\bullet a^\star \le a^\star,\qquad c+a\bullet b\le b\Rightarrow a^\star \bullet c\le b,\\ 1+a^\star \bullet a\le a^\star, \qquad c+b\bullet a \le b\Rightarrow c\bullet a^\star \le b.\end{align*}
-
(2) An interchange Kleene algebra is a structure
such that
and
are Kleene algebras and (I7) holds.
We write
$(-)^\star$
instead of the usual
$(-)^\ast$
to distinguish the Kleene star from the convolution operation. Note also that equational variants of the two unfold axioms are derivable from the Kleene algebra axioms. We use them in proofs below.
To translate Theorem 5 from quantales to Kleene algebras, all sups must be guaranteed to be finite. This can be achieved by imposing that all functions have finite support or that the relations and
are finitely decomposable, that is, for each x the fibres
and
are finite. If this is the case, we call the relational interchange monoid finitely decomposable as well.
Theorem. If X is a finitely decomposable relational interchange monoid and S an interchange semiring, then
$S^X$
is an interchange semiring.
Proof. In the construction of the convolution algebra on
$S^X,$
it is routine to check that all sups remain finite.
It is easy to generalise these results from dioids to proper semirings that are ordered. We do not spell out the details. Beyond that it seems interesting to extend Theorem 6 to interchange Kleene algebras. First of all, every interchange quantale is an interchange Kleene algebra, because and
can be defined explicitly in this setting using Kleene’s fixpoint theorem:
and
satisfy the star axioms, with powers defined recursively in the standard way as
and
and likewise for
.
When infinite sups and the sup-preservation properties needed for Kleene’s fixpoint theorem are not available, another approach is needed. It is known (Armstrong et al. Reference Armstrong, Struth and Weber2014) that formal power series – functions of type
$\Sigma^\ast\to K$
, where
$\Sigma^\ast$
is the free monoid over the finite alphabet
$\Sigma$
and K a Kleene algebra – form Kleene algebras. In this setting, the star of a power series can be defined recursively as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU38.png?pub-status=live)
where
$\sum$
indicates a finite sup (Kuich and Salomaa Reference Kuich and Salomaa1986). The verification of the star axioms for power series uses structural induction over finite words. Yet this is not applicable for general ternary relations. Instead we use a notion of grading that has been introduced for arbitrary monoids by Sakarovitch (Reference Sakarovitch2003).
The function
$|-|:X\to\mathbb{N}$
is a grading on the relational monoid (X,R,E) if
$|x|>0$ for all
$x\in X$ such that
$x\notin E$ ,
$|x|=|y|+|z|$ whenever
$R^x_{yz}$ .
Then, (X,R,E) is graded if there is a grading on X. Thus, in a graded monoid,
$|e|=0$
if and only if
$e\in E$
.
Proposition 34. If
$(X,R,\{e\})$
is a graded, finitely decomposable, relational monoid and K a Kleene algebra, then
$K^X$
is a Kleene algebra with
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU39.png?pub-status=live)
Proof. We need to check the unfold and induction axioms of Kleene algebra. First, the axiom
$1+a^\star\bullet a \le a^\star$
is implied by the other axioms in any Kleene algebra and can be ignored (von Wright Reference von Wright2002): the first unfold axiom implies
$1\le a^\star$
and
$a+a\bullet a^\star\le a\bullet a^\star \le a^\star$
, so that
$1+a^\star\bullet a \le a^\star$
follows using the second induction axiom. Second,
$c+a\bullet b\le b\Rightarrow a^\star \bullet c\le b$
follows from the simpler formula
$a\bullet b\le b\Rightarrow a^\star \bullet b \le b$
, and likewise, by opposition,
$c+b\bullet a\le b\Rightarrow c \bullet a^\star \le b$
follows from
$b\bullet a\le b\Rightarrow b \bullet a^\star \le b$
, in any Kleene algebra (Kozen Reference Kozen1994). It thus remains to check that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU40.png?pub-status=live)
hold in the convolution algebra
$K^X$
, where
$\mathit{id}_e$
indicates the single unit e in E.
-
(1)
$\mathit{id}_e+f\ast f^\star = f^\star$ . If
$x=e$ , then
$(\mathit{id}_e + f \ast f^\star)\, e = 1 + (f\, e) \bullet (f\, e)^\star = (f\, e)^\star = f^\star \, e$ . Otherwise, if
$x\neq e$ ,
\begin{align*} (\mathit{id}_e + f \ast f^\star)\, x &= \sum \left\{f\, y\bullet f^\star\, z \mid R^x_{yz}\right\}\\&= f\, e \bullet f^\star \, x + \sum \left\{f\, y\bullet f^\star\, z \mid R^x_{yz}\land y \neq e\right\}\\&= f\, e \bullet f^\star \, e \bullet \sum \left\{f\, y\bullet f^\star\, z \mid R^x_{yz}\land y \neq e\right\} + \sum \left\{f\, y\bullet f^\star\, z \mid R^x_{yz} \land y\neq e \right\}\\&= \left(f\, e \bullet f^\star \, e + \mathit{id}_e\, e\right) \bullet \sum \left\{f\, y\bullet f^\star\, z \mid R^x_{yz} \land y \neq e\right\}\\&= \left(f\, e\right)^\star \bullet \sum \left\{f\, y\bullet f^\star\, z \mid R^x_{yz}\land y\neq e\right\}\\&=f^\star \, x.\end{align*}
-
(2)
$\left(\forall x.\ (f \ast g)\, x \le gx\right)\Rightarrow \left(\forall x.\ (f^\star \ast g)\, x \le gx\right)$ . We proceed by induction on
$|x|$ .
-
a. Let
$|x|=0$ and hence
$x=e$ . Then,
$(f^\star \ast g)\, e = (f\, e)^\star \bullet g\, e \le g\, e$ follows from the assumption
$f\, e\bullet g\, e\le g\, e$ and the first induction axiom of Kleene algebra.
-
b. Let
$|x|>0$ and therefore
$x\neq e$ . Then, by the induction hypothesis,
$\left(f\ast g\right)\, y\le g\, y$ holds for all y with
$|y|< |x|$ . In addition, the assumption implies that
\begin{equation*} \forall x,y,z.\ R^x_{yz} \Rightarrow f\, y\bullet g\, z\le g\, x, \end{equation*}
$(f\, e)^\star\bullet g\, x = f^\star\, e \bullet g\, x \le g\, x$ follows by star induction in K. With this property,
\begin{align*} (f^\star \ast g)\, x &= f^\star\, e \bullet g\, x +\sum \left\{f^\star\, e\bullet \sum\left\{f\, u \bullet f^\star\, v\mid R^y_{uv}\land u\neq e\right\} \bullet g\, z \mid R^x_{yz}\land y \neq e\right\}\\&= f^\star\, e \bullet \left(g\, x + \sum\left\{(f\, u \bullet f^\star\, v) \bullet g\, z \mid \exists y.\ R^y_{uv}\land R^x_{yz} \land u\neq e \wedge y\neq e\right\}\right)\\&= f^\star\, e \bullet \left(g\, x + \sum\left\{ f\, u \bullet (f^\star\, v \bullet g\, z) \mid \exists y.\ R^x_{uy}\land R^y_{vz} \land u\neq e \land y\neq e\right\}\right)\\&\le f^\star\, e \bullet \left(g\, x + \sum\left\{ f\, u \bullet (f^\star \ast g)\, y \mid R^x_{uy}\land u\neq e \right\}\right)\\&\le f^\star\, e \bullet \left(g\, x + \sum\left\{ f\, u \bullet g\, y\mid R^x_{uy} \right\}\right)\\&\le f^\star\, e \bullet \left(g\, x + (f\ast g)\, x\right)\\&= f^\star\, e \bullet \left(g\, x + g\, x\right)\\&\le g\, x.\end{align*}
$K^X$ . The second step applies distributivity laws in K; the third one associativity in X and K. The fourth step introduces a convolution as an upper bound, thus dropping the constraint
$y\neq e$ . The fifth step applies the induction hypothesis to y. The condition
$u\neq e$ guarantees that
$|y|<|x|$ . The sixth step applies the assumption; the last step the derived property.
-
(3)
$g \ast f \le g\Rightarrow g \ast f^\star \le g$ follows by opposition from (2).
The following theorem is then immediate.
Theorem. If X is a graded relational interchange monoid with unit e and K an interchange Kleene algebra, then
$K^X$
is an interchange Kleene algebra.
A generalisation of this theorem to more than one relational unit is left for future work; it seems to require a different proof technique.
We have already discussed the relationship between interchange quantales and concurrent quantales in Section 5, namely that concurrent quantales are interchange quantales in which is commutative and
. Similarly, concurrent semirings and concurrent Kleene algebras are interchange semirings and interchange Kleene algebras satisfying these two conditions. It is then a trivial consequence of Theorem 6, Corollaries 24 and 17 that
$S^X$
is a concurrent semiring if S is a concurrent semiring and X a finitely decomposable relational monoid. Similarly, by Theorem 6 and these corollaries,
$K^X$
is a concurrent Kleene algebra if K is a concurrent Kleene algebra and X a graded relational monoid.
In the setting of concurrent Kleene algebras (Hoare et al. Reference Hoare, Möller, Struth and Wehrman2011), Theorem 6 thus shows that for every graded relational interchange monoid with a single unit we get a concurrent Kleene algebra as a convolution algebra for free.
For
$Q=\mathbb{B}$
, the situation becomes much simpler. Then, convolution specialises to a product between sets,
$A\ast B= \{x \cdot y\mid x\in A, y\in B\}$
, as explained in the introduction; the star can be defined as a union of powers taken with respect to
$\ast$
. Many models under consideration form a fortiori quantales. Others that are finitely generated, such as generalisations of regular languages to posets and pomsets, form concurrent Kleene algebras, but not necessarily concurrent quantales. They are best characterised as subalgebras of concurrent quantales that are closed under operations such as the two compositions, finite unions and the two Kleene stars mentioned at the beginning of this section.
7. Weighted Shuffle Languages
This extended example shows how weighted shuffle languages (Droste et al. Reference Droste, Kuich and Vogler2009) can be constructed with our approach. Yet an alternative view on relational interchange monoids is helpful. Obviously, the sets
$\mathcal{P}\, (X\times X\times X)$
and
$X\times X\to \mathcal{P}\, X$
are isomorphic. A ternary relation R can thus be seen as a multioperation
$\odot:X\times X\to \mathcal{P}\, X$
defined by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU44.png?pub-status=live)
It can be extended Kleisli-style to
$\odot: \mathcal{P}\, S\to\mathcal{P}\, S\to \mathcal{P}\, S$
defined, for all
$A,B\subseteq X$
, by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU45.png?pub-status=live)
It follows that
$(A\odot B)\, x = \bigvee\{A\, y \wedge B\, z\mid R^x_{yz}\}$
if the sets A and B are identified with their indicator functions. This turns
$\odot$
into a convolution.
Overloading the multioperation
$\odot$
and its extension allows rewriting the relational interchange laws more compactly in algebraic form. It is easy to see that relational associativity becomes
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU46.png?pub-status=live)
the relational interchange law (RI7) becomes
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU47.png?pub-status=live)
Multisemigroups, multimonoids and other multialgebras have been studied in mathematics for many decades (Marty Reference Marty1934; Krasner Reference Krasner1983; Connes and Consani Reference Connes and Consani2010; Kudryavtseva and Mazorchuk Reference Kudryavtseva and Mazorchuk2015). In computer science, they appear in the semantics of separation logic (Galmiche and Larchey-Wendling Reference Galmiche and Larchey-Wendling2006) and, very naturally, the algebra of shuffle. We have developed a multioperational approach to convolution, but for modal quantales and Kleene algebras instead of concurrent ones, in a companion article (Fahrenberg et al. 2021 b), see also Cranch et al. (Reference Cranch, Doherty and Struth2020) for the relationship between relational monoids and multimonoids.
The shuffle of two words from an alphabet
$\Sigma$
is a multioperation
$\|: \Sigma^\ast \to \Sigma^\ast \to \mathcal{P}\,\Sigma^\ast$
. It can be defined recursively as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU48.png?pub-status=live)
where a and b are letters, v and w words, and the language product
$\cdot$
has been tacitly used in the second identity. It yields the shuffle or Hurwitz product
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU49.png?pub-status=live)
for
$A,B\subseteq \Sigma^\ast$
at language level.
To construct the quantale of Q-weighted shuffle languages using Theorem 5(1), it remains to check that the structure is a relational interchange monoid with shared unit
where
for word concatenation
$\cdot$
and
for shuffle.
It is of course straightforward to verify that is a relational monoid: it is in fact isomorphic to the free monoid
$(\Sigma^\ast,\cdot,\varepsilon)$
and checking the relational associativity and relational unit laws in the first monoid amounts to checking their algebraic counterparts in the second one. Verifying that
is a relational monoid – or
$(\Sigma^\ast,\|,\varepsilon)$
a multimonoid – and that the relational interchange law (RI7) holds – or the interchange law
$(w\|x)\cdot (y\| z) \subseteq (w\cdot y) \| (x\cdot z)$
with language product
$\cdot$
in the left-hand term and word concatenation
$\cdot$
in the right-hand one – is a surprisingly tedious exercise that requires nested inductions.
The result of this verification is summarised as follows.
Lemma 35.
M is a relational interchange monoid with unit
$\varepsilon$
and relationally commutative R.
The following corollary to Theorem 5(1) is then automatic.
Corollary 36. If Q is an interchange quantale with unit and
commutative, then
$Q^M$
is an interchange quantale with
commutative and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU50.png?pub-status=live)
The operation is similar to the standard convolution of formal power series, a Q-valued generalisation of the standard language product. The operation
generalises the standard shuffle product
$\|$
of languages to the Q-valued setting. Yet semirings or at least Kleene algebras are normally used as weight algebras. A grading on words is needed, and in this particular case, the length of words can be used. It is then obvious that
$\Sigma^\ast_n$
– the set of words of length n – is finite whenever
$\Sigma$
is finite. This yields the following corollary to Theorem 6.
Corollary 37. If K is an interchange Kleene algebra with unit 1 and commutative, then
$K^M$
is an interchange Kleene algebra with unit
$\delta_\varepsilon$
and
commutative.
As we have shared units and a commutative shuffle operation, the convolution algebras of weighted shuffle form in fact concurrent Kleene algebras, as expected.
Weighted languages are usually defined over semirings instead of dioids. Instead of Kleene algebras, one can then use star semirings (Droste et al. Reference Droste, Kuich and Vogler2009). The Kleene star can then be defined on
$Q^M$
as before. We conjecture that Corollary 37 still holds for ordered star semirings, though we have not checked all details.
Shuffle languages are widely used in the interleaving semantics of concurrent programmes. The finite transition and Aczel traces of the rely-guarantee calculus (de Roever et al. Reference de Roever, de Boer, Hannemann, Hooman, Lakhnech, Poel and Zwiers2001), in particular, form concurrent quantales, which suffices at least for the analysis of safety and invariant properties. We expect that our generic recipe for building shuffle quantales and Kleene algebra from underlying relational interchange monoids can be beneficial for building more refined rely-guarantee algebras. In particular, our results open the door to probabilistic and other quantitative variants, using for instance the standard value quantale on the unit interval that is popular with such applications (Dongol et al. Reference Dongol, Hayes and Struth2021).
8. Partial Interchange Monoids
Next we prepare for our second example, namely of digraphs under serial and parallel composition. It is then natural to consider these compositions not as ternary relations, but as partial operations on graphs. This leads to more general notions of partial semigroups and monoids. Convolution based on partial semigroups and monoids has previously been studied in Dongol et al. (Reference Dongol, Hayes and Struth2016). First, we briefly recall the relationship between relational and partial monoids.
Definition 38 (Dongol et al. Reference Dongol, Hayes and Struth2016) A partial monoid is a structure
$(S,\otimes, D, E)$
where S is a set,
$D\subseteq S\times S$
the domain of definition of the composition
$\otimes :D\to S$
, which is associative in the sense that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU51.png?pub-status=live)
and
$E\subseteq X$
is a set of units, which satisfy
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU52.png?pub-status=live)
This definition captures the following intuition of partiality, namely that the left-hand side of the identity
$x\otimes (y \otimes z) = (x\otimes y)\otimes z$
is defined if and only if the right-hand side is, and, if either side is defined, then the two sides are equal. This notion of equality is known as Kleene equality. Categories, monoids and the interval algebras in Example 1, ordered pair algebras in Example 3 and heaplet algebras in Example 5 all form partial monoids. Instead of the unit axioms presented here, we could equally use those of object-free categories (Mac Lane 1998). The precise relationship between partial monoids and object-free categories is discussed in Cranch et al. (2020).
The relationship between partial and relational monoids is straightforward. A relational monoid (X,R,E) is functional if
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU53.png?pub-status=live)
With every functional relational monoid (X,R,E), one can then associate a partial monoid
$(X,\otimes,D,E)$
with
$D\, y \,z \Leftrightarrow \exists x.\ R^x_{yz}$
and
$y\otimes z$
being the unique
$x\in X$
that satisfies
$R^x_{yz}$
– if
$D\, y\, z$
is defined. We are particularly interested in the converse construction.
Lemma 39. (Dongol et al. Reference Dongol, Hayes and Struth2021) If
$(S,\otimes,D,E)$
is a partial monoid, then (S,R,E) is a (functional) relational monoid with
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU54.png?pub-status=live)
Next we relate partial monoids with relational interchange monoids. Expressing a variant of the interchange law (I7) in the context of partial monoids requires once again an ordering on S. This motivates the following definition.
Definition 40. A preordered partial monoid is a structure
$(S,\preceq,\otimes,D,E)$
such that
$(S,\preceq)$
is a preorder,
$(S,\otimes,D,E)$
a partial monoid, and
$\otimes$
is order preserving in the sense that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU55.png?pub-status=live)
Lemma 39 can then be generalised.
Lemma 41. Let
$(S,\preceq,\otimes,D,E)$
be a preordered partial monoid. Then, (S,R) is a relational semigroup with
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU56.png?pub-status=live)
Proof. For relational associativity,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU57.png?pub-status=live)
However, the unit laws of preordered partial monoids need not translate to units in relational semigroups.
Lemma 42. Let
$(S,\preceq,\otimes,D,E)$
be a preordered partial monoid and
$R^x_{yz}\Leftrightarrow x\preceq y\otimes z\land D\, y\, z$
. Then
-
(1)
$\exists e\in E.\ R^x_{ex}$ and
$\exists e\in E.\ R^x_{xe}$ ,
-
(2)
$\exists e\in E.\ R^x_{ey} \Rightarrow x\preceq y$ and
$\exists e\in E.\ R^x_{ye} \Rightarrow x\preceq y$ .
In (2), it cannot generally be expected that
$x=y$
. The relationship
$x\preceq y$
cannot be captured directly within relational semigroups or monoids.
Definition 43. A partial interchange monoid is a structure such that
and
are preordered partial monoids,
and the following interchange law holds:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqn23.png?pub-status=live)
In light of Lemmas 41 and 42, we cannot expect to relate partial interchange monoids directly with relational interchange monoids. But the relationship is straightforward if we forget relational units and restrict to a single monoidal unit.
Lemma 44. Let be a partial interchange monoid in which
. Then the following small interchange laws hold.
-
(1)
,
-
(2)
,
-
(3)
,
-
(4)
,
-
(5)
,
-
(6)
.
Proof. We show (3) as an example. Suppose and
. Then,
and
and therefore
,
,
and
by (PI7). Hence,
by the unit laws of partial monoids. The other proofs are similar and left to the reader.
With multiple units, it seems necessary to require that parallel units are sequential units for all elements, which is artificial.
From now on, we call relational interchange semigroup a relational interchange monoid in which units may be absent, and the small interchange laws (RI1)–(RI6) hold in addition to (RI7).
Lemma 45. If is a partial interchange monoid, then
is a relational interchange semigroup with
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU58.png?pub-status=live)
Proof. We need to check that (PI7) implies (RI7).
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU59.png?pub-status=live)
This calculation does not depend on the presence of units. Small interchange laws hold in S by Lemma 44. These allow deriving the small relational interchange laws (RI1)–(RI6) as in the proof of (RI7). Hence, S is a relational interchange semigroup.
We could have used instead of
in the proof of Lemma 45. Using an equational encoding for R, however, would have broken the proof. The following example shows that even (RI1) would break if two equational encodings were used.
Example 46. Consider the partial monoid over
$\{a,b\}$
with
,
, order and compositions defined by
and a suitable unit adjoined. The small interchange law
then holds for all x and y. Now define
and
. Then
, that is,
and
, because
,
and
.
Lemma 45 yields the following corollary to Theorem 5(1).
Corollary 47. If S is a partial interchange monoid with unit e and Q an interchange quantale, then
$Q^S$
is a non-unital interchange quantale with convolutions
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU60.png?pub-status=live)
that satisfies the small interchange laws (I1)–(I6) in addition to (I7).
Unitality fails in general because the unit
$\mathit{id}$
of
need not be the unit of
:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU61.png?pub-status=live)
using Lemma 42(2), but not necessarily and similarly for
. Obviously, the retract
has unit
$\mathit{id}$
; only the retract
does not have
$\mathit{id}$
as a unit. To obtain equality, and hence unital interchange quantales, conditions on f are needed.
A partial interchange monoid is positive if e is a minimal element of S with respect to
$\preceq$
. It satisfies the serial Riesz decomposition property if
implies that there exists
$x_1$
,
$x_2$
such that
$x_1\preceq y_1$
,
$x_2\preceq y_2$
and
. An analogous property is well-known from ordered vector spaces.
Lemma 48. Let f be antitone, that is,
$x\preceq y\Rightarrow f\, y\le f\, x$
. Then,
.
Proof. . The
$\le$
-direction holds by antitonicity, the
$\ge$
-direction by the above calculation. The proof of
is similar.
To make
$\mathit{id}$
antitone, it seems appropriate to require that e is minimal with respect to
$\preceq$
and hence that the partial interchange monoid is positive. We also need to check that
and
preserve antitonicity.
Proposition 49. Let be a positive serially Riesz decomposable partial interchange monoid and Q an interchange quantale. Then the antitone functions in
$Q^S$
form a (unital) interchange subquantale.
Proof. Unitality follows from Lemma 48. It remains to show that
$\mathit{id}$
is antitone and that
and
preserve antitonicity. The first fact follows from positivity. For preservation of
, suppose
$x\preceq y$
. Then,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU62.png?pub-status=live)
For preservation of , suppose once again
$x\preceq y$
. Then,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU63.png?pub-status=live)
by Riesz decomposability of .
In sum, the results of this section show how the general lifting result from Theorem 5(1) specialised from relational interchange monoids to partial interchange monoids, which are preordered. But, perhaps surprisingly, units cannot generally be lifted. We have thus identified conditions on partial interchange monoids – positivity and a serial Riesz decomposition property – and restricted the convolution algebra to antitone functions that enable such a lifting. In the next section, we apply these results to weighted graph languages.
9. Weighted Graph Languages
Our second extended example shows how weighted graph languages can be constructed with our approach. A partial interchange monoid structure can be imposed on graphs in various ways. Partiality arises because, typically, the vertices of the graph operands are supposed to be disjoint. Henceforth, we mean digraph when we say graph. Graphs with undirected edges can be obtained from these in the obvious way.
Formally, we view graphs as binary relations on some set X. Let graphs
$G_1$
and
$G_2$
be disjoint, that is, they have disjoint vertex sets:
$V_{G_1}\cap V_{G_2}=\emptyset$
. Their serial composition (complete join) and disjoint union (parallel composition) are defined as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU64.png?pub-status=live)
where
$\sqcup$
denotes disjoint union. Both operations are standard (Courcelle and Engelfriet Reference Courcelle and Engelfriet2012). This turns graphs under serial composition into partial monoids, and graphs under parallel composition into partial abelian monoids.
A graph morphism
$\varphi:G_1\to G_2$
between graphs
$G_1$
and
$G_2$
preserves edges:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU65.png?pub-status=live)
A morphism
$\varphi$
is faithful, or a graph embedding, if
$(\varphi\, x,\varphi\, y)\in G_2$
implies
$(x,y)\in G_1$
. A graph isomorphism is a bijective (on vertices) graph embedding. We write
$G_1\cong G_2$
if there exists a graph isomorphism between
$G_1$
and
$G_2$
. We say that
$G_1$
and
$G_2$
are isomorphic or have the same graph type if
$G_1\cong G_2$
and call
$G/{\cong}$
the isomorphism class or graph type of G.
The subsumption relation
$\preceq$
between graphs, which is defined by
$G_1\preceq G_2$
if and only if there exists a bijective (on vertices) graph morphism
$\varphi:G_2\to G_1$
, is a preorder. The associated subsumption equivalence
$\simeq$
need not coincide with
$\cong$
, as will be explained in Section 10. We now fix any set
$\mathcal{G}$
of (di)graphs that contains the empty graph
$\varepsilon$
and is closed under serial and parallel composition.
Proposition 50. The structure
$(\mathcal{G},\cdot,\|,\{\varepsilon\})$
forms a partial interchange monoid with commutative parallel composition and shared unit
$\varepsilon$
.
Proof. First, the partial associativity and unit laws, partial commutativity of disjoint union as well as partial isotonicity of the two compositions must be shown. This is routine. In the presence of a shared unit
$\varepsilon,$
it then remains to verify (PI7). For this, we need the following isotonicity property of Cartesian products:
$A\subseteq B$
implies
$A\times C\subseteq B\times C$
and
$C\times A\subseteq C\times B$
.
We only show that the weak interchange law
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU66.png?pub-status=live)
holds and leaves the remaining laws to the reader. We use the identity function on the
$G_i$
to construct the bijective morphism. We need to show that
$V_{(G_1\| G_2)\cdot (G_3\| G_4)}= V_{(G_1\cdot G_3)\|(G_2\cdot G_4)}$
and
$(G_1\cdot G_1)\|(G_3\cdot G_4) \subseteq (G_1\| G_3)\cdot (G_2\| G_4)$
as a relation. First,
$V_{G_i\cdot G_j} = V_{G_i}\cup V_{G_j} = V_{G_i\| G_j}$
and therefore
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU67.png?pub-status=live)
Second,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU68.png?pub-status=live)
Lemma 45 and Corollary 47 then imply that weighted graph languages form interchange quantales up to unitality of the parallel quantale retract. But one can do better.
Lemma 51. The partial interchange monoid
$(\mathcal{G},\cdot,\|,\{\varepsilon\})$
is positive and serially Riesz decomposable.
Proof. It is clear that
$\varepsilon$
is an isolated point with respect to
$\preceq$
and hence minimal. This proves positivity. The proof of serial decomposability is intuitive, but somewhat tedious to spell out formally. Suppose
$G\preceq G_1\cdot G_2$
. Then, the vertices of
$G_1$
and
$G_2$
are disjoint, and in addition to the arrows of
$G_1$
and
$G_2,$
we have
$V_{G_1}\times V_{G_2}$
. Hence if
$G\preceq G_1\cdot G_2$
, then the arrows added by the bijective graph morphism
$\varphi:G_1\cdot G_1 \to G$
must either be added to
$G_1$
or to
$G_2$
, while
$V_{G_1}\times V_{G_2}$
stays the same. There must thus be
$G_1'\preceq G_1$
and
$G_2'\preceq G$
such that
$G=G_1'\cdot G_2'$
.
Proposition 49 then specialises as follows.
Corollary 52. If Q is an interchange quantale with unit 1 and commutative, then
$Q^\mathcal{G}$
is a (generally non-unital) interchange quantale with
commutative and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU69.png?pub-status=live)
The subquantale of antitone functions in
$Q^\mathcal{G}$
is unital.
Labels can be added to vertices ad libitum, which yields proper weighted graph languages. Both the serial and the parallel composition preserve order properties, and it must be required that graph morphisms preserve labels. Corollary 52 then specialises immediately to weighted partial orders and weighted labelled partial orders. Their non-weighted variants are widely used in concurrency theory as partial order semantics (Vogler 1992) and in the theory of distributed systems (Lamport 1978). Our results thus yield quantitative variants.
Next we briefly consider such qualitative convolution algebras, which are based on powerset liftings, that is,
$Q= \mathbb{B}$
. Then,
$f:\mathcal{G}\to \mathbb{B}$
is a set indicator function, and we may write
$x\in f$
instead of
$f\, x$
, identifying the indicator function with the set it represents. Then,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU70.png?pub-status=live)
rewrites as , and hence,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU71.png?pub-status=live)
Similarly,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU72.png?pub-status=live)
where
$\downarrow$
denotes the down-closure with respect to
$\preceq$
. Moreover, the antitonicity condition rewrites as
$x\preceq y\land f\, y \Rightarrow f\, x$
, which is precisely
$f=f{\downarrow}$
, that is, f is a down-set with respect to
$\preceq$
.
Corollary 53. The down-sets in
$\mathcal{P}\, \mathcal{G}$
form a unital interchange quantale.
Finally, we consider the finite case and obtain the following corollary of Theorem 6.
Corollary 54. If K is an interchange Kleene algebra with unit 1 and
$\mathcal{G}$
a partial interchange monoid of finite graphs, then the antitone functions in
$K^\mathcal{G}$
form an interchange Kleene algebra.
This result holds because any finite graph can be decomposed in finitely many ways serially or parallelly into subgraphs. Once again, all results specialise to partial orders, and in particular to labelled partial orders, as already mentioned. The results in this section thus show how our general lifting result in Theorem 5(1) supports the construction of standard models of true concurrency (Grabowski 1981; Vogler 1992) and for distributed systems (Lamport 1978) based on graphs and partial orders, labelled or unlabelled, and that these can be extended from the usual qualitative setting to quantitative applications including probabilities or fuzziness. The next section shows how these results specialise further to graph types and pomsets, which capture partial order semantics of concurrency more faithfully.
10. Weighted Languages of Types of Finite Graphs
Many applications, including those in concurrency and distributed systems mentioned, require equivalence or isomorphism classes and hence types of (labelled) graphs or (labelled) partial orders. Lifting the results from Section 9 to these is not entirely straightforward. This is well known (Ésik Reference Ésik2002), but we spell out details to make them easier to access.
Example 55 (Ésik Reference Ésik2002). Consider the infinite poset
$(P,\le_P)$
with
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU73.png?pub-status=live)
and
$p_{i,j}\le_P p_{k,l}$
if and only if
$i = k = 0$
and
$j \le l$
. Consider also the infinite poset
$(Q,\le_Q)$
with
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU74.png?pub-status=live)
and
$q_{i,j}\le_P q_{k,l}$
if and only if
$i = k = 0$
or
$i=k=1$
, and
$j\le l$
.
Intuitively, P consists of the disjoint union of the infinite chain formed by the
$p_{0,j}$
and the
$p_{i,0}$
with
$i> 0$
, whereas Q consists of the disjoint union of the infinite chain formed by the
$p_{0,j}$
, the infinite chain formed by the
$p_{1,j}$
and the elements
$p_{i,0}$
with
$i\ge 1$
.
Define the functions
$\varphi:P\to Q$
and
$\psi:Q\to P$
by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU75.png?pub-status=live)
Intuitively,
$\varphi$
maps the chain in P onto the first chain in Q and the isolated elements in P alternatingly onto the second chain and the isolated elements in Q, whereas
$\psi$
maps the elements of the two chains in Q alternatingly onto the chain in P, and isolated points in Q onto isolated points in P. The morphisms are shown in Figure 5.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_fig5.png?pub-status=live)
Figure 5. Posets P and Q with bijective morphisms
$\varphi$
in left diagram and
$\psi$
in right diagram.
By construction,
$\varphi$
and
$\psi$
are both bijective and order preserving. Hence
$P\preceq Q$
and
$Q\preceq P$
, but of course neither
$P=Q$
nor
$P\cong Q$
.
At least in the finite case, the situation is simpler. An explanation requires two simple standard facts about groups, which we recall without proofs.
Lemma 56. Let G be the cyclic group generated by x and let
$x^i = x^j$
for some integers
$i<j$
. Then
$G=\small\left\{1,x,x^2,\dots x^{k-1}\small\right\}$
, where
$k=j-i$
.
Lemma 57. Let G be a finite cyclic group of order n generated by x. Then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU76.png?pub-status=live)
Lemma 58. Let
$G_1$
and
$G_1$
be finite graphs such that
$G_1\preceq G_2$
and
$G_2\preceq G_1$
. Then
$G_1\cong G_2$
.
Proof. By assumption, there exist order preserving bijections
$\varphi:G_2\to G_1$
and
$\psi:G_1\to G_2;$
hence
$, \chi=\psi\circ \varphi$
is an order preserving bijection on
$G_1$
. As
$\chi$
can be seen as a group action on the finite set
$V_1$
, it generates a finite cyclic group. Hence there is some
$k\in\mathbb{N}$
such that
$\chi^k=\mathit{id}_{V_1}$
by Lemma 57. It then follows that f is faithful: Suppose
$(\varphi\, x,\varphi\, y)\in G_2$
. Then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU77.png?pub-status=live)
It follows that
$\varphi$
is a graph isomorphism and
$G_1\cong G_2$
.
A similar fact has been proved by Ésik (Reference Ésik2002). We henceforth restrict our attention to finite graphs.
Let
$[G]=\{G'\mid G'\cong G\}$
denote the type of G. We extend the subsumption preorder
$\preceq$
to equivalence classes by
$[G_1]\preceq [G_2]\Leftrightarrow G_1\preceq G_2$
, overloading notation. This relation is well defined.
Lemma 59. Let
$G_1'\cong G_1$
,
$G_1\preceq G_2$
and
$G_2\cong G_2'$
. Then
$G_1'\preceq G_2'$
.
Proof. Let
$\varphi_1$
be the graph isomorphism of type
$G_1\to G_1'$
,
$\varphi_2$
the graph isomorphism of type
$G_2'\to G_2$
and
$\psi$
the bijective graph morphism of type
$G_2\to G_1$
. Then,
$\varphi_1\circ \psi\circ \varphi_2:G_2'\to G_1'$
is a bijective graph morphism as well. Hence
$G_1' \preceq G_2'$
.
Lemma 60. The relation
$\preceq$
is a partial order on
$\mathcal{G}/{\cong}$
if all graphs in
$\mathcal{G}$
are finite.
Proof. Reflexivity and transitivity for
$\preceq$
on
$\mathcal{G}/{\cong}$
follows from reflexivity and transitivity of
$\preceq$
on
$\mathcal{G}$
. For antisymmetry,
$[G_1]\preceq [G_2]$
and
$[G_2]\preceq [G_1]$
imply
$[G_1]=[G_2]$
for all
$G_1,G_2\in\mathcal{G}$
by Lemma 58.
Extending serial and parallel composition of graphs is standard:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20220427130114075-0680:S0960129522000081:S0960129522000081_eqnU78.png?pub-status=live)
and likewise for
$[G_1]\| [G_2]$
. It is also known that both compositions are well defined: if
$G_1\cong G_1'$
and
$G_2\cong G_2'$
, then
$[G_1]\cdot[G_2]=[G_1']\cdot [G_2']$
and
$[G_1]\|[G_2]=[G_1']\| [G_2']$
. By contrast to serial and parallel compositions of graphs, those operations on graph types are total. Finally, equivalence classes are closed with respect to serial and parallel composition.
Lemma 61. For all
$G_1,G_2\in\mathcal{G}$
,
-
(1)
$[G_1\cdot G_2] = [G_1]\cdot [G_2]$ ,
-
(2)
$[G_1\| G_2] = [G_1]\|[G_2]$ .
Proof.
$H\in [G_1\cdot G_2]$
if and only if
$H\cong G_1\cdot G_2$
. This is the case if and only if there are graphs
$G_1'$
and
$G_2'$
such that
$H=G_1'\cdot G_2'$
and
$G_1'\cong G_1$
and
$G_2'\cong G_2$
, which, in turn, holds if and only if
$H\in [G_1]\cdot [G_2]$
. The proof for
$\|$
is similar.
Proposition 62. The structure
$(\mathcal{G}/{\cong},\cdot,\|,[\varepsilon])$
is a total interchange monoid in which
$\|$
is commutative, if all graphs in
$\mathcal{G}$
are finite.
Proof. The associativity, commutativity and unit laws are easy to check, noting that
$[\varepsilon]=\{\varepsilon\}$
. For the interchange law,
$[(G_1\| G_2)\cdot (G_3\| G_4)]\preceq [(G_1\cdot G_3)\|(G_2\cdot G_4)]$
, by definition of
$\preceq$
on equivalence classes, it suffices to show that
$(G_1\| G_2)\cdot (G_3\| G_4)\preceq (G_1\cdot G_3)\|(G_2\cdot G_4)$
, which holds by Proposition 9.
Proposition 62 specialises immediately to types of finite partial orders with serial and parallel composition, which are known as partial words or pomsets in concurrency theory – when vertex labels are added (Grabowski Reference Grabowski1981; Gischer Reference Gischer1988). The instance of Proposition 62 for pomsets is due to Gischer (Reference Gischer1988).
Because compositions in
$\mathcal{G}/{\cong}$
may result in the empty set, the interchange monoid usually has an annihilator 0, that is, an element for which
$x\cdot 0=0= 0\cdot x$
and
$x\| 0 = 0$
holds for any x.
The lifting to convolution algebras – interchange quantales, unital interchange quantales, interchange Kleene algebras – then follows the results of the previous section, and of course Theorem 5(1). The result that the powerset lifting of finite pomsets yields concurrent semirings, interchange semirings in which is commutative and
$Q=\mathbb{B}$
, is due to Gischer (Reference Gischer1988). Extensions to concurrent Kleene algebras and concurrent quantales have been proved more recently (Hoare et al. Reference Hoare, Möller, Struth and Wehrman2011).
This finishes the construction of the graph and pomset language models of concurrent quantales and Kleene algebras as a second paradigmatic model of concurrency within our convolution algebra framework and its extension to quantitative applications.
11. Conclusion
The results in this article yield a generic construction recipe for concurrent quantales and Kleene algebras from relational structures, multimonoids and partial monoids, with qualitative and quantitative applications. Beyond that, they yield correspondence triangles between relational interchange monoids, value quantales and convolution quantales that from the mathematical foundations for this recipe. These results are suitable for formalisations in proof assistants and applications in concurrency verification. In fact, the lifting from ternary relations and partial monoids to quantalic convolution algebras – without interchange laws – has already been formalised with Isabelle/HOL (Dongol et al. Reference Dongol, Gomes, Hayes and Struth2017). Extending this to concurrency is left for future work.
Another interesting avenue for research is the extension of Stone-type duality to our constructions, building on work of Harding, Walker and Walker for lattice-valued functions (Harding et al. Reference Harding, Walker and Walker2018). Moreover, a categorification of our approach will be published in a successor paper.
In a companion paper, similar correspondence triangles and lifting results have recently been obtained for relational semigroups equipped with source and target maps instead of relational units – so-called
$\ell r$
-multisemigroups and modal quantales and Kleene algebras (Fahrenberg et al. 2021 b). In addition, it has been shown that certain languages of interval orders with interfaces arise as languages of higher-dimensional automata, which arguably yield the most general models of concurrency known (Fahrenberg et al. 2021 a). Posets equipped with interfaces seem particularly suitable for real-world algebraic models of concurrency, because the compositional nature of algebra is a prima facie mismatch to the non-compositional nature of concurrency that may be due to dependencies between events or communication. A combination of the correspondence results for modal convolution algebras (Fahrenberg et al. 2021 b) and concurrent convolution algebras, as obtained in this article, will be needed for describing the algebra of languages of higher-dimensional automata. We also expect that the polygraph model of higher-dimensional globular Kleene algebras, which have recently been developed for applications in polygraph rewriting (Calk et al. Reference Calk, Goubault, Malbos and Struth2020), can be described as a generalisation of such a combination to higher dimensions.
Acknowledgements
The authors would like to thank Tony Hoare for discussions on models of concurrent Kleene algebras, and to Brijesh Dongol and Ian Hayes for their collaboration on convolution algebras and comments on early versions of this work. The second and third author have been partially supported by EPSRC grant EP/R032351/1.
Conflicts of Interests
The authors declare none.