Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

October 16, 2022

Partition Function as Cardinality

Posted by John Baez

In classical statistical mechanics we often think about sets where each point has a number called its ‘energy’. Then the ‘partition function’ counts the set’s points — but points with large energy count for less! And the amount each point gets counted depends on the temperature.

So, the partition function is a generalization of the cardinality |X||X| that works for sets XX equipped with a function E:XE\colon X \to \mathbb{R}. I’ve been talking with Tom Leinster about this lately, so let me say a bit more about how it works.

Say XX is a set where each point ii has a number E iRE_i \in \R. Following the physicists, I’ll call this number the point’s energy.

The partition function is

Z= iXe E i/kT Z = \sum_{i \in X} e^{- E_i/k T}

where TT \in \mathbb{R} is called temperature and kk is a number called Boltzmann’s constant. If you are a mathematician, feel free to set this constant equal to 11.

So, the partition function counts the points of XX — but the idea is that it counts points with large energy for less. Points with energy E ikTE_i \gg k T count for very little. But as TT \to \infty, all points get fully counted and

Z|X| Z \to |X|

So, the partition function is a generalization of the cardinality |X||X| that works for sets XX equipped with a function E:XE\colon X \to \mathbb{R}. And it reduces to the cardinality in the high-temperature limit.

Just like the cardinality, the partition function adds when you take disjoint unions, and multiplies when you take products! Let me explain this.

Let’s call a set XX with a function E:XE \colon X \to \mathbb{R} an energetic set. I may just call it XX, and you need to remember it has this function. I’ll call its partition function Z(X)Z(X).

How does the partition function work for the disjoint union or product of energetic sets?

The disjoint union X+XX+X' of energetic sets E:XE\colon X \to \mathbb{R} and E:XE' \colon X' \to \mathbb{R} is again an energetic set: for points in XX we use the energy function EE, while for points in XX' we use the function EE'. And we can show that

Z(X+X)=Z(X)+Z(X) Z(X+X') = Z(X) + Z(X')

Just like cardinality!

The cartesian product X×XX\ \times X' of energetic sets E:XE\colon X \to \mathbb{R} and E:XE' \colon X' \to \mathbb{R} is again an energetic set: define the energy of a point (x,x)X×X(x,x') \in X \times X' to be E(x)+E(x)E(x) + E(x'). This is how it really works in physics. And we can show that

Z(X×X)=Z(X)Z(X) Z(X \times X') = Z(X)\, Z(X')

Just like cardinality!

If you like category theory, here are some fun things to do:

1) Make up a category of energetic sets.

(Hint: I’m thinking about a slice category.)

2) Show the disjoint union of energetic sets, defined as above, is the coproduct in this category.

3) Show the ‘cartesian product’ of energetic sets, defined as above, is not the product in this category.

4) Show that the ‘cartesian product’ of energetic sets, defined as above, gives a symmetric monoidal structure on the category of energetic sets. So we should really write it as a tensor product XXX \otimes X', not X×XX\times X'.

5) Show the category of energetic sets has colimits and the tensor product distributes over them.

6) Show that the category FinEn\mathbf{FinEn} of finite energetic sets has finite colimits and the tensor product distributes over them. So, it is a nice kind of symmetric rig category.

7) Show the partition function defines a map of symmetric rig categories

Z:FinEnC () Z \colon \mathbf{FinEn} \to C^\infty(\mathbb{R})

where C ()C^\infty(\mathbb{R}) is the usual ring of smooth real functions on the real line, thought of as a symmetric rig category with only identity morphisms.

Finally, a really nice fact:

8) Show that for finite energetic sets XX and XX', XXX \cong X' if and only if Z(X)=Z(X)Z(X) = Z(X').

(Hint: use the Laplace transform.)

So, the partition function for finite energetic sets acts a lot like the cardinality of finite sets. Like the cardinality of finite sets, it’s a map of symmetric rig categories and a complete invariant. And it reduces to counting as T+T \to +\infty.

We can generalize 6) to certain infinite energetic sets, but then we have to worry about whether this sum converges:

Z= iXe E i/kT Z = \sum_{i \in X} e^{- E_i/k T}

We can also go ahead and consider measure spaces, replacing this sum by an integral. This is very common in physics. But again, we need some conditions if we want these integrals to converge.

Posted at October 16, 2022 4:12 PM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/3423

26 Comments & 0 Trackbacks

Convergence

Is there a p-adic version where the sum automatically converges? Also, I feel like one should be able to tie this up with L-functions, but I don’t remember enough about those to really know what I mean.

Posted by: Allen Knutson on October 17, 2022 2:11 AM | Permalink | Reply to this

Re: Convergence

Allen wrote:

Is there a pp-adic version where the sum automatically converges?

Maybe sometimes it will converge pp-adically when it doesn’t converge in the usual way, and maybe that can be useful. It’s hard to imagine that it always converges: for a countably infinite set where each point has energy zero the partition function is

i=1 1 \sum_{i = 1}^\infty 1

Maybe this converges in the 1-adic topology?

Also, I feel like one should be able to tie this up with L-functions […]

If the set is {1,2,3,}\{1,2,3,\dots\} and the energy of the iith point is lni\ln i, the partition function is the Riemann zeta function (up to a change of variables), and the Euler product formula rewrites it as the partition function of a gas of primes.

Posted by: John Baez on October 18, 2022 12:55 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

How to apply this to black hole thermodynamics? Beacause we know in that case the entropy formula is somehow related to partition in number theory, through the Hardy-Ramanujan approximation…

Posted by: Fen Zuo on October 17, 2022 2:46 AM | Permalink | Reply to this

Re: Partition Function as Cardinality

I don’t know that connection between black hole entropy and Hardy and Ramanujan’s work, though I may have heard someone talking about it.

Mainly what I want to do is the usual thing we do in category theory: work with the things themselves rather than their decategorified ‘shadows’ like cardinalities, generating functions, elements of Grothendieck groups, etc. We’re seeing that the partition function is just a shadow of the thermodynamic system it’s the partition function of.

Posted by: John Baez on October 18, 2022 1:09 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

A mathematical object being a shadow of a physical object is why physics is useful in the first place. IMO the really salient thing about this stuff is not thermodynamics per se but statistical physics (which of course the partition function is the usual bridge between these two perspectives). To be a broken record: it would be really interesting to take the stuff you’ve done for composing thermodynamical systems and transport it to composing statistical-physical ones, like Glauber-Ising spins. Yes this might be “done in principle” already but the killer app here would be getting a handle on (real-space/Kadanoff style) renormalization, which IMO is the example par excellence of really nontrivial composition in physics.

Posted by: Steve Huntsman on October 18, 2022 2:27 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

The kind of ‘shadow’ I’m talking about here is not the usual way in which math is a shadow of the physical world. I’m talking about a specific sort of simplification maneuver within mathematics: ‘decategorification’. This means working with elements of sets instead of objects in categories, by taking any category and forming its set of isomorphism classes of objects. And this is a maneuver we have been fruitfully undoing lately as our ability to work directly with categories improves. I gave a bunch of examples here:

  • John Baez and James Dolan, From finite sets to Feynman diagrams, in Mathematics Unlimited - 2001 and Beyond, vol. 1, eds. Björn Engquist and Wilfried Schmid, Springer, Berlin, 2001, pp. 29–50.

My post here shows that at least for statistical mechanical systems with finitely many states, taking the partition function is exactly nothing other than decategorification.

(The restriction to finitely many states can be dropped at the expense of additional fine print.)

To be a broken record: it would be really interesting to take the stuff you’ve done for composing thermodynamical systems and transport it to composing statistical-physical ones, like Glauber-Ising spins.

Yes, I agree that someone else should do this.

Posted by: John Baez on October 18, 2022 2:43 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Right but what I’m trying to point out is that many descriptions in mathematical physics are (or ought to be) decategorifications. After all, physics is about interaction, which presupposes composition. The partition function is merely one of the easier examples of this, and we should be surprised only if versatile descriptions aren’t decategorifications “all the way down” until we get to a description of reality that is so detailed as to be functionally equivalent to the real thing.

Posted by: Steve Huntsman on October 19, 2022 1:24 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Just to continue ranting, there are three unreasonably effective (in the Wignerian sense) things about mathematics that describe the physical world. The first is that interactions are repeatable, which IMO suggests if not demands mathematical descriptions that are categorical on some level. The fact that decategorified versions are so useful is why mathematics that’s so far from categorical in practice has predominated–viz., analysis. Anyway the second and more mysterious thing is that physical phenomena tend to enjoy separations of scales and interactions, so that it is rare to have multiple phenomena competing. Here the most remarkable thing IMO is that when multiple phenomena do compete you still often get good effective theories. I would guess that these are particularly resistant to categorification.

Posted by: Steve Huntsman on October 20, 2022 2:00 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

I understand. And I believe probably only in this way we can find a universal explanation for black hole entropy. Hardy and Ramanujan’s asymptotic formula is implicitly utilized in many works of black hole, and I learned it from Carlip’s papers, e.g., in https://arxiv.org/abs/gr-qc/0005017, appendix A.

Posted by: Fen Zuo on October 18, 2022 3:51 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

You don’t have to be a mathematician to put k=1k=1 — just pick a suitable (natural) system of units!

Posted by: George on October 17, 2022 12:11 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Right, but that takes training. A mathematician needs to be told: “don’t worry, just assume k=1k = 1.”

Posted by: John Baez on October 18, 2022 12:46 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

I’ve heard an apocryphal story that during a PhD defense in statistical physics a member of the committee asked what kk was, whereupon the student asked “like the actual number?” and could not cite it in SI units, whereupon they were failed. The narrow lesson here is to use β\beta instead of 1/kT1/k T!

Posted by: Steve Huntsman on October 18, 2022 2:31 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

… a member of the committee asked what k was, whereupon the student asked “like the actual number?”

Such `variable constants’ (\eg \hbar, Newton’s constant G, \dots) often signal the existence of an interesting real line bundle [but… on what space, Mr Spock… what… space…]? See also dimensional analysis.

Posted by: jack morava on October 20, 2022 7:32 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

I became enlightened when I realized that Boltzmann’s constant in SI units is roughly the reciprocal of Avogadro’s number, and that this is no coincidence.

(It’s off by a factor of about 1/6, but hopefully this remark would have kept me from failing.)

Posted by: John Baez on October 18, 2022 2:47 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

4) Show that the ‘cartesian product’ of energetic sets, defined as above, gives a symmetric monoidal structure on the category of energetic sets.

I recently learned this is the monoidal product for the category of (GG-)augmented racks! Such a thing is a GG-set with an equivariant map to GG, where we take the self-action to be conjugation. For GG non-abelian the product of augmented racks gives a non-symmetric braided monoidal structure. But here we are taking GG to be the abelian group \mathbb{R}, you have the trivial action on your energetic set, and the braiding is a symmetric.

Not especially deep, but just interesting to see this product again.

Posted by: David Roberts on October 18, 2022 1:59 AM | Permalink | Reply to this

Re: Partition Function as Cardinality

Hmm, that’s weird and interesting. It would be fun if I could figure out a good way to deform the addition on \mathbb{R} into some nonabelian group stucture, but that seems hard.

Posted by: John Baez on October 18, 2022 1:05 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Wondering whether Z(X×X)=Z(X)Z(X)Z(X \times X') = Z(X) Z(X') could be taken as a defining property of the partition function led me to this a couple years ago. (A couple years… Where does the time go?!)

Posted by: Blake Stacey on October 22, 2022 4:48 AM | Permalink | Reply to this

Re: Partition Function as Cardinality

That’s nice! But can we turn it into a theorem like this?

Conjecture. Any map ZZ from energetic sets to real numbers which sends isomorphic energetic sets to the same number and obeys Z(X×X)=Z(X)Z(X)Z(X \times X') = Z(X) Z(X') must be of the form

Z(X)= iXe βE i Z(X) = \sum_{i \in X} e^{-\beta E_i}

for some β\beta \in \mathbb{R} or have Z(X)=0Z(X) = 0 for all energetic systems.

I added the last option because I noticed that exception, and there may be other exceptions I didn’t notice. I should really write XXX \otimes X' for the product of thermostatic systems, but I didn’t.

I would find it a lot easier to tackle this conjecture if we included the extra hypothesis

Z(X+X)=Z(X)+Z(X) Z(X + X') = Z(X) + Z(X')

This would let us break the problem down to energetic sets with just one element; then Z(X×X)=Z(X)Z(X)Z(X \times X') = Z(X) Z(X') gives us Cauchy’s functional equation for lnZ\ln Z assuming Z0Z \ne 0. This isn’t a proof yet (because of the possibility that Z(X)=0Z(X) = 0 for some one-element energetic sets but not all), but it’s getting close.

It would be cool if we could drop the additivity, though.

Posted by: John Baez on October 24, 2022 9:26 AM | Permalink | Reply to this

Re: Partition Function as Cardinality

Just replace \mathbb{R} with (,](-\infty,\infty] to get rid of the “exception” Z=0Z = 0 in this conjecture.

Posted by: Steve Huntsman on October 24, 2022 1:40 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Without the extra hypothesis, the assumption in that conjecture is too weak, since the solutions to the functional equation Z(X×X)=Z(X)Z(X)Z(X \times X') = Z(X) Z(X') are closed under products. For example, the squared partition function

Z(X)= i,je β(E i+E j)Z(X) = \sum_{i,j} e^{-\beta(E_i + E_j)}

still satisfies it, but it does not coincide with ZZ at any temperature since it fails the extra hypothesis.

With the extra hypothesis, the conjecture is almost true: you can replace the exponential by any function satisfying Cauchy’s exponential functional equation, and that characterizes all the ZZ that satisfy your conditions. So it should become true (and straightforward to prove) if also continuity/measurability/monotonicity is added as an assumption.

This is closely related to a characterization of the moment-generating function of a random variable given as Lemma 5.2 here. It’s also reminiscent of the multiplicative characterization of the p\ell^p norms, but obviously Tom will know more about this.

Posted by: Tobias Fritz on October 24, 2022 5:49 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

… and if Z(X)=0Z(X) = 0 for some one-element XX, then the multiplicativity implies that ZZ vanishes on a dense set of single-element energetic sets. So with continuity or monotonicity assumed, it follows that such ZZ vanishes identically.

Posted by: Tobias Fritz on October 24, 2022 6:17 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Hurrah! I’m happy to use both additivity and multiplicativity as assumptions in characterizing the partition function, because it goes along nicely with the idea that we’re decategorifying a symmetric rig category down to a commutative rig.

Besides, you showed we need both assumptions, so I have to be happy whether I like it or not.

And assuming the partition function is continuous or measurable is fine too.

Posted by: John Baez on October 24, 2022 9:27 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Short of fully decategorifying to a commutative rig, it might also be of interest to decategorify to a preordered commutative rig, where ABA \le B is defined to hold whenever there is a monomorphism ABA \to B in the original category (or regular monomorphism, or epimorphism BAB \to A, etc). This is useful because there are powerful separation theorems that can provide accurate information about this preordering in terms of homomorphisms to certain special rigs like +\mathbb{R}_+ and the tropical reals. You can think of this statement as a rig analogue of the Hahn-Banach theorem, where instead of separating by a linear functional, one separates by a rig homomorphism. I’ve recently applied this idea to the representation theory of SU(n)SU(n), where it gives a sufficient and close to necessary criterion for when the nn-th tensor power of one representation contains the nn-th tensor power of another one for large nn.

Posted by: Tobias Fritz on October 25, 2022 9:14 AM | Permalink | Reply to this

Re: Partition Function as Cardinality

Instead of describing the two preorders on energetic sets in terms of their partition functions, it’s easier to use another approach. Isomorphism classes of energetic sets correspond to measures on \mathbb{R} that are finite sums of Dirac deltas. We can write such a measure as

N= xn xδ x N = \sum_{x \in \mathbb{R}} n_x \delta_x

where all but finitely many of the natural numbers n xn_x are zero.

Then the ‘monomorphism preorder’ says that MNM \le N iff m xn xm_x \le n_x for all xx \in \mathbb{R}.

The ‘epimorphism preorder’ says that MNM \le N iff m xn xm_x \le n_x and also m x=0n x=0m_x = 0 \implies n_x = 0 for all xx \in \mathbb{R}.

Bringing in measures is really unnecessary. We could just say that isomorphism classes of finite energetic sets are elements of the free \mathbb{N}-semimodule on \mathbb{R} — at least if you’re comfortable with semimodules for semirings (which are the same as rigs). But the measure viewpoint is nice, because then the Laplace transform of the measure is the partition function of the energetic set!

Posted by: John Baez on October 25, 2022 3:04 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Exactly! With that Laplace transform being known as moment-generating function to probability theorists.

That free semimodule description works, but doesn’t capture the multiplicative structure on energetic sets. It may be more interesting to note that the rig of isomorphism classes of energetic sets is the “group rig” of the multiplicative group >0\mathbb{R}_{\gt 0} with coefficients in \mathbb{N}. The universal property of this rig identifies rig homomorphisms out of it with group homomorphisms out of >0\mathbb{R}_{\gt 0}! This is exactly the property that lets us reduce the problem of characterizing the partition function to solving the Cauchy exponential functional equation.

(I knew this before because I’m involved with applying the separation theorems mentioned above to this rig, but with respect to majorization as the preorder, which is of some interest in quantum information theory and in statistics.)

Posted by: Tobias Fritz on October 25, 2022 4:15 PM | Permalink | Reply to this

Re: Partition Function as Cardinality

Neat! I can think of a couple interesting preorders on energetic sets, which both come naturally from the category of energetic sets that I hinted at in my post (the slice category Set/\mathsf{Set}/\mathbb{R}). One comes from epimorphisms and the other from monomorphisms.

In statistical mechanics the first would be used to define ‘quotients’ of physical systems, where some states with the same energy get identified. The second would be used when the set of states of one system is a subset of the set of states of the other, with the same energies.

However, there seems to be a relationship between these two preorders!

Say we have two energetic sets

E:X,E:X E : X \to \mathbb{R}, \qquad E': X' \to \mathbb{R}

and an epimorphism from the first to the second. Then I think there’s a monomorphism from the second to the first. The converse is not true: this is easy to see in an example. So we seem to be getting two preorders: a stronger one and a weaker one.

This seems to follow from some general abstract nonsense about slice categories of Set\mathsf{Set} if you assume the axiom of choice, which I’m perfectly happy to do here for various reasons.

Say we have morphism from the first to the second, meaning

f:XX f: X \to X'

such that

E=Ef E = E' \circ f

I believe this morphism is an epimorphism iff ff is onto. Then assuming the axiom of choice we can pick a map

g:XX g: X' \to X

that’s a section, i.e. such that fg=1 Xf \circ g = 1_{X'}, and this will automatically have

E=Efg=Eg E' = E' \circ f \circ g = E \circ g

so this map will be a morphism of energetic sets from E:XE': X' \to \mathbb{R} back to E:XE : X \to \mathbb{R}, which is a right inverse to our original morphism. And I believe it’s a monomorphsm.

It’s fun to think about these two preorders on energetic sets in terms of their partition functions, but this is getting long so I’ll stop here.

Posted by: John Baez on October 25, 2022 11:18 AM | Permalink | Reply to this

Post a New Comment