2 The Yoneda Lemma

Definition 2.1 (Locally small). We say a category C is locally small if, for any two objects A and B, the morphisms AB in C are parameterised by a set C(A,B).

If A is an object of a locally small category C, we have a functor C(A,):CSet sending B to C(A,B) and a morphism BgC to the mapping (fgf):C(A,B)C(A,C) (this is functorial since composition in C is associative).

Dually, we have C(,B):CopSet.

Lemma 2.2 (Yoneda). Assuming that:

Then

Proof.

Corollary 2.3. Assuming that:

Then AC(A,) is a full and faithful functor Cop[C,Set].

Proof. Substitute C(B,) for F in Lemma 2.2(i): we have a bijection from C(B,A) to the collection of natural transformations C(A,)C(B,).

For a given f, the natural transformation C(f,) sends g:BC to gf, so this is functorial by associativity of composition C.

Similarly, we have a full and faithful functor C[Cop,Set] sending A to C(,A). We call this the Yoneda embedding: it allows us to regard any locally small category C as a full subcategory of a Set-valued functor category.

Compare with Cayley’s Theorem in group theory (every group is isomorphic to a subgroup of a permutation group) and ‘Dedekind’s Theorem’ (every poset is isomorphic to a sub-poset of a power set).

Definition 2.4 (Representable). We say a functor F:CSet is representable if it’s isomorphic to a C(A,) for some A. By a representation of F, we mean a pair (A,x) where xFA is such that Φ(x) is an isomorphism. We call x a universal element of F.

Corollary 2.5. Suppose (A,x) and (B,y) are both representations of F. Then there is a unique isomorphism AfB such that (Ff)(x)=y.

Proof. (Ff)(x)=g is equivalent to saying that

    𝒞(B,∙)              𝒞(A, ∙)


𝒞ΦΦ(((f,yx∙)))         F
commutes, so f must be the unique isomorphism, whose image under Yoneda is Φ(x)1Φ(y).

Proof of Yoneda(ii).

Suppose for the moment that C is small, so that [C,Set] is locally small. Given two functors C×[C,Set]Set: the first sends an object (A,F) to FA, and a morphism (AfA,FαF) to the diagonal of
  F A       F A′


FααFfAA′fF′ ′A       F ′A ′
The second is the composite

C×[C,Set]Y×1[C,Set]op×[C,Set][C,Set](,)Set

where Y is a Yoneda embedding. Then Φ and Ψ define a natural isomorphism between these two.

In elementary terms, this says that if xFA, and xFA is its image under the diagonal, then Ψ(x) is the composite

C(A,)C(f,)C(A,)Ψ(x)FαF.

This makes sense without the assumption that C is small, and it’s true since the composite maps

1Af(Ff)(x)αA(Ff)(x).

Example 2.6.

In Set, products are just cartesian products (also in Gp, Rng, Top, …). coproducts in Set are disjoint unions AB=(A×{0})(B×{1}). In Gp, coproducts are free products GH.

In Set, the equaliser of AgfB is the inclusion of {aA|f(a)=g(a)} and the coequaliser of (f,g) is the quotient of B by the smallest equivalence relation containing {(f(a),g(a))|a+A}.

Note that in Set, all monomorphisms and all epimorphisms are regular, but in Top, a monomorphism XfY is regular if and only if X is topologised as a subspace of Y. An epimorphism XfY is regular if and only if Y is topologised as a quotient of X.

Note that if f is both regular monic and regular epic, then it’s an isomorphism since the pair (g,h) of which its equaliser must satisfy g=h.

Warning. The following terminology is not standard. These are usually (both!) referred to as “generating”, but to avoid confusion, in this course we will refer to them with separate names.

Definition 2.7 (Separating / generating family). Let G be a family of objects of a locally small category C.

  • (a)
    We say G is a separating family if the functors C(G,), GG are jointly faithful, i.e. given a parallel pair AgfB, the equations fh=gh for all h:GA with GG imply f=g.
  • (b)
    We say G is a detecting family if the G(G,) jointly reflect isomorphisms, i.e. given AfB, if every GgB with GG factors uniquely through f, then f is an isomorphism.

If G={G}, we call G a separator or a detector.

Lemma 2.8.

Proof.

Example 2.9.

By definition, the functors C(A,):CSet preserve monomorphisms, but they don’t always preserve epimorphisms.

Definition 2.10 (Projective). We say an object P in a locally small category Cis projective if C(P,) preserves epimorphisms, i.e. if given

         P


fg Q      R
there exists h:PQ with gh=f. Dually, P is injective if it’s projective in Cop.

If P satisfies this condition for all g in some class E of epimorphisms, we call it E-projective.

In [C,Set], we consider the class of pointwise epimorphisms, i.e. those α such that αA is surjective for all A.

Corollary 2.11. functors of the form C(A,) are pointwise projective in [C,Set].

Proof. Immediate from Yoneda; given

           𝒞 (A, ∙)


αβ Q        R
with β pointwise epic, Φ(α)RA is βA(y) for some yQA, so βΨ(y)=α.

[C,Set] has enough pointwise projectives”:

Proposition 2.12. Assuming that:

Then there exists a pointwise epimorphism PF where P is pointwise projective.

Proof. Set P=(A,x)C(A,) where the disjoint union is over all pairs (A,x) with AobC and xFA. A morphism PQ is uniquely determined by a family of morphisms C(A,)Q. . Hence P is pointwise projective, since all the C(A,) are. But we have α:PF whose (A,x)-th component is Ψ(x):C(A,)F and this is pointwise epic since any xFA appears as Ψ(x)(1A).