John Baez, Owen Lynch, and Joe Moeller give equilibrium thermodynamics an operadic backbone in which systems compose by sharing constraints and their entropies combine so that equilibrium becomes entropy maximisation.

The operad has convex sets as types and convex relations as operations, so an operation glues several subsystems into a whole by a linear constraint among their extensive variables. Its algebra assigns to a convex set the extended-real-valued concave entropy functions , which are the states of a thermostatic system.

An operation acts by sup-convolution, combining component entropies into the entropy of the composite:

The sum encodes entropy-additivity and the supremum encodes equilibrium-by-maximisation. The composite’s entropy at total variable is achieved by distributing across subsystems to maximise total entropy. The whole assignment arises from a lax symmetric monoidal functor .

Example. Thermal contact

Two systems sharing energy compose along the relation , and sup-convolution gives , whose maximiser equates the marginal temperatures . The zeroth law is recovered as an argmax.

Remark. Statics behind the cycles

Compositional thermostatics fixes what the state functions are and how they compose, whereas a thermodynamic cycle only tracks differences of a state function around a graph. The concavity of is what makes the sup-convolution equilibria well-posed.