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: Deepening Understanding of Petri Nets


view this post on Zulip Jacob Zelko (Jul 21 2024 at 13:09):

Hi folks,

I have been exposed to petri nets in the past and had read only a little about them here and there. Thanks to a wonderful conversation with @Owen Lynch last week, I have been exploring petri nets again but was wondering where might be the best places to learn about petri nets, there relationship to category theory, and CT applications of the structures (I have encountered most applications within the works of Baez, Libkind, and Fairbanks as of now -- wondering what else I have missed).

Would anyone be able to recommend some readings on petri nets? Thanks!

~ jz

view this post on Zulip John Baez (Jul 21 2024 at 14:55):

You might try the paper "Categories of nets" by @Mike Shulman, @Fabrizio Romano Genovese, @Jade Master and myself. The point is that different people use different kinds of Petri net, which can be confusing. We sort them out using category theory in a nice way: different kinds of Petri nets are presentations of different kinds of symmetric monoidal categories. I recommend starting with my blog article on this paper, and then reading Mike's blog article.

view this post on Zulip Jacob Zelko (Jul 21 2024 at 15:23):

Thanks @John Baez! Time to read!

view this post on Zulip Owen Lynch (Jul 24 2024 at 19:19):

That is perhaps a good paper for getting up to speed with the research frontier of Petri nets, but for deeply understanding Petri nets, you should probably just start with https://arxiv.org/abs/1209.3632

view this post on Zulip John Baez (Jul 24 2024 at 21:22):

Thanks, Owen! Yes, this is my book on Petri nets with Jacob Biamonte, which is a fun place to learn about many aspects of Petri nets. (How many math books have a picture of a rabbit warrior?) But for some reason I misread Jacob's question and thought he only wanted to learn about the category-theoretic aspects of Petri nets. Now I see he may be interested in more.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 18:24):

Hey @Owen Lynch , thanks for the comment here too! I didn't know about that book and will give it a look!

view this post on Zulip Jacob Zelko (Jul 29 2024 at 18:26):

John Baez said:

(How many math books have a picture of a rabbit warrior?)

Now that completely has my full attention! :joy: I'll be jumping into that book shortly!

view this post on Zulip Jacob Zelko (Jul 29 2024 at 18:41):

That said, I have been reading through the resources you suggested (starting the with the blog posts on Categories of Nets) and have been enjoying the materials so far.

An initial question I had is based on these lines:

A Petri net is actually a way of describing a monoidal category. A way of putting a bunch of tokens in the places gives an object of this category, and a way of moving them around repeatedly (as above) gives a morphism.

Particularly, that moving the tokens in the places gives an object of the monoidal category. Later in the post, it says that petri nets are "rigidly collectivist" but this feels slightly contradictory to me based on the photo provided in the blog post here:
image.png

My understanding is that the three orientations of the tokens in the single petri net each represent objects of the monoidal category (I am ignoring how morphisms were defined for now). How are petri nets "rigidly collectivist" when it seems like the location of the tokens in each "place" gives rise to objects in this category? To me, it seems like we would say that there is only ever three tokens in this petri net which would imply one object given the "rigidly collectivist" rules to generate an object in the monoidal category.

i.e. based on this statement: "In the so-called ‘individual token philosophy’, we allow a finite set of tokens in each place. In the ‘collective token philosophy’, we merely allow a natural number of tokens in each place. It’s like the difference between having 4 individual workers named John, Fabrizio, Jade and Mike where you can tell who did what, and having 4 anonymous workers: nameless drones."

view this post on Zulip Jacob Zelko (Jul 29 2024 at 18:45):

Additionally, in this same diagram:
image.png

This is a lack of my familiarity with petri nets, but how does the transition action work in the sequence described here to give 3 tokens in three unique placese, then seemingly 2 tokens in one place, and then three tokens with two in one location and 1 in the other? What is the mechanism going on here to give rise to these three orientations?

I realize this is leaving the language of category theory and more asking about petri net theory in general. Could anyone help me with this? Thanks!

P.S. As a matter of nomenclature, would you want to call each of these three diagrams, "states" or "intermediaries" or "orientations" or what exactly?

view this post on Zulip Jacob Zelko (Jul 29 2024 at 19:45):

Oh @Owen Lynch, quick question for you too as I have started reading John's book: should I set aside sometime to read the entire book or are there particular chapters you think I should really focus in on?

view this post on Zulip Jacob Zelko (Jul 29 2024 at 19:47):

(John, to give some context, Owen and I had a great [in person!] chat a couple weeks ago about Petri Nets and their applications to some of my research questions in public health research. Trying to wrap my brain around this material as best as possible with Owen knowing some more of the additional background context. :smiley: )

view this post on Zulip John Baez (Jul 29 2024 at 20:03):

This is a lack of my familiarity with petri nets, but how does the transition action work in the sequence described here to give 3 tokens in three unique places, then seemingly 2 tokens in one place, and then three tokens with two in one location and 1 in the other? What is the mechanism going on here to give rise to these three orientations?

This would be one of the first things explained in a typical introduction to Petri nets, since this is what Petri nets are all about. Actually if you look carefully at the picture you can figure out what's going on. Notice how in the first step, two token move into the top left box and one pops out, moving into the circle at right.

view this post on Zulip John Baez (Jul 29 2024 at 20:08):

P.S. As a matter of nomenclature, would you want to call each of these three diagrams, "states" or "intermediaries" or "orientations" or what exactly?

They're called markings. We are putting a natural number of tokens (black dots) in each place (circle).

view this post on Zulip John Baez (Jul 29 2024 at 20:11):

If you want to learn these definitions my book may not be best, because it starts by explaining applications of Petri nets to chemistry, which go in a somewhat different direction. A more traditional computer-science oriented introduction may be better, though unfortunately I've never seen one I enjoy.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:17):

Hi @John Baez , thanks for all the responses! I'll get to responding but did you just so happen to delete some messages? I could've sworn I saw more messages from you regarding the "collectivist" notion of petri nets.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:18):

John Baez said:

Actually if you look carefully at the picture you can figure out what's going on

Ok, let me take a deeper look at this to see if I can intuit this before reading the exact rules using the hint you gave me.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:20):

John Baez said:

because it starts by explaining applications of Petri nets to chemistry, which go in a somewhat different direction.

That's alright! I actually already spent a little bit reading the book and I enjoy these initial examples as they appeal to my engineering training from undergraduate work. Plus, I am almost at the battle bunny. :rabbit: :swords:

view this post on Zulip John Baez (Jul 29 2024 at 20:22):

Jacob Zelko said:

Hi John Baez , thanks for all the responses! I'll get to responding but did you just so happen to delete some messages? I could've sworn I saw more messages from you regarding the "collectivist" notion of petri nets.

I decided to delete that because there's no point in discussing this rather subtle issue until you've learned basic Petri net concepts like place, transition, token, marking, the firing of a transition, and how the marking changes when you fire a transition.

(Right now you are staring at three markings of the same Petri net, and trying to figure out how the marking changes when a transition fires.)

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:31):

Alright, I took a look further at the markings. So it seems like in marking 1, this is the "initial state" of the marking with tokens placed in each place (representing the initial conditions of the petri net). In marking 2, the arcs into the "top" transition block (I am denoting the "top" transition as the transition at the top of the marking; "bottom" transition analogously so) seem to combine their places' tokens into one token that gets put into the far right place. In marking 3, it seems like one token is "sent" from that far right place into the "bottom" transition which splits the token into two tokens that get placed in the bottom place.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:31):

So, from that, it appears that petri nets have two types of transitions which operate on tokens to combine or split them. It seems that the transition that "combines" can have however many number of arcs going into it but with only one arc going out from it. The "splitter" transition seems to accept one arc, but then can split an incoming token into as many tokens going out of the "splitter" transition as there are arcs.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:32):

It is not clear to me what causes the movement of tokens yet between the places but perhaps at least one token is needed in each place to start a sequence of markings in a petri net. That is unclear to me so far.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 20:34):

What I am now curious is if marking 3 is the "final" marking in this sequence of markings as some condition is satisfied or if there is now an endless cycle that continues between marking 2 and marking 3 (i.e. an endless splitting and combining of tokens being sent between the bottom and far right places).

view this post on Zulip John Baez (Jul 29 2024 at 21:19):

Jacob Zelko said:

So, from that, it appears that petri nets have two types of transitions which operate on tokens to combine or split them. It seems that the transition that "combines" can have however many number of arcs going into it but with only one arc going out from it. The "splitter" transition seems to accept one arc, but then can split an incoming token into as many tokens going out of the "splitter" transition as there are arcs.

You're exactly right as far as this example goes. But this example is special in that all the transitions either have 2 input arcs and 1 output arc, or 1 output arc and 2 input arcs. Petri nets can be more general.

In general, a transition can have m input arcs and n output arcs. When that transition fires, one token leaves each of the places connected to that transition by input arcs, and one token goes into each of the places connected to that transition by output arcs.

view this post on Zulip John Baez (Jul 29 2024 at 21:20):

It is not clear to me what causes the movement of tokens yet between the places but perhaps at least one token is needed in each place to start a sequence of markings in a petri net. That is unclear to me so far.

Yes, that's required.

view this post on Zulip John Baez (Jul 29 2024 at 21:21):

But I wouldn't use the term 'causes'. A transition doesn't need to fire when there are enough tokens in the right places. It's just able to fire.

view this post on Zulip John Baez (Jul 29 2024 at 21:22):

What I am now curious is if marking 3 is the "final" marking in this sequence of markings as some condition is satisfied or if there is now an endless cycle that continues between marking 2 and marking 3 (i.e. an endless splitting and combining of tokens being sent between the bottom and far right places).

Now that you know the rules for when transitions can fire and what happens when they fire, you can figure this out and test your understanding. Can this Petri net keep firing forever, or must it stop now, or must it stop at some later point?

view this post on Zulip Jacob Zelko (Jul 29 2024 at 21:45):

John Baez said:

When that transition fires, one token leaves each of the places connected to that transition by input arcs, and one token goes into each of the places connected to that transition by output arcs.

John Baez said:

It is not clear to me what causes the movement of tokens yet between the places but perhaps at least one token is needed in each place to start a sequence of markings in a petri net. That is unclear to me so far.

Yes, that's required.

Ok, I think I am getting somewhere! With your question back to me about my pondering on if the petri net continues to send tokens around forever, using the rules and discussion from here, I have concluded that no, it would not continue forever and it does not necessarily needs to stop now. At marking 3, it is clear that the top transition does not have enough tokens to fire again.

However, the bottom transition does have "enough" tokens to fire again. So if the bottom transition were to fire again, we would have a final marking, marking 4, where there are now four tokens in the bottom place. And at that point, the petri net would "stop" as the transitions can no longer fire.

view this post on Zulip John Baez (Jul 29 2024 at 21:53):

Exactly right. It sounds like you've got it.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 21:56):

Huzzah!

view this post on Zulip Jacob Zelko (Jul 29 2024 at 22:04):

Alright, so before I jump back to earlier questions about the category theoretic relationship to petri nets (as well as language usages), could you help me better understand this notion of "firing"? It's curious as it seems firing happens sequentially rather than simultaneously (based on the existence of marking 2). As you were saying, "cause" is a rather loaded term to use, but in this case, what triggers a transition to fire? Is that I want it to fire or is it due to some system property?

view this post on Zulip John Baez (Jul 29 2024 at 22:41):

There are many semantics for Petri nets, so no single answer as to "why" a transition fires. Computer scientists use a "nondeterministic" semantics, which I would call a "possibilistic" semantics. This means all we know is whether it's possible for a transition to fire - and I've already explained when it's possible. All we can say is whether a sequence of firings is possible.

view this post on Zulip John Baez (Jul 29 2024 at 22:44):

If you read my book you'll learn about the "master equation" for Petri nets. This describes a "probabilistic" or "stochastic" semantics. Here we attach a number called a rate constant to each transition. This allows us - via a complicated formula I explain - to compute a probability per time for a transition to fire.

view this post on Zulip John Baez (Jul 29 2024 at 22:45):

The "nondeterministic" semantics is simpler. In that semantics, asking "why a transition fires" is exactly like asking "why a morphism happens" in a category - it's a question that doesn't make sense.

view this post on Zulip Jacob Zelko (Jul 29 2024 at 22:50):

Ah! That clears things up quite well; thanks John!

view this post on Zulip Jacob Zelko (Jul 29 2024 at 22:54):

As you have gotten me thinking more correctly on the basics of petri nets, if it is alright, I wanted to jump back to the higher abstraction of how petri nets are understood in categorical framing. As the blog post noted, each of these markings in this specific petri net (which, as you mentioned, is just an example) give rise to objects that exist within a monoidal category. What I am not clear is how exactly the morphisms in such a category are defined. I know you say in the blog post that:

Petri net, as we use the term, consists of a set SS, a set TT, and a function TN[S]×N[S]T \rightarrow \N[S] \times \N[S], where N[S]\N[S] is the underlying set of the free commutative monoid on SS.

So are the morphisms defined as a map from marking to marking that records the position of tokens within each place (which I think follows the "individualist" tradition you mentioned)? Or how would I want to understand the morphisms? I am having trouble seeing what is the data associated with the morphisms in this small example category.

view this post on Zulip John Baez (Jul 30 2024 at 13:10):

If you want a simple rough explanation: a morphism is just a sequence of firings where each one starts where the last one ended, like in this picture you showed us:

That's why my collaborators drew this picture: it's a picture of a morphism.

view this post on Zulip John Baez (Jul 30 2024 at 13:14):

If you want the details of how a Petri net generates a symmetric monoidal category where objects are markings and morphisms are... things like I just showed you... you could start with my paper with Jade, Section 2.

view this post on Zulip John Baez (Jul 30 2024 at 13:16):

Then, for a lot of details about 3 variations on this theme, see the paper Categories of nets. We describe 3 kinds of Petri-net-like things, and how they generate

By the way, plain old Petri nets - of the sort we've been discussing - generate commutative monoidal categories! Here the collective token philosophy reigns supreme, as the word "commutative" should indicate: switching two tokens does absolutely nothing.

view this post on Zulip Owen Lynch (Jul 30 2024 at 16:13):

Another way of thinking about Petri net firing is that a Petri net can be seen as an open discrete dynamical system, i.e. a dependent Moore machine. Written in polynomial notation, we have an interface:

p=sNSypossible transitions that could fire when tokens are as s p = \sum_{s \in \mathbb{N}^S} y^{\text{possible transitions that could fire when tokens are as } s}

Then we have a dynamical system NSyNSp \mathbb{N}^S y^{\mathbb{N}^S} \to p . The intuition is that at a given "token assignment", we present a menu of possible transitions to fire. Then someone else chooses a transition, and we move to a new token assignment based on that choice.

view this post on Zulip Owen Lynch (Jul 30 2024 at 16:14):

Various closed semantics for Petri nets (nondeterministic, stochastic, etc.) can be thought of as composing this system with different controllers.

view this post on Zulip David Egolf (Jul 30 2024 at 16:29):

John Baez said:

If you want a simple rough explanation: a morphism is just a sequence of firings where each one starts where the last one ended, like in this picture you showed us:

That's why my collaborators drew this picture: it's a picture of a morphism.

That's interesting! If I'm understanding you correctly, it sounds like this category provides another example where:

view this post on Zulip Owen Lynch (Jul 30 2024 at 16:30):

Yes! And in fact you can upgrade the example I gave to instead use this category (seen as a polynomial comonoid) as the state space of the dynamical system!

view this post on Zulip Fabrizio Romano Genovese (Jul 30 2024 at 17:15):

David Egolf said:

John Baez said:

If you want a simple rough explanation: a morphism is just a sequence of firings where each one starts where the last one ended, like in this picture you showed us:

That's why my collaborators drew this picture: it's a picture of a morphism.

That's interesting! If I'm understanding you correctly, it sounds like this category provides another example where:

This is _the_ interpretation. Indeed the categories associated to Petri nets (depending on semantics) are not just monoidal but free monoidal. In this respect, a Petri net represents the most general abstraction of what a "system that can be represented as monoidal categories" is.

view this post on Zulip John Baez (Jul 31 2024 at 10:44):

That's a very good way to put it, Fabrizio. But for the nonexperts out there: wherever Fabrizio said "monoidal" we should say "commutative monoidal" if we're talking about plain old Petri nets, as we've been doing in this thread. But our paper discusses variants of the concept of Petri net that let you replace "commutative monoidal" with "symmetric monoidal" or simply "monoidal".

view this post on Zulip Robin Piedeleu (Jul 31 2024 at 15:46):

As John has already pointed out, there are different ways of composing Petri nets: in some of the papers cited here, nets are glued along places, while in other work they are glued along transitions. And the form of composition makes a big difference if the idea is to obtain a functorial account of Petri nets behaviour---by that, I mean a (symmetric monoidal) functor between a category which hosts the syntax of nets as combinatorial objects, and another category in which they take their semantics. This is what is sometimes referred to as compositionality in this context.

I and several others have worked on the algebra of nets composed along transitions, giving them a presentation as a symmetric monoidal theory, with generators and relations. While it was interesting work, connected to other seemingly unrelated formalisms, like signal flow graphs for linear dynamical systems, our presentation only gave an account of the one-step behaviour of a given net, that is, how the number of tokens in its places can change from firing (potentially multiple simultaneous) transitions once. This does not tackle what researchers in the field really care about, namely which configurations can be reached from which (reachability, a problem whose complexity was pinned down fairly recently) or useful related questions (like coverability, for example). It would have been great to gain some insight into these complicated problems using the algebraic tools we have developed, but I was unable to achieve anything substantial at the time, and have not gone back to them since. (And this is where some of the real challenges of applied category theory discussed here in another thread became apparent to me.)

view this post on Zulip Jacob Zelko (Jul 31 2024 at 17:51):

Hi folks! Just wanted to give a quick comment as I will have more time later to give a bigger response later but I've been taking notes on this conversation and appreciate you all so much for taking the time to engage over here! These are some of my notes so far -- may try adding them to @Owen Lynch 's LocalCharts project if it makes sense!

image.png

view this post on Zulip Jacob Zelko (Aug 02 2024 at 14:25):

Ok, I have been quietly going through the discussions here in-depth on my side and have some follow-up questions/thoughts (apologies as this will be a bit out of order):

view this post on Zulip Jacob Zelko (Aug 02 2024 at 14:30):

@Owen Lynch , I quite enjoyed your idea for an alternative way to view petri net firings! I did have a couple questions about your particular viewpoint:

Owen Lynch said:

Written in polynomial notation, we have an interface:

p=∑s∈NS​ypossible transitions that could fire when tokens are as s

Then we have a dynamical system NSyNS→p.

Could you help me interpret exactly what each term in the polynomial notation you are using is saying? It is not clear to me what each term actually means in the context of a dynamical system.

view this post on Zulip Jacob Zelko (Aug 02 2024 at 14:41):

Owen Lynch said:

Various closed semantics for Petri nets (nondeterministic, stochastic, etc.)

What are these "closed semantics" you are referring to? I am a bit unfamiliar with the terminology but I understand what you are referring to (i.e. nondeterministic, stochastic, etc.)

view this post on Zulip John Baez (Aug 02 2024 at 14:48):

Maybe he means: semantics not for open Petri nets but for ordinary Petri nets.

view this post on Zulip Jacob Zelko (Aug 02 2024 at 15:07):

Yea, that's what I was thinking but more generally, what is the notion of semantics? Like the characteristics and attributes of an ordinary petri net? Or something else? The strict use of the word semantics in this context isn't too familiar to me...

view this post on Zulip Jacob Zelko (Aug 02 2024 at 15:12):

@Robin Piedeleu , I greatly enjoyed your comments! I really loved your further explanations and additional paper references (I have them pulled up to look at). Also, your work sounds really fascinating -- it just so happened I stumbled across your blog post An introduction to causal inference via string diagrams a while ago as well so it is exciting to cross paths! That said, I wanted to respond to one point you mentioned:

Robin Piedeleu said:

And the form of composition makes a big difference if the idea is to obtain a functorial account of Petri nets behaviour---by that, I mean a (symmetric monoidal) functor between a category which hosts the syntax of nets as combinatorial objects, and another category in which they take their semantics.

What do you mean by a category hosting the syntax of nets as combinatorial objects? Is this referring to markings?

view this post on Zulip Jacob Zelko (Aug 02 2024 at 15:13):

Also,

Robin Piedeleu said:

And this is where some of the real challenges of applied category theory discussed here in another thread became apparent to me.

A bit tangential but what is the other thread that you are mentioning? I'd be interested to see what other outstanding challenges within applied category theory exist from your perspective.

view this post on Zulip John Baez (Aug 02 2024 at 16:13):

Jacob Zelko said:

Yea, that's what I was thinking but more generally, what is the notion of semantics? Like the characteristics and attributes of an ordinary petri net? Or something else? The strict use of the word semantics in this context isn't too familiar to me...

In this general context 'semantics' means a functor mapping your syntax category (e.g. a category of Petri nets) to some category describing the intended meaning of that syntax.

view this post on Zulip John Baez (Aug 02 2024 at 16:20):

For example see where Open Petri nets talks about the 'operational semantics' for open Petri nets, or where A compositional framework for reaction networks talks about the 'gray-boxing' and 'black-boxing' functors for open Petri nets with rates - two choices of semantics.

view this post on Zulip Robin Piedeleu (Aug 03 2024 at 13:06):

Jacob Zelko said:

Robin Piedeleu , I greatly enjoyed your comments! I really loved your further explanations and additional paper references (I have them pulled up to look at). Also, your work sounds really fascinating -- it just so happened I stumbled across your blog post An introduction to causal inference via string diagrams a while ago as well so it is exciting to cross paths! That said, I wanted to respond to one point you mentioned:

Robin Piedeleu said:

And the form of composition makes a big difference if the idea is to obtain a functorial account of Petri nets behaviour---by that, I mean a (symmetric monoidal) functor between a category which hosts the syntax of nets as combinatorial objects, and another category in which they take their semantics.

What do you mean by a category hosting the syntax of nets as combinatorial objects? Is this referring to markings?

Here by "syntax" I mean a combinatorial description of a Petri net---basically, just a (directed) hypergraph! Of course, to turn these into "open" Petri nets and organise them into a category, we usually consider some sort of cospan of hypergraph, whose legs indicate which of the places/transition - there is a choice, as I said above - are available to be composed with the environment.

But, this is just syntax, in the sense that it tells us almost nothing about why we usually care about Petri nets: they are systems whose combinatorial description specifies which transitions can be fired in what state (i.e. tokens in some places). This is their semantics. There are also several possible interpretations here, but this is the general idea. And often, you can organise these semantics into a (symmetric monoidal) category too. For example, for the usual interpretation of plain Petri nets, this category is simply the category of sets and relations. For nets with rates who fire in continuous time, see the work of John and his coauthors. Then, when we're lucky, there is a (symmetric monoidal) functor from the syntax to the semantics, which guarantees that the interpretation is compositional, aka "black-boxing" as John calls it above.

However, as I said, this only holds, as far as I'm aware, for the one-step behaviour of the net; more interesting and complicated properties like the reachability relation (which is just the transition closure of the former) do not usually give such a functor. Studying when symmetric monoidal functoriality break down might provide some insight into why some of these other properties are more complex to compute btw.

view this post on Zulip Robin Piedeleu (Aug 03 2024 at 13:08):

Jacob Zelko said:

Also,

Robin Piedeleu said:

And this is where some of the real challenges of applied category theory discussed here in another thread became apparent to me.

A bit tangential but what is the other thread that you are mentioning? I'd be interested to see what other outstanding challenges within applied category theory exist from your perspective.

I meant the currently controversial thread on this zulip about applied category theory hype.

view this post on Zulip John Baez (Aug 03 2024 at 14:00):

@Robin Piedeleu wrote:

However, as I said, this only holds, as far as I'm aware, for the one-step behaviour of the net; more interesting and complicated properties like the reachability relation (which is just the transition [transitive?] closure of the former) do not usually give such a functor.

In Open Petri nets, @Jade Master and I showed that the reachability relation for open Petri nets gives a symmetric monoidal lax double functor from the double category of open Petri nets to a double category of relations. This is in section 6, "The reachability semantics".

The laxness shows up in examples like this:

It's caused by the zigzag in the composite Petri net - we explain why in the paper.

view this post on Zulip John Baez (Aug 03 2024 at 14:04):

Later Jade studied the heck out of this issue in her thesis Composing Behaviors of Networks.

view this post on Zulip Graham Manuell (Aug 03 2024 at 16:40):

The zigzag idea in composition reminded me of composition of dinatural transformations in this paper, which I see now actually explicitly discusses the link to Petri nets. So my naive question is whether this lax double functor tells us anything about that?

view this post on Zulip Jacob Zelko (Aug 03 2024 at 21:22):

Hey @John Baez, @Owen Lynch , and @Robin Piedeleu, just wanted to pass a note here that I think at this point, I am might take a step back and dive into these papers, blogs, and books you linked here. It seems to me that the ideal way for going through all this material is the following:

  1. Start with reading through Quantum Techniques for Stochastic Mechanics as a sort of guide through petri net theory territory
  2. Examine the blog posts:

    - Categories of Nets (Part 1) [again]
    - Categories of Nets (Part 2)

  3. Review the papers:

    - Open Petri Nets
    - Categories of Nets
    - A Compositional Framework for Reaction Networks [again]

And then I want to come back at some point to the papers you mentioned, Robin, as they look great (and maybe/hopefully @Jade Master 's thesis too)!

view this post on Zulip Jacob Zelko (Aug 03 2024 at 21:25):

My final outstanding question at the moment is where is the best place to start?

To me, the two blog posts seem nice to get a super high level overview of the material here (so that seems like a nice starting point to seed initial questions). The book seems the most authoritative so I'd proceed to that. The papers seem like the would be a strong complement to the book but I am not too clear.

So my thought is:

Blog posts -> Book -> Papers

Does that seem reasonable?

view this post on Zulip Owen Lynch (Aug 03 2024 at 21:30):

What I would do is read the book, and then try to implement the mass action semantics from scratch in Julia, without referring to AlgebraicPetri

view this post on Zulip Owen Lynch (Aug 03 2024 at 21:31):

I think that's going to be the best way of testing your understanding

view this post on Zulip John Baez (Aug 04 2024 at 07:26):

It really depends on what you're interested in, Jacob.

Blog posts are easier to read than my book (simply because the book is big), which is easier to read than research papers (since those are less expository in nature). But my book covers many topics that aren't in the papers, including a lot of topics that have nothing to do with Petri nets. Conversely, the research papers cover a lot of topics that aren't in the book.

The book is about quantum techniques in stochastic mechanics, and I imagine Owen likes it in part because he already knew quantum mechanics.

view this post on Zulip John Baez (Aug 04 2024 at 07:30):

But by the way, I didn't write only 2 blog posts about Petri nets. Almost everything in the book started out as a blog post, and you can see all 26 of them here.

I've also written at least one blog post about each paper I've helped write about Petri nets, and you can see those here - see the paper I wrote with Blake Pollard on "reaction networks" (which is secretly about Petri nets), and also the papers "Petri nets".

view this post on Zulip John Baez (Aug 04 2024 at 07:39):

Personally, instead of trying to plan things out ahead of time, I'd try reading something and see if I understand and enjoy it. Then if not I'd switch to something else.

view this post on Zulip Jade Master (Aug 04 2024 at 08:34):

Hi everyone, glad you are all studying Petri nets. Looks like fun :wave:

view this post on Zulip Jade Master (Aug 04 2024 at 08:35):

Graham Manuell said:

The zigzag idea in composition reminded me of composition of dinatural transformations in this paper, which I see now actually explicitly discusses the link to Petri nets. So my naive question is whether this lax double functor tells us anything about that?

This paper has got me interested, in the sense that I want to understand that example about Petri nets.

view this post on Zulip Jacob Zelko (Aug 05 2024 at 00:33):

John Baez said:

Personally, instead of trying to plan things out ahead of time, I'd try reading something and see if I understand and enjoy it. Then if not I'd switch to something else.

And that will be the tack I set my sails to! Thanks for all the thoughts and guidance @John Baez (and everyone else)! I am going to start with your book (discussion in #learning: reading & references > Quantum Techniques for Stochastic Mechanics now) as to address what I am most interested in, which is: how one can model on top of petri nets a public health study and what might a categorical treatment of these petri nets in this context give rise to for future study.

view this post on Zulip John Baez (Aug 05 2024 at 08:13):

Sounds great! I look forward to it. By the way, I know just one paper using category theory and Petri nets to develop software for public health: