Readit News logoReadit News
benrbray · 4 years 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.

dwohnitmok · 4 years ago
I 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.

benrbray · 4 years ago
I don't mean to say that category should be the primary focus of the undergraduate curriculum, just that professors shouldn't shy away from using a bit of category theory to elucidate the connections between different subfields of mathematics. Nothing wrong with spending fifteen minutes here and there explaining how something fits into the categorical framework. It's also very useful for identifying what the "meat" of a topic is--which theorems depend only on the categorical structure, and which theorems require deeper insight? This is a useful skill to have.

My main complaint about the math program I attended is that all of my courses felt disjoint -- they could be taken in any order, so we basically had to start over from scratch every semester, rather than allowing the material to compound over four years. I wish course selection had been more rigid.

As for teaching functional programming -- I agree with you learning category theory is not necessary for learning Haskell. But, learning Haskell is an incredibly useful and tangible way of exploring the basic ideas of category theory / type theory. I think it would be a natural addition to any math program, and the earlier students learn it the more mileage they'll get out of it. Most math programs are sorely missing a bit of computer science, anyway.

joppy · 4 years ago
I agree, as a computer science and maths undergrad, the first rewarding part of category theory was in algebraic topology where we first saw examples of very nontrivial functors (fundamental group, and homology). Up until that point, category theory seemed like a pointlessly abstract way of stating obvious facts.

Even now as a research mathematician, category theory is a good tool for guiding to the “correct” definitions of things, but virtually all the work after that is “category-less” in that it is completely and utterly specialised into the problem domain.

Category theory is still a fantastic way of organising information, stating things like universal properties, and also sometimes making “abstract nonsense” arguments (which often guide you towards some nontrivial observation in a particular category). But it is certainly not the panacea that some make it out to be.

Iceland_jack · 4 years ago
> Without having already done the classes you did, it would be very difficult to motivate category theory

The usual approach of teaching category theory is motivated where examples motivate the categorical gadgets, I think the unmotivated alternative (to create intuition for category theory as a formalist game) has not been explored

zozbot234 · 4 years 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.

thatmathguy · 4 years ago
I 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 · 4 years ago
They 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.

benrbray · 4 years ago
As I mentioned elsewhere, my biggest complaint about my undergrad math education is that the topics felt entirely disjoint. We could take courses in any order, and it effectively felt like we started over from scratch each semester, rather than allowing the material to compound over four years. If courses are offered in a more rigid order, I think that the gradual introduction of categorical language could go a long way. It does not need to be emphasized, but it should not be neglected.

Textbook authors let some categorical language slip through so the time, and I think eductors are doing students a disservice my neglecting it. For instance, I was utterly confused about the "natural" isomorphism between a vector space and its double dual, as well as the "universal property" of tensor products, free modules, etc.. I also saw commutative diagrams in my complex analysis and topology books, but no one bothered to explain where they come from or what the rules are. Much later I finally took the time to study category theory on my own, and I can't help but think the whole experience would have been much more efficient had my professors exposed us to the idea of working with abstract morphisms much earlier.

red_trumpet · 4 years 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 · 4 years 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.
rackjack · 4 years ago
Are 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

Which seems to avoid being very "mathy" right out of the gate, though I can't tell its quality.

ABS · 4 years ago
MIT's 18.S097: Programming with Categories with Brendan Fong, Bartosz Milewski and David Spivak is great: http://brendanfong.com/programmingcats.html

All lectures from the course are in this playlist: 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

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

hkopp · 4 years ago
I 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

envp · 4 years ago
Definitely recommend CTFP: (Category Theory For Programmers)

https://bartoszmilewski.com/2014/10/28/category-theory-for-p...

AnthonBerg · 4 years ago
Seconding 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

Archive.org seems to have it for download: https://archive.org/details/cattheory

(I prefer the printed copy myself, i.e. it has been worth having.)

Dead Comment

Someone · 4 years 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”

galaxyLogic · 4 years ago
Category 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.
nathias · 4 years ago
I 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 · 4 years ago
Why and how? I've been through ZFC course and I found it quite natural. Okay maybe not natural, but it quickly clicked.
jonsen · 4 years ago
From 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."

chobytes · 4 years ago
CT 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.

Dead Comment

echopurity · 4 years ago
All 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.

tromp · 4 years ago
The left picture called "compositions are associative and unital" makes more sense when you reverse the bottom two arrows so that g.f : A -> C and h : C -> D
pfortuny · 4 years ago
Well, of course if you start with a problem in Galois Theory (as the author of the OP does), it is very likely that Category Theory might enlighten you. In the end, it was built for those problems.

However, go and try to explain Bolzano's Theorem or the midpoint rule using that framework.

CraneWorm · 4 years ago
> for instance, there is a continuous deformation that would allow you to convert an unbaked doughnut

Donuts are not baked, they're fried.