Universal Properties III - Yoneda's Lemma

Euripides

Every man is like the company he is wont to keep.

One of the most consistent philosophies throughout all of category theory is "It's all about the arrows." This is built into the very core of the theory, in that you don't even really need objects to define a category: they are in one-to-one correspondence with the identity arrows!

At a metaphorical level, an arrow f:c→c′ in a category C can be thought of some information that each of c and c′ "see" about the other. So for a fixed object c, the collection of all arrows from c is the total information about the category C available to the object c; or dually, the set of all arrows to a fixed object c′ is all information available in the category C about the object c′. From this point of view, what more information could there be about a given object? Nothing. The category is all there is, and in the category the only data are the arrows.

But how does one formalize this idea?

The original inspiration: universal properties

First revisit our pantheon of objects with universal properties. Looking over these examples, a clear pattern emerges. In each case was have an object c in a category C that is characterized by a "universal property," which can be expressed in the form of a bijection

Ο„d:HomC(c,d)β†’βˆΌF(d)

that is "natural in d", where F:Cβ†’Set is some functor.[1] This naturality, often stated but not articulated, is the formal embodiment of the idea that the bijection Ο„d is defined "in the same way" for every d∈C, or at least "in a compatible way." What that means precisely is that for every arrow f:d1β†’d2 in C we have a commutative diagram

This is exactly the diagram for a natural transformation Ο„:HomC(c,βˆ’)β‡’F. The fact that all of the component functions Ο„d are set bijections implies that Ο„ is actually a natural isomorphism.

Examples

For illustration, we recall some specific examples of universal properties.

Coequalizers of set maps

Suppose X and Y are sets. Their disjoint union XβŠ”Y is the set characterized by the universal property that set maps f:XβŠ”Yβ†’Z are in natural bijection with pairs of set maps g:Xβ†’Z, h:Yβ†’Z. To put this into the above context, let F:Setβ†’Set be the functor that assigns:

Ο„Z:HomSet(XβŠ”Y,Z)β†’βˆΌF(Z)

In other words, there is a natural isomorphism Ο„:HomSet(XβŠ”Y,βˆ’)β‡’βˆΌF.

Quotients by normal subgroups

Let N be a normal subgroup of a group G. The quotient group G/N, together with its projection morphism Ο€:Gβ†’G/N defined by g↦g+N, satisfies a universal property. Let F:Grpβ†’Set be the functor that assigns to each group H the set of group morphisms f:Gβ†’H such that N≀ker⁑(f). Then there is a natural bijection

Ο„H:HomGrp(G/N,H)β†’βˆΌF(H).

Under this bijection, each group morphism g:G/Nβ†’H is sent to the group morphism gβˆ˜Ο€:Gβ†’H.

In other words, there is a natural isomorphism Ο„:HomGrp(G/N,βˆ’)β‡’βˆΌF.

Direct sums of abelian groups

If A and B are abelian groups, their direct sum is the abelian group AβŠ•B. As a set, it consists of all pairs of formal sums a+b with a∈A and b∈B. The operation is defined "component-wise": (a+b)+(aβ€²+bβ€²)=(a+aβ€²)+(b+bβ€²). (Although not common, one could reasonably argue that a different notation should be used for the formal sum symbol, such as aβŠ•b.) One can verify that AβŠ•B is an abelian group, and that it comes equipped with two injective group morphisms i1:Aβ†’AβŠ•B and i2:Bβ†’AβŠ•B. Moreover, there is a natural bijection between group morphisms from AβŠ•B and pairs of groups morphisms Aβ†’C, Bβ†’C:

Ο„C:HomAb(AβŠ•B,C)β†’βˆΌF(C),

where F(C)={(g1,g2)∣g1∈HomAb(A,C),g2∈HomAb(B,C)}. Under this bijection, each group morphism f:AβŠ•Bβ†’C is sent to the pair of group morphisms f∘i1:Aβ†’C, f∘i2:Bβ†’C.

In other words, there is a natural isomorphism Ο„:HomAb(AβŠ•B,βˆ’)β‡’βˆΌF.

Free R-modules

Let R be a ring and U:R-Modβ†’Set be the usual forgetful functor. The free module construction takes each set A and produces an R-module F(A). The function which sends each a∈A to the same element a∈F(A) regarded as a formal R-linear sum of elements of A is an arrow j:Aβ†’U(F(A)). For any other R-module M, each function f:Aβ†’U(M) can be extended uniquely to a module morphism h:F(A)β†’M with f=U(h)∘j.

In the current context, let G:R-Mod→Set be the functor that assigns to each R-module M the collection of set maps f:A→U(M); i.e., G(M)=HomSet(A,U(M)). Then there is a natural bijection

Ο„N:HomR(F(A),M)β†’βˆΌG(M).

In other words, there is a natural isomorphism Ο„:HomR(F(A),βˆ’)β‡’βˆΌG.

The tensor product construction

Suppose R is a commutative ring and M and N are left R-modules. By taking the standard R-module structure (i.e., (R,R)-bimodule structure) on M and the canonical (R,Z)-bimodule structure on N, we can form the tensor product MβŠ—RN. The result is an (R,Z)-bimodule, i.e., a left R-module. There is a natural bijection between R-module morphisms MβŠ—SNβ†’P and certain set maps:

Ο„P:HomR-Mod(MβŠ—RN,P)β†’βˆΌF(P),

where F(P) is the collection of bilinear, R-balanced (R,Z)-set maps g:M×N→P.

In other words, there is a natural isomorphism Ο„:Hom(R,T)(MβŠ—SN,βˆ’)β‡’βˆΌF.

From objects to (hom) functors

We first notice that in every universal property, we are always characterizing morphisms from an object (or dually, to an object) in terms of a "natural" bijection with some other info. To make this functorial, consider the following:

Definition of hom functor

For each object c in a given category C, we can define a functor Hc:C→Set as follows:

  • For each object d∈C, we let Hc(d)=HomC(c,d).
  • For each arrow f:dβ†’dβ€², we let Hc(f):Hc(d)β†’Hc(dβ€²) be the set map that takes each morphism g:cβ†’d to the morphism f∘g:cβ†’dβ€².

It is also common to write HomC(c,βˆ’) for Hc, but when doing so we will then also write fβˆ˜βˆ’ for Hc(f), rather than the awkward looking HomC(c,f). In either case, I usually verbally refer to this functor as the hom-out functor.

We should verify that Hc is indeed a functor.

First note that for each identity arrow 1d in C we have Hc(1d):Hc(d)β†’Hc(d) is the set map that send each arrow g:cβ†’d to the arrow 1d∘g:cβ†’d; since C is a category, we certainly have 1d∘g=g and so Hc(1d) is the identity map on Hc(d).

Next, for a pair of composable arrows f1:d1β†’d2 and f2:d2β†’d3, we have

Hc(f2∘f1)=(f2∘f1)βˆ˜βˆ’=f2∘(f1βˆ˜βˆ’)=Hc(f2)∘Hc(f1).

More formally, for each object g∈Hc(d1) (i.e., arrow g:cβ†’d1), we have

Hc(f2∘f1)(g)=(f2∘f1)∘g,

while

(Hc(f2)∘Hc(f1))(g)=f2∘(f1∘g).

By the associativity of composition in C these two are equal.

From the category C to a functor category

For each object c∈C we have defined a functor Hc:Cβ†’Set, which is an object of the functor category SetC. Have we actually defined a functor H:Cβ†’SetC? To answer that, we need to specify what H should do to arrows.

To that end, suppose f:cβ†’cβ€² is an arrow in C. Each arrow from Hc to Hcβ€² in SetC is a natural transformation Ο„:Hcβ‡’Hcβ€². This is the data of a family of arrows Ο„d:Hc(d)β†’Hcβ€²(d), one for each object d∈D, satisfying the usual naturality condition. So let's consider the sets Hc(d)=HomC(c,d) and Hcβ€²(d)=HomC(cβ€²,d).

Given an element g∈Hc(d) (i.e., an arrow g:cβ†’d), it's not exactly clear how we can use the arrow f:cβ†’cβ€² to produce an arrow cβ€²β†’d, i.e., an element of Hcβ€²(d)).

However, there is an obvious way to take an element gβ€²βˆˆHcβ€²(d) (i.e., an arrow gβ€²:cβ€²β†’d) and use the arrow f:cβ†’cβ€² to produce an arrow cβ†’d, namely by pre-composing with f:cβ†’cβ€².

This defines a set map Ο„d:Hcβ€²(d)β†’Hc(d), which (we hope) defines a natural transformation Ο„:Hcβ€²β‡’Hc. However, this natural transformation is going "the wrong way." In the classical parlance, we would be describing a so-called contravariant functor from C to SetC. This language has generally (but not entirely) fallen out of favor and been replaced by the use of the opposite category construction.[2] In other words, we can use our construction above to define a (covariant) functor[3]

H:Cop→SetC.

Note that the category Cop has the same objects as the category C, and each arrow in Cop from an object c to an object cβ€² corresponds to an arrow f:cβ€²β†’c in C. Because of this, and in an effort to avoid confusion, we often denote arrows in Cop by