7 ms·
From Sets to Categories (2023)
- sesm 2y agoIs there any Category Theory tutorial that illustates that we need this apparatus to solve some real problem? For example, for Group Theory there is an excellent book 'Abel's theorem in problems and solutions' that does exactly that.
- gremgoth 2y agoModern algebraic topology, especially homological algebra, more or less requires category theory... intro textbooks such as Rotman's will contain primers on category theory for this reason.
- sesm 2y agoThat sounds good, but what's the easiest to state mathematical problem that requires Category Theory apparatus for the solution?
- gremgoth 2y agoPutting topology aside, and recognizing that 'ease' is subjective, imo Moggi's use of monads to model the denotational semantics of I/O in lazy functional languages such as Haskell is a common textbook example; the creators of Haskell had tried many solutions that did not work in practice before monads cracked it open. Even now this solution is more widely adopted than the alternatives (streaming I/O, linear I/O types, etc) and Moggi's paper remains a classic.
- deleted 2y ago[deleted]
- will-burner 2y agoI'd say Grothendieck's proofs of the Weil Conjectures is a good example. His proof uses etale cohomology and the definition of etale cohomoly uses Category Theory in a fundamental way. From the etale cohomoly wikipedia page https://en.wikipedia.org/wiki/%C3%89tale_cohomology https://en.wikipedia.org/wiki/%C3%89tale_cohomology "For any scheme X the category Et(X) is the category of all étale morphisms from a scheme to X. It is an analogue of the category of open subsets of a topological space, and its objects can be thought of informally as "étale open subsets" of X. The intersection of two open sets of a topological space corresponds to the pullback of two étale maps to X. There is a rather minor set-theoretical problem here, since Et(X) is a "large" category: its objects do not form a set." There's a lot of advanced math in that paragraph, but it should be clear that Category Theory is needed to define etale cohomology.
- sesm 2y agoThanks again! It will take some time for me to digest, but at least now I know in which direction to look.
- isotypic 2y agoOne application I like is the use of the Seifert-van Kampen theorem to prove that the fundamental group of the circle (S^1) is isomorphic to Z. While category theory is not strictly needed to prove this (you can compute pi_1(S^1) using R as a cover in a way that is purely topological, see Hatcher "Algebraic Topology"), if one states the Seifert-van Kampen theorem for groupoids (this uses category theory through the notion of a universal property/pushout) one can compute pi_1(S^1) largely algebraically just from the universal property - in fact you can go through the whole proof without mentioning a homotopy once (see tom Dieck "Algebraic Topology" section 2.7). This might not meet your criterion exactly, as one can extract a more topological proof and relegate the category theory to a non-essential role, but this requires some more effort and is a harder proof. So I do think it still illustrates that the category theoretic approach does add something beyond just a common language.
- sesm 2y agoAs far as I understand, fundamental groups were defined by Poincare in 1895. And functors in category theory are a generalisation of this idea (i.e. proving something for fundamental groups and then relating this back to topological spaces). So your example sounds backwards to me.
- manvillej 2y agofunctional programming seems to rely on it. https://en.wikipedia.org/wiki/Category_theory https://en.wikipedia.org/wiki/Category_theory
- will-burner 2y agoIt's annoying that you need so much math to understand the utility of Category Theory. I learned a bunch of Category Theory before I ever saw it used in a useful way. Grothendieck wrote modern Algebraic Geometry in the language of Category Theory. This is the first time I saw Category Theory really used in a useful way. Grothendieck's proofs of the Weil conjectures I would say is a good example of using Category Theory to solve a famous problem. Category Theory is used to define and work with etale cohomology and etale cohomology plays a fundamental role in Grothendieck's proofs of the Weil conjectures. https://en.wikipedia.org/wiki/Weil_conjectures https://en.wikipedia.org/wiki/Weil_conjectures
- sesm 2y agoThanks, this looks very interesting!
- hughesjj 2y agoTragically (for pure mathematicians), there are some real world use cases. Last years SoME3 has this entrant https://youtu.be/Njx2ed8RGis?si=-Q0TwT8LKmTC9o0R https://youtu.be/Njx2ed8RGis?si=-Q0TwT8LKmTC9o0R Also Oliver lugg has a hilarious overview of the topic https://youtu.be/yAi3XWCBkDo?si=b5MFcnfMrYyrv_Xd https://youtu.be/yAi3XWCBkDo?si=b5MFcnfMrYyrv_Xd
- red_trumpet 2y ago> Last years SoME3 has this entrant https://youtu.be/Njx2ed8RGis?si=-Q0TwT8LKmTC9o0R https://youtu.be/Njx2ed8RGis?si=-Q0TwT8LKmTC9o0R That's not an application of category theory. The important theorem here is that the fundamental group is a functor, plus computations of the fundamental group of the disc and the circle. But that's a theorem from topology, not a theorem from category theory. Category theory is merely used as a language, to give the proof a structure. By that I don't want to say category theory is useless. But regarding the video it's neither necessary, nor an application of category theory.
- Nesco 2y ago> “There real use-cases” > Proceed to link to a non-constructive proof Why are mathematicians like this?
- nihzm 2y agoAlthough not explicitly stated this application [1] of codesign for engineerring problems is actually built using category theory [1]: https://arxiv.org/abs/1512.08055 https://arxiv.org/abs/1512.08055
- GrantMoyer 2y agoI found the series of Category Theory lectures by Bartosz Milewski[1] extremely helpful and approachable. It indroduces the abstract concepts of category theory while giving concrete examples of those concepts and tying some key concepts back to properties of types in programming languages. [1]: https://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_ https://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI...
- js8 2y ago> that illustates that we need this apparatus to solve some real problem? I think your question is wrong in a sense. Category theory is one of several languagues of mathematics, and there are analogies between them. It's kinda like asking "is there a computer program that requires to be written in C?" So I think there is an element of taste whether you prefer category theory to some other (logical) language. That being said, just like in programming, it's still useful to know more than one language, because they potentially have different strengths.
- sesm 2y agoHard disagree. Group theory, for example, is not just another language, but is absolutely necessary for proving Abel's theorem. So the question was: Group theory -> Abel's theorem Category theory -> ??? (below I got the answer 'Weil conjectures')
- mrkeen 2y agoI haven't dug far into CT. I'm slowly making my way through Modern Foundations of Mathematics (Richard Southwell) [1] that was posted here recently. That said, two comments: 1) The definition of a category is just objects, arrows, and composition. If you're looking for more features, you might be disappointed. (If you've grown up with 'methods' rather than arrows, then you don't necessarily have composition.) Writing your logic with objects and arrows is just damn pleasant. If I have bytes, and an arrow from bytes to JSON, then I have JSON. If I have also have an arrow from JSON to a particular entry in the JSON, then by the property of composition, I have an arrow from bytes to that entry in the JSON. 2) The various CT structures are re-used over and over and over again, in wildly different contexts. I just read about 'logict' on another post. If you follow the link [2] and look under the 'Instances' heading, you can see it implements the usual CT suspects: Functor, Applicative, Monad, Monoid, etc. So I already know how to drive this unfamiliar technology. A few days ago I read about 'Omega' on yet another post - same deal [3]. What else? Parsers [4], Streaming IO [5], Generators in property-based-testing [6], Effect systems [7] (yet another thing I saw just the other day on another post), ACID-transactions [8] (if in-memory transactions can count as 'Durable'. You don't get stale reads in any case). They're also widespread in other languages: Famously LINQ in C#. Java 8 Streams, Optionals, CompletableFutures, RX/Observables. However these are more monad-like or monad-inspired rather than literally implementing the Monad interface. So you still understand them and know how to drive them even if you don't know all the implementation details. However what's lacking (compared to Haskell) is the library code targeting monads. For example, I am always lacking something in Java Futures which should be right there: an arrow I can use to get from List<Future<T>> to Future<List<T>>. In Haskell that code ('sequence') would belong to List (in this case 'Traversable' [9]), not Future, as it can target any Monad. This saves on an n*m implementation problem: i.e. List and logict don't need to know about each other, vector and Omega don't need to know about each other, etc. [1] https://www.youtube.com/playlist?list=PLCTMeyjMKRkqTM2-9HXH81tvpdROs-nz3 [2] https://hackage.haskell.org/package/logict-0.8.1.0/docs/Control-Monad-Logic.html#g:2 [3] https://hackage.haskell.org/package/control-monad-omega-0.3.2/docs/Control-Monad-Omega.html [4] https://hackage.haskell.org/package/parsec-3.1.17.0/docs/Text-Parsec.html#t:ParsecT [5] https://hackage.haskell.org/package/conduit-1.3.5/docs/Data-Conduit.html#g:1 [6] https://hackage.haskell.org/package/QuickCheck-2.15.0.1/docs/Test-QuickCheck-Gen.html#g:1 [7] https://hackage.haskell.org/package/bluefin-0.0.6.1/docs/Bluefin-Eff.html#g:1 [8] https://hackage.haskell.org/package/stm-2.5.3.1/docs/Control-Monad-STM.html [9] https://hackage.haskell.org/package/base-4.20.0.1/docs/Data-Traversable.html#t:Traversable
- kidintech 2y agoWhy does every category theory primer use this exact formulation: (.*) is just an [arrow|object] in the category of (.*)` Every undergrad course, office hour, research paper, and manual that I've ever seen spams it.
- GrantMoyer 2y agoAs I understand it, it's a bit of an inside joke to minimize the complexity of mathematical structure. It's frequent use is along the same lines as the frequent use of "* Considered Harmful" in CS.
- cryptonector 2y agoBecause arrows are functions/mappings, and everything we do in programming involves arrows, even in languages where arrows aren't used as notation. The common formulation is that a "monad is just a monoid in the category of endofunctors", which is not saying much but with big words, and the joke lies in understanding what it's saying. Bartosz Milewski has a lecture video series on youtube that's all about explaining that joke, and I highly recommend it because it's actually a wonderful CS lecture series.
- xelxebar 2y agoIt has struck me for a while that associativity can be seen as a higher-order commutativity. Specifically, for the real numbers, it's associativity just says that you can commute the order in which you evaluate the multiplication map. To make that more explicit, consider the space of left-multiplication maps Lr(x) = rx for real numbers r and x. Similarly, for right-multiplication maps Rr(x) = xr. Then the associative rule a(xc) = (ax)c can be re-written La∘Rc(x) = Rc∘La(x), which is precisely a commutativity relation. The above obviously generalizes to arbitrary Abelian groups, but I'm curious if there's more depth to this idea of associativity as "higher-order commutativity" than just what I've said here.
- 082349872349872 2y agoSee also https://www.cs.utexas.edu/~EWD/ewd11xx/EWD1142.PDF https://www.cs.utexas.edu/~EWD/ewd11xx/EWD1142.PDF (which ties in distributivity)
- xelxebar 2y agoCool. A Dijkstra note. Thanks for sharing. The distributivity argument is a bit sketchy, though. It defines g.p := p▫q, meaning that g implicitly depends on q, but then writes f(y▫z) = f(g.y) and fy▫fz = g.f(y), where in the first instance g.x = x▫y and in the second g.x = x▫fz. That said, I do see the point. The distributive rule let's us commute the order in which we compute addition and multiplication. Generally, I guess if we have some family of arrows A and B, where all commutative diagrams Bx∘Ay = Az∘Bw hold, then we can say "A and B commute". This can probably be expressed as some literal commutativity using natural transformations, but I'll need to think on it some more. Thanks for the prod!
- mathgenius 2y agoThis is likely the same as a distributive law of monads... https://ncatlab.org/nlab/show/distributive+law https://ncatlab.org/nlab/show/distributive+law on good days i might understand this stuff.. Another less high-brow connection: associativity of matrix multiplication relies on the usual distributivity law..
- khazhoux 2y agoI spent many hours many years ago studying CT and I was left very frustrated. Endless definitions without any meaningful results or insights. My (admittedly cartoonish) takeaway from Category Theory was: "We can think of all math as consisting of things and relationships between things!" Like, ok? It seems to appeal to computer science folks who want to level up their math chops, enjoy an exclusive "boutique" branch, and long for grand unification schemes. But IMHO it simply doesn't deliver. It's a whole lotta talk to say nothing. I always compare with abstract algebra, where you start with a basic definition of groups and within a few pages you reach Lagrange's Theorem and now you understand something amazing about primes and sets, and you can keep squeezing and twisting the basic definitions for ever-more complex and brain-punishing results.
- TwentyPosts 2y agoHow much of a background do your have in abstract algebra? I don't think category theory makes much sense or is very satisfying unless you can already list a bunch of categories you interact with regularly, and have results which can be expressed in terms of categories.
- khazhoux 2y agoI'm fairly well-versed in AA, linear alg, topology, a few others. I got zero satisfaction from CT. What would be the first interesting (if even mildly insightful) result in CT? I'll pull out my books and take a look...
- cryptonector 2y agoSee my other reply. It makes some things way easier in real-world programs (and libraries).
- xanderlewis 2y agoIf you’re looking for ‘something you can only prove using category theory’, you’ll probably not be able to find much. If you’re looking for ‘something commonly proven using category theory, whose proof without invoking such theory is much less elegant and general’, you’ll find plenty in any area of mathematics that uses category theory. There’s a whole section of Emily Riehl’s book Category Theory In Context on ‘theorems in category theory’ (since it’s famously said that there are none — you’re certainly not the first to level such an accusation!).
- Xcelerate 2y agoAs a non-mathematician, I'm confused how category theory relates back to formal systems. Is it its own formal system, or is it built on top of ZFC or type theory? If it's built on top of something else, what sort of algorithm would tell me whether the DAG that constitutes a proof from a set of axioms to a theorem involves category theory or not?
- Chinjut 2y agoThe answers to these questions are exactly the same as for group theory or graph theory or linear algebra or any other such thing.
- keithalewis 2y agoA semigroup is a set M and a function m: M x M -> M that is associative, m(a,m(b,c)) = m(m(a,b),c). Writing ab for m(a, b) this can be written a(bc) = (ab)c. A monoid is a semigroup with an identity e satisfying em = m = me for every m in M. This can be used for map-reduce and pivot tables. A (small) category is a partial monoid. The domain of m is the set of composable arrows.