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: learning: questions

Topic: promonads : categories = profunctors : graphs?


view this post on Zulip fosco (Feb 06 2021 at 14:21):

Given a set, regarded as a discrete category, a monad M:AAM : A \rightsquigarrow A in the bicat of profunctors amounts to a category A\mathbb A that has the set A as set of objects; this because the unit and multiplication of the monad determine the identity and composition law of A\mathbb A.

I think a pointed endo-profunctor on A determines a graph A\mathcal A with a choice of a loop on every object, and even less, a generic endo-profunctor MM on AA determines a digraph having vertices elements of A, and an edge m:bam : b \to a for each mM(b,a)m \in M(b,a). This construction seems reversible: each such digraph determines an endoprofunctor M on the set of its vertices.

This is cool, yet so elementary I am surprised I haven't noticed it before, and no one ever mentioned it to me: am I missing an obvious explanation for this?

view this post on Zulip Nathanael Arkor (Feb 06 2021 at 17:50):

(In your first sentence, I think you meant to say "a promonad M:AAM : A \rightsquigarrow A" or "monad M:AAM : A \rightsquigarrow A in Prof\mathrm{Prof}".)

view this post on Zulip Nathanael Arkor (Feb 06 2021 at 17:55):

I think this is "well known" in certain circles (e.g. to those familiar with generalised multicategories). For instance, this is the perspective taken by Hyland in Elements of a theory of algebraic theories (in the slightly more general setting of multicategories), and the characterisation of graphs in this way is in Fiore–Gambino–Kock's Monads in double categories.

view this post on Zulip fosco (Feb 06 2021 at 19:00):

Nathanael Arkor said:

(In your first sentence, I think you meant to say "a promonad M:AAM : A \rightsquigarrow A" or "monad M:AAM : A \rightsquigarrow A in Prof\mathrm{Prof}".)

oof, yes; thanks

view this post on Zulip fosco (Feb 06 2021 at 19:05):

image.png

ah, ok, very good. I didn't expect this to be that easy to cite, to be honest. :grinning:

view this post on Zulip fosco (Feb 06 2021 at 19:05):

I want a t-shirt like

"Category theory: if it's well-known to three people, it's common knowledge."

view this post on Zulip John Baez (Feb 06 2021 at 19:11):

Heh, but those two facts really are well-known.

view this post on Zulip fosco (Feb 06 2021 at 19:17):

I guess anybody with sufficient proficience in category theory regards the statement "an endoprofunctor on a set is just a graph having vertices that set" as a good-to-know-let's-keep-this-in-my-toolbox type of fact.

Yet, category theory suffers a lot more than other sub-disciplines in mathematics of the it's-too-trivial-to-let-other-people-know-about-this-factoid syndrome, don't you think?

view this post on Zulip John Baez (Feb 06 2021 at 19:28):

No, I don't think so. First of all, there's no shortage of people running around saying that categories are monads in Span. If I google "monad in Span", I get 65,200 hits, and the top hits are well-known resources in category theory.

Secondly, I think every branch of math has a bunch of results like this - little things that are good to know - which tend to spread by people just stating them rather than referring to a proof. I shudder to think how much a good finite group theorist considers obvious but I don't know.

view this post on Zulip Cole Comfort (Feb 06 2021 at 19:32):

I really like this way of defining a category internal to C as a monad in spans in C, because then you can consider bimodules of spans of C (equivalently, profunctors internal to C) to compose categories via distributive laws modulo a shared wide subcategory. This is used in Rosebrugh, Wood, Lack and Cheng.

view this post on Zulip fosco (Feb 06 2021 at 19:41):

John Baez said:

No, I don't think so. First of all, there's no shortage of people running around saying that categories are monads in Span. If I google "monad in Span", I get 65,200 hits, and the top hits are well-known resources in category theory.

I think this exchange of comments is based on a misunderstanding; let me cut it at the base.

The first fact I mentioned (categories are promonads on the set of objects) is indeed very well-known, and I wouldn't doubt there's plenty of people yelling "memento mori", and incidentally that "categories are monads in Span" (too bad the linguistic divide prevents me from quoting this). Yet, all the sources where I have seen this statement recalled or used forget to mention the _second_ fact I state: that a mere pointed endoprofunctor is merely a reflexive digraph, and an endoprofunctor a bare digraph.

I find this second remark quite enlightening, and capable to shed a deeper light on the first.

So, what I find elementary to the point I'm surprised it took me so many years to notice is the second fact, not the first.

view this post on Zulip John Baez (Feb 06 2021 at 19:49):

Okay. I was surprised when I finally learned what a comodule of a comonoid in Set was - and surprised it took me so long to notice. There's a lot of stuff like this.

But I don't think category theory is unusual in having lots of little facts that haven't been put into textbooks. I think any reasonably interesting branch of math has way too many interesting, useful, not-too-hard-to prove facts to fit into a reasonable-sized textbook. Someday computerization could create massive yet accessible databases of such facts. For now, getting good at a branch of math means internalizing a pile of such facts, often by talking to people or figuring them out oneself.

view this post on Zulip Martti Karvonen (Feb 06 2021 at 19:50):

What I dislike about this "cats are monads in span"-business is that it doesn't work for the maps (a bit like monoidal categories as one-object bicategories gives wrong 2-cells). LIke if the whole point is that "morphisms are more important than objects", then being able to identify the objects of one category with those of some other doesn't buy you that much if the morphisms differ.

view this post on Zulip Morgan Rogers (he/him) (Feb 06 2021 at 19:53):

Or, more optimistically, when the morphisms differ you could take the new morphisms as an equally valid alternative for assembling the objects into a category!

view this post on Zulip John Baez (Feb 06 2021 at 19:53):

Good point. But I think this "categories are monads in span" business really does buy you a fair amount.

view this post on Zulip John Baez (Feb 06 2021 at 19:54):

That is, people use it to think about categories in new ways, and do interesting new things.

view this post on Zulip Morgan Rogers (he/him) (Feb 06 2021 at 19:55):

But I agree with you really: a statement "An X is just a Y" is only valuable insofar as understanding Ys helps you understand Xs, and as a category theorist you'll probably be interested in the category of Xs, so if the Ys give a different category, it's not automatically the most valuable comparison to have.

view this post on Zulip Martti Karvonen (Feb 06 2021 at 19:55):

Sure, and you can also see if you can recognise the old maps as special kinds of new maps or vice versa (and often doing so can lead to some further interesting stuff). But in any case, the identification is a bit hasty/imprecise if one doesn't mention that there's some caveats with the maps.

view this post on Zulip Morgan Rogers (he/him) (Feb 06 2021 at 20:01):

Incidentally, in his talk two days ago, David Spivak mentioned that the "comonoids [in Poly] are exactly categories", to quote his abstract, but as he explained in his talk, we get 'cofunctors' rather than functors between these. So that statement is rather misleading in the sense you're pointing out!

view this post on Zulip fosco (Feb 06 2021 at 20:03):

John Baez said:

Okay. I was surprised when I finally learned what a comodule of a comonoid in Set was - and surprised it took me so long to notice. There's a lot of stuff like this.

But I don't think category theory is unusual in having lots of little facts that haven't been put into textbooks. I think any reasonably interesting branch of math has way too many interesting, useful, not-too-hard-to prove facts to fit into a reasonable-sized textbook. Someday computerization could create massive yet accessible databases of such facts. For now, getting good at a branch of math means internalizing a pile of such facts, often by talking to people or figuring them out oneself.

even though I have internalised this behaviour myself, I slightly dislike it; but that's off topic, let's stop it here :smile: glad we have clarified the misunderstanding. (Let me add just one thing: the time to build this collective, searchable database is yesterday, it's not something that will happen in the future, on the contrary)

view this post on Zulip fosco (Feb 06 2021 at 20:06):

Since we're in topic, what are bicategories, given that categories are monads in Span?

view this post on Zulip Cole Comfort (Feb 06 2021 at 20:09):

fosco said:

Since we're in topic, what are bicategories, given that categories are monads in Span?

There is apparently a whole paper on this: https://arxiv.org/pdf/1206.4284.pdf

view this post on Zulip fosco (Feb 06 2021 at 20:12):

nice

view this post on Zulip fosco (Feb 06 2021 at 20:16):

I will probably have time to read it in 2050 :grinning:

view this post on Zulip John Baez (Feb 06 2021 at 20:20):

It's cool that this paper was motivated by physics - stuff like "conformal nets".

view this post on Zulip John Baez (Feb 06 2021 at 20:22):

fosco said:

(Let me add just one thing: the time to build this collective, searchable database is yesterday, it's not something that will happen in the future, on the contrary)

Reminds me of the joke:

"Why is the future different than the past?"

"Because it hasn't happened yet."

view this post on Zulip John Baez (Feb 06 2021 at 20:24):

I agree that someone should build this database. You could think of different existing projects - from the nLab to the Stacks Project to Xena to MathOverflow, etc. - as attempts at aspects of this big project. But until they fit together a lot better, I think this project remains in the future.

view this post on Zulip Nathanael Arkor (Feb 06 2021 at 23:17):

Martti Karvonen said:

What I dislike about this "cats are monads in span"-business is that it doesn't work for the maps (a bit like monoidal categories as one-object bicategories gives wrong 2-cells). LIke if the whole point is that "morphisms are more important than objects", then being able to identify the objects of one category with those of some other doesn't buy you that much if the morphisms differ.

It does work for maps: but crucially one needs to consider Span as a (weak) double category instead of a bicategory. It turns out often to be the case that monads are better behaved in double categories than 2-categories.

view this post on Zulip John Baez (Feb 06 2021 at 23:35):

Nathanael Arkor said:

It does work for maps: but crucially one needs to consider Span as a (weak) double category instead of a bicategory. It turns out often to be the case that monads are better behaved in double categories than 2-categories.

Gee, I should think about this until I understand it. I spend all my time these days thinking about weak double categories. I should have been the one who issued this rejoinder. :upside_down: But I don't think I knew this... or if I did, I forgot it.

view this post on Zulip Nathanael Arkor (Feb 06 2021 at 23:42):

There are several good examples in the Monads in double categories paper mentioned earlier (including categories and functors as monads and vertical monad morphisms in Span).

view this post on Zulip John Baez (Feb 06 2021 at 23:45):

Nice! I hadn't known about that paper.

view this post on Zulip John Baez (Feb 06 2021 at 23:45):

The authors are all friends of mine but I was oblivious to this work of theirs! :embarrassed:

view this post on Zulip Nathaniel Virgo (Feb 07 2021 at 03:59):

Here are some relevant pretty pictures. I'm no expert and make no guarantees this is all correct - please let me know if anything isn't - but I was thinking about this sort of thing recently, and this view might be useful.

We can define a category as a monoid in the double category of spans. Let's draw it using David Jaz Myers' notation. (I'm rotating it by 9090^\circ compared to his diagrams, so my horizontal morphisms are vertical lines.) There aren't any non-identity "vertical" morphisms in this first image, so it just looks like the diagrams for a monoid in a monoidal category.

image.png

So the blue areas are a set (the objects of C\mathscr{C}) and the vertical black lines are a span from that set to itself, to be thought of as the morphisms of C\mathscr{C}. The unit of the monoid picks out identity morphisms and the multiplication performs composition. I think of it as a map that takes the "formal composition" of two compatible morphisms, i.e. a pair (AfB,BgC)(A\xrightarrow{f}B, B\xrightarrow{g}C) and returns their composite Af;gCA\xrightarrow{f;g}C.

Vertical morphisms (represented in these diagrams by horizontal lines) are functions between sets, and squares (which include the black dots above) are maps of spans that are compatible with them. So we can draw a functor F ⁣:DCF\colon \mathscr{D}\to \mathscr{C} like this:

image.png

It's a function (red line) from the objects of D\mathscr{D} (green area) to the objects of C\mathscr{C} (blue area) and also a map (white square) between the spans representing the morphisms of the two categories that preserves identities and composition.

This seems to be quite a nice way to think about categories, especially for someone like me who like to do everything in string diagrams if I can. It seems that you can also define natural transformations, contravariant functors, adjunctions and so on in this graphical language.

view this post on Zulip Nathaniel Virgo (Feb 07 2021 at 04:08):

A presheaf can also be drawn in a different way. Instead of a functor into Set, we can draw it as a span to the one-element set that gets "acted on" by the category.

image.png

A profunctor is something that can be acted on on both sides by two categories, like this with the analogous set of equations for the right-hand category

image.png

Now, maybe getting at the original question: if we just take a span by itself, without any equations, we can think of that as a bipartite graph. If we take an arbitrary "endospan" (a span from a set to itself), we can think of it as a graph, and an arbitrary square from an endospan to an endospan is a graph homomorphism.

If we equip such a span with a map from the identity span, then we get a reflexive graph, in the same way that the unit picks out the identities in a category:

image.png

(Hmm, but then I'm not sure what happens with the actions... The point was meant to be that endoprofunctors and graphs are related simply because they are both spans from a set to itself - but a profunctor needs some extra stuff as well, so I'm still thinking. Hopefuly the above point about functors is useful anyway.)

view this post on Zulip Christian Williams (Feb 07 2021 at 04:54):

Martti Karvonen said:

What I dislike about this "cats are monads in span"-business is that it doesn't work for the maps (a bit like monoidal categories as one-object bicategories gives wrong 2-cells). LIke if the whole point is that "morphisms are more important than objects", then being able to identify the objects of one category with those of some other doesn't buy you that much if the morphisms differ.

@Joshua Meyers and I wondered about this, and we worked out that a monad morphism from CC to DD is equivalent to a presheaf F:CopSetF:C^{op}\to \mathrm{Set} together with a functor G:FDG:\int F\to D. We're not sure what to make of it yet, but it's nice.

view this post on Zulip Matteo Capucci (he/him) (Feb 07 2021 at 10:09):

Christian Williams said:

Joshua Meyers and I wondered about this, and we worked out that a monad morphism from CC to DD is equivalent to a presheaf F:CopSetF:C^{op}\to \mathrm{Set} together with a functor G:FDG:\int F\to D. We're not sure what to make of it yet, but it's nice.

I have that definition of morphism written on my whiteboard in this exact moment, for completely different reasons :flushed:

view this post on Zulip Matteo Capucci (he/him) (Feb 07 2021 at 10:10):

In my case it's a dependently parametrized map from CC to DD. A type theorist would write it as

(c:C)(p:Pc)D,(c : C) \to (p : P\, c) \to D,

where P=FP = \int F.

view this post on Zulip Matteo Capucci (he/him) (Feb 07 2021 at 10:11):

This is indeed a span of cats, with one leg being a fibration

view this post on Zulip Cole Comfort (Feb 07 2021 at 10:22):

@Nathaniel Virgo Profunctors also need have the left and right actions be compatible with each other, in addition to being left and right modules

view this post on Zulip Cole Comfort (Feb 07 2021 at 10:26):

One thing I wasn't able to figure out in pictures is how to draw the 2-composition in Prof, which is defined in terms of a coequalizer

view this post on Zulip Nathaniel Virgo (Feb 07 2021 at 10:33):

Thank you @Cole Comfort - we also need this equation

image.png

(An element of a profunctor is something that can be composed with morphisms from C\mathscr{C} and D\mathscr{D} of the appropriate types. This equation says that composition has to be associative, in that it doesn't matter whether we pre-compose it with a C\mathscr{C}-morphism and then post-compose it with a D\mathscr{D}-morphism, or post-compose first and then pre-compose.)

(I'm thinking about your other question)

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:11):

Take two profunctors on C,D \mathcal C, \mathcal D being E \mathcal E-bimodules given by left and right actions (λ,ρ)(\lambda,\rho), (λ,ρ)(\lambda',\rho') respectively. Then the composite CED\mathcal C \otimes_{\mathcal E} \mathcal D is defined as the coequalizer of the following diagram

CEDCD\mathcal C \otimes \mathcal E \otimes \mathcal D \rightrightarrows \mathcal C \otimes \mathcal D

where the arrows in this diagram are Cλ\mathcal C \otimes \lambda' and ρD\rho \otimes \mathcal D.

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:13):

I tried to define the bicategory of (internal) profunctors in my notes using only string diagrams, but I got hung up on this one thing. Where does the double-categorical structure come in, or is it just a matter of taste?

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:25):

Oh, that looks just like what we were talking about in this thread. So a category is a lax functor 1Span1 \to \mathbf{Span}, where 1 is the terminal 2-category, so we could say a “lax point” of Span\mathbf{Span}. A profunctor of categories is a lax functor ISpanI \to \mathbf{Span}, where II is the walking arrow, so we could say it is a “lax arrow” of Span\mathbf{Span}. That's neat.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:27):

(By “that” I mean what @Nathaniel Virgo was drawing, I haven't thought about Cole's question yet.)

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:28):

I think maybe we can describe this coequalizer using the compact structure by "tracing out " the actions.

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:30):

Actually, I am almost certain that this is how you can compose them!

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:33):

Does anyone know if there is a style guide for string diagrams on the nlab, because I think this string diagrammatic definition of internal profunctors would be really nice to have as a reference.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:37):

@Cole Comfort I'm not sure what your aim is, but if you move from bicategories to “coloured multicategories” or “multi-bicategories” or whatever they should be called, which is quite a natural structure for spans to form, then I believe the “internal categories and profunctors” construction produces another coloured multicategory where that composition is the universal one giving you representability.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:39):

This however is defined by a universal property and not algebraic in general. Now, yes, I think that in certain especially nice settings you can obtain an algebraic definition; similar to how the internal hom does not have an equational definition in monoidal closed categories, but it does in compact closed categories.

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:40):

I was just trying to set up the theory to compose props via distributive laws (a la Lack) in my notes using only string diagrams.

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:42):

Amar Hadzihasanovic said:

This however is defined by a universal property and not algebraic in general. Now, yes, I think that in certain especially nice settings you can obtain an algebraic definition; similar to how the internal hom does not have an equational definition in monoidal closed categories, but it does in compact closed categories.

What isn't defined algebraically? The (two sided) representability?

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:43):

The composite of two (internal) profunctors, or in general of two bimodules. It is defined by a universal property in a coloured multicategory.

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:46):

In the internal setting, seen as bimodules of spans over C\mathcal C, if C\mathcal C has finite products, then I think we have self duality by construction.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:47):

The idea is the following. Instead of starting from a bicategory, you start from a coloured multicategory. This has 0-cells x,y,zx, y, z\ldots, 1-cells a:xya: x \to y, and 2-cells f:(a1,,an)bf: (a_1, \ldots, a_n) \Rightarrow b, where a1,,ana_1, \ldots, a_n is a “path” of 1-cells meaning that t(ai)=s(ai+1)t(a_i) = s(a_{i+1}), and also s(a1)=s(b)s(a_1) = s(b) and t(an)=t(b)t(a_n) = t(b).

view this post on Zulip Cole Comfort (Feb 07 2021 at 11:48):

Oh I see what you are doing

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:48):

So it's like a bicategory : monoidal category = coloured multicategory : multicategory.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:49):

If MM is a coloured multicategory, I think you can form another coloured multicategory Bimod(M)\mathrm{Bimod}(M) of bimodules in MM.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:53):

Where the 0-cells are “monoids in MM”, (or “monads in MM”) given by

satisfying the monoid equations; 1-cells f:(x,a,μa,ηa)(y,b,μb,ηb)f: (x, a, \mu_a, \eta_a) \to (y, b, \mu_b, \eta_b) are bimodules, that is,

satisfying the equations of a left and right action.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 11:56):

While the multi-2-cells (f1,,fn)g(f_1, \ldots, f_n) \Rightarrow g are going to be 2-cells in MM with the property that “all the different ways of acting with the monoids are equal”...

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:00):

So for example α:(f1,f2)g\alpha: (f_1, f_2) \Rightarrow g, if t(f1)=s(f2)=(y,b,μb,ηb)t(f_1) = s(f_2) = (y, b, \mu_b, \eta_b), will be such that the 2-cells (f1,b,f2)g(f_1, b, f_2) \Rightarrow g obtained by

are equal.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:02):

So it's like α\alpha coequalises the left and right action, but it's not necessarily the coequaliser!

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:03):

In the nn-ary case you will ask it to coequalise all the “inner” left and right actions.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:04):

In addition you will have to ask that acting on f1f_1 on the left, then doing α\alpha is the same as doing α\alpha then acting on gg on the left; and acting on fnf_n on the right, then doing α\alpha, is the same as doing α\alpha then acting on gg on the right.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:04):

In the case n=1n = 1 you recover the usual notion of bimodule homomorphism.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:06):

Then you can ask whether Bimod(M)\mathrm{Bimod}(M) is representable in the sense of representable multicategories, and it will turn out to be the same as requiring that those coequalisers exist.

view this post on Zulip Cole Comfort (Feb 07 2021 at 12:07):

@Amar Hadzihasanovic Very much off the topic of this thread: I am trying to parse your paper on composing monoidal theories using the smash product, where I am coming from this place of composing props using distributive laws in Mon-Prof. Is there any relation between these two methods?

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:08):

But the nice thing is that you can form Bimod(M)\mathrm{Bimod}(M) from any MM, it's a more general combinatorial construction that does not require any limits or colimits to exist.
I think it's the same for the span construction: you can form a coloured multicategory of spans in a category, even if you don't have pullbacks! Pullbacks are just what gives you representability.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:09):

(This last fact needs to be checked, I just think it may be true.)

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:16):

Cole Comfort said:

Amar Hadzihasanovic Very much off the topic of this thread: I am trying to parse your paper on composing monoidal theories using the smash product, where I am coming from this place of composing props using distributive laws in Mon-Prof. Is there any relation between these two methods?

I believe there is no particular relation between the two. For example, I think that composing via distributive laws only works on categories with the same set of objects, while the tensor product of props applies to multi-sorted props and produces a prop whose sorts are pairs of a sort of the first and a sort of the second.
These are only compatible in the one-sorted case. In this case, I think there is a way of reproducing the tensor product of props with a special distributive law (just based on examples, I don't know about a systematic way). But there can be many more distributive laws.

view this post on Zulip Cole Comfort (Feb 07 2021 at 12:22):

You can compose strict monoidal categories using distributive laws in Mon-Prof, so I would guess it is not the multisorted nature that makes these things incompatible, but rather the "different" sorted nature.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:24):

I mean that both the “factors” and the “product” must have the same set of objects. In the tensor product, nn-sorted \otimes mm-sorted = (mn)(mn)-sorted, and n=m=nmn = m = nm implies n=m=1n = m = 1.

view this post on Zulip Nathaniel Virgo (Feb 07 2021 at 12:31):

Here's my attempt at @Cole Comfort's question. I haven't caught up with the rest of the thread yet.

Profunctor composition is defined by a coend, which is a universal object with a bunch of properties. I think I can write what all those properties are using string diagrams in Span. (I guess this works in the bicategory of spans, because we're not using any vertical morphisms.)

First note that if we just compose the profunctors as spans we get a span with two actions, which automatically obey all the equations we need.

image.png

However, this isn't the composite of the profunctors - it's got "too much stuff in it" in some sense - but we should be able to define the composite via a morphism of spans like this:

image.png

The span I've labeled "X;YX{;}Y" has to obey a bunch of properties. First it has to be a profunctor, meaning it has a left and a right action that are compatible with each other. Then "\circ" has to be compatible with the two actions, that is,

image.png

Finally, it also has to be compatible with the monoidal structure on DD, meaning it has to obey this equation:

image.png

This is also a kind of associativity. It says that if we compose an element of the profunctor XX with a morphism in CC and then compose the result with an element of the profunctor YY, that should be the same as first composing the morphism with the element of YY and then pre-composing with the element of XX.

I think this equation should correspond to the definition of a cowedge in some way - it's the equivalence relation that the coend is quotienting out, I think. The fact that this isn't obeyed automatically by composing them as spans is the "too much stuff" I was referring to earlier.

That defines a profunctor that behaves in some way like the composition of XX and YY, but to be "the" composition we want the universal one.

view this post on Zulip Nathaniel Virgo (Feb 07 2021 at 12:35):

There's some details to work out regarding how to express what the universality means in string diagrams, so the following is tentative. It should that if there's some other object ZZ that obeys all the same equations as above, then there has to be a unique morphism of profunctors hh with this type

image.png

where I think "morphism of profunctors" should mean a morphism of spans that's compatible with the two actions,

image.png

and

image.png

but maybe there's some other conditions it also has to obey. Hopefully that works out to be the same thing as a natural transformation between the profunctors, but I haven't worked that out yet.

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:38):

@Nathaniel Virgo if you translate what I wrote above in pictures you'll see that it's the same thing :)

view this post on Zulip Nathaniel Virgo (Feb 07 2021 at 12:39):

Cool - I was drawing the pictures while you were posting!

view this post on Zulip Amar Hadzihasanovic (Feb 07 2021 at 12:41):

But I think it's a useful observation that all of this makes sense in a more general context, irrespective of the existence of certain limits and colimits; it's similar to the way that the Chu construction is more naturally a construction of polycategories from multicategories.