Pierce on type theory and category theory

Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic Category Theory for Computer Scientists_ suitable for self-study? (Do they have problem sets that can be checked by either looking up answers in The Back of the Book, or by trying to compile/run some code that the student writes?) FWIW, my formal math education--well, all the formal math education that I can remember at this point--stopped at freshman calculus plus one semester of statistics.

On 9/25/07, Seth Gordon
Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic Category Theory for Computer Scientists_ suitable for self-study?
(Do they have problem sets that can be checked by either looking up answers in The Back of the Book, or by trying to compile/run some code that the student writes?)
Graduate-level textbooks don't have answers in the back of the book, as a rule. In TAPL, some of the questions involve writing code, but others don't. If you're approaching this book, you ought to be at a point where you can check your own sanity. Better yet, find a study partner to discuss the problems with! I haven't gotten past the "watch it collect dust while sitting on my coffee table" point with the category theory book, but I can tell you that none of the problems in that one involve writing code. Cheers, Tim -- Tim Chevalier * catamorphism.org * Often in error, never in doubt "Ninety-nine percent of everything that is done in the world, good and bad, is done to pay a mortgage. The world would be a much better place if everyone rented." -- Christopher Buckley

Seth, You asked:
Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic Category Theory for Computer Scientists_ suitable for self-study?
And Tim answered:
Graduate-level textbooks don't have answers in the back of the book, as a rule. In TAPL, some of the questions involve writing code, but others don't. If you're approaching this book, you ought to be at a point where you can check your own sanity. Better yet, find a study partner to discuss the problems with!
That said, TAPL does come with solutions for the better part of the exercise set. Cheers, Stefan

On Tue, 25 Sep 2007, Seth Gordon wrote:
Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic Category Theory for Computer Scientists_ suitable for self-study?
Basic Category Theory depends on your mindset somewhat. TaPL is great though, and frequently recommended. The follow-up is also good.
(Do they have problem sets that can be checked by either looking up answers in The Back of the Book, or by trying to compile/run some code that the student writes?)
TaPL does. -- flippa@flippac.org A problem that's all in your head is still a problem. Brain damage is but one form of mind damage.

On 9/25/07, Philippa Cowderoy
On Tue, 25 Sep 2007, Seth Gordon wrote:
Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic Category Theory for Computer Scientists_ suitable for self-study?
Basic Category Theory depends on your mindset somewhat. TaPL is great though, and frequently recommended. The follow-up is also good.
Basic Category Theory is cute, but I think the exercises are sometimes phrased strangely. In some ways, the book makes more sense if you've already seen these ideas once & are trying to get a more CS perspective of the math. I'll probably be alone in this, but I think Mac Lane is a fantastic book for learning category theory. It's hard, but if you trudge along and do the exercises you learn quite a bit. It's fun!

On Tue, 2007-09-25 at 16:18 -0500, Creighton Hogg wrote:
On 9/25/07, Philippa Cowderoy
wrote: On Tue, 25 Sep 2007, Seth Gordon wrote: > Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic > Category Theory for Computer Scientists_ suitable for self-study? >
Basic Category Theory depends on your mindset somewhat. TaPL is great though, and frequently recommended. The follow-up is also good.
Basic Category Theory is cute, but I think the exercises are sometimes phrased strangely. In some ways, the book makes more sense if you've already seen these ideas once & are trying to get a more CS perspective of the math. I'll probably be alone in this, but I think Mac Lane is a fantastic book for learning category theory. It's hard, but if you trudge along and do the exercises you learn quite a bit. It's fun!
I didn't learn Category Theory from Mac Lane (Categories for the Working Mathematician for those out of the know), but I agree that it is a very good introduction and an enjoyable read. It does have good exercises. It should also make a passing good reference.

Another opinion in case you need more: TAPL is excellent for self-study. There are solutions for most interesting exercises. And every type system presented comes with a downloadable implementation. You can practice with it and change it. Do not hesitate to get it. I also recommend Cardelli's papers on types which are free to obtain. The Basic Category Theory book is, as the title says, "basic". It is a sort of polished study notes (and I recall Pierce saying something along this line in the introduction). Several examples and exercises are taken from Goldblatt's "Topoi, the Categorical Analysis of Logic", whose first chapters are a good starting point in Category theory but he introduces category-theoretic concepts from set-theoretic ones and it can be hard to abstract properly from one example. Pierce's book is well-written, introductory, there's nice stuff on cartesian closed categories and F-algebras, and the best thing is its excellent annotated bibliography which will help you to move on. Given its price and size, I think its worth. You'll need more stuff. There are books and tutorials out there. MacLane I guess is a must, if only for breadth and precision. There's Steve Awodey's book (Oxford University Press). I found Harold Simmon's notes "Category Theory in four easy movements" enjoyable and readable, especially the stuff on limits. Lawere's book mentioned by others is also fun. Fokkinga has an excellent introduction to category theory from a calculational standpoint, with notation and concepts used in the Bananas paper. There is also Barr and Wells's third edition. And of course, Mitchell's encyclopedic "Foundations for Programming Languages". To conclude, there are loads of sources and for self study, I'd recommend to use several books and several tutorial notes, if only to contrast approaches, definitions, to have exercises and solutions, etc. And there's the wikipedia as well.

The absolute easiest, clearest, and most entertaining book on Category Theory (which I highly recommend) is: Conceptual Mathematics: A First Introduction to Categories (Paperback) by F. William Lawvere and Stephen Hoel Schanuel, $25 It literally reads like a series of college lectures (called Article), each followed by study sections (called Sessions), complete with fake dialog with fake students asking the questions that are probably on your mind while reading the Articles. It has a tone so conversational that working mathematicians will run screaming, but I have found it highly enlightening. With hardly a proff in sight, this is definitely the starter book par excellence of Category Theory. Here is a random excerpt on page 25, a dialog between Chad and the Professor: PROFESSOR: Is this correct? Not quite, because we are supposed to draw two maps, and the thing draw for h . g is not a map; one of the points of the domain of h . g has been left without an assigned output. This deficiency won't matter for the next step, because that information is going to get lost anyhow, but it belongs in this step and it is incorrect to omit it. Chad's trouble was that in drawing h . g, he notices that the last arrow would be irrelevant to the composite (h . g) . f, so he left it out. CHAD: It seems the principle is like in multiplication, where the order in which you do things doesn't matter; you get the same answer. PROFESSOR: I am glad you mention order. Let me give you an example... I defy you to be scared by this book. There are an obscene amount of diagrams illustrating the points as well, along with numerous (and redundant) exercises to make sure you are getting it all. Dan Weston Seth Gordon wrote:
Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic Category Theory for Computer Scientists_ suitable for self-study?
(Do they have problem sets that can be checked by either looking up answers in The Back of the Book, or by trying to compile/run some code that the student writes?)
FWIW, my formal math education--well, all the formal math education that I can remember at this point--stopped at freshman calculus plus one semester of statistics. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I wonder why nobody mentioned this (yet; recently): Andrea Asperti and Giuseppe Longo Categories, Types and Structures. Category Theory for the working computer scientist. M.I.T. Press, 1991 You don't have to buy it. Go here, and fetch the book: http://www.di.ens.fr/~longo/download.html == Jerzy Karczmarczuk
participants (9)
-
Creighton Hogg
-
Dan Weston
-
Derek Elkins
-
jerzy.karczmarczuk@info.unicaen.fr
-
Pablo Nogueira
-
Philippa Cowderoy
-
Seth Gordon
-
Stefan Holdermans
-
Tim Chevalier