6 ms·
I've recently been studying category theory, mostly from Riehl's book, a few years after finishing my undergraduate math degree at a well-regarded school. I ca
by benrbray 5y ago
I've recently been studying category theory, mostly from Riehl's book, a few years after finishing my undergraduate math degree at a well-regarded school. I can't help but feel a little cheated that not one of my professors thought it was important to show us a little category theory.
Learning category theory has brought clarity that I never felt as a student. I always had this strange feeling that many of my courses wasted time proving "the same" facts over and over again. From group theory, to linear algebra, to topology, to measure theory. We'd spend most of the semester proving some trivial facts about morphisms and functors, just specialized to an unfamiliar category, and by the time we were done, we only had time to prove one or two interesting theorems before the semester ended.
Back then, I had stumbled upon some Wikipedia pages about category theory, but all the jargon seemed impenetrable at the time. Now, I really wish it had part of the curriculum from the very beginning. Simply giving students in an abstract algebra class the simple definitions for category, functor, and natural transformation would go a long way. Math programs should probably also start teaching Haskell or Coq in the first or second year.
- rackjack 5y agoAre there any introductions to category theory you would recommend in particular? A cursory glance gives me this: http://www.cs.nott.ac.uk/~pszgmh/cat.html http://www.cs.nott.ac.uk/~pszgmh/cat.html Which seems to avoid being very "mathy" right out of the gate, though I can't tell its quality.
- envp 5y agoDefinitely recommend CTFP: (Category Theory For Programmers) https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ https://bartoszmilewski.com/2014/10/28/category-theory-for-p...
- ABS 5y agoMIT's 18.S097: Programming with Categories with Brendan Fong, Bartosz Milewski and David Spivak is great: http://brendanfong.com/programmingcats.html http://brendanfong.com/programmingcats.html All lectures from the course are in this playlist: https://www.youtube.com/playlist?list=PLhgq-BqyZ7i7MTGhUROZy3BOICnVixETS https://www.youtube.com/playlist?list=PLhgq-BqyZ7i7MTGhUROZy... Milewski's free book Category Theory for Programmers is a "classic" as well https://github.com/hmemcpy/milewski-ctfp-pdf https://github.com/hmemcpy/milewski-ctfp-pdf In general you can find videos on youtube of talks given at various industry functional programming conferences that often help since they start from the industry programmer point of view rather than the pure maths one. E.g. A practical introduction to Category Theory (for Scala devs) https://www.youtube.com/watch?v=GNG3Gk9KsoI https://www.youtube.com/watch?v=GNG3Gk9KsoI
- hkopp 5y agoI would recommend "Seven Sketches in Compositionality", as it does not progressively get harder, but each chapter starts off very easily. So you can catch up, if you got lost. It is available here: https://arxiv.org/abs/1803.05316 https://arxiv.org/abs/1803.05316
- AnthonBerg 5y agoSeconding the suggestions in my sibling comments. I think I managed to learn some category theory by haphazard clambering and osmosis of the material. I’d like to add a recommendation for the book Category Theory for the Sciences: https://mitpress.mit.edu/books/category-theory-sciences https://mitpress.mit.edu/books/category-theory-sciences Archive.org seems to have it for download: https://archive.org/details/cattheory https://archive.org/details/cattheory (I prefer the printed copy myself, i.e. it has been worth having.)
- myWindoonn 5y agoAll sibling recommendations are excellent. In addition, I offer https://math.ucr.edu/home/baez/rosetta.pdf https://math.ucr.edu/home/baez/rosetta.pdf "Physics, Topology, Logic, & Computation: A Rosetta Stone". It has a fair amount to offer computer scientists, and also lots of pictures.
- lolthishuman 5y agoI had a similar feeling and recently came across a project that feels like it’s closer to the core as you suggest: https://github.com/advancedresearch/path_semantics https://github.com/advancedresearch/path_semantics
- galaxyLogic 5y agoCategory theory seems very natural from the the programming point of view, there are things which are connected to other things by 'arrows', much like data-structures, or function call-graphs.
- red_trumpet 5y ago> We'd spend most of the semester proving some trivial facts about morphisms and functors, just specialized to an unfamiliar category Even if you know category theory, you still need to prove facts about the different categories you are dealing with. Just phrasing it in the language of category theory seldom suffices to prove something.
- OscarCunningham 5y ago'The category of algebras of a monad on Set is complete and cocomplete, and the forgetful functor preserves limits.' gets you pretty far in a lot of subjects.
- zarzavat 5y agoCan someone explain that in simple(r) terms?
- zozbot234 5y agoSure. A monad is just a monoid in the category of endofunctors.
- Twisol 5y agoThe trouble is that, from a certain perspective, all of those terms are indeed very simple. What they are not, however, is familiar. Everything I say below will be completely useless to you, because it starts abstract and gets worse from there. You won't be able to apply this to anything immediately. But perhaps it will help you see why these concepts apply to so many things. A category is a world of two-sided widgets that can be fit together, with a rule that two things can be fit together only if the shapes at matching ends line up. We call the widgets "morphisms" and the shapes of their ends "objects". A functor is a way of seeing a piece of a category in terms of another category. If we're relating a category to itself, it's an endofunctor. Endofunctors are funny in that, if you're looking at a piece of a category in terms of the whole category, you can find something that looks like that piece itself inside the piece -- it's kind of fractal. Monads are endofunctors where the infinite regress doesn't really get you anywhere -- if you zoom in by two levels, you see basically the same picture as if you only zoomed in once. An algebra on a monad is a particular object, and a way to go from the zoomed-in version under the monad back to the unzoomed object at the top. It doesn't work for just any object; only the particular one. My favorite example of a monad is the Tree monad in the category of data structures. (If you're familiar with programming, imagine the universe of all primitive types and all structs or enums you could possibly define.) The Tree monad zooms in on just the data structures that are trees whose leaves are a particular other data structure, like a tree of ints or a tree of customer records. Among these tree types is the type of trees of trees of ints; that is, trees whose leaves are themselves trees of ints. It's valid, but a bit silly; we can always just graft each subtree onto the main tree to obtain a tree of ints. The extra level of tree doesn't add anything to the data structure. A tree algebra picks out a particular leaf type and tells us how to turn a tree over this type into a single value. I can, for instance, explain how to sum all of the integers in a tree of ints to get a single integer. If we have a tree of trees of ints, I need to make sure that summing the subtrees and then summing the main tree is the same as just splicing the subtrees in and evaluating the whole thing. (It is.) Deep breath. There are lots of algebras that could exist for any given monad; I just illustrated one for the Tree monad. It turns out that if you take all of the algebras for a monad together, they form a category of their own. Morphisms between algebras in this category are a pair of morphisms in the original category, one going between the types the algebras work over, and one doing the same but within the focus of the monad. They have to cohere in a specific sense. If this category is complete, then certain general kinds of optimization problems can be solved in that category -- for instance, the kind where you have some algebras and you want to find an algebra compatible with all of them. If it's cocomplete, you can solve another class of problems. (Loosely speaking, one is a minimization problem and the other is a maximization problem.)
- Someone 5y ago> Back then, I had stumbled upon some Wikipedia pages about category theory, but all the jargon seemed impenetrable at the time. Now, I really wish it had part of the curriculum from the very beginning. It’s possible that the jargon would have seemed impenetrable to most students, and ,any students would have dropped out if they had done that. I think you have to learn first that abstraction can be useful in math by learning that similarities exist between seemingly distinct structures. It also just takes time for things to sink in. As one of my teachers said about analysis: “don’t worry if you can’t do the exercises. In six weeks time, look back at today’s exercises, and you’ll wonder how you ever found them difficult”
- dwohnitmok 5y agoI kind of disagree. I think you found category theory rewarding precisely because you already had a math background and could benefit from seeing the linkages. Without having already done the classes you did, it would be very difficult to motivate category theory and it's liable to just make students' eyes glaze over. For example, most of Riehl's examples wouldn't make sense. I also think that abstract algebra, linear algebra, analysis, geometry etc. even at the undergraduate level have the majority of their theorems unprovable from category theory alone. Category theory is good for proving that the trivial is truly trivial, but the nontrivial still remains. > Math programs should probably also start teaching Haskell or Coq in the first or second year. I also disagree. For all the distrust many programmers have of Haskell and its "mathiness" it actually has rather little to do with mathematics and the parts that it does have to do with mathematics are generally in ways mostly irrelevant for the classical undergraduate math curriculum. As for formal theorem provers such as Coq, though one day they may become standard mathematical rigor, that day is not now. They remain very unergonomic compared to the usual informal, but rigorous proofs in pure mathematics and often have several orders of magnitude more time to arrive at the same proof with no real increase in mathematical insight. I am personally very excited by them, but view their current status as far too premature to include in the average undergraduate mathematical curriculum.
- zozbot234 5y ago> Without having already done the classes you did, it would be very difficult to motivate category theory and it's liable to just make students' eyes glaze over. There's enough motivation for category theory even in basic foundations. You could start by teaching a structural set theory like ETCS as the formal counterpart of naïve set theory. Then yes, teach abstract algebra as usual but introduce category-theoretical generalizations early instead of duplicating content.
- tome 5y agoConcretely, what exactly are you claiming is duplicated?
- 5y ago
- nathias 5y agoI have no math background but find category theory very interesting for thinking about math foundations, it really makes more sense than set theory for that ....
- franknstein 5y agoWhy and how? I've been through ZFC course and I found it quite natural. Okay maybe not natural, but it quickly clicked.
- nathias 5y agosorry I meant for thinking about math foundations as in the philosophical questions about math (is it constructed, discovered, a priori etc.) not mathematical foundations as in concrete theorems.
- jonsen 5y agoFrom the article: "Through category theory, we teach young mathematicians the latest ideas by using general rules that apply broadly to categories across mathematics rather than drilling down to individual laws that apply only in a single area."
- echopurity 5y agoAll of math education is bad like this. We're taught the "ladder myth" that math is a linear subject leading to like multivariable calculus, not even real analysis. It's a terrible waste of people's time, interests, and talents.
- thatmathguy 5y agoI fully disagree, learning category theory (& friends) in undergrad does more harm than good. An undergrad curriculum is expository in nature, the main goals being diversity of topics and developing a maturity. Maturity is the biggest prerequisite to approaching cat theory imo. Similarly, without examples and non-examples from various fields, cat theory will feel like esperanto for its own sake. Given this, cat theory should not fall into undergrad territory, but will be present in any grad program. Categories should show up naturally in Algebra/Algebraic topology, and not much elsewhere (in undergrad). Saying 'category of vector spaces over k' in a (linear) algebra course is effectively a waste of breath due to how little additional insight it provides.
- spekcular 5y agoThey don't show up much elsewhere even in research-level mathematics. Unless you're doing something related to algebraic geometry or algebraic topology, there's a 95% chance they're a waste of time. The stuff in the linked article is relevant mainly to homotopy theorists. The importance of category theory in mathematics seems wildly overestimated by HN, judging by the number of stories about it.
- zozbot234 5y ago> The stuff in the linked article is relevant mainly to homotopy theorists. HoTT makes homotopy theory relevant to the foundations of mathematics. So every mathematician encounters this stuff in some way. It clarifies what it means for mathematical structures to be isomorphic, and what exactly one is doing when treating isomorphisms by analogy with equality, which is often dismissed as an "abuse of notation" but is something that practically everyone does in math.
- AnimalMuppet 5y ago> HoTT makes homotopy theory relevant to the foundations of mathematics. OK. > So every mathematician encounters this stuff in some way. I doubt that. First, not every mathematician cares all that much about foundations. If you're using differential equations in mathematical biology, how much do you actually care about foundations? And second, even if you do care about foundations, HoTT isn't the only possible foundation, nor is it the most common one. You could care about foundations and base those foundations on ZFC without giving a rip about HoTT. So... I don't buy it. (Unless by "encounters in some way" you mean "hears it in hallway conversations" or "skims journal articles about it now and then".)
- chobytes 5y agoCT is almost designed to just wrap up "ugly" details in cute proofs after the fact. I think theres a real danger of students getting a false sense of understanding if they dont know how to contextualize this kind of stuff.