3.2.1. Properties of H for Systems in Equilibrium

If the system is in equilibrium, the temperature becomes homogeneous throughout the complete system. Also, the local number of particles, the local energy, and the Lagrange multipliers do not depend on the cell number, and they should be homogeneous. This is represented by

$$\mathcal{N}\_{\mathcal{M}}(t \to \infty) \equiv \mathcal{N} = \mathcal{N}/\mathcal{K},\tag{55}$$

$$
\mathcal{E}\_M(t \to \infty) \equiv \vec{\mathcal{E}} = E/K,\tag{56}
$$

$$
\mathfrak{a}\_{M} = \mathfrak{k}, \quad \forall M,\tag{57}
$$

and

$$
\beta\_M = \bar{\beta}, \quad \forall M. \tag{58}
$$

Substituting Equations (57) and (58) into Equation (54) yields the distribution function of each cell in equilibrium:

$$\vec{f}\_{Mn} = \vec{f}\_n = \frac{1}{\exp\left(-\vec{n} - \beta \epsilon\_n\right) \pm 1}, \quad \forall M. \tag{59}$$

Using the above equation, we can recover the distribution function and the entropy of a dilute quantum gas in equilibrium as follows. Setting *<sup>α</sup>*¯ <sup>=</sup> *<sup>μ</sup>*/*kT* and *<sup>β</sup>*¯ <sup>=</sup> <sup>−</sup>1/*kT*, and substituting them into Equation (59), it renders the Fermi–Dirac and Bose–Einstein distribution functions:

$$\bar{f}\_n = \frac{1}{\exp\left(\frac{\epsilon\_v - \mu}{kT}\right) \pm 1},\tag{60}$$

and substituting Equation (59) into the negative of Equation (47), the entropy of a quantum ideal gas is

$$\begin{array}{rcl} S &=&\sum\_{M=1}^{K} \sum\_{n} \left[ \left( \frac{1}{\exp\left(-\mathbb{R} - \hat{\mathcal{R}}\varepsilon\_{n}\right) \pm 1} \right) \ln \left( \frac{1}{\exp\left(-\mathbb{R} - \hat{\mathcal{R}}\varepsilon\_{n}\right) \pm 1} \right) \right] \\ &\pm \ln \left[ \prod\_{M=1}^{K} \prod\_{n} \left( 1 \mp \frac{1}{\exp\left(-\mathbb{R} - \hat{\mathcal{R}}\varepsilon\_{n}\right) \pm 1} \right) \right] \delta V\_{M}. \end{array} \tag{61}$$

This quantity is what we refer to as "variational entropy," and this name reflects the fact that it was obtained via the variational method.

#### 3.2.2. Proof of the Quantum *H*-Theorem for Non-Homogeneous Systems

For quantum systems, we also accept the validity of the local equilibrium hypothesis for every cell in the system. This allows us to define non-homogeneous systems, wherein thermodynamic quantities are well-defined on a per-cell basis. In terms of the equilibrium properties, we have

$$
\mathcal{N}\_M(t) = \sum\_n f\_{Mn}(t) = \mathcal{N} + \Delta\_M(t) \tag{62}
$$

and

$$\mathcal{E}\_M(t) = \sum\_n \epsilon\_n f\_{Mn}(t) = \mathcal{E} + \delta\_M(t). \tag{63}$$

In Equations (62) and (63) <sup>N</sup>¯ and <sup>E</sup>¯ are the cell particle number and the cell energy in equilibrium, which are given by Equations (55) and (56), and Δ*<sup>M</sup>* and *δ<sup>M</sup>* are deviations from <sup>N</sup>¯ and <sup>E</sup>¯, respectively, with <sup>Δ</sup>*M*(*t*) <sup>N</sup>¯ and *<sup>δ</sup>M*(*t*) <sup>E</sup>¯.

In the present context, |Δ*M*| and |*δM*| are sufficiently large to not be fluctuations of the system, and sufficiently small so that the local equilibrium hypothesis is valid for *t* > 0 (we set *t*<sup>0</sup> = 0, and *t*<sup>0</sup> is the initial time at which the system is prepared). Therefore, the distribution functions can be rewritten as

$$f\_{Mn}(t) = \overline{f}\_n(1 + g\_{Mn}(t)), \quad 1 \gg |g\_{Mn}(t)|,\tag{64}$$

from which it follows, by substituting Equation (64) into Equations (62) and (63), that Δ*<sup>M</sup>* and *δ<sup>M</sup>* satisfy

$$
\Delta\_M(t) = \sum\_n \bar{f}\_n \mathbb{g}\_{nM} \tag{65}
$$

and

$$\delta\_{\mathcal{M}}(t) = \sum\_{\mathcal{U}} \vec{f}\_{\mathcal{U}} \mathcal{G}\_{\mathcal{U}} \mathcal{M} \mathfrak{E}\_{\mathcal{U}}.\tag{66}$$

An additional consideration is necessary for treating Fermi gases. Since, for these systems, *fMn*(*t*) ≤ 1, we have

$$1 - \vec{f}\_n - \vec{f}\_n g\_{nM} \ge 0 \quad \Rightarrow \quad \frac{1}{\vec{f}\_n} \ge 1 + g\_{nM}.\tag{67}$$

¯ *fn* = 1 is certainly satisfied if the system temperature is zero. In this state, all energy levels below and including the Fermi energy are occupied, thus the system will necessarily be homogeneous, and consequently, *gnM* = 0. In this article, we will omit this scenario and will only discuss Fermi gases with non-zero temperatures.

To proof the quantum *H*-theorem, we start by taking the time-derivative of Equation (47):

$$\frac{d\mathcal{H}(t)}{dt} = \sum\_{n} \sum\_{M=1}^{K} \dot{f}\_{nM}(t) \ln \left[ \frac{f\_{nM}(t)}{1 \mp f\_{nM}(t)} \right] \delta V\_M. \tag{68}$$

Subsequently, we substitute Equation (64) into the above equation to obtain

$$\begin{split} \frac{d\mathcal{H}(t)}{dt} &= \sum\_{n} \sum\_{M=1}^{K} f\_{n} \ln \left[ \frac{\vec{f}\_{n}(1+g\_{nM})}{1 \mp \vec{f}\_{n}(1+g\_{nM})} \right] \dot{\mathfrak{g}}\_{nM} \delta V\_{M} \\ &= \sum\_{n} \sum\_{M=1}^{K} \vec{f}\_{n} \left\{ \ln[\vec{f}\_{n} + \vec{f}\_{n} \mathfrak{g}\_{nM}] \dot{\mathfrak{g}}\_{nM} - \ln[1 \mp \vec{f}\_{n} \mp \vec{f}\_{n} \mathfrak{g}\_{nM}] \dot{\mathfrak{g}}\_{nM} \right\} \delta V\_{M}. \end{split} \tag{69}$$

The logarithmic terms, corresponding to Fermi and Bose gases, are approximated through a Taylor series around ¯ *fngnM* = 0 as

$$\ln[\mathbf{1} \mp f\_n \mp f\_n g\_{nM}] \approx \ln[\mathbf{1} \mp f\_n] \mp \frac{\vec{f}\_n}{\mathbf{1} \mp \vec{f}\_n} g\_{nM} \tag{70}$$

and

$$
\ln\left[\bar{f}\_n + \bar{f}\_n g\_{nM}\right] \approx \ln\left[\bar{f}\_n\right] + g\_{nM\nu} \tag{71}
$$

respectively. Equation (70) is valid because, for non-extremely degenerated Fermi gases, <sup>1</sup> <sup>−</sup> ¯ *fn* ¯ *fn*|*gnM*<sup>|</sup> and Equation (71) is fulfilled because, for Boson gases, 1 <sup>+</sup> ¯ *fn* ¯ *fn*|*gnM*| when ¯ *fn* ¯ *fn*|*gnM*|.

Combining Equations (69)–(71),

$$\begin{split} \frac{d\mathcal{H}}{dt} &= \sum\_{n} \sum\_{M=1}^{K} \vec{f}\_{n} \left\{ (\ln \vec{f}\_{n} + \mathcal{g}\_{nM}) \xi\_{nM} \right\} \delta V\_{M} \delta \varepsilon\_{n} \\ &- \sum\_{n} \sum\_{M=1}^{K} \vec{f}\_{n} \left\{ \left( \ln[1 \mp \vec{f}\_{n}] \mp \left[ \frac{\vec{f}\_{n}}{1 \mp \vec{f}\_{n}} \right] \mathcal{g}\_{nM} \right) \xi\_{nM} \right\} \delta V\_{M} \end{split} \tag{72}$$

and substituting Equation (59) into Equation (72):

$$\frac{d\mathcal{H}}{dt} = \sum\_{n} \sum\_{M=1}^{K} \vec{f}\_{n} \left\{ (\hbar + \vec{\beta}\epsilon\_{n})\dot{\xi}\_{nM} + g\_{nM} \left( 1 \pm e^{\hbar + \vec{\beta}\epsilon\_{n}} \right) \dot{\xi}\_{nM} \right\} \delta V\_{M}.\tag{73}$$

Since both the total number of particles and the total energy of the system are constant, it follows from Equations (51), (52), (62) and (63) that

$$\frac{dN}{dt} = \sum\_{M=1}^{K} \dot{\mathcal{N}}\_{M} \delta V\_{M} = \sum\_{M=1}^{K} \sum\_{n} \ddot{f}\_{n} \dot{\mathfrak{g}}\_{nM} \delta V\_{M} = \sum\_{M=1}^{K} \dot{\Delta}\_{M}(t) \delta V\_{M} = 0 \tag{74}$$

and

$$\frac{dE}{dt} = \sum\_{M=1}^{K} \mathcal{E}\_{M} \delta V\_{M} = \sum\_{M=1}^{K} \sum\_{n} f\_{n} \xi\_{nM} \varepsilon\_{n} \delta V\_{M} = \sum\_{M=1}^{K} \delta\_{M}(t) \delta V\_{M} = 0. \tag{75}$$

Substitute the previous expression in Equation (73) to obtain

$$\frac{d\mathcal{H}}{dt} = \sum\_{n} \varepsilon^{\alpha + \tilde{\beta}\kappa\_{n}} \sum\_{M=1}^{K} \mathcal{g}\_{nM} \dot{\mathcal{g}}\_{nM} \delta V\_{M} \le 0. \tag{76}$$

To obtain the far right side of Equation (76), we have used the relationship *gnMg*˙*nM* ≤ 0 for *t* > 0. This can be proven by simply arguing that, in the initial state, if a cell is described by *gnM*(*t*0) > 0 then *gnM*(*t*) ≥ 0 and *g*˙*nM*(*t*) ≤ 0, and if *gnM*(*t*0) < 0 then *gnM*(*t*) ≤ 0 and *g*˙*nM*(*t*) ≥ 0. Here we have exploited the fact that the system in equilibrium is homogeneous, and that, by accepting the local equilibrium hypothesis, *gMn*(*t*) is a monotonic function and *gnM* → 0 as *t* → ∞ as the system approaches the equilibrium state. Another approach to prove Equation (76) consists of splitting the cells into two subsets, just as we did in the classical scenario.

Briefly, considering a dilute quantum gas contained in a vessel of volume *V* (divided into *K* small cells), with total energy *E* and *N* quantum free particles, which initially is out of equilibrium—but in such a manner that the local equilibrium hypothesis is valid— the functional

$$\mathcal{H}(t) = \sum\_{M=1}^{K} \sum\_{n} \left[ f\_{Mn}(t) \ln f\_{Mn}(t) \pm \left( 1 \mp f\_{Mn}(t) \right) \ln \left( 1 \mp f\_{Mn}(t) \right) \right] \delta V\_{M\nu} \tag{77}$$

where *fMn* is the *M*-th cell distribution function, evolves in time such that *d*H/*dt* ≤ 0, and the equality condition is attained when the system reaches the equilibrium state. In Equation (77), and for a Fermi (Bose) gas, *fMn* corresponds to the Fermi–Dirac (Bose– Einstein) distribution function for each cell. Locally, each cell is in equilibrium, although the complete system may be non-homogeneous, and is characterized by the respective *fMn*, number of particles N*M*, energy E*M*, temperature *TM*, and Legendre multipliers *α<sup>M</sup>* and *βM*.

#### **4. Quantum—Classical Correspondence**

In Sections 2 and 3, we saw that the variational method can be applied to *H*-functionals, which correctly describes the behavior of classical and quantum dilute gases, with regard to their respective time-evolution. Both *H*-functionals defined in Equations (5) and (47) also recover the well-known distribution functions, either Maxwell–Boltzmann for a classical gas, Fermi–Dirac for a Fermi gas, or Bose–Einstein for a Bose gas. Nevertheless, the functionals (5) and (47) are seemingly different, and in this section, we show they are related by the correspondence principle.

We start by arguing that, in equilibrium, it is straightforward to proof that Equation (60) collapses into Equation (19) by taking the limit wherein the degeneration parameter *<sup>ξ</sup>* <sup>≡</sup> exp − ( − *μ*)/(*kBT*) 1. Alternatively, a more general approach to show the quantum–classical correspondence consists of analyzing the collapse from the quantum to the classical *H*-functionals within the appropriated limit. For the case treated here, this limit is *fnM* ≈ 0 for several reasons. Systems at very low temperatures, in which the quantum effects cannot be ignored, are obviously excluded from the current analysis. In systems at sufficiently high temperatures, the particles occupy almost exclusively high-energy levels. Furthermore, the energy spectrum approaches a continuum, as is expected by taking the limit ¯*h* → 0, and the number of particles per level is very close to zero.

Subsequently, we substitute *fnM* ≈ 0 into Equation (47) to obtain

$$\mathcal{H} = \sum\_{M=1}^{K} \sum\_{\mathfrak{n}} [f\_{nM}(t) \ln(f\_{nM}(t))] \delta V\_M = \sum\_{M=1}^{K} \sum\_{\mathfrak{n}} [f\_M(\mathfrak{e}\_{\mathfrak{n}}, t) \ln(f\_M(\mathfrak{e}\_{\mathfrak{n}}, t))] \delta V\_M. \tag{78}$$

Finally, the sum over the quantum energy levels can be replaced by an integral over the velocities by invoking both the uncertainty principle and the fact that, for free particles, the continuum energy spectrum can be written as a function of the velocity. Hence the quantum *H*-functional transforms, in the classical limit, to

$$\mathcal{H} = \sum\_{M=1}^{K} \int \mathcal{C}' f\_M(\vec{v}, t) \ln \left[ \mathcal{C}' f\_M(\vec{v}, t) \right] d\vec{v}\_{\prime} \tag{79}$$

where *C* collects the appropriate constants stemming from writing the energy spectrum as a function of *v*.

#### **5. Relaxation Processes in Degenerated Quantum Gases**

To obtain a time-evolution equation for an out-of-equilibrium quantum gas, we propose the following approach. We start by evaluating ΔH = H(*t*2) − H(*t*1), where our quantum *H*-functional—Equation (47)—is evaluated at different times *t*<sup>1</sup> and *t*2, with *t*<sup>2</sup> > *t*1. This yields

$$\begin{array}{rcl} \Delta \mathcal{H} &=& \sum\_{M=1}^{K} \sum\_{n} [f\_{nM}^{\prime\prime} \ln f\_{nM}^{\prime\prime} - f\_{nM}^{\prime} \ln f\_{nM}^{\prime} \\ &\pm (1 \mp f\_{nM}^{\prime\prime}) \ln(1 \mp f\_{nM}^{\prime\prime}) \mp (1 \mp f\_{nM}^{\prime}) \ln(1 \mp f\_{nM}^{\prime}) \end{array} \tag{80}$$

In the above equation, and for the rest of this section, we use the short-hand notation *fnM*(*t*2) ≡ *f nM* and *fnM*(*t*1) ≡ *f nM*. Subsequently, in Equation (80), we replace the distribu-

tion functions with their expressions in terms of deviations from equilibrium—Equation (64) —which renders:

$$
\begin{split}
\Delta\mathcal{H} &=&\sum\_{M=1}^{K}\sum\_{n} \left[ f\_n (1 + \mathcal{g}\_{nM}'') \ln f\_n (1 + \mathcal{g}\_{nM}'') - f\_n (1 + \mathcal{g}\_{nM}') \ln f\_n (1 + \mathcal{g}\_{nM}') \right] \\
&\pm \left( 1 \mp \bar{f}\_n \{1 + \mathcal{g}\_{nM}''\} \right) \ln \left( 1 \mp \bar{f}\_n \{1 + \mathcal{g}\_{nM}''\} \right) \\
&\mp \left( 1 \mp \bar{f}\_n \{1 + \mathcal{g}\_{nM}''\} \right) \ln \left( 1 \mp \bar{f}\_n \{1 + \mathcal{g}\_{nM}''\} \right) \Big| \delta V\_M. \end{split} \tag{81}
$$

Subsequently, we expand the logarithmic terms up to the first-order in *g nM* and *g nM* and rearrange the result, which gives

$$
\Delta\mathcal{H} = \sum\_{M=1}^{K} \sum\_{n} [\bar{f}\_n (1 + \ln \bar{f}\_n) - \bar{f}\_n \{ \ln(1 \mp \bar{f}\_n) \mp 1 \} ] (g\_{nM}^{\prime\prime} - g\_{nM}^{\prime}) \delta V\_M. \tag{82}
$$

Finally we divide Equation (82) by Δ*t* ≡ *t*<sup>2</sup> − *t*1, and take the limit Δ*t* → 0 to obtain

$$\frac{d\mathcal{H}}{dt} = \sum\_{M=1}^{K} \sum\_{n} [\bar{f}\_n (1 + \ln \bar{f}\_n) - \bar{f}\_n \{ \ln(1 \mp \bar{f}\_n) \mp 1 \} ] \left( \frac{\mathcal{G}nM}{dt} \right) \delta V\_M. \tag{83}$$

Equation (83) is, within our framework, the time-evolution equation for *gnM*. Clearly, to describe a realistic situation, providing a specific approximation for the deviation function *gnM* is required. This subject will be explored in future work.

#### **6. Comments and Remarks**

The demonstration of the classical *H*-theorem usually begins by assuming that the gas, despite being initially out of equilibrium, can be described by a spatially homogeneous distribution function. Subsequently, the time-evolution of the system occurs in such a manner that *dH*/*dt* ≤ 0. Therefore, this approach does not describe the evolution to equilibrium of systems with spatial inhomogeneities. To address this issue, in this article, we proposed a framework that may be useful to describe the time-evolution of initially non-homogeneous systems. To this end, we divided the system into small cells to conceive a system wherein the local equilibrium hypothesis is valid in each cell but in such a manner that the total system is not homogeneous. Systems that satisfy the previous conditions will evolve towards equilibrium, and the evolution occurs according to *d*H /*dt* ≤ 0, Equation (5) and *d*H/*dt* ≤ 0, and Equation (47), for classical and quantum gases, respectively. Consequently, this approach can be considered an extension of the *H*-theorem for more realistic out-of-equilibrium systems.

The classical and quantum *H*-functionals, H and H, respectively, correctly recover the most-probable distribution functions in out-of-equilibrium states (locally) and when the system attains the global equilibrium state. The relaxation process of the system is described by monotonic functions that account for deviations from the global equilibrium.

It is clear that for describing the relaxation process of a concrete system, it is necessary to know, at least to some approximation, the specific forms of the monotonic functions *g <sup>M</sup>* and *gnM*, for classical and quantum systems. Whereas the complete analysis of these functions is beyond the scope of the present work, some of their properties can be predicted, *e.g.,* they must be consistent both with the system relaxation times and the mechanisms of energy transfer between cells.

An important aspect of the framework proposed in this work is related to the entropy of systems out-of-equilibrium. Because the functionals H and H can be related to the entropy of dilute gases, either classical or quantum, the fact that these functionals are defined over a system divided into cells enables their use for defining the entropy of out-ofequilibrium systems, other than dilute gases. Specifically, and derived from our previous work (e.g., [30,31]), the H and H functionals may serve to describe the entropy, as well as the entropy generation, occurring during the growth of complex physical systems, such as

fractals. Possibly, studying these systems might also shed light on the explicit functional form of *g <sup>M</sup>* and *gnM*.

In summary, we proposed a variational procedure to demonstrate the classical and quantum *H*-theorems, which allowed us to describe, at a mesoscopic local view (cellscale), the time-evolution of an out-of-equilibrium and spatially non-homogeneous system moving towards the equilibrium condition. In principle, this approach would permit the investigation of the transport phenomena inherent to the equilibration process, occurring in a system with a spatially inhomogeneous out-of-equilibrium initial condition.

**Author Contributions:** Conceptualization, J.L.E.C.-E.; methodology, C.M.-P., J.M.S.-A. and J.L.E.C.- E.; formal analysis, C.M.-P.; validation, J.M.S.-A. and J.L.E.C.-E.; writing, C.M.-P., J.M.S.-A. and J.L.E.C.-E.; supervision, J.M.S.-A. and J.L.E.C.-E.; project administration J.M.S.-A. and J.L.E.C.-E.; funding acquisition, J.L.E.C.-E. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by CONACyT (National Council of Science and Technology), grant No. A1-S-39909, and PRODEP-SEP.

**Acknowledgments:** CMP acknowledges the Conacyt PhD scholarship.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **References**

