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.
I hope everyone had an amazing holidays and a great start to 2025! I wanted to return with a "warmup" question that would get me back into discussion about sheaves and related matters, which is what I what to start off with. This question is inspired by the previous discussion (namely, that related to the topological topos) in which some of the elements were touched on but not explicitly brought up, but now I want to fully clear the air about this!
The Yoneda lemma gives us a clear view on what the objects of a category of presheaves are: they are those that are "testable" or "probeable" by the objects of the original category. This means presheaves can be seen as "generalized objects" of the original category that can be described by being probed by maps into them from "test objects", and thus by the maps into it from the representables in the full presheaf category. On the other hand, the "co-Yoneda lemma" gives us a completely and entirely different perspective on what the objects are: they are objects that are "locally modeled" on "test objects" of the original category; that is, they are the objects of the original category "glued together". So we have two different perspectives: the Yoneda perspective based on maps out of representables, and the co-Yoneda perspective based on taking colimits of representables.
These two perspectives seem completely irreconcilable on face value: what does maps out of an object have anything to do with taking colimits of those objects? But the recent discussion on the topological topos made me realize some things. One can think of the objects in the topological topos as sequences "glued together", and every morphism out of the representable can be thought of as "picking out" a sequence in the object. This made me wonder if there's any connection between the canonical projection morphisms out of the representables produced by taking the colimit, and the Yoneda perspective on what the maps out of a representable are supposed to be doing. So that's my question: is there any connection between these, and more generally, how am I supposed to reconcile the Yoneda and co-Yoneda lemma on both a mathematical and conceptual/philosophical level? Thanks for your help!
John Onstead said:
I hope everyone had an amazing holidays and a great start to 2025! I wanted to return with a "warmup" question that would get me back into discussion about sheaves and related matters, which is what I what to start off with. This question is inspired by the previous discussion (namely, that related to the topological topos) in which some of the elements were touched on but not explicitly brought up, but now I want to fully clear the air about this!
The Yoneda lemma gives us a clear view on what the objects of a category of presheaves are: they are those that are "testable" or "probeable" by the objects of the original category. This means presheaves can be seen as "generalized objects" of the original category that can be described by being probed by maps into them from "test objects", and thus by the maps into it from the representables in the full presheaf category. On the other hand, the "co-Yoneda lemma" gives us a completely and entirely different perspective on what the objects are: they are objects that are "locally modeled" on "test objects" of the original category; that is, they are the objects of the original category "glued together". So we have two different perspectives: the Yoneda perspective based on maps out of representables, and the co-Yoneda perspective based on taking colimits of representables.
These two perspectives seem completely irreconcilable on face value: what does maps out of an object have anything to do with taking colimits of those objects? But the recent discussion on the topological topos made me realize some things. One can think of the objects in the topological topos as sequences "glued together", and every morphism out of the representable can be thought of as "picking out" a sequence in the object. This made me wonder if there's any connection between the canonical projection morphisms out of the representables produced by taking the colimit, and the Yoneda perspective on what the maps out of a representable are supposed to be doing. So that's my question: is there any connection between these, and more generally, how am I supposed to reconcile the Yoneda and co-Yoneda lemma on both a mathematical and conceptual/philosophical level? Thanks for your help!
I actually do find these two perspective to be extremely consistent with each other.
first, the statement of the co-yoneda lemma as usually mentioned is very unsatisfactory to me, as it says that every presheaf is a colimit of representables, but not what the colimit is. Here's my pov: for a presheaf , you get its -shaped points for an object of the base category. If you have a morphism of shapes , then you can transform points in points by reparametrization. This is all stuff you already know, but I always like to insist on the notion of shaped points.
The yoneda lemma says that the universal -point exists as an object, and is just . The co-yoneda lemma then simply says that if you have an object, it is just the gluing of all its points seen as their own standalone spaces, whatever their shapes. You take the colimit over the category of elements of ; in that category morphisms represent equality of points up to reparametrization.
Ok, I think I'm following. So it seems it's about points: a presheaf can be determined by gluing all of its points together (not sure what that follows from, maybe some basic property), and since a universal "point" for some object is given by the representable (Yoneda), it means that a presheaf can be determined by a colimit over representables (co-Yoneda). Since we are gluing one representable for each point of the presheaf, it means that the sum total of all canonical projection morphisms from the diagram of the colimit will be the same as the sum total of all the points of the presheaf. Yoneda then tells us that these are in correspondence with all natural transformations from representables to the presheaf. So that would confirm that the projection morphisms from co-Yoneda do align with morphisms out of representables from Yoneda. Anyways I hope I am understanding!
Oh this is very interesting, I didn't know we could interpret Yoneda this way.
Let me unfold the idea to see if I understand correctly.
Generally speaking, a morphism is thought as a -shaped point of (a general element).
A presheaf on some category can be understood as a generalized space.
An element is thought as a map . Hence, is the set of -shaped points of .
With this interpretation, the presheaf is a generalized space.
The Yoneda lemma states that the maps (i.e. natural transformations from to ) naturally correspond to elements of .
In other words, the generalized space classifies the -shaped points. I.e., is the universal -shaped point.
The category of elements of can be seen as a sort of "over category of ".
The elements of are the -shaped points of , with varying among the objects of .
In the picture, , , is an arrow in , and commutativity of the diagram means that .
image.png
This makes look like a cocone over .
The co-Yoneda lemma can be interpreted as saying that this "cocone" is actually a colimit.
I think this can be made a bit more rigorous by considering the diagram of presheaves
image.png
In other words, , seen as a generalized space, is the gluing of all its -shaped points.
Am I making a mistake somewhere?
If we take to be the "walking graph category"
image.png
then a presheaf on is a graph.
The Yoneda lemma says that the vertices (resp. edges) of naturally correspond to the graph morphisms (resp. ). On the other hand, the co-Yoneda lemma says that any graph is made by gluing vertices and edges together.
This is so nice!
Yes, I admit I was also keeping the topos of directed graphs as a running example in the back of my mind when trying to think through this. It's a very simple yet powerful example of these principles!
I've only worked through part of this thread, but just wanted to say - this thread is really helping me intuitively understand the Yoneda lemma in way I hadn't managed before!
For example, I think I've learned that we have in . Intuitively this says that an arbitrary presheaf on a locally small category is determined up to isomorphism by how it relates to the objects in the image of the Yoneda embedding .
This is especially helpful, because we can think of as being in many ways like . That's reasonable to do because the objects in the image of the Yoneda embedding relate to one another in the same way their corresponding objects in relate in . (We have in for all objects ).
(And I haven't even worked through the discussion on the co-Yoneda lemma yet! I'm excited to read through all this!)
I also love the idea that we can gradually learn what some is like by studying natural transformations to it from objects in the image of the Yoneda embedding. That suggests there might be a way to gradually build up an understanding of in a way parametrized by the objects of . (This especially catches my attention for possible application to imaging!)
@David Egolf I got this "aha" moment this morning, so much that I want to apply this point of view to every situation :smile:
So let's try with imaging. Let's say we are analyzing a radiography.
As a radiologist, I am looking for the presence of specific shapes.
Let be the category of those shapes I am interested in. For instance, there is a shape "human skeleton", "hand skeleton", "long bone", "small bone", "joints", and so on. These shapes are related by morphisms: a skeleton contains bones, a long bone has two ends, etc.
When doing a radiography analysis, I record for every shape the set of instances of in the image.
And I have functions between those sets, e.g., that specifies which long bones belong to which hand skeleton.
Hence, the presheaf is really a structured summary of the actual image.
Now, I also have, say, the presheaf (yoneda embedding of the shape "hand skeleton").
We can think of it as the structured summary of an image of a hand skeleton.
A natural transformation is a way to map this image of hand skeleton to my first image. The Yoneda lemma states that there are as many such natural transformations as there are hand skeleta in my first image.
Finally, the co-Yoneda lemma states that the structured summary of my image is made of instances of those bones and joints glued together.
Oh, this category should be called the "walking human skeleton".
Note Yoneda lemma holds in much greater generality than presheaves, while CoYoneda is a bit more characteristic. Indeed, consider your category presented as a monad in span . Equivalently, this induces a monad on , sending a bunch of -indexed data to the free presheaf obtained by freely adding all the functorial action coming from the morphisms of . Notice that , is exactly the representable presheaf at , so the representable are the free presheaves on the very particular generators given by elements of . These are particular because they generate , meaning that, obviously, one can distinguish -indexed sets by looking at their value at each element. So already at this level. Then algebras of any monad on inherit the same property, since . So Yoneda is not so much about categories as it is about general algebra over a base.
Similarly, co-Yoneda already holds for , since where is [[copower]] and denotes again the generator . Given any monad on , we know that any algebra is a reflexive coequalizer of free algebras, i.e. but, crucially, the free presheaf monad commutes with coproducts because is [[extensive]], hence the fact makes the above a presentation of as a colimit of representables!
In fact I believe the only monads with this property are free presheaf monads, ie the ones arising by pull-push along the graph of a category, thus characterizing categories!
Indeed, a coproduct-preserving monad on is determined by its value on the generators, thus we can write . Now we want to construct a category out of this. We thus let , basically imposing that . Source and target are given by the two projections out of the sums. Identities are given by the unit , thus picking an element of . Multiplication: is given by maps for every , thus giving composition of morphisms. Associativity and unitality follow by construction, and thus we can conclude that . Neat!
Matteo Capucci (he/him) said:
quivalently, this induces a monad Y on Set/C0, sending a bunch of C0-indexed data to the free presheaf obtained by freely adding all the functorial action coming from the morphisms of C
I'd rather talk about than , then we can see the relation with the usual induced adjunction on presheaves: if you have a functor on base categories, is the "forgetful" functor forgetting the -action through , and its left adjoint simply creates the free -action from a -action with respect to .
Well you can get that adjunction in the other form too! I'd say a better reason to work with is that it readily generalizes to the enriched case, so that the part of my message concerning Yoneda still stands when replacing with an arbitrary base . I wonder what can be said about the second part? CoYoneda still holds in the enriched case, provided enough colimits are around...