Feeds:
Posts

## The Yoneda lemma I

For two categories $C, D$ let $D^C$ denote the functor category, whose objects are functors $C \to D$ and whose morphisms are natural transformations. For $C$ a locally small category, the Yoneda embedding is the functor $C \to \text{Set}^{C^{op}}$ sending an object $x \in C$ to the contravariant functor $\text{Hom}(-, x)$ and sending a morphism $x \to y$ to the natural transformation $\text{Hom}(-, x) \to \text{Hom}(-, y)$ given by composition. The goal of the next few posts is to discuss some standard properties of this embedding and try to gain some intuition about it.

Below, whenever we talk about the Yoneda lemma we implicitly restrict our attention to locally small categories.

The Yoneda embedding

Let $x \in C$ be an object and $F \in \text{Set}^{C^{op}}$ be a (set-valued) presheaf. A natural transformation from the representable presheaf $\text{Hom}(-, x)$ to $F$ is a collection of morphisms $\eta_y : \text{Hom}(y, x) \to F(y)$ such that the square

commutes for all $y, z$ (where $\text{Hom}(f, x)$ is abuse of notation for the action of the functor $\text{Hom}(-, x)$ on morphisms $f : z \to y$). In particular, we have a morphism $\eta_x : \text{Hom}(x, x) \to F(x)$, and taking the image of $\text{id}_x$ associates to every natural transformation $\text{Hom}(-, x) \to F$ an element $\eta_x(\text{id}_x) \in F(x)$.

Yoneda lemma: The above map is an isomorphism (of sets).

Corollary: The Yoneda embedding $C \to \text{Set}^{C^{op}}$ is fully faithful; that is, every natural transformation $\text{Hom}(-, x) \to \text{Hom}(-, y)$ is induced by composition with an element of $\text{Hom}(x, y)$, and different morphisms give different natural transformations.

Proof. Set $y = x$ in the above commutative diagram to the diagram

where $f$ is now a morphism $z \to x$. By identifying the images of $\text{id}_x \in \text{Hom}(x, x)$ in $F(z)$ obtained from tracing the two paths in this diagram we conclude that

$\displaystyle \eta_z(f) = F(f)(\eta_x(\text{id}_x))$.

In other words, $\eta_z$ for every $z$ (so the entire natural transformation) is completely determined by $\eta_x(\text{id}_x)$. This shows that the map we defined above from natural transformations to elements of $F(x)$ is injective. On the other hand, it’s not hard to check that for any choice of $\eta_x(\text{id}_x) \in F(x)$ the above defines a natural transformation $\eta$.

Morals of the Yoneda lemma

The Yoneda lemma shows that an object $x$ in a category is determined up to isomorphism by the presheaf $\text{Hom}(-, x)$ it represents. In other words, roughly speaking an object is determined by how other objects map into it. I once heard the following colorful analogy for this situation on MO: if one thinks of objects of a category as particles and morphisms as ways to smash one particle into another particle, then the Yoneda lemma says that it is possible to determine the identity of a particle by smashing other particles into it.

Another way to say this is the following. For an object $y$, we call an element of $\text{Hom}(y, x)$ a generalized point or $y$-point of $x$. If $y = 1$ is the terminal object, a $y$-point is also sometimes called a global point.

Example. In $\text{Set}$ or more generally $\text{Top}$, a global point is a point in the usual sense.

Example. In $G\text{-Set}$, the category of $G$-sets ($G$ a group), a global point is a fixed point.

Example. Let $k$ be a field. In the category of affine varieties over $k$, a global point is a point over $k$ (since $\text{Spec } k$ is the terminal object). More general points often have geometric interpretations; for example, a $\text{Spec } k[t]$-point is a one-parameter family of $k$-points, and a $\text{Spec } k[t]/t^2$ is a $k$-point together with a Zariski tangent vector.

The Yoneda lemma tells us, roughly speaking, that an object is determined by its generalized points. Yet another way to say this is that we can completely understand the morphisms $x \to y$ between objects in an arbitrary category $C$ in terms of maps between the “sets” of generalized points

$\coprod_{z \in C} \text{Hom}(z, x) \to \coprod_{z \in C} \text{Hom}(z, y)$.

These disjoint unions don’t actually exist if the collection of objects of $C$ doesn’t form a set (for example if $C = \text{Grp}$). If $C$ actually has a set of objects (in addition to sets of morphisms), we say that $C$ is small. In any small category we can form the above disjoint unions, and so we conclude that that every small category is concretizable (admits a faithful functor to $\text{Set}$).

Yoneda for monoids

Let $M$ be a monoid and $BM$ be the corresponding one-object category with single object $x$. Then a presheaf $BM^{op} \to \text{Set}$ is precisely a right $M$-set, and a natural transformation between presheaves is a morphism of right $M$-sets. Furthermore, the unique representable presheaf $\text{Hom}(-, x)$ corresponds to $M$ regarded as a right $M$-set by right multiplication.

The Yoneda lemma in this case says that morphisms $M \to S$ of right $M$-sets are canonically in bijection with elements of $S$ (take the image of $\text{id}_x \in M$ as above); in particular, the endomorphisms of $M$ form a monoid canonically isomorphic to $M$ (acting by left multiplication). This gives us a slight generalization of Cayley’s theorem: every monoid acts by endomorphisms on some set.

Yoneda for posets

Let $P$ be a poset regarded as a category where $a \le b$ means there is a single morphism $a \to b$ and otherwise there are no morphisms. Set-theoretic presheaves on $P$ are the wrong thing to consider; since we can think of posets as categories enriched over the category (which is also a poset) $2 = \{ 0 \le 1 \}$, we should actually be considering presheaves $F : P^{op} \to 2$. By identifying such a presheaf with the elements mapping to $1$, we can identify presheaves on $P$ with downward closed sets in $P$, since functoriality just means that if $x \le y$ then $F(y) \le F(x)$. In particular, the representable presheaves are the downward closed sets of the form $D_y = \{ x : x \le y \}$.

A functor between two posets is just an order-preserving map. The functor category $Q^P$ is itself a poset, with a single natural transformation $F \to G$ existing if $F(x) \le G(x)$ for all $x \in P$ and no natural transformations existing otherwise. When $Q = 2$ and we identify the functors $F \in 2^P$ with downward closed sets, the corresponding partial order structure is containment.

The Yoneda lemma in this case says that a downward closed set contains $D_y$ if and only if it contains $y$. Applied to two representable presheaves, it says that

$y \le z \Leftrightarrow \forall x : (x \le y \Rightarrow x \le z)$.

The Yoneda embedding $P \to 2^{P^{op}}$ embeds a poset into its poset of downward-closed subsets, giving us a “Cayley’s theorem for posets”: every poset can be realized as subsets of some set under containment. It also gives a kind of “Dedekind completion” of $P$: for example, when $P = \mathbb{Q}$ under the usual order, the poset of downward-closed subsets is the extended real line $[-\infty, \infty]$.

Yoneda for the category of affine schemes

For the purposes of this section, the category $\text{Aff}$ of affine schemes will be by definition the opposite $\text{CRing}^{op}$ of the category of commutative rings. If $S$ is a commutative ring, we write $\text{Spec } S$ for that ring regarded as an object in $\text{Aff}$. The Yoneda lemma tells us that $\text{Spec } S$ is completely determined by the presheaf $\text{Hom}(-, \text{Spec } S)$. A certain family of examples will be particularly instructive; if we take $S = \mathbb{Z}[x_1, ... x_n]/(f_1, ... f_m)$ where $f_1, ... f_m$ is a finite collection of integer polynomials in $n$ variables, then the affine scheme $\text{Spec } S$ is completely determined by the presheaf $\text{Spec } R \to \text{Hom}(\text{Spec } R, \text{Spec } S)$ or, in the opposite category, by

$\displaystyle \text{Hom}(\mathbb{Z}[x_1, ... x_n]/(f_1, ... f_m), R)$.

But by the universal property of polynomial rings, this is nothing more than the set of $x \in R^n$ such that $f_1(x) = ... = f_m(x) = 0$; in other words, precisely the set of solutions of the polynomial system $f_1 = ... = f_m = 0$ over $R$!

In other words, for affine schemes generalized points are like solutions to systems of polynomial equations. This point of view on algebraic geometry was pioneered by Grothendieck and is called the functor of points perspective. A particularly elegant feature of this perspective is how it uses the Yoneda lemma: the Yoneda lemma tells us that a morphism of affine schemes $\text{Spec } S_1 \to \text{Spec } S_2$ is precisely a consistent collection of ways $\eta_R : \text{Hom}(\text{Spec } R, \text{Spec } S_1) \to \text{Hom}(\text{Spec } R, \text{Spec } S_2)$ to turn solutions of the “system of equations” described by $S_1$ into solutions of the “system of equations” described by $S_2$.

General non-affine schemes are informally built by “gluing” affine schemes, and one way to make that precise is to think of affine schemes as representable presheaves on $\text{Aff}$ and then taking suitable colimits of these presheaves in the presheaf category $\text{Set}^{\text{CRing}}$.

### 7 Responses

1. “elements of an arbitrary category”, instead of “objects”?

• Whoops! Yes, I meant “objects”.

• Yeah, minor nit, I guess. Also, when you say Hom(-,x) is a representable presheaf, that just means it’s isomorphic to a hom-functor, a trivial fact in this case since it *is* a hom-functor?

• Yep.

2. I guess one could say Hom(-,x) is a *represented* functor [with ‘tautological’ representation, namely the one corresponding to the universal element (x, id_x)].

3. […] If you haven’t seen it before, try proving Yoneda’s lemma. (It’s not too difficult if you’re familiar with basic category theory arguments… there is really only 1 choice for the map.) As a follow-up I recommend looking at Qiaochu Yuan’s article which gives additional examples: http://qchu.wordpress.com/2012/04/02/the-yoneda-lemma-i/ […]

4. […] Annoying precision […]