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.
Given a set, regarded as a discrete category, a monad in the bicat of profunctors amounts to a category 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 .
I think a pointed endo-profunctor on A determines a graph with a choice of a loop on every object, and even less, a generic endo-profunctor on determines a digraph having vertices elements of A, and an edge for each . 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?
(In your first sentence, I think you meant to say "a promonad " or "monad in ".)
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.
Nathanael Arkor said:
(In your first sentence, I think you meant to say "a promonad " or "monad in ".)
oof, yes; thanks
ah, ok, very good. I didn't expect this to be that easy to cite, to be honest. :grinning:
I want a t-shirt like
"Category theory: if it's well-known to three people, it's common knowledge."
Heh, but those two facts really are well-known.
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?
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.
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.
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.
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.
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.
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!
Good point. But I think this "categories are monads in span" business really does buy you a fair amount.
That is, people use it to think about categories in new ways, and do interesting new things.
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.
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.
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!
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)
Since we're in topic, what are bicategories, given that categories are monads in Span?
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
nice
I will probably have time to read it in 2050 :grinning:
It's cool that this paper was motivated by physics - stuff like "conformal nets".
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."
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.
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.
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.
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).
Nice! I hadn't known about that paper.
The authors are all friends of mine but I was oblivious to this work of theirs! :embarrassed:
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 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.
So the blue areas are a set (the objects of ) and the vertical black lines are a span from that set to itself, to be thought of as the morphisms of . 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 and returns their composite .
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 like this:
It's a function (red line) from the objects of (green area) to the objects of (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.
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.
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
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:
(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.)
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 to is equivalent to a presheaf together with a functor . We're not sure what to make of it yet, but it's nice.
Christian Williams said:
Joshua Meyers and I wondered about this, and we worked out that a monad morphism from to is equivalent to a presheaf together with a functor . 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:
In my case it's a dependently parametrized map from to . A type theorist would write it as
where .
This is indeed a span of cats, with one leg being a fibration
@Nathaniel Virgo Profunctors also need have the left and right actions be compatible with each other, in addition to being left and right modules
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
Thank you @Cole Comfort - we also need this equation
(An element of a profunctor is something that can be composed with morphisms from and 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 -morphism and then post-compose it with a -morphism, or post-compose first and then pre-compose.)
(I'm thinking about your other question)
Take two profunctors on being -bimodules given by left and right actions , respectively. Then the composite is defined as the coequalizer of the following diagram
where the arrows in this diagram are and .
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?
Oh, that looks just like what we were talking about in this thread. So a category is a lax functor , where 1 is the terminal 2-category, so we could say a “lax point” of . A profunctor of categories is a lax functor , where is the walking arrow, so we could say it is a “lax arrow” of . That's neat.
(By “that” I mean what @Nathaniel Virgo was drawing, I haven't thought about Cole's question yet.)
I think maybe we can describe this coequalizer using the compact structure by "tracing out " the actions.
Actually, I am almost certain that this is how you can compose them!
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.
@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.
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.
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.
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?
The composite of two (internal) profunctors, or in general of two bimodules. It is defined by a universal property in a coloured multicategory.
In the internal setting, seen as bimodules of spans over , if has finite products, then I think we have self duality by construction.
The idea is the following. Instead of starting from a bicategory, you start from a coloured multicategory. This has 0-cells , 1-cells , and 2-cells , where is a “path” of 1-cells meaning that , and also and .
Oh I see what you are doing
So it's like a bicategory : monoidal category = coloured multicategory : multicategory.
If is a coloured multicategory, I think you can form another coloured multicategory of bimodules in .
Where the 0-cells are “monoids in ”, (or “monads in ”) given by
satisfying the monoid equations; 1-cells are bimodules, that is,
satisfying the equations of a left and right action.
While the multi-2-cells are going to be 2-cells in with the property that “all the different ways of acting with the monoids are equal”...
So for example , if , will be such that the 2-cells obtained by
are equal.
So it's like coequalises the left and right action, but it's not necessarily the coequaliser!
In the -ary case you will ask it to coequalise all the “inner” left and right actions.
In addition you will have to ask that acting on on the left, then doing is the same as doing then acting on on the left; and acting on on the right, then doing , is the same as doing then acting on on the right.
In the case you recover the usual notion of bimodule homomorphism.
Then you can ask whether is representable in the sense of representable multicategories, and it will turn out to be the same as requiring that those coequalisers exist.
@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?
But the nice thing is that you can form from any , 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.
(This last fact needs to be checked, I just think it may be true.)
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.
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.
I mean that both the “factors” and the “product” must have the same set of objects. In the tensor product, -sorted -sorted = -sorted, and implies .
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.
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:
The span I've labeled "" 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 "" has to be compatible with the two actions, that is,
Finally, it also has to be compatible with the monoidal structure on , meaning it has to obey this equation:
This is also a kind of associativity. It says that if we compose an element of the profunctor with a morphism in and then compose the result with an element of the profunctor , that should be the same as first composing the morphism with the element of and then pre-composing with the element of .
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 and , but to be "the" composition we want the universal one.
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 that obeys all the same equations as above, then there has to be a unique morphism of profunctors with this type
where I think "morphism of profunctors" should mean a morphism of spans that's compatible with the two actions,
and
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.
@Nathaniel Virgo if you translate what I wrote above in pictures you'll see that it's the same thing :)
Cool - I was drawing the pictures while you were posting!
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.