We give a lightweight alternative construction of Jacobs's distributive law for multisets and distributions that does not involve any combinatorics. We first give a distributive law for lists and distributions, then apply a general theorem on 2-categories that allows properties of lists to be transferred automatically to multisets. The theorem states that equations between 2-cells are preserved by epic 2-natural transformations. In our application, the appropriate epic 2-natural transformation is defined in terms of the Parikh map, familiar from formal language theory, that takes a list to its multiset of elements.
翻译:我们为Jacobs关于多重集与分布的分配律给出了一个轻量级的替代构造,该构造不涉及任何组合学。我们首先给出列表与分布的分配律,然后应用一个关于2-范畴的一般定理,该定理允许列表的性质自动传递到多重集。该定理表明,2-胞腔之间的等式由满态射的2-自然变换保持。在我们的应用中,适当的满态射2-自然变换通过形式语言理论中熟知的Parikh映射来定义,该映射将列表映射为其元素的多重集。