guest post by Owen Lynch
This is the fourth and final part of a blog series on this paper:
• John Baez, Owen Lynch and Joe Moeller, Compositional thermostatics.
In Part 1, we went over our definition of thermostatic system: it’s a convex space of states and a concave function saying the entropy of each state. We also gave examples of thermostatic systems.
In Part 2, we talked about what it means to compose thermostatic systems. It amounts to constrained maximization of the total entropy.
In Part 3 we laid down a categorical framework for composing systems when there are choices that have to be made for how the systems are composed. This framework has been around for a long time: operads and operad algebras.
In this post we will bring together all of these parts in a big synthesis to create an operad of all the ways of composing thermostatic systems, along with an operad algebra of thermostatic systems!
Recall that in order to compose thermostatic systems we need to use a ‘parameterized constraint’, a convex subset
where is some other convex set. We end up with a thermostatic system on , with defined by
In order to model this using operads and operad algebras, we will make an operad which has convex sets as its types, and convex relations as its morphisms. Then we will make an operad algebra that assigns to any convex set the set of concave functions
This operad algebra will describe how, given a relation , we can ‘push forward’ entropy functions on to form an entropy function on .
The operad is built using a construction from Part 3 that takes a symmetric monoidal category and produces an operad. The symmetric monoidal category that we start with is which has convex sets as its objects and convex relations as its morphisms. This symmetric monoidal category has (the category of convex sets and convex-linear functions) as a subcategory with all the same objects, and inherits a symmetric monoidal structure from the bigger category
Following the construction from Part 3, we see that we get an operad
exactly as described before: namely it has convex sets as types, and
Next we want to make an operad algebra on . To do this we use a lax symmetric monoidal functor from to defined as follows. On objects, sends any convex set to the set of entropy functions on it:
On morphisms, sends any convex relation to to the map that “pushes forward” an entropy function along that relation:
And finally, the all-important laxator produces an entropy function on by summing an entropy function on and an entropy function on :
The proof that all this indeed defines a lax symmetric monoidal functor can be found in our paper. The main point is that once we have proven this really is a lax symmetric monoidal functor, we can invoke the machinery of lax symmetric monoidal functors and operad algebras to prove that we get an operad algebra! This is very convenient, because proving that we have an operad algebra directly would be somewhat tedious.
We have now reached the technical high point of the paper, which is showing that this operad algebra exists and thus formalizing what it means to compose thermostatic systems. All that remains to do now is to show off a bunch of examples of composition, so that you can see how all this categorical machinery works in practice. In our paper we give many examples, but here let’s consider just one.
Consider the following setup with two ideal gases connected by a movable divider.
The state space of each individual ideal gas is , with coordinates representing energy, volume, and number of particles respectively. Let be the coordinates for the left-hand gas, and be the coordinates for the right-hand gas. Then as the two gases move to thermodynamic equilibrium, the conserved quantities are , , and . We picture this with the following diagram.
Ports on the inner circles represent variables for the ideal gases, and ports on the outer circle represent variables for the composed system. Wires represent relations between those variables. Thus, the entire diagram represents an operation in , given by
We can then use the operad algebra to take entropy functions on the two inner systems (the two ideal gases), and get an entropy function on the outer system.
As a consequence of this entropy maximization procedure, the inner state are such that the temperature and pressure equilibriate between the two ideal gases. This is because constrained maximization with the constraint leads to the following equations at a maximizer:
(where and are the respective temperatures), and
(where and are the respective pressures).
Thus we arrive at the expected conclusion, which is that temperature and pressure equalize when we maximize entropy under constraints on the total energy and volume.
And that concludes this series of blog posts! For more examples of thermostatic composition, I invite you to read our paper, which has some “thermostatic systems” that one does not normally see thought of in this way, such as heat baths and probabilistic systems! And if you find this stuff interesting, don’t hesitate to reach out to me! Just drop a comment here or email me at the address in the paper.
See all four parts of this series:
• Part 1: thermostatic systems and convex sets.
• Part 2: composing thermostatic systems.
• Part 3: operads and their algebras.
• Part 4: the operad for composing thermostatic systems.
There is a typo for the second equation (superscript is incorrect):
Thanks! I’ll fix it!
The formula for has a typo; should be (unless that's a stylistic choice).
Thanks, I’ll fix it. It may have been Owen’s stylistic choice, but I’m his advisor!
(I was in high school, taking a course on mathematical logic at George Washington University from David Nelson, when he kindly explained to me the conventions for things like . Great guy!)
I learnt them from The TeXbook.