Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: deprecated: our papers

Topic: structured vs decorated cospans


view this post on Zulip John Baez (Jan 23 2021 at 17:25):

A new paper will hit the arXiv this week:

Abstract. One goal of applied category theory is to understand open systems. We compare two ways of describing open systems as cospans equipped with extra data. First, given a functor L ⁣:AXL \colon \mathsf{A} \to \mathsf{X}, a structured cospan is a diagram in X\mathsf{X} of the form L(a)xL(b)L(a) \rightarrow x \leftarrow L(b). If A\mathsf{A} and X\mathsf{X} have finite colimits and LL preserves them, it is known that there is a symmetric monoidal double category whose objects are those of A\mathsf{A} and whose horizontal 1-cells are structured cospans. Second, given a pseudofunctor F ⁣:ACatF \colon \mathsf{A} \to \mathbf{Cat}, a decorated cospan is a diagram in A\mathsf{A} of the form amba \rightarrow m \leftarrow b together with an object of F(m)F(m). Generalizing the work of Fong, we show that if A\mathsf{A} has finite colimits and F ⁣:(A,+)(Cat,×)F \colon (\mathsf{A},+) \to (\mathbf{Cat},\times) is symmetric lax monoidal, there is a symmetric monoidal double category whose objects are those of A\mathsf{A} and whose horizontal 1-cells are decorated cospans. We prove that under certain conditions, these two constructions become isomorphic when we take X=F\mathsf{X} = \int F to be the Grothendieck category of FF. We illustrate these ideas with applications to electrical circuits, Petri nets, dynamical systems and epidemiological modeling.

view this post on Zulip John Baez (Jan 23 2021 at 17:32):

So, this paper does two things.

First, it fixes a bunch of applications of decorated cospans. Given a symmetric lax monoidal functor F ⁣:(A,+)(Set,×)F \colon (\textsf{A},+) \to (\textsf{Set},\times), Brendan Fong proved that there is a symmetric monoidal category with objects of A\textsf{A} as its objects and equivalence classes of decorated cospans

amb,  xF(m) a \leftarrow m \to b , \; x \in F(m)

as its morphisms. Such categories were used to describe a variety of open systems: electrical circuits, Markov processes, chemical reaction networks and dynamical systems. Unfortunately, many applications of decorated cospans were flawed. The problem is that while Fong's decorated cospans are good for decorating the apex mm with an element of a set F(m)F(m), they are unable to decorate it with an object of a category. We generalize decorated cospans to do this.

view this post on Zulip John Baez (Jan 23 2021 at 17:37):

Second, we give sufficient conditions for a decorated cospan double category to be equivalent - and in fact, isomorphic - to a structured cospan double category.

Suppose A\mathsf{A} has finite colimits and F ⁣:(A,+)(Cat,×)F \colon (\mathsf{A} , +) \to (\mathbf{Cat}, \times) is a symmetric lax monoidal pseudofunctor. Then each category F(a)F(a) for aAa \in A becomes symmetric monoidal, and FF becomes a pseudofunctor F ⁣:ASymMonCatF \colon \mathsf{A} \to \mathbf{SymMonCat}. Using the Grothendieck construction, FF also gives an opfibration U ⁣:XAU \colon \mathsf{X} \to \mathsf{A} where X=F\mathsf{X} = \int F. Let Rex\mathbf{Rex} be the 2-category of categories with finite colimits, functors preserving finite colimits, and natural transformations. We show that if F ⁣:ASymMonCatF \colon \mathsf{A} \to \mathbf{SymMonCat} factors through Rex\mathbf{Rex} as a pseudofunctor, the opfibration U ⁣:XAU \colon \mathsf{X} \to \mathsf{A} is also a right adjoint. From the accompanying left adjoint L ⁣:AXL \colon \mathsf{A} \to \mathsf{X}, we construct a symmetric monoidal double category of structured cospans. In our main result, our Theorem 3.2, we prove that this structured cospan double category is isomorphic to the decorated cospan double category coming from FF. In fact, they are isomorphic as symmetric monoidal double categories.

view this post on Zulip John Baez (Jan 23 2021 at 17:40):

We illustrate these ideas with examples from electrical circuits, Petri nets, dynamical systems and @Evan Patterson and @James Fairbanks' work on epidemiological modeling. It seems that our theorem handles most cases where open systems can be described either by structured or decorated cospans. But we also give an example - open dynamical systems - that can be described by decorated cospans but not structured cospans.

view this post on Zulip Eric Forgy (Jan 23 2021 at 19:31):

It is curious that open dynamical systems cannot be described by structured cospans :thinking:

I've expressed some concern about the presentations I've seen on open dynamical systems. In the presentations I've seen, dynamical system were defined in terms of tangent vectors. I've suggested defining them instead in terms of covectors. For example, in the paper, I see
{}
dS(t)dt=r1S(t)I(t)+I1(t)+I2(t)\begin{aligned}\frac{dS(t)}{dt} = -r_1\,S(t)\,I(t) + I_1(t) + I_2(t)\end{aligned}
{}
dI(t)dt=r1S(t)I(t)r2I(t)+I3(t)\begin{aligned}\frac{dI(t)}{dt} = r_1\,S(t)\,I(t) - r_2\,I(t) + I_3(t)\end{aligned}
{}
dR(t)dt=r2I(t)O1(t).\begin{aligned}\frac{dR(t)}{dt} = r_2\,I(t)-O_1(t).\end{aligned}
{}
We briefly discussed Sophie Libkind's talk (with Sophie) on the Julia Zulip. At one point in the talk, she was required to "pullback" a dynamical systems and because the system was defined in terms of tangent vectors, this pullback did not feel 100% natural to me. I suggested considering the same dynamical system in the form
{}
dS=(r1SI+I1+I2)dtdS = (-r_1\,S\, I + I_1 + I_2)\,dt
{}
dI=(r1SIr2I+I3)dtdI = (r_1\, S\,I - r_2\,I+I_3)\,dt
{}
dR=(r2IO1)dt.dR = (r_2\, I - O_1)\, dt.
{}
I see the world through the lens of discrete differential geometry. In DDG, I can't even write down a dynamical system as a tangent vector, but covectors like the above are perfectly natural in DDG. Also, writing dynamical systems as covectors makes it obvious how to extend to stochastic differential equations. The fact that the tangent vector expression and the cotangent expressions are equivalent is a special feature of smooth continuuum manifolds that is not valid in more general settings such as DDG.

I could be wrong, but I suspect that if you change the way you look at open dynamical systems from tangent vectors to cotangent vectors, they might also be described by structured cospans. In fact, a lot of the CT I've been doing the past couple of months has been trying to prepare myself to understand this stuff enough to prove that myself.

view this post on Zulip John Baez (Jan 23 2021 at 21:20):

Eric Forgy said:

It is curious that open dynamical systems cannot be described by structured cospans :thinking:

It makes a lot of sense. Structured cospans always rely on a functor F:AXF: \mathsf{A} \to \mathsf{X} from the category A\mathsf{A} where the feet of our structured cospans live to the category X\mathsf{X} where the apex of our structured cospan lives. For structured cospans to work well FF needs to have some properties. All these properties hold when FF is a left adjoint, and that's typically the case in examples.

So, we should think of objects of X\mathsf{X} as having "more structure" than objects of A\mathsf{A}, and FF as "freely" giving objects of A\mathsf{A} that extra structure. A classic example would be where A\mathsf{A} is the category of sets, X\mathsf{X} is the category of graphs, and FF turns a set into the graph with that set of vertices and no edges. This is a left adjoint, so FF is "freely" turning a set into a graph.

In the case of open dynamical systems, A\mathsf{A} would be a category of something like "spaces without vector field" and X\mathsf{X} would be a category of something like "spaces with vector field" - that is, dynamical systems!

There is a functor sending any space without vector field to a space with vector field: namely, you give that space the zero vector field. This is the only functorial choice. However, the resulting functor FF doesn't have the properties needed to make structured cospans work well. For example, it's clearly not a left adjoint.

In short, the problem is that there's no really good "free dynamical system on a space", at least not if a dynamical system is something like a vector field. And I don't think differential forms would help.

But decorated cospans work differently. The apex of a decorated cospan still has more structure than the feet, but there doesn't need to be a "free" way to give the feet that extra structure.

So decorated cospans work fine for open dynamical systems.

Our paper gives sufficient condition for a decorated cospan category to be a structured cospan double category. "Open graphs" meet these conditions but "open dynamical systems" do not. The reason is basically what I just said. We talk about this at the end of Section 5 of our paper.

view this post on Zulip Eric Forgy (Jan 23 2021 at 22:14):

Thank you for explaining that. I'll come back when / if I have something more concrete to say.

view this post on Zulip James Fairbanks (Jan 23 2021 at 23:35):

I’m glad to have more of this written up and can’t wait to digest it!

view this post on Zulip John Baez (Jan 23 2021 at 23:38):

The proofs are quite technical, but main theorem relating structured cospans and decorated cospans is nice. Well, even the theorem statement may sound technical to some - I explained it a few comments up - but it's really not bad, and we illustrate it with boatloads of examples, starting with simple ones and leading up to your work on models of coronavirus!

view this post on Zulip John Baez (Jan 23 2021 at 23:39):

What we say in Section 5.4 should justify any sort of interplay between structured and decorated cospans that you were forced into.

view this post on Zulip Evan Patterson (Jan 23 2021 at 23:52):

Thanks for the overview, and congrats on finishing the paper! I look forward to reading it.

view this post on Zulip John Baez (Jan 23 2021 at 23:55):

If you have questions, just ask! The theorems are a lot easier to understand than their proofs... luckily the theorems are true so you don't need to know the proofs. :upside_down:

view this post on Zulip Evan Patterson (Jan 23 2021 at 23:56):

True theorems, the best kind!