Catoids and modal convolution algebras

We show how modal quantales arise as convolution algebras QX\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q^X$$\end{document} of functions from catoids X, multisemigroups equipped with source and target maps, into modal quantales value or weight quantales Q. In the tradition of boolean algebras with operators we study modal correspondences between algebraic laws in X, Q and QX\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q^X$$\end{document}. The catoids introduced generalise Schweizer and Sklar’s function systems and single-set categories to structures isomorphic to algebras of ternary relations, as they are used for boolean algebras with operators and substructural logics. Our correspondence results support a generic construction of weighted modal quantales from catoids. This construction is illustrated by many examples. We also relate our results to reasoning with stochastic matrices or probabilistic predicate transformers.


Introduction
Convolution is an ubiquitous operation in mathematics and computing. For instance, let (Σ * , , ε) be the free monoid over the finite alphabet Σ and (S, +, ·, 0, 1) a semiring. The convolution of f, g : Σ * → S is defined as where represents finitary addition in S. The maps f and g associate a value or weight in S with any word in Σ * . The weight of the convolution f * g at word x is computed by splitting x into all possible words y and z related which has led to more abstract definitions of modal semirings and quantales [7,8,15]. Yet what is the precise correspondence between the source and target structure of the pair groupoid, say, and these relational domain and codomain operations? And how does it generalise to source and target maps in arbitrary multisemigroups and to domain and codomain operations in arbitrary convolution quantales?
As a first step towards answers, we introduce catoids: multisemigroups (X, ) with source and target operations s, t : X → X inspired by similar operations in Schweizer and Sklar's function systems [38] and by the source and target maps of single-set categories [32]. We study the basic algebra of catoids and present a series of examples, including categories and non-categories. Most of these results have been formalised with the Isabelle/HOL proof assistant. (See https://github.com/gstruth/catoids.) It turns out that the locality laws s(x s(y)) = s(x y) and t(t(x) y) = t(x y) of catoids, which have previously been studied at the level of modal semigroups, semirings and quantales [6,7,8,15], are equivalent to the composition pattern of categories, namely that x y is defined, and hence not ∅, if and only if t(x) = s(y) (for categories, the order of composition is usually reversed). Indeed, local catoids based on partial semigroups are (small) categories.
As a second step, we generalise the standard definitions of domain and codomain for modal semirings and quantales to convolution algebras. When relations are represented as 2-valued matrices, for instance, domain elements in 2 X are diagonal matrices in which the value of each diagonal element is 1 if there is a 1 in the respective row of the matrix, and 0 otherwise. More generally, for Q-valued relations represented as Q-valued matrices, a domain element in Q X can be seen as a diagonal matrix in which the value of each diagonal element is the domain of the supremum of the respective row values of the matrix, taken in Q.
Equipped with catoids and domain and codomain operations for Q X , we prove our main results: correspondence triangles between equational properties of source and target operations in catoids X and those of domain and codomain operations in the modal quantales Q and Q X . We develop them in full generality, but keep an eye on the Q = 2 instance, which has been formalised with Isabelle. From the point of view of boolean algebras with operators, this yields a multimodal setting where the quantalic composition in Q X is a generalised binary modality associated with a ternary frame in X, whereas the domain and codomain operations in Q X are generalised unary modalities that can be associated with binary frames in X based on s and t.
These results show, in particular, how the equational axioms for modal semirings and quantales, as powerset or proper convolution algebras, originate in the much simpler catoid axioms and how the composition pattern of categories translates into the locality axioms of modal algebras. For the (forward) modal operators present in these modal algebras, locality means that the standard properties α · β = α • β and [α · β] = [α] · [β] hold.
More generally, the lifting from X and Q to Q X yields a generic construction recipe for modal quantales. Any category, for instance, can be lifted

Multisemigroups
Categories can be axiomatised in single-set style [32] as partial monoids with many units that satisfy a certain locality condition. Their correspondence to relational monoids, which are sets X equipped with ternary relations R ⊆ X × X × X with many relational units that satisfy relational associativity and unit laws, have already been studied [4]. Here we use an isomorphic representation, namely multioperations of type X × X → PX, which relate pairs in X × X with a set of elements of X, including ∅. This encompasses partial and total operations, where each such pair is related to at most one or precisely one element, respectively. Multioperations have a long history in mathematics. See [31] for a discussion, references and additional material.
Dealing with general categories requires classes in some of our examples. In the tradition of single-set categories, we tacitly extend the following definitions to classes, but do not formally distinguish them from sets. Our constructions are not likely to lead to paradoxes.
Let : X × X → PX be a multioperation on set X. We write D xy for x y = ∅ to indicate that the composition x y is non-empty (intuitively: defined) and extend to PX × PX → PX for all A, B ⊆ X as A B = {x y | x ∈ A and y ∈ B}.

We write x B instead of {x} B, A x instead of A {x} and f (A) instead of {f (a) | a ∈ A}. Note that A ∅ = ∅ B = ∅.
A multimagma (X, ) is a non-empty set X with a multioperation : X × X → PX.
• The multioperation is associative if x (y z) = (x y) z.
• It is local if u ∈ x y ∧ D yz ⇒ D uz for all u, x, y, z ∈ X.
• It is functional if x, x ∈ y z imply x = y for all x, x , y, z ∈ X.
• Element e ∈ X is a left unit if ∃x. x ∈ e x and ∀x, y. x ∈ e y ⇒ x = y; it is a right unit if ∃x.
x ∈ x e and ∀x, y. x ∈ y e ⇒ x = y. We write E for the set of all units in X, left or right.
Functional multioperations are nothing but partial operations, where partiality is captured by mapping to ∅. Remark 2.1. Intuitively, locality states that if x can be composed with y and y with z, then each element in the composition of x and y can be composed with z. For partial operations this reduces to the composition pattern of categories, binary relations, paths in digraphs and many other examples, as explained below. Locality has previously been called coherence [4]. It will become clear below why we now prefer another name.
A multimagma X is unital if for every x ∈ X there exist e, e ∈ E such that D ex and D xe . This definition follows that for single-set categories. Equivalently, we may require that there exists a set E ⊆ X such that, for all x ∈ X, E x = {x} and x E = {x}.
A multisemigroup is an associative multimagma; a multimonoid a unital multisemigroup.
These definitions imply that a multisemigroup (X, ) is a partial semigroup if is functional and a semigroup if is total-and likewise for partial monoids and monoids.
Multimagmas and relatives form categories in several ways. A multimagma morphism f : and v = f (z) for some y, z ∈ X.
Obviously, f is a multimagma morphism if and only if x ∈ y X z implies f (x) ∈ f (y) Y f (z). This is a natural generalisation of the fact that , for total operations. For partial operations, it implies that the right-hand side of the inclusion is defined whenever the left-hand side is, and, in the bounded case, that the left-hand side is defined whenever the right-hand side is.
A morphism f : X → Y of unital multimagmas needs to preserve units as well: f (e) ∈ E Y holds for all e ∈ E X , and e ∈ E Y implies that there is an e ∈ E X such that f (e ) = e holds if f is bounded. Morphisms of singleset categories are of course functors. More generally, bounded morphisms are standard in modal logic as functional bisimulations or open maps.
In every multimagma, every unit e satisfies e e = {e} and D ee . If e, e ∈ E, then D ee if and only if e = e ; for if D ee holds, then e e = {x} for some x ∈ X and hence e = x = e by the unit axioms. Units are therefore, in some sense, orthogonal idempotents.
In every multimonoid, each element has precisely one left and one right unit: if e, e ∈ E both satisfy e x = {x} = e x for some x ∈ X, then ∅ = e x = e (e x) = (e e ) x, which is only the case when e = e , as explained above (the argument for right units is similar). This functional correspondence allows defining source and target maps s, t : X → X such that s(x) denotes the unique left unit and t(x) the unique right unit of x. Then D xy implies t(x) = s(y) and the converse implication is equivalent to locality. These properties have been proved for relational structures [4], but hold in the corresponding multialgebras via the isomorphism.

Example 2.2 (Multimonoids).
(1) Single-set categories, as in Mac Lane's book [32,Chapter I.1], and local partial monoids are the same class, as already mentioned. The category of such categories and that of local partial monoids (with bounded or unbounded morphisms) are isomorphic. Local partial monoids are small categories. They are categories if the partial monoid is built on a class.
(2) Every monoid (X, ·, 1), as a one-object category, is local. The digraph with vertex 1 and edge 1 a → 1, for instance, corresponds to a partial monoid X = {1, a} with multiplication defined by 11 = {1} and 1a = {a} = a1. In addition we can impose aa = {a}. Locality is trivial: composition is total and (3) The pair groupoid (X × X, , Id X ) over any set X with where Id X is the identity relation on X, is a local partial monoid, hence a category, and in fact a groupoid as its name indicates. Source and target maps are s((x, y)) = (x, x) and t((x, y)) = (y, y). This category is equivalent to a trivial category.
(4) The pair groupoid generalises from X × X to relations R ⊆ X × X. If R is transitive, then is well-defined and (R, ) a local partial semigroup. If R is also reflexive, and hence a preorder, then (R, , Id X ) is a partial monoid; it is a groupoid if and only if R is symmetric. Finally, if R is a partial order, then (X, R) is a poset category. (5) The shuffle multimonoid (Σ * , , {ε}), where Σ * is the free monoid over the (finite) alphabet Σ with unit ε, has a composition : It is not a category because is a proper multioperation. Locality is trivial The monoid in (2) becomes functional and non-local when we break composition and impose aa = ∅, because s(a) = t(a) still holds. Instead of a one-object category, it is now a plain digraph. Vol. 84 (2023) Catoids and modal convolution algebras Page 7 of 40 10 (7) The partial abelian monoid of heaplets (H, , ε) used in separation logic is formed by the set H of partial functions between two sets. The partial operation is defined as Its unit is the partial function ε with empty domain. Locality fails because s(f ) = ε = t(g) for all f, g ∈ H, but f g = ∅ when domains of f and g overlap. This algebra of heaplets is a non-local instance of a generalised effect algebra, used for modelling unsharp measurements in quantum mechanics: a partial abelian monoid with a single unit (which in addition is cancellative and positive) [25]. Additional examples can be found in Section 9.

Catoids
The correspondence between units in relational monoids and multimonoids and source/target functions motivates alternative axiomatisations of these structures and thus of single-set categories that generalise the function systems of Schweizer and Sklar [38]. Such categories can be found inMac Lane's book [32,Chapter XII.5]. We define catoids, which are multisemigroups with such functions. An isomorphic alternative based on relational semigroups has been outlined in [4]. An st-multimagma is a structure (X, , s, t) such that (X, ) is a multimagma and the operations s, t : X → X satisfy, for all x, y ∈ X, We refer to the second and third of these axioms as unit or absorption axioms. Henceforth we often write xy instead of x y and AB instead of A B.
A catoid is an associative st-multimagma. An st-multimagma is st-local if t(x) = s(y) ⇒ D xy and hence D xy ⇔ t(x) = s(y). Locality in the sense of multimonoids and st-locality coincide in catoids, so we can simply refer to locality of catoids.
Duality for st-multimagmas arises by interchanging s and t as well as the arguments of . The classes of st-multimagmas and catoids are closed under this transformation; locality and functionality are self-dual. The dual of any property that holds in any of these classes, obtained by making these replacements, therefore holds as well. This generalises opposition in categories. Lemma 3.1. In any st-multimagma, the following laws hold: (1) the compatibility laws s • t = t, t • s = s and retraction laws s • s = s, t • t = t, the export laws s(s(x)y) = s(x)s(y) and t(xt(y)) = t(x)t(y), (5) the weak twisted laws s(xy)x ⊆ xs(y) and xt(yx) ⊆ t(y)x.
All proofs have been checked with Isabelle.
Remark 3.2. We compare our axioms and derived laws with those of Schweizer and Sklar's function systems [38] (see Appendix A for a list). The associativity axiom of multisemigroups generalises that of function systems. The compatibility laws are their Axioms (2a), the absorption axioms their Axioms (2b); the commutativity law is their Axiom (3b). The export laws are Axioms (D3) and its opposite (R3) of modal semigroups [6]. The relationship between stalgebras, function systems and modal semigroups is summarised in Remark 3.4 below.
The compatibility laws imply that s(x) = x ⇔ t(x) = x and further that Moreover, by the retraction laws, X s = s(X) and X t = t(X). The proofs have again been checked with Isabelle.

Lemma 3.1 implies further laws, including s(x)s(y) = s(y)s(x) and t(x)t(y) = t(y)t(x), the idempotency law t(x)t(x) = {t(x)} and the orthogonality laws
Remark 3.4. The two locality laws generalise Axioms (3a) for function systems [38]. The twisted laws generalise Axiom (3c) and law (D3c), in this order. Function semigroups without (3c) and law (D3c) axiomatise modal semigroups [6], which relate to semigroups of binary relations. Adding Axiom (3c) to both classes axiomatises domain and codomain of functions. Law (D3c) is relevant for function systems with so-called subinverses [38]. These are related to inverse semigroups and irrelevant here. In sum, catoids generalise function systems and modal semigroups beyond totality. For a discussion of related semigroups and applications see [6].
Once again, all proofs have been checked with Isabelle. Locality is in fact an equational property. This result carries over to local structures and extends to isomorphisms between categories of catooids and relational monoids with suitable morphisms. A morphism f of st-multimagmas X and Y is a multimagma morphism that f ; g = g • f . The following axioms hold for all X ∈ O and f, g, h ∈ M (for Kleene equality, that is, whenever compositions are defined): In a category, defining s = id • s and t = id • t yields local functional catoids (source and target maps of categories on the right, those of catoids on the left). Conversely, the set of units of a local functional catoid defines the set of objects of a category.
(2) The pair groupoid is a local functional catoid.

Convolution quantales
We have already extended the multioperation : X × X → PX to type PX × PX → PX and the maps s, t : X → X to type PX → PX by taking images. We wish to explore the algebraic structure of such powerset liftings over st-multimagmas and their relatives. Powerset liftings of relational monoids yield quantales [35,12]. Yet the precise lifting of source and target operations remains to be explored. This requires some preparation.
We write for the sup and for the inf operator, and ∨, ∧ for binary variants. We write ⊥ = Q = ∅ for the least and = Q = ∅ for the greatest element of Q. We write Q 1 = {α ∈ Q | α ≤ 1} for the set of subidentities of quantale Q.
A quantale is boolean if its lattice reduct is a complete boolean algebra-a complete lattice and a boolean algebra. We write − for boolean complementation. In a boolean quantale Q, the set of subidentities Q 1 forms a complete boolean subalgebra with complementation x = 1 − x restricted to this subalgebra, and in which composition is meet [15].
Our examples in Section 9 require weaker kinds of quantales. A prequantale is a quantale in which the associativity law is absent [34]. Proof. If (X, , s, t) is a catoid, then (X, , E) is a multimonoid by Proposition 3.10, hence isomorphic to a relational monoid, and its powerset algebra a quantale [35,12], in fact a boolean atomic one.

Remark 4.2.
If X is merely an st-multimagma, then PX forms a prequantale instead of a quantale [12,5]. This weaker result is needed in Section 6.

Remark 4.3.
Dualities between n + 1-ary relational structures and boolean algebras with n-ary (modal) operators have been studied by Jónsson and Tarski [29]; correspondences between relational associativity laws and those at powerset level are well-known from substructural logics. Here we consider ternary relations-as binary multioperations-and the quantalic composition as a binary (modal) operation. (2) Lifting the pair groupoid on X yields the quantale of binary relations over X. The quantalic composition is relational composition, the monoidal unit the identity relation, set union is sup and set inclusion the partial order. Relations are possibly infinite-dimensional boolean-valued square matrices with matrix multiplication as quantalic composition (Example 3.11).
The fact that groupoids can be lifted to algebras of binary relations with an additional operation of converse, R = {(y, x) | (x, y) ∈ R}, was known to Jónsson and Tarski [30]. It includes in particular groups as single-object groupoids. Further examples of powerset liftings of categories and other catoids can be found in Section 9.
The powerset lifting can be seen as a lifting to the function space 2 X , where 2 is the quantale of booleans. It generalises to function spaces Q X for arbitrary quantales Q [12]. We present a multioperational version.
Let (X, , s, t) be an st-multimagma and (Q, ≤, ·, 1) a quantale. For functions f, g : X → Q, we define the convolution * : For any predicate P we define In addition, we extend sups and ≤ pointwise from Q to Q X . This leads to the following generalisation of Proposition 4.1.

Theorem 4.5. If X is a catoid and Q a quantale, then
Proof. If (X, , s, t) is a catoid and Q a quantale, then (X, , E) is a multimonoid by Proposition 3.10 and a relational monoid up-to isomorphism. Hence Q X is a quantale [12] (shown for slightly different, but equivalent relational monoid axioms).
Further, Q X is distributive (as a lattice) if Q is, and boolean if Q is [12]. We call Q X from Theorem 4.5 the convolution quantale of X and Q. Remark 4.6. If X is an st-multimagma and Q a prequantale, then the convolution algebra Q X is a prequantale [12,5]. This result is needed in Section 7.
The following laws help working with convolutions. Using the notation if we regard f (x) · δ x and α · f , for any α ∈ Q and f : X → Q, as a scalar product in a Q-module on Q X . We can then rewrite convolution as and finally the identity function as id E = e∈E δ e . Example 4.7 (Convolution quantales over catoids). Once again we restrict our attention to categories.
(1) A category algebra is the convolution algebra of a small category with values in a commutative unital ring. This generalises group algebras such as group rings. Similarly, Theorem 4.5 constructs category quantales, evaluating small categories in quantales and yielding quantales as convolution algebras.
(2) An instance are Q-fuzzy relations [20], which are Q-valued binary relations. The associated quantales are convolution quantales over pair groupoids. If Q is the Lawvere quantale described in Example 4.8 below, this yields tnorms. Q-valued relations correspond to possibly infinite-dimensional Q-valued square matrices. If the base set is finite, we recover the matrix theories of Example 3.11. Heisenberg's original formalisation of quantum mechanics [26] is based on a similar convolution algebra over the pair groupoid [3] with values in the field C.

Modal quantales
The results of Section 4 do not lift the source and target structure of catoids to Q X faithfully: all relational units are mapped to the unit in Q by id E rather bluntly. A refinement, in which different elements of E may map to different elements in PX or different values in Q, is possible.

Example 5.1 (Relational domain and codomain). The relational domain and codomain operations in a relation quantale are, for
Thus dom(R) = s(R) and cod(R) = t(R), taking images on the right and computing s and t in the pair groupoid on X.
This can be captured more abstractly. A domain quantale [15] is a quantale (Q, ≤, ·, 1) with an operation dom : Q → Q such that, for all α, β ∈ Q, We refer to the domain axioms as absorption, locality, subidentity, strictness and (binary) sup preservation, respectively. In fact, dom(α)α = α. Henceforth we often continue to omit ·. The domain axioms are those of domain semirings [8]. Domain quantales are thus domain semirings with addition as binary sup. Properties of domain semirings are therefore inherited, for instance the export law dom(dom(α)β) = dom(α) dom(β), order preservation of dom the weak twisted law: In the last two laws, we have assumed that Domain axioms for finite sups suffice [15]. In any domain quantale, dom preserves arbitrary sups, dom ( A) = dom(A), hence in particular dom( ) = 1, and dom ( A) ≤ dom(A). Domain elements also left-distribute over non- Much of the structure of the domain algebra induced by dom is inherited from domain semirings as well. It holds that Q dom = dom(Q). The domain algebra (Q dom , ≤, ·, 1) is therefore a subquantale of Q that forms a bounded distributive lattice with · as binary inf. It contains the largest boolean subalgebra of Q bounded by ⊥ and 1 [8]. The elements of Q dom are called domain elements of Q. Yet, in the quantalic case, the lattice Q dom is complete [15]: dom( dom(A)) = dom(A) follows from sup-preservation of dom. All sups of domain elements are therefore again domain elements, but sups and infs in Q dom need not coincide with those in Q.
Quantales are closed under opposition: interchanging the order of composition in quantale Q yields the quantale Q op ; properties translate under this duality. The opposite of the domain operation is a codomain operation.
A codomain quantale is the opposite of a domain quantale, just like a codomain semiring is the opposite of a domain semiring. Codomain quantales can be axiomatised using a codomain operation cod : Q → Q that satisfies the dual domain axioms, making (Q op , cod) a domain quantale.
A modal quantale (Q, ≤, ·, 1, dom, cod) is a domain and codomain quantale that satisfies the following compatibility axioms, which make the domain and codomain algebras Q dom and Q cod coincide: Remark 5.2. In modal semirings, dom and cod can be modelled through their boolean complements in the subalgebras of subidentities-by antidomain and antirange operations. This allows expressing boolean complementation in Q dom , which becomes the largest complete boolean subalgebra of Q bounded by ⊥, 1 [8]. We lift from catoids, where complements of s and t may not exist, into arbitrary quantales, hence do not follow this approach.
Some of the st-multimagmas and catoids in the examples in Section 9 fail to yield associativity or locality laws when lifted. This requires more finegrained axiomatisations.
(1) A modal prequantale is based on a prequantale and, in its modal axioms, the two locality axioms are replaced by the export axioms Then Q dom = dom(Q) = cod(Q) = Q cod is still a complete distributive lattice, but even inequational locality laws for dom or cod are no longer derivable. (2) A weakly local modal quantale is a modal quantale in which the locality axioms for dom and cod have been replaced by the export axioms above. In the presence of associativity, the weak locality laws are then derivable, but locality still fails. As mentioned before, this hierarchy of definitions is reflected by lifting and modal correspondence properties in Sections 6-8 and justified by mathematically meaningful examples in Section 9.
All definitions and properties mentioned have been checked with Isabelle. They also hold of dioids, but have not been worked out in detail.

Modal powerset quantales
We outline how catoids lift to powerset algebras, using the lifted operations s, t : PX → PX defined, for all A ⊆ X, by Remark 6.1. To relate this with the lifting of the ternary relation R to a binary modality on the powerset quantale in the sense of Jónsson and Tarski, consider R(s) = {(x, y) | y = s(x)}, the graph of s, which is a functional binary relation, and likewise the graph R(t) of t. Then which shows that s and t are indeed modal diamonds on PX with respect to the standard Kripke semantics. The next lemmas show that they satisfy the laws for operators on boolean algebras.
Our main aim is to verify the domain quantale axioms and then use properties of domain and codomain to infer that local catoids can be lifted to boolean modal power set quantales. We develop this theorem step-by-step, starting from st-multimagmas to clarify correspondences.  The proof has been verified with Isabelle. It is subsumed by Theorem 7.1. As powerset liftings are important and the proof may be instructive, we present details in [14]. Lemma 6.2 shows that the domain axioms, except locality, can already be lifted from st-multimagmas. The identities in (4) are subsumed by those in (3) in powerset quantales, but needed for lifting to modal semirings; see Section 7. This is why we list them.
Lifting weak variants of locality for s and t requires catoids. Lifting locality, in addition, requires local catoids. Lemma 6.3. Let X be a catoid and A, B ⊆ X. Then and The converse inclusions hold if X is local.
The proofs have again been checked with Isabelle. Weak locality holds in any weakly local modal semiring and quantale (which satisfy export axioms, see Section 5).
The results of the previous two lemmas can be summarised as follows.
, for all A ⊆ X, and the complete boolean algebra is atomic.
Proof. We have derived the respective variants of modal prequantale and quantale axioms in Lemmas 6.2 and 6.3 for st-multimagmas, catoids and local catoids. They hold with the boolean prequantale and quantale axioms lifted via Proposition 4.1 and the remark following it.
The three items in Theorem 6.4 emphasise the role of locality in the three stages of lifting. The construction follows one direction of Jónsson-Tarski duality between relational structures and boolean algebras with operators [29], which generalises to categories of relational structures and boolean algebras with operators [21]. Theorem 6.4 is an instance of this duality. Like in modal logic, there are correspondences between relational structures and boolean algebras with operators. The identities lifted in Lemma 6.2 and 6.3 are one direction of these. They are generalised in Section 8. (1) Any category lifts to a modal powerset quantale. It is boolean and has the arrows of the category as atoms. The domain algebra is the entire boolean subalgebra of subidentities, the set of all objects of the category (or its identity arrows). A modal powerset algebra can thus be constructed from any category.
(2) In the modal powerset quantale over the pair groupoid on X, the modal quantale of binary relations, domain and codomain elements are the relational domains and codomains from Example 5.1. The domain algebra is formed by the relations below Id X . In the associated matrix algebras, these correspond to (boolean-valued) subidentity matrices and further to predicates (Example 3.11). The consideration of domain refines Jónsson and Tarski's classical lifting result from pair groupoids to relation algebras, while we ignore the converse structure.
(3) In this and the next example, locality at powerset-level fails. Recall that the functional catoid of the broken monoid (Example 3.11) is only weakly local. The powerset quantale is therefore only weakly local, too. To check this, we simply replay the non-locality proof for the functional catoid with A = {a}: (A dom(A)). Locality of codomain is ruled out by duality.
(4) Locality of domain and codomain of the powerset algebra over the non-local partial abelian monoid of heaplets is ruled out with singleton sets as above, using the non-locality argument from Example 3.11. The powerset quantale of heaplets is an assertion quantale for separation logic with separating conjunction as quantalic composition. In separation logic, another notion of locality relates to a frame rule of its inference system. It is completely unrelated to the notion used in this article.
In these examples, antidomain and anticodomain can be defined along the lines of Executing R from all those inputs that may lead into dom(S) and restricting the outputs of R to dom(S) is only the same when R is a function.
A dual example for cod and (D3c) uses the converses of R and S. The discussion above implies that (D3c) does not hold for general functions, but it does for monos in Rel.
We thus remain within the realm of modal quantales as opposed to function systems. Weak variants of Schweizer and Sklar's axioms (3c) and (D3c), α dom(β) ≤ dom(αβ)α and cod(α)β ≤ β cod(αβ), can be derived in any modal semiring, as already mentioned. Yet they need not hold in modal prequantales. The equational catoid variants of Axioms (3c) and (D3c) do not lift to powersets. A theorem by Gautam [19] shows that identities lift to the powerset level if and only if all variables in the identity occur precisely once on each side. Neither the generalisations of (3c) and (D3c) satisfy this condition, nor their equational specialisations.
Remark 6.7. The functor G : Set → Rel that maps functions to their graph associates convolutions of (graphs of) functions with function composition G(f ) G(g) = G(f ; g) = G(g • f ) and distributes over dom: Axiom (3c) can then be derived in the convolution algebra: It depends on the form of convolution for (graphs of) functions and is beyond the general lifting by convolution. The case of (D3c) is analogous.
An asymmetry between catoids and modal quantales remains. While the domain quantale axioms are equations, we do now know an finitary equational axiomatisation for catoids.

Modal convolution quantales
We now prove our first main theorem, and perhaps the most useful one. It refines both the lifting from catoids to convolution quantales in Theorem 4.5 and the lifting from catoids to modal powerset quantales Theorem 6.4, namely to modal convolution quantales.
Once again we aim to spell out the conditions on the algebras used in the lifting. Yet first we generalise the definitions of domain and codomain at powerset level to convolution quantales. For every st-multimagma X, modal prequantale Q and f : X → Q we define and (1) Then (Q X , ≤, * , id E , Dom, Cod) is a modal prequantale.
(2) It is a weakly local modal quantale if X is a catoid and Q a weakly local modal quantale. (3) It is a modal quantale if X is also local and Q a modal quantale.
Proof. Relative to Theorem 4.5 and the remark following it we need to check the domain and codomain axioms. We show proofs up-to duality. We point out where an st-multimagma X together with a modal prequantale Q or a catoid together with a weakly local modal quantale suffices for the lifting: this is the case in (1)-(5) below. It is convenient to view α · δ x as an element of the convolution algebra or a Q-module. (1) First we show sup-preservation in Q X , assuming this law in Q: The first step unfolds the definition of Dom. The second uses its sup-preservation in modal quantales. The third folds back its definition. Preservation of binary sups and domain strictness, Dom(λx. ⊥) = ⊥, follow.
(2) For the first compatibility axiom in Q X , assuming such laws in X and Q, = Cod(f ).
The first step unfolds the definitions of Dom and Cod. The second one uses x = t(y), the third sup-preservation of dom and the fourth compatibility for dom and cod, s and t. The last step folds back the definition of Cod.
(3) For the domain subidentity axiom in Q X , assuming this law in Q, The second step uses the domain subidentity axioms in Q and the fact that x ∈ E if and only if x = s(x). The last step uses one of the Q-module-style laws following Remark 4.6.
(4) For domain absorption in Q X , assuming such laws in X and Q, The first step unfolds the definition of Dom and convolution. The second uses x = s(z) and sup-preservation of composition in Q. The third holds because [w ∈ s(z) y] is ⊥ unless y = z, in which case it is 1, and because s(z) y = s(z) s(y) y = ∅ unless y = z by the orthogonality law for s preceding Lemma 3.3. The fourth follows from the absorption laws for s and dom. The final one uses a Q-module-style property following Remark 4.6. (5) For domain export in Q X , assuming such laws in X and Q, The first step unfolds the definitions of Dom and convolution. The second applies the distributivity laws for dom and quantalic composition; at the same time it uses y = s(w) and x = s(x) and the fact that therefore x ∈ y z if and only if s(x) ∈ s(y z). The third uses the export laws for dom and s. The fourth uses x = s(x) and the definition of convolution with respect to x. The final step folds back the definitions of Dom. This is a domain axiom for prequantales, as already mentioned. (6) For weak domain locality in Q X , assuming such laws in X and Q, = Dom(f * Dom(g)).
After the usual unfoldings in the first step, the second uses sup-preservation of dom, the fact that x = s(x) and that therefore x ∈ y z if and only if s(x) ∈ s(y z). The third uses locality of dom and s. The fourth uses suppreservation of dom, the fact that x ∈ y s(z) if and only if s(x) ∈ s(y s(z)), Full modal correspondence results for Q-valued functions are more complicated than for powersets. They are investigated in the next section. Examples for all three cases of Theorem 7.1 are presented in Section 9.
Next we return to our two running examples.

Example 7.3 (Modal convolution quantales over catoids).
(1) In the construction of category quantales, the st-structure of the underlying category lifts to the modal structure of the convolution quantale. Any category can therefore be lifted to a Q-valued modal convolution quantale.
(2) As an instance, for any modal quantale Q, the convolution algebra Q X over the pair groupoid X forms a modal quantale. In this algebra, and likewise for Cod. The subalgebra of weighted domain and codomain elements is then the algebra of all weighted elements below the identity relation. These can be identified with Q-valued predicates. For Q = 2, this reduces to the standard definitions of dom and cod in the quantale of binary relations. We may view Q-valued relations as possibly infinite dimensional matrices. Domain and codomain elements then correspond to diagonal matrices with values given by domain and codomain elements below 1 in Q along the diagonal and ⊥ everywhere else. For instance, This refines the matrix theories from Example 3.11.
The matrix example does not actually require a quantale as value algebra: in a finite weighted relation, the summation used in relational composition, that is, matrix multiplication, is over a finite set and can be represented by a finite supremum. In the absence of domain and codomain in the value algebra, even a semiring can be used. More generally, we can require that the multioperation of the catoid satisfies a finite decomposition property. Here are two classical examples beyond matrices.
(1) Schützenberger and Eilenberg's approach to weighted languages, discussed in the Introduction, generalises language products to convolutions of functions Σ * → S from Σ * into a semiring S [13]. A semiring suffices for convolutions because the number of prefix/suffix pairs into which any finite word in Σ * can be split is obviously finite. The resulting convolution algebra is then a semiring.
(2) Rota's incidence algebra [36] of functions P → R from a poset P to a commutative ring R requires P to be locally finite, that is, every closed segment [x, y] = {z | x ≤ z ≤ y} must be finite. The incidence algebra is then an associative algebra in which the sup of the convolution is replaced by a summation in R. See also Section 9.
Alternatively, in group rings, it is usually assumed that functions G → R have finite support, yet we focus on the property used for matrices, formal powerseries and incidence algebras in this article.
A multimagma (X, ) is finitely decomposable if for each x ∈ X the fibre −1 (x) = {(y, z) | x ∈ y z} is finite. The following variant of Theorem 4.5 is then immediate from corresponding results for relational monoids [5].
Theorem 7.4. Let X be a finitely decomposable catoid and (S, +, ·, 0, 1) a semiring. The convolution algebra S X is then a semiring.
A direct proof requires verifying that all sups in the proof of Theorem 4.5 remain finite if X is finitely decomposable. The operation + of semirings corresponds to ∨ in quantales, 0 corresponds to ⊥.
This result extends to domain semirings. Formally, a domain semiring [8] is a semiring (S, +, ·, 0, 1) with a domain operation dom : S → S that satisfies the same domain axioms as those of domain quantales, replacing ⊥ by 0 and ∨ by +. Every domain semiring is additively idempotent. The relation ≤, defined as λx, y. x + y = y, is thus a partial order. A modal semiring is a domain semiring and a codomain semiring, defined as for quantales by opposition, which satisfies cod • dom = dom and dom • cod = cod.
Verifying finiteness of sups in the proof of Theorem 7.1 then extends Theorem 7.4 as follows.
Proposition 7.5. If X is a finitely decomposable catoid and S a modal semiring, then the convolution algebra S X is a modal semiring.
The small sup-preservation properties of Lemma 6.2(4) are needed in the proof. The result can be adapted to st-multimagmas and modal presemirings, and to catoids and weakly modal semirings, as in previous sections.

From liftings to correspondences
In Section 7 we have presented liftings from st-multimagmas to modal convolution prequantales. These yield one direction of a modal correspondence triangle formed by two-out-of-three properties for st-multimagmas X, modal prequantales Q and modal prequantales Q X . For relational semigroups and monoids, the triangles from [5] show that certain properties in any two of a relational magma X, a prequantale Q and a prequantale Q X induce corresponding properties in the remaining algebra, for instance associativity. They (1) If Q X is a unital prequantale and 1 = ⊥ in Q, then X is an st-multimagma. (2) If Q X is a unital prequantale and X an st-multimagma, then Q is unital.
Proof. The results are known for relational magmas [5,Proposition 4.1] and thus hold for multimagmas. Proposition 3.10 translates them to st-multimagmas.
The restriction ⊥ = 1 in Proposition 8.1 is weak: We now complete the correspondence triangle, refining Proposition 8.1 to variants of modal quantales. Relative to Proposition 8.1 we only consider the st-axioms and the modal ones for prequantales and quantales while assuming the multimagma and prequantale ones. We use a technique from [5] which in turn comes from representation theory.
In the following, we assume that s, dom and Dom, and similarly t, cod and Cod, are related as in Theorem 7.1. Thus and therefore Dom(δ x ) = δ s(x) with dual laws for Cod. Moreover, and in particular (δ x * δ y )(z) = [z ∈ x y].
We first link properties of X with those of Q and Q X via δ-functions.

Lemma 8.2.
Let X be a multimagma with s, t : X → X, let Q and Q X be prequantales with dom, cod : Q → Q and Dom, Cod : Q X → Q X . Then, for all α, β ∈ Q and x, y, z ∈ X,

) Corresponding properties hold for Cod, cod and t.
Proof. We write δ α x for αδ x and drop multiplication symbols as convenient. (1) The first proof uses the above law for Dom(δ α x ) together with the usual conditions imposed by δ: (2) The first step uses the law for Dom and unfolds the definition of convolution. The second uses sup-preservation of dom and simplifications based on δ. The third uses z = s(z) and that z ∈ s(x)y if and only if z = s(z) ∈ s(s(x)y).
(3) The following proof uses the law for Dom and properties of δ.
(4) The steps in the following proof should now be clear.
The following statements add structure to Proposition 8.1 (1). They expose the laws in Q and Q X needed to derive the catoid axioms, with and without locality. The catoid structure comes from [5,Corollary 4.7] for relational semigroups together with Proposition 3.10, which translates it to catoids. Proving them requires mild assumptions on X and Q or Q X .
The catoid X is therefore completely determined by elements below id E , more specifically, functions δ s(x) and their relations to the elements in X. We calculate the absorption law for s explicitly as an example of the technique used: with Lemma 8.2 (1), Hence s(x) x = {x} whenever the corresponding domain absorption law holds in Q X and 1 = ⊥ in Q. The fact that Dom appears in the calculation does not go beyond Proposition 8.3: The next statement adds locality to the picture.

implies s(x s(y)) = s(x y).
Finally, we turn to the correspondences from X and Q X to Q. We first consider modal axioms in Q that do not depend on catoids. Similarly to the assumption that 1 = ⊥ in Q above, we need to assume the existence of certain elements in X. Theorem 8.5. Let X be an st-multimagma in which there exist x, y, z, w ∈ X, not necessarily distinct, such that s(x) s(y) = ∅ and z w = ∅, let Q be a prequantale and Q X a modal prequantale such that id E = ⊥.
(2) It is a weakly modal quantale if X is a catoid and Q X a weakly local quantale.

(3) It is a modal quantale if X is also local and Q X a modal quantale.
Proof. By definition, ∅ = E ⊆ X. We verify the modal quantale axioms in Q, using in each case the corresponding axiom in X and Q X . Suppose X is an st-multimagma and Q X a modal prequantale with id E = ⊥.
For domain absorption, using Lemma 8.

Examples
In this section we list additional examples of modal convolution quantales. We start with those related to categories. (1) A digraph K is a pair s, t : E → V of source and target maps from a set E of edges into a set V of vertices. The path category on K has elements V as objects and sequences π = (v 1 , e 1 , v 2 , . . . , v n−1 , e n−1 , v n ) : v 1 → v n , in which vertices and edges alternate, as arrows. Composition (as usual, we reverse the order of the standard composition) π 1 · π 2 of π 1 : v 1 → v 2 and π 2 : v 3 → v 4 is defined whenever v 2 = v 3 , and it concatenates the two paths while gluing the common end. Sequences (v) of length 1, considered as paths of length 0, are identities. Path categories are local functional catoids with s(π) = (v 1 ) and t(π) = (v n ). By Theorem 7.1, the convolution algebra or category algebra over the path category of any digraph with values in Q is a modal quantale for any modal quantale Q. As paths are finitely decomposable, Q could be a modal semiring.
(2) A special path category is generated by the one-point digraph with n arrows, the free monoid with n generators. The st-structure and hence the modal structure is then trivial. Lifting along Theorem 7.1 yields the quantale or semiring of weighted languages. (4) Forgetting the internal structure of paths and keeping only their ends, brings us back to the pair groupoid and weighted binary relations.
In applications, paths could be execution sequences of programs, automata or transition systems. Sets of paths might model the behaviours of concurrent or distributed computing systems. Lifting along Theorem 6.4 constructs modal path quantales at powerset level; lifting along Theorem 7.1 the associated modal convolution quantales of Q-weighted paths. Once again, for finite paths, semirings suffice as weight algebras. Algebras of weighted paths are generally important for quantitative analyses of systems or the design of algorithms. The construction of the modal powerset quantale over the path category of a digraph has recently been extended to higher-dimensional modal Kleene algebras and higher-dimensional (poly)graphs [2], which applications in higher rewriting. Example 9.2 (Modal incidence algebras over categories of segments). The arrows or pairs in poset categories, as in Example 2.2(4), represent (closed) segments of posets; those of linear orders represent (closed) intervals. By Theorem 6.4, for any modal quantale Q, the convolution algebra or category algebra over a poset category with values in Q forms a modal quantale.
Without the modal structure, such convolution quantales have been studied [12]. When the underlying total orders are locally finite, that is, all segments and intervals are finite (all arrows in the poset category are finitely decomposable), values can be taken in (semi)rings and the convolution algebras become incidence algebrasà la Rota [36]. The general setting supports algebraic generalisations of duration calculi [41,12]. It specialises to interval and interval temporal logics [24,33] for powerset liftings. The additional modal structure enriches algebras for reasoning about states as well as intervals and supports mixed modalities over weighted intervals and their endpoints. This, and applications to weighted and probabilistic interval temporal logics and duration calculi, remains to be explored.
Our next example considers catoids that arise from composing digraphs, but we specialise to finite posets. We show how locality can be obtained by introducing interfaces. (1) Finite posets form functional catoids (based on classes) with respect to serial composition, which is the disjoint union of posets with all elements of the first poset preceding that of the second one in the order of composition. This yields partial monoids with the empty poset as unit and hence functional catois in which s and t map every poset to the empty poset. The algebra is thus not local and does not form a category. The convolution algebras are therefore weakly local quantales, but the modal structure is trivial as Dom and Cod map the empty poset to ⊥ and any other element to id {1} . The powerset lifting yields poset languages.
(2) The points of finite posets can be labelled with letters from some alphabet. Equivalence classes of such labelled posets can be taken with respect to the isomorphism that preserves the order and labels, but forgets the names of nodes. This leads to partial words [22], also called pomsets in concurrency theory. The serial composition becomes total on equivalence classes, making the resulting catoid a monoid and hence a category.
(3) Winkowski has equipped finite pomsets with interfaces [40]. The source interface of a pomset consists of all its minimal elements (with their labels); its target interface of all its maximal elements (again with their labels). Pomsets with interfaces form a functional catoid with s mapping every pomset to its source interface, t mapping every poset to its target interface. Composition glues pomsets on their interfaces whenever they match, the order is extended as in the previous example. The functional catoid of such pomsets with interfaces is local and thus a category. Winkowski also defines a parallel composition that turns pomsets with interfaces into a partial monoidal category (parallel composition is a partial tensor).
Winkowski's pomsets with interfaces have been generalised to posets in which interfaces may be arbitrary subsets of minimal or maximal elements of posets [16]. Our lifting results extend to the resulting categories. Digraphs with interfaces can alternatively be composed by juxtaposing these objects and then making interface nodes disappear in the composition. This yields again categories, yet with different units given by identity relations [28,18]. The usual liftings apply. In all these examples one considers an additional operation of parallel composition, which is simply the coproduct of posets or digraphs. For these, the powerset lifting yields standard models of concurrency.
The next example lifts a local st-multimagma to a modal prequantale.

Example 9.4 (Weighted path languages in topology).
(1) A path on set X is a map f : [0, 1] → X, where one usually assumes that X is a topological space and f continuous. The source of path f is s(f ) = f (0), its target t(f ) = f (1). Two paths f and g in X can be composed whenever t(f ) = f (1) = g(0) = s(g), and then The parameterisation destroys associativity of composition. Consequently, (X [0,1] , ·, s, t) is only a functional st-multimagma. The lifting to P(X [0,1] ) satisfies the properties of Lemma 6.2, but even weak locality fails due to the absence of associativity in X [0,1] and, accordingly, P(X [0,1] ). The same failure occurs when lifting to a convolution quantale Q X [0,1] along Theorem 7.1: associativity of the modal (pre)quantale Q of weights makes no difference; the convolution algebra forms merely a modal prequantale whenever Q does.
(2) Path composition is of course associative up-to homotopy. The associated local functional catoid can then be lifted to a modal convolution quantale like any other category. Associativity can also be enforced by considering paths up-to reparametrisation equivalence [17]. writing |f | instead of n and likewise, Lifting along Theorem 6.4 now yields modal convolution quantales appropriate, for instance, for interval temporal logics [33] or durational calculi [41] for hybrid or continuous dynamical systems (paths could correspond to trajectories for initial value problems for vector fields or systems of differential equations). Lifting along Theorem 7.1 might yield algebraic models of weighted, probabilistic or stochastic systems with continuous dynamics. Example 9.5 (Δ-sets). A presimplicial set [37] K is a sequence of sets (K n ) n≥0 equipped with face maps d i : Elements of K n are nsimplices. Presimplicial sets generalise digraphs: K 0 , K 1 are the sets of vertices and edges of a digraph, respectively; d 0 , d 1 : K 1 → K 0 are the source and target maps. Higher simplices represent compositions of edges. For edges x, y ∈ X 1 , for example, a 2-simplex z ∈ K 2 with d 2 (z) = x and d 0 (z) = y reflects the fact that the edge d 1 (z) is a composition of x and y. For given x and y there may be many such 2-simplices z, or none at all.
There are several ways of constructing a catoid from a presimplicial set K [14]. For 0 ≤ i ≤ n and x ∈ K n , let By definition, s i (x), t i (x) ∈ K i . The coproduct of simplices K = n≥0 K n forms a graded catoid (K, , s, t) with x ∈ y z if and only if y = s i (x) and z = t n−i (x) for some i and s(x) = s 0 (x), t(x) = t 0 (x). Associativity follows from the relationship t j (s i (x)) = s j (t k (x)) that holds for all x ∈ X n and 0 ≤ i, j, k ≤ n such that i + k = n + j.
In general, the graded catoid (K, ) is neither local nor functional. These properties hold if K is the nerve of a category C (we omit degeneracies). In this case, elements of K n are sequences of morphisms with s(x) = (c 0 ) and t(x) = (c n ), while is sequence concatenation. Example 9.6 (Precubical sets). A precubical set X [39,23] is a sequence of sets (X n ) n≥0 equipped with face maps d ε i : 1}. Like presimplicial sets, precubical sets generalise digraphs: X 0 and X 1 may be regarded as sets of vertices and edges, respectively, and d 0 1 , d 1 1 : X 1 → X 0 as source and target maps. Higher cells represent homotopies between paths. A square x ∈ X 2 , for example, reflects the fact that the paths (d 0 1 (x), d 1 2 (x)) and (d 0 1 (x), d 1 1 (x)) are homotopic. For a subset A = {a 1 < · · · < a k } ⊆ [n] = {1 < · · · < n}, n > 0 and ε ∈ {0, 1}, define the iterated face map d ε A : X n → X n−|A| as d ε . The precubical set X then forms catoid (X, , s, t) where for all x ∈ X n . Like in the previous example, the catoid X is neither local nor functional.
A special case of this example is the shuffle multimonoid from Example 2.2. Let Σ be a finite alphabet, X n the set of all words of length n, and d ε i : X n → X n−1 the map that removes the i-th letter. Then X = (X n , d ε i ) is a precubical set and the associated catoid (X, , s, t) is the shuffle multimonoid on Σ. There is only one unit-the empty word-and the catoid is finitely decomposable. Correspondences for Q-weighted shuffle languages are discussed in [5]. The dom/cod-structure of the convolution algebra is trivial.
Our final example is a weakly local modal convolution quantale. Example 9.7 (Weighted assertions in separation logic). Lifting the non-local functional catoid of heaplets along Theorem 7.1 yields a weakly local modal quantale as the convolution algebra, yet with trivial modal structure as the empty heaplet is the only unit [11] and there are no elements between ∅ and {ε}. This models weighted assertions of separation logic, including fuzzy or probabilistic ones.

Quantitative modal algebras
The domain and codomain operations yield modal diamond and box operators on the convolution algebra, as usual for modal semirings [8]. Many properties of such semirings translate automatically to quantales, and additional ones hold. Forward and backward modal diamond operators can be defined in a modal quantale Q, as on any modal semiring, for α, β ∈ Q: and α|β = cod(βα).
They are related by opposition and the following conjugation [8].
Another consequence of locality is that |α β = |α dom(β), so that β is automatically a domain element. We henceforth indicate this by writing |α ρ for ρ ∈ Q dom . Further, locality of s and t is equivalent to |αβ = |α • |β and αβ| = β| • α|, which are standard properties standard of modal logics. Without locality, only inequalities hold. Proof. The dom and cod operations preserve all sups in the complete lattice Q dom ( = Q cod ) [15]. Thus diamonds preserve all sups, too: for all P ⊆ Q dom , Sup preservation of α| follows by duality.
Proof. Straightforward from De Morgan duality.
While the De Morgan dualities do not depend on locality, the conjugations and adjunctions require these laws.
Remark 10.8. When the catoid X is finitely decomposable, one can use boolean modal semirings, that is, boolean monoids equipped with the usual domain axioms, in the lifting. Boolean monoids are essentially boolean quantales in which only finite sups and infs are assumed and required to be preserved, including empty ones. It follows that, if X is a finitely decomposable local catoid and Q a boolean modal semiring, then Q X is a boolean modal semiring.
Next, we consider the modal operators in the convolution quantales Q X and relate them with similar properties in X and Q. For diamonds, and and as upper adjoints are lower adjoints in the dual lattice, [f (y)|g(z).
Using locality s(x y) = s(x s(y)) and likewise for t makes these identities slightly longer, but more symmetric. Alternatively, we can write The shape of the laws for the remaining boxes and diamonds is then obvious. (1) In the modal powerset quantale over the path category from Example 9.1, elements are sets of paths. Domain elements are formed by the source elements in the set, codomain elements by its target elements. Both are vertices as paths of length 0. Thus, for any set of paths A and set of vertices P ⊆ V , is the set of all vertices in V from which one may reach a vertex in P along some path in A. Dually, A|P models the set of all vertices in V that one may reach from a vertex in P along some path in A. Moreover, (v) = s(π) ⇒ t(π) ∈ P } models the set of all vertices from which one must reach a vertex in P along all paths in A, and [A|P the set of vertices one must reach from a vertex in P along all paths in A. The shape of the modal operators in algebras of continuous paths in Example 9.4 is similar.
(2) The modal operators in the modal powerset quantale on the pair groupoid, the quantale of binary relations, are the standard ones with respect to Kripke semantics. Up to isomorphism between predicates and subidentity relations, for binary relation R and predicate P , and likewise for R|P and [R|P .
Similar constructions apply to the other powerset algebras over catoids outlined in Section 9. Working out details is routine. (1) For weighted relations, the forward diamond is For finite relations we obtain matrices. In the 2 × 2 case, for instance, The other modalities satisfy similar laws. The diagonal matrices are isomorphic to vectors and the computation performed corresponds to a linear transformation of a vector, except for the diamonds on the diagonal.
(2) In the modal quantale of weighted paths, For finite graphs, δ ) v can again be seen as a diagonal matrix or vector of weighted vertices, and f (x) as a matrix labelling pairs of vertices with the set of weights of the (hom-set) of paths between them. Multiplications with δ dom (g(v)) v then project on the paths with targets in v. Taking the diamond yields the supremum of the weights of all paths that end in a vertex in v.
From a linear algebra point of view, the occurrences of dom or cod in the computations of weights are irritating. Yet the correspondence results in Sections 7 and 8 show that the condition that Q be a modal quantale cannot be weakened. The approach is thus too restrictive, for instance, for deriving probabilistic predicate transformer semantics where states and relations carry more general weights. In the probabilistic quantale from Example 4.8, in particular, it is easy to check that Q s = {0, 1}, which precludes any assignment of non-trivial weights to states of a system.
Predicate transformers, however, are more general than modal Kleene algebras: they are order-, sup-or inf-preserving maps between (complete) lattices. The absorption laws dom(α)·α = α and α·cod(α) = α seem irrelevant for them. Only an action on weighted relations is needed beyond properties like sup-preservation. This is given by domain and codomain locality, as discussed at the beginning of this section. Locality lifts from X to Q X even if Q is only a quantale. To explain this, we redefine domain on Q X , using f (y) instead of dom(f (y)), and likewise for Cod. Then, for locality in Q X and Q merely a quantale, replaying part (6) the proof of Theorem 7.1. The first step unfolds the revised definition for Dom and convolution. The second uses v = s(x) and the fact that x ∈ y z if and only if s(x) = v ∈ s(y z). The third applies locality of s. The fourth, like its counterpart in part (6) of the proof of Theorem 7.1, brings g(z) in shape for the last step of the proof. The proof for Cod is dual, as usual. Domain export lifts in the same way: = (Dom(f ) * Dom(g))(v), and again the proof for codomain export, with Q being merely a quantale, is dual. But it is easy to check that absorption laws can no longer be lifted. The shape of the backward diamond is then obvious by duality. In the matrix case, our previous example now reduces to This has the right form for stochastic matrices and probabilistic predicate transformers, using the probabilistic quantale from Example 4.8.
We have checked with Isabelle that, without absorption laws, domain elements still form a subalgebra and that commutativity lifts whenever Q is abelian. (The proofs are routine. We have not added them to the Isabelle repository, as theories from another repository (Archive of Formal Proofs) need to be downloaded to make them compile.) Idempotency of domain elements does not lift, which is consistent with the fact that multiplication of diagonal matrices is not in general idempotent. This is appropriate for vector spaces and similar structures. Developing the "modal" algebras of such approaches and exploring applications is left for future work.

Conclusion
We have introduced catoids and used them to obtain a triangle of equational correspondences between them, modal value quantales and quantale-valued modal convolution quantales, explaining in particular the origin of locality in axiomatisations of domain semirings and quantales in terms of the composition pattern for categories. Our results yield a generic construction recipe for modal quantales: one gets such quantales for free as soon as the much simpler underlying local catoid has been found. The relevance of this approach has been illustrated by a list of examples from mathematics and computing.
We finish with directions for future work: In combination with previous work on concurrent relational monoids and concurrent quantales [5], it seems interesting to build models for non-interleaving concurrent systems based on po(m)sets and graphs with interfaces and lift them to modal concurrent semirings and quantales. Along similar lines it seems possible to define higherdimensional globular catoids as generalisations of 2-categories and prove correspondence results with respect to the higher globular Kleene algebras introduced for higher rewriting [2]. Ultimately, this should lead to ω-catoids as generalisations of ω-categories and the corresponding ω-quantales, which would share features of modal and concurrent quantales, in combination with axioms for globular structure.
Further, the relevance of the weakened domain and codomain quantales of Section 10 for the verification of quantitative computing systems, in particular stochastic and probabilistic ones, remains to be explored.
We also aim at a categorification of the approach in terms of monoidal categories with Day convolution. While this adds generality, we have chosen a simpler algebraic approach in this work with a view on software verification applications with proof assistants like Isabelle, where reasoning with monoidal categories, coends or coherence conditions seems currently unwieldy. Relational monoids, catoids and the construction of convolution quantales have already been formalised with Isabelle [9]; Isabelle verification components for separation logic use a less general approach with partial abelian monoids and generalised effect algebras instead of catoids [10].
Last, but not least, Jónsson-Tarski duality should be related to the convolution algebra setting and the role of the weight algebras should be explained.
Funding Information Open access funding provided by NTNU Norwegian University of Science and Technology (incl St. Olavs Hospital -Trondheim University Hospital) Data availability statement Data generated for this study is available at https:// github.com/gstruth/catoids . Open Access. This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. org/licenses/by/4.0/.
Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
In addition, Schweizer and Sklar consider the identity Vol. 84 (2023) Catoids and modal convolution algebras Page 37 of 40 10 which is valid in some, but not all function systems. They point out that all axioms except (3c), which has subsequently been called twisted axiom, hold of binary relations. Schweizer and Sklar's axioms use function composition • instead of ·. • A domain semigroup [6] is a semigroup (X, ·) with a binary operation dom : X → X that satisfies dom(x · y) = dom(x · dom(y)), dom(x) · dom(y) = dom(y) · dom(x). (D4) • A modal semigroup is a domain semigroup X equipped with a codomain operation cod : X → X that satisfies opposite laws, in which the arguments of composition have been swapped, and the compatibility laws dom • cod = cod and cod • dom = dom.
The axioms (D3), (D4) and the dual codomain axioms are derivable in function systems. Conversely, the function system axiom (3b) is derivable in modal semigroups. Disregarding the twisted law, function systems are therefore a more compact, but equivalent axiomatisation of modal semigroups.