6. Categories of Diagrams
6.1The Yoneda Lemma
Throughout this section all categories are considered to be locally small.
定义 6.1.1. The covariant Yoneda functor is the functorwhere is the category of contravariant functors from to (also called presheaves), defined on objects of by (the contravariant functor)and on arrows in by (the natural transformation)
注 6.1.2. Let us give the explicit definition of the covariant Yoneda functor, which will be useful for the proof and the consequences of the Yoneda lemma.
Let be an object of and let be an arrow in .
• | The contravariant functor is defined on objects of by and on arrows by where for every we have: |
• | The component of the natural transformation at an object of is defined by where for every we have: |
引理 6.1.3 (Yoneda). Let be a locally small category. Then for every object of and for every object of , there is an isomorphism in :which is natural in both and .
证明. For the sake of simplicity, we omit to write the index of .
Step 1: Define two natural transformations.
Let be an object of and let be an object of .
We define a natural transformation as follows. For every (natural transformation), takewhere . Note that .
Also, we define a natural tranformation as follows. For every , let be given bywhere for every . Note that . Then we take .
We show that is a natural transformation. Let be an arrow in . Consider the diagram
For every , we have:hence the above diagram is commutative. Therefore, is a natural transformation, and thus .
Step 2: Show that their components are isomorphisms.
We show that . Let and . We have:We need to prove that . Since is a natural transformation, the following diagram is commutative:
hence . By using also Remark 6.1.2, it follows that:This shows that . It follows that .
We show that . Let . We have:This shows that . Hence and are inverse to each other.
Step 3: Show naturality in .
Let be an arrow in and let be an object of . We show that the following diagram is commutative:
hence . By using also Remark 6.1.2, for every , we have:This shows that the above diagram is commutative, and thus we have naturality in .
Step 4: Show naturality in .
Let be an arrow in and let be an object of . We show that the following diagram is commutative:
定义 6.1.4. A functor is called an embedding if is fully faithful and injective on objects in the sense that if are objects of such that , then .
推论 6.1.5. The covariant Yoneda functor is an embedding.
证明. We show that is fully faithful. Let and be objects of . By using the Yoneda lemma with and Remark 6.1.2 we have:We need to show that this isomorphism is induced by . For every , the isomorphism yields a natural transformation defined as follows. For every arrow in , we have:where andHence , which shows that the above isomorphism is induced by . Therefore, is fully faithful.
We show that is injective on objects. Let and be objects of such that . We have:which implies that . Hence is injective on objects.
注 6.1.6.
(1) | If is small, then is locally small, and thus is a set. |
(2) | If is locally small, then need not be locally small. In this case, the Yoneda lemma tells us that is always a set. |
(3) | If is not locally small, then will not even be defined, and thus the Yoneda lemma does not apply. |
(4) | Taking in the Yoneda lemma, we have: |
Dually, there is a contravariant Yoneda functor and the corresponding Yoneda lemma.
定义 6.1.7. The contravariant Yoneda functor is the functorwhere is the category of covariant functors from to , defined on objects of by (the covariant functor)and on arrows in by (the natural transformation)
引理 6.1.8 (Yoneda). Let be a locally small category. Then for every object of and for every object of , there is an isomorphism in :which is natural in both and . In particular, we have:
推论 6.1.9. The contravariant Yoneda functor is an embedding.
6.2Applications of the Yoneda Lemma
We have seen that every fully faithful functor is “essentially injective” on objects. Hence we have the following consequence.
推论 6.2.1 (Yoneda principle). Let be a locally small category, and let be objects of such that . Then .
例 6.2.2. Let be a locally small category with binary products, binary coproducts and exponentials, in the sense that any two objects and of have an exponential (e.g., ). Then it is known that there is an isomorphism (bijection)which is natural in , and . Let us show that:One option is to get the isomorphism by using universal mapping property of the product and the coproduct. Alternatively, one may use the Yoneda principle as follows. We first show that for every object of , we have the natural isomorphism:To this end, note that we have the natural isomorphisms:Now the Yoneda principle implies that .
例 6.2.3 (Yoneda meets Cayley). Recall that Cayley Theorem states that every group is isomorphic to a subgroup of a symmetric group. Let be a group and consider the symmetric groupFor every , defineOne proves that , that is, is bijective. We may now defineOne shows that is an injective group homomorphism. By the first isomorphism theorem, it follows that is isomorphic to the subgroup of .
Recall that every monoid has an associated category, which has only one object and has as arrows the elements of . In particular, we may consider the associated category of a group . Now consider the Yoneda embedding defined on objects of by (the contravariant functor)and on arrows in by (the natural transformation)
But the category has only one object, namely . Let be an arrow in , that is, .
• | The contravariant functor is defined on the object of by and on arrows by where for every we have: |
• | The component of the natural transformation at the object of is defined by where for every we have: Note that . |
By the Yoneda lemma and the Yoneda embedding, we have the following (natural) isomorphism :which is given by . The natural transformation has only one component, namely .
例 6.2.4 (Yoneda meets Linear Algebra). Let be a field. Consider the category , denoted simply by , defined as follows:
• | objects: the non-zero natural numbers |
• | arrows: the matrices in for |
• | composition: the multiplication of matrices |
• | identity arrow: the identity matrix |
For every , the set of all matrices with columns is organized by the data of the -column functor defined on objects by the setand on arrows in , that is, by the function given by the left multiplication by :In this way we get a contravariant functor .
Now let . A natural transformation consists of a familyof functions such that for every arrow the following diagram is commutative:
Let us classify all natural transformations or, in other words, all naturallydefined column operations that transform -column matrices to -column matrices.
Now let us see how this setting matches the one of the Yoneda lemma.
The covariant Yoneda functor is the functordefined on objects of by (the contravariant functor)and on arrows in , that is, by (the natural transformation)
Explicitly, we have the following.
• | Let be an object of . The contravariant functor is defined on objects of by and on arrows in by where for every we have: Hence we have the functor . |
• | Let be an arrow in . The component of the natural transformation at an object of is defined by where for every we have: Hence we have the natural transformation . |
By the Yoneda lemma we have:Also using the proof of the Yoneda lemma, we obtain the following:
• | Every naturally-defined column operation is determined by a single matrix . |
• | We have , that is, is obtained by applying the column operation to the identity matrix . |
• | The column operation is given by right multiplication by the matrix , that is, for every matrix . |
• | Every matrix determines a naturally-defined column operation defined by right multiplication. |
Other consequences are the following:
• | A naturally-defined column operation is invertible if and only if the matrix is invertible. Recall the elementary operations on matrices from linear algebra: interchange two columns, multiply a column by a non-zero scalar, multiply a column by a scalar and add it to another column. They are invertible, because the corresponding elementary matrices are invertible. |
• | The composite of two naturally-defined column operations and is defined by the right multiplication of the product of the corresponding matrices: In this way elementary column operations generate all invertible column operations. |
6.3Limits and Colimits in Categories of Diagrams
定义 6.3.1. A category is called complete if it has all small limits, that is, for any small category and functor , there is a limit for .
Dually, a category is called cocomplete if it has all small colimits, that is, for any small category and functor , there is a colimit for .
命题 6.3.2. For any locally small category , the functor category is complete. Moreover, for a small category and a functor , the limit of is computed pointwise in the sense that, for every object of , we have:
Dually, we have the following result.
命题 6.3.3. For any locally small category , the functor category is cocomplete. Moreover, for a small category and a functor , the colimit of is computed pointwise in the sense that, for every object of , we have:
注 6.3.4. In particular, for any locally small category , the functor category has products and coproducts, equalizers and coequalizers, terminal and initial objects, pullbacks and pushouts. Hence the functor category may have much richer properties than the original category . In order to prove a property in one may use the Yoneda embedding to go to the associated functor category, prove the property in the functor category, and finally use the Yoneda lemma to get the corresponding property in .