Compositionality is at the heart of computer science and several other areas of applied category theory such as computational linguistics, categorical quantum mechanics, interpretable AI, dynamical systems, compositional game theory, and Petri nets. However, the meaning of the term seems to vary across the many different applications. This work contributes to understanding, and in particular qualifying, different kinds of compositionality. Formally, we introduce invariants of categories that we call zeroth and first homotopy posets, generalising in a precise sense the pi0 and pi1 of a groupoid. These posets can be used to obtain a qualitative description of how far an object is from being terminal and a morphism is from being iso. In the context of applied category theory, this formal machinery gives us a way to qualitatively describe the "failures of compositionality", seen as failures of certain (op)lax functors to be strong, by classifying obstructions to the (op)laxators being isomorphisms. Failure of compositionality, for example for the interpretation of a categorical syntax in a semantic universe, can both be a bad thing and a good thing, which we illustrate by respective examples in graph theory and quantum theory.
翻译:组合性是计算机科学以及应用范畴论中若干其他领域(如计算语言学、范畴量子力学、可解释人工智能、动力系统、组合博弈论和佩特里网)的核心。然而,该术语的含义在不同应用中似乎有所差异。本文旨在理解并特别定性不同类型的组合性。形式上,我们引入了范畴的不变量,称为零阶和一阶同伦偏序集,在精确意义上推广了群胚的π0和π1。这些偏序集可用于定性描述一个对象距离终对象有多远,以及一个态射距离同构有多远。在应用范畴论的背景下,这一形式化工具通过分类(反)松弛函子成为强函子的障碍,为我们提供了一种定性描述“组合性失效”(即某些(反)松弛函子未能成为强函子)的方法。组合性失效——例如在语义宇宙中解释范畴语法时——既可能是坏事也可能是好事,我们通过图论和量子理论中的相应例子来说明这一点。