Hacker News new | past | comments | ask | show | jobs | submit login
Category theory using string diagrams (2014) (arxiv.org)
79 points by soloist11 9 months ago | hide | past | favorite | 23 comments



These might be useful - Programming With Categories [1] and Category Theory for Programmers [2] (also on YT [3]).

[1] http://brendanfong.com/programmingcats.html

[2] https://bartoszmilewski.com/2014/10/28/category-theory-for-p...

[3] https://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI...


This is extremely powerful approach, because instead of manipulating algebraic expression, you just manipulate string diagrams according to well defined and rather simple rules.

For example, large parts of quantum theory, quantum computing and quantum information have been reduced to this diagramatic approach to such a degree that novel research insights are emerging from these techniques. A good introduction is Picturing Quantum Processes [1].

[1] https://www.cambridge.org/gb/universitypress/subjects/physic...


The book you linked sounds awesome. Too bad about the price.


You can read the paper here which is a decent introduction

https://arxiv.org/abs/1510.05468

The (much older) paper Kindergarten Quantum Mechanics is probably the classic in this field

https://arxiv.org/abs/quant-ph/0510032


Thank you!


See also the ZX-calculus, a graphical calculus for reasoning about linear maps applied to qubits (read: quantum circuits) [1]. The ZX-calculus derives its structure from categorical quantum mechanics and has found major use in several areas of quantum information science.

[1] https://arxiv.org/abs/2012.13966


I was into this stuff when Scala was at its peak. I still think that it made me a better developer and it's just fun trying to understand all these concepts, but after several years I came to the conclusion that category theory will never hit mainstream.

Sure, the best ideas are already lurking into mainstream languages, but noone is building Monads and Functors. Implementations used in practice are not pure (flatMap on List accepts Sets/Options...).

These days I would probably jump on the Rust hype train and learned more about memory management and safety instead.


This seems quite useful for complicated diagram chasing; has anyone here used this approach for work in homotopy theory or arithmetic geometry? I wonder if it is useful for simplifying long diagrammatic calculations and how robust it is regarding the usual errors in diagrammatic reasoning.


Might also be useful (one of the authors is the same). https://assets.cambridge.org/97810093/17863/frontmatter/9781...


Very nice. Also recommended reading is Eugenie Cheng, The Joy of Abstraction[1] which emphasizes diagram chasing to visualize abstract relationships.

[1] https://doi.org/10.1017/9781108769389


Eugenia Cheng is great, but the completely unwarranted political nonsense that fills this particular book is quite disappointing (I don’t seem to be alone; many reviewers concur). Mathematics is much more fun without all that.


On page four it seems the only difference between the second and third string diagrams is that the 'h' node is lower on the XY string, topologically the diagrams are identical, is that a typo?


No, not a typo. If you translated the two diagrams into classical notation, you’d get the two terms at the top of that page. They’re equal by naturality of alpha, but you need to concentrate on the formula a bit to see it. The great thing about string diagrams is that some of the inconsequential differences “vanish” into topologically identical diagrams.


Thank you.

> If you translated the two diagrams into classical notation, you’d get the two terms at the top of that page.

So the vertical height is meaningful? Not just the arrangement of nodes on the string?

It seems like an ambiguous grammar (the two topologically equivalent diagrams) gives rise to two different parse trees (the two terms at the top of the page) which nevertheless have the same meaning?

Sorry if I'm being dense. I spent a couple of hours last night trying to understand the paper and it was pretty frustrating.


It's been a while since I read these, but I believe it's because h is below alpha. They're exploiting the "sliding equality" referenced at the bottom of page 7.


Ah.

> They're exploiting the "sliding equality" referenced at the bottom of page 7.

That was confusing too, and for the same reason: those are three topologically equivalent diagrams.

So vertical height between nodes on different strings is meaningful? Is there an introductory paper or blog post that explains the structure of the string diagrams?


The vertical height isn't relevant, but the relative vertical height between two "nodes" on different wires could (a-priori) be. The fact that you can reorder them as you like so only the topology matters is exactly encoding the fact that they are natural transformations, if they were some other map it wouldn't work.


To say it explicitly, string diagrams are nice exactly because they convert category theoretic equivalences into topological equivalences that are easy to read visually.


Thanks for trying.

I feel like either I've gotten really stupid recently (always a possibility) or maybe this paper is not very good at explaining string diagrams. :(


String diagrams are also pretty confusing if you're not already very comfortable with category theory. They exist to make complex equality proofs a little easier, but the underlying proofs themselves are not easy to follow.


Yeah, that's a factor here, I'm not very good at CT. (It's weird. It seems so simple, but when you actually get into the weeds things are flying around and morphing and it all falls apart (for me.)) Again, thanks for trying, I really appreciate it. I'll study CT and take another run at it. :)


For sure, string diagrams are meant as a tool for someone experienced with category theoretic proofs. It's possible that they could be used in introductory material too--a la that quantum book that's very diagrammatic--but this paper isn't it.

Category theory is kind of funny in that it is very simple at its base, but rapidly advances from there. Its greatest strength is how compositional it is, but that also means that most practitioners rapidly begin composing things at many levels of abstraction and it can get tough to follow.

String diagrams technically help with that. They have their own compositional rules which map to the ways category theoretic constructions compose, but they still look "simple" to the reader and can provide insight. But in all cases, you need to be comfortable working each component all the way through to fully grasp what's going on. And that can be pretty complex!


Yeah, so much this. Thank you again. :)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: