# [Haskell-cafe] Join and it's relation to >>= and return

ajb at spamcop.net ajb at spamcop.net
Thu Jun 10 00:46:37 EDT 2004

```G'day all.

Quoting Ron de Bruijn <rondebruijn at yahoo.com>:

> I have thought a while about morphisms and although I
> had written down in my paper that a functor and also a
> natural transformation are also morphisms, but in a
> different category, I now am not sure anymore of this.

It's true.  In particular, a functor is a /homomorphism/ between
categories.

Intuitively, a homomorphism is a function which preserves structure.
For example, using (+,0) as our monoid notation, a monoid homomorphism
f : M -> N is a function such that:

f(a +_M b) = f(a) +_N f(b)
f(0_M) = 0_N

(Here, + and 0 are subscripted to clarify which operations come from
which monoids.)

For every(?) type of mathematical structure which has homomorphisms,
there is a category where the objects are the structures and the
morphisms are the homomorphisms for that structure.  It's no different
if the structures are categories, and functors are their homomorphisms.

> If you see everything(objects and morphisms) as dots
> and arrows, and some arrows and some dots are just
> some more complex than others, then this holds, but is
> that legal? Intuitively seen, it is.

I don't know what you mean by "more complex".  A dot is just a dot, and
it has no internal structure that we can get at using category theory
alone.  Some dots may play specific roles in relation to other dots and
arrows, but no dot is any more complex than any other, really.

> According to some paper, morphisms are not like
> functions, in that you can apply some morphism to an
> object, but that you can only compose them. But I
> would say that if you have the morphism f:a->b, that
> is a arrow from dot a to dot b. That there clearly is
> a notion of following that arrow, in effect applying a
> function.

For a counter-example, think of the dual category Set^{op}.  A morphism
f : a -> b in that category means that there is a function f^{op} : b -> a
where a and b are sets, however f probably isn't a function at all.

In a category which is a partial order, there is a morphism f : a -> b
if and only if a <= b.  (Or is it a => b?  Can never remember.)  Here,
the morphisms really have no internal structure at all.  If the category
has a finite number of objects, you can represent the whole thing using
a bit matrix, and each morphism can be identified with a bit set to
"true".

I think the problem here is that you have the idea that a morphism is
a process that turns one object into another.  In many (probably most)
interesting, practically significant cases, that's true, but it need
not be.

I think it really helps to try to understand category theory mostly as
a language for talking about things, and not necessarily "things" in
and of themselves.  Using this understanding, a morphism is a noun, not
a verb.  It's a concrete thing describing a relationship between objects,
not necessarily an action that you perform on objects.

I don't know if any of this helps or not.

Cheers,
Andrew Bromage
```

More information about the Haskell-Cafe mailing list