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.
What's the right (or left?) part of the adjunction between SMCs and Petri nets? I mean functor going .
I readily find the construction of but I couldn't quickly find a reference to the other part
Because it's not an easy question
There are multiple possible answers, one of them is:
Use the net to generate a commutative monoidal category, which is a particular case of SMC
The other is: Use a Petri net to generate a pre-net, and use this pre-net to generate the SMC
If you check here: https://arxiv.org/abs/2101.04238 just look at the diagram, all the paths from Petri to SMC answer your questions
all the adjunctions are spelled out in great detail in the paper
Yes. My opinion is that the strict commutativity of Petri nets means that they most naturally present commutative monoidal categories. If you're fine with using that adjunction then still the right adjoint is kind of hairy. It sends a CMC to the Petri net with transitions .
Thanks Fab, that's where I went to look immediately but I don't see where the adjunctions are spelled out
Matteo Capucci (he/him) said:
What's the right (or left?) part of the adjunction between SMCs and Petri nets? I mean functor going .
I readily find the construction of but I couldn't quickly find a reference to the other part
You mean , of course.
One useful realization is that Petri nets as traditionally defined naturally generate commutative monoidal categories, which are a very special class of symmetric strict monoidal categories where the symmetry is the identity.
So, @Jade Master and I worked out an adjunction between a rather obvious category and the category of commutative monoidal categories and strict symmetric monoidal functors. We guessed the correct left adjoint easily but we got stuck on the right adjoint - the part you're wondering - until @Mike Shulman helped us. Jade explained it all here:
• Jade Master, Petri nets based on Lawvere theories - Section 4, Generating free commutative monoidal categories from Petri nets.
The title of the section emphasizes the left adjoint, but I promise that your question about the right adjoint is answered. In fact, in one passage she mentions the reason we got stuck:
The reader at this point may guess a simpler formula for the right adjoint... Unfortunately this construction is doomed to fail.
Indeed, this experience made me realize that besides a right adjoint, sometimes a functor will have a wrong adjoint.
Later we teamed up with @Mike Shulman and @Fabrizio Genovese and worked out a more elaborate story involving adjunctions between 3 kinds of nets and 3 kinds of monoidal categories:
@Fabrizio Genovese mentioned it already:
Fabrizio gave a link to the arXiv version, but this minute I just made a newer, better version available on my website and linked to that.
Here are the adjunctions we describe.
John Baez said:
Matteo Capucci (he/him) said:
What's the right (or left?) part of the adjunction between SMCs and Petri nets? I mean functor going .
I readily find the construction of but I couldn't quickly find a reference to the other partYou mean , of course.
Ha, yes, haha
Ok I'm digging the literature
@John Baez in the LICS version I still only see the construction of the left adjoints. Did I miss the other?
Proposition 2.4 of 'Functorial semantics of Petri nets' says that there is an 'obvious forgetful functor' from to .
So I guess what @Jade Master suggested above 'works' for ITP Petri nets (prenets?) too?
Jade Master said:
Yes. My opinion is that the strict commutativity of Petri nets means that they most naturally present commutative monoidal categories. If you're fine with using that adjunction then still the right adjoint is kind of hairy. It sends a CMC to the Petri net with transitions .
If I understand correctly, this treats objects of (a SMC) as places and morphisms as transitions
Right, it is obvious indeed...
This might be the answer to this tweet of mine then:
https://twitter.com/mattecapu/status/1364139727964811264?s=20
Can I read every string diagram in an SMC as a Petri net whose places are wires and transitions are boxes? Summoning the Petri gang @JadeMasterMath @fabgenovese
- hom(—, matteo) (@mattecapu)The idea would be to regard a string diagram as a presentation itself of an SMC, then run this SMC through the adjunction SMC-PN and voilà
Matteo Capucci (he/him) said:
John Baez in the LICS version I still only see the construction of the left adjoints. Did I miss the other?
You need to read Jade's paper to see the right adjoint from to worked out in detail. That's why I pointed you to Section 4 of that paper:
• Jade Master, Petri nets based on Lawvere theories - Section 4, Generating free commutative monoidal categories from Petri nets.
She also does the right adjoint from to in that paper - but it's a corollary of a more general result.
Our LiCS paper, "Categories of nets", just cites Jade's work for those results.
Thanks for the great description John. Regarding your question @Matteo Capucci (he/him) the answer is yes, at least informally you can write every string diagram as a Petri net (but you'd probably be better off with a pre-net if you want to keep the ordering on the strings). If you want something more formal, I'd first ask how you are defining string diagrams.
i'm happy with this atm... but... I think the best way to define a string diagram for this problem is as an hypergraph?
A hypergraph is already very close to a Petri net so you don't need to do anything with the adjunction to get from hypergraphs to Petri nets.
I was expecting you to say "a morphism of a smc". If that's your definition of string diagram then the adjunction will help.
Matteo Capucci (he/him) said:
The idea would be to regard a string diagram as a presentation itself of an SMC, then run this SMC through the adjunction SMC-PN and voilà
I agree with Jade,you want a pre-net
You take an SMC. At that point, you can build a Pre-net from the smc: All objects of the SMC become places, all morphisms become transitions
So you have this HUGE pre-net
When you do the free SMC on it, you are essentially promoting each object/morphism of the original SMC to a generator
So what you get is something like "execution trees" i guess
That is, you have string diagrams that de facto combine string diagrams
bingo, but why trees? i was thinking of execution traces
Because for me they are the same thing, I'm a mathematician not a programmer lol
as you can already guess, there is a natural algebra operation that evaluates this traces, or whatever you wanna call them
Jade Master said:
I was expecting you to say "a morphism of a smc". If that's your definition of string diagram then the adjunction will help.
yeah but would this help to transform it into a petri net (or pre net as you and fabrizio pointed out)?
This is related by the fact that composing the adjunctions gives you a monad or a comonad, I always have to think a good thirty seconds to figure out in which case I am
yeah, it'd be the action of the one of those lol
Yes
even though something less might suffice. I mean, I really care about turning one morphism into a prenet into a SMC, not a whole SMC
so maybe the progression is more like: take an SMC, map it into a category of 'diagrammatic realizations' of its morphisms (hence its hom-sets are sets of hypergraphs), then map this category into a category of open pre-nets, then finally apply hom-wise to this category to get a category enriched in SMC (i.e. use the base-change along )
the category you get has the same objects and morphisms are replaced by 'execution traces'
Mhhhh, I guess you may have problems with objects
pre-nets always generate a SMC with a free monoid of objects
you see that if your SMC has a non-free monoid of objects (so you have equations like floating around) than this approach won't work
the only way of making it work is to promote _any_ object to a place in the pre-net
Fabrizio Genovese said:
pre-nets always generate a SMC with a free monoid of objects
yes this is needed to get executions from markings with many tokens, i.e. representing 'sending many values along a wire of the given string diagrams'
the rest I don't understand what you mean in the context of the construction I sketched :thinking:
Matteo Capucci (he/him) said:
so maybe the progression is more like: take an SMC, map it into a category of 'diagrammatic realizations' of its morphisms (hence its hom-sets are sets of hypergraphs), then map this category into a category of open pre-nets, then finally apply hom-wise to this category to get a category enriched in SMC (i.e. use the base-change along )
Oh, you are applying this hom-wise
mhhh
I don't sure if everything stays coherent working hom-wise
Does it explode?
probably :laughter_tears: i just made it up so there's a high chance of nonsense
Those are usually the things that work best
modulo some fiddling
But I don't really understand why you want to leave your object fixed
It feels strange to change the morphisms but not the objects
i'll think about it... in my head it makes sense but i really don't know if it's the thing I want
It feels quite unnatural from a net perspective, but maybe your application requires it
in simple terms, i'd like to turn a diagram of a morphism into a stream transformer
The standard way to get something aking to what you want (that can be found in the literature) is by looking at adjunctions between categories of nets and categories of _free_ SMCs
What is a stream transformer? It's like you take infinite sequences of X and infinite sequences of Y and turn one into the other applying to the head of the stream (co?)recursively?
you take a stream of and turn it into a stream of
Yeah, I'm thinking about streams as infinite sequences of things from or
Not really infinite sequences, I'm being handwavy
yes infinite sequences works
though I guess prenets really give you
I'm not sure
Fabrizio Genovese said:
What is a stream transformer? It's like you take infinite sequences of X and infinite sequences of Y and turn one into the other applying to the head of the stream (co?)recursively?
anyway, it could happen you have loops so this is non-trivial
So suppose you have the morphism
Now you say: I consider this as a hypergraph, and I turn this hypergraph into a pre-net
Fabrizio Genovese said:
I'm not sure
you can only represent finitely many tokens in any given place right? bc you use the free monoid on the places
This pre-net will have places
and transitions
So in the resulting SMC you can also consider just the morphism , say
which doesn't match your domain
And yes, monoids are finite
oooh...
i didn't realize you could mark in perverse ways like that
You can mark on _any_ place, as you like
Instead, in the approach me and Jade were sketching, you are _not_ allowed to decompose morphisms that way
each string diagram gets promoted to an atomic transition
So I will only be able to apply as an atomic event
Jade and I are still (on and off) working out whether these adjunctions are monadic. Maybe I'll work on that some more next week since you guys are discussing it...
Fabrizio Genovese said:
Instead, in the approach me and Jade were sketching, you are _not_ allowed to decompose morphisms that way
i guess then this is what i want
But then you will appreciate the necessity of ballooning up objects as well! :grinning:
Morgan Rogers (he/him) said:
Jade and I are still (on and off) working out whether these adjunctions are monadic. Maybe I'll work on that some more next week since you guys are discussing it...
so this might be an opportunity to ask... what does monadicity buy you?
Ha, not a great deal, besides some formal nonsense about how the category of SMCs is structured over the category of nets (everything is a coequalizer of free things) which isn't much of an improvement over the existing results about these categories
It will confirm that SMC homs are the "right" morphisms in the Kleisli category, which people have been assuming anyway.
More likely it will come in handy later when someone has a monad on the category of nets and they want to argue that it lifts to the category of SMCs: knowing that the latter is a category of algebras will provide an efficient abstract path to making that deduction. (Also we're doing it for Q-nets, so maybe there is a variant of nets where that will be more important).
To be honest, failure of monadicity would be a lot more work but a lot more interesting. I'll let you know which way the cookie crumbles when we get there :joy:
Morgan Rogers (he/him) said:
Jade and I are still (on and off) working out whether these adjunctions are monadic. Maybe I'll work on that some more next week since you guys are discussing it...
Yay!
Jade is at that stage where work on the thesis becomes a somewhat panicky rush to meet the deadline... so it may be mainly you doing this for a while.
I don't know exactly what monadicity buys you, but it seems like a really natural question, so once it's answered I bet people will start figuring out things to do with it. @Evan Patterson and @James Fairbanks and I have a bunch of things we can do with the Kleisli category, for example. A bunch of these may work even if the adjunction between Petri nets and commutative monoidal categories is not monadic - as we discussed earlier here, there's still a Kleisli-like category.