Physlib

Physlib.StatisticalMechanics.CanonicalEnsemble.Lemmas

Canonical Ensemble: Thermodynamic Identities and Relations

This file develops relations between the *mathematical* objects defined in `Basic.lean` and the *physical* thermodynamic quantities, together with calculus identities for the canonical ensemble.

Contents Overview

1. Helmholtz Free Energies * `mathematicalHelmholtzFreeEnergy` * Relation to physical `helmholtzFreeEnergy` with semi–classical correction.

2. Entropy Relations * Pointwise logarithm of (mathematical / physical) Boltzmann probabilities. * Key identity: `differentialEntropy = kB * β * meanEnergy + kB * log Z_math` * Fundamental link: `thermodynamicEntropy = differentialEntropy - kB * dof * log h` (semi–classical correction term). * Specializations removing the correction when `dof = 0` or `phaseSpaceUnit = 1`.

3. Fundamental Thermodynamic Identity * Proof of `F = U - T S_thermo`. * Equivalent rearrangements giving entropy from energies and free energy. * Discrete / normalized specialization (no correction).

4. Mean energy as `U = - d/dβ log Z_math` and likewise with the physical partition function (constant factor cancels).

Design Notes

* All derivative statements are given as `derivWithin` on `Set.Ioi 0`, matching the physical domain β > 0. * Assumptions (finiteness, integrability) are parameterized to keep lemmas reusable. * Semi–classical correction appears systematically as `kB * dof * log phaseSpaceUnit`.

References

Same references as `Basic.lean` (Landau–Lifshitz; Tong), especially the identities `F = U - T S` and `U = -∂_β log Z`.

The Fundamental Thermodynamic Identity

Fluctuations: variance identity

Heat capacity and parametric FDT

26 declarations

definition

Mathematical Helmholtz free energy Fmath(T)F_{\text{math}}(T)

For a given canonical ensemble C\mathcal{C} at temperature TT, the **mathematical Helmholtz free energy** is defined as the product of the negative Boltzmann constant kBk_B, the temperature TT, and the natural logarithm of the mathematical partition function Zmath(T)Z_{\text{math}}(T): Fmath(T)=kBTln(Zmath(T))F_{\text{math}}(T) = -k_B T \ln(Z_{\text{math}}(T)) This quantity serves as an intermediate thermodynamic potential that relates the microscopic statistical properties (via the partition function) to macroscopic thermodynamics, prior to any semi-classical corrections.

theorem

Relation between physical and mathematical Helmholtz free energy: F=Fmath+kBTdlnhF = F_{\text{math}} + k_B T d \ln h

For a canonical ensemble C\mathcal{C} at temperature TT, assuming that the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite and the base measure μ\mu is non-zero, the physical Helmholtz free energy F(T)F(T) is related to the mathematical Helmholtz free energy Fmath(T)F_{\text{math}}(T) by the following identity: F(T)=Fmath(T)+kBTdln(h)F(T) = F_{\text{math}}(T) + k_B T d \ln(h) where kBk_B is the Boltzmann constant, dd is the number of degrees of freedom of the system, and hh is the phase space unit.

theorem

Sdiff=kBβU+kBlnZmathS_{\text{diff}} = k_B \beta U + k_B \ln Z_{\text{math}}

For a canonical ensemble C\mathcal{C} at temperature TT, let the Boltzmann measure μBolt\mu_{\text{Bolt}} be finite, the base measure μ\mu be non-zero, and the energy function EE be integrable with respect to the canonical probability measure μProd\mu_{\text{Prod}}. Then the differential entropy Sdiff(T)S_{\text{diff}}(T) is related to the mean energy UU and the mathematical partition function Zmath(T)Z_{\text{math}}(T) by the identity: Sdiff(T)=kBβU+kBln(Zmath(T))S_{\text{diff}}(T) = k_B \beta U + k_B \ln(Z_{\text{math}}(T)) where kBk_B is the Boltzmann constant and β=1kBT\beta = \frac{1}{k_B T} is the inverse temperature.

theorem

logρ(i)=βE(i)logZmath(T)\log \rho(i) = -\beta E(i) - \log Z_{\text{math}}(T)

For a canonical ensemble C\mathcal{C} on a space of microstates ι\iota with energy function EE, let TT be the temperature with inverse temperature β=1kBT\beta = \frac{1}{k_B T}. If the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite and the base measure μ\mu is non-zero (ensuring the mathematical partition function Zmath(T)Z_{\text{math}}(T) is strictly positive), then the natural logarithm of the probability density ρ(i)\rho(i) for a microstate iιi \in \iota is given by: log(ρ(i))=βE(i)log(Zmath(T))\log(\rho(i)) = -\beta E(i) - \log(Z_{\text{math}}(T))

theorem

kBβ=1/Tk_B \beta = 1/T

For any temperature T>0T > 0, the product of the Boltzmann constant kBk_B and the inverse temperature β\beta (defined as β=1kBT\beta = \frac{1}{k_B T}) is equal to the reciprocal of the temperature: kBβ=1Tk_B \beta = \frac{1}{T}

theorem

S(T)=Sdiff(T)kBdlnhS(T) = S_{\text{diff}}(T) - k_B d \ln h

For a canonical ensemble C\mathcal{C} at temperature TT, suppose the energy function EE is integrable with respect to the canonical probability measure μProd\mu_{\text{Prod}}, the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite, and the base measure μ\mu is non-zero. Then the thermodynamic entropy S(T)S(T) is related to the differential entropy Sdiff(T)S_{\text{diff}}(T) by the following identity: S(T)=Sdiff(T)kBdln(h)S(T) = S_{\text{diff}}(T) - k_B d \ln(h) where kBk_B is the Boltzmann constant, dd is the number of degrees of freedom, and hh is the fundamental phase space unit. This identity represents the semi-classical correction required to relate the mathematical differential entropy to the absolute thermodynamic entropy.

theorem

S(T)=Sdiff(T)S(T) = S_{\text{diff}}(T) for Zero Degrees of Freedom (d=0d=0)

For a canonical ensemble C\mathcal{C} at temperature TT, suppose that the energy function EE is integrable with respect to the canonical probability measure μProd\mu_{\text{Prod}}, the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite, and the base measure μ\mu is non-zero. If the number of degrees of freedom is d=0d = 0, then the absolute thermodynamic entropy S(T)S(T) is equal to the differential entropy Sdiff(T)S_{\text{diff}}(T): S(T)=Sdiff(T)S(T) = S_{\text{diff}}(T) This result implies that there is no semi-classical correction required when the system has zero degrees of freedom.

theorem

S(T)=Sdiff(T)S(T) = S_{\text{diff}}(T) for phase space unit h=1h = 1

For a canonical ensemble C\mathcal{C} at temperature TT, let S(T)S(T) be the absolute thermodynamic entropy and Sdiff(T)S_{\text{diff}}(T) be the differential entropy. Suppose that the energy function EE is integrable with respect to the canonical probability measure μProd\mu_{\text{Prod}}, the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite, and the base measure μ\mu is non-zero. If the fundamental phase space unit hh is equal to 1, then the thermodynamic entropy and the differential entropy are equal: S(T)=Sdiff(T)S(T) = S_{\text{diff}}(T) This result reflects that the semi-classical correction term kBdln(h)k_B d \ln(h) vanishes when the phase space unit is unity.

theorem

Fundamental Thermodynamic Identity F=UTSF = U - TS

For a canonical ensemble C\mathcal{C} at temperature T>0T > 0, suppose that the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite, the base measure μ\mu is non-zero, and the energy function EE is integrable with respect to the canonical probability measure μProd\mu_{\text{Prod}}. Then the Helmholtz free energy F(T)F(T), the mean energy U(T)U(T), and the absolute thermodynamic entropy S(T)S(T) satisfy the fundamental thermodynamic identity: F(T)=U(T)TS(T)F(T) = U(T) - T S(T)

theorem

Sdiff=UFT+kBdlnhS_{\text{diff}} = \frac{U - F}{T} + k_B d \ln h

For a canonical ensemble C\mathcal{C} with dd degrees of freedom and phase space unit hh, at a temperature T>0T > 0, assume that the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite, the base measure μ\mu is non-zero, and the energy function EE is integrable with respect to the canonical probability measure. Then the differential entropy Sdiff(T)S_{\text{diff}}(T) is related to the mean energy UU and the Helmholtz free energy FF by the identity: Sdiff(T)=UFT+kBdlnhS_{\text{diff}}(T) = \frac{U - F}{T} + k_B d \ln h where kBk_B is the Boltzmann constant. This relation accounts for the semi-classical correction term kBdlnhk_B d \ln h required to connect the mathematical differential entropy to the physical thermodynamic quantities.

theorem

Sdiff=UFTS_{\text{diff}} = \frac{U - F}{T} for Systems without Semi-classical Correction

For a canonical ensemble C\mathcal{C} at temperature T>0T > 0, assume that the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite, the base measure μ\mu is non-zero, and the energy function EE is integrable with respect to the canonical probability measure μProd\mu_{\text{Prod}}. If the system either has zero degrees of freedom (d=0d = 0) or the phase space unit is normalized to unity (h=1h = 1), the semi-classical correction term kBdlnhk_B d \ln h vanishes. In this case, the differential entropy SdiffS_{\text{diff}} is equal to the difference between the mean energy UU and the Helmholtz free energy FF, divided by the temperature TT: Sdiff=UFTS_{\text{diff}} = \frac{U - F}{T}

theorem

The derivative of log(f(t))\log(f(t)) equals 1f(x)f\frac{1}{f(x)} f'

Let f:RRf: \mathbb{R} \to \mathbb{R} be a real-valued function and sRs \subseteq \mathbb{R} be a set. If ff has a derivative ff' at a point xx within the set ss, and f(x)0f(x) \neq 0, then the composition log(f(t))\log(f(t)) also has a derivative at xx within ss, which is given by 1f(x)f\frac{1}{f(x)} \cdot f'.

theorem

Derivative of log(f(t))\log(f(t)) is 1f(x)f\frac{1}{f(x)} f'

Let f:RRf: \mathbb{R} \to \mathbb{R} be a real-valued function and sRs \subseteq \mathbb{R} be a set. If ff has a derivative ff' at a point xx within the set ss, and f(x)0f(x) \neq 0, then the composition log(f(t))\log(f(t)) also has a derivative at xx within ss, which is given by 1f(x)f\frac{1}{f(x)} \cdot f'.

theorem

ϕdμBolt=ϕeβEdμ\int \phi \, d\mu_{\text{Bolt}} = \int \phi e^{-\beta E} \, d\mu

Let C\mathcal{C} be a canonical ensemble on a space of microstates ι\iota with base measure μ\mu and energy function E:ιRE: \iota \to \mathbb{R}. For a given temperature TT, let β=1kBT\beta = \frac{1}{k_B T} be the inverse temperature and μBolt\mu_{\text{Bolt}} be the corresponding Boltzmann measure. Then, for any real-valued function ϕ:ιR\phi: \iota \to \mathbb{R}, the integral of ϕ\phi with respect to the Boltzmann measure μBolt\mu_{\text{Bolt}} is equal to the integral of the product of ϕ\phi and the Boltzmann factor eβEe^{-\beta E} with respect to the base measure μ\mu: ιϕ(x)dμBolt(x)=ιϕ(x)eβE(x)dμ(x)\int_\iota \phi(x) \, d\mu_{\text{Bolt}}(x) = \int_\iota \phi(x) e^{-\beta E(x)} \, d\mu(x)

theorem

EdμBolt=EeβEdμ\int E \, d\mu_{\text{Bolt}} = \int E e^{-\beta E} \, d\mu

Let C\mathcal{C} be a canonical ensemble on a space of microstates ι\iota with base measure μ\mu and energy function E:ιRE: \iota \to \mathbb{R}. For a given temperature TT, let β=1kBT\beta = \frac{1}{k_B T} be the inverse temperature and μBolt\mu_{\text{Bolt}} be the corresponding Boltzmann measure. The integral of the energy function EE with respect to the Boltzmann measure is equal to the integral of the product of the energy and the Boltzmann factor eβEe^{-\beta E} with respect to the base measure μ\mu: ιE(x)dμBolt(x)=ιE(x)eβE(x)dμ(x)\int_\iota E(x) \, d\mu_{\text{Bolt}}(x) = \int_\iota E(x) e^{-\beta E(x)} \, d\mu(x)

theorem

Mean energy U=EeβEdμeβEdμU = \frac{\int E e^{-\beta E} \, d\mu}{\int e^{-\beta E} \, d\mu}

Let C\mathcal{C} be a canonical ensemble on a space of microstates ι\iota with base measure μ\mu and energy function E:ιRE: \iota \to \mathbb{R}. For a given temperature TT with corresponding inverse temperature β=1kBT\beta = \frac{1}{k_B T}, the mean energy UU is equal to the ratio of the integral of the energy weighted by the Boltzmann factor eβEe^{-\beta E} to the integral of the Boltzmann factor itself: U=ιE(i)eβE(i)dμ(i)ιeβE(i)dμ(i) U = \frac{\int_{\iota} E(i) e^{-\beta E(i)} \, d\mu(i)}{\int_{\iota} e^{-\beta E(i)} \, d\mu(i)} where the denominator corresponds to the mathematical partition function Zmath(T)Z_{\text{math}}(T).

theorem

U=ddβlogZmathU = -\frac{d}{d\beta} \log Z_{\text{math}}

Let C\mathcal{C} be a canonical ensemble on a space of microstates ι\iota with base measure μ\mu and energy function E:ιRE: \iota \to \mathbb{R}. For a given temperature T>0T > 0 with inverse temperature β=1kBT\beta = \frac{1}{k_B T}, assume that the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite and the base measure μ\mu is non-zero. If the mathematical partition function, defined as Zmath(β)=ιeβE(i)dμ(i)Z_{\text{math}}(\beta) = \int_{\iota} e^{-\beta E(i)} \, d\mu(i), is differentiable at β\beta (within the domain β>0\beta > 0) with derivative dZmathdβ=ιE(i)eβE(i)dμ(i),\frac{d Z_{\text{math}}}{d\beta} = -\int_{\iota} E(i) e^{-\beta E(i)} \, d\mu(i), then the mean energy UU of the ensemble at temperature TT is given by the negative derivative of the logarithm of the mathematical partition function with respect to β\beta: U=ddβlogZmath(β)U = -\frac{d}{d\beta} \log Z_{\text{math}}(\beta)

theorem

logZ=logZmathdlogh\log Z = \log Z_{\text{math}} - d \log h for β>0\beta > 0

Consider a canonical ensemble C\mathcal{C} with a non-zero base measure μ\mu, energy function EE, dd degrees of freedom, and phase space unit hh. Provided that the Boltzmann measure is finite for all inverse temperatures β>0\beta > 0, then for any β(0,)\beta \in (0, \infty), the logarithm of the physical partition function ZZ is related to the logarithm of the mathematical partition function ZmathZ_{\text{math}} by the following identity: logZ(β)=logZmath(β)dlogh\log Z(\beta) = \log Z_{\text{math}}(\beta) - d \log h where Zmath(β)=ιeβE(i)dμ(i)Z_{\text{math}}(\beta) = \int_{\iota} e^{-\beta E(i)} \, d\mu(i).

theorem

ddβlogZ=ddβlogZmath\frac{d}{d\beta} \log Z = \frac{d}{d\beta} \log Z_{\text{math}}

Consider a canonical ensemble C\mathcal{C} on a space of microstates ι\iota with base measure μ\mu and energy function EE. Let T>0T > 0 be the temperature and β=1kBT\beta = \frac{1}{k_B T} be the inverse temperature. Suppose that the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite for all inverse temperatures β>0\beta > 0 and the base measure μ\mu is non-zero. Then the derivative of the logarithm of the physical partition function ZZ with respect to β\beta is equal to the derivative of the logarithm of the mathematical partition function ZmathZ_{\text{math}} with respect to β\beta: ddβlogZ(β)=ddβlogZmath(β)\frac{d}{d\beta} \log Z(\beta) = \frac{d}{d\beta} \log Z_{\text{math}}(\beta) where the mathematical partition function is defined as Zmath(β)=ιeβE(i)dμ(i)Z_{\text{math}}(\beta) = \int_{\iota} e^{-\beta E(i)} \, d\mu(i). The derivatives are taken within the domain β(0,)\beta \in (0, \infty).

theorem

U=ddβlogZU = -\frac{d}{d\beta} \log Z

Consider a canonical ensemble C\mathcal{C} on a space of microstates ι\iota with base measure μ\mu and energy function EE. Let T>0T > 0 be the temperature and β=1kBT\beta = \frac{1}{k_B T} be the inverse temperature. Suppose that the base measure μ\mu is non-zero and the Boltzmann measure μBolt\mu_{\text{Bolt}} is finite for all inverse temperatures β>0\beta > 0. If the mathematical partition function Zmath(β)=ιeβE(i)dμ(i)Z_{\text{math}}(\beta) = \int_{\iota} e^{-\beta E(i)} \, d\mu(i) is differentiable at β\beta with derivative dZmathdβ=ιE(i)eβE(i)dμ(i),\frac{d Z_{\text{math}}}{d\beta} = -\int_{\iota} E(i) e^{-\beta E(i)} \, d\mu(i), then the mean energy UU at temperature TT is equal to the negative derivative of the logarithm of the physical partition function ZZ with respect to β\beta: U=ddβlogZ(β)U = -\frac{d}{d\beta} \log Z(\beta) where the derivative is taken within the domain β(0,)\beta \in (0, \infty).

theorem

Energy Variance Identity Var(E)=E2E2\text{Var}(E) = \langle E^2 \rangle - \langle E \rangle^2

For a canonical ensemble C\mathcal{C} over a space of microstates ι\iota at temperature TT, if the canonical probability measure μProd\mu_{\text{Prod}} is a probability measure, and the microstate energy function EE and its square E2E^2 are integrable with respect to μProd\mu_{\text{Prod}}, then the energy variance Var(E)\text{Var}(E) is equal to the mean square energy E2\langle E^2 \rangle minus the square of the mean energy E\langle E \rangle: Var(E)=E2E2 \text{Var}(E) = \langle E^2 \rangle - \langle E \rangle^2

definition

Mean energy UU as a function of temperature tt

For a canonical ensemble C\mathcal{C} and a real number tt, this function returns the mean energy UU of the system at temperature tt. It is defined by converting the real value tt into a non-negative temperature and calculating the expectation value of the energy function EE with respect to the canonical probability measure μProd\mu_{\text{Prod}}: U(t)=ιE(i)dμProd(T) U(t) = \int_{\iota} E(i) \, d\mu_{\text{Prod}}(T) where TT is the temperature corresponding to the real value tt.

definition

Mean energy UU as a function of inverse temperature β\beta

For a canonical ensemble C\mathcal{C}, this function calculates the mean energy UU as a function of the real-valued inverse temperature β\beta. It is defined as the mean energy U(T)U(T) evaluated at the temperature T=1kBβT = \frac{1}{k_B \beta}, where kBk_B is the Boltzmann constant and β\beta is the non-negative part of the input bRb \in \mathbb{R}.

definition

Heat capacity CV=dUdTC_V = \frac{dU}{dT}

For a canonical ensemble C\mathcal{C} and a temperature TT, the heat capacity at constant volume CVC_V is the derivative of the mean energy U(T)U(T) with respect to temperature TT. It is defined as the derivative of the function U(t)U(t) (representing `meanEnergy_T`) within the set of positive real numbers (0,)(0, \infty), evaluated at the value of the temperature TT: CV(T)=dUdT C_V(T) = \frac{dU}{dT} where U(t)U(t) is the mean energy of the ensemble at temperature tt.

theorem

CV=dUdβ(1kBT2)C_V = \frac{dU}{d\beta} \cdot \left( -\frac{1}{k_B T^2} \right)

For a canonical ensemble C\mathcal{C} and a temperature T>0T > 0, let U(β)U(\beta) be the mean energy expressed as a function of the inverse temperature β=1kBT\beta = \frac{1}{k_B T}. If U(β)U(\beta) is differentiable at β\beta (within the domain (0,)(0, \infty)) with derivative dUdβ\frac{dU}{d\beta}, then the heat capacity at constant volume CVC_V at temperature TT is given by: CV=dUdβ(1kBT2) C_V = \frac{dU}{d\beta} \cdot \left( -\frac{1}{k_B T^2} \right) where kBk_B is the Boltzmann constant and the derivative dUdβ\frac{dU}{d\beta} is evaluated at the inverse temperature corresponding to TT.

theorem

Parametric Fluctuation-Dissipation Theorem CV=Var(E)kBT2C_V = \frac{\text{Var}(E)}{k_B T^2}

For a canonical ensemble C\mathcal{C} at temperature T>0T > 0, let U(β)U(\beta) be the mean energy expressed as a function of the inverse temperature β=1kBT\beta = \frac{1}{k_B T}, where kBk_B is the Boltzmann constant. Suppose that U(β)U(\beta) is differentiable at β\beta (within the interval (0,)(0, \infty)) and that the energy variance Var(E)\text{Var}(E) satisfies the identity Var(E)=dUdβ\text{Var}(E) = -\frac{dU}{d\beta}. Then the heat capacity at constant volume CVC_V is given by: CV=Var(E)kBT2 C_V = \frac{\text{Var}(E)}{k_B T^2}