
Introduction to Category Theory - ColinWright
http://www.cs.nott.ac.uk/~gmh/cat.html
======
yodsanklai
I learned a little bit about Category Theory a few years ago. My favorite book
on the subject was this one:

[http://www.amazon.com/Category-Computer-Scientists-
Foundatio...](http://www.amazon.com/Category-Computer-Scientists-Foundations-
Computing/dp/0262660717)

Concise and clear, with examples that should speak to computer scientists.

However, I've always failed to see the practical interest of categories. It's
nice to see how various things can be described or defined in a categorical
framework. It may shade new light on some concepts, but I didn't see any
useful theorems you could apply (like in vector spaces for instance). Probably
I didn't go deep enough.

~~~
gclaramunt
You don't need to go deep. Types and functions (ignoring non-termination) form
a category. Functional programming (Haskell programmers in particular) uses
many results from it. e.g. building any "container" type (collections,
options, futures,etc..) is the mapping of objects of an (endo) functor, the
mapping of functions is given by fmap/map As an example, just from the functor
laws you get map (f.g) = map f . map g

Natural transformations between functors gives you parametricity and "theorems
for free"

Another result that's used directly is the CoYonneda lemma (but I'm still
trying to understand it :) )

The point is: category theory in spite of being totally abstract offers many
interesting results that can be applied to day-to-day coding :)

~~~
ihm
> Natural transformations between functors gives you parametricity and
> "theorems for free"

Could you elaborate? This is something everyone always talks about but I've
never really seen a proof/precise statement.

~~~
gclaramunt
The "Theorems for free" paper is here:
[http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf](http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf)
( I guess is the most precise you can get :) )

------
Nimi
When I was in a freshman math course, a professor started the semester with a
warning: "Trying to learn math without solving exercises is like trying to
teach a toddler to walk from physiology textbooks". Yet, I haven't found a
good source of exercises for introductory category theory - is it the case
that exercises for this subject are hard to come by? Or maybe it's a
relatively advanced subject, so there are few books, and as always most books
don't include exercises for some strange reason? Anyway, would love to hear
where I can find exercises on the subject, if anyone knows. (BTW, I don't mean
sprinkling an exercises or 3-4 here and there like in the OP, I mean like
10-15 exercises per lecture, which was the standard when I was a freshman)

~~~
tel
If I remember correctly, Awodey[0] has exercises like that.

[0] [http://www.amazon.com/Category-Theory-Oxford-Logic-
Guides/dp...](http://www.amazon.com/Category-Theory-Oxford-Logic-
Guides/dp/0199237182)

~~~
runT1ME
Awodey's does not have answers to the exercises, so it makes it hard to find
out if I'm getting close or just scribbling things down...

------
bane
Oh nice. This is actually a nice survey of the basics and doesn't assume I
have a M.S. or PhD in Mathematics already. I took a quick look through and
anybody who's at least learned about working-level Set Theory and can follow
various logic notations (basically any CS major) can probably work through
this without too much fuss.

------
antimora
It would be awesome if youtube's computerphile did a series on this subject.
Most professors for this channel are from University of Nottingham.

[https://www.youtube.com/user/Computerphile](https://www.youtube.com/user/Computerphile)

~~~
gclaramunt
If you can stand my thick accent , I did an attempt to introduce the very
basics at PNWScala 2014 [http://www.confreaks.com/videos/4864-PNWS2014-what-
every-sca...](http://www.confreaks.com/videos/4864-PNWS2014-what-every-scala-
programmer-should-know-about-category-theory) (mind you, I'm just learning the
stuff)

------
weeksie
This is _incredibly_ naive because I'm a total layman when it comes to both,
but is there a relationship between category theory and semiotics? It seems
like indexes and symbols are similar to categories and morphisms. Again, I
really don't know what I'm talking about as I've barely scratched the surface
of either but it would be awesome to hear from someone who does so they can
tell me that I'm misunderstanding both things (and if I'm lucky, _how_ I'm
misunderstanding them).

~~~
Ixiaus
Not a Mathematician and one should chime in.

The relationship you're sensing appears very general, in the sense that "is
there a relationship between Category Theory and Linguistics?" I definitely
think there's a relationship because that's how the human intellect operates,
everything is a relationship, but I do not think there is an _intrinsic and
meaningful relationship outside the context of general cognition_.

I think Semiotics is important and the study of what the symbols in Category
Theory are or why they are used is a meaningful study (and would enable a
deeper understanding) but I don't think it's a prerequisite for comprehending
Category Theory itself.

~~~
weeksie
I figured that semiotics wouldn't at all be required to understand category
theory (or vice versa). More that the general language of sign/signified and
so forth feels similar in some vague way. But again, you're probably right in
that the brain likes to find patterns even when they aren't really there.

------
amelius
Nice, but why do mathematicians always overload their symbols? For example, on
page 2, the right-arrow already has two meanings!

This isn't making things much clearer.

~~~
ColinWright
Two things.

Firstly, there simply aren't enough symbols. In programming, naming functions
and variables is hard, really hard, and in math you don't have the luxury of
giving long names to every separate concept. Part of the value of the notation
is its compactness.

Secondly, symbols that are overloaded usually have related meanings, and much
of the value in the notation is the abuse of notation that you get from it.
You may think it just makes everything confusing and harder, but in truth,
learning how to work with the notation is incredibly valuable, and leads to a
deeper understanding of what things really are, and how they work.

The overloading is a feature, not a bug.

~~~
amelius
There are lots of things a mathematician can do to avoid overloading.

Use colors, use boldface, use special markers to make the symbols slightly
different. Or, using computers, provide mouse-over information.

I agree that sometimes overloading can be useful, but imho when learning new
stuff, it complicates matters more than necessary.

~~~
ColinWright
That depends. Disambiguating these things makes them easier to read, easier to
_think_ you understand what's going on. However, in my experience the mental
effort involved in working out what the symbols mean in their different
contexts is essential to actually internalize and understand.

Yes, if you just want to read it without actually gaining any deep
understanding or skill, use boldface, colors, words, mouse-over pop-ups. But
if you want to learn something and be able to do it, you need to struggle with
it. Only by doing the work do you gain the skill.

As in programming, simply reading programs gains you little, if anything. If
you want to grow in skill, you need to work through the detail of programs you
read, and do some programming yourself.

~~~
amelius
> As in programming, simply reading programs gains you little, if anything.

But at least in programming, I can do a "grep" for the symbols I want to
understand :)

~~~
ColinWright
Ever tried grepping for an overloaded "+" in C++?

~~~
amelius
This is exactly why I never overload such symbols, or at least I try to keep
it at a minimum.

------
jcr
This is a useful resource:

[http://plato.stanford.edu/entries/category-
theory](http://plato.stanford.edu/entries/category-theory)

