8 ms·
Applied category theory in chemistry, computing, and social networks [pdf]
- whatshisface 4y agoIs it just me, or does "applied category theory" never use anything from category theory other than boxes being connected by arrows?
- jmt_ 4y agoI can see why you're saying that, but the use of commutative diagrams communicate the structure between the functions and objects of interest - it is this perspective which is core idea to category theory. So I'd argue that the diagrams are a result of communicating a category-theoretic model rather than the end-result itself, and therefore have much deeper meaning than just "boxes being connected by arrows".
- deleted 4y ago[deleted]
- larve 4y agoArrows and boxes is pretty much what category theory is about. You have objects connected by morphisms, and all further structure and concepts are derived from that.
- whatshisface 4y agoYeah, but you can only be said to be applying category theory if you use some of those structures or concepts.
- larve 4y agoI am asking myself that question regularly, as I'm trying to get more comfortable with "real" category theory. My background is programming, and I've become familiar with a lot of the applied CT (functors, monads, monoids, applicatives, ...). I think the point of category theory, especially applied category theory, is recognizing what can be further abstracted as an arrow and an object. This turns something that originally is complex and has no apparent structure into a simple dot and arrow, again. Then rinse and repeat. For example, you can take a for loop that applies a function to a list and then creates a new list. You can't "easily" add another for loop that then applies a second transformation. But if you recognize the functor from the category of types to the category of types, then you can formulate your 2 composed for loops as `list.map(f1 | f2)`, and everything is "trivial" arrows and objects again. Turn that into a function that returns a list, and you want to concatenate the result. "Annoying" to write, you have to flatten your list. Recognize the monad, back to a simple composition of two morphisms, even though the morphisms encapsulate a lot. Learning and applying CT I think is recognizing which things can be conceptualized as a morphism, which then magically makes things appear "simple." Yet it is only simple if you have done that recognition work, and more advanced concepts in CT are there to assist you.
- davidgay 4y ago> For example, you can take a for loop that applies a function to a list and then creates a new list. You can't "easily" add another for loop that then applies a second transformation. This is quite unconvincing. Easy solution 1: add a second loop which takes the first loop's output and transforms it with f2. Easy solution 2: realise you are doing one transform after another and replace out.add(f1(x)) with out.add(f2(f1(x)).
- larve 4y agoHow to derive solutions like solution 2 is what category theory helps me with. It sounds glaringly obvious in the cases where the abstraction is well understood Mapping on lists, on trees, on Maybe, on Result are all well known at this point, because most APIs offer it. Less obvious is the fact that this applies to say, a serial interface, sensor readings, futures. If you can then express the concept of a functor in the programming language itself, you can start writing code that only relies on the fact that something is a functor. And then pass it a list, a serial interface, futures, futures of serial interfaces, etc… For example, you could potentially find use in expressing your above code as: out = makeMapped(out, [f1, f2]) Now I can just pile 18 more functions defined in a config file without having to write it out. out = makeMapped(out, configFile.createFunctions()) I’m not saying you need category theory for this, the same way you don’t need algebra every time you add two numbers, but it makes it easier to see these patterns. I have trouble finding good “practical” examples, because you can use either functors, that every experienced programmer already knows intuitively so well that the concept is ingrained. If you bring up monads, people often react viscerally. In practice, I often just take the time to write out monads without even mentioning the word or concept, and refactor code so that it leverages that underlying structure, and that usually makes things become apparent. Monads are a really good structure to cut down on absurd complexity for anything dealing with state and concurrency, and turn it into an elegant problem.sequence(step1, step2, step3, step4) formulation.
- anonymousDan 4y agoHow does that differ from plain graph theory (sorry if a naive question)?
- larve 4y agoI think it’s not a naive question at all. To my naive understanding, categories need to have a composition property (if there is a morphism from a to b, and b to c, then there is a morphism a to c created by composing a to b and b to c), which allows to express “richer” structures than just directed graphs. Now, for the gory details, you better ask a mathematician :]
- Koshkin 4y agoThey are incorrect. While diagrams are indeed (a part of) the language of Category Theory, the theory is certainly not about the language.
- mdm12 4y agoNot a dumb question at all! The short answer is that a category also satisfies two rules: every object has an arrow to itself (identity) and if there are two arrows (a->b) and (b->c) there is an arrow (a->c) (associativity). Other abstractions such as functors (mappings between categories) are built upon this relatively simple foundation. You can also think about categories of categories (they can be considered an object, after all!), and so on and so forth. Some complain about the generality of Category Theory ('It is a theory about everything and nothing!'), but its generality makes it compelling for some for study.
- moralestapia 4y ago>other than boxes being connected by arrows Well, that's because that's basically it, lol. But I get your sentiment and, sure, there's a lot of things where this could be applied and that hasn't happened already. It's definitely a field with a prolific future, though. I've personally applied many ideas I got from there into my smallish ventures with good results.
- whatshisface 4y agoBut that's not "basically it," there are lots of high-flying theorems that make it an entire area of mathematics.
- moralestapia 4y agoWell, then I have no idea why you asked your previous question. ¯\_(ツ)_/¯
- whatshisface 4y agoBecause applied category theory stops at translating everything into boxes and arrows. There's no "applied Yoneda lemma."
- lgdw 4y agoIt's the actual process of translating everything into boxes and arrows that's the core of ACT.
- larve 4y agoI'm not sure that's true. This is a surface / introductory article, but if you go deeper into say, categorical databases, modeling of attacks (https://arxiv.org/pdf/2103.00044.pdf https://arxiv.org/pdf/2103.00044.pdf), there sure is some wilder CT at work. I'm leaving out programming as applied category theory because there is no shortage of refined concepts there (type theory, all the haskell libraries, many things I don't even comprehend). But to me, the value in ACT is actually learning how "simple" some of the other fields could be, because it allows me to communicate with non-software engineers, and actually have them contribute to software. I did a lot of work with state machines as composable abstractions for concurrency and flow control, and mechanical engineers were able to find some really subtle say, race conditions, just by pointing out "hey, isn't there an arrow from this to this, if the limit switch catches early?"
- abelaer 4y agoIf you’re talking about string diagrams, then these are actually just 2D notation for very precise category theory. Manipulating the diagrams is equivalent to proving things in the category, provided you’ve shown soundness and completeness.
- lgdw 4y agoIf anyone is interested in Applied Category Theory, definitely check out the Topos Institute in Berkeley [1]. They do weekly seminars that they post on youtube and a really intriguing blog. I must say that David Spivak is a treasure to hear speak. 7 Sketches in Compositionality [2] was my introduction into Category Theory (written by Spivak and Brendan Fong, another member of Topos), and it really sold the idea of Category Theory as a field that's not just a mathematical meta-language but also a field that can stand on its own. I recommend it over Mac Lane's CWM if you're not a mathematician. [1] https://topos.site/ https://topos.site/ [2] https://arxiv.org/abs/1803.05316 https://arxiv.org/abs/1803.05316
- jesuslop 4y agoAgreed on the institute and Spivak. But CWM is, er, for working mathematicians. Leinster's Basic Category Theory, or Awodey Category theory are more unassuming.
- zozbot234 4y agoThe nLab https://ncatlab.org/nlab/show/HomePage https://ncatlab.org/nlab/show/HomePage is a useful reference for category theory terminology and results.
- cwzwarich 4y agoWhich of the results mentioned in the article are proven by applying some result of category theory to another field, and which are just stated using category theory (with the real mathematical insight lying elsewhere)?
- whatshisface 4y agoIf you translate everything to being stated in terms of category theory, it clarifies how it all works and makes it easier for people to go from one area to another. It is a bit like what Grothendieck did with abstract algebra. Imagine if every sub-field of mathematics had their own word for group, and that's something like how category theory fans see the present world. There's no such thing as a theorem that can only be proven with category theory, because whatever specific thing you're applying category theory to already has all of the properties that would make the theorem true without category theory being involved - if it didn't, you wouldn't be able to treat it as if it was a category. Categories are not the kind of mathematical invention that, for example, ordinary differential equations or matrices are.
- cwzwarich 4y agoYou could say the same thing for any abstract mathematical construct, e.g. metric spaces. There's no theorem (that's not itself about metric spaces) that can only be proven using metric spaces. It's always possible to make new abstractions (simply take the antecedent of any theorem), so whether you adopt a new abstraction is a matter of taste and fashion. In Grothendieck's early work on abelian categories, categories are themselves the objects of mathematical study, and nontrivial results about them are established.
- isitmadeofglass 4y ago> If you translate everything to being stated in terms of category theory, it … … makes it incomprehensible to experts in the field and laymen alike!
- hackandthink 4y agoI agree: "There's no such thing as a theorem that can only be proven with category theory". But sometimes it feels like Category Theory is rebuilding the world and there are genuine theorems. Epilogue: Theorems in Category Theory https://emilyriehl.github.io/files/context.pdf https://emilyriehl.github.io/files/context.pdf
- bmitc 4y agoAnyone interested in category theory might be interested in the brand new book The Joy of Abstraction: An Exploration of Math, Category Theory, and Life by Eugenia Cheng. https://www.amazon.com/Joy-Abstraction-Exploration-Category-Theory/dp/1108477224 https://www.amazon.com/Joy-Abstraction-Exploration-Category-... Then there's of course the classic introduction Conceptual Mathematics by Lawvere and Schanuel. https://www.amazon.com/Conceptual-Mathematics-First-Introduction-Categories/dp/052171916X https://www.amazon.com/Conceptual-Mathematics-First-Introduc...
- mhh__ 4y agoBaez's blog is basically mathematical crack cocaine
- jesuslop 4y agoHe moved recently from Twitter to mathstodon.xyz
- Karrot_Kream 4y agoOnly if you're an algebraeist. There's a lot more to math than algebra.
- hackandthink 4y ago"A goal of the ACT community is to bridge the gap between theorists using category-theoretic modeling tools and those who want to use the models to say something useful and true about the world" This is key. Sure category theoretic abstractions are useful as a common language. Lot's of theorems are applicable in many domains. The hard thing is understanding all this stuff and mapping it into your domain.
- jiggawatts 4y agoHas anyone actually seen a real world problem being solved via Category Theory? As in, "in the wild", instead of being mentioned on a website dedicated to Category Theory? To me it seems a lot like the crypto and web 3.0 promises of "soon there will be all of these amazing applications"... and then there aren't any. Also, all of the examples of CT I've seen are applicable only to pure functional languages like Haskell, which seems to limit their practical utility.
- 363849473754 4y agoyes https://youtu.be/iC-KVdB8pf0 https://youtu.be/iC-KVdB8pf0 http://zxcalculus.com/ http://zxcalculus.com/ https://github.com/Quantomatic/pyzx https://github.com/Quantomatic/pyzx https://en.m.wikipedia.org/wiki/ZX-calculus https://en.m.wikipedia.org/wiki/ZX-calculus
- nomel 4y agoI'm a bit of a simpleton. What's the real world problem that ZX-calculus solves? edit: This question is genuine. There are only abstract concepts included in the video and wiki, as deep as I can see.
- 363849473754 4y agothis video may help https://youtu.be/iC-KVdB8pf0 https://youtu.be/iC-KVdB8pf0
- nomel 4y agoSorry, but what real world problem does a quantum circuit solve? My interpretation of "solving a real world problem" means that it can't be infinitely abstract, and must be a relatively good solution, compared to other options. I only see, from my dumb perspective, extreme abstracts. I'm not being combative. I just don't understand.
- 4y ago
- DeathArrow 4y agoWhat are the applications of the category theory being used in computing besides typing?