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've been asked to recommend an intuitive/non-technical explanation of the Yoneda lemma, preferably in video form, and targeted towards non-mathematicians. Does anybody have any favourites to share?
i think its not so simple to explain without _some_ prerequisites. This is a classic post that made it "click" for a lot of programmers: http://blog.sigfpe.com/2006/11/yoneda-lemma.html
here's a video of a talk at a FP conference trying to get across the basic idea, but it requires a fair amount of background as well: https://www.youtube.com/watch?v=Z3vr5xylMCE
This math3ma video dances around yoneda nicely: https://www.youtube.com/watch?v=wiadG3ywJIs
I don't think Yoneda really clicks without examples. There are two stages at work here:
@Brendan Fong I would agree with @Simon Burton that Tai's video gives a very intuitive explanation (look at around 8:30 if you're short on time). She explains that Yoneda describes how an object in a category is determined by its relations to all other objects in that category. Maybe a cool example is to consider the special case of groups (https://en.wikipedia.org/wiki/Yoneda_lemma#Relationship_to_Cayley's_theorem), which you can explain with pictures of permutations of geometric figures in the plane.
This, by the way, reminds me of a wonderful quote I once read on mathoverflow:
"Groups, as men, will be known by their actions".
-Guillermo Moreno. (Reference: https://mathoverflow.net/questions/7155/famous-mathematical-quotes)
oh man i STILL need to go back and finish writing up my explainer :weary:
@Brendan Fong See this answer.
i think there are a lot more intuitive explanations out there for the full faithfulness of the yoneda embedding than there are for itself
Thanks Gershom, Simon, Fab, Arthur, Sayantan! Those are all great resources! I think my friend is after something that lies somewhere in between them though -- a short (maybe ten minute) video explanation that doesn't assume a mathematical or programming background, and doesn't necessarily try to get across the proof, but does reward a dedicated learner with an ability to explain the theorem statement and have a sense of the philosophical importance. I'll search a bit more and let you know if I come up with something.
The best "slogan" for explaining yoneda I came up with, by the way (which is I think an intuitive explanation, but does not get at the significance at all, and may even hide it), when I was presenting it at some reading group or another, was "Yoneda is essentially the statement that curry and uncurry are inverses in the category of categories".
huh, wha
how do you work that
ooh is it like... is the currying of the hom functor? has something to do with it?
...im not sure id fully thought about that before 🤯
@Fabrizio Genovese what is a commutative square of homsets?
A square where some of the vertexes are Homsets. What I mean is this: Imagine you have the following situation: , meaning: you can plug whatever you want on the arrow, and in place of the dashes. This is the case for instance if you have a natural transformation , since for every couple of objects and every morphisms you get a square:
Hom(A,Y) -> FY
.|....................|
.|Hom(A,f).....|Ff
.|....................|
.V...................V
Hom(A,X) -> FX
Now the idea is that if I plug the identity in the homset on top, I can lift whatever element of the homset in the bottom to be an edge. Namely, for every , if I consider , then the identity hits exactly , since . This is what makes Yoneda work, since once you decide where the identity goes, you fully determine a natural transformation: To know where a given element in a given homset is mapped, you just lift it to an edge. From here you can say that "there are as many natural transformations from to a functor as there are ways to map the identity on to . Since the identity can be mapped to any element of , this means that , which is (covariant) yoneda xD
I see Yoneda from a logical perspective. To me, it's the statement that -enriched categories can always be thought as "categories of sets" in some way.
Here's what I mean.
Hom-sets can be considered as generalized elements of "at stage . Hence Yoneda tells me that I know everything about an object if I know everything about its generalized elements. A naive way to think about this is to imagine objects of as being sets which can contain elements of different types. If you reason this way, everything checks out, since you're reasoning in the internal logic of .
In fact one should call generalized elements "terms of type in context ". Then Yoneda says two types of this type theory are equal iff they have the same terms.
I guess it's not entirely straightforward nor elementary, but it works for me.
If I were to explain Yoneda lemma to a layman, I'll just say it's the mathematical formalization of "tell me your friends I'll tell you who you are"
the compressed version of the explanation that i keep meaning to finish writing down is like
in other words: im trying to make a case for writing as in the first place as an intuitive abuse of notation, at which point it looks way more intuitive to say
:heart: turning abuses of notation into things that are formally correct :heart:
sarahzrf said:
in other words: im trying to make a case for writing as in the first place as an intuitive abuse of notation, at which point it looks way more intuitive to say
I think that Reyes*2 and Zolfaghari's book do something like that...
https://marieetgonzalo.files.wordpress.com/2004/06/generic-figures.pdf
I'll try to decypher its notation again and check if what I said proceeds.
Matteo Capucci said:
I see Yoneda from a logical perspective. To me, it's the statement that -enriched categories can always be thought as "categories of sets" in some way.
Yes: Yoneda is a generalization of Cayley's theorem, which says that every group can be seen as a group of (some of the) permutations of a set.
There's a funny mutant version of the Yoneda embedding where you take each object of your category and send it to the set of all arrows into that object. This gives a functor , at least if is small. People may enjoy playing around with this.
John Baez said:
Matteo Capucci said:
I see Yoneda from a logical perspective. To me, it's the statement that -enriched categories can always be thought as "categories of sets" in some way.
Yes: Yoneda is a generalization of Cayley's theorem, which says that every group can be seen as a group of (some of the) permutations of a set.
There's a funny mutant version of the Yoneda embedding where you take each object of your category and send it to the set of all arrows into that object. This gives a functor , at least if is small. People may enjoy playing around with this.
I think you only need the category to be locally small for the "mutant" Yoneda embedding to work?
that isn't enough—say C is Set
that's locally small, but the collection of all functions into a given set is a class
You only need the category to be locally small for the usual, non-mutant Yoneda embedding to work.
Matteo Capucci said:
I see Yoneda from a logical perspective. To me, it's the statement that -enriched categories can always be thought as "categories of sets" in some way.
Here's what I mean.
Hom-sets can be considered as generalized elements of "at stage . Hence Yoneda tells me that I know everything about an object if I know everything about its generalized elements. A naive way to think about this is to imagine objects of as being sets which can contain elements of different types. If you reason this way, everything checks out, since you're reasoning in the internal logic of .
In fact one should call generalized elements "terms of type in context ". Then Yoneda says two types of this type theory are equal iff they have the same terms.
This morning it occurred to me this is actually quite a useful perspective, since it allows to perform diagram chasing by chasing elements: you just chase generalized elements.
Yes. For example, theorems about internal structures in a category expressed in finite limit logic reduce to the case .
John Baez said:
There's a funny mutant version of the Yoneda embedding where you take each object of your category and send it to the set of all arrows into that object. This gives a functor , at least if is small. People may enjoy playing around with this.
You can use it to show that every poset embeds into a powerset and every graph is an intersection graph.
The statement that "an object is determined by its relation to all other objects in the category" is an explanation of the full faithfulness of the Yoneda embedding. It is not an explanation of the Yoneda lemma, which is a stronger result.
Sorry, I just realize that @sarahzrf said exactly this (but more politely).
"If you want to impress someone, say 'By the Yoneda Lemma'. If you want them to understand you, say 'Apply it to the identity'. " - Neil Ghani
Paul Blain Levy said:
"If you want to impress someone, say 'By the Yoneda Lemma'. If you want them to understand you, say 'Apply it to the identity'. " - Neil Ghani
For me the explanation of the Yoneda lemma is literally " I can take a point that lives in the corner of a square and make it become an edge of such square". This is the whole intuition that makes the proof click.
Fabrizio Genovese said:
Paul Blain Levy said:
"If you want to impress someone, say 'By the Yoneda Lemma'. If you want them to understand you, say 'Apply it to the identity'. " - Neil Ghani
For me the explanation of the Yoneda lemma is literally " I can take a point that lives in the corner of a square and make it become an edge of such square". This is the whole intuition that makes the proof click.
Can you elaborate a little more? I like where this is going.
Yoneda lemma says . To prove this, you start by considering a natural transformation from to . On any given component , this is just a function . Let's consider where this function sends an . To understand this, we consider the component of the natural transformation, a function . We can draw a commutative square where these two functions are the rows. and we can plug any morphism (acted upon by and , respectively) in the columns.
The key observation is that our is in the bottom left of this square we just draw, but we can "lift it to an edge" by plugging it in the columns. And the magical thing is that at this point the identity in the top left corner gets sent exactly to it!
So, in this sense, the whole point of proving Yoneda is that, in considering that square, by looking at the identity you actually get a way to lift the morphisms into the bottom-left corner of the square to edges.