Hacker News new | ask | show | jobs
by xelxebar 1965 days ago
Not addressing your question, but the Yoneda Lemma is kind of a charlatan.

On first reading, it seems magical and deep, but once you grok the proof, it feels like a relatively trivial observation. The whole thing is just about arrow composition!

In a way, once you're on the other side, the Yoneda Lemma feels a bit like a checkpoint during the accimatization period where your brain gets used to thinking in categories and commutative diagrams.

Not quite sure it's exactly the style you're talking about, but Bartosz Milewski has a nice series of video lectures going all the way from nothing up to Coend stuff. IIRC the series gets to the Yoneda Lemma somewhere in the second series:

https://invidious.snopyta.org/channel/UC8BtBl8PNgd3vWKtm2yJ7...

3 comments

> The whole thing is just about arrow composition!

There's much much more to it.

For example, a version of the yoneda lemma also holds for metric spaces (instead of a set of arrows between to things, you simply have a number indicating a distance between two things).

Here's how I like to think about the yoneda lemma:

If you have some kind of objects you want to talk about, one way to do this is by relating these objects to each other. Once you have established such a "method of discourse" (i.e. a way to talk about how your objects relate to each other) the yoneda lemma tells you:

1. You can forget about the inner structure of your objects; Everything is already contained in your "method of discourse".

2. Inversely: The choice of a "method of discourse" severely limits what you can say about your objects.

3. There is no spoon: To understand how you can escape these limitations you need a "method of discourse" for "methods of discourse".

I like your example and perspective. I would just add on that it is not facile to do this for metric spaces, but leads directly to constructive solid geometry [0], where we render images of complex solid objects by exchanging the object for a signed distance function [1], a function which indicates how far the object is from any point in the space.

[0] https://en.wikipedia.org/wiki/Constructive_solid_geometry

[1] https://en.wikipedia.org/wiki/Signed_distance_function

> a number indicating a distance between two things

That *is* a arrow. Arrow composition is adding up the distance along a path.

The correct term would be "composition in an enriched category". The morphism objects in this context are usually not called arrows.

I think the other poster meant "elements in the set of morphisms" when they said "arrows".

The difference is the following: Metric spaces "are" categories enriched over the real numbers, ordinary categories are categories enriched over the category of sets. So in one case the morphism objects are sets while in the other case they are real numbers. "Arrows" then refers to something internal to the morphism object. The distance (a real number) between two points in a metric space does not have any internal structure.

That almost describes discourse about politics and social issues, too.
"On first reading, it seems magical and deep, but once you grok the proof, it feels like a relatively trivial observation. The whole thing is just about ____ composition!"

I think if you replace _____ with the right word almost every result I've seen in my (albeit somewhat limited) exposure to category theory can be described this way.

(not that that detracts from your answer!)

Well yeah, because category theory studies composition. That's what it's for. That's why a category is defined the way it is: a bunch of objects, identity arrows from each to itself, and arrows between them, which enjoy an associative composition operator.
Yoneda just says that we may exchange an object for all of the arrows which point to (dually, from) it. This is extremely deep; it is rather surprising that objects and arrows would have such a duality or exchange!
+1. The lemma is trivial not because the result isn't deep but because we have the right definitions.
This 'triviality' issue has reminded me of Grothendieck's "two styles in mathematics":

http://www.landsburg.com/grothendieck/mclarty1.pdf

Not exactly unexpected conceptually though, given that objects have no intrinsic structure. What may be surprising is that this fact has useful consequences in applications to concrete mathematical objects that do have structure.