Simple show cases for the Yoneda lemma - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-21T18:06:55Z http://mathoverflow.net/feeds/question/11832 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/11832/simple-show-cases-for-the-yoneda-lemma Simple show cases for the Yoneda lemma Hans Stricker 2010-01-15T08:05:08Z 2010-01-15T22:35:32Z <p>I've been given a very simple motivating and instructive show case for the Yoneda lemma:</p> <p>Given the category of graphs and a graph object $G$, seen as a quadruple $(V_G,\ E_G,\ S_G:E\rightarrow V,\ T_G:E \rightarrow V)$. </p> <p>Consider $K_1$ and $K_2$, the one-vertex and the one-edge graph and the two morphisms $\sigma$ and $\tau$ from $K_1$ to $K_2$.</p> <p>Now consider the graph $H$ with</p> <ul> <li>$V_H = Hom(K_1,G)$</li> <li>$E_H = Hom(K_2,G)$</li> <li>$S_H(e) = e \circ \sigma: K_1 \rightarrow G$ for $e \in E_H$</li> <li>$T_H(e) = e \circ \tau: K_1 \rightarrow G$ for $e \in E_H$</li> </ul> <p>It can be easily seen that $H$ is isomorphic to $G$.</p> <p>I have learned that a) the category of graphs is a presheaf category and that b) $K_1$, $K_2$ are precisely the representable functors.</p> <p>Now I am looking for other simple motivating and instructive show cases.</p> <p>By the way: Shouldn't such an show case be added to the Wikipedia entry on Yoneda's lemma?</p> http://mathoverflow.net/questions/11832/simple-show-cases-for-the-yoneda-lemma/11836#11836 Answer by norondion for Simple show cases for the Yoneda lemma norondion 2010-01-15T08:15:07Z 2010-01-15T08:15:07Z <p>Determine all natural transformations (mod-$2$ cohomology operations) $H^n(-,\mathbb{Z}/2) \to H^m(-,\mathbb{Z}/2)$: We have $H^n(-,\mathbb{Z}/2) = [-, K(\mathbb{Z}/2,n)]$ by Brown representability. By Yoneda, we get $[K(\mathbb{Z},m), K(\mathbb{Z},n)] = H^n(K(\mathbb{Z}/2,m),\mathbb{Z}/2)$. So the mod-$2$ Steenrod algebra is the cohomology ring of the Eilenberg-MacLane spaces.</p> http://mathoverflow.net/questions/11832/simple-show-cases-for-the-yoneda-lemma/11840#11840 Answer by Hans Stricker for Simple show cases for the Yoneda lemma Hans Stricker 2010-01-15T08:45:33Z 2010-01-15T08:45:33Z <p>The most simple (= trivial) example is, that in the category of sets Hom(1,$A$) is isomorphic (= equipollent) to $A$ (with 1 the singleton).</p> <p>The second-most simple example will probably be in the category of 2-block-partions (sets + 1 unary relation).</p> <p>The third-most simple example is assumably the one given above (sets + 1 binary relation).</p> http://mathoverflow.net/questions/11832/simple-show-cases-for-the-yoneda-lemma/11864#11864 Answer by Saul Glasman for Simple show cases for the Yoneda lemma Saul Glasman 2010-01-15T13:51:29Z 2010-01-15T13:51:29Z <p>One of my favourite facts of this type is that in the category of simplicial sets, maps from the standard $n$-simplex to any simplicial set $S$ correspond to the $n$-simplices of $S$. Obviously this is not a surprising result, but I find it particularly nice that it comes out of Yoneda.</p> http://mathoverflow.net/questions/11832/simple-show-cases-for-the-yoneda-lemma/11873#11873 Answer by Qiaochu Yuan for Simple show cases for the Yoneda lemma Qiaochu Yuan 2010-01-15T15:45:10Z 2010-01-15T15:45:10Z <p>Well, here's a standard example of morphisms determining an object up to isomorphism: if $A$ is a finitely-generated integral $\mathbb{C}$-algebra, then the morphisms $A \to \mathbb{C}$ are precisely the maximal ideals $\text{MaxSpec } A$, which (by the Nullstellensatz) determine $A$ up to isomorphism. </p> http://mathoverflow.net/questions/11832/simple-show-cases-for-the-yoneda-lemma/11918#11918 Answer by Dan Piponi for Simple show cases for the Yoneda lemma Dan Piponi 2010-01-15T20:50:35Z 2010-01-15T22:35:32Z <p>If you program in a pure functional programming language like Haskell then the Yoneda lemma tells you that for any functor $F$, the types $F a$ and $\forall b . (a \rightarrow b) \rightarrow F b$ are isomorphic. (Restricting attention to computable total functions.) This really is a non-trivial statement and quite surprising when you first see it. Unfortunately it's tricky to explain without some CS backround.</p> <p>Nonetheless I'll risk failure and try to explain a specific example when $F$ is the 'list' functor, assuming a little computing knowledge:</p> <p>Fix a type $a$. Suppose you have a (polymorphic) Haskell function $f$ that for any type $b$ maps functions $g\colon a\rightarrow b$ into a list of elements of type $b$. Then $f$ is equal to a function that applies $g$ elementwise to some fixed list of elements of $a$. It's a powerful result. Just knowing the type of the function $f$ is enough to deduce significant detail about what it does. It can reduce the amount of work required to prove the correctness of programs.</p> <p>The crucial thing that makes this work is that Haskell uses "parametric polymorphism". If you write a function that is polymorphic it's impossible to use specific knowledge about the type, you have to write your function generically to work with all possible types.</p>