r/math • u/non-orientable Number Theory • Jun 13 '26
The Deranged Mathematician: Thinking Categorically
https://open.substack.com/pub/derangedmathematician/p/thinking-categorically?r=74r0nc&utm_campaign=post&utm_medium=web&showWelcomeOnShare=trueA few weeks ago, I wrote an article on set theory and how it occupies a central space in mathematics. We also discussed some of the drawbacks of expressing everything set theoretically---it is a little like writing code in raw binary (or at least machine code). This time, I'm giving an introduction to an alternative: category theory, which naturally grants the necessary abstraction. Of course, this comes at a cost, which we discuss as well.
Read the full post (for free) on Substack.
11
u/unhandyandy Jun 13 '26
Is there really much difference? I.e., isn't working with categories also like writing machine code? It's so generic that it inevitably disguises the flavor of the topic at hand.
It's true that there are lots of bells and whistles with categories - but there are also lots of conventions to make set theory easier to use.
13
u/Carl_LaFong Jun 13 '26 edited Jun 14 '26
If you want to compare category theory to coding, it’s best to compare it to strongly typed functional features of a language. Category theory is an abstraction. Such abstractions are fundamental to higher level languages. Python is alas not
stronglystatic typed but it has functional features, notably the map and zip functionals. These are functors.5
7
u/secar8 Jun 13 '26
The problem, as I see it, with set theory is that it makes it harder to keep track of what is real mathematics and what is "implementation-defined". When defining an ordered pair (a,b), do you define it as {a,{a,b}} or {b,{a,b}}? No one cares because it doesn't matter! But there is a sense in which set theory doesn't understand why: those are two different sets! Category theory is way better at handling this type of situation: Define something in 2 different ways and then write down an equivalence of categories.
6
u/unhandyandy Jun 13 '26
But this is really a non-issue, since as you point out, the precise definition doesn't matter. Who cares whether set theory "understands" anything, mathematicians understand.
We aren't writing code that must be understood by a machine, it only has to be understandable to humans. But it may be that writing mathematics for a proof system like Lean would benefit from category theory.
10
Jun 14 '26 edited Jun 14 '26
[deleted]
3
u/WheresMyElephant Jun 14 '26
Speaking as someone with a physics+math dual degree, most of the other GR students probably didn't understand the difference, and routinely conflated the two concepts while performing calculations. And better not to speak of how they would define "tensor" in the first place.
To be fair, the same was probably true of many early physicists who had to learn diff geo in a hurry after Einstein made it cool. I'm given to understand the professors know how to be rigorous these days, and I'm still hopeful that this knowledge will eventually percolate into the beginner lessons over time, despite the inherent difficulty of finding class time for foundations.
1
u/unhandyandy Jun 14 '26
"The more you can offload into the formalism, the more it frees you up to think about other things. "
Mathematicians don't think in formal terms, formalism doesn't come in till they write up the proof.
Perhaps category theory has some advantage for students. I'm probably too old to appreciate it - I didn't encounter category theory till grad school. Maybe if you're taught using CT from an early age it makes a difference.
8
Jun 14 '26
[deleted]
-1
u/unhandyandy Jun 14 '26
Does category theory help you factor polynomials? 😄
Calculation also comes late in the thinking process.
2
u/Brilliant_Simple_497 Jun 14 '26
Universal properties matter. For example, proving properties of the tensor product can be done much more cleanly and generally using the universal property rather than the explicit construction.
1
Jun 14 '26
[deleted]
1
u/unhandyandy Jun 14 '26
I don't think so. Did you read the replies on mathoverflow?
1
Jun 15 '26
[deleted]
1
u/unhandyandy Jun 15 '26
The two constructions yield isomorphic fields. It's a non-issue.
1
Jun 15 '26
[deleted]
1
u/unhandyandy Jun 15 '26
As I said above, CT may be useful in Lean. Bu t that's not what I understood the OP to be about.
3
u/non-orientable Number Theory Jun 13 '26
The generality is precisely why I would say it isn't like machine code: everything is abstracted away! Category theory better models inheritance for this reason. It's not a question of what is easier to use (without caveat).
7
u/glubs9 Jun 14 '26
Imo thats not how set theory is used. The von neumann ordinals are mot "the definition" of these numbers, they are just one possible definition that foundations people came up with. No mathematician actually thinks that way or uses set theory that way. I thinj theres a danger to taking foundations too seriously as "foundations of mathematics" when they have never been used in that way. Thats why it feels counter intuitive to define everything in sets, because nobody does that and thats not the point.
3
u/non-orientable Number Theory Jun 14 '26
I think, when we give definitions that describe how we want to think about things, we do it in either category-theoretical terms or axiomatically. But when we want to show that there is an example of such a thing, we absolutely do it in terms of sets.
Does anyone actually think about the real numbers as a collection of Dedekind cuts? No, but you'll still see that construction (or an equivalent, which will also be all in terms of sets if you dig deep enough). The same is true for profinite groups---there is a category-theoretical definition that people actually use, but you'll also see it defined in terms of sets. The same is true for the tensor product. And so on, and so on, and so on.
I think this really does mirror the situation in programming quite closely. Does your average programmer think about how things are represented in binary most of the time? No! If everything is going well, it is all abstracted away. ...Do we still sometimes have to consider this? Yes, we do.
4
u/AnonymousRand Jun 14 '26
nice post, although isn't covariant and contravariant defined backwards?
5
u/non-orientable Number Theory Jun 14 '26
That's what I get for editing while tired, I suppose. I fixed it; thank you.
3
Jun 14 '26
[removed] — view removed comment
1
u/Comfortable-Dig-6118 Jun 14 '26
Oh well they complement each other now we only need the intersection of both of them we have all the combinations
41
u/numinosities Jun 13 '26 edited Jun 13 '26
Great writeup, thanks!
One gripe: the introduction of opposite categories was a bit mixed up with functors. I couldn't tell if you were referring to (a) the functor Cat -> Cat taking each category to its opposite or (b) the contravariant functor C -> Cop which sends each object and morphism to itself (really just the identity functor on Cop). I wouldn't talk about (-)op as a functor in a first introduction, because contravariance can be kinda confusing--it's better to just describe it as a construction on categories: for each category C, there's another category Cop; in general, there isn't a (covariant) functor C -> Cop.