Category of Multisets and Spans

90 Views Asked by At

I have been thinking about multisets for a while. These are sets where elements can repeat, so $S =\{ a,a,b,c,b\}$ is a multiset on the set $A = \{a,b,c\}$.

I have also been looking into morphisms between multisets. Take two multisets $S_A, S_B$ with underlying sets $A, B$. I would like to define a morphism between multisets $S_A, S_B$ as a span on the underlying sets, so $f = A \leftarrow C \rightarrow B$, and $f: S_A \rightarrow S_B$.

Here is how I am defining the morphisms. Take a multiset $S_A$ and let $a_i$ be one of the terms, likewise for $S_B$ and $b_j$. We have an indexing set $C$ and let the $f, g$ be arms of a span so $f: C \rightarrow A$ and $g: C \rightarrow B$. Let $c_i \in C$ and let $f(c_i)$ be the set element of term $a_i$, likewise for $g(c_j)$.

I am not sure how to define span composition. I want a category of multisets with morphisms as defined. Does there exist a composition that gives such a category? I realize there are many options for defining the composition, and I really don't know which one I want. Is there a body of work that focuses on what all the different choices of composition mean for this particular problem?

Does my definition of the objects and morphisms define a category?