The early design of CatColab
Topos Institute Berkeley Seminar
2024-10-15
$$
% https://tex.stackexchange.com/a/269194
$$
A gulf I’ve noticed:
Insiders find it obvious that category theory could dramatically enhance our ability to model and make sense of the world.
Outsiders find it impossible to imagine what this might look like.
This illegibility is a risk:
Inside view: our community will lack legitimacy and resources.
Outside view: our ideas won’t achieve the impact they are capable of!
Contrast with your favorite standard branch of applied math, say optimization.
As applied category theorists, we should be asking ourselves:
My working answer:
Category theory is the mathematics to represent diverse things yet still see connections between them, both within and across domains.
This suggests:
Hypothesis
Category theory will most useful at a scale beyond that of a single individual.
Also, a communication challenge: this answer is pretty different from that given by other branches of applied math!
Hypothesis
Category theory will become legible and useful when it is embodied by usable technologies.
This talk describes work in progress on CatColab, a collaborative environment for formal, interoperable, conceptual modeling.
See also the blog post: Introducing CatColab (Carlson 2024)
The development team for CatColab v0.1: Hummingbird was:
I am also grateful for support from other colleagues at Topos Institute and our collaborators and funders.
See also: https://catcolab.org/help/credits
Two of the logics currently available in CatColab:
Try it yourself: https://catcolab.org
Warning
CatColab is pre-alpha software under active development.
Mathematical foundation for CatColab is the framework of double theories:
This talks
Formal languages are the syntactic counterpart to categorical structures:
Logic/language | Categorical structure |
---|---|
Algebraic theories | Cartesian categories |
Typed lambda theories | Cartesian closed categories |
Resource theories | Symmetric monoidal categories |
Statistical theories | Markov categories |
… | … |
Definition
A simple double theory is a small, strict double category.
This is a concept with an attitude, understood as a categorified theory:
Definition
A model of a simple double theory \(\mathbb{T}\) is
Such models are categorified copresheaves:
Idea | 1-dimensional | 2-dimensional |
---|---|---|
Schema/theory | Category \(\mathsf{C}\) | Double category \(\mathbb{D}\) |
Semantics | \(\mathsf{Set}\) | \(\mathbb{S}\mathsf{pan}\ (= \mathbb{S}\mathsf{et})\) |
Instance/model | Functor \(\mathsf{C} \to \mathsf{Set}\) | Lax functor \(\mathbb{D} \to \mathbb{S}\mathsf{pan}\) |
Simplifying still further:
Definition
A discrete double theory is
Such a double theory has only object and morphism types, no operations.
Models of discrete double theories are also known as “displayed categories” (Ahrens and Lumsdaine 2019).
Fact
A model of a discrete double theory \(\mathbb{D}\mathsf{isc}(\mathsf{B})\) is equivalent to a category sliced over \(\mathsf{B}\):
\[ \mathsf{Lax}(\mathbb{D}\mathsf{isc}(\mathsf{B}), \mathbb{S}\mathsf{pan}) \simeq \mathsf{Cat}/\mathsf{B}. \]
The mathematics behind our two examples:
Causal loop diagrams (and also regulatory networks) are
Let \(\mathsf{Sgn}:= \{\pm 1\} \cong \mathbb{Z}_2\) be the group of nonzero signs.
Definition
A signed category is a category \(\mathsf{C}\) equipped with a functor \(\mathsf{C} \to \mathsf{Sgn}\).
So, the category of signed categories is the slice
\[ \mathsf{SgnCat} := \mathsf{Cat}/\mathsf{Sgn}. \]
Aduddell et al. (2024), Section 2.1
Theory
The theory of signed categories is the discrete double theory generated by
subject to the equation \(n \odot n = \mathrm{id}_x\) (where \(\mathrm{id}_x: x \mathrel{\mkern 3mu\vcenter{\hbox{$\scriptstyle+$}}\mkern-13mu{\to}}x\) is “positive”).
Equivalently,
\[ \mathbb{T}_{\mathsf{SgnCat}} := \mathbb{D}\mathsf{isc}(\mathsf{Sgn}), \]
so
\[ \mathsf{Lax}(\mathbb{T}_{\mathsf{SgnCat}}, \mathbb{S}\mathsf{pan}) \simeq \mathsf{Cat}/\mathsf{Sgn} = \mathsf{SgnCat}. \]
CatColab developer docs: signed categories
What’s the point about thinking of signed graphs as free signed categories?
Motifs are morphisms between free signed categories, e.g.,
Positive/reinforcing feedback loops are morphisms out of:
Negative/balancing feedback loops are morphisms out of:
Aduddell et al. (2024), Section 2.2
This phenomenon is generic:
Slogan
Diagrammatic languages are are free categorical structures whenever it makes sense for arrows to compose.
A famous example:
Example
Petri nets are free symmetric/commutative monoidal categories.
Coming in a future version of CatColab!
On Petri nets and SMCS: Baez et al. (2021)
A basic notion of database schema is a finitely presented profunctor
where \(\mathrm{Mapping} := \mathrm{Hom}_{\mathrm{Entity}}\) and \(\mathrm{AttrOp} := \mathrm{Hom}_{\mathrm{AttrType}}\).
In SQL jargon:
Theory
The theory of profunctors is the “walking proarrow” \(\mathbb{D}\mathsf{isc}(\mathsf{2})\), a discrete double theory freely generated by
A model is a profunctor, either directly or indirectly via “barrels”:
\[ \mathsf{Lax}(\mathbb{D}\mathsf{isc}(\mathsf{2}), \mathbb{S}\mathsf{pan}) \simeq \mathsf{Cat}/\mathsf{2}. \]
In future versions of CatColab:
Distributors and barrels on Joyal’s CatLab, esp. Proposition 2.4
The system should enable formal, interoperable, conceptual modeling in domain-specific logics
Intended users have variable levels of technical expertise and might be…
CatColab is a structure editor for categorical structures:
Interpolates between text editors and fully graphical editors:
Hypothesis
It is possible and practical to build a structure editor for collaborative modeling that is ergonomic, yet parametric over the logic.
Another example is Hazel, a structure editor for functional programs (Omar et al. 2017)
We emphasize formal modeling, but informal narrative is indispensable.
CatColab has a notebook-style interface, mixing
Note
Interface familiar from computational notebooks like Jupyter but very different execution model:
Dimension | Name | Objects are | Editable by users |
---|---|---|---|
3 | Doctrine | [not systematized] | ✗ |
2 | Theory | Double categories with structure | ? [maybe by power users] |
1 | Model | Categories with structure | ✔ |
0 | Instance | Sets with structure | ✔ |
Plus:
CatColab comprises three major components:
All code available as open source software: https://github.com/ToposInstitute/CatColab
Real-time collaboration powered by Automerge, created by Ink & Switch
The field of computer science is driven by dreams of universality:
Our aim is not to universalize, but to
Thanks for listening!