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: profunctors and tensor-hom adjunctions


view this post on Zulip David Egolf (May 02 2025 at 21:18):

I'm interested in understanding how "tensor-hom" adjunctions arise, and when such an adjunction is in fact a geometric morphism. I'm specifically interested in understanding how tensor-hom adjunctions can arise from profunctors, and I'd like to try this out with a few examples. It could also be interesting to note some common patterns that can be used to construct profunctors. Along the way, I want to learn how to compose profunctors - and to use this as a chance to learn a little bit about coends.

I'm hoping to structure this thread around specific questions and specific exercises. I'm not sure quite yet which specific question or exercise I'd like to start with, but I wanted to get this thread started! Going forward, I'm currently planning to reference discussion and exercises from "Sheaves in Geometry and Logic" (by Mac Lane and Moerdijk) and/or "Coend calculus" (by Fosco Loregian).

If anyone has any initial thoughts or suggestions at the start of this thread, please feel free to share those! Otherwise, I will plan to create a second post in this thread once I have a specific first exercise or discussion topic in mind.

view this post on Zulip Ryan Wisnesky (May 02 2025 at 21:30):

This paper https://arxiv.org/abs/2404.01406 talks about how different notions of pro functor presentation lead to failure or success of composition of presentations. If you need to compose specific finitely presented pro functors, the algorithms in that paper are implemented at http://categoricaldata.net

view this post on Zulip David Egolf (May 04 2025 at 15:18):

Thanks for your comment @Ryan Wisnesky. I hadn't heard about "presentations" of profunctors before. I'll keep that paper in mind in case I want to learn more about that, at some point.

view this post on Zulip David Egolf (May 04 2025 at 15:25):

Here's the first specific question I'd like to explore in this thread: What are some examples of profunctors?

view this post on Zulip David Egolf (May 04 2025 at 15:25):

The nLab informs me that if VV is a symmetric closed monoidal category VV (such as the category of sets), and CC and DD are categories enriched over VV, then a profunctor from CC to DD is a VV-functor :DopCV:D^{\mathrm{op}} \otimes C \to V.

view this post on Zulip David Egolf (May 04 2025 at 15:27):

I don't know what this \otimes is doing, yet - I guess there is some notion of tensor product between VV-enriched categories. However, in the case that V=SetV = \mathsf{Set}, I do know that a profunctor from a category CC to a category DD is just a functor :Dop×CSet:D^{\mathrm{op}} \times C \to \mathsf{Set}.

view this post on Zulip John Baez (May 04 2025 at 15:49):

Puzzle. Guess what the tensor product of VV-enriched categories CC and DD might be. For starters figure out the set of objects of CDC \otimes D, and then for any pair of objects in CDC \otimes D their hom-object, which is an object in VV.

Hint: copy the product of ordinary categories, replacing the cartesian product of sets by the tensor product of objects in VV whenever called for (and not otherwise).

A lot of basic enriched category theory is straightforward generalization of ordinary category theory, so it's good to get used to doing those generalizations without breaking a sweat. This lets you focus on the really novel aspects, like how limits and colimits get replaced by [[weighted limits]] and [[weighted colimits]]. These are connected to ends and coends, so they may become important when composing [[enriched profunctors]].

view this post on Zulip Kevin Carlson (May 04 2025 at 17:05):

David Egolf said:

Here's the first specific question I'd like to explore in this thread: What are some examples of profunctors?

The most important profunctor is Hom:CopCV.\mathrm{Hom}: C^{\mathrm{op}}\otimes C\to \mathcal V. If you have functors f,g:D,ECf,g: D,E\to C then there’s the restricted hom Hom(f(),g()):DopEV.\mathrm{Hom}(f(-),g(-)):D^{\mathrm{op}}\otimes E\to \mathcal V. If ff or gg picks out a single object then this restricted hom is a representable presheaf or copresheaf in the familiar sense! So one things profunctors do immediately is generalize representability to a concept that can vary in both variables at once.

view this post on Zulip Kevin Carlson (May 04 2025 at 17:07):

A very different feel of example comes from drawing any category you like over the partial order 0<1.0<1. The inverse image of 00 becomes the domain of a profunctor and the inverse image of 11, the codomain, while the arrows over the nontrivial arrow in 0<10<1 becomes the values. You might like to try to flesh out this sketch to show these things really do give profunctors, but it could also be useful just to draw some tiny examples in this way.

view this post on Zulip David Egolf (May 05 2025 at 19:22):

Thanks to both of you! Both of your responses will be interesting to work through.

To begin with, I think the puzzle @John Baez provided would be a great place to start. So let me see if I can guess what the tensor product of two VV-enriched categories CC and DD might be.

view this post on Zulip David Egolf (May 05 2025 at 19:24):

If we assume that CC and DD are small, they each have a set of objects. So it seems reasonable to try setting the objects of CDC \otimes D to be the cartesian product of the set of objects of CC with the set of objects of DD.

(I suppose that if CC or DD were categories internal to some category, then they might not have a set of objects, and we might want to do something fancier to form our new "object of objects".)

view this post on Zulip David Egolf (May 05 2025 at 19:27):

Next, we'd like to find the hom-object for any ordered pair of objects in CDC \otimes D. So, let's try to figure out the hom-object from (c,d)(c,d) to (c,d)(c',d').

view this post on Zulip David Egolf (May 05 2025 at 19:29):

I expect this to be something in the spirit of the "product" of the morphisms :cc:c \to c' in CC with the morphisms :dd:d \to d' in DD. So, maybe we can try setting this hom object (CD)((c,d),(c,d))(C \otimes D)((c,d), (c',d')) to be C(c,c)D(d,d)C(c,c') \otimes D(d,d').

view this post on Zulip John Baez (May 05 2025 at 19:29):

Great! There is really nothing else you could have done.

view this post on Zulip John Baez (May 05 2025 at 19:30):

Of course you're not done yet, but you are following the tao of mathematics, like swimming downstream in a fast current.

I'm alluding to Chapter 19 of the Chuang-Tzu:

Confucius was looking at the cataract near the gorge of Lü, which fell a height of 240 cubits, and the spray of which floated a distance of forty lî, (producing a turbulence) in which no tortoise, gavial, fish, or turtle could play. He saw, however, an old man swimming about in it, as if he had sustained some great calamity, and wished to end his life.

Confucius made his disciples hasten along the stream to rescue the man; and by the time they had gone several hundred paces, he was walking along singing, with his hair dishevelled, and enjoying himself at the foot of the embankment. Confucius followed and asked him, saying, 'I thought you were a sprite; but, when I look closely at you, I see that you are a man. Let me ask if you have any particular way of treading the water.'

The man said, 'No, I have no particular way. I began (to learn the art) at the very earliest time; as I grew up, it became my nature to practise it; and my success in it is now as sure as fate. I enter and go down with the water in the very centre of its whirl, and come up again with it when it whirls the other way. I follow the way of the water, and do nothing contrary to it of myself;—this is how I tread it.

view this post on Zulip fosco (May 06 2025 at 05:57):

David Egolf said:

I expect this to be something in the spirit of the "product" of the morphisms :cc:c \to c' in CC with the morphisms :dd:d \to d' in DD. So, maybe we can try setting this hom object (CD)((c,d),(c,d))(C \otimes D)((c,d), (c',d')) to be C(c,c)D(d,d)C(c,c') \otimes D(d,d').

Note that symmetry is needed to define composition: the only possible definition is

(C(c,c)D(d,d))(C(c,c)D(d,d))...C(c,c)D(d,d)\big(C(c,c')\otimes D(d,d')\big)\otimes\big(C(c',c'')\otimes D(d',d'')\big) \to ... \to C(c,c'')\otimes D(d,d'')

view this post on Zulip James Deikun (May 06 2025 at 07:46):

Wow, so generically categories enriched in a non-symmetric monoidal category don't even have a tensor product? I guess you can get one though if you enrich in the colax product of a [[duoidal category]] VV -- then the other (lax) product induces a tensor product on VV-enriched categories.

view this post on Zulip Nathanael Arkor (May 06 2025 at 07:56):

Yes, this is Proposition 18 of Garner and López Franco's Commutativity. (See also section 13 of Lucyshyn-Wright's V-graded categories and V-W-bigraded categories.)

view this post on Zulip John Baez (May 06 2025 at 08:21):

You can define:

Note that in the last step it "stabilizes".

I believe all this should generalize to higher columns in the periodic table, e.g. for 2-categories (by which I really mean bicategories, sorry) you should be able to define

view this post on Zulip James Deikun (May 06 2025 at 08:29):

I assume this means you should be able to define a 2-category (3-category) of these things. What happens if you want a (symmetric/sylleptic/braided) monoidal 2-category of the things, or for that matter if you're content with just a 2-graph of them?

view this post on Zulip John Baez (May 06 2025 at 08:59):

That's a great question, but maybe you can guess the pattern as well as I can - I haven't thought about this question recently. I think the method of working out a few simple cases and then wildly extrapolating to pose some general conjectures is good here.

view this post on Zulip Mike Shulman (May 06 2025 at 17:59):

You can also do a [[horizontal categorification]] and define categories enriched in a bicategory, or even a (virtual) double category. In this case, it's straightforward to see that you get a tensor product of enriched categories if you enrich in a monoidal double category, using the tensor product on the double category to tensor hom-objects together (in contrast to how the composition of the double category is used when defining composition in enriched categories).

This "explains" why you need braiding in the case of enrichment over a monoidal category, since a one-object monoidal double category is essentially a category with two interchanging monoidal structures, which by the Eckmann-Hilton argument (the [[delooping hypothesis]]) is the same as a braided monoidal category.

view this post on Zulip David Egolf (May 06 2025 at 18:19):

Let me see if I can figure out how composition works. For any three objects (c,d),(c,d),(c,d)(c,d), (c',d'), (c'',d'') in CDC \otimes D, we want a "composition" morphism:

We saw just above that (CD)((c,d),(c,d))=C(c,c)D(d,d)(C \otimes D)((c,d), (c',d')) = C(c,c') \otimes D(d,d'), and we can use this to rewrite the above expression. Upon doing so, we get:

If VV is a braided monoidal category, then we intuitively have the ability to re-order the left side. There is then a morphism corresponding to our composition morphism of following type:

There is a morphism of this type that stands out to me. Because CC and DD are VV-enriched, we have composition morphisms:

Both of these morphisms are morphisms of VV, and so we can tensor them together to get a morphism presumably corresponding to our composition morphism.

view this post on Zulip David Egolf (May 06 2025 at 18:22):

It's not immediately clear to me that VV needs to be a symmetric monoidal category. (I think I only ended up using a braiding.) Is that needed so that this composition becomes associative, maybe?

view this post on Zulip Mike Shulman (May 06 2025 at 18:24):

It's not needed.

view this post on Zulip Mike Shulman (May 06 2025 at 18:25):

It's just that symmetric monoidal categories are so much more common than merely-braided ones that a lot of people don't bother being careful to check in what cases a braiding suffices.

view this post on Zulip Fernando Yamauti (May 06 2025 at 20:26):

Is all that story here supposed to generalize further to something like: the (n+1)-cat of V-enriched n-cats for V (k+1)-tuply monoidal is k-tuply monoidal?

view this post on Zulip John Baez (May 06 2025 at 20:33):

It must. Proving this would be a very nice challenge for higher category theorists: each person with their own approach to higher categories gets to prove their own version!

view this post on Zulip Fernando Yamauti (May 06 2025 at 21:03):

John Baez said:

It must. Proving this would be a very nice challenge for higher category theorists: each person with their own approach to higher categories gets to prove their own version!

My bad. I've edited my wondering question. But you probably already got what I meant before that.

Anyways, if that's true, it should be somewhere in Lurie's HA for (n,1).

view this post on Zulip David Egolf (May 07 2025 at 18:00):

It remains to work out what the identity elements are in CDC \otimes D. For any object (c,d)(c,d) we want an identity element, which is a certain morphism :I(CD)((c,d),(c,d)):I \to (C \otimes D)((c,d), (c,d)). Here II is the tensor unit object of our enriching monoidal category VV. Since (CD)((c,d),(c,d))=C(c,c)D(d,d)(C\otimes D)((c,d),(c,d)) = C(c,c) \otimes D(d,d), we are looking for a morphism :IC(c,c)D(d,d):I \to C(c,c) \otimes D(d,d).

Since CC and DD are VV-categories, we have already identity elements 1c:IC(c,c)1_c:I \to C(c,c) and 1d:ID(d,d)1_d:I \to D(d,d). Then we can form 1c1d:IIC(c,c)D(d,d)1_c \otimes 1_d:I \otimes I \to C(c,c) \otimes D(d,d). Finally, using a unitor isomorphism IIII \otimes I \cong I, we can get our identity element for C(c,d)C(c,d).

view this post on Zulip David Egolf (May 07 2025 at 18:05):

I think that concludes the exercise of guessing what CDC \otimes D might be! Going forward, I think knowing how to form CDC \otimes D will be helpful for finding examples of profunctors.

view this post on Zulip David Egolf (May 07 2025 at 18:07):

Next, I'll plan to explore this comment:

Kevin Carlson said:

David Egolf said:

Here's the first specific question I'd like to explore in this thread: What are some examples of profunctors?

The most important profunctor is Hom:CopCV.\mathrm{Hom}: C^{\mathrm{op}}\otimes C\to \mathcal V. If you have functors f,g:D,ECf,g: D,E\to C then there’s the restricted hom Hom(f(),g()):DopEV.\mathrm{Hom}(f(-),g(-)):D^{\mathrm{op}}\otimes E\to \mathcal V. If ff or gg picks out a single object then this restricted hom is a representable presheaf or copresheaf in the familiar sense! So one things profunctors do immediately is generalize representability to a concept that can vary in both variables at once.

view this post on Zulip David Egolf (May 12 2025 at 15:46):

I've been thinking about this Hom profunctor! One thing I like about this example is that it gives a profunctor for every VV-category, where VV is a symmetric closed monoidal category. So we get a large source of examples of profunctors.

Another thing I like about the Hom profunctor is that it suggests this intuition: a profunctor assigns to a pair of objects a thing that is "between" them. In this case, we have between cc and cc' the VV-object Hom(c,c)\mathrm{Hom}(c,c'). The action of the profunctor on morphisms intuitively I think has to do with "extending" what's between objects, via generalized pre/post composition. I'm hopeful that this intuition will be helpful for learning about composition of profunctors.

view this post on Zulip David Egolf (May 12 2025 at 15:48):

I am curious as to why we have this profunctor Hom\mathrm{Hom}. I think this relates to how functors can induce profunctors, and I want to get to that shortly.

view this post on Zulip David Egolf (May 12 2025 at 15:50):

Before doing that, I first want to consider the case where we have functors f:DCf:D \to C and g:ECg:E \to C. Can we somehow use these to create a new "restricted hom" profunctor :DopECopCHomV:D^{\mathrm{op}} \otimes E \to C^{\mathrm{op}} \otimes C \to_{\mathrm{Hom}} V?

view this post on Zulip David Egolf (May 12 2025 at 15:55):

If we can form some fop:DopCopf^{\mathrm{op}}:D^{\mathrm{op}} \to C^{\mathrm{op}} then we might be in business, as we could maybe form some VV-functor fopg:DopECopCf^{\mathrm{op}} \otimes g:D^{\mathrm{op}} \otimes E \to C^{\mathrm{op}} \otimes C by "tensoring" somehow. Then, precomposing this VV-functor before our hom functor I think presumably would give our restricted hom functor.

view this post on Zulip David Egolf (May 12 2025 at 15:58):

I don't actually know, though, if we can:

  1. form the "opposite" of a VV-functor
  2. "tensor" two VV-functors (although we've discussed already that we can tensor two VV-categories)

view this post on Zulip David Egolf (May 12 2025 at 16:06):

It looks like page 12 of "Basic Concepts of Enriched Category Theory" (by Kelly) is relevant to both of these questions!

In short, it sounds like we can do both of these things, and so we can presumably form the restricted hom functor as I outlined above. (It would probably be a good exercise to check (1) and (2) work out in the "obvious" way, but I'm not sure I want to do that right now.)

view this post on Zulip Mike Shulman (May 12 2025 at 16:36):

You're absolutely right about all of that! And in fact, these restricted hom-profunctors are extremely important. If you want a hint as to one reason why, you could try asking yourself what they might have to do with VV-adjunctions.

view this post on Zulip Kevin Carlson (May 12 2025 at 19:07):

You could also focus on the idea of restricting hom in the non-enriched setting; learning about profunctors and learning about enriched category theory are substantially orthogonal goals, although profunctors serve certain more important roles in the enriched theory that don't tend to fully show up in the unenriched case.

view this post on Zulip Kevin Carlson (May 12 2025 at 19:07):

As for why Hom exists, it's kind of like asking why identity morphisms exist. Hom is fundamental as a profunctor, not derived from anywhere else.

view this post on Zulip Mike Shulman (May 12 2025 at 19:25):

I don't think it's quite the same as why identity morphisms exist. I would say it's more analogous to why representable functors exist, or why the action of a group on itself exists. Those facts all depend in particular on associativity: a magma (even a unital magma) doesn't act on itself, at least not in the obvious way.

view this post on Zulip David Egolf (May 14 2025 at 18:24):

Thanks to both of your for your comments!

It probably does make sense to focus on the non-enriched setting, at least to start out with. I wanted to think about the enriched setting at least a little bit though, just to have access to more examples. But maybe now I'll switch focus to the non-enriched setting.

view this post on Zulip David Egolf (May 14 2025 at 18:26):

Mike Shulman said:

You're absolutely right about all of that! And in fact, these restricted hom-profunctors are extremely important. If you want a hint as to one reason why, you could try asking yourself what they might have to do with VV-adjunctions.

I do want to understand how profunctors relate to tensor-hom adjunctions, and maybe this is in that spirit. I'm not quite sure where to start with this line of thought, though.

view this post on Zulip Mike Shulman (May 14 2025 at 18:28):

What sort of relationship between profunctors and tensor-hom adjunctions do you have in mind?

view this post on Zulip Mike Shulman (May 14 2025 at 18:28):

I mean, did you see someone say that they are related in a particular way and you want to understand that?

view this post on Zulip David Egolf (May 14 2025 at 18:43):

Mike Shulman said:

What sort of relationship between profunctors and tensor-hom adjunctions do you have in mind?

So, I'm thinking of a profunctor as like a bimodule: something that describes two compatible "actions" on something. That's the kind of thing we need to define a tensor product, I believe. For example, we can tensor a set with two compatible monoid actions against a set with an appropriate monoid action. Or we can tensor a commutative group with two compatible ring actions (a bimodule) against a commutative group with an appropriate ring action (a module).

view this post on Zulip David Egolf (May 14 2025 at 18:46):

"Sheaves in Geometry and Logic" also introduces a "tensor product" of set-valued functors on p. 353.

view this post on Zulip Mike Shulman (May 14 2025 at 18:46):

Ah, so you mean tensor products of profunctors.

view this post on Zulip David Egolf (May 14 2025 at 18:46):

I am hoping that all this tensoring is secretly tensoring of profunctors.

view this post on Zulip David Egolf (May 14 2025 at 18:48):

So maybe what I want to understand next is how to tensor profunctors, and maybe to see how this gives the appropriate thing in some special cases.

view this post on Zulip John Baez (May 14 2025 at 18:48):

Your examples sounded to me like examples of what I'd call composing profunctors.

view this post on Zulip Mike Shulman (May 14 2025 at 18:48):

It's the same thing.

view this post on Zulip Mike Shulman (May 14 2025 at 18:49):

(I mean, there are also other kinds of tensor products of profunctors, but I think it's reasonable to also call the "composition" of profunctors a "tensor product".)

view this post on Zulip John Baez (May 14 2025 at 18:50):

Okay. I will call it composition of profunctors, but for some reason I will also call it tensoring of bimodules. I guess it's just a cultural thing.

view this post on Zulip John Baez (May 14 2025 at 18:52):

When David talked about tensoring profunctors, I imagine taking profunctors F:ABF: A \to B and G:CDG: C \to D and tensoring them to get FG:ACBDF \otimes G : A \otimes C \to B \otimes D. But anyway, he's not talking about that.

view this post on Zulip John Baez (May 14 2025 at 18:52):

I'm just trying to figure out what he's interested in, and I think maybe I know by now, from his examples.

view this post on Zulip John Baez (May 14 2025 at 18:55):

For example if I have a set SS with compatible left and right actions of monoids MM and NN, that's the same as a profunctor from the 1-object category BMBM to the 1-object category BNBN.

And then if I have a set TT with compatible left and right actions of NN and OO, I can "tensor" SS and TT and get a set SNTS \otimes_N T with compatible left and right actions of MM and OO. And that's an example of composing profunctors.

view this post on Zulip John Baez (May 14 2025 at 18:56):

(David was looking at an example where one of these actions was trivial so it looked like you had a set with just one monoid acting on it.)

view this post on Zulip John Baez (May 14 2025 at 19:00):

For some reason I don't know a super-standard name for a set with compatible left and right actions of two monoids; it should be called something like a "biaction". But there's a super-standard name for the same thing in the Ab-enriched world, namely an abelian group with compatible left and right actions of two rings. Everyone calls this is a "bimodule".

So, sometimes the word "bimodule" gets extended to mean "enriched profunctor".

view this post on Zulip David Egolf (May 14 2025 at 19:05):

Yes, this is all exactly the kind of thing I'm interested in. I'm also keeping in mind the example (hopefully I'm not misremembering and it is actually an example!) of composition of relations. I think this is also a tensoring of profunctors.

view this post on Zulip David Egolf (May 14 2025 at 19:06):

I would like to build on all this intuition to understand the general definition of compositon/tensoring of profunctors. (And then I'm curious if we can understand how to build a tensor-hom adjunction from a given profunctor. But one step at a time!)

view this post on Zulip Mike Shulman (May 14 2025 at 19:09):

John Baez said:

For some reason I don't know a super-standard name for a set with compatible left and right actions of two monoids; it should be called something like a "biaction".

I feel like I may have seen this called a "G-H-biset", analogous to "G-set" for a set with a single action.

view this post on Zulip John Baez (May 14 2025 at 19:12):

David Egolf said:

Yes, this is all exactly the kind of thing I'm interested in. I'm also keeping in mind the example (hopefully I'm not misremembering and it is actually an example!) of composition of relations. I think this is also a tensoring of profunctors.

A relation is an example of a Bool-enriched profunctor, since for each pair of elements in your two sets it's giving you a boolean. (A plain old profunctor gives you, for each pair of objects in your two categories, a set.)

Composing relations can then be seen as composing Bool-enriched profunctors.

view this post on Zulip James Deikun (May 14 2025 at 19:14):

One thing relations have that general profunctors don't is the converse, because sets are all groupoids. There's a notion of "ordered relation" of posets that doesn't have the converse!

view this post on Zulip John Baez (May 14 2025 at 19:14):

Bool is like a "baby" or "decategorified" version of Set, so compared to ordinary Set-enriched things, Bool-enriched things tend to be simpler, and the word "enriched" is a bit misleading: I actually feel like saying "impoverished" in this particular case!

view this post on Zulip David Egolf (May 14 2025 at 19:27):

Thanks everyone! I'll stop here for today as I'm getting tired, but next time I think I'll start to move towards understanding the composition/tensoring of profunctors. This involves a "coend", so this may be a great chance for me to learn a bit about coends!

view this post on Zulip John Baez (May 15 2025 at 08:55):

Indeed, coends and profunctors go hand in hand!

Each time you've been saying you want to learn about profunctors and hom-tensor adjunctions, I've been scratching my head thinking you should either be saying "I want to learn about profunctors and coends" or "I want to learn about hom-tensor adjunctions and closed categories".

view this post on Zulip David Egolf (May 16 2025 at 15:30):

John Baez said:

Each time you've been saying you want to learn about profunctors and hom-tensor adjunctions, I've been scratching my head thinking you should either be saying "I want to learn about profunctors and coends" or "I want to learn about hom-tensor adjunctions and closed categories".

At first I had thought I might really be wanting to learn about closed categories. However, in a closed category the "tensor against a fixed object" functor is an endofunctor. By contrast, tensoring against a bimodule/"biaction" takes in a thing of one kind and produces a thing of a different kind.

view this post on Zulip David Egolf (May 16 2025 at 15:36):

So - how to compose/tensor profunctors? A profunctor pp from AA to BB is a functor :Aop×BSet:A^{\mathrm{op}} \times B \to \mathsf{Set}. I will sometimes view this as a morphism in a category Prof\mathsf{Prof} from AA to BB, and sometimes view this as a functor from Aop×BA^{\mathrm{op}} \times B to Set\mathsf{Set}.

If we have a profunctor p:ABp:A \to B and another q:BCq:B \to C, the book "Coend calculus" states that we can define their composite qp:ACq \circ p:A \to C as follows:

view this post on Zulip David Egolf (May 16 2025 at 15:38):

...where the right side is apparently a "coend". So it will take some learning to unravel what exactly this definition means.

view this post on Zulip John Baez (May 16 2025 at 15:39):

When reading that formula, I hope your heart sings out "matrix multiplication".

view this post on Zulip David Egolf (May 16 2025 at 15:40):

Oh! Thanks for pointing that out! It is indeed a lot like the matrix multiplication formula, although I hadn't noticed that yet.

The intuition I had so far was more from composing relations: a way in which aa and bb are related, together with a way in which bb and cc are related - that gives us a way in which aa and cc are related.

view this post on Zulip David Egolf (May 16 2025 at 15:48):

I found a set of slides from a talk you gave in 2007, which maybe visualizes the matrix multiplication intuition:

visualization

view this post on Zulip John Baez (May 16 2025 at 15:48):

Yes, there I was showing how composing spans is a special case of matrix multiplication.

We can work with matrices valued in any [[rig]], since we just need to know how to add and multiply matrix entries in a way that obeys the usual laws. Composing relations is matrix multiplication where the matrices take values in the boolean rig B={T,F}\mathbb{B} = \{T,F\}.

Composing spans is a bit more sophisticated because the matrix entries are sets, which are objects in a kind of '2-rig'.

Composing profunctors is like that, but we also need to replace addition by a colimit, as hinted by that integral sign you wrote down.

view this post on Zulip John Baez (May 16 2025 at 15:50):

So, it's good to think of all these things - relations, matrices, spans and profunctors - as different examples of the same idea. This will allow you to save a lot of work relearning things over and over. Even if you don't know the formal abstraction that captures all these examples, you can still mentally put them all on the same shelf in your mind. It's all "linear algebra", as far as I'm concerned.

view this post on Zulip David Egolf (May 16 2025 at 15:54):

I think it's very cool when so many ideas can be grouped together helpfully like that! One thing I like about that is this: if you recognize that two ideas are secretly in the same spirit, then intuition or concepts about one have hope to be transferred to intuition or concepts for another. This might not always work out, but probably can lead to surprising and fun questions like "Do we have a notion of an eigenvector for a relation?". This can also probably help one understand new concepts more quickly by analogy.

view this post on Zulip David Egolf (May 16 2025 at 15:54):

For the profunctor case, I'm wondering if this intuition will be helpful: p(a,b)p(a,b) is like a set of paths from aa to bb.

view this post on Zulip David Egolf (May 16 2025 at 15:58):

Exploring this idea a little bit - if we have a morphism f:bbf:b \to b' in BB, then p(1a,f):p(a,b)p(a,b)p(1_a, f):p(a,b) \to p(a,b') lets us create a path from aa to bb' given a path from aa to bb, using ff. That seems intuitively reasonable.

view this post on Zulip John Baez (May 16 2025 at 15:58):

Yes, that's a good point of view. As you may have seen (maybe in those slides of mine), Heisenberg thought of p(a,b)p(a,b) as the amplitude to get from aa to bb, which is a number. Feynman later computed these amplitudes as an integral over the set of all paths from aa to bb.

So Feynman was doing a kind of decategorification of the idea you are talking about now, where you are imagining p(a,b)p(a,b) as the set of paths from aa to bb. It's decategorification because he was taking a set (an object in a category) and turning it into a number (an element of a set).

(It wasn't just a bare set, of course: to integrate you need a set with a measure on it, and maybe also a function on it. But I'm trying to talk in a broad-brush way here.)

view this post on Zulip John Baez (May 16 2025 at 16:01):

In short, yes: relations, matrices, spans and profunctors are all about how you can get from aa to bb, or whether you can get from aa to bb, or with what probability or amplitude can you get from aa to bb.

view this post on Zulip John Baez (May 16 2025 at 16:03):

But you're focusing in on profunctors, and pointing out that if aAa \in A and bBb \in B are objects of categories, then we can combine any way to go from aa to bb with a morphism in AA and/or BB to get a way to go from aa' to bb'.

view this post on Zulip John Baez (May 16 2025 at 16:04):

This extra twist doesn't show up for the simplest sort of relations, matrices or spans - it's characteristic of profunctors, simply because profunctors go between categories. It also shows why you want an 'op' in the definition of profunctor.

view this post on Zulip David Egolf (May 16 2025 at 16:08):

Just to spell that out a bit more: if we have a morphism g:aag:a \to a' in AA, then we intuitively want a way to convert paths p(a,b)p(a',b) to paths p(a,b)p(a,b) using gg. So we need an "op" to make this a functor.

view this post on Zulip David Egolf (May 16 2025 at 16:13):

So if I were to naively guess as to how to compose two profunctors pp and qq, my first guess would be as follows. To find all the paths from aa to cc, we first form the product p(a,b)×q(b,c)p(a,b) \times q(b,c) for each bBb \in B. Each such set contains as elements the information needed to describe a path from aa to cc. Then I'd want to take the disjoint union of all these sets.

view this post on Zulip John Baez (May 16 2025 at 16:14):

Right! Very good. But "disjoint union" is obviously a bit wrong when your category has a bunch of isomorphic objects, or even a bunch of "morphic" objects. So you gotta be a bit more sophisticated.

view this post on Zulip John Baez (May 16 2025 at 16:18):

And this will lead you to invent coends....

view this post on Zulip David Egolf (May 16 2025 at 16:18):

Hmm I see! If bb and bb' are isomorphic, then maybe we don't want to count paths from aa to cc that pass through either bb or bb' as really different, for example. So some thought will be needed to properly come up with all the distinct paths.

And yes! I'm hoping that thinking in this direction will help the definition of coend make some intuitive sense. :sweat_smile:

view this post on Zulip John Baez (May 16 2025 at 16:20):

You'll just automatically reinvent it by trying to straighten out this "redundancy" problem.

view this post on Zulip John Baez (May 16 2025 at 16:21):

Even if bb and bb' are just "morphic", i.e. there's a morphism f:bbf: b \to b', you don't want to count paths from aa to cc that pass through either bb or bb' as completely different.

view this post on Zulip John Baez (May 16 2025 at 16:22):

This is the redundancy problem.

view this post on Zulip David Egolf (May 16 2025 at 16:28):

Oh! That's surprising to me. I guess I don't fully understand which paths we want to count then.

view this post on Zulip David Egolf (May 16 2025 at 16:29):

Or maybe this speaks to some limitation of the "paths" intuition.

view this post on Zulip David Egolf (May 16 2025 at 16:31):

I'll think about this for a while. :slight_smile:

view this post on Zulip John Baez (May 16 2025 at 16:33):

You just need to sharpen up your intuition. If you start with categories that are groupoids, you don't have to worry about certain nuances, and you can focus on trying to eliminate redundancies due to isomorphisms. But in a general category, you're not going to want to treat isomorphisms in a completely different way from other morphisms - that's too ugly, you never want to do a "case by case" definition in category theory. So you need a nice thing to do with morphisms that does what you want when they're isomorphisms.

view this post on Zulip David Egolf (May 16 2025 at 16:57):

I think I was able to visualize the situation:
path redundancy

view this post on Zulip David Egolf (May 16 2025 at 16:58):

There's a single "path" here, from aa to bb' to bb to cc. However we can build it up in two ways:

view this post on Zulip David Egolf (May 16 2025 at 16:59):

To do this, we made use our ability to travel from bb' to bb, which presumably corresponds to a morphism in BB from bb' to bb. So we see that having even just "morphically" related objects can result in multiple ways to build up the same path.

view this post on Zulip David Egolf (May 16 2025 at 17:02):

(I say "path" but it's more like a "travel route". We're not keeping track of the "speed" at which are traversing from one object to another, and we aren't associating each part of an "interval" to parts of our traversal.)

view this post on Zulip Kevin Carlson (May 16 2025 at 19:03):

Yes, this is a key idea left in the notion of coend! Maybe you’re ready to start thinking mathematically about what this picture means you ought to do with that disjoint union of products you’d mentioned earlier?

view this post on Zulip David Egolf (May 21 2025 at 19:15):

I would like to do that! There are some elements of bp(a,b)×q(b,c)\coprod_{b} p(a,b) \times q(b,c) that correspond to the same routes, as visualized in the image above. So, I am guessing there is a diagram involving the p(a,b)×q(b,c)p(a,b) \times q(b,c) (as bb varies) such that taking the colimit give us all the distinct routes. I'm not quite sure how to dream up this diagram yet, though.

view this post on Zulip David Egolf (May 21 2025 at 19:18):

Drawing inspiration from the drawing above, I'm currently thinking of a route from aa to bb as involving three parts:

  1. Some morphism in AA with source of aa
  2. Something "between the categories" AA and BB
  3. Some morphism in BB with target of bb.

And the thing "between the categories" needs to be compatible with the morphisms in (1) and (3).

view this post on Zulip David Egolf (May 21 2025 at 19:20):

I suppose in the case of a route from aa to cc that passes through BB, the thing "between the categories" AA and CC includes a few pieces:

view this post on Zulip David Egolf (May 21 2025 at 19:26):

I don't know if trying to express the routes in the picture above using a decomposition like this will be helpful for figuring out an appropriate colimit.

view this post on Zulip David Egolf (May 21 2025 at 19:49):

Oh, I remembered the term "heteromorphism" - maybe that's relevant when thinking about things "between" objects in different categories.

Intuitively, maybe what I'm trying to understand relates to the idea that some "composition" of heteromorphisms should be associative.

view this post on Zulip John Baez (May 21 2025 at 20:11):

Following the principle that it's good to draw everything you've got in a diagram, it might be useful to see what maps you have between sets of the form

p(a,b)×q(b,c) p(a,b) \times q(b,c)

given the fact that pp and qq are functors, and try to draw these maps in a diagram, and let that guide your thoughts a bit.

view this post on Zulip David Egolf (May 21 2025 at 20:41):

Thanks for the hint! I am planning to give your hint some thought.

I'm also realizing that we can write a route ABCA \to B \to C in two pieces, say (f,g)(f,g). Here ff is a route that starts in AA and ends in BB, while gg is a route that starts in BB and ends in CC. Then we can consider the case where one of these two pieces is given by "extending" some smaller piece, so we have something like (hf,g)(h \circ f, g) or (f,gh)(f, g \circ h). Then extending the first piece "at the end" should give the same route as extending the second piece "at the start".

view this post on Zulip David Egolf (May 21 2025 at 20:42):

So I think that (hf,g)(h \circ f,g) and (f,gh)(f, g \circ h) should give the same route. Keeping something like this in mind might be helpful as I search for a colimit diagram.

[If we use \otimes instead of (,)(-,-), then we're wanting to view (hf)g(h \circ f) \otimes g as the same as f(gh)f \otimes (g \circ h). And if I write fhfh to mean hfh \circ f, we want to view (fh)g(fh) \otimes g as the same as f(hg)f \otimes (hg). This starts to reminds me of the tensor product of modules!]

view this post on Zulip John Baez (May 21 2025 at 20:52):

David Egolf said:

So I think that (hf,g)(h \circ f,g) and (f,gh)(f, g \circ h) should give the same route. Keeping something like this in mind might be helpful as I search for a colimit diagram.

Yes, this sounds like a crucial observation. You could have gotten it by following my suggestion to just draw all the maps between sets of the form

p(a,b)×q(b,c) p(a,b) \times q(b,c)

But you got it in a more thoughtful way. My approach is nice for when you're feeling clueless: you just draw all the maps and see when two might be equal and what it would mean for them to be equal.

view this post on Zulip David Egolf (May 26 2025 at 00:26):

I think I can encode part of what I want in a pushout diagram. If we have an "almost" route that is just missing a middle piece, here are two ways to fill in that missing piece: we can extend the first part of the incomplete route, or we can extend the second part. If we use the same "route segment" to do this, these two approaches should intuitively yield the same route.

pushout diagram

view this post on Zulip David Egolf (May 26 2025 at 00:28):

(Here, I think of q(m,1c):q(b,c)q(b,c)q(m,1_c):q(b',c) \to q(b,c) as in the spirit of "precomposing a route :bc:b \to c with m:bbm:b \to b'".)

So if we have a route from aa to bb and a route from bb' to cc, we can make a route from aa to cc given a morphism m:bbm:b \to b' in two ways:

  1. (travel from aa to bb, and then to bb' using mm) and then to cc
  2. travel from aa to bb (and then to bb' using mm, and finally to cc)

view this post on Zulip David Egolf (May 26 2025 at 00:29):

I think the pushout will end up being the disjoint union of p(a,b)×q(b,c)p(a,b) \times q(b,c) and p(a,b)×q(b,c)p(a,b') \times q(b',c), except that we identify two routes if they can both be formed from the same incomplete route in p(a,b)×q(b,c)p(a,b) \times q(b',c) using mm.

view this post on Zulip David Egolf (May 26 2025 at 00:35):

However, this is not yet what I want! There may be additional elements that I would like to identify between p(a,b)×q(b,c)p(a,b') \times q(b',c) and p(a,b)×q(b,c)p(a,b) \times q(b,c). In particular, if there is another morphism n:bbn:b \to b' from bb to bb', then I will want to identify additional elements.

view this post on Zulip David Egolf (May 26 2025 at 00:37):

Beyond this, I also want to do a similar "gluing"/quotienting process as bb and bb' vary. So there is a lot of "quotienting" that I want to somehow organize tidily!

view this post on Zulip David Egolf (May 26 2025 at 01:06):

I guess I'm hoping to get a nice clean colimit diagram that gives (qp)(a,c)(q \circ p)(a,c) in terms of p(a,b)p(a,b) and q(b,c)q(b,c) as bb varies. But maybe that's hoping for too much?

I may take a look at some references and see how they organize this information. In particular, this might be a good time to look at the definition of a coend - hopefully it relates to the intuition developed in this thread!

view this post on Zulip David Egolf (May 26 2025 at 01:19):

It would be fantastic if the notion of "coend" cleanly organizes all the quotienting I want to do in the context of composition of profunctors.

view this post on Zulip John Baez (May 26 2025 at 08:00):

You almost stated the definition of coend just now! The diagram you drew is the key part in the definition of coend, or at least one popular definition. What you wrote will look more like the usual coend if you abstract from the situation at hand, and write

p(a,b)×q(b,c)=A(b,b) p(a,b) \times q(b',c) = A(b,b')

hiding the role of aa and cc, which are fixed in the process you are focused on, and highlighting the role of bb and bb'. Note that A(b,b)A(b,b') is covariant in bb and contravariant in bb' - or maybe the other way around if I'm confused, but the main point is that they have opposite variances.

view this post on Zulip John Baez (May 26 2025 at 08:01):

So a coend is a thing you can construct whenever you have a thing like this A(b,b)A(b,b'), and you've pretty much explained how to construct it.

view this post on Zulip David Egolf (May 29 2025 at 18:43):

Thanks for explaining that! I think this is making sense to me.

In this context, let me now write out the definition of a coend (from "Coend Calculus"). I anticipate this will be interesting to compare with the discussion above.

view this post on Zulip David Egolf (May 29 2025 at 18:52):

Referencing Definition 1.1.6 in Coend Calculus, I think a coend for a functor P:Cop×CDP:C^{\mathrm{op}} \times C \to D is an "initial cowedge" for PP.

A "cowedge" for P:Cop×CDP:C^{\mathrm{op}} \times C \to D is a dinatural transformation :PΔd:P \to \Delta_d, where Δd:Cop×CD\Delta_d:C^{\mathrm{op}} \times C \to D is a functor constant at some dDd \in D.

view this post on Zulip John Baez (May 29 2025 at 18:52):

By the way, I'm right now at a retreat for math grad students at a country house in Scotland, and they loved the 'plane trips and taxi rides' story about composing profunctors, and used it to come up with the definition of coend (with a little nudging from me), and then polished it up into a colimit over a twisted arrow category, and also came up with another approach using the [[collage]] of a profunctor.

view this post on Zulip David Egolf (May 29 2025 at 18:54):

Nice! I've noted the phrase "twisted arrow category" as well as "collage" for possible future exploration. :slight_smile:

view this post on Zulip David Egolf (May 29 2025 at 18:57):

I notice that "extranatural transformations" can also be used to define profunctors, instead of "dinatural transformations". But, for the purpose of starting somewhere, I'll stick with dinatural transformations for the moment.

view this post on Zulip David Egolf (May 29 2025 at 18:58):

So for the definition above to be useful, we need to know what a dinatural transformation is.

view this post on Zulip John Baez (May 29 2025 at 18:59):

Even those are a bit too fancy for me to have incorporated them into my ways of defining coends, but that's probably just my own fault. I just know how to construct coends, not describe their universal property as an 'initial cowedge'.

view this post on Zulip David Egolf (May 29 2025 at 19:03):

I see! Well, I'm curious to try and understand this definition from "Coend calculus". If it ends up being a bit too fancy for me to intuitively understand at this point, then that's fine as well. But I'll give it a try!

view this post on Zulip David Egolf (May 29 2025 at 19:10):

So, here is the notion of "dinatural transformation".

Let P,Q:Cop×CDP,Q:C^{\mathrm{op}} \times C \to D be functors. A dinatural transformation α:PQ\alpha:P \to Q is first of all a family of morphisms (in DD) αc:P(c,c)Q(c,c)\alpha_c:P(c,c) \to Q(c,c) indexed by the objects of CC. We also require that for any f:ccf:c \to c' in CC the following diagram to commute:
diagram

view this post on Zulip David Egolf (May 29 2025 at 19:13):

I wonder if we can understand this intuitively in the spirit of the discussion above. Maybe we can think of P(c,c)P(c',c) as in the spirit of a set of "routes" that travel to cc', are interrupted, and then pick up again at cc (with some fixed but unstated overall starting and ending points).

If we can understand QQ in a similar way (as providing potentially "partial" routes), then perhaps we can try to understand a dinatural transformation as describing a way to relate the partial routes of PP to the partial routes of QQ.

view this post on Zulip David Egolf (May 29 2025 at 19:25):

I guess my current question that I'd like to explore is this: How can we intuitively (possibly through examples) understand the notion of "dinatural transformation"?

view this post on Zulip David Egolf (May 29 2025 at 19:30):

Actually, I think I specifically want to focus on the case where QQ is a constant functor. (This relates closely to cowedges!) Next time, I may start by redrawing the diagram above for that case.

view this post on Zulip David Egolf (May 30 2025 at 17:10):

Here's what part of a cowedge under PP looks like (so QQ is a constant functor):
cowedge

This looks very much like the pushout diagram I drew above! However, in this case, we don't require the square to be a pushout diagram.

view this post on Zulip David Egolf (May 30 2025 at 17:19):

I was thinking that the constant (set) output of QQ needs to be a pushout for all such squares simultaneously. But that doesn't make sense: each such square only requires us to identify certain routes. So if we identify too many, we won't get a pushout square.

view this post on Zulip David Egolf (May 30 2025 at 17:21):

Instead, our set Q(c,c)Q(c,c') (which is the same for all (c,c)(c,c')) needs to just make each square commute and then be initial with respect to that property. Each individual square requires that we "glue together" certain routes, and Q(c,c)Q(c,c') making each such square commute means that all of the desired routes are glued together.

view this post on Zulip David Egolf (May 30 2025 at 17:26):

If we think of PP as specifying "partial routes" with a fixed start point and end point, then I suspect an initial cowedge under PP gives us exactly the unique "completed" routes from that starting point to that end point. Requiring the cowedge to be initial I think means that we avoid identifying too many routes, and avoid introducing new unwanted elements.

view this post on Zulip David Egolf (May 30 2025 at 17:27):

If this is on the right track, I think I can then begin to see how using a coend makes sense for composition of profunctors!

view this post on Zulip David Egolf (May 30 2025 at 17:37):

[Perhaps one thing I can take away from this: If one has many diagrams one wants to make commute, sometimes this situation can be organized by using something in the spirit of a natural transformation.]

view this post on Zulip David Egolf (Jun 03 2025 at 17:39):

I feel pretty happy with the above! Next, I think I would like to work out a special case of profunctor composition.

Specifically, I would like to work out the composition of a profunctor :1C:1 \to C with a profunctor :CD:C \to D. And to start with, I'll consider the case where CC and DD both have a single object.

(By 11 I mean a terminal category, having a single object and a single morphism.)

view this post on Zulip David Egolf (Jun 03 2025 at 17:43):

A profunctor :1C:1 \to C is a functor :CopSet:C^{\mathrm{op}} \to \mathsf{Set}. When CC has a single object, I think this amounts to a right action of a monoid. A profunctor :CD:C \to D is a functor :C×DopSet:C \times D^{\mathrm{op}} \to \mathsf{Set}. When CC and DD have a single object, I think such a profunctor amounts to a set together with a left action of some monoid CC on it, compatible with the right action of some monoid DD on it. Upon composing these profunctors, we'll get a profunctor :1D:1 \to D, which is a right action of the monoid DD on some set.

view this post on Zulip David Egolf (Jun 03 2025 at 17:44):

But how exactly does this work? I'd like to use the discussion above regarding profunctor composition to work this out in some detail.

view this post on Zulip David Egolf (Jun 03 2025 at 17:55):

So let us imagine we have profunctors P:1MP:1 \to M and Q:MNQ:M \to N, where MM and NN are monoids (thought of as categories with a single object). Then (QP):1N(Q \circ P):1 \to N. This corresponds to a functor 1×NopSet1 \times N^{\mathrm{op}} \to \mathsf{Set}. If we call the single object of 11 by the name \ast, and the single object of NN by the name N\ast_N, then there is a set (QP)(,N)(Q \circ P)(\ast, \ast_N). What is this set?

view this post on Zulip David Egolf (Jun 03 2025 at 17:57):

I expect (QP)(,N)(Q \circ P)(\ast, \ast_N) to be something like a set of "tensors". Let's see what we get!

view this post on Zulip David Egolf (Jun 03 2025 at 18:07):

Here's a picture to visualize the situation: [EDIT: I ended up creating a second version of this picture and accompanying discussion below, which I think improves on this one]
forming "routes"

view this post on Zulip David Egolf (Jun 03 2025 at 18:10):

We can start with a partial route, which consists of: the identity morphism in 11, together with some morphism nn in NN. This is missing just some mMm \in M to complete the route.

We get two complete routes that we want to consider the same:

  1. identity morphism of \ast, followed by mm; then nn
  2. identity morphism of \ast; then mm followed by nn

We might write these two routes as follows: (m1,n)(m \circ 1_\ast, n) and (1,nm)(1_\ast, n \circ m).

view this post on Zulip David Egolf (Jun 03 2025 at 18:27):

I'm getting tired, so I'll stop here for today. Next time, to avoid getting confused, I'm hoping to draw the diagram that describes what a cowedge is in this setting.

view this post on Zulip John Baez (Jun 03 2025 at 18:30):

One thing you almost but didn't quite do in your previous round of exploring profunctor composition, is to explicitly describe the set (QP)(,n)(Q \circ P)(\ast, \ast_n), or more generally the sets (QP)(a,b)(Q \circ P)(a,b) for any composite of profunctors (they work exactly like the example you're doing now). So I'm eager to see the explicit description you get out of this cowedge stuff.

view this post on Zulip David Egolf (Jun 03 2025 at 18:44):

Before stopping for today, I want to adjust the discussion I provided above relating to this picture:

creating routes V2

view this post on Zulip David Egolf (Jun 03 2025 at 18:46):

I've labelled the black lines this time, which I'm now thinking as being elements of the profunctors involved. So aa is a "route" from 1\ast_1 to M\ast_M, and is an element of P(1,M)P(\ast_1, \ast_M). Similarly, bb is an element of Q(M,N)Q(\ast_M, \ast_N).

I've also removed n:NNn:N \to N from the drawing, as I don't think we need it right now.

view this post on Zulip David Egolf (Jun 03 2025 at 18:49):

Then we have two things we can do with mm: (1) we can use PP to act on aa using mm to create a new route :1M:\ast_1 \to \ast_M or (2) we can use QQ to act on bb to create a new route :MN:\ast_M \to \ast_N.

We might intuitively write this as (a.m,b)=(a,m.b)(a.m,b) = (a,m.b). Or perhaps (am)b=a(mb)(am) \otimes b = a \otimes (mb).

Next time, I'll try to describe this using a diagram involving cowedges! And hopefully that is then helpful for explicitly describing (QP)(,N)(Q \circ P)(\ast,\ast_N).

view this post on Zulip Ryan Wisnesky (Jun 03 2025 at 20:17):

is there an underlying mathematical or philosophical reason why work on profunctors seems to be dominated by considering them as A*B^op->Set rather than A->Set^B^op?

view this post on Zulip John Baez (Jun 03 2025 at 20:19):

David wrote:

We might intuitively write this as (a.m,b)=(a,m.b)(a.m,b) = (a,m.b). Or perhaps (am)b=a(mb)(am) \otimes b = a \otimes (mb).

Okay, now you've come EXTREMELY close to explicitly describing (QP)(,N)(Q \circ P)(\ast,\ast_N). Let me finish the job, because I can't stand the torture any more. :wink:

Here's the explicit description:

(QP)(,N)=mMhom(,m)×hom(m,N)(a.m,b)(a,m.b) \displaystyle{ (Q \circ P)(\ast,\ast_N) = \frac{\sum_{m \in M} \text{hom}(\ast, m) \times \text{hom}(m, \ast_N)}{(a.m,b) \sim (a,m.b)} }

view this post on Zulip John Baez (Jun 03 2025 at 20:22):

First you're taking the coproduct over all objects mMm \in M of the product of homsets

hom(,m)×hom(m,N) \text{hom}(\ast, m) \times \text{hom}(m, \ast_N)

Then you're taking a quotient of this by the equivalence relation generated by (a.m,b)(a,m.b) (a.m,b) \sim (a,m.b) .

So, you're first doing a coproduct and then a coequalizer! Since both these are colimits, you're doing a colimit.

There are more elegant ways to write this colimit, but this is perfectly serviceable.

More generally, any coend is a colimit rather similar to this one.

view this post on Zulip John Baez (Jun 03 2025 at 20:24):

I feel I'm not saying anything you don't know. I'm just making your thoughts more explicit by writing them out as a formula for the composite profunctor QP Q \circ P.

view this post on Zulip David Egolf (Jun 08 2025 at 15:42):

Ryan Wisnesky said:

is there an underlying mathematical or philosophical reason why work on profunctors seems to be dominated by considering them as A*B^op->Set rather than A->Set^B^op?

I don't know, but your comment reminded me of "Distributors at Work". In that paper Bénabou defines the composition of distributors as follows:

For distributors ϕ:AB\phi:A \to B and ψ:BC\psi:B \to C their composition ψϕ\psi \phi is given by LBψϕL_B \psi \circ \phi where LBψL_B \psi is the left Kan extension of ψ:BC^\psi:B \to \hat{C} along the Yoneda functor YB:BB^Y_B:B \to \hat{B}.

So here we are making use of the fact that a profunctor :BC:B \to C corresponds to a functor BC^B \to \hat{C}, where CC is the category of set-valued presheaves on CC. That is, we are making the switch in perspective from a functor :B×CopSet:B \times C^{\mathrm{op}} \to \mathsf{Set} to a functor BSetCopB \to \mathsf{Set}^{C^{\mathrm{op}}}.

view this post on Zulip David Egolf (Jun 08 2025 at 15:46):

I could imagine that we might want to work with "internal profunctors" (if that's the right term) inside categories that aren't cartesian closed. So perhaps that could explain some of the tendency towards the focus on functors :A×BopSet:A \times B^{\mathrm{op}} \to \mathsf{Set} rather than functors :ASetBop:A \to \mathsf{Set}^{B^{\mathrm{op}}}.

view this post on Zulip David Egolf (Jun 08 2025 at 15:51):

John Baez said:

David wrote:

We might intuitively write this as (a.m,b)=(a,m.b)(a.m,b) = (a,m.b). Or perhaps (am)b=a(mb)(am) \otimes b = a \otimes (mb).

Okay, now you've come EXTREMELY close to explicitly describing (QP)(,N)(Q \circ P)(\ast,\ast_N). Let me finish the job, because I can't stand the torture any more. :wink:

Here's the explicit description:

(QP)(,N)=mMhom(,m)×hom(m,N)(a.m,b)(a,m.b) \displaystyle{ (Q \circ P)(\ast,\ast_N) = \frac{\sum_{m \in M} \text{hom}(\ast, m) \times \text{hom}(m, \ast_N)}{(a.m,b) \sim (a,m.b)} }

Haha, well I don't want to drag things out painfully, so I appreciate your description here!

A couple questions/clarifications:

  1. I think in the "numerator", by mm you must mean what I called M\ast_M, the single object of the category MM
  2. In the "denominator" don't we want to quotient out by the equivalence relationship generated by (a.m,b)(a,m.b)(a.m,b) \sim (a, m.b) as mm varies over all elements of the monoid MM? If so, I don't yet see how to handle that with a single coequalizer.

view this post on Zulip John Baez (Jun 08 2025 at 22:32):

  1. I hadn't noticed your category MM had only one object. I also made some other stupid mistakes! I should have written something like

(QP)(,N)=P(,M)×Q(M,N)(a.m,b)(a,m.b)\displaystyle{ (Q \circ P)(\ast,\ast_N) = \frac{P(\ast, \ast_M) \times Q(\ast_M, \ast_N)}{(a.m,b) \sim (a,m.b)} }

  1. Yes, we want to mod out by the equivalence generated by (a.m,b)(a,m.b)(a.m,b) \sim (a, m.b) as mm varies over all elements of the monoid MM. I called this modding out process "a coequalizer" because I think when we're doing it we're coequalizing two functions

P(,M)×M×Q(M,N)P(,M)×Q(M,N) P(\ast, \ast_M) \times M \times Q(\ast_M, \ast_N) \to P(\ast, \ast_M) \times Q(\ast_M, \ast_N)

The first of these functions sends (a,m,b)(a,m,b) to (a.m,b)(a.m, b) while the second sends it to (a,m.b)(a,m.b)

view this post on Zulip John Baez (Jun 08 2025 at 22:38):

I bet you can now write down a similar formula for the composite of two profunctors

P:L↛M,Q:M↛NP : L \not\to M, \qquad Q: M \not\to N.

(I like using something like ↛\not\to to indicate a profunctor, so we can save \to for functors.)

view this post on Zulip John Baez (Jun 08 2025 at 22:46):

The idea is that for any objects L,nN\ell \in L, n \in N we express (QP)(,n)(Q \circ P)(\ell,n) by first forming the set

mMP(,m)×Q(m,n) \displaystyle{ \sum_{m \in M} P(\ell, m) \times Q(m,n) }

and then modding out by some equivalence relation.

view this post on Zulip David Egolf (Jun 08 2025 at 22:48):

John Baez said:

I called this modding out process "a coequalizer" because I think when we're doing it we're coequalizing two functions

P(,M)×M×Q(M,N)P(,M)×Q(M,N) P(\ast, \ast_M) \times M \times Q(\ast_M, \ast_N) \to P(\ast, \ast_M) \times Q(\ast_M, \ast_N)

The first of these functions sends (a,m,b)(a,m,b) to (a.m,b)(a.m, b) while the second sends it to (a,m.b)(a,m.b)

Oh, I see! I had been struggling to set up the coequalizer properly. But it makes sense that we work with functions mapping from P(,M)×M×Q(M,N)P(\ast, \ast_M) \times M \times Q(\ast_M, \ast_N). I had been trying to think of functions from P(,M)×Q(M,N)P(\ast, \ast_M) \times Q(\ast_M, \ast_N). But including MM allows us to "glue together" many things all at once! Perhaps this points out a general principle: the "larger" the source of the two parallel morphisms in a coequalizer, the more opportunities we have for "induced gluing".

view this post on Zulip David Egolf (Jun 08 2025 at 22:50):

I'm still learning how to use coequalizers effectively, and this seems like a good thing to have noticed in that context! :slight_smile:

view this post on Zulip John Baez (Jun 08 2025 at 22:50):

Right!

By the way, I find it disturbing that my outlined formula for QPQ \circ P involves writing PP first and then QQ, but I think we're boxed in by other choices, like wanting to write \ell followed by mm followed by nn from left to right to indicate the three way-stations in our route, but writing QPQ \circ P following the usual convention, where the last thing we do is on the left.

view this post on Zulip David Egolf (Jun 08 2025 at 22:52):

Yes, that makes sense to me. I suppose if we rewrote QPQ \circ P as P;QP;Q (meaning PP, then QQ) then it might look a bit nicer. But what you wrote looks correct to me.

view this post on Zulip David Egolf (Jun 08 2025 at 22:53):

The challenge then is to figure out the proper equivalence relationship to mod out by. Probably it's possible to do this intuitively, and end up with a coequalizer expressing this. (And then maybe it would be interesting to see how this is forced when looking for a universal cowedge?)

view this post on Zulip David Egolf (Jun 08 2025 at 22:55):

I suspect this will work very similarly to what we've described above, and hopefully should just take a bit of thought to write down.

view this post on Zulip David Egolf (Jun 08 2025 at 22:58):

Imagine we hav

John Baez said:

I bet you can now write down a similar formula for the composite of two profunctors

P:L↛M,Q:M↛NP : L \not\to M, \qquad Q: M \not\to N.

(I like using something like ↛\not\to to indicate a profunctor, so we can save \to for functors.)

I see, that's an interesting notational choice. I do enjoy using \to for arrows in any category, and it feels a bit weird to use something else like ↛\not\to instead. But I can understand wanting to avoid confusion between functors and profunctors.

view this post on Zulip David Egolf (Jun 08 2025 at 23:00):

Ok, let me see if I can work out (QP)(,n)(Q \circ P)(\ell, n) for P:L↛MP:L \not\to M and Q:M↛NQ:M \not\to N. Intuitively these should be "routes" from \ell to nn that pass through some point in MM.

So indeed we start out by considering the set mMP(,m)×Q(m,n)\sum_{m \in M}P(\ell, m) \times Q(m,n). We can think of the elements of this sets as describing routes in "two pieces". However, some of the routes described area really the same: when you put the two pieces together you get the same result, even though the two pieces are different.

view this post on Zulip David Egolf (Jun 08 2025 at 23:01):

Thus, we wish to "glue together" certain elements of that set. Hence we wish to set up a coequalizer involving functions to mMP(,m)×Q(m,n)\sum_{m \in M}P(\ell, m) \times Q(m,n).

view this post on Zulip David Egolf (Jun 08 2025 at 23:13):

Intuitively, given a morphism f:mmf:m \to m' in MM, I want to "extend" routes P(,m)P(\ell, m) to ones P(,m)P(\ell, m') (in the spirit of post-composing with ff). But PP is contravariant in MM! So we should really have a function :P(,m)P(,m):P(\ell,m') \to P(\ell,m) in this case.

I thought the variance was making sense earlier, but maybe I was always confused on this point.

view this post on Zulip David Egolf (Jun 08 2025 at 23:18):

Perhaps it is more correct to think of P(,m)P(\ell,m') as a route from mm' to \ell, instead of as a route from \ell to mm'. Then f:mmf:m \to m' intuitively can be "precomposed" with such a route to give us a route from mm to \ell. So then we expect some function in this spirit P(1,f):P(,m)P(,m)P(1_\ell,f):P(\ell, m') \to P(\ell,m) induced by f:mmf:m \to m'.

view this post on Zulip David Egolf (Jun 08 2025 at 23:22):

And g:g:\ell \to \ell' can then be "added on at the end" to a route P(,m)P(\ell, m) from mm to \ell. So we'd expect a function P(g,1m):P(,m)P(,m)P(g, 1_m):P(\ell,m) \to P(\ell',m).

view this post on Zulip David Egolf (Jun 08 2025 at 23:24):

Using that intuition, (QP)(,n)(Q \circ P)(\ell, n) is then to be a set of routes from nn to \ell. It still makes sense to start with mMP(,m)×Q(m,n)\sum_{m \in M}P(\ell, m) \times Q(m,n), and to aim to "glue together" some of the elements of this set using a coequalizer.

So which functions do we want in our coequalizer?

view this post on Zulip David Egolf (Jun 08 2025 at 23:31):

We should take in:

But I'm getting a bit stuck here, as the second bullet point varies depending on what we chose from at first bullet point. So it seems like things are not as simple as forming a product anymore. (Above, our coequalizer functions mapped from P(,M)×M×Q(M,N)P(\ast, \ast_M) \times M \times Q(\ast_M, \ast_N).)

view this post on Zulip David Egolf (Jun 08 2025 at 23:33):

Maybe (for the source of the parallel morphisms in our coequalizer diagram) we want something like a coproduct over sets like these P(,m)×M(m,m)×Q(m,n)P(\ell, m) \times M(m',m) \times Q(m', n) as mm and mm' vary.

view this post on Zulip David Egolf (Jun 08 2025 at 23:35):

So the source of our parallel coequalizer functions should maybe be m,mP(,m)×M(m,m)×Q(m,n)\coprod_{m,m'} P(\ell,m) \times M(m',m) \times Q(m',n).

view this post on Zulip David Egolf (Jun 08 2025 at 23:35):

I'll stop here for now, but it feels like I might be on the right track!

view this post on Zulip John Baez (Jun 09 2025 at 07:44):

David Egolf said:

I suspect this will work very similarly to what we've described above, and hopefully should just take a bit of thought to write down.

Yes, it should be a slight variant of what I wrote down, and you'll see why I mistakenly wrote a \sum (that is a coproduct \bigsqcup) in my first answer.

David Egolf said:

John Baez said:

(I like using something like ↛\not\to to indicate a profunctor, so we can save \to for functors.)

I see, that's an interesting notational choice. I do enjoy using \to for arrows in any category, and it feels a bit weird to use something else like ↛\not\to instead. But I can understand wanting to avoid confusion between functors and profunctors.

It's a pretty standard notation, though I'm having trouble here making the slash on the arrow as small as usual.

The issue is this: we're starting to work with Cat\mathbf{Cat} as a [[double category]], with functors as 'tight arrows' and profunctors as 'loose arrows'. So we need notation to reflect these two kinds of arrows.

view this post on Zulip John Baez (Jun 09 2025 at 07:48):

David Egolf said:

So the source of our parallel coequalizer functions should maybe be m,mP(,m)×M(m,m)×Q(m,n)\coprod_{m,m'} P(\ell,m) \times M(m',m) \times Q(m',n).

Yes! You'll notice this looks a lot like multiplying three matrices:

(PMQ)n=m,mPmMmmQmn \displaystyle{ (PMQ)_{\ell n} = \sum_{m,m'} P_{\ell m} M_{m m'} Q_{m' n} }

Now you just need to do some sort of coequalizer to deal with the morphisms in MM.

view this post on Zulip David Egolf (Jun 09 2025 at 15:56):

John Baez said:

The issue is this: we're starting to work with Cat\mathbf{Cat} as a [[double category]], with functors as 'tight arrows' and profunctors as 'loose arrows'. So we need notation to reflect these two kinds of arrows.

That makes good sense, then!

The nLab article [[double category]] doesn't seem to use the terms "tight arrows" or "loose arrows". But I guess "tight arrow" is a synonym for "vertical arrow", and "loose arrow" is a synonym for "horizontal arrow".

view this post on Zulip David Egolf (Jun 09 2025 at 16:08):

Oh, maybe I'm wrong about that. I see "tight arrow" and "loose arrow" discussed here: [[virtual double category]].

view this post on Zulip James Deikun (Jun 09 2025 at 16:10):

"Tight arrow" and "loose arrow" were picked because people couldn't globally decide on a convention for pseudo double categories whether the pseudo direction was horizontal or vertical. (Pare' and his collaborators went with vertical, while most people who also worked with virtual double categories went with horizontal.)

view this post on Zulip John Baez (Jun 09 2025 at 16:12):

David Egolf said:

But I guess "tight arrow" is a synonym for "vertical arrow", and "loose arrow" is a synonym for "horizontal arrow".

Yes, that's how I use those words. As James just explained, some people who draw diagrams differently use the word "vertical arrow" to mean "horizontal arrow" and vice versa. Thus, @Mike Shulman invented the terms "tight arrow" and "loose arrow", which are more descriptive. (A profunctor is more sloppy, more loose, than a functor, since it can send one object to many objects.)

I'm surprised this new preferred terminology isn't used on the nLab! I guess Mike has other things to do besides spending all day updating the nLab.

view this post on Zulip Mike Shulman (Jun 09 2025 at 16:13):

To be precise, Steve Lack and I invented those terms together.

view this post on Zulip John Baez (Jun 09 2025 at 16:13):

Oh, cool.

view this post on Zulip Mike Shulman (Jun 09 2025 at 16:15):

We can't get rid of the "vertical/horizontal" terminology completely, though, because there are also double categories in which neither direction is "tighter" than the other. For instance, squares in a 2-category (where the two classes of arrows are the same), or lax and colax morphisms. Of course, such double categories have to be either strict in both directions or weak in both directions.

view this post on Zulip John Baez (Jun 09 2025 at 16:21):

In all my papers I say "vertical" and "horizontal", and having written a bunch of papers using that convention I'm going to keep on doing it until I die, so people can read my papers as a body with minimal internal inconsistency of notation. But when I told David that that functors and profunctors form a double category just now, I felt like saying "tight" and "loose".

view this post on Zulip Nathanael Arkor (Jun 09 2025 at 16:23):

John Baez said:

I'm surprised this new preferred terminology isn't used on the nLab! I guess Mike has other things to do besides spending all day updating the nLab.

It's used in some places on the nLab, but at the moment the entry [[double category]] refers both to strict double categories (in which the terminology "horizontal/vertical" is unavoidable, as Mike points out) and pseudo double categories (in which "tight/loose" is clearer). It may make more sense to split it into two entries.

view this post on Zulip Mike Shulman (Jun 09 2025 at 16:27):

Interesting side note: in a paper I'm writing right now with @Aaron David Fairbanks , we realized that there is an interesting substantive difference in conventions regarding double categories and 2-categories. When we take the two underlying 2-categories of a (strict, for simplicity) double categories, we have to decide whether to orient the globular 2-cells in the horizontal 2-category "up" or "down", and similarly whether to orient the globular 2-cells in the vertical 2-category "left" or "right", making for four choices. There's a certain natural attraction to choosing "down" and "right", since then these 2-cells will always point in the same direction as the other kind of 1-cell. But those two choices together are inconsistent with the example of squares in a 2-category, whose underlying 2-categories will both be the original 2-category (as we naturally expect) only if we choose "down" and "left", or else "up" and "right" (depending on which direction we take the squares to point -- but there are only two choices for this).

view this post on Zulip Nathanael Arkor (Jun 09 2025 at 16:34):

If I understand correctly, this is the same ambiguity that arises in whether one considers distributors to be covariant in their domain or codomain: since certainly one would want the underlying 2-category of the double category Dist to be exactly Cat, and so this dictates which direction the 2-cells should face.

view this post on Zulip Mike Shulman (Jun 09 2025 at 17:14):

It's certainly related! I think if you choose a profunctor ABA\to B to be a functor Bop×ASetB^{\rm op}\times A\to \rm Set, then in the double category Prof (with profunctors horizontal) you want the underlying 2-categories to be "down" and "left", whereas if you choose it to be a functor Aop×BSetA^{\rm op}\times B\to \rm Set, you want the underlying 2-categories to be "down" and "right"?

view this post on Zulip Mike Shulman (Jun 09 2025 at 17:14):

(So as to get Cat as the vertical 2-category in both cases.)

view this post on Zulip David Egolf (Jun 09 2025 at 19:26):

I had been following the convention in [[profunctor]], where a profunctor from CC to DD is a functor :Dop×CSet:D^{\mathrm{op}} \times C \to \mathsf{Set}. However, I see that in "Yoneda Theory for Double Categories" (by Paré), a profunctor from CC to DD is defined as a functor :Cop×DSet:C^{\mathrm{op}} \times D \to \mathsf{Set}.

view this post on Zulip David Egolf (Jun 09 2025 at 19:27):

I think I like the second convention better, at the moment. Because then, if I have things straight, a profunctor P:C↛DP:C \not\to D is such that P(c,d)P(c,d) can be interpreted as a set of routes from cc to dd.

view this post on Zulip David Egolf (Jun 09 2025 at 19:27):

Indeed, in that case f:ccf:c' \to c gives a function P(f,1d):P(c,d)P(c,d)P(f,1_d):P(c,d) \to P(c',d) which I'm thinking of in the spirit of "precomposing with ff".

view this post on Zulip John Baez (Jun 09 2025 at 19:42):

Yes, both conventions have advantages. If you're going to use your convention, where P(c,d)P(c,d) means the set of routes from cc to dd, it's good to let PQP \circ Q to mean "first do PP, then do QQ". Then everything goes from left to right.

view this post on Zulip John Baez (Jun 09 2025 at 19:43):

Alternatively you could take an approach where everything goes from right to left.

view this post on Zulip Mike Shulman (Jun 10 2025 at 00:13):

David Egolf said:

I think I like the second convention better, at the moment. Because then, if I have things straight, a profunctor P:C↛DP:C \not\to D is such that P(c,d)P(c,d) can be interpreted as a set of routes from cc to dd.

With the other convention, a profunctor P:CDP : C \mathbin{⇸} D is such that P(d,c)P(d,c) can be thought of as a set of routes from dd to cc.

view this post on Zulip Mike Shulman (Jun 10 2025 at 00:14):

John Baez said:

Yes, both conventions have advantages. If you're going to use your convention, where P(c,d)P(c,d) means the set of routes from cc to dd, it's good to let PQP \circ Q to mean "first do PP, then do QQ". Then everything goes from left to right.

However, then composition in the hom-profunctor is a map homC(a,b)×homC(b,c)homC(a,c)\hom_C(a,b) \times \hom_C(b,c) \to \hom_C(a,c), which isn't the way most of us write composition in categories.

view this post on Zulip Mike Shulman (Jun 10 2025 at 00:15):

One advantage of the nLab convention is that then a profunctor from CC to DD is the same as a functor from CC to the presheaf category of DD.

view this post on Zulip Mike Shulman (Jun 10 2025 at 00:20):

Also it gives you a covariant pseudofunctor CatProf\rm Cat \to Prof, which is nice if you want to talk about it as a free cocompletion. Unless I confused myself again, Paré's convention gives you a functor CatcoProf\rm Cat^{co} \to Prof.

view this post on Zulip John Baez (Jun 10 2025 at 16:44):

Mike Shulman said:

One advantage of the nLab convention is that then a profunctor from CC to DD is the same as a functor from CC to the presheaf category of DD.

Yes, this is a massive advantage.

view this post on Zulip John Baez (Jun 10 2025 at 17:37):

For example, this means that a presheaf on DD is the same as a profunctor 1↛D1 \not\to D, just as an object of DD is the same as a functor 1D1 \to D. Since functors are a special case of profunctors, this encourages us to think of objects of DD as a special case of presheaves on D.D.

This should remind you of the Yoneda lemma, which says that any object of DD gives a special sort of presheaf on DD, called a 'representable presheaf'. And indeed, if you work out the details of how an object dDd \in D gives a functor 1D1 \to D which gives a profunctor 1↛D1 \not\to D which gives a presheaf on DD, you'll see the presheaf we get is precisely the representable presheaf hom(,d)\text{hom}(-,d)!

view this post on Zulip John Baez (Jun 10 2025 at 17:41):

(When I say "functors are a special case of profunctors", what I mean is that any functor F:CDF : C \to D gives a profunctor C↛DC \not\to D called its companion. In the nLab convention, I guess this profunctor is the functor Dop×CSet D^{\text{op}} \times C \to \mathsf{Set} sending (d,c)(d,c) to hom(d,Fc)\text{hom}(d, F c).)

(It's also true that every functor F:CDF: C \to D gives a functor D↛CD \not\to C called its conjoint, but we don't need to think about that now.)

view this post on Zulip Mike Shulman (Jun 10 2025 at 17:43):

And saying "functors are a special case of profunctors" also makes the most sense if you have a fully covariant inclusion CatProf\rm Cat \to Prof, which requires this convention.

view this post on Zulip John Baez (Jun 11 2025 at 05:37):

By the way, I just remembered that we can use \rightsquigarrow to create a wiggly arrow like this:

F:CDF: \mathsf{C} \rightsquigarrow \mathsf{D}

This is another possible notation for profunctors, or loose arrows, or any sort of arrows other than the 'usual' arrows one happens to be using.

view this post on Zulip Mike Shulman (Jun 11 2025 at 06:26):

I prefer the notation CDC \mathrel{⇸} D for profunctors. It's a bit more work to type here, but C↛DC \not\to D looks to me like "there is no functor from CC to DD".

view this post on Zulip John Baez (Jun 11 2025 at 06:30):

Oh, I definitely prefer that, I just couldn't figure out how to draw it! I was complaining earlier about the huge slash in ↛\not\to. It looks like drawing CDC \mathrel{⇸} D requires unicode:

$$C \mathrel{⇸} D$$

view this post on Zulip James Deikun (Jun 11 2025 at 07:00):

$$C \mathrel{\char"21f8} D$$ works too.

view this post on Zulip James Deikun (Jun 11 2025 at 07:20):

$$C \mathrel{{\to}\mathllap{\shortmid\ \ }} D$$ also does something in that genre.

view this post on Zulip John Baez (Jun 11 2025 at 07:22):

These give

CDC \mathrel{\char"21f8} D

and

C  DC \mathrel{{\to}\mathllap{\shortmid\ \ }} D

respectively.

view this post on Zulip John Baez (Jun 11 2025 at 07:23):

We need macros here. :smirk:

view this post on Zulip Nathanael Arkor (Jun 11 2025 at 07:25):

(Macros are a requested feature for Zulip, but aren't yet supported.)

view this post on Zulip John Baez (Jun 11 2025 at 07:28):

I can see plenty of difficulties, hence my smirk.

view this post on Zulip James Deikun (Jun 11 2025 at 07:50):

The least hacky way I can find to get the spacing, which is unfortunately long, is $$C \mathrel{\mathrlap{\to}{\overset{\displaystyle{\hphantom{\to}}}{\shortmid}}} D$$, which looks like CDC \mathrel{\mathrlap{\to}{\overset{\displaystyle{\hphantom{\to}}}{\shortmid}}} D ... I wish one of the "lap" macros was smarter about spacing to begin with.

view this post on Zulip Mike Shulman (Jun 11 2025 at 07:57):

I think the unicode version looks the best of the options available on Zulip.

view this post on Zulip James Deikun (Jun 11 2025 at 08:04):

Yes, it's unfortunate that it's the hardest to type, or if you're using the \char version, to remember.

view this post on Zulip David Egolf (Jun 13 2025 at 16:44):

Thanks @Mike Shulman and @John Baez for elaborating on the advantages of the nLab convention!

Let me try out this "companion" business in a special case. If we start with a functor Δx:1D\Delta_x:1 \to D constant at xDx \in D (which amounts to an object xx of DD), this apparently gives us a "companion" profunctor :1D:1 \mathrel{⇸} D (using the nLab convention). This profunctor :Dop×1Set:D^{\mathrm{op}} \times 1 \to \mathsf{Set} should send (d,)(d,\ast) to D(d,Δx())=D(d,x)D(d, \Delta_x(\ast)) = D(d,x). (Here \ast is the single object of some terminal category 11). We have Dop×1DopD^{\mathrm{op}} \times 1 \cong D^{\mathrm{op}}, and the corresponding functor :DopSet:D^{\mathrm{op}} \to \mathsf{Set} is D(,x)D(-,x).

So if we go: object \to profunctor \to presheaf, we end up sending an object to the presheaf it represents.

view this post on Zulip David Egolf (Jun 13 2025 at 16:46):

Mike Shulman said:

And saying "functors are a special case of profunctors" also makes the most sense if you have a fully covariant inclusion CatProf\rm Cat \to Prof, which requires this convention.

This seems like a very nice thing to have!

view this post on Zulip David Egolf (Jun 13 2025 at 16:52):

Well, I'm convinced that the nLab definition of profunctor has some serious advantages. I suppose that I can use that definition, and still retain certain intuition by working in the opposite category to work out composition (if I feel like it!).

And thinking of P(d,c)P(d,c) for a profunctor P:CDP:C \mathrel{⇸} D as a set of routes from dd to cc isn't so bad, either. It just a feels a bit "backwards".

view this post on Zulip David Egolf (Jun 13 2025 at 17:03):

Now, let me see if I can (finally) write down a coequalizer describing how two profunctors compose.

We start with P:LMP:L \mathbin{⇸} M and Q:MNQ:M \mathbin{⇸} N. We want to form QP:LNQ \circ P:L \mathbin{⇸} N. Intuitively, (QP)(n,)(Q \circ P)(n, \ell) should be a set of routes from nn to \ell that pass through MM. We can build up such a route using a route from nn to mm', a morphism from mm' to mm, and finally a route from mm to \ell. (Here mm and mm' are objects of MM, and they can vary).

So our set of "route building blocks" is, as discussed above, m,mQ(n,m)×M(m,m)×P(m,)\coprod_{m,m'} Q(n, m') \times M(m',m) \times P(m, \ell). We want two functions from this set to the set xMQ(n,x)×P(x,)\coprod_{x \in M} Q(n, x) \times P(x, \ell), describing the two ways to assemble a "two-part route" from two routes and a "connecting piece" between them.

view this post on Zulip David Egolf (Jun 13 2025 at 17:10):

Given f:mmf:m' \to m, P:Mop×LSetP:M^{\mathrm{op}} \times L \to \mathsf{Set} will gives us a function P(f,1):P(m,)P(m,)P(f,1_\ell): P(m, \ell) \to P(m',\ell).

So we can build a function Q(n,m)×M(m,m)×P(m,)Q(n,m)×P(m,)Q(n,m') \times M(m', m) \times P(m,\ell) \to Q(n,m') \times P(m', \ell) which acts by (q,f,p)(q,P(f,1)(p))(q,f,p) \mapsto (q,P(f,1_\ell)(p)).

view this post on Zulip David Egolf (Jun 13 2025 at 17:12):

By composing with the appropriate coproduct inclusion function, we end up with a function Q(n,m)×M(m,m)×P(m,)xMQ(n,x)×P(x,)Q(n,m') \times M(m', m) \times P(m,\ell) \to \coprod_{x \in M} Q(n,x) \times P(x, \ell).

view this post on Zulip David Egolf (Jun 13 2025 at 17:14):

Doing this for each (m,m)(m,m') defines by the universal property of coproducts a function :m,mQ(n,m)×M(m,m)×P(m,)xMQ(n,x)×P(x,):\coprod_{m,m'} Q(n, m') \times M(m',m) \times P(m, \ell) \to \coprod_{x \in M} Q(n, x) \times P(x, \ell).

I think that's one of the two functions we're looking for!

view this post on Zulip David Egolf (Jun 13 2025 at 17:19):

We can get the other function by doing a similar thing, except this time we combine the "connecting piece" using QQ instead of PP.

Given f:mmf:m'\to m, Q:Nop×MSetQ:N^{\mathrm{op}} \times M \to \mathsf{Set} gives us a function Q(1n,f):Q(n,m)Q(n,m)Q(1_n,f): Q(n,m') \to Q(n,m). This lets us build a function :Q(n,m)×M(m,m)×P(m,)Q(n,m)×P(m,):Q(n,m') \times M(m', m) \times P(m,\ell) \to Q(n,m) \times P(m, \ell), which acts by (q,f,p)(Q(1n,f)(q),p)(q,f,p) \mapsto (Q(1_n,f)(q), p).

Composing with the appropriate coproduct inclusion function, and then repeating this entire process for each (m,m)(m,m') will give us a second function :m,mQ(n,m)×M(m,m)×P(m,)xMQ(n,x)×P(x,):\coprod_{m,m'} Q(n, m') \times M(m',m) \times P(m, \ell) \to \coprod_{x \in M} Q(n, x) \times P(x, \ell).

view this post on Zulip David Egolf (Jun 13 2025 at 17:24):

Finally, we can take a coequalizer of these two functions to presumably get (QP)(n,)(Q \circ P)(n, \ell)!

view this post on Zulip David Egolf (Jun 13 2025 at 17:27):

I notice that the above only defines (QP)(Q \circ P) on objects, so there's more work to do still. But I'll stop here for today!

view this post on Zulip John Baez (Jun 13 2025 at 20:54):

David Egolf said:

Thanks Mike Shulman and John Baez for elaborating on the advantages of the nLab convention!

Let me try out this "companion" business in a special case. If we start with a functor Δx:1D\Delta_x:1 \to D constant at xDx \in D (which amounts to an object xx of DD), this apparently gives us a "companion" profunctor :1D:1 \mathrel{⇸} D (using the nLab convention). This profunctor :Dop×1Set:D^{\mathrm{op}} \times 1 \to \mathsf{Set} should send (d,)(d,\ast) to D(d,Δx())=D(d,x)D(d, \Delta_x(\ast)) = D(d,x). (Here \ast is the single object of some terminal category 11). We have Dop×1DopD^{\mathrm{op}} \times 1 \cong D^{\mathrm{op}}, and the corresponding functor :DopSet:D^{\mathrm{op}} \to \mathsf{Set} is D(,x)D(-,x).

So if we go: object \to profunctor \to presheaf, we end up sending an object to the presheaf it represents.

Great! You've verified this:

John Baez said:

And indeed, if you work out the details of how an object dDd \in D gives a functor 1D1 \to D which gives a profunctor 1↛D1 \not\to D which gives a presheaf on DD, you'll see the presheaf we get is precisely the representable presheaf hom(,d)\text{hom}(-,d)!

view this post on Zulip John Baez (Jun 13 2025 at 20:55):

David Egolf said:

Finally, we can take a coequalizer of these two functions to presumably get (QP)(n,)(Q \circ P)(n, \ell)!

Great! Looks good.

view this post on Zulip David Egolf (Jun 18 2025 at 18:52):

I think I next want to understand a left Kan extension closely related to profunctor composition.

view this post on Zulip David Egolf (Jun 18 2025 at 18:57):

Referencing "Distributors at Work", apparently we can define profunctor composition like this:

view this post on Zulip David Egolf (Jun 18 2025 at 18:59):

We can help organize the situation using a diagram:
diagram

view this post on Zulip David Egolf (Jun 18 2025 at 19:05):

A few questions I'd like to answer:

view this post on Zulip David Egolf (Jun 18 2025 at 19:17):

Notice that if CC is a terminal category, then ψt:BPSh(C)Set\psi^t:B \to \mathsf{PSh}(C) \simeq \mathsf{Set} and the left Kan extension takes in presheaves on BB and returns sets. I am hopeful that this left Kan extension can be thought of as "tensoring with ψt\psi^t". (See "Sheaves in Geometry and Logic" p. 417).

view this post on Zulip John Baez (Jun 18 2025 at 22:34):

David Egolf said:

A few questions I'd like to answer:

If a category CC is [[cartesian closed]], there's a natural bijection between morphisms

a×bc a \times b \to c

and morphisms

bca b \to c^a

The category Cat\mathsf{Cat} is cartesian closed so there's a bijection between functors

Cop×BSetC^{\mathrm{op}} \times B \to \mathsf{Set}

and functors

BSetCop B \to \mathsf{Set}^{C^{\text{op}}}

view this post on Zulip John Baez (Jun 18 2025 at 22:36):

This may or may not make sense, but it means you need to understand "cartesian closedness" and why Cat\mathsf{Cat} is cartesian closed.

view this post on Zulip David Egolf (Jun 18 2025 at 23:49):

Yes, that makes sense!

Reviewing the definition of being cartesian closed: A category with binary products AA is cartesian closed exactly if for every object aa the functor ×a:AA- \times a:A \to A has a right adjoint [a,]:AA[a,-]:A \to A.

view this post on Zulip David Egolf (Jun 18 2025 at 23:51):

As a result, for every aa, we have a bijection A(b×a,c)A(b,[a,c])A(b \times a,c) \cong A(b, [a,c]), which is natural in bb and cc.

(It's also apparently natural in aa, which is surprising to me!)

view this post on Zulip David Egolf (Jun 18 2025 at 23:52):

However, it's one thing to know that this bijection exists and another to be able to calculate how it works!

view this post on Zulip David Egolf (Jun 18 2025 at 23:55):

I suspect that I could probably guess how this bijection works in the case of interest. However, I'm now wondering if there is a general procedure one can follow to compute natural bijections for an arbitrary adjunction, given that one knows how each of the functors involved in the adjunction work.

Understanding a procedure like that sounds like it could be quite helpful in general, when wishing to study an adjunction!

view this post on Zulip David Egolf (Jun 18 2025 at 23:59):

I suppose I'm assuming here that if LL is left adjoint to RR (for some functors LL and RR) then LL can only be left adjoint to RR in "one way". I'm not 100% sure that's true!

view this post on Zulip David Egolf (Jun 19 2025 at 00:04):

The nLab says that L:CDL:C \to D is left adjoint to R:DCR:D \to C if there exists a natural isomorphism D(L(),)C(,R())D(L(-), -) \cong C(-, R(-)). I'm wondering if this natural isomorphism is necessarily unique.

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:04):

David Egolf said:

I suppose I'm assuming here that if LL is left adjoint to RR (for some functors LL and RR) then LL can only be left adjoint to RR in "one way". I'm not 100% sure that's true!

It's not. If you have one adjunction LRL\dashv R, you can compose it with any automorphism of LL (or RR) to get a different adjunction LRL\dashv R.

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:05):

David Egolf said:

The nLab says that L:CDL:C \to D is left adjoint to R:DCR:D \to C if there exists a natural isomorphism D(L(),)C(,R())D(L(-), -) \cong C(-, R(-)).

So really it should say "...if it is equipped with a natural isomorphism...".

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:05):

Since being adjoint is structure, not a property.

view this post on Zulip David Egolf (Jun 19 2025 at 00:06):

Oh, wow! That's not the answer I expected. Thanks for explaining that!

view this post on Zulip David Egolf (Jun 19 2025 at 00:09):

I suppose a followup question then is this: Is it possible for a category to be cartesian closed in multiple ways? That is, can ×a- \times a potentially be left adjoint to [a,][a,-] in multiple ways?

(This potentially relates to the question: Does the functor ×a- \times a have any non-identity automorphisms?)

view this post on Zulip David Egolf (Jun 19 2025 at 00:12):

It would probably also be a good exercise for me to see how automorphisms of LL can let us produce new adjunctions LRL \dashv R from old ones...

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:12):

Any automorphism of the object aa will induce an automorphism of the functor ×a-\times a. Therefore, if you fix a particular functor [a,][a,-], then it can indeed be right adjoint to ×a-\times a in more than one way.

However, this isn't what "being cartesian closed in more than one way" would mean. Being cartesian closed includes the datum of the functor [a,][a,-], and so an isomorphism between two "cartesian closednesses" would allow a nonidentity isomorphism between these functors, [a,][a,][a,-] \cong [a,-]'. And while two fixed functors can be adjoint in more than one way, one fixed functor can only "have an adjoint" in one way: any two of its adjoints are isomorphic by a unique isomorphism respecting the two adjunctions.

view this post on Zulip David Egolf (Jun 19 2025 at 00:20):

Thanks for clarifying that! Let me see if I can unconfuse myself based on what you just said.

Apparently it is possible for two fixed functors to be adjoint in more than one way. However, a fixed functor can only "have an adjoint" (a left adjoint, for example) in essentially one way: any two functors that are (left) adjoint to it are isomorphic.

And when talking about a category being cartesian closed, we just ask for ×a- \times a to have a right adjoint for each aa. There is only one way really to do this, because right adjoints are (essentially) unique.

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:21):

Correct!

view this post on Zulip David Egolf (Jun 19 2025 at 00:21):

And, if I'm understanding correctly, a choice of a specific adjunction between ×a- \times a and [,a][-,a] isn't required when declaring a category to be cartesian closed.

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:25):

Well, technically there are two options. You could require a choice of a specific functor [a,][a,-] and a specific adjunction, or merely assert that there exists some such functor and an adjunction.

view this post on Zulip Mike Shulman (Jun 19 2025 at 00:25):

But you wouldn't want to require a choice of a specific functor but only assert that there exists some adjunction.

view this post on Zulip David Egolf (Jun 19 2025 at 00:31):

I see! I'll plan to think that over for a while.

view this post on Zulip John Baez (Jun 19 2025 at 09:42):

Mike Shulman said what I wanted to say so I'll delete my response except for this:

Puzzle. What's a pair of functors that are adjoint in more than one way?

(This is a puzzle for myself, or anyone else who wants to help out.)

view this post on Zulip Chaitanya Leena Subramaniam (Jun 19 2025 at 17:04):

John Baez said:

Puzzle. What's a pair of functors that are adjoint in more than one way?

(This is a puzzle for myself, or anyone else who wants to help out.)

A category with a [[zero object]] or a category with [[biproducts]].

view this post on Zulip John Baez (Jun 19 2025 at 17:13):

I see how the latter makes the biproduct :C×CC\oplus : C \times C \to C be both left and right adjoint to the diagonal Δ:CC×C\Delta : C \to C \times C, and how the former makes the zero object 0:1C0: 1 \to C be both left and right adjoint to the unique functor !:C1! : C \to 1.

But I was asking about something else: I want to find functors F:CDF : C \to D and G:DCG : D \to C such that FF is left adjoint to GG in two different ways, i.e. with two different choices of natural isomorphism

αc,d:hom(Fc,d)hom(c,Gd) \alpha_{c,d} : \text{hom}(F c, d) \to \text{hom}(c , G d)

I'd prefer a 'mathematically natural' solution but I'll take anything.

view this post on Zulip Alonso Perez-Lona (Jun 19 2025 at 17:17):

Without further conditions? Given that that would give rise to an object with two different monoid structures in [C,C], I'd guess it's most interesting when these are compatible in some way, no? There is duoid, for example

view this post on Zulip John Baez (Jun 19 2025 at 17:19):

Without further conditions. I want to make the widest possible audience realize that when you say "FF is left adjoint to GG", a reasonable question is "how", because there can be multiple different ways. This will work best if we can find two fairly familiar functors that are adjoint to each other in more than one fairly interesting way.

view this post on Zulip Mike Shulman (Jun 19 2025 at 17:21):

I already gave a hint of one solution to this puzzle in my previous comments.

view this post on Zulip John Baez (Jun 19 2025 at 17:23):

Oh, sorry:

Mike Shulman said:

If you have one adjunction LRL\dashv R, you can compose it with any automorphism of LL (or RR) to get a different adjunction LRL\dashv R.

view this post on Zulip Mike Shulman (Jun 19 2025 at 17:25):

And
Mike Shulman said:

Any automorphism of the object aa will induce an automorphism of the functor ×a-\times a.

view this post on Zulip John Baez (Jun 19 2025 at 17:28):

Right. That class of examples is easy to understand: I know a lot of nontrivial automorphisms of objects in cartesian closed categories. So thanks, you've solved my puzzle.

But I'm not instantly thinking of any automorphisms of functors like "the free group on a set" or "the free vector space on a set". Is that because those particular functors only have the identity automorphism, or is it just a failure of imagination on my part?

view this post on Zulip Mike Shulman (Jun 19 2025 at 18:27):

John Baez said:

That class of examples is easy to understand: I know a lot of nontrivial automorphisms of objects in cartesian closed categories.

Before we leave that class of examples, I want to mention a slight modification of them that I find even more compelling in terms of realizing that 'when you say "FF is left adjoint to GG", a reasonable question is "how"'. In the case of ×a-\times a and [a,][a,-], there may be lots of adjunctions, but there is obviously a "canonical" one corresponding to the identity automorphism (which also happens to be the one that is a component of the family of such adjunctions that vary naturally in aa).

However, suppose we pick two objects aa and bb of a cartesian closed category that happen to be isomorphic, but with no obvious or canonical isomorphism (e.g. N\mathbb{N} and Q\mathbb{Q}). Then any isomorphism aba\cong b yields an adjunction between the functors (×a)(-\times a) and [b,][b,-], but now there is no way to single out any one of those adjunctions as the obvious, canonical, or natural one.

view this post on Zulip Mike Shulman (Jun 19 2025 at 18:31):

John Baez said:

But I'm not instantly thinking of any automorphisms of functors like "the free group on a set" or "the free vector space on a set".

So, one first observation is that if we fix a particular adjunction FUF\dashv U, then there is an induced bijection between automorphisms of FF and automorphisms of UU ([[conjugate transformation of adjoints]]). So this question is equivalent to asking for automorphisms of the forgetful functors from groups or vector spaces to sets. In other words, is there a way to define, for every group GG, a bijection from the underlying set of GG to itself, which varies naturally with respect to group homomorphisms?

view this post on Zulip John Baez (Jun 19 2025 at 20:01):

So then the map gg1g \mapsto g^{-1} should work, right?

view this post on Zulip John Baez (Jun 19 2025 at 20:02):

And when you put it this way, I bet this is the only one except for the identity.

view this post on Zulip Mike Shulman (Jun 19 2025 at 20:37):

Yes, I agree. And for vector spaces there should be multiplication by every nonzero scalar.

view this post on Zulip John Baez (Jun 19 2025 at 21:23):

So what are these "twisted forms" of the famous adjunctions between Set\textsf{Set} and Grp\mathsf{Grp}, or Set\mathsf{Set} and Vect\mathsf{Vect}, actually like? That's a vague question, but I don't feel I know what would happen if you used one of these twisted forms in a place where most people would use the usual one.

view this post on Zulip Mike Shulman (Jun 19 2025 at 22:11):

Well, I suppose it depends on the place. But we can describe them a bit more explicitly. E.g. if GG is a group and XX a set and we have a function f:XUGf:X\to UG, the corresponding group homomorphism FXGFX \to G under the twisted adjunction is the unique one that sends each generator xx to f(x)1f(x)^{-1}.

view this post on Zulip Mike Shulman (Jun 19 2025 at 22:11):

(This is fun, I've never really thought about these sorts of twisted adjunctions concretely before.)

view this post on Zulip John Baez (Jun 19 2025 at 22:37):

That's very helpful. Now I'm wondering how it would affect more complicated constructions. For starters, the monad for groups has an evil twin based on this alternative adjunction. What are the algebras of that like?

Or maybe I should say "what's the Eilenberg-Moore category of that like?"

view this post on Zulip John Baez (Jun 19 2025 at 22:44):

Or maybe it's just the forgetful functor from the Eilenberg-Moore category to Set\mathsf{Set} that gets changed???

view this post on Zulip Mike Shulman (Jun 19 2025 at 22:56):

Well, the underlying functor of the twisted monad will be the same, but the unit and multiplication will be different. So whether or not a given function TXXTX\to X is an algebra will be a different condition, so the Eilenberg-Moore categories won't be identical.

view this post on Zulip Mike Shulman (Jun 19 2025 at 22:57):

However, I think the two monads should be isomorphic: the same automorphism we used for the twisting should induce an automorphism of the functor T=UFT = UF that is an isomorphism of monads from the ordinary one to the twisted one. And therefore, the two Eilenberg-Moore categories should be equivalent (even isomorphic).

view this post on Zulip Mike Shulman (Jun 19 2025 at 22:59):

Explicitly in the case of groups, TXTX is the set of reduced words in elements of xx and their formal inverses. The usual unit XTXX\to TX sends xx to the singleton word (x)(x), while the twisted one would presumably send it to (x1)(x^{-1}), and similarly for the multiplication. The automorphism TTT\cong T presumably toggles the invertedness of letters in the words, e.g. sending xxy1zx1xxy^{-1}zx^{-1} to x1x1yz1xx^{-1}x^{-1}yz^{-1}x.

view this post on Zulip David Egolf (Jun 22 2025 at 15:56):

This is all interesting stuff!

In the context of trying to better understand what it means for a category to be cartesian closed, I would like to see how this works:

Mike Shulman said:

It's not. If you have one adjunction LRL\dashv R, you can compose it with any automorphism of LL (or RR) to get a different adjunction LRL\dashv R.

view this post on Zulip David Egolf (Jun 22 2025 at 16:08):

To do this, the first strategy that comes to mind is as follows.

I read in "Elementary Categories, Elementary Toposes" (by McLarty) that

Adjunctions correspond exactly to isomorphisms of comma categories that commute with base functors.

To elaborate, if we have an adjunction FGF \dashv G involving functors F:XAF:X \to A and G:AXG:A \to X, then there is a unique functor isomorphism I:(F,A)(X,G)I:(F,A) \to (X,G) that commutes with the "base functors". Given such an isomorphism, we can then construct an adjunction. These two processes are inverse to one another.

view this post on Zulip David Egolf (Jun 22 2025 at 16:10):

So, given an automorphism of FF, perhaps we can try to construct an isomorphism of categories :(F,A)(F,A):(F,A) \to (F,A) which commutes with base functors.

view this post on Zulip John Baez (Jun 22 2025 at 16:13):

This is a fairly roundabout way to figure out what it means for a category to be cartesian closed! But it's a good way to build up familiarity with adjunctions.

The reason is that:

So a common exercise people do right around now is that one: define what it means for two right adjoints of a functor to be isomorphic, and check they're all (uniquely) isomorphic.

But it's much more rare to talk about what Mike and I were just talking about. (That's why we were talking about it.) We were talking about taking a fixed adjunction and 'twiddling' it to get other nonisomorphic adjunctions with the same underlying pair of functors.

view this post on Zulip Chaitanya Leena Subramaniam (Jun 22 2025 at 18:53):

John Baez said:

Right. That class of examples is easy to understand: I know a lot of nontrivial automorphisms of objects in cartesian closed categories. So thanks, you've solved my puzzle.

But I'm not instantly thinking of any automorphisms of functors like "the free group on a set" or "the free vector space on a set". Is that because those particular functors only have the identity automorphism, or is it just a failure of imagination on my part?

I see. Given the subsequent discussion with Mike and others, would it be fair to rephrase what you're looking for as non-trivial automorphisms of algebraic theories? If so, I can see that certain syntactic presentations of an algebraic theory might provide ways to do so.

Here I'm seeing an algebraic theory as an identity-on-objects, finite-product-preserving functor lT:FinopTl_{\mathbb{T}}:Fin^{op}\to\mathbb{T} and an automorphism of it as a natural isomorphism. Such a natural isomorphism is the data of a syntactic context isomorphism n,σn:(x1,,xn)(x1,,xn)\forall n, \sigma_n:(x_1,\dots,x_n)\to (x_1,\dots,x_n), along with a proof of its naturality (using the syntactic presentation of the theory).

Another bunch of these examples should come from automorphisms of polynomial endofunctors (which induce automorphisms of their free monads) on Set, or on a slice Set/S.

view this post on Zulip David Egolf (Jun 26 2025 at 17:10):

I look forward to continuing in this thread! I'm currently planning to do so around the middle of next week.

view this post on Zulip Ruby Khondaker (Jul 03 2025 at 07:12):

In terms of figuring out what it means for a category to be cartesian-closed, I found personally that this made the most sense through the lens of representability?

In set theory, say, the universal property of ABA^B is that functions CABC \to A^B can be “uncurried” to functions C×ABC \times A \to B, and there’s also an inverse “currying” operation. This becomes an isomorphism between Hom(C,AB)\text{Hom}(C, A^B) and Hom(C×A,B)\text{Hom}(C \times A, B), natural in A,B,CA, B, C.

But now this definition makes sense in any* category! So you can define an exponential object ABA^B as one that satisfies Hom(,AB)\text{Hom}(-, A^B) being naturally isomorphic to Hom(×A,B)\text{Hom}(- \times A, B). Of course, if this exists for _every_ BB, this defines a right adjoint to ×A- \times A.

You can also get the “natural” maps by applying the yoneda lemma, I.e. following where the identities go. So the identity ABABA^B \to A^B transposes to the evaluation map AB×BAA^B \times B \to A, which is the counit of the adjunction. The unit is the transpose of the identity A×BA×BA \times B \to A \times B, which is coev:A(BA×B)\text{coev} : A \to (B \to A \times B), defined by coev(a)(b)=(a,b)\text{coev}(a)(b) = (a, b). Note that the latter may be familiar as the state monad S(A×S)S \to (A \times S) present in Haskell!

*that’s locally small (I.e. modulo size issues).

view this post on Zulip David Egolf (Jul 04 2025 at 16:03):

Alright, I'm excited to be back and focusing on this for a bit! This feels like a good chance to become more comfortable with adjunctions.

I think I want to start with the "common exercise" mentioned above:

John Baez said:

So a common exercise people do right around now is that one: define what it means for two right adjoints of a functor to be isomorphic, and check they're all (uniquely) isomorphic.

view this post on Zulip David Egolf (Jul 04 2025 at 17:00):

I think the usual thing to do is this: check that any two right adjoints of a functor are naturally isomorphic to one another.

view this post on Zulip David Egolf (Jul 04 2025 at 17:01):

However, I am now wondering if people ever relax the notion of adjoint functors a bit, in a way that would potentially come with a corresponding relaxed notion of isomorphism between right adjoint functors.

view this post on Zulip David Egolf (Jul 04 2025 at 17:06):

Given functors F:XAF:X \to A and G:AXG:A \to X, we have that FGF \dashv G iff there is a functor isomorphism I:(F,A)(X,G)I:(F,A) \to (X,G) that commutes with base functors (which map down to X×AX \times A).

Inspired by this, one might try to define a generalized notion of adjunction:

view this post on Zulip David Egolf (Jul 04 2025 at 17:07):

Here, the unlabelled functors are the base functors.

view this post on Zulip David Egolf (Jul 04 2025 at 17:09):

This more relaxed notion would allow us to consider potential multiple right adjoints G,GG,G' to some functor FF that aren't parallel to one another. Then we might want to say that two such right adjoints G:AXG:A \to X and G:AXG:A' \to X' are isomorphic if the below square commutes up to some natural isomorphism α\alpha:
square 2

view this post on Zulip David Egolf (Jul 04 2025 at 17:13):

Anyways, the productive thing to do here is probably to focus on the standard exercise with the usual notion of adjunction. The above is mostly just for fun!

That being said, it does feel a little bit weird to insist that a right adjoint GG for a functor F:XAF:X \to A must go from AA to XX. It feels like there could potentially be many functors that are "basically" right adjoints, but just happen to map from AA' to XX' where AAA' \cong A and XXX' \cong X but AAA'\neq A or XXX'\neq X.

view this post on Zulip David Egolf (Jul 04 2025 at 17:16):

Next time, I'm planning to focus on the standard exercise!

view this post on Zulip John Baez (Jul 04 2025 at 17:36):

David Egolf said:

I think the usual thing to do is this: check that any two right adjoints of a functor L are naturally isomorphic to one another.

It's not just any old natural isomorphism of functors: it's an isomorphism of right adjoints: i.e. a natural isomorphism that preserves the structure of being right adjoint to L. Even better, the isomorphism is unique. That's important, because it means there's no 'floppiness' here.

view this post on Zulip John Baez (Jul 04 2025 at 17:43):

However, it's fine to start by showing what you wanted to show. The proof will inevitably lead you to these stronger statements.

view this post on Zulip Ruby Khondaker (she/her) (Jul 30 2025 at 10:10):

Reading through this thread really helped me appreciate the merits of profunctors