Applied Category Theory 2023
2023-08-04
% https://tex.stackexchange.com/a/269194
Mathematical modeling of open systems as cospans goes back 25+ years.
\[ a \rightarrow x \leftarrow b \]
Usually the system itself is “more structured” than its boundary:
Some early references: (Katis, Sabadini, and Walters 1997), (Rosebrugh, Sabadini, and Walters 2005)
Open systems should form a categorical structure, most obviously a category:
Example: Category of cospans
Given a category \(\mathsf{S}\) with pushouts, there is a category \(\mathsf{Csp}(\mathsf{S})\) having
Cospans compose by pushout in \(\mathsf{S}\).
Problems:
Both problems are solved by moving to a 2-dimensional categorical structure, traditionally a bicategory:
Example: Bicategory of cospans
Given a category \(\mathsf{S}\) with pushouts, there is bicategory \(\mathbf{Csp}(\mathsf{S})\) having
New problem: We need a monoidal structure for “parallel composition.”
Monoidal categories are straightforward enough to work with
Monoidal bicategories are much more complicated, perhaps “irreducibly” three-dimensional:
monoidal bicategory = tricategory with one object
However, monoidal double categories can be defined using only 2-categorical concepts:
monoidal double category = pseudomonoid in \(\mathbf{Dbl}\)
Moreover, monoidal bicategories can sometimes be obtained from monoidal double categories (Shulman 2010)
So, for technical reasons, people started using double categories.
Example: Double category of cospans
Given a category \(\mathsf{S}\) with pushouts, there is a double category \(\mathbb{C}\mathsf{sp}(\mathsf{S})\) having
Is this double category really so different from the bicategory? Yes!
Definition: A double category is a pseudocategory in \(\mathbf{Cat}\).
So, a double category \(\mathbb{D}\) consists of
obeying the category laws up to coherent isomorphism.
For us, double categories and double functors are pseudo by default.
Terminology: In a double category \(\mathbb{D}\),
Interpretation: First and foremost, proarrows are objects, not morphisms.
Slogan:
Proarrows are “objects that happen to have sources and targets.”
Also: open systems are systems that happen to have boundaries!
Proarrows play the role of objects in all the main concepts. For example:
Definition: A natural transformation \(\alpha: F \Rightarrow G\) between double functors \(F, G: \mathbb{D} \to \mathbb{E}\) consists of
that are natural with respect to arrows and cells in \(\mathbb{D}\), respectively, and functorial with respect to external composition and identity.
Fact: There is a 2-category \(\mathbf{Dbl}\) of double categories, double functors, and natural transformations.
Definition. A cocartesian double category is a cocartesian object in \(\mathbf{Dbl}\), i.e., a double category \(\mathbb{D}\) such that the diagonal \(\Delta: \mathbb{D} \to \mathbb{D} \times \mathbb{D}\) and unique map \(!: \mathbb{D} \to \mathbb{1}\) have left adjoints in \(\mathbf{Dbl}\).
Proposition: Cocartesian double categories, concretely (Grandis 2019, Corollary 4.3.7)
A double category \(\mathbb{D}\) is cocartesian if and only if
For cartesian double categories, see the PhD thesis (Aleiferi 2018).
Example: cocartesian double category of cospans
For any category \(\mathsf{X}\) with finite colimits, \(\mathbb{C}\mathsf{sp}(\mathsf{X})\) is a cocartesian double category:
Structured cospans are easy to use and include open systems such as:
Structured cospans are implemented in Catlab.jl.
Given a functor \(L: \mathsf{A} \to \mathsf{X}\), an \(L\)-structured cospan consists of
Baez and Courser (2020) showed that when \(\mathsf{X}\) has pushouts,
Fact (1) is easy; (2) is more involved and has been given three different proofs.
Idea: Bypass monoidal structure using double-categorical universal property.
Familiar fact: Any cocartesian category can be given the structure of symmetric monoidal category by making a choice of coproducts.
Works for double categories too! Outline of argument:
Theorem
Let \(\mathsf{A}\) be a category with finite coproducts, \(\mathsf{X}\) be a category with finite colimits, and \(L: \mathsf{A} \to \mathsf{X}\) be a functor that preserves finite coproducts. Then \({}_{L}\mathbb{C}\mathsf{sp}(\mathsf{X})\) is a cocartesian double category.
Proof sketch
Not all double categories of open systems are cocartesian.
Can use decorated cospans instead, which is:
Given a category \(\mathsf{A}\) with finite colimits and a lax monoidal functor \(F: (\mathsf{A},+) \to (\mathbf{Cat},\times)\), an \(F\)-decorated cospan consists of
Baez, Courser, and Vasilakopoulou (2022) showed that there is a symmetric monoidal double category of \(F\)-decorated cospans.
Question: Recover decorated cospans using the Grothendieck construction?
Theorem (partial statement) (Cruttwell et al. 2022)
Given a lax double functor
\[ F: \mathbb{A} \to \mathbb{S}\mathsf{pan}(\mathbf{Cat}), \]
there is a double category \(\int F\), the double Grothendieck construction of \(F\), with underlying categories
\[ \textstyle (\int F)_0 = \int F_0 \qquad\text{and}\qquad (\int F)_1 = \int (\mathop{\mathrm{apex}}\circ F_1). \]
In the double category \(\int F\),
Moreover, there is a canonical projection, a strict double functor
\[ \textstyle \pi_F: \int F \to \mathbb{A}. \]
The double Grothendieck construction is due to Cruttwell, Lambert, Pronk, and Szyld (2022).
Corollary/Definition
Given a category \(\mathsf{A}\) with pushouts and a lax double functor
\[ F: \mathbb{C}\mathsf{sp}(\mathsf{A}) \to \mathbb{S}\mathsf{pan}(\mathbf{Cat}), \]
there is a double category of \(F\)-decorated cospans given by \(\int F\).
These decorated cospans are more general than the usual ones:
Corollary
Given a category \(\mathsf{A}\) with finite colimits and a lax monoidal functor \(F: (\mathsf{A},+) \to (\mathbf{Cat},\times)\), there is a double category of \(F\)-decorated cospans, as defined in the literature.
Proof sketch
Caveat
The symmetric monoidal structure on the double category is not recovered.
This talk is based on my paper:
Patterson, 2023. Structured and decorated cospans from the viewpoint of double category theory. arXiv:2304.00447.
Other topics covered: