Naturality and the Yoneda Lemma
Total Page:16
File Type:pdf, Size:1020Kb
NATURALITY AND THE YONEDA LEMMA J. WARNER 1. Naturality Let C and D be two categories, and let F; G : C!D be covariant functors. We would like to define the notion of a "map of functors" that is consistent with the usual requirements of a map between two algebraic structures. That is, a map between F and G should in some sense preserve the structure of a functor. What is included in this structure? First, the functors F and G assign to each object X 2 C objects in D, denoted F (X) and G(X) respectively. Thus, if we desire a map of functors η : F ! G to respect the structure of the functors' values on objects, η should include the data of a morphism ηX 2 HomD(F (X);G(X)) for all X 2 C. Second, the functors F and G assign to each pair of objects X; Y 2 D and each morphism f 2 HomC(X; Y ) morphisms in HomD(F (X);F (Y )) and HomD(G(X);G(Y )) denoted F (f) and G(f) respectively. So far, our idea of a map of functors leads us to consider two morphisms in HomD(F (X);G(Y )): G(f) ◦ ηX and ηY ◦ F (f). Now, if we desire our map η to respect the structure of the functors' values on morphisms, these two morphisms should be equal in HomD(F (X);G(Y )). We have thus arrived at the appropriate definition of a map of functors, which we now define formally. Definition 1.1. With the above notation, a natural transformation of functors η : F ! G assigns to each object X 2 C a morphism ηX : F (X) ! G(X) such that for all objects Y 2 C and all morphisms f : X ! Y , the following diagram commutes: η F (X) X / G(X) F (f) G(f) F (Y ) / G(Y ) ηY If ηX is an isomorphism for all X 2 D, we say that η is a natural isomorphism of functors. Let's consider a simple example to see why it makes sense to include the requirement that η makes the above diagram commute. Example 1.2. Let C be the category of two objects and three morphisms pictured below. f id / id X 6 X Y h Y Let D be the category of sets, and define functors F and G from C to D as follows: F (X) = fa; bg;F (Y ) = fa0; b0g;G(X) = fc; dg;G(Y ) = fc0; d0g Date: December, 2012. 1 where F (f)(·) = (·)0 and G(f)(·) = (·)0. Now suppose we begin to define a natural trans- formation η : F ! G by setting ηX (a) = c. In order that the structure of F and G on 0 0 morphisms be respected, we are forced to define ηY (a ) = c , ie, since a and c are connected by F (f) and since a0 and c0 are connected by G(f), it makes sense that η preserve this connection. We can finish our definition of η in one of two ways, by allowing ηX (b) to take 0 0 0 the value c or d, which forces ηY (b ) to take the value c or d respectively. In the second case, η is a bijection on all objects, and thus is a natural isomorphism. Here is a less trivial example. Example 1.3. What is the value in having such a definition of maps between functors? It allows us to easily extend and ammend commutative diagrams. 2. The Yoneda Lemma The Yoneda lemma is often stated more generally than we present here, but for our purposes the following special case suffices. Lemma 2.1 (Yoneda). Suppose E and F are two representable functors from k-algebras to sets, represented by k-algebras A and B respectively. Then natural transformations Φ: E ! F are in one-to-one correspondence with k-algebra homomorphisms φ : B ! A. Proof. We first work in the case that E = Homk(A; ) and F = Homk(B; ) (remember, representable functors are naturally isomorphic to Hom functors, not necessarily equal). First, suppose we are given a natural transformation Φ : E ! F . Then let φ := ΦA(idA) 2 F (A) = Homk(B; A). Now, suppose we are given a k-algebra homomorphism φ : B ! A. Define a natural transformation Φ : E ! F as follows. Let R be a k-algebra, and let ΦR(f) := f ◦ φ. Let S be another k-algebra, and g : R ! S a map of k-algebras. To check naturality, we must see that the following diagram commutes: ΦR Homk(A; R) / Homk(B; R) g∗ g∗ Homk(A; S) / Homk(B; S) ΦS Let f 2 Homk(A; R) and follow the diagram clockwise. This yields g ◦ f ◦ φ. Following the diagram counterclockwise yields the same map. To prove that the above processes are inverse to each other, let's apply the second process to the result of the first, ie, let's begin with Φ and define φ as in the first process. Now with 0 0 this φ, define Φ as in the second process and check to see if Φ = Φ . We would like to further the correspondence in the Yoneda lemma by showing that natural isomorphisms correspond to k-algebra isomorphisms. This is done by showing that under the Yoneda correspondence, composites of natural transformations correspond to composites of k-algebra maps. 2 Proposition 2.2. Let E, F , and G be representable functors from k-algebras to sets, rep- resented by k-algebras A, B, and C respectively. Let k-algebra maps φ : B ! A and psi : C ! B correspond to natural transformations Φ: E ! F and Ψ: F ! G respectively. Then φ ◦ : C ! A corresponds to Ψ ◦ Φ: E ! F . Proof. Let's again first assume that the representable functors are equal to their correspond- ing Hom functors. Let f 2 E(R) = Homk(A; R). By the definition given above, we have ΨR ◦ ΦR(f) = f ◦ φ ◦ , so that φ ◦ yields the composite natural transformation Ψ ◦ Φ as desired. Corollary 2.3. Under the Yoneda correspondence, natural isomorphisms correspond to k- algebra isomorphisms. Proof. Suppose Φ : E ! F is a natural isomorphism, so that Φ−1 : F ! E is a well- −1 −1 defined natural isomorphism, and Φ ◦ Φ = idF and Φ ◦ Φ = idE. Let g be the k-algebra map corresponding to Φ−1. The lemma and the fact that identity natural transformations correspond to identity k-algebra maps together give the result that φ◦g = idA and g◦φ = idB −1 so that g = φ . 3.