Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: string diagrams 101


view this post on Zulip Benjamin Merlin Bumpus (he/him) (Feb 25 2022 at 10:37):

Hi everyone. As a new category enthusiast, I've been rather interested in learning about string diagrams for a while; however, I've not put-in the time yet. I was wondering if anyone had recommendations for: (1) good introductions to string diagrams, (2) good moments to learn about them.

Regarding the second point, I'm asking because I find that it is often best to put serious effort learning something only when one has a real chance to play with this new object/construction/trick. @Jade Master got me interested in double categories and now I'm wondering whether string diagrams could be used to make all of the rather verbose definitions more concise and easier to manipulate: is this what string diagrams are good for? :)

view this post on Zulip Chad Nester (Feb 25 2022 at 10:44):

You can certainly draw string diagrams for double categories. David Jaz Myers has a pretty paper explaining how. I'll also plug my paper that uses string diagrams for double categories.

view this post on Zulip Chad Nester (Feb 25 2022 at 10:46):

For an introduction to string diagrams for monoidal categories I really like Peter Selinger's much cited survey paper.

view this post on Zulip Jules Hedges (Feb 25 2022 at 11:07):

In my opinion Selinger's survey (aka the Bible) is the second thing you should read about string diagrams, the first thing you should read is any of several papers by Bob Coecke

view this post on Zulip Jules Hedges (Feb 25 2022 at 11:10):

One example I sometimes recommend is "Categories for the practicing physicist" (https://arxiv.org/abs/0905.3010), skipping over the physics parts

view this post on Zulip Benjamin Merlin Bumpus (he/him) (Feb 25 2022 at 12:08):

Oh thanks! (to both of you)
I've got some reading to do, it seems :smile:

view this post on Zulip Nathaniel Virgo (Feb 25 2022 at 12:30):

I learnt a huge amount by learning the basics of string diagrams early on (the references already given are good ones) and then translating every commutative diagram in sight into string diagrams. It's not always obvious how but there usually is a way in my experience, especially if you learn about "functor boxes" (some good references are Melliès and Fritz and Perrone) and/or the string diagram calculus for 2-categories, which is outlined in this talk. There is also Marsden's book, which presents a lot of stuff about monads using 2-category string diagrams.

view this post on Zulip John Baez (Feb 25 2022 at 17:17):

Benjamin Merlin Bumpus said:

Jade Master got me interested in double categories and now I'm wondering whether string diagrams could be used to make all of the rather verbose definitions more concise and easier to manipulate: is this what string diagrams are good for? :)

That's not the main thing string diagrams are used for currently, but my student @Christian Williams is writing his thesis on the use of double categories in logic where he introduces double categories and works with them using string diagrams.

This is based on @David Jaz's work on string diagrams for double categories, which Chad mentioned.

view this post on Zulip Jules Hedges (Feb 25 2022 at 18:39):

Benjamin Merlin Bumpus said:

I'm wondering whether string diagrams could be used to make all of the rather verbose definitions more concise and easier to manipulate: is this what string diagrams are good for? :)

I think this is a pretty interesting question. I'll use monoidal categories as an example. A monoidal category is either [almost a page long definition] or it's equivalently "a place where string diagrams modulo planar isotopy are well-defined" - that's in scare quotes but it can be made into a precise definition that's equivalent to the traditional one. I'd argue that the second thing is more intuitive to both understand and in most cases also to use, but the first thing can be seen as a finite axiomatisation of what the second thing is saying. That's a reversal of the usual perspective, like running the coherence theorem backwards: I'm saying that the (usual) definition of monoidal categories is a finite axiomatisation of planar isotopy of string diagrams, and it's not obvious that this should even be possible. The conclusion of that kind of line of thinking is basically that both perspectives are useful for different things, and it's useful to be able to shift back and forth between them. In particular, if you want to verify that a new category is monoidal, you definitely want to use the finite axiomatisation because then you just have a list of diagrams you need to check commute and then you're done

view this post on Zulip Simon Burton (Mar 03 2022 at 10:52):

Someone (me?) should also mention the Rosetta stone paper...

view this post on Zulip John Baez (Mar 03 2022 at 17:12):

I was going to, but I wasn't sure this is the sort of thing Benjamin wanted.

view this post on Zulip Henry Story (Aug 29 2022 at 11:54):

Has anyone written a JS String Diagram viewer for RDF ontologies?
https://twitter.com/bblfish/status/1564214437447352322

While i am at it, has any Category Theory fan built a String Diagram viewer in JS for #OWL ontologies? That could be help #FunctionalProgramming developers read Semantic Web Ontologies. See the article and diagrams by @ejpatters https://arxiv.org/pdf/1706.00526.pdf https://twitter.com/bblfish/status/1564214437447352322/photo/1

- The 🐠 BabelFish (@bblfish)

view this post on Zulip Tom Hirschowitz (Sep 02 2022 at 07:53):

@Jules Hedges I second that. One way I used to sell my work with @Richard Garner on shapely monads was that:

view this post on Zulip Morgan Rogers (he/him) (Oct 07 2022 at 12:26):

What do people use to draw/typeset string diagrams?

view this post on Zulip Ralph Sarkis (Oct 07 2022 at 12:59):

I've been using TikZiT, but I am not very good at it. Here is what a proficient user can do with it.

view this post on Zulip Chad Nester (Oct 07 2022 at 13:25):

I use coloured pencils, felt-tipped pens, and a scanner

view this post on Zulip Amar Hadzihasanovic (Oct 07 2022 at 13:44):

I wrote a library for higher categories partly so it could draw string diagrams for me.

view this post on Zulip Graham Manuell (Oct 07 2022 at 14:22):

In the past I have just done it by hand using TikZ, though I don't think I could bear to do this again if there were more than a few diagrams, so in future I'd probably also use some semi-automated solution like TikZiT.

view this post on Zulip Nathanael Arkor (Oct 07 2022 at 15:17):

I personally couldn't find any solutions that I was happy with, so I ended up writing my own TikZ library for typesetting them.
image.png

For now it's specifically catered towards string diagrams for double categories, so it's not so useful as a general purpose library, but if that happens to be the setting you're interested in, I can share it with you :)

view this post on Zulip Jason Erbele (Oct 07 2022 at 15:20):

I used plain TikZ with some customized global settings for the string diagrams in my dissertation – I haven't used TikZiT enough to feel comfortable with it, but I can certainly understand its appeal. I've not used Omnigraffle, but I heard someone mention using it for string diagrams a few years ago.

view this post on Zulip Matteo Capucci (he/him) (Oct 07 2022 at 17:57):

Nathanael Arkor said:

I personally couldn't find any solutions that I was happy with, so I ended up writing my own TikZ library for typesetting them.
image.png

For now it's specifically catered towards string diagrams for double categories, so it's not so useful as a general purpose library, but if that happens to be the setting you're interested in, I can share it with you :)

Me! Me! I'm interested

view this post on Zulip Nathanael Arkor (Oct 07 2022 at 21:40):

Matteo Capucci (he/him) said:

Nathanael Arkor said:

I personally couldn't find any solutions that I was happy with, so I ended up writing my own TikZ library for typesetting them.
image.png

For now it's specifically catered towards string diagrams for double categories, so it's not so useful as a general purpose library, but if that happens to be the setting you're interested in, I can share it with you :)

Me! Me! I'm interested

There are a few things I want to polish up, and I need to write a little documentation, but I will share it with those who are interested once I've done that :)

view this post on Zulip Dan Marsden (Oct 09 2022 at 12:51):

I manually layout string diagrams using TikZ in emacs. I do this manually as I care about the aesthetic details of the layout more than the automatic tools I'm aware of can currently provide. If it's helpful, draft notes on how to produce diagrams like those I produce in my work with Ralf Hinze can be downloaded from https://stringdiagram.com/downloads/

view this post on Zulip Matteo Capucci (he/him) (Oct 10 2022 at 15:46):

Nathanael Arkor said:

Matteo Capucci (he/him) said:

Nathanael Arkor said:

I personally couldn't find any solutions that I was happy with, so I ended up writing my own TikZ library for typesetting them.
image.png

For now it's specifically catered towards string diagrams for double categories, so it's not so useful as a general purpose library, but if that happens to be the setting you're interested in, I can share it with you :)

Me! Me! I'm interested

There are a few things I want to polish up, and I need to write a little documentation, but I will share it with those who are interested once I've done that :)

Thanks :D

view this post on Zulip Fabrizio Genovese (Oct 11 2022 at 13:52):

Morgan Rogers (he/him) said:

What do people use to draw/typeset string diagrams?

Tikz.

view this post on Zulip Fabrizio Genovese (Oct 11 2022 at 13:53):

Actually not just string diagrams, I do typeset everything I can in tikz, and use \includegraphicsonly when I have no alternative

view this post on Zulip Fabrizio Genovese (Oct 11 2022 at 13:53):

I even created our company logo using tikz... Lol

view this post on Zulip Jules Hedges (Oct 11 2022 at 13:55):

I've dreamed about a TikZ library (ie something you invoke with \usetikzlibrary) for specifying the layout of string diagrams "semantically". I even tried once years ago, but the TikZ manual is 1000 pages long and library development looks brain-explodingly difficulty

view this post on Zulip Chad Nester (Oct 11 2022 at 13:57):

I've got a method of typing string diagrams over a signature implemented. If you feel like trying to compile it I can send it to you. (It outputs vector graphics, and the drawing engine can generate PDF files containing your rendered string diagrams)

view this post on Zulip Fabrizio Genovese (Oct 11 2022 at 13:59):

In my experience libraries are going to help for standard cases but as soon as you need to spicy things up fiddling with them becomes much more difficult. Personally, my library consists of the source code of my previous papers where I just copy-paste the portions of diagrams that I need to reuse.