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: functors and cofunctors


view this post on Zulip Paolo Perrone (Jun 15 2021 at 19:54):

A discrete opfibration is at the same time a functor and a cofunctor, in a compatible way. (And moreover, the liftings satisfy a universal property.)
More generally, how do we call things which are both functors and cofunctors? Have they been studied?

view this post on Zulip Bryce Clarke (Jun 15 2021 at 22:38):

Paolo Perrone said:

A discrete opfibration is at the same time a functor and a cofunctor, in a compatible way. (And moreover, the liftings satisfy a universal property.)
More generally, how do we call things which are both functors and cofunctors? Have they been studied?

The things A -> B which are both functors A ->B and cofunctors A -> B in a compatible way are called delta lenses (which isn't a great name).
I have a bunch of papers on delta lenses from this point of view, the most helpful are probably Internal lenses as functors and cofunctors and Internal split opfibrations and cofunctors.

view this post on Zulip Bryce Clarke (Jun 15 2021 at 22:40):

I'd be very happy to discuss any further questions you had. Was there a particular motivation or examples behind your question?

view this post on Zulip Paolo Perrone (Jun 16 2021 at 13:20):

Thank you! That seems exactly what I needed.
The motivation (as usual for my work) is probability, I think there's an analogy between cofunctors and conditioning, and I want to see if it's something deeper than just an analogy.
Let me study your papers, and I'll get back to you :)

view this post on Zulip Bryce Clarke (Jun 16 2021 at 19:58):

Paolo Perrone said:

Thank you! That seems exactly what I needed.
The motivation (as usual for my work) is probability, I think there's an analogy between cofunctors and conditioning, and I want to see if it's something deeper than just an analogy.
Let me study your papers, and I'll get back to you :)

That sounds very interesting! Look forward to hearing more about it.

view this post on Zulip Paolo Perrone (Jun 16 2021 at 20:45):

Thank you! Here's a first question, just out of my ignorance about lenses.
If I understand correctly, a delta lens is a generalization of an ordinary lens, where the product projection is replaced by any other map, right?
And also, internal lenses are the internalization of delta lenses, not of ordinary lenses. Is that correct?

view this post on Zulip Bryce Clarke (Jun 18 2021 at 10:16):

Paolo Perrone said:

Thank you! Here's a first question, just out of my ignorance about lenses.
If I understand correctly, a delta lens is a generalization of an ordinary lens, where the product projection is replaced by any other map, right?
And also, internal lenses are the internalization of delta lenses, not of ordinary lenses. Is that correct?

An "ordinary lens" means lots of different things to different people, but to me it means a pair of functions f : A -> B and p : A x B -> A satisfying the three lens laws. In this case, a delta lens is a generalisation of an ordinary lens, the sense that a delta lens between codiscrete categories is precisely a ordinary lens.

view this post on Zulip Bryce Clarke (Jun 18 2021 at 10:18):

You are correct that internal lenses are an internalisation of delta lenses.

view this post on Zulip Tim Hosgood (Jun 19 2021 at 00:03):

slighly off topic, but since Bryce is already here and talking about internal lenses...

I don't really know anything about lenses, but have read about how they arise in this internal setting, and one aspect (the fact that Mealy morphisms are internal functors if and only if their 11-cell admits a right adjoint) reminded me of the way that profunctors "are" functors (via Yoneda) if and only if they admit a right adjoint.

Another aspect (the way that internal cofunctors can be written as spans with the left leg an identity-on-objects functor and the right leg a discrete opfibration) reminded me of the story of Gabriel–Zisman localisation combined with a nice fact about projective moudles, where morphisms are given by spans with the left leg a weak equivalence and the right leg a fibration.

(Then the idea of a lens being the data of a third functor that makes the span commute looks a bit like the idea of a morphism in the localisation being somehow "pre-localised" if there exists a third morphism making the span commute).

From what I've been told after talking to some people about this vague observation, it seems like the first similarity can be explained by equipments, but I'm not so sure about the second. I know this is really just a stream-of-conciousness post, but maybe somebody has something interesting to say about my hand-wavy foggy weak analogies. So is this something that you've thought about at all?

view this post on Zulip Bryce Clarke (Jun 19 2021 at 04:59):

Tim Hosgood said:

I don't really know anything about lenses, but have read about how they arise in this internal setting, and one aspect (the fact that Mealy morphisms are internal functors if and only if their 11-cell admits a right adjoint) reminded me of the way that profunctors "are" functors (via Yoneda) if and only if they admit a right adjoint.

Another aspect (the way that internal cofunctors can be written as spans with the left leg an identity-on-objects functor and the right leg a discrete opfibration) reminded me of the story of Gabriel–Zisman localisation combined with a nice fact about projective moudles, where morphisms are given by spans with the left leg a weak equivalence and the right leg a fibration.

(Then the idea of a lens being the data of a third functor that makes the span commute looks a bit like the idea of a morphism in the localisation being somehow "pre-localised" if there exists a third morphism making the span commute).

From what I've been told after talking to some people about this vague observation, it seems like the first similarity can be explained by equipments, but I'm not so sure about the second. I know this is really just a stream-of-conciousness post, but maybe somebody has something interesting to say about my hand-wavy foggy weak analogies. So is this something that you've thought about at all?

Hi Tim, these are some great observations. Some thoughts I had:

view this post on Zulip Bryce Clarke (Jun 19 2021 at 05:04):

I agree this first observation can be explained by equipments (there is a double category of categories, functors, and Mealy morphisms). As an aside, I first learnt about Mealy morphisms and their connection to profunctors in the Garner & Shulman paper Enriched categories as a free cocompletion See the introduction as well as 16.8 and 16.27 in that paper.

view this post on Zulip Bryce Clarke (Jun 19 2021 at 05:09):

view this post on Zulip Bryce Clarke (Jun 19 2021 at 05:11):

@Tim Hosgood I'll track down the slides with the talk I gave on this and send you an email so we could discuss this further. I'd love to better understand this analogy.

view this post on Zulip Tim Hosgood (Jun 19 2021 at 13:34):

oh that sounds even closer then! look forward to reading the slides :)

view this post on Zulip Paolo Perrone (Oct 14 2021 at 08:53):

In case anyone is still interested, the "lenses and conditioning" idea that I was pointing out earlier in this thread is now worked out in this preprint. https://arxiv.org/abs/2110.06591