{'fraction_non_alphanumeric': 0.04844525892646016, 'fraction_numerical': 0.011527547883660439, 'mean_word_length': 4.328031496062992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Representations and Divergences in the Space of Probability Measures and Stochastic Thermodynamics

Radon-Nikodym (RN) derivative between two measures arises naturally in the affine structure of the space of probability measures with densities. Entropy, free energy, relative entropy, and entropy production as mathematical concepts associated with RN derivatives are introduced. We identify a simple equation that connects two measures with densities as a possible mathematical basis of the entropy balance equation that is central in nonequilibrium thermodynamics. Application of this formalism to Gibbsian canonical distribution yields many results in classical thermomechanics. An affine structure based on the canonical represenation and two divergences are introduced in the space of probability measures. It is shown that thermodynamic work, as a conditional expectation, is indictive of the RN derivative between two energy represenations being singular. The entropy divergence and the heat divergence yield respectively a Massieu-Planck potential based and a generalized Carnot inequalities.


Introduction
A subtle distinction exists between the prevalent approach to stochastic processes in applied mathematics and the physicist's perspective on stochastic dynamics: In Kolmogorov's theory of stochastic processes, the dynamics are described in terms of a trajectory {x(t) : t ∈ [0, ∞)}. Applied mathematicians treat each of these trajectories as a random event in a large probability space and then study probability distributions over the space of all possible trajectories x(t). Physists, however, are more accustomed to thinking of a "probability distribution changing with time," ρ(x, t). In the case of continuous-time Markov processes, ρ(x, t) is described by the solution to a Fokker-Planck equation or a master equation, while for a Markov chain simply by a stochastic matrix. This latter perspective can perhaps be more rigorously formulated in the space of probability measures. The dynamics are then represented as a change of measure. The Radon-Nikodym (RN) derivative is a key mathematical concept associated with changes of measure [20]. Interestingly, RN derivative between two measures is also at the heart of the concept of fluctuating entropy [31,40].
This "probability distribution changing with time" view is, of course, not foreign to mathematics. Actually in the 1950s, the stochastic diffusion process developed by Feller, Nelson, and others was precisely a such theory [9,23,17,27]. That approach, based on solutions to linear parabolic partial differential equations, was formulated in a linear function space. We now know that a more geometrically intrinsic representation for the space of probability measures cannot be linear: There is simply no natural choice of origin. Rather, an affine space is more appropriate [11,37].
Entropy and energy are key concepts in the classical theory of thermodynamics, which is now well understood to have a probabilistic basis. In fact, one could argue that the very notion of "heat" arises only when one treats the motions of deterministic Newtonian point masses as stochastic. In the statistical treatment of thermodynamics, Gibbs' canonical energy distribution is one of the key results that characterize a thermodynamic equilibrim [26]. As we shall see, it figures prominently in the affine space.
The foregoing discussion suggests the possibility of re-thinking thermodynamics and information theory in a novel mathematical framework. Both information theory and thermodynamics are concerned with notions such as entropy, free energy and relative entropy. These concepts are introduced in Sec. 2 under a single framework based on the Radon-Nikodym derivative, as a random variable relating two different measures. In its broadest context, we are able to capture the essential mathematics used in the theory of equilibrium and nonequilibrium thermodynamics. This approach significantly enriches the scope of "information theory" [6]. The RN derivative should not be treated as an esoteric mathematical concept: It is simply a powerful way to quantify even infinitesimal changes in the probability distributions; it is the calculus for thinking of change in terms of chance.
In Sec. 3, the notion of a temperature, T = β −1 is introduced through the canonical probability distribution Z −1 (β)e −βU (ω) . It has been shown recently that this Gibbsian distribution has a much broader applications than just thermal physics: It is in fact a limit theorem of probability in the context of slow-fast dynamics with an additive quasi-conservative quantity, as a conditional probability density [5]. The focus of this section is to show the centrality of RN derivative in the theory of thermodynamics. The RN derivative is used to describe several results in physics that includes the thermodynamic cycle, equation of states, and the Jarzynski-Crooks equalities.
Next, in Sec. 4 we equip the space of probability measures with an affine structure and show that the canonical distribution with a random variable U (ω) and a parameter β becomes precisely an affine line in the space of probability measures when one particular measure P is chosen as a reference point. With this, the tangent space becomes a linear vector space of random variables and it provides a represenation for the space of probability measures. A series of results are obtained. Readers who are more mathematically inclined can skip the Sec. 3, come directly to Sec. 4, and then go back to Sec. 3 afterward.
Sec. 5 contains some discussions. The presentation of the paper is not mathematically rigorous. The emphasis is on illustrating how the pure mathematical concepts can be fittingly applied in narrating this branch of physics. More thorough treatments of the subject are forthcoming [37].
2 Entropy, free energy, relative entropy and a fundamental equation of information

Information and entropy
Information theory owes (to a large extent) its existence as a separate subject from the theories of probability and statistics to a singular emphasis on the notion of entropy as a quantitative measure of information. It is important to point out at the outset that information is a random variable, defined on a probability space (Ω, F, P), through a Radon-Nikodym derivative dP dµ (ω), ω ∈ Ω, between two measures P and µ that are absolutely continuous w.r.t. each other [31,34,40]. If the Ω ⊆ R n and µ is the Lebesgue measure, then is the self-information [19], which is a random variable and its expected value is the standard form of Shannon entropy: in which the Radon-Nikodym derivative is the probability density function, dP dµ ≡ f (x). In general, if µ is normalizable, then one has a maximum entropy inequality S[P] ≤ ln µ(Ω) < +∞. Similarly, one has the free energy When µ is also a normalized probability measure P ′ , the H[P P ′ ] is called the relative entropy or Kullback-Leibler (KL) divergence. The minimum free energy inequality in (3) becomes the better known, but less interesting, H[P P ′ ] ≥ 0.
From now on, we will drop most references to the underlying space (Ω, F). Moreover, we will assume that Ω ⊆ R n with the usual σ-algebra and that P is absolutely continuous w.r.t. the Lebesgue measure. These conditions are not strictly necessary, but they simplify the notation considerably in illustrating our key ideas.

Fundamental equation of information
With the various forms of entropy introduced above and some straightforward statistical logic, one naturally has the following equation that involves three measures: two probabilistic and the Lebesgue. In particular, let P 1 and P 2 be two probability measures with density functions f 1 (x) and f 2 (x) with respect to the Lebesgue measure: The entropy production ∆S (i) is never negative, while the entropy exchange ∆S (e) has no definitive sign. If f 2 (x) is the unique invariant density of some measure-preserving dynamics [21], then − ln f 2 (x) is customarilly referred to as the "equilibrium energy function", then ∆S (e) is the change in the "mean energy", which is related to "heat". Entropy and free energy in (2) and (3) have their namesakes in the theory of statistical equilibrium thermodynamics [26]. The Second Law, in terms of entropy maximization or free energy minimization, has its statistical basis precisely in the two inequalities associated with S and H. The ∆S (i) term on the rhs of (4), however, is a nonequilibrium free energy associated with a nonequilibrium distribution, either due to a spontaneous fluctuation or a man-made perturbation [30]. In the theory of stochastic dynamics, one uses a probability distribution ρ(x, t) to represent the state of a system; thus any ρ that differs from the equilibrium distribution is a nonequilibrium distribution. In applications to laboratory systems, the ρ can only be obtained from a data-based statistical approach. This approach can rely on either a time scale separation, or a system of many independent and identically distributed subsystems, or a fictitious ensemble. Ideal gas theory and Rouse polymers are two successful examples of the second type [30].
Eq. 4 in fact has the form of the fundamental equation of nonequilibrium thermodynamics. It states that if f 2 (x) is uniform, then ∆S = ∆S (i) ≥ 0; and if one identifies U (x) −T ln f 2 (x), where T is a positive constant, then one can introduce F [P] E P [U ]−T S[P], and ∆F = T ∆S (i) ≥ 0. Unifying the various forms of the Second Law to a single concept of entropy production was a key idea of the Brussel school of thermodynamics [29]. 1 See [33,35,40], and the references cited within, for the theory of entropy production of Markov processes.

Two results on relative entropy
With regards to relative entropy, there are two results worth discussing.
First, as the expected value of the logarithm of the Radon-Nikodym derivative ξ ≡ ln dP 1 dP 2 (ω) , the relative entropy between two probability measures can be written as with respective probability density functions f 1 (x) = dP 1 (x) dx and f 2 (x) = dP 2 (x) dx . The nonnegativity of the H[P 1 P 2 ] can actually be framed as a consequence of a stronger result, an equality and an inequality for convex exponential function: Eq. 6 implies that the Second Law and entropy production could even be formulated through equalities rather than inequalities. Indeed, variations of (6) have found numerous applications in thermodynamics, such as Zwanzig's free energy perturbation method [41], the Jarzynski-Crooks equality [16,7], and the Hatano-Sasa equality [13]. Second, if the density f 2 contains an unknown parameter θ, then f 2 (x; θ) is the likelihood function for θ. In this case, with respect to the change of measure, I 0 (θ) is the Shannon entropy of X 2 (θ), I 1 (θ) ≡ 0, and I 2 (θ) is the Fisher Information for X 2 (θ):

Canonical distribution and thermodynamics
In many applications, stochastic dynamics exhibit a separation of slow and fast time scales. In mechanical systems with sufficiently small friction, the dynamics are organzied as fast Hamiltonian dynamics with slow energy dissipation through heat. The theory of thermodynamics arises in this context when the mechanical motions of point masses are described stochastically. It can be shown then that the probability distribution for the energy E of a small mechanical system in equilibrium with a heat bath takes a particularly canonical form in which β −1 = T is the temperature of the heat bath [26,5]. In fact, if x denotes random variable in an appropriate state space and U (x) is the mechanical energy function, then one has distribution f x (x) ∝ e −βU (x) , and in which ln Ω (B) and ln Ω (G) are called Boltzmann's entropy and Gibbs' entropy in statistical mechanics [10].
is a measure and Ω (B) is its density. Note that the expected value of any function of the energy U (x) (e.g., g(U )) is invariant under different representations as a result of the rules of changes of variable for integration. For example, if x is a state space representation and E is the energy representation, then In contrast, the thermodynamic entropy in statistical mechanics is not invariant under different representations [24]: The rhs of (13a) is precisely the negative free energy with non-normalized Ω (G) (y) as the reference measure (which has density Ω (B) (y)). The missing term from (13a) to (13b) is contributed by the reference measure. It is mean-internal-energy-like.
We see that while ln Ω (B) (y) is widely considered as an "entropic" term, it actually plays the role of an energetic term in the energy represenation in (13a). In terms of this measure-theoretic framework, the distinction between entropy and energy is always relative. This has long been understood in the work of J. G. Kirkwood on the potential of mean force, which is itself temperature dependent [18].

Thermodynamics under a single temperature
Equilibrium statistical thermodynamics. In terms of the canonical distribution in (10), an equilibrium system under a constant temperature T = β −1 has its mechanical energy distributed according to the canonical distribution p eq (y) = Z −1 (β)Ω(y)e −βy . (We have dropped the superscript in Ω (B) (y) to avoid cluttering.) The mean internal energy associated with the p eq (y) is then the expected value which can be decomposed into an equilibrium free energy and an entropy, One can verify that the S(β) is the same as (13a), but not (13b). Nonequilibrium statistical thermodynamics. For deep mathematical reasons that will become clear in Sec. 4, discussions of nonequilibrium systems should begin in the full state space. Intuitively, the canonical energy representation p eq (E) based on a given energy function U (x) is a "projection" in the space of probability measures that is nonholographic.
Consider a system outside statistical equilibrium with a nonequilibrium probability measure µ neq . Suppose that this measure is absolutely continuous w.r.t. some other probability measure P, with density ρ(x) = dµ neq dP (x). The measure µ neq possesses a nonequilibrium free energy functional (a potential that can cause change) given by One should recognize the fraction in (16b) as a Radon-Nikodym derivative of ρ w.r.t. the nonnormalized canonical equilibrium measure e −βU (x) . The minimum free energy inequality in (3) takes the form F neq ρ; β ≥ F eq (β) for any distribution ρ. In fact, β{F neq ρ; β − F eq (β)} is the entropy production associated with the spontaneous relaxation process of the distribution ρ tending to p eq . The F neq ρ; β also has another expression: Eq. 17 is very telling: The internal energy of a system in state x is given in the second term with a fixed energy gauge (i.e., the arbitrary constant in the U (x)) according to the equilibirum F eq , where . This fact implies that a change in the energy function from U 1 (x) to U 2 (x) necessarily involves a change of gauge. Mechanical work in classical thermodynamics can be understood as a consequence of gauge invariance. One particular β defines an autonomous, time-homogeneous stochastic dynamical system with a unique p eq . All the energetic discussions in such a system are with respect to the equilibrium free energy F eq (β), which fixes a choice for the energy gauge. In the theory of probability, the gauge invariance is achieved through the notion of conditional probability and the law of total probability.

A clarification of Eq. 16
A discussion on the meaning of the expression in (16) is in order. To do that, let us only consider discrete x k , and the corresponding , which represents the traditional potential energy of the system in the state z. A question then naturally arises: Why but not Actually, (19b) is the potential energy for a deterministic initial state x k . It is natural, therefore, the average would be carried out over the (19b) if the initial state of the system were a mixture of heterogeneous states (mhs). However, if the initial state is a stochastic fluctuating state (sfs), then the entropy of assimilation applies [3] and the F neq [ρ; β] in (16a) is the average carried out over the (19a). The change from mhs to sfs is analogous to a change from the Lagrangian to the Eulerian representation in fluid mechanics; in stochastic terms, the potential for an sfs to do work is lower than an mhs [25].

Work, heat, and Jarzynski-Crooks' equality
We now consider the case where the distribution ρ(x) in (16) arises from the equilibrium distribution p eq (x) as the consequence of a temperture change from T a to T b : . Note that in the energy representation they can be written as ρ E (y) = Z −1 (β a )Ω(y)e −βay and p eq E (y) = Z −1 (β b )Ω(y)e −β b y ; they share the same Gibbs entropy ln Ω(y) determined by U (x) as in (12). Then The equation from (20a) to (20b) utilizes a key property of a Radon-Nikodym derivative: When it exists, it is invariant under a change of measure. Eq. 20c is not widely discussed, but it is a highly meaningful result. It contains the essence of Crooks' equality in time-inhomogenous Markov processes [7]. It implies that at the instant of switching from T a to T b , the system has internal energy U (β a ), entropy S(β a ), and nonequilibrium free energy Assuming that both ρ(x) and p eq (x) have the same Ω(y), Eq. 20 gives the free energy change that is expected to be the maximum reversible work that can be extracted. We now explicitly consider a change from ρ(x) to p eq (x) that involves changing the mechanical energy function from U 1 (x) to U 2 (x). Even though the corresponding canonical energy distributions are ρ E (y) = Z −1 1 (β a )Ω 1 (y)e −βay and p eq E (y) = Z −1 2 (β b )Ω 2 (y)e −β b y , these RN derivative dρ E dp eq (ω) can be infinity! Thus in this case one has to start with the full distributions on the state space: The last term in (22) is identified with the irreversible work associated with the isothermal relaxation process with mechanical change from U 1 (x) to U 2 (x), in which W 12 (x) should be considered as the logarithm of the Radon-Nikodym derivative between two non-normalized measures W 12 (x) is actually not a function of β; work done in an isothermal process is independent of the temperature. In the canonical energy representation of U 1 (x), then, The first term inside {· · · } is a conditional expectation: E eq U 2 (x) U 1 (x) = y , where E eq is the expectation in terms of the equilibrium measure p eq (x). The transfered irreversible heat is Then the relation is known as the Clausius inequality in thermodynamics. The equality is a special case of the fundamental equation of nonequilibrium thermodynamics. Concerning the work W 12 (x) in (24), we have Jarzynski-Crooks' equality [16,7]: Note that the work is performed under β b , but the rhs of (28) is evalued at β a . The original Jarzynski-Crooks' equality emphasized path-wise average over a stochastic trajectory, but Eq. 28 is an ensemble average over a single step, which can be generalied to many different other forms [14].
The concept of exergy. In Eq. 21, equilibrium internal energy and entropy under temperature T a , U (T a ) and S(T a ) are assembled with temperature T b = T a to form a nonequilibrium free energy F neq = U (T a ) − T b S(T a ), which plays a central role in our analysis of canonical systems. This quantity has been extensively discussed in the literature on thermodynamics: Exergy of a system is "the maximum fraction of an energy form which can be transformed into work." The remaining part is the waste heat [15]. After a system reaches equilibrium with its surrounding, its exergy is zero. Therefore, the concept of exergy epitomizes a nonequilibrium quantity [4]. Its identification to the entropy production in Eq. 20 implies its importance in information energetics. Even though the term "exergy" was coined as late as in 1956, the idea had been already in the work of Gibbs.
Mechanical work of an ideal gas. For an ideal gas with total mechanical energy U (x) = U p (x 1 ) + U k (x 2 ), where U p and U k are potential and kinetic energy functions, and x 1 and x 2 are position and momentum state variables, in which H V (z) = 0 when 0 < z < V and H V (z) = +∞ when z ≤ 0 or z ≥ V . The V represents the "volume" of a box containing the ideal gas. Then in which theΩ is independent of V . Therefore, the mechanical work associated with a change in wherep = N k B T /V is the pressure of an ideal gas. (We have set Boltzmann's constant k B ≡ 1 throughout the present paper.)

Application to heat engines and thermodynamic cycles
Carnot cycle. Applying Eqs. 24 and 26 twice for thermomechanical (i.e., temperature and mechanical) changes from {T a , U 1 } to {T b , U 2 } and from {T b , U 2 } back to {T a , U 1 }, we derive the celebrated Carnot efficiency for a heat engine. For each of the processes descibed in the left column below, the energetic status of the system is shown in the right column: isothermal relaxation {T a , U 2 } → {T a , U 1 }: In (32f), the system is returned to the equilibrium state under T a . Without loss of generality, let T a > T b . In the ideal Carnot cycle, one assumes that the processes of switching the temperatures are adiabatic without free energy dissipation. That is, the F neq 1 (T b ) in (32a) is strictly equal to F eq 1 (T a ) in (32f), with a reversible change of gauge reference, and similarly the F neq 2 (T a ) in (32d) is strictly equal to F eq 2 (T b ) in (32c). In the two processes of isothermal relaxation, irreversible heat 21 } each contain an entropy production term, In a Carnot cycle with quasi-static processes, they are assumed to be zero. Then, the total work done by the system over the cycle is in which the reversible heat being absorbed at T a is On the other hand, since the rhs of (34) is the maximum possible work, the second-law, exergy efficiency Stirling cycle. There are many different realizations of heat engines in terms of thermodynamic cycles. We now consider the Stirling cycle below.
isothermal working {T a , U 1 } → {T a , U 2 }: After two isothermal processes in (37a), (37d), the system is still in the equilibrium states with free energy F eq 2 (T a ) = U 2 (T a ) − T a S 2 (T a ) and F eq respectively. Notice the difference between the equilibrium free energy above and the non-equilibrium free energy functions F neq 2 (T a ) and F neq 1 (T b ) defined in (32a) and (32d). The irreversible heats for the two isothermal processes are Meanwhile, those for the isochoric cooling and heating processes are Summarizing the whole heat cycle, we find that This will lead to the same conclusions on the first-law and second-law efficiency for the Stirling cycle.
Realization of a reversible cycle. The Carnot cycle and Stirling cycle considered above are not truly reversible, once U 1 = U 2 or T a = T b . To achieve the theoretical maximal efficiency, we need to construct a reversible heat cycle through a series of quasi-static processes, each of which involves only an infinitesimal change in either U or T . Taking the Stirling cycle as an example. In the first isothermal working step, we insert N − 1 intermediate states between {T a , U 1 } and {T a , U 2 }, that are {T a , U 1 + △U }, {T a , U 1 + 2△U }, · · · , {T a , U 1 + (N − 1)△U } with △U = (U 2 − U 1 )/N . In the limit of N → ∞, △U → 0, which means each transition between two adjacent states can be treated as a quasi-static process. Therefore, the whole step between {T a , U 1 } and {T a , U 2 } becomes reversible with the help of those intermediate states. Applying similar procedure to other three steps, we will achieve a true thermodynamically reversible Stirling cycle by requiring an infinitesimal change in either U or T for each sub-step.

Work as a conditional expectation in energy representation
Consider once again two distributions ρ(x) and p eq (x) with respective energy representations, ρ E (y) = Z −1 1 (β a )Ω 1 (y)e −βay and p eq E (y) = Z −1 2 (β b )Ω 2 (y)e −β b y . The key thermodynamic quantity that arises in (22), the irreversible work, can not be expressed in terms of the six quantities: Ω 1 (y), Z 1 (β), Ω 2 (y), Z 2 (β), and β a , β b . We note that in which is a conditional expectation of U 2 (x) given U 1 (x) = y. The energy functions U 1 (x) and U 2 (x) are only two observables on the probability space and they certainly do not provide a full description of the probability space. Actually, knowing the canonical energy distributions ρ E (y) and p eq E (y) is not equivalent to knowing their joint probability distribution; the missing information on their correlation is captured precisely in (44).
The lhs of (43) can also be expressed as The term inside {· · · } indeed can be understood as a Radon-Nikodym derivative between the two probability measures, which is well-defined on the entire σ-algebra F as well as the restricted joint σ-algebra F U 1 ,U 2 . However, it is singular on the further restricted σ-algebra F U 1 or F U 2 .

The role and consequence of determinism
Consider a sequence of measures µ ǫ and two real-valued continuous random variables x(ω) and y(ω), with corresponding probability density functions p ǫ (x) and q ǫ (x). Their relative entropy is then If the sequence of measures µ ǫ tends to a singleton with corresponding p ǫ (x) → δ(x − z) and q ǫ (x) → δ(x − y * ) as ǫ → 0, we call the limit deterministic. It can be shown under rather weak conditions, or more properly through the theory of large deviations, that as ǫ → 0 the p ǫ (x) and q ǫ (x) have asymptotic forms in which ϕ p (z) = ϕ q (y * ) = 0 [38]. Therefore, as x → z. Even though y → y * , the relative entropy in (46) provides the ϕ q as a function of z fully supported on R n . If the q ǫ is an invariant measure of a stochastic dynamical system, then the ϕ q (z) is thought of as a "deterministic energy function", which can be obtained as the asymptotic limit of determinism. The normalization of e −ϕq(x)/ǫ , however, is lost in the ln ǫ-order term. This corresponds to a certain gauge freedom.
A combination of the determinism with the canonical distribution immediately yields a key relationship that is well known in thermodynamics. Specifically, if the probability density function in an asymptotic limit, then one has the equation of state A system in macroscopic thermodynamic equilibrium possesses one less degree of freedom [26]. Eq. 50 implies in which Therefore, That is, the equilibrium β is the average of on the level-surface {x : U (x) = E * }. For a given energy function U (x), or an observable [5], Eq. 54, which generalizes the virial theorem in classical mechanics, provides the function β(E).
4 The space of probability measures 4.1 Affine structure, canonical distribution and its energy representation We will now give a brief, non-rigorous introduction to the theory developed in [37]. Let M be the set of all probability measures on (Ω, F) that are absolutely continuous w.r.t. some probability measure P (and therefore absolutely continuous w.r.t. each other) and let V be an appropriate set of real-valued functions on Ω. (Note that any choice of P in M would do; we only care that all measures in M are absolutely continuous w.r.t each other.) One now defines ⊕: M × V → M such that for any A ∈ F. Assuming the denominator is finite (which requires some assumptions on V), the positivity of e g implies that (µ ⊕ g) is also absolutely continuous w.r.t. P. Since (µ ⊕ g)(Ω) = 1, it is a probability measure. These two facts mean that (µ ⊕ g) ∈ M, so the operation ⊕ is welldefined. One can then show that (M, V, ⊕) is an affine structure on M [11], [37]. If one chooses a particular measure P ∈ M as the origin, then any other measure µ ∈ M will have a Radon-Nikodym derivative dµ dP (ω), and µ = (P ⊕ g) where g = ln dµ dP . Let J ⊆ R be an interval and U ∈ V. The function p: J → M such that p(β) = P ⊕ (−βU ) is an affine straight line. More explicitly, we have the family of probability densities where Z(β) is the normalization factor. In Kolmogorov's theory, the real-valued function U (ω), when thought of as a random variable, has its own probability density function w.r.t. the Lebesgue measure: in which ln Ω U (y) is the Gibbs entropy associated with function U (ω), defined in Eq. 12: The relation between the distributions in (57)  A pair of observables. We now discuss the notions of joint, marginal, and conditional probability in terms of the canonical representation in V, with a fixed "origin" P, which should be thought of as the P in the probability space (Ω, F, P),à la Kolmogorov. The SoPMs M then is represented by observables U (ω) ∈ V, the tangent space of M.

Entropy metrics in the SoPMs
Consider two probability measures µ 1 , µ 2 ∈ M in the SoPMs, with Radon-Nikodym derivatives w.r.t. P given by f 1 (ω) and f 2 (ω) respectively. One can introduce the following metric on M: This metric can also be rewritten as the sum of two non-negative terms in the form of relative entropy: From this second form, it is clear that d is symmetric with respect to µ 1 and µ 2 and is zero if and only if µ 1 = µ 2 on F. This form also has the advantage of making it clear that d is invariant with respect to the choice of an origin P. Note that since the SoPMs is not a linear vector space, it does not make sense to talk about a norm on M, but we can still construct a metric. Metric in energy representation. If µ 1 and µ 2 are written in their respective energy representations, i.e. f E1 (y 1 ) = Z 1 (β a )Ω 1 (y 1 )e −βay 1 and f E2 (y 2 ) = Z 2 (β b )Ω 2 (y 2 )e −β b y 2 . Then from Eq. 68, we have we have Using the Jarzynski-Crooks equality from (28), Eq. 78 implies This result generalizes Carnot's inequality.

Infinitesimal entropy metric associated with ∆β
Consider an infinitesimal change in β → β+∆β and corresponding dµ = e −βU dP → d(µ+∆µ) = e −(β+∆β)U dP. Then we have This is a very important relation that connects the entropy metric with temerpature and energy fluctuations. Furthermore, we have The term inside (· · · ) on the rhs is called the heat capacity in thermodynamics. Internal energy E[U ] is a "slope" and the Var[X β ] is a curvature of the "potential function" − ln Z(β).

A mathematical remark
Log-mean-exponential inequality and equality. We see that both entropy metric in (68) and heat metric in (78) are based on a very general inequality involving the log-mean-exponential of a random variable ξ(ω) [32]: Jensen's inequality.
Eq. 82 should be recognized as "mean internal energy minus free energy". Thus it should be some kind of entropy: E P ξ(ω) + β −1 ln E P e −βξ(ω) = E P ln dP dP ′ (ω) , in which P ′ = P ⊕ (−βξ) is the affine sum of P and (−βξ). Eq. 83 could be argued as the fundamental equation for isothermal processes under a single temperature T = β −1 . The implication of this interesting "Jensen's equality" to the affine geometry of the SoPMs is currently being explored.

Discussion
It has been well established, through the work of Gibbs, Carathéodory, and many others, that geometry has a role in the theory of equilibrium thermodynamics [22,28,36]. Classical thermodynamics is not based on the theory of chance, but there is no doubt that the notion of entropy has its root in the theory of probability. In the present work, we propose that the space of probability measures as a natural setting in which thermodynamic concepts can be established logically. In particular, an affine structure is natually related to the canonical probability distribution studied by Boltzmann and Gibbs in their statistical theories, and almost all thermodynamic potentials are different forms of Radon-Nikodym derivatives associated with changes of measures. Even the fundamental equation of nonequilibrium therodynamics, together with the distinctly nonequilibrium notion of entropy production, naturally emerge. Statistical mechanics, as a scientific theory, differs from Kolmogorov's axiomatic theory of probability in one essential point: The latter demands a complete probability space and a normalized probability measure, while in the former every probability distribution is a conditioned probability under many known and unknown conditions. More importantly, the probability of the conditions, themselves as random events, are usually not knowable. In the theory of the space of measures, we see that one mechanical system with a given energy function U (ω) corresponds to a straight line, and the fixing of the origin in M in terms of P or the normalization in terms of Z(β) [which translates to the arbitary constant in U (ω)] amount to the idea of gauge fixing. Thermodynamic work then arises in the rotation from U 1 (ω) to U 2 (ω). In the theory of probability, associated with any "change" is a change of measure: Radon-Nikodym derivatives simply provide the calculus to quantity the fluxion! In Newtonian mechanics, change in space is absolute; but in probability, it is a complex matter, and it is all relative.
The probability theory of large deviations is now a recognized mathematical foundation for statistical thermodynamics [8,38,12]. Such a theory is concerned with the deterministic thermodynamic limit. In Sec. 3.6, we see that the combination of our theory and a deterministic limit gives rise to the concept of macroscopic equations of state in classic thermodynamics [26].
Equilibrium mean internal energy U (β) depends on both the intrinsic properties of a system and its external environment. This is most clearly shown through the canonical distribution that is determined by U (ω) and β. The decomposition in Eq. 15, a simple example of the much more general (83), connects the internal energy with "work" and "heat", or the "usable energy" and "useless energy", or entropy production and entropy change. These are all just different interpretations under different perspectives.