Friday, May 20, 2011

Learning Category Theory, functors

In many area of mathematics, especially those called "The Theory of X" for some X, we first give the motivation for X, then the construction (how an X is specified by giving the necessary objects and the axioms they obey), and then start to define properties of these Xs as well as showing what objects from other parts of math are an example of an X, then we show the mappings between Xs (the collection of such mappings may itself be an X), and then the notion of a subX (the collection of which may again be an X). We have done some of these things in this series of posts so far, and it looks like we are coming up to the mapping part. Just as in other subjects that are "sets with additional structure" (ignoring size issues as I usually will here) the mappings are functions on the underlying set that preserve the additional structure.

So, what is the underlying set? Its the set of the objects of the category. And the additional structure? The rules on the morphisms, of course! Given categories C and D, a mapping, F, between them- called a functor- gives for each object a in C an object Fa in D. If the categories are small this is literally a function. We also think of the functor as mapping a morphism, h, in C to a morphism Fh in D. In this way the functor has two "actions", one on objects and one on morphisms.

What about the additional structure then? The mapping on morphisms must obey the following laws- for all f : A -> B, g : B -> C, F(hof) = Fh o Fg (the functor F preserves composition, and for idA (the identity morphism for an object A) F(idA) = idFA (the mapping of the identity is the identity of the mapping). In other words, if morphisms compose in C then the mapped versions compose in D, and the identity morphisms of C and mapped to the ones in D.

Just as with other mapping there are a lot of things we could talk about here- invertable mappings, "surjective" mapping (epimorphisms), "injective" mappings (monomorphisms), endomorphisms, and on and on. For now I want to just talk about ways of thinking about functors and leave it at that.

One way to think of a functor is that it gives an "image" of one category in anther. Since the mapping preserves structure the image is pretty similar to the original, but it is like an interpretation of the source category in the target category. This is especially nice when thinking about mappings between mappings (a category of categories has its mappings as functors, and a category of functors has as its mappings natural transformations, a subject for a latter post) as they show the relationship between images or models of one category in another. We can then look at all ways to interpret one category in another and how they relate to each other. Hopefully I will talk about this in my posts on functional type theory.

Another way to think about them is just as the appropriate notion of mapping between the objects we are talking about. This is nice when talking about subcategories and relations between categories as it is similar to how we talk about these things in other theories. If we think of certain simple categories and all functors from or to these categories to other categories we can use functors to point out different aspects of the other category. This gives us things like a rigorous definition of the diagrams we draw.

We can think of categories as just dots and arrows, so they look like directed graphs (assuming self edges and transitivity) and maps between them are ways of placing one graph "inside of" the other in some sense.

I thinks thats all I will say about functors for now. Perhaps next time we will move on to natural transformations. If you are learning category theory, please check out the Catsters on youtube, and learn about important constructs like products/coproducts, limits/colimits, pullbacks/pushouts, etc. I will probably skip around and move too fast to cover these things, so be warned.

No comments:

Post a Comment