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: deprecated: chemistry

Topic: questions


view this post on Zulip John Baez (May 04 2022 at 23:31):

This is a section specifically for questions related to the AMS Mathematical Research Community on category theory and chemistry. Feel free to ask any question here!

view this post on Zulip John Baez (May 04 2022 at 23:36):

Here is a question I got:

1) You gonna talk later about 'open' chemical reaction. What is the difference between open and closed chemical reactions? Are there some examples for each of them? So any chemical reaction is either open or closed? i.e can not be both open and closed at the same time? Last time, if am not mistaken we talked about Petri nets and defined them as open systems (a system that interacts with its environment).

view this post on Zulip John Baez (May 04 2022 at 23:37):

It doesn't make sense to say an individual chemical reaction is open or closed. What make sense is to talk about 1) a Petri net with rates, and 2) an open Petri net with rates.

view this post on Zulip John Baez (May 04 2022 at 23:40):

I informally explained Petri nets with rates on Tuesday; but it's good to know the precise definition:

Petri nets are defined in Definition 2 here, and Petri nets with rates are defined in Definition 8. (In Definition 8 I call them "reaction networks with rates", but that is probably confusing. Let's call them Petri nets with rates!) So, please take a look at these.

view this post on Zulip John Baez (May 04 2022 at 23:41):

We use Petri nets with rates to get differential equations describing how the concentrations of a bunch of chemicals change over time due to reactions.

view this post on Zulip John Baez (May 04 2022 at 23:42):

But the key to using category theory is to study open Petri nets with rates. I drew some pictures of them on Tuesday, but again it's good to know the precise definition.

view this post on Zulip John Baez (May 04 2022 at 23:46):

Open Petri nets are defined in Definition 3, and open Petri nets with rates are defined in Definition 9. (Again, I foolishly called them "open reaction networks" and "open reaction networks with rates.)

view this post on Zulip John Baez (May 04 2022 at 23:46):

The idea is that an open Petri net with rates lets you study a bunch of chemical reactions where chemicals can also flow in and out of the whole system.

view this post on Zulip John Baez (May 04 2022 at 23:47):

To understand this, it may be easiest to go to page 18 and start reading where it says

"To make these ideas more concrete, let us see in an example how to go from
an open reaction network with rates to an open dynamical system and then its
open rate equation."

view this post on Zulip John Baez (May 04 2022 at 23:53):

I also gave a talk on this, and I explain how to get a system of differential equations from an open Petri nets starting at minute 25:00.

view this post on Zulip John Baez (May 04 2022 at 23:54):

2) When considering computer language and monoidal category C. Hereby a computer Language, you mean this could be C++, Java etc? by a program here you mean a code?

Yes, in any computer language where you can write a program that takes as input data of type XX and gives as output data of type YY, you can think of that program as a morphism f:XYf: X \to Y.

view this post on Zulip Sam Tenka (May 05 2022 at 18:20):

John Baez said:

2) When considering computer language and monoidal category C. Hereby a computer Language, you mean this could be C++, Java etc? by a program here you mean a code?

Yes, in any computer language where you can write a program that takes as input data of type XX and gives as output data of type YY, you can think of that program as a morphism f:XYf: X \to Y.

Adding onto this: there are horribly non-type-centric languages where it is not as meaningful as one might hope to speak of the "input and output" types of routines. For example, if one adopts a style of C programming that involves lots of arguments-passed-by-reference, then in some sense one would like to say that the by-value input and output types are both producted with those arguments. Similarly with other "side effects". If doesn't do this, then one still gets a category but the resulting syntax-semantics relation feels far from functorial. In PL there is recentish and to-me-marvelously-exciting work on a type theory of "EFFECTS", which avoids both the ridgid non-mutability of haskell and the amorphous spaghetti of C.

view this post on Zulip Benjamin Merlin Bumpus (he/him) (May 10 2022 at 17:17):

Silly question: what's a good / preferred notion of arrow f:RRf: R \to R' for reaction networks RR and RR'?

Should an arrow just be a graph homomorphism mapping complexes to complexes, transitions to transition and which is monotone w.r.t. weights? Or should it be a map SSS \to S' from the species of RR to those of RR' which induces a graph homomorphism described as above? Or should it be something else entirely?

@John Baez from you paper with Blake, it looks to me that you're implicitly using the second notion (maps between sets of species) since it looks like the arrows within a homcategory of the bicategory of open reaction networks are equivalence classes of spans of sets. Am I going in the right direction here?
In your book you mention a paper by Deville and Lerman , is that a good place to find a discussion about different ways of defining arrows between reaction networks? Or do the naïve ideas I sketched above suffice?

Thanks a lot! :smile:

view this post on Zulip John Baez (May 11 2022 at 05:04):

Hi! I don't remember any work on morphisms between reaction networks besides my own. In particular, I'm pretty sure DeVille and Lerman didn't talk about this.

view this post on Zulip John Baez (May 11 2022 at 05:05):

For my own work I use morphisms between Petri nets, not morphisms between reaction networks.

view this post on Zulip John Baez (May 11 2022 at 05:06):

We can translate back and forth between reaction networks and Petri nets, as I described in our last Zoom meeting, but Petri nets seem to be better in a bunch of ways.

view this post on Zulip John Baez (May 11 2022 at 05:10):

There's a pretty obvious notion of morphism between Petri nets, explained for example on page 26 here:

view this post on Zulip John Baez (May 11 2022 at 05:14):

Morphisms between Petri nets with rates are a bit more tricky; my first definition of these (in some paper I won't show you) was wrong, and it was only after talking to @Sophie Libkind that I realized this and corrected it. The corrected version is on the top of page 27 of that same paper.

view this post on Zulip John Baez (May 11 2022 at 05:17):

Sorry to make you look at this paper, but it saves me some time not to write the definition here.

view this post on Zulip John Baez (May 11 2022 at 05:18):

Briefly: a map between Petri nets is a map sending species to species, and also a map sending transitions to transitions; these maps need to be compatible with how every transition has a bunch of species as input and a bunch of species as output.

view this post on Zulip John Baez (May 11 2022 at 05:19):

For Petri nets with rates, the map sending transitions to transitions also needs to be compatible with the rate constants.

view this post on Zulip John Baez (May 11 2022 at 05:20):

"Compatible" is a vague description that's made completely precise using some commutative diagrams and an equation.

view this post on Zulip John Baez (May 11 2022 at 05:21):

Now, back to what you started out saying: since we can translate between Petri nets and reaction networks, we can figure out how the concept of morphism between Petri nets gives a notion of morphism between reaction networks.

view this post on Zulip John Baez (May 11 2022 at 05:23):

I've never actually done this . You might enjoy giving it a try. I think it'll be more like this:

a graph homomorphism mapping complexes to complexes, transitions to transitions...

than your other choice.

view this post on Zulip John Baez (May 11 2022 at 05:24):

When it comes to reaction networks with rates, I think that if several transitions are mapped to one, their rate constants must add up to equal that one's rate constant.

view this post on Zulip John Baez (May 11 2022 at 05:25):

"Monotone" is not good enough because we want the differential equations they give to obey a very precise relation (discussed in my paper with Kenny and Christina), not just some sort of inequality.

view this post on Zulip Benjamin Merlin Bumpus (he/him) (May 11 2022 at 06:28):

Hi John, thanks for the great answer!

And thanks for pointing the paper with Kenny and Christina out, it's good to have this at hand!

John Baez said:

"Monotone" is not good enough because we want the differential equations they give to obey a very precise relation (discussed in my paper with Kenny and Christina), not just some sort of inequality.

This sounds like a very important insight that I didn't pick up from your paper with Blake; all the more reason to read the structured vs decorated cospans paper :+1: