I tried to answer a few of the remaining category theory questions as best I could. This thread is a week old, but I've been away and I saw some unanswered questions. I tried looking online for good resources to help explain precisely what a category is but most of what I found was either vague or assumed significant knowledge of pure math.
On Tue, Apr 3, 2012 at 4:17 PM, Raul Miller <rauldmil...@gmail.com> wrote: > On Tue, Apr 3, 2012 at 3:55 PM, Marshall Lochbaum <mwlochb...@gmail.com> > wrote: > > "The category of sets" is defined to be the category of sets and the > > functions between them. It is an unambiguous term. If there is another > > category whose elements are sets (i.e. the category of sets containing a > > "base" element and the functions between them fixing that element), it > will > > be properly delineated. > > Then this category must contain all possible arrows? > "The category of sets" is a common shorthand for "the category whose objects are ALL sets and whose morphisms are ALL functions between sets". I think this should answer your question. Yes, we've included all arrows that are functions between our objects (as sets). Arrows don't have to be functions in general though. So we can throw in additional arrows and create a larger category on the same objects (if we define composition appropriately), but in this new category we would no longer have arrows that represent actual functions. > > An arrow is only associated with one source and one destination. Thus > there > > is no arrow which leads from 0 to 0 and from 1 to 1. If we are in the > > category of sets, this means each function has precisely one domain and > > codomain. > > I think you are telling me that an arrow cannot represent > an arbitrary function. > > Consider the function F(x) = x+1 > > F(1) = 2 > F(2) = 3 > > There can be no arrow that leads from 1 to 2 which also > leads from 2 to 3. > > We can have an arrow which leads from the set of all > integers to the set of all integers, but that arrow > cannot distinguish between the above function and any > other function on integers. > > But this does not match what I read when I read about arrows/morphisms. Let me give two different ways of formalizing natural numbers with categories that I think help clarify precisely what categories are. Let N1 be a category with only one object (ie a monoid), which is the set N={0,1,2,3,...}, and arrows which are given by all functions from this set to itself (composition is normal function composition). Your function f(x) = x + 1 is a valid arrow in this category, we would write f: N -> N to specify its domain and codomain. It composes nicely with itself and with any other arrows (composition of arrows in our category is given to us by composition of functions in our set-theory interpretation). The key observation here is that the categorical structure is the abstract structure of objects, arrows, and composition (N, functions on N, and their composition). It doesn't capture "our objects are sets" or "our arrows are functions". In the strictly categorical structure of N1, "0" and "1" are nothing; they are neither objects nor arrows, we only use them to define it. Let N2 be a category whose objects are the numbers 0,1,2,3,... themselves, so we now have infinitely many objects (I'm not specifying what arrows are in this category yet). It seems like the earlier confusion arose from the desire to have a single arrow in a category like this which represents f(x) = x + 1. But we also must define its domain and codomain, so some f0: 0 -> 1 would be distinct from some f1: 1 -> 2. The function f(x) = x + 1 can't be represented by a single arrow in this category because its domain and codomain are not individual numbers, which are our objects. We might be able to get a functor out of it, but this depends on our choice of arrows. Actually, let's go ahead and define our arrows in N2 by saying that there is a unique arrow f: x -> y if x < y or x = y (in the latter case this would be the identity arrow). This gives us a structure of arrows that are not representative of functions functions but instead describes the linear ordering of the natural numbers. You can confirm that this indeed satisfies the properties of a category, where composition is defined by the only possibility (ie if x<=y and y<=z then x<=z and each of these corresponds to a unique arrow by definition, so there is only one way to compose them). Now, we can define F: N2 -> N2 to be a functor, defined by F(x) = x + 1 on the objects {0,1,...} and F( f: x -> y ) = (f+1): (x+1) -> (y+1) on the arrows. This should satisfy the definition of a functor. A function, like any mathematical thing, can be represented in terms of category theory in many different ways and you have to be careful when doing so. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm