Hacker News new | ask | show | jobs
by kbr 1965 days ago
As a high schooler interested in things that are probably out of my league, I love reading this kind of stuff. The author mentions their unconventional style at the beginning: hyperlinks, color, italics, exclamations, parentheses, side notes, etc. They address your thoughts and craft their explanations around them instead of being terse and optimizing for length.

The author's blog [1] has more of this style and has really helped me get deeper into category theory. Without it, I wouldn't have even begun to try and understand things like the Yoneda lemma (which still remains a mystery to me).

Does anyone know any other papers or resources with this style? Maybe something like "explorable explanations" [2]?

[1] https://www.math3ma.com/

[2] https://explorabl.es/

7 comments

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...

> 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.
I don't have any resources to share on this, but I was also interested in this type of thing at your age (still am). If it interests you, never assume something is out of your league.

You have time on your side. Sustained effort compounded over time is unreasonably powerful. Keep pushing!

> Sustained effort compounded over time is unreasonably powerful.

Thank you, this hits close to home and is great advice, I appreciate it.

90s-ish videogame lore, “Time is an ally, not an enemy. Patience can sharpen even the smallest of efforts into a weapon that can strike the heart of an empire.”

On my cube walls, whenever I get back to my cube: “magic is just cleverly concealed patience.” The approximate η-expansion: you can generally figure out what professional magicians do, you just dismiss it, “I mean of course she coulda known what card I was going to pull if she bought 52 decks of cards and assembled an entire card made out of the Jack of Spades... but that’s expensive and difficult and who would do that.” Penn Jillette puts the same point a different way, saying that he is going to have to perform the same trick over and over again and so it cannot be 99% likely to not injure him, that is far, far too low, he has to be 100% certain his tricks are safe. If he is firing a nail gun at Teller’s neck it must surely be incapable of firing a nail at Teller, and if he waxes on about how much he has memorized the pattern of the nails in the gun then he must be cleverly concealing whatever patience went into making that nail gun and the illusion that it is loaded.

But the key is that once you see this one place you see it everywhere. A restaurant works by the same magic. You say what you want and it magically appears before you. How did that happen? Prep work for hours in advance of the meal, so that when the time comes I just need to put tab A in slot B. Like a beef wellington; pre-cooked steak wrapped into a nice little bundle that just needs to be finished in the oven for 20 minutes and sliced. Something to think about next date night—you can impress your date immensely if you make the wellingtons the night before, so that your focus is on your lover and not on your cutting board.

You don’t usually think about the prep work that went into the Mother of All Demos, but you should. Sometimes when Alan Kay shows a clip from there, he mentions something like, “you might notice that they get sub-second latency on all these operations, but the terminal was here and the computer was over there so I like to ask students how they got sub-second latency on all these operations, and only one time have I got the right answer, one student said ‘because they wanted sub-second latency?’ and that is absolutely correct, they-goddamn-wanted-subsecond-latency, these things are there for you if you really want them.”

https://betterexplained.com if you haven’t been through it yet.

Already often quoted on HN, and some discussions are interesting with the author bringing feedback. https://hn.algolia.com/?q=https%3A%2F%2Fbetterexplained.com

You may like the books Conceptual Mathematics: A First Introduction to Categories, Creative Mathematics, Advanced Calculus: A Differential Forms Approach, and Geomtrical Vectors.

https://www.amazon.com/dp/052171916X/

https://www.amazon.com/dp/0883857502/

https://www.amazon.com/dp/0817637079/

https://www.amazon.com/dp/0226890481/

Not exactly what you asked for, but this explanation of the Yoneda Lemma is amazing: https://youtu.be/h64yZs8ThtQ
If you’re interested in machine learning I can recommend Christopher Olah’s blog: https://colah.github.io/
Although they might be very out of your league depending on what your interests are, Anthony Zee has a similar writing style (in print)