Resources for learning practical category theory - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-23T23:46:35Z http://mathoverflow.net/feeds/question/903 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory Resources for learning practical category theory Michael E 2009-10-17T18:03:56Z 2011-01-06T18:05:20Z <p>I've been doing functional programming, primarily in OCaml, for a couple years now, and have recently ventured into the land of monads. I'm able to work them now, and understand how to use them, but I'm interested in understanding more about their mathematical foundations. These foundations are usually presented as coming from category theory. So we get explanations such as the following:</p> <blockquote> <p>A monad is a monoid in the category of endofunctors.</p> </blockquote> <p>Now, my goal (partially) is to understand what that means. Can anyone suggest a gentle introduction to category theory, particularly one aimed at programmers already familiar with a functional language such as ML or Haskell, with references for further reading? Resources not necessarily aimed at programmers but accessible to readers with a background in discrete math and first-order logic would be quite acceptable as well.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/905#905 Answer by Quadrescence for Resources for learning practical category theory Quadrescence 2009-10-17T18:13:49Z 2009-10-17T18:13:49Z <p><strong>Category Theory</strong> by Steve Awodey from Carnegie Mellon University has been a favorite text of mine. It's 266 pages, and while it's not a "practical theory book" (e.g., one aimed at programmers), it is very easy to follow and very well explained.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/906#906 Answer by sdcvvc for Resources for learning practical category theory sdcvvc 2009-10-17T18:15:44Z 2010-01-25T22:13:09Z <p>Online resources:</p> <ul> <li><a href="http://www.youtube.com/user/TheCatsters" rel="nofollow">The Catsters channel</a></li> <li><a href="http://haskell.org/haskellwiki/User:Michiexile/MATH198" rel="nofollow">MATH198 course notes</a> - examples in Haskell</li> <li><a href="http://www.cs.manchester.ac.uk/~david/categories/book/book.pdf" rel="nofollow">Rydehard, Burstall: Computional Category Theory</a> - examples in ML</li> <li><a href="http://www.cs.manchester.ac.uk/~hsimmons/MAGIC-CATS/magic-cats.html" rel="nofollow">MAGIC course</a></li> <li><a href="http://www.cwru.edu/artsci/math/wells/pub/ctcs.html" rel="nofollow">Barr, Wells: Category theory for computing science</a></li> <li><a href="http://www.itu.dk/~birkedal/teaching/category-theory-Fall-2001/basiccat.ps.gz" rel="nofollow">Jaap van Oosten: basic category theory</a></li> <li><a href="http://www.maths.gla.ac.uk/~tl/ct/" rel="nofollow">Tom Leinster</a></li> <li><a href="http://cheng.staff.shef.ac.uk/catnotes/categorynotes-cheng.pdf" rel="nofollow">Eugenia Cheng</a></li> <li><a href="http://www.andrew.cmu.edu/course/80-413-713/notes/" rel="nofollow">Steve Awodey</a> - very similar to the book mentioned by Quadrescence</li> <li><a href="http://www.dcs.ed.ac.uk/home/dt/CT/" rel="nofollow">Daniele Turi</a></li> <li><a href="http://www.mathematik.tu-darmstadt.de/~streicher/CTCL.pdf" rel="nofollow">Thomas Streicher</a></li> </ul> <p>Books:</p> <ul> <li>"Basic category theory for computer scientists" by Benjamin Pierce</li> <li>MacLane - solid mathematical foundations, but hardly any references to computing</li> <li><a href="http://katmat.math.uni-bremen.de/acc/" rel="nofollow">Abstract and concrete categories</a> - might be considered too verbose, but it's full of examples</li> </ul> <p>Category theory in Haskell:</p> <ul> <li><a href="http://en.wikibooks.org/wiki/Haskell/Category%5Ftheory" rel="nofollow">Wikibooks introductory text</a></li> <li><a href="http://blog.sigfpe.com" rel="nofollow">sigfpe's blog</a> has a lot of category theory articles - (di)natural transformations, monads, Yoneda lemma...</li> <li><a href="http://comonad.com/reader/" rel="nofollow">Comonad.Reader</a></li> <li><a href="http://www.haskell.org/sitewiki/images/8/85/TMR-Issue13.pdf" rel="nofollow">The Monad.Reader</a> - check "Calculating monads with category theory"</li> </ul> <p><a href="http://www.cs.le.ac.uk/people/akurz/books.html" rel="nofollow">Another list</a></p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/907#907 Answer by Grétar Amazeen for Resources for learning practical category theory Grétar Amazeen 2009-10-17T18:22:12Z 2009-10-17T18:22:12Z <p>The book "Abelian Categories, an Introduction to the Theory of Functors" by Peter J. Freyd is a very good introduction to category theory. It is not aimed at computer scientists, but it is a good introduction to the subject.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/909#909 Answer by Reid Barton for Resources for learning practical category theory Reid Barton 2009-10-17T18:25:24Z 2009-10-17T18:25:24Z <p><a href="http://math.ucr.edu/home/baez/week89.html" rel="nofollow">TWF Week 89</a> for your specific question, and <a href="http://math.ucr.edu/home/baez/TWF.html" rel="nofollow">This Week's Finds in Mathematical Physics</a> in general for wonderful presentations of all sorts of things category-related.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/930#930 Answer by John D. Cook for Resources for learning practical category theory John D. Cook 2009-10-17T19:43:24Z 2009-10-17T19:43:24Z <p>I'm skeptical of "practical category theory," especially books by mathematicians telling computer scientists how important category theory is. I'm not saying there aren't connections -- I know there are -- but there's a tremendous temptation for mathematicians to include gratuitous material.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/939#939 Answer by Scott Morrison for Resources for learning practical category theory Scott Morrison 2009-10-17T21:00:42Z 2009-10-17T21:00:42Z <p>Categories for the working mathematician, by Maclane, is probably good for some working computer scientists too. No disputing taste, of course.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/1954#1954 Answer by Justin Hilburn for Resources for learning practical category theory Justin Hilburn 2009-10-22T21:31:13Z 2011-01-06T18:05:20Z <p>Since sdvccv already pointed out a number of good sources for learning category theory as applied to CS, I will try and provide some guide posts.</p> <p>My favorite book on the subject is Practical Foundations of Mathematics by Paul Taylor since he does a really good job of giving you a big picture (unfortunately he doesn't always give you enough details if you don't already have a logic background). Bart Jacobs book Categorical Logic and Type Theory is also very readable.</p> <p>In general I think the most important thing to understand in order to apply categories to computer science is the Curry-Howard-Lambek correspondence which loosely states that lambda calculii, intuitionist logics, and cartesian closed categories (categories where you have products and function spaces) are the same thing. <a href="http://www.cs.manchester.ac.uk/~pt/stable/prot.pdf" rel="nofollow">Proofs and Types</a> which was transcribed from some of Girard's lecture notes is an excellent source for the Curry-Howard part of the correspondence. Steve Awodey's book and these <a href="http://web.comlab.ox.ac.uk/people/Bob.Coecke/AbrNikos.pdf" rel="nofollow">notes</a> by Samson Abramsky are good places to see this translated into categorical language. For connections to Topoi Mac Lane's Sheaves in Geometry and Logic looks good.</p> <p>Next you will probably want to learn about categorical and universal algebra. One of the more immediate and accessible applications of these ideas is the theory of <a href="http://www.cs.ut.ee/~varmo/papers/thesis.pdf" rel="nofollow">algebraic data types</a> (categorically: initial algebras for polynomial functors) and maps and folds between them. <a href="http://lambda-the-ultimate.org/node/1183" rel="nofollow">Monads</a> are also a part of this subject since they are type constructors (endofunctors) that also have a multiplication and unit. Haskell do notation corresponds to forming the Kliesli category for a monad.</p> <p>The nascent field of universal coalgebra has been very useful for formalizing notions of <a href="http://www.cs.ru.nl/B.Jacobs/CLG/JacobsCoalgebraIntro.pdf" rel="nofollow">state and observation</a>. There are also some emerging connections between <a href="http://folli.loria.fr/cds/2006/courses/Kurz.CoalgebrasStoneDualityModalLogic.pdf" rel="nofollow">coalgebra and modal logic</a>.</p> <p>Finally, if you aren't worn out you may want to learn about Stone duality which is a way of relating "<a href="http://www.amazon.com/Topology-Cambridge-Theoretical-Computer-Science/dp/0521576512" rel="nofollow">logics of observable properties</a>" and <a href="http://homepages.inf.ed.ac.uk/als/Teaching/MSfS/l3.ps" rel="nofollow">topology.</a> For computer scientist Stone duality is primarily useful for giving a <a href="http://www.comlab.ox.ac.uk/publications/publication1870-abstract.html" rel="nofollow">logical interpretation to domain theory</a>, but mathematicians may recognize the duality between commutative rings and Zariski spectra as a special case.</p> http://mathoverflow.net/questions/903/resources-for-learning-practical-category-theory/2626#2626 Answer by Wayne D for Resources for learning practical category theory Wayne D 2009-10-26T15:32:41Z 2009-10-26T15:32:41Z <p>You may find <em>Computational Category Theory</em> by Rydeheard and Burstall interesting. It's available online at Rydeheard's page: <a href="http://www.cs.manchester.ac.uk/~david/categories/" rel="nofollow">http://www.cs.manchester.ac.uk/~david/categories/</a> </p> <p>The <em>Manual</em> there is the textbook and <em>The Programs</em> provide a great deal of the ML code in the text in its development of category theory.</p> <p>For someone new to CT it's very different than most introductions but the code helps make some of the ideas much more concrete. </p>