(Off-topic) Question about categories

Iavor Diatchki diatchki at cse.ogi.edu
Thu Sep 18 11:48:13 EDT 2003


hello,

i think what is importnat is that one can tell when two arrows are the 
same (how to specify that of course is tricky in general). equality on 
objects kind of follows from there.  in fact one can describe a category 
without referring to objects at all:
1. pick a collection of arrows (call it A)
2. pick a sub-collection if A that you will call "identity" arrows (call 
that I)
3. give the following mappings (these are not arrows!)
    3.1 source: A -> I
    3.2 target: A -> I
    3.3 compose: (A,A) -> A
    (this one is partial, and has to be defined, when the source and 
target match as usual).

the trick is that essentially objects are represented by the identity 
arrows on them (as there is a 1-1 correspondance between the two).

my favourite way to think of a category is as follows:
1. i think of objects as types
2. i think of an arrow: A -> B  as value of type B, that has a free 
variable of type A
3. i think of composition as substitution

hope this helps
iavor


Graham Klyne wrote:
> (I'm asking here because I believe there is some overlap between 
> category theory and functional programming cognoscenti...)
> 
> It has been suggested to me that categories may be a useful framework 
> (more useful than set theory) for conceptualizing things for which there 
> is no well-defined equality relationship.  (The discussion is about 
> resources in WWW.)  I've done a little digging about category theory, 
> and find some relatively approachable material at:
>   http://www.wikipedia.org/wiki/Category_theory
>   http://www.wikipedia.org/wiki/Class_(set_theory)
> and nearby.
> 
> But I'm hitting a mental block with this (and other places I've look 
> don't add anything I can grok).  The definition of a category depends on 
> the definition of a morphism, and in particular the existence of an 
> identity morphism for every object in a category.  The definition of an 
> morphism is in terms of equality of compositions of morphisms:
>     for f : A -> B we have Id[B]. f = f = f . Id[A]
> 
> My problem is this:  how does it make sense to define an equality of 
> morphisms without some well-defined concept of equality on the 
> underlying objects to which they apply?  That is, given object X and an 
> object Y, it is possible to examine them and determine whether or not 
> they are the same object.  And if the underlying objects have such a 
> concept of equality, what prevents them from being sets or members of 
> sets?  But categories are presented as being more general than sets.
> 
> Does anyone see the cause of my non-comprehension here?
> 
> #g
> 
> 
> ------------
> Graham Klyne
> GK at NineByNine.org
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 


-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================



More information about the Haskell-Cafe mailing list