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 thought it might be worth asking here - what are people's preferred intuitions for the yoneda lemma? I've seen some expositions on stackexchange, nlab and blogs (like The Yoneda Perspective ), but none of them have felt completely "satisfying" to me...
Think of a presheaf as a family of sets with (contravariant) transport functions indexed by some category . Then is exactly such a family generated by one element at , i.e. a free presheaf. Now what do we expect from morphisms out of something freely generated? To be equivalent to elements at the corresponding set! That's the yoneda lemma
Ah yes this feels familiar - essentially you’re viewing the yoneda embedding as coming from a left kan extension of [Disc(Ob(C)), Set] along the inclusion Disc(Ob(C)) -> C^op?
This POV makes it easy to see that the Yoneda lemma first readily extends to a free/forgetful adjunction
left adjoint of
How should I interpret the “x S” part of the adjunction?
which you can generalize in the following multi-sorted way: given
it has the following left adjoint
you can really see here how the left adjoint freely adds in all the possible ways you could've transported elements of P, but quotiented by how they were originally transported
Ah, this seems like the formula for a pointwise left kan extension!
yes! instantiating with gives you Yoneda :)
Mhm mhm - I’ve seen this before, and it definitely is neat that yoneda can be expressed through kan extensions! I guess I’m also interested in a more “elementary” intuition, too :)
Here, I'm trying to explain the intuition behind all these fancy constructions, which is simply that representables are simply freely generated presheaves
this is imo the Yoneda POV, and helps explain many theorems like the co-Yoneda lemma too
co-yoneda is the presheaf version of the easy lemma that every algebraic structure is presented
One more way to think about this is that the Yoneda lemma is the directed J rule
Another way in which you can make precise that a representable presheaf is generated by a single element is a follows: The category of right fibrations (with discrete fibres) is equivalent to the category of presheaves on . Moreover, the inclusion admits a left adjoint which takes any object to (which corresponds to the presheaf represented by ). Let be a right fibration corresponding to a presheaf , then you have .
At a very raw intuitive level I think of the presheaf category on a category as analogous to the free vector space on a set, with colimits taking the place of linear combinations, and the Yoneda embedding as analogous to the map sending elements of the set to the corresponding basis vectors. This can be elaborated, e.g. profunctors are like matrices, etc. I think of this whole body of math as the "rediscovery of linear algebra, one level up". It's very worth pondering why linear algebra was useful in the first place, and why this reincarnation is useful.
John Baez said:
At a very raw intuitive level I think of the presheaf category on a category as analogous to the free vector space on a set, with colimits taking the place of linear combinations, and the Yoneda embedding as analogous to the map sending elements of the set to the corresponding basis vectors. This can be elaborated, e.g. profunctors are like matrices, etc. I think of this whole body of math as the "rediscovery of linear algebra, one level up". It's very worth pondering why linear algebra was useful in the first place, and why this reincarnation is useful.
Ooh this sounds intriguing - is there a reference you can point to that goes into this perspective in more detail?
I think this is stuff "everyone knows" yet most are reluctant to mention. This is why I need to write a textbook... sigh.
The key fact to bear in mind is that the category of presheaves on a category is the free cocompletion of just as the vector space with basis is the free vector space on . Once you know that, a lot of stuff involving presheaves, profunctors, the Yoneda embedding, etc. reveal themselves as analogues of things you already know.
Linear algebra has remained one of my favourite areas of math, even after all this time, so it’s awesome to hear that it even becomes useful in describing category theory :D
John Baez said:
Once you know that, a lot of stuff involving presheaves, profunctors, the Yoneda embedding, etc. reveal themselves as analogues of things you already know.
What is the analogue of the Yoneda lemma in this case?
Emily Riehl made a nice video about the Yoneda lemma in the category of matrices. (Sorry, I just remember that it was very nice, but I don't remember the actual content ^^')
Josselin Poiret said:
John Baez said:
Once you know that, a lot of stuff involving presheaves, profunctors, the Yoneda embedding, etc. reveal themselves as analogues of things you already know.
What is the analogue of the Yoneda lemma in this case?
I always get confused when people talk about the Yoneda lemma as if it were a single result since I think of it as several related results (maybe because I never took a course on category theory). But the full and faithful yet not essentially surjective map from a category to its category of presheaves is mimicked by the one-to-one but not onto map from a set to the free vector space on that set.
(By the way, 'free commutative monoid' is a better analogue than 'free vector space', but most of us start by studying -modules, not the more fundamental -modules.)
What is generally understood to be the Yoneda lemma is the isomorphism
the fact that the yoneda map is in fact an embedding is just a corollary of that result imo
The analogue of the Yoneda isomorphism
is the equation
Here
Inner products are like homsets, especially in quantum physics! Adjoint operators between inner product spaces are like adjoint functors.
(I don't usually write the ith basis vector as ; I usually write it as , but that could be mistaken for the ith component of some vector called , which would be very bad right now.)
Another point of view, that I learned in this forum here, is as follows. Take for instance the category with two objects and two arrows .
A presheaf is defined by
I find useful to think of as the kinds of "shapes", and as a kind of gluing of instances of those shapes.
One can check that
Given two presheaves (i.e. graphs) , a natural transformation can be seen as morphism of graph (it maps vertices to vertices, edges to edges, while respecting the source and target maps).
Now, a natural transformation is a morphism from the graph with a single vertex to the graph . Hence, there are as many such natural transformations as there are vertices in the graph:
And similarly for edges.
I think the number of footholds folks use to get an understanding speaks to how deep Yoneda is.
The nLab page [[Yoneda Lemma]] lists three corollaries with three corresponding intuitions. As a beginner, I notice the examples folks give of "what the Yoneda lemma is" are heavily skewed in favor of "corollary 1" (that the Yoneda embedding is an embedding). Imo this is hard for a beginner to appreciate because, as a beginner, I don't fully understand the presheaf category, because I don't fully understand free cocompletions, because I don't fully understand colimits. (I'm overselling my confusion a touch)
Despite its superficial complexity, I'm partial to "corollary 3" as the first one to learn, because it gives more context for universal properties.
Here's a simple example that really impressed me:
"a generalized element of a pair, is a pair of generalized elements", corresponds to the potential natural isomorphism
The Yoneda lemma tells you what your category needs to have to implement this isomorphism, by spelling out the way in which is a universal object of a certain category. The projection functions of the pair end up being a "universal element", or what I think of as a universal interface.
That is you can specify the arrows going into some object with a set valued functor, and the Yoneda lemma can then tell you what resulting object gets defined (if possible). Or in other words, you can specify what the generalized elements of an object is, and the Yoneda lemma then tells you what you need to define the object.
Alex Kreitzberg said:
I think the number of footholds folks use to get an understanding speaks to how deep Yoneda is.
The nLab page [[Yoneda Lemma]] lists three corollaries with three corresponding intuitions. As a beginner, I notice the examples folks give of "what the Yoneda lemma is" are heavily skewed in favor of "corollary 1" (that the Yoneda embedding is an embedding). Imo this is hard for a beginner to appreciate because, as a beginner, I don't fully understand the presheaf category, because I don't fully understand free cocompletions, because I don't fully understand colimits. (I'm overselling my confusion a touch)
Despite its superficial complexity, I'm partial to "corollary 3" as the first one to learn, because it gives more context for universal properties.
Here's a simple example that really impressed me:
"a generalized element of a pair, is a pair of generalized elements", corresponds to the potential natural isomorphism
The Yoneda lemma tells you what your category needs to have to implement this isomorphism, by spelling out the way in which is a universal object of a certain category. The projection functions of the pair end up being a "universal element", or what I think of as a universal interface.
That is you can specify the arrows going into some object with a set valued functor, and the Yoneda lemma can then tell you what resulting object gets defined (if possible). Or in other words, you can specify what the generalized elements of an object is, and the Yoneda lemma then tells you what you need to define the object.
I'm inclined to agree - I feel like "corollary 1" does get over-emphasised in a way that's unhelpful, and I often prefer to approach yoneda through the language of representability. How do you feel about the way Schreiber puts it in "Philosophical" meaning of the Yoneda Lemma, in terms of "generalised objects" of C?
If you're willing to accept a handful of weird videos on your youtube algorithm, Schreiber actually expands on that point of view in this video (I don't endorse the channel broadly):
https://youtu.be/1KUhLHlgG2Q?si=HbgTYhjtcY9TEQ48
With which he made these associated notes:
https://ncatlab.org/schreiber/show/Per%C3%AC+Panthe%C5%8Dr%C3%ADas
I think it's a very nice point of view that I'm assuming I'll understand better and better as I get more comfortable with presheaves, sheaves and the yoneda embedding (It's corollary 1 from the yoneda page again :" corollary I says that the interpretation of presheaves on C as generalized objects probeable by objects c of C is consistent: the probes of X by c are indeed the maps of generalized objects from c into X" ).
I have some intuition for it, but I'm not comfortable enough with it to give my own explicit description, I was going to revisit it after I was much more comfortable with presheaves.
Alex Kreitzberg said:
If you're willing to accept a handful of weird videos on your youtube algorithm, Schreiber actually expands on that point of view in this video (I don't endorse the channel broadly):
https://youtu.be/1KUhLHlgG2Q?si=HbgTYhjtcY9TEQ48
With which he made these associated notes:
https://ncatlab.org/schreiber/show/Per%C3%AC+Panthe%C5%8Dr%C3%ADas
I think it's a very nice point of view that I'm assuming I'll understand better and better as I get more comfortable with presheaves, sheaves and the yoneda embedding (It's corollary 1 from the yoneda page again :" corollary I says that the interpretation of presheaves on C as generalized objects probeable by objects c of C is consistent: the probes of X by c are indeed the maps of generalized objects from c into X" ).
I have some intuition for it, but I'm not comfortable enough with it to give my own explicit description, I was going to revisit it after I was much more comfortable with presheaves.
Ah I think I've seen bits and pieces of that - was surprised to see, uh, the large amount of philosophizing going on... I'll take another look!
I guess you did remind me of how I reworded it.
We're trying to interpret as generalized elements from . That is, for , we want to write without getting into trouble.
We don't get into trouble because
Where we can pretend the natural transformations are morally , because is embedded in the presheaf category.
That is we're generalizing arrows like into the natural transformations but then we just write them as vanilla arrows going into to emphasize it's just a bigger category.
But, I'm not at all sure this take is bug free, I'm open to feedback from pros on it.
I'm not a pro, but considering the category , you obtain a relatively low-brow version of this. A presheaf on is just a graph (see e.g. my previous comment)
Using your notation, a generalized element (resp. ) is a vertex (resp. edge) of .
The embedding of (resp. ) into the presheaf category , i.e. the category of graphs, is the graph with a single vertex (resp. the graph with a single edge and the two corresponding vertices).
The set (resp. ) of vertices (resp. edges) of the graph is in bijection with the set of graph morphisms from (resp. ) to . This is an instance of the Yoneda lemma.
One thing I would be interested in is whether this perspective also makes the proof of yoneda transparent, as opposed to just the statement?
Apologies if I haven't seen this idea expanded elsewhere, but:
A category is a space, the category of presheaves on it is the space of regular functions defined on that space, or predicates that can be asserted about the space; the representable at is a point, that is to say the functions that predicates "my input can reach the object with an arrow" and contains all the proofs of this statement; yoneda lemma is the statement that
From which it follows
In this light, yoneda lemma is a fact of differential geometry: a functor is just a bundle over , and in order to know how the fibers of that bundle are glued together...
In more formal terms, every presheaf has a category of elements attached, and every [[discrete fibration]] is the category of elements of some presheaf (to the effect that the categories of presheaves and discrete fibrations are equivalent); so natural transformations correspond to functors such that the diagram
with the projections to the category commutes. Now a functor like this must be...
The perspective of being freely generated by a single element (or vertex as @Peva Blanchard puts it) at makes the proof extremely transparent, it's one advantage of that idea.
One way to say the above is that for all , , i.e. all elements are just given by the action of a map on the generating element .
That means necessarily that for any natural transformation , since this diagram commutes, you can chase around to determine the image of any element in terms of that of .