Live data from Hacker News

Getting Started with Category Theory

ryanbrewer.dev

11–20 of 36 posts

Re: Getting Started with Category Theory

#11
post #7

Earlier quoted context omitted.

I wouldn't have described graph theory that way. But category theory seeks to formalise and generalise mathematics itself. Another popular branch of mathematics that does this is set theory, which you may have been thinking of rather than graph theory. Set theory is generally taught before category theory at universities. "Simpler" is very subjective, but set theory is often seen as more intuitive because some of the…

I'm not an expert so I write this comment to ask for help. Do you know if there is any relationship between category theory or set theory? I mean is it like category theory is a more general concept and set theory emerges as a specific case of the more general category theory. I know sets well because well that's what I was taught in school. I'm just trying to understand where set theory fits in category theory or if…

Category theory and set theory are deeply interconnected, as both are foundational areas of mathematics but with different focuses. Set theory studies collections of elements and their relationships, serving as the groundwork for much of mathematics, while category theory abstracts and generalizes these ideas to focus on structures and their relationships.

One key connection is that the category of sets, called "Set," is a fundamental example in category theory. Its objects are sets, and its morphisms are functions between them. This shows how set theory can be seen as a special case of category theory. At the same time, many categories studied in category theory have underlying set structures. For example, groups, rings, or vector spaces are often built on sets with additional structure.

Another connection lies in how category theory generalizes set-theoretic ideas. Concepts like products, coproducts, limits, and colimits in category theory extend the familiar notions of Cartesian products or unions in set theory. The Yoneda Lemma, a cornerstone of category theory, relies heavily on set-theoretic intuition, as it connects abstract categorical concepts to concrete representations in terms of sets.

Topoi, a concept in category theory, also bridge the two fields. A topos generalizes set theory by providing a categorical framework that behaves like the category of sets but with additional logical structure. This allows set-theoretic reasoning to be carried out in a more abstract setting. For instance, the category of sets itself is the prototypical example of a topos.

However, there are also differences. Set theory often grapples with "size" issues, such as distinguishing between sets and proper classes. In category theory, similar concerns arise, especially with large categories, like the category of all sets, which cannot itself be a set. Set-theoretic tools are often used to handle these size issues by defining notions like small and large categories.

And there’s a philosophical aspect. Set theory forms the traditional foundation of mathematics with its ZFC axioms, focusing on elements and collections. Category theory offers an alternative foundation by emphasizing relationships and structures, often referred to as "structural mathematics." These perspectives aren’t in opposition but rather complementary, with each offering tools to understand mathematics from different angles.

In essence, category theory builds on and extends set theory while also relying on it for foundational concepts. The two fields are tightly intertwined, with set theory providing a concrete framework and category theory offering an abstract, flexible way to study and generalize mathematical structures.

Re: Getting Started with Category Theory

#12
post #2

Venting: I'm so tired of this. I've countless times learned that something something monoid of endofunctors. And yet, I've never been able to make that knowlwdge more useful than "do a flatMap here". Not looking for solutions. Ok with emotional support.

[dead]

Re: Getting Started with Category Theory

#13
post #7
post #6

Isn't that one of the basis of maths? Namely you choose graph theory or category theory and you can rebuilt the whole maths? If yes, which one is the "simpler", category or graph?

I wouldn't have described graph theory that way. But category theory seeks to formalise and generalise mathematics itself. Another popular branch of mathematics that does this is set theory, which you may have been thinking of rather than graph theory. Set theory is generally taught before category theory at universities. "Simpler" is very subjective, but set theory is often seen as more intuitive because some of the…

I always find it a bit weird, when people compare set theory to category theory like this. When talking about set theory as a foundation for mathematics, I always think of Zermelo-Fraenkel[1] set theory (possibly with Choice), which is an axiomatic system, from which you can build a lot of maths (at some point one might want to introduce universes[2], but whatever). I'm not aware of a similar axiomatic system using category theory, are you?

[1] https://en.wikipedia.org/wiki/Zermelo%E2%80%93Fraenkel_set_t... [2] https://en.wikipedia.org/wiki/Grothendieck_universe

Re: Getting Started with Category Theory

#14
post #2

Venting: I'm so tired of this. I've countless times learned that something something monoid of endofunctors. And yet, I've never been able to make that knowlwdge more useful than "do a flatMap here". Not looking for solutions. Ok with emotional support.

I love category theory, but I think there's a secret category of "high effort programming things" that programmers who have done them love to say that "Everyone should do x because it will make them a better programmer". Here's the kind of things I'm thinking of: - Learn category theory - Build an interpretter/compiler - Develop your own programming language - Learn about and built distributed systems - Learn to writ…

Every other item in your list is actually used to produce technology except one.

Compilers? Used to produce executables form source code.

Programming language? Allows us to write code using higher abstraction.

Distributed systems? Allows us to build systems across multiple machines, users, continents, etc.

GPU? Allows us to speed up heavily parallel code for graphics and scientific applications.

Assembly? Allows us to write closer to the hardware.

CPU architecture? Allows us to understand what our code runs on.

If anything, this list shows how category theory is not like the other things programmers could spend time on. If the goal is “learn a bunch of math to expand your math skill”, then maybe category theory makes sense. If the goal is to become a better programmer then I think there are better uses of time.

Re: Getting Started with Category Theory

#15
post #2

Venting: I'm so tired of this. I've countless times learned that something something monoid of endofunctors. And yet, I've never been able to make that knowlwdge more useful than "do a flatMap here". Not looking for solutions. Ok with emotional support.

I read a book on category theory that described how to model databases using category theory.

My conclusion was that the goal was not to provide insight into databases but rather into category theory, which seemed backwards to me.

Instead I picked up some books on the relational algebra/logic for databases, and those books were actually useful — you could show that some set of transformations would be mathematically identical.

At some point, too high level of abstraction is not useful. For category theory, it seemed that the point was to show how all these different things were “similar” but in a way that didn’t allow you to do anything with it.

Re: Getting Started with Category Theory

#16
post #7
post #6

Isn't that one of the basis of maths? Namely you choose graph theory or category theory and you can rebuilt the whole maths? If yes, which one is the "simpler", category or graph?

I wouldn't have described graph theory that way. But category theory seeks to formalise and generalise mathematics itself. Another popular branch of mathematics that does this is set theory, which you may have been thinking of rather than graph theory. Set theory is generally taught before category theory at universities. "Simpler" is very subjective, but set theory is often seen as more intuitive because some of the…

Set theory is basically a study of the formation of single sets of objects and the study of various infinities. Typically mathematical objects are sets with operations on them so set theory is useful for understanding them, but the vast majority of set theory is not necessary for the rest of mathematics.

Category theory is the study of collections of mathematical of a give type. The category of groups, the category of sets, the category of vector spaces. The key facet of category theory is that you can have "functions" (called functors) between categories and the power of category theory is the study of these functors. I put "functions" in parentheses because most categories are not sets in the set-theoretic sense because they do not have a well-defined cardinality. Of course, some categories called "small categories" are sets.

Re: Getting Started with Category Theory

#17
post #2

Venting: I'm so tired of this. I've countless times learned that something something monoid of endofunctors. And yet, I've never been able to make that knowlwdge more useful than "do a flatMap here". Not looking for solutions. Ok with emotional support.

I'm a PhD in math. I love category theory and it's very useful for studying abstract algebra at the research mathematics level because it clarifies concepts and even provides algorithmic ways for computation at that level (e.g. adjoint functors and cotriples to compute homology). But to be honest, except for computer science researchers, I would not recommend it to programmers. I am also a programmer (at least a part-time one sometimes, and previously full-time), and I can say with absolute confidence that a deep understanding of category theory is 100% useless for programming.

Again, with a few exceptions, but if you are one of these exceptions, you will already know it.

Re: Getting Started with Category Theory

#19
post #7

Earlier quoted context omitted.

I wouldn't have described graph theory that way. But category theory seeks to formalise and generalise mathematics itself. Another popular branch of mathematics that does this is set theory, which you may have been thinking of rather than graph theory. Set theory is generally taught before category theory at universities. "Simpler" is very subjective, but set theory is often seen as more intuitive because some of the…

I always find it a bit weird, when people compare set theory to category theory like this. When talking about set theory as a foundation for mathematics, I always think of Zermelo-Fraenkel[1] set theory (possibly with Choice), which is an axiomatic system, from which you can build a lot of maths (at some point one might want to introduce universes[2], but whatever). I'm not aware of a similar axiomatic system using c…

Yeah, I deliberately avoided using the word "foundation" as I wasn't too confident about that. But I believe it makes sense to say that category theory and set theory both seek to formalise and generalise much of mathematics? Even if the first is more of a sort of framework than a foundation.

Re: Getting Started with Category Theory

#20
post #2

Venting: I'm so tired of this. I've countless times learned that something something monoid of endofunctors. And yet, I've never been able to make that knowlwdge more useful than "do a flatMap here". Not looking for solutions. Ok with emotional support.

[deleted]
Post reply on HN