Category theory can be very useful, but you don’t use it the same way you use other kinds of math. You can apply optimization theory, for example, by noticing that a problem has a certain form, and therefore a certain algorithm will converge to a solution. Applications of category theory are usually more subtle. You’re not likely to quote some theorem from category theory that finishes off a problem the way the selecting an optimization algorithm does.
and
I had been skeptical of applications of category theory, and to some extent I still am. Many reported applications of category theory aren’t that applied, and they’re not so much applications as post hoc glosses.
At the same time, I’ve seen real applications of categories, such as the design of LINQ mentioned above. I’ve been a part of projects where we used category theory to guide mathematical modeling and software development. Category theory can spot inconsistencies and errors similar to the way dimensional analysis does in engineering, or type checking in software development. It can help you ask the right questions. It can guide you to including the right things, and leaving the right things out.
I disagree with the "merely" here. Half of mathematical practice seems to be finding the right way to think about a thing. If the author were claiming this was a new grand theory, I'd be right there with you, but they seem to be claiming that it's just another way to look at things. I don't see any claims of importance. There's always room for new viewpoints that are content-wise equivalent to old viewpoints but different in how you work with, interpret, and think about them.
> ...but end up just rehashing standard mathematics in opaque ways.
I'd say it's rehashing standard mathematics in strange interesting ways, making it a very fitting curiosity for a site where things like a history of methods of communicating with submarines gets a ton of upvotes.
It's a bit surprising to realist that it seems like we completely agree on what it is and what its contribution to existing standard material is, but for some reason I think it's interesting while you "wish it would stop."
(source: I was a postgrad supervised by Pawel)
My impression is that it ends up being largely some kind of linguistic translation project, or abstraction for the sake of abstraction, but I'm happy to be corrected on this point.
As for whether anyone outside the research programme is actually doing that, I don't know. But in principle it's a useful formal methods type theory.
The series is intended for a general audience and starts by laying the groundwork necessary for exposition of this paper: [1]. Article 4 [2] explains why it is introduced this way.
> end up just rehashing standard mathematics in opaque ways
It's just an explanation of string diagrams [3][4], pretty transparent and standard.
I find it funny that your response to this is so similar to that of the abacists to Fibonacci.[5]
[1]. https://arxiv.org/abs/1403.7048
[2]. https://graphicallinearalgebra.net/2015/04/29/dumbing-down-m...
[3]. https://ncatlab.org/nlab/show/string+diagram
[4]. https://en.wikipedia.org/wiki/String_diagram
[5]. https://graphicallinearalgebra.net/2015/04/26/adding-part-1-...
More importantly, I would like to remark that string diagrams are not standard. The vast majority of mathematicians have never read the definition of a string diagram (or even a monoidal category), precisely because it is not standard and not needed for most (any?) useful mathematical work. They also have obvious disadvantages when compared to the usual notation, as I pointed out earlier.
When I read articles by category theory boosters, I get the sense (rightly or wrongly) that they think the world revolves around them and they have stumbled onto some deep and fundamental truths. This is not the case. It's a niche of a niche.
I'm sorry that you didn't find it well-written -- it wasn't written with you in mind. Originally I wanted to write about my research in a way that was understandable to a lay person, but I quickly abandoned that and went for the mythical "second year undergrad" level.
You have pretty strong thoughts about what is "useful mathematical work". Are you the high priest and decider of the usefulness of mathematics? To be honest, it almost sounds like some category theorist was super mean to you...
One more thing. Arguments like "niche of a niche" are sociological - just because something is niche doesn't mean it's not important (or, god forbid, fun!). Maths is one of the most conservative fields in this sense; what is and is not considered "standard" is extremely political.
Interesting and totally not ad hominem response... I believe Kevin Buzzard (an actual mathematician) had a few words about this last year: https://youtu.be/Dp-mQ3HxgDE?t=1039
In the context of that video, his comments about category theorists and type theorists make a lot of sense: type theory people and (perhaps to a more limited extent) category theory people tend to be more easily sold on using a proof assistant since the kind of mathematics they do translate more easily into current proof assistants than, say, analysis or topology.
I definitely do not think that Kevin Buzzard is suggesting that type theorists and category theorists are not doing interesting and/or useful work (after all, the proof assistant he is advocating for is based on type theory). At best, he is making a sociological observation that there is a gap between the type theory/category theory community and "mainstream" mathematicians making the widespread adoption of proof assistants in mathematics more difficult.
I find it interesting that actual mathematicians working in Category Theory, such as Tom Leinster (who wrote a lovely little introductory text on Category Theory [not covering monads though] and made it freely available on arXiv: https://arxiv.org/abs/1612.09375) are able to engage in polite discussion about the contentious viewpoints on the use of CT without resorting to personal attacks (see 2-3 minutes from his talk from a few years back: https://youtu.be/UoutGluNVlI?t=410) ... which stands in sharp contrast to some of the evangelists, whose attitude in response to criticism often reeks of arrogance and puts people off taking CT seriously, which I think is a great shame.
They're standard in category theory, which is what the series is about.
> precisely because it is not standard and not needed for most (any?) useful mathematical work.
Uh oh, you better let everyone using it know, especially all those pesky type theorists.
> When I read articles by category theory boosters, I get the sense (rightly or wrongly) that they think the world revolves around them and they have stumbled onto some deep and fundamental truths. This is not the case. It's a niche of a niche.
I think this says more about you than the series. You seem upset that a category theorist is presenting their work in the language of category theory and that people are interested in it. Nobody mentioned anything about utility, depth, fundamentality or generality. In fact, he refers to some of his work as "hard and useless." [1]
> There has been intense political pressure on the academy to stop working on hard and useless things over the last 30 years or so. The result is a new generation of academics who do easy and useful things, things that impact the economy in the 5-10 year scale, and which bring in research funding. This is by design, because research funding is closely tied to academic career progression. Unfortunately, it’s not very hard to disguise easy and useless things as easy and useful. This has resulted in a totally out-of-control epidemic of easy and useless research. A symptom of this disease is the ever expanding use of increasingly ridiculous buzzwords. Easy and useless never leads to hard and useful. I’d much rather the government invest my tax money in the hard and useless.
[1]. https://graphicallinearalgebra.net/2015/04/30/spoilers-addin...
(Professional mathematician here)
My sense, from talking to category theory boosters, is not typically that they regard category theory as "deep and fundamental truths". Rather, they often find it a useful way to declutter and describe their work, allowing them to more easily focus on deep truths without getting bogged down in details.
> Is category theory a useful organizational tool in certain abstract branches of mathematics?
Yes. Abstracting math in a very general way lets you explore patterns and a result in category theory (e.g. Yoneda lemma) generalizes immediately to other instances of categories.
> I also find any claims that category theory is relevant to the average working programmer to be dubious at best.
I would say there is value in knowing some category theory, especially if the programmer is working in a strongly-typed functional language. Knowing what a functor is, what a catamorphism is and so on, can be useful ways to write more declarative code and teach about abstractions in the same way OOP uses Design Patterns to teach programmers about reusuable code.
Also, I don't really see how learning the abstract definition of a functor is going to help someone write better OCaml programs. But it is possible I am just not imaginative enough. Do you have a concrete example of this?
Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h), so this means that if you were writing
map f (map g l)
you could write map (f . g) l
instead, (in Haskell the compiler optimizes it anyway) but if your compiler actually traversed the list twice, now it traverses the list once.I could list other things like how monoids, monads, etc. can help make programs more efficient (monoids allow exponentiation with squaring) or structure programs better (monads allow composition of partial/stateful/exceptional functions).
Monoids are very simple objects, and you don't need to use category theory to define them.
Monads might be a more meaty example. But I'm not sure if knowing CT makes it easier to use monads in a programming context.
Sure, monoids are trivial, because they are, but once you're in the categorical setting you can begin to talk about the category of monoids, monoid homomorphisms and so on.
This isn't to say that CT is the answer, but I'm pointing out that it provides a way to understand more complicated concepts.
Functors are trivial, but if you take their fixpoint you get ADTs. Monoids are trivial, but if you apply them to the category of endofunctor you derive monads, and so on.
That's kind of the point.
> "Perhaps the purpose of categorical algebra is to show that which is trivial is trivially trivial." That is, category theory aids in making the softer bits of mathematics look utterly natural and obvious, so that one can more easily isolate the harder nuggets and attack them with abandon ... This is a tremendous service that category theory provides"
https://mathoverflow.net/questions/28788/nontrivial-theorems...
In isolation applications of category theory to programming are going to be trivial, typically. Category theory gives a language and framework for extracting trivialities so one can "attack the harder nuggets" without distraction.
While I rarely find graphical methods useful for performing calculations, I do appreciate visual interpretations of how mathematical concepts work. I personally find that whenever I have to learn a new topic in math, good visualizations help me form an intuition regarding how things fit together, and can often be useful when reasoning about how to attack a problem (back-of-the-envelope sketch before a more rigorous calculation). For actually solving the problem, on paper or in code, I agree that a symbolic approach is superior.
I also think that purely linguistic improvements in math can have a positive effect: a mathematical notation that is easy to learn, understand, and use, will clearly make the math it represents more impactful. I can't find the exact quote at the moment, but I think it was Dirac who said something along the lines that "a good mathematical notation should make correct statements obvious and wrong statements impossible".
Incidentally, I partially agree with you on category theory, especially on computer science. In abstract maths, however, category theory has more significance than pure language. It can serve more or less like an algebraic tool. There are abstract mathematicians who see deeper meaning in it too.
One of the things that has made me very successful as a problem solver and software developer has been the ability to apply category theory abstractly to projects and work that comes in. IOW, Using category theory well in day-to-day software engineering isn't about which monad to pick, but which abstraction (or series of abstractions) are the best fit to a problem.
But this does need to be the case. Sometimes a graphical notation is a great help. For example, many tensor computations in differential geometry become straightforward using Penrose's graphical notation. Is that the case here? It is difficult to say, as the authors fail to present that notation separately to the results.
However, to me it reminds me of String Theory, in that it has been sold as Theory of Everything for Mathematics and adjacent fields.
Category Theory might even be somewhat useful for language designers, but, I agree that it offers little benefit for programmers even with languages like Haskell.
Even Bartosz said that Adjoints aren't that interesting in Haskell because every functor is an endofunctor.
Every functor (in the standard library) is an endofunctor, but is also a functor to a specific flavor of full subcategory in Hask. It might be useful to support other flavors of subcategory, and I think there's some ongoing work on this in the SubHask module.
That's pretty arrogant and rude. This is some mathematicians' PhDs and research, not a blog put in front of overpaid programmers to provide them with category-theory porn. Admittedly, the dumbed down language of the blog is misleading and makes it very hard to read.
https://dl.acm.org/doi/pdf/10.1145/3290338
https://www.sciencedirect.com/science/article/pii/S089054011...
Fabio Zanasi. 2015. Interacting Hopf Algebras: the theory of linear systems. Ph.D. Dissertation. Ecole Normale Supérieure de Lyon
(1) The human mind is pretty good at visual pattern recognition. For the same reason that people advocate for a big status monitor that every developer can see for your live service (since you can quickly spot anomalies your monitoring might miss) and for the same reason visualizing a data set is one of the first things you ought to do on your way to understanding it, creating a diagrammatic representation of linear algebra seems helpful for immediately getting a sense of where something feels "off" or for quickly grasping the intuition of a problem.
(2) The right notation (pictures in this case -- not that the idea I'm about to highlight couldn't be presented textually) can help highlight the portions of a problem that matter. Thinking about matrices as boxes of elements that you can individually manipulate is IMO actively harmful to understanding them and puts you in a situation where you miss the forest for the trees.
(2a) The matrix wiring diagram presented here naturally extends to higher order tensors, and for the life of me I can't find the source right now, but it was precisely that representation that made tensors click for me and gave me a foothold into other material about them.
(3) I think the current consensus is that multiple representations of a problem (via some mechanism -- call it "magic") are actively beneficial for learning a topic. From that point of view alone a diagrammatic representation doesn't seem especially bad.
(My spicier opinion is that the machinery of CT is often completely unnecessary for many applications, and actually only serves to obfuscate simple concepts.)
The most interesting part of category theory is topos theory, in my opinion. This is a generalisation of set theory, and can thus claim to be indeed useful for foundations.
> This submission is the latest in a trend of what I would classify as "math-lite" category theory and Haskell articles that reach the HN front page, which purport to explain something interesting but end up just rehashing standard mathematics in opaque ways.
This is, coincidentally, the ambition of APL.
Patience. These kind of work is not worth for verbal readers, but for visual learners and visual creators this is very educative. It's a work of visual learner and these kind of work will not stop.
> replace standard linear algebra notation with an alternative (but mathematically equivalent) graphical notation.
Yes. Modern computation is based on AI which is based on matrices which runs on GPU which does computation on graphical input. This work is a masterpiece for simple solutions for complicated computations.
This submission is the latest in a trend of what I would classify as "math-lite" category theory and Haskell articles that reach the HN front page, which purport to explain something interesting but end up just rehashing standard mathematics in opaque ways.
I really wish this would stop. Fortunately (unfortunately?) I've been down this road a few times and know to avoid getting sucked in, but I can easily see a bright, curious person wasting a lot of time before realizing that the content is merely linguistic, not mathematical.
Is (for example) category theory a useful organizational tool in certain abstract branches of mathematics? Sure (those branches being, basically, algebraic topology and algebraic geometry). Is it a grand unified theory of math? No, it's just some useful vocabulary. Most mathematicians go their entire lives without writing a paper mentioning categories. Getting excited about category theory is like getting excited about matrix notation – useful, sure, but not where the meat is.
I also find any claims that category theory is relevant to the average working programmer to be dubious at best.
(And yes, I realize the graphical notation presented in this article is not category theory. I am making a broader point about certain kinds of articles I see, which also applies here.)