> Alexis Hazell wrote: > > On Thursday 12 July 2007 04:40, Andrew Coppin wrote: > >> I once sat down and tried to read about Category Theory. I got almost > >> nowhere though; I cannot for the life of my figure out how the > >> definition of "category" is actually different from the definition of > >> "set". Or how a "functor" is any different than a "function". Or... > >> actually, none of it made sense. > > > > Iiuc, > > > > "Set" is just one type of category; and the morphisms of the category > > "Set" are indeed functions. But morphisms in other categories need not be > > functions; in the category "Rel", for example, the morphisms are not > > functions but binary relations. > > > > A "functor" is something that maps functions in one category to functions > > in another category. In other words, functors point from one or more > > functions in one category to the equivalent functions in another > > category. Perhaps they could be regarded as 'meta-functions'. > > > > Hope that helps, > > It helps a little... > > I'm still puzzled as to what makes the other categories so magical that > they cannot be considered sets.
Another example: a partially ordered set is a category. The objects are the elements and there is an arrow between two objects a & b if a <= b. An element isn't (necessarily) a set. Nothing magical here. A functor is then an order preserving function (homomorphism). This question has come up more than once so it may be worth a wiki page if anyone has time. > > I'm also a little puzzled that a binary relation isn't considered to be > a function... That's the definition of a function: a restricted relation in which there is at most one range element for a given domain element - see any book on set theory e.g. Halmos. > > From the above, it seems that functors are in fact structure-preserving > mappings somewhat like the various morphisms found in group theory. (I > remember isomorphism and homomorphism, but there are really far too many > morphisms to remember!) Sometimes but clearly the forgetful functor doesn't. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe