The zeroth law of thermodynamics in special relativity

We critically revisit the definition of thermal equilibrium, in its operational formulation, provided by standard thermodynamics. We show that it refers to experimental conditions which break the covariance of the theory at a fundamental level and that, therefore, it cannot be applied to the case of moving bodies. We propose an extension of this definition which is manifestly covariant and can be applied to the study of isolated systems in special relativity. The zeroth law of thermodynamics is, then, proven to establish an equivalence relation among bodies which have not only the same temperature, but also the same center of mass four-velocity.


INTRODUCTION
The modern covariant formulation of the second law of thermodynamics relies on the assumption that it is possible to define an entropy four-current s ν with non-negative divergence, ∇ν s ν ≥ 0 (Israel 1989(Israel , 2009). The validity of this assumption is strongly supported by relativistic kinetic theory, both classical (Cercignani & Kremer 2002) and quantum (De Groot 1980;Florkowski 2010), and by the hydrodynamics of locally isotropic fluids (Gavassino et al. 2020), including perfect fluids (Rezzolla & Zanotti 2013) and chemically reacting fluids (Carter 1989). This approach finds application in every branch of the relativistic hydrodynamics, including the problem of relativistic dissipation (Israel & Stewart 1979;Lopez-Monsalvo & Andersson 2011) and multifluid hydrodynamics (Carter 1991;Carter & Khalatnikov 1992;Andersson & Comer 2007).
In the absence of dissipation (∇ν s ν = 0), it is possible to define the total entropy of a system as the flux of the entropy current through an arbitrary spacelike hypersurface Σ crossing the system, (1) Since the result of the integral does not depend on the choice of Σ, the entropy is a Lorentz scalar, in agreement with Planck (1908) and with the microscopic statistical interpretations of the entropy (Jaynes 1957a,b;Israel 1981;van Weert 1982;Petz 2001). This enables us to define, starting from a theory which is necessarily local (to ensure causality), the equilibrium thermodynamics of an isolated macroscopic body, which allows to make a contact with statistical mechanics (Huang 1987). The long-lasting debate on the definition of the temperature of moving bodies, traditionally called Planck-Ott imbroglio (Mareš et al. 2017), originates at this point. At first (Planck 1908;Tolman 1933;Ott 1963;Landsberg 1967), the discussion was oriented in the direction of defining a transformation law of the temperature under Lorentz boosts and work in this direction is still ongoing (see Farías et al. 2017 for a recent review). Supporters of both Planck's and Ott's views agree on the fact that the transformation should involve a Lorentz factor, however the opinions diverge on its position (at the denominator according to Planck 1908, at the numerator according to Ott 1963). Nowadays this approach has become a quest for the most natural-looking choice of variables in the differential of the energy of a moving body (see e.g. Becattini 2016; Parvan 2019).
Other authors have approached the problem studying the equilibrium state of two weakly interacting bodies in motion with respect to each other, trying to understand whether a body "looks hotter or colder " from the point of view of the other. van Kampen (1968) and Israel (1981) have argued that in a covariant framework one must consider that the two bodies can exchange both energy and momentum and therefore the result will depend on the exact circumstance of the experiment. Following the same line of thoughts, Bíró & Ván (2010) have shown that, depending on the phenomenological model of heat transfer which is invoked, one can recover Planck's, Ott's or Landsberg's transformation law. Landsberg & Matsas (1996, 2004 arrive at similar conclusions considering that a moving photon detector in a heat bath of black body radiation might in general measure different temperatures depending on how it averages the energies of the incoming photons with respect to the direction. Finally, Sewell (2008) has studied the problem in the context of quantum statistical mechanics, proving that a body cannot satisfy the KMS conditions for different inertial frames in motion with respect to one another, arriving at the conclusion that a body has a well defined temperature only in its rest frame.
In this paper we propose a new view on the Planck-Ott imbroglio. Using simple arguments of thermodynamics and statistical mechanics we show that the zeroth law of thermodynamics plays a fundamental role in the experimental definition of the temperature and that the deep origin of the controversy is in the fact that the operational notion of thermal equilibrium provided by standard thermodynamics (see e.g. Guggenheim 1985) is not covariant. The purpose of our work is to revisit its definition, in a form which is manifestly covariant. Once this new formulation is provided, it will become clear that, in the absence of spontaneously broken symmetries, two bodies are in thermal equilibrium if and only if they are at rest with respect to each other and they have the same rest-frame temperature. Any condition in which two interacting bodies maintain a relative motion with respect to each other for infinite time will then be shown to be a non-ergodic system and should, therefore, be considered a metastable state, for which a complete description in the framework of equilibrium thermodynamics is not guaranteed to exist.

NEED FOR A ZEROTH LAW
In this first section we prove that, in order to provide a unique definition for the temperature of a system exhibiting further constants of motion apart from the energy, it is necessary to specify how a thermometer is supposed to interact with the system. Our aim is to show that the concept of thermal equilibrium appearing in the zeroth law of thermodynamics relies on strict assumptions about this interaction.

Ambiguity of the notion of temperature
Under the condition that the microscopic Hamiltonian is fixed and time-independent, the second principle of thermodynamics implies that the macrostate of an isolated thermodynamic system in equilibrium is in general fully determined once all the constants of motion (fundamental, like e.g. the energy E, or emergent, like e.g. the winding numbers of the superfluid order parameter phases) are assigned. So, it is natural to write the entropy as a function of these variables, namely where the XA are l conserved quantities of the dynamics of the system and we introduced the label A = 1, ..., l. Once an equation of state of this form is given, one is naturally tempted, following the standard textbook convention, to introduce the temperature through the equation This, however, can lead to an ambiguity. In fact, if the XA are constants of motion, then this is also true for any set of quantities with B = 1, ..., l. The YB would, thus, constitute an equivalently good choice of variables in the construction of the equation of state, provided that the map (E, XA) −→ (E, YB) is one-to-one. So if we start from the equation S = S(E, YB), then we are naturally lead to identify the temperature as which may be a priori different from the definition of T . So it is clear that we need to provide a more rigorous and general way to define the temperature, which must be invariant under this change of variables in the equation of state.

The role of the thermometer
To identify a unique definition for the temperature we need to introduce the notion of a thermometer. In standard thermodynamics an ideal thermometer is a system which interacts very weakly with the body object of study. Formally, this means that the interaction enables an exchange of heat among the thermometer and the system, but it plays a negligible role in the definition of the thermodynamic quantities and can be neglected in their computation. Thus the total energy Etot and entropy Stot can be written as where Eτ and Sτ are respectively the energy and entropy of the thermometer. We remark that the two conditions of (6) are presented here as defining properties of the thermometer. Their validity is necessary in thermodynamics to avoid the risk of producing further ambiguities in the definition of the temperature associated with the need of specifying the interaction (Oppenheim 2003a) or the correlations (Oppenheim 2003b). In the presence of strong gravitational fields it might become hard to ensure the additivity of the energies, however, since we are working in special relativity, the space-time is flat and it is in principle possible to make the interaction potential between the body and the hypothetical thermometer arbitrarily small. We impose that the only constant of motion of the ideal thermometer is the energy, so it is described by an equation of state and there is no ambiguity in the definition of its temperature: After the thermometer is put into contact with the body, they interact exchanging energy until they reach equilibrium. In equilibrium they must have the same temperature, so we can use the final value of Tτ as a measure of T . 1 Let us assume that the interaction of the body with the thermometer does not break the conservation of the quantities XA. Thus Etot and all the XA are constant during the evolution of the total system body+thermometer towards equilibrium, which is then given by the condition of maximum entropy or, equivalently, So, under the assumption that the XA are conserved by the interaction with the thermometer, we find that the thermometer measures T , given in equation (3). One can show with analogous calculations that if, on the other hand, the quantities YB were conserved by the interaction with the thermometer, then it would measure T , given by equation (5). So, to solve the ambiguity in the definition of the temperature, one needs to find the XA which are constants of motion not only when the system is isolated, but also when an exchange of energy with a thermometer is enabled. Note that the XA and the YB are all simultaneously conserved in the interaction with the thermometer only if YB = YB(XA), so in the case in which T = T , see equation (5). Therefore if the XA are conserved and T = T , there must be at least one variable YB whose conservation is broken due to the exchange of energy with the thermometer.

An unconventional thermometer
In standard thermodynamics of continuous media, the issue we presented in the previous subsection does not seem to appear because in this case there is only one independent constant of motion, apart from energy, which is the number of particles N . It is natural to assume that, in the conventional experimental setting in which a thermometer is in contact with a substance, the conservation of N is not broken, providing a unique definition of the temperature as 2 However it is possible to imagine unconventional thermometers which, to measure the temperature, need to break the conservation of N , while keeping fixed an other function Z = Z(E, N ). In this subsection we make a simple hypothetical example of this kind of thermometer. Our aim is to convince the reader that the ambiguity we described in this section is not merely formal, but represents a real possibility. Let us consider an ideal gas. If we assume the particle 2 Note that the volume is not a constant of motion, but it is imposed through an external potential. Therefore it is a parameter in the Hamiltonian (Landau & Lifshitz 2013), which is assumed from the beginning of our discussion to be fixed and time-independent. Thus, in our discussion it does not even need to appear in the equation of state and the fact that it is kept constant in the calculation of the temperature is obvious.
number N to be conserved, the equation of state can be written in the form and we can define the temperature T and the chemical potential µ of the gas according to the conventional prescription Now let us imagine to put it into contact with a thermometer, with equation of state of the form (7), which can interact with the gas only by absorbing (in an annihilation process) or emitting (in a creation process) particles with a given (positive) energy ε. The total system gas+thermometer now is characterised by two constants of motion: the total energy Etot = Eτ + E and the quantity Thus we have built a thermometer which breaks the conservation of N , replacing it with the conservation of Z. The condition of maximum entropy with respect to the exchange of energy between the gas and the thermometer now reads which produces the condition Therefore we have proven that a thermometer of this kind, in equilibrium, has a temperature which is different from the (standard) one of the gas. The reader who was skeptical about the possibility of building such a thermometer without invoking the existence of any sort of Maxwell demon which selects the particles with energy ε can see appendix A for a very simple hypothetical example of this kind of device. There, equation (16) is proven again using pure quantum statistical mechanical arguments.

The zeroth law of thermodynamics
One can immediately convince oneself that the thermometer that measures the temperature T and the one that measures the temperature T , presented in section 2.2, cannot be considered to both reach thermal equilibrium with the system. In fact, having different temperatures, they are not in thermal equilibrium with each other and the zeroth law of thermodynamics states that the condition of thermal equilibrium is an equivalence relation. Luckily, in the particular case of systems contained in boxes, at rest with respect to each other, the zeroth law, as it is formulated in standard textbooks, offers a simple unambiguous way to select the constants of motion XA to keep constant in the calculation of the temperature, removing any ambiguity.
The resolution is given by the definition of the concept of thermal equilibrium appearing in the zeroth law: "two systems are said to be in thermal equilibrium if they are linked by a wall permeable only to heat and they do not change over time" (Carathéodory 1909). In the original formulation, walls permeable only to heat (WPOH) are fixed walls which allow the exchange of energy, but not of particles. In the context of quantum optics or high energy physics, where the interactions are mediated by particles, one cannot require the impermeability to every kind of particle, otherwise there would be no interaction at all. However we can redefine the WPOHs as fixed walls which allow the exchange of energy, but not of any Noether charge QA arising from internal symmetries of the microscopic theory (for a general definition of conserved charge in Quantum Field Theory see Peskin & Schroeder 1995).
Therefore if we make the ergodic hypothesis (Khinchin 1949;Parisi 1988), i.e. if we assume that the only constants of motion of a macroscopic system in a box are the energy and the charges QA (which can be typically interpreted as linear combinations of particle minus antiparticle numbers), then we can write the entropy as and unambiguously define the temperature as Every thermometer which is in thermal equilibrium with the system must interact in a way to conserve the amount of QA in the system. In fact, the charge is fundamentally conserved and cannot flow from the system to the thermometer (or vice versa), because they are separated by a WPOH. Thus every thermometer measures T . The unconventional thermometer presented in subsection 2.3 can never be in thermal equilibrium with the gas. In fact if we try to link it to the gas through a WPOH and we assume the particles to carry a conserved charge (e.g. a positive baryon number), then no exchange of particles is allowed, so no interaction can occur and the two bodies remain isolated with respect to each other.
Note that Noether charges are, by construction, extensive quantities, being the flux over 3D hypersurfaces of conserved Noether currents, thus equation (17) also justifies the usual assumption that the entropy should be written as a function of extensive variables (Callen 1985). So the zeroth law plays a fundamental role in thermodynamics, not only because it solves the problem of ambiguity of the temperature, but also because it selects the quantities which must be used as primary variables in the fundamental relation. In fact, without a zeroth law, any constant of motion of the system would be an equally acceptable free variable to be used in the equation of the entropy. We remark that there are thermodynamic systems, such as superfluids and more in general systems with broken symmetries, which exhibit emergent constants of motion which are not conserved charges (and might not even be extensive). In these cases, however, the new constants of motion are collective quantities which can only be altered through the action of very strong interactions, while are conserved by every weak perturbation. Therefore they do not introduce any ambiguity in the definition of temperature and thermal equilibrium (see e.g. Gavassino & Antonelli 2019) and will be ignored in the present discussion, even if in general they should be included in the equation of state (Callen 1985).

COVARIANT EQUATION OF STATE OF AN ERGODIC BODY
In this section we derive from first principles the covariant equation of state of an isolated system in special relativity. The aim is to show that the Planck-Ott controversy is simply a particular case of the general problem underlined in subsection 2.1. In a standard thermodynamic language, the term isolated means that the system does not exchange energy with the environment, but it may exchange momentum, through e.g. the interaction with adiabatic walls. This asymmetry between energy and momentum cannot hold in a covariant formulation of thermodynamics, because we want to require that the physics (and therefore the form of the Hamiltonian) of the system are the same in any reference frame. Therefore by the term isolated we now mean that the system does not have any interaction with any external field, which otherwise would select a preferred reference frame. This immediately rules out the possibility to have an externally imposed volume, removing at the root the annoying (and not well defined) problem of the relativistic transformation of the thermodynamic pressure.
In this context, if a system has finite size it must be selfbounded. If, for example, it is a fluid in a box, the box should be regarded as a dynamical part of the system itself, which can be accelerated, deformed or heated (it has an entropy, c.f. with Landau & Lifshitz 2013). This implies that its shape and volume is only an equilibrium property, not a parameter in the Hamiltonian.

Deriving the equation of state
Since, by definition, an isolated system does not have any interaction with the environment, its total four-momentum p ν is necessarily conserved. The norm of the four-momentum is the mass of the system, and we assume it to be different from zero. For an isolated system also the angular momentum tensor J νρ is conserved, so special relativity provides automatically other 6 constants of motion which a priori should be included as thermodynamics variable. However, if we go to the reference frame in which p ν = M δ ν 0 , we find that (Weinberg 1972) where xCM is the position of the center of mass (or, more precisely, "center of energy") of the system, while is the Pauli-Lubanski pseudovector (proportional to the spin of the body, intended as the irreducible part of its angular momentum). Using the invariance of the laws of physics under global translations, we can set the origin in a way that xCM = 0, so we have that Thus, considering also that it must be true that the physically relevant (in the construction of the equation of state of a body) constants of motion which the conservation of the tensor J νρ introduces are only three out the four components of the Pauli-Lubanski pseudovector. We call a body ergodic, in analogy with subsection 2.4, if the remaining constants of motion are just the Noether charges QA of the underlying field theory. We assume that these charges transform as scalars under Lorentz transformations. This is the case for normal continuous media, where they can be typically interpreted as particle (minus antiparticle) numbers. Recalling that the physics of the system is invariant under Lorentz transformations and that the entropy is a scalar, the most general equation of state that an ergodic body can have has, therefore, the form This result could be equivalently proved in the context of a quantum theory as follows: since the von Neumann entropy is invariant under unitary transformations, it is a Poincaré invariant and therefore it can be written as a function of the Poincaré invariants of the theory, which are the arguments appearing in the equation of state given above. Equation (25) generalizes the formula of Israel (1989), valid for static systems, to the case of rotating objects.

The Planck-Ott controversy reinterpreted
Since our aim is to understand only the role of the motion on the definition of the temperature we assume for simplicity that the Pauli-Lubanski pseudovector is zero and remains such also in the interaction with the thermometer. We also require that no exchange of Noether charges QA is allowed between the body and the thermometer, in agreement with the discussion of subsection 2.4. Thus all the arguments in the equation of state (25) apart from the first one are fixed and can be ignored, leaving Taking the differential of this equation of state we obtain with where we have introduced the rest-frame temperature through the equation and the normalised four-velocity of the center of mass Now the origin of the controversy becomes clear: the system, as a result of covariance requirements, is naturally given in the form (2), with l = 3. In fact, chosen a reference frame, apart from the energy E = p 0 , there are other three constants of motion implied by the conservation of the linear momentum. If we choose to write where from now on j = 1, 2, 3, then equation (27) implies and we are naturally lead to define the temperature according to Planck's prescription: If, on the other hand, we choose to write where is the three-velocity of the center of mass of the system, then equation (27) implies This would lead to Ott's prescription for the temperature So the ambiguity in the definition of the temperature in covariant thermodynamics is a particular case of the general problem exposed in subsection 2.1.

A third option
Note that pj and v j are not the only two possible examples of constants of motion we could choose. Since any triplet of independent functions Zj = Zj(E, p1, p2, p3) could be put in the equation of state, there might even be definitions in disagreement with both Planck's and Ott's prescriptions. For example, in analogy with the unconventional thermometer proposed in subsection 2.3, we can imagine the following situation. Let us assume a photon gas to be the body of which we want to measure the temperature. Chosen a reference frame, we build a hypothetical thermometer which is kept at rest in this frame by an external force 3 and which can exchange energy only by absorbing or emitting photons with a fixed four-momentum Then, the conserved quantities of the system gas+thermometer are Etot and the triplet With calculations which are analogous to those performed in subsection 2.3, with the aid of equation (32), we can prove that when the equilibrium is reached the thermometer reports a temperature meaning that it measures a Doppler-shifted temperature, which is different from both (33) and (37). So, we have clarified that the real source of ambiguity is not special relativity by itself, but the conservation of the total linear momentum, which introduces three new constants of motion in the equation of state.

THERMOMETERS IN RELATIVITY
In subsection 2.4 we have shown how the standard formulation of the zeroth law of thermodynamics can be used to solve the ambiguity presented in 2.1. However, that formulation was referring to the case in which the different bodies are linked by a WPOH, which is clearly an external field, whose presence breaks the covariance of the theory and the conservation of the momentum itself. For these reasons we cannot rely on it in our case. Furthermore, the definition of thermometer we introduced in section 2.2 is not well suited for covariant thermodynamics because the relation (7) is not covariant, but defines an object which must be kept at rest in a given frame by the action of an external force, as in the case presented in subsection 3.3.
In this section we outline the steps of an ideal measurement of temperature in a context in which the physics of the body and of the thermometer are the same in any reference frame.

Operational definition of temperature
If we assume the thermometer to be a physical object (which does not break the covariance of the theory) with the least amount of macroscopic degrees of freedom possible, we need to impose it to have an equation of state of the form (26): with Mτ the mass of the thermometer, given by where p ν τ is its four-momentum. Let us consider the following idealized experiment: • A thermometer is prepared with an initial mass and located inside the system in a not specified state of motion (formally, this means that the four-momentum p ν τ in the initial conditions is arbitrary) • A weak interaction between the body and the thermometer is switched on and the whole system evolves towards its equilibrium state (formally, this is obtained maximizing the total entropy of the full system body+thermometer compatibly with the constants of motion, which are assigned in the initial conditions).
• After the state of equilibrium is reached, the interaction is switched off and the thermometer is extracted from the body. An experimenter, then, weighs the thermometer accurately, without altering its internal state, obtaining a measure of its mass and therefore, using (41), of its (restframe) temperature: The experiment we presented constitutes the ideal temperature measurement procedure in special relativity. Note that the experimental setting presented in subsection 3.3 is naturally ruled out in a fully covariant context. In fact the thermometer, absorbing photons, exchanges momentum with the gas, and therefore should accelerate. The only way to prevent it is to admit the existence of an external force which counteracts this effect, breaking the covariance of the theory.

The constants of motion
In the experimental procedure outlined in the previous subsection, the equilibrium state that the isolated system body+thermometer reaches at the end of a transient is the one which maximizes Thus, we need to impose, see equation (28), for every perturbation of the 8 variables p ν , p ν τ allowed by the conservation of the constants of motion. The conservation of the total four-momentum however, implies that so equation (45) becomes Thus, we immediately obtain that if the thermometer is able to exchange freely energy and momentum with the body, then the variations δp ν τ are completely free and equation (48) implies The first equation is the thermodynamic explanation of the friction as an entropic force. If the two bodies are free to exchange both energy and momentum, the exchange will lead them to a final state in which they comove and have the same rest-frame temperature.
The only way to avoid the trivial outcome of a thermometer comoving with the body is to impose the presence of other constants of motion, which can force the existence of relative motions also in equilibrium. The easiest way to do this consists of imposing that the four-velocity u ν τ of the thermometer is conserved in the interaction with the body (as has been proposed by Becattini 2016). If this is the case, then the variation δp ν τ in (48) are no more completely free, but satisfy Therefore, the condition for the entropy to be maximum with respect to Mτ , with p ν tot and u ν τ constant, reads uν u ν τ TRF which in the rest frame of the thermometer becomes Planck's prescription,equation (33). However, this is only one possibility. One could instead design a situation in which the thermometer does not alter the state of motion of the body. In this case the constants of motion would be the components of u ν , giving The final condition would read 1 TRF in agreement with Ott's prescription,equation (37). There are, clearly, other possible assumptions for δp ν τ which lead to alternative equilibrium conditions.
We have shown that the result of a temperature measurement can vary from thermometer to thermometer if the we admit the presence of a relative motion in equilibrium. Everything depends on which energy-momentum exchanges are allowed by the interaction and this, in turn, depends on how the thermometer is designed. This formalizes from a statistical perspective the results of Bíró & Ván (2010), who have shown that different phenomenological models of heat transfer (i.e. different directions of allowed four-momentum exchanges) lead to different equilibrium states.
It is, however, clear that a constraint of the kind (50) or (52) represents a non-ergodicity of the system body+thermometer which is unlikely to arise in realistic situations where a form of friction, even if small, always exists. 4 For the interested reader, we propose in appendix B an ideal system which seems, at first, to allow for a permanent relative motion in equilibrium. Then we show how nature finds a way to prevent its existence.

Indirect thermometers
Motivated by the work of Landsberg & Matsas (1996), we need to clarify a point before moving on with the general discussion. In the context of thermodynamics, a rigorously defined thermometer is an object which always reports only its own temperature. Its operating mechanism is based on the zeroth law and not on the knowledge of the microphysics of the body. To clarify the importance of this distinction we give the following example.
Let us suppose that we need to measure the temperature of a photon gas in equilibrium, at rest with respect to us. Since the number of photons is not conserved, all the local properties of the gas depend on a single parameter. This implies that the average value of any intensive observable can be written as a function of the temperature. The famous equation of state of the radiation gas where ε is the energy density and a is the radiation constant, is an example. As a result, any device which measures 4 Again we remark that in this work systems with spontaneously broken symmetries, like superfluids, are not considered because the role of their emergent constants of motion in the definition of the temperature has already been clarified. The systems under consideration are only the ergodic bodies presented in subsection 3.
an observable whose average value is monotonic in the temperature can be used as an indirect thermometer. We take as an example a hypothetical instrument which measures the energy density and then is calibrated to report on a screen the quantity Clearly, if equation (54) holds, we have Tm = T , therefore this seems to be a reliable thermometer. Now let us imagine that the conditions in the environment change and suddenly all the interactions conserve the number of photons. Now the gas can have in principle a finite chemical potential µ and will have an equation of state If now we try to measure the temperature with the device we presented above we may get a wrong answer, because of the additional dependence of ε on the chemical potential. So we have shown that there is no guarantee that a device which is calibrated to associate a temperature to the mean value of a different observable will give the correct result when unexpected constants of motion arise. This is the explanation of the non-uniqueness of the outcome of the temperature measurement proposed by Landsberg & Matsas (1996) in their thought experiment. In fact, they consider a detector which is calibrated to associate a temperature to the spectral properties of the photon gas at rest and they imagine to use it in a situation in which the total momentum is conserved and different from zero.
In this work we are not dealing with this kind of devices, but only with the ideal thermometers we presented in subsection 4.1.

COVARIANT FORMULATION OF THE ZEROTH LAW
We are finally able to revisit the concept of thermal equilibrium, presented in subsection 2.4, and adapt it to a relativistic context. As a result, we will also show that it is achieved only when the bodies are at rest with respect to each other.

A new notion of thermal equilibrium
Since any kind of externally imposed wall breaks the covariance of the theory, we need to revisit the notion of thermal equilibrium replacing the WPOH with a more general interaction. From a microscopic perspective, the wall only permeable to heat is an idealization invoked to describe a condition in which the two systems are linked by a very weak interaction which does not allow the exchange of conserved charges (of the kind described in subsection 2.4) among the bodies. Formally, this means that the total Hamiltonian H is the sum of the Hamiltonians of the individual systems, plus a small interaction potential VI such that where Q

(i)
A is the amount of conserved charge A contained in the system i. To make this theory covariant and compatible at a fundamental level with an underlying Quantum Field Theory, we can require the interaction to have a form where LI is a scalar and constitutes the interaction term of the Lagrangian density (function of the fields and not of their derivatives). In general, the term LI will be a coupling of the two bodies with some particles which are exchanged by the systems and therefore mediate the interaction. It is, then, clear that the condition (57) is fulfilled, provided that the mediator does not carry any conserved charge. Thus we can formulate the covariant notion of thermal equilibrium in special relativity as follows: "two systems are said to be in thermal equilibrium if they weakly interact through chargeneutral (in the sense of Noether's theorem) mediators and there is an inertial frame in which they are both in a stationary state". Note that, even if this new definition has been derived in a fully covariant context, it can still be applied to those cases in which external agents (like walls) are included. In this sense it represents only a generalization of the previous one, able to include the problem of the moving objects. In fact an ideal wall only permeable to heat is formally described as a surface which acts as a perfectly reflecting wall for baryons and leptons, but which is permeable to photon radiation (a photon does not carry any charge, being its own antiparticle).

The zeroth law in special relativity
Now that an extended notion of thermal equilibrium has been proposed, we are able to address from a statistical perspective the question about whether or not the zeroth law can hold also in a fully covariant context.
When two bodies exchange a mediator, this will transfer its four-momentum, which, if the sender body is macroscopic, will be in general randomly oriented and its frequency will take values in a continuous spectrum. Therefore we can conclude that in equilibrium the entropy is maximized with respect to any infinitesimal exchange of four-momentum. Formally this means that we need to take δp ν τ arbitrary in equation (48), leading to equation (49), which we present again here for two arbitrary bodies a and b: If now we go to the common rest-frame of the two bodies, they are both in a stationary state, proving that indeed they are in thermal equilibrium, according to the definition proposed in the foregoing subsection. It is in principle not impossible to design ad hoc interactions which make one of the bodies opaque only to one specific value of four-momentum of the mediator and transparent to all the others, producing a constraint on the exchange of four-momentum δp ν τ in equation (48). However, considering that at a fundamental level the interaction is not arbitrary, but has the form (58), we can assume that in realistic situations, if we take into account the processes at all the orders, this phenomenon will be in the end broken (in agreement with the thought experiment proposed in appendix B). As we explained in subsection 4.2, this assumption corresponds to a statement of non-existence of ad-ditional constants of motion apart from the Noether charges of the theory. We can, thus, consider it a manifestation of the ergodic hypothesis.
We have shown that in covariant thermodynamics two bodies are in full thermal equilibrium if they have the same rest-frame temperature and are at rest with respect to each other. This immediately implies that the condition of being in thermal equilibrium is still an equivalence relation, whose equivalence classes are all the sets of bodies with the same β ν = T −1 RF u ν . The zeroth law of thermodynamics is, then, still valid.

APPLICATIONS
Below we propose three simple applications of our study.

Heat baths in special relativity and the covariant free-energy principle
A heat bath is a body whose macroscopic properties are not relevantly altered by the interaction with the system object of study. In standard thermodynamics this is ensured by imposing an infinite heat capacity. It is clear that in special relativity, when both exchanges of energy and momentum are included, we need to provide a specification also of its inertia. We therefore define a heat bath as body with (effectively) infinite heat capacity and mass. Its equation of state needs to be expressed in a covariant form as a relationship between its mass MH and entropy SH (see equation (26)), therefore we may write an expanded effective fundamental relation where SH0 and TH are two constants. The quantity TH is the rest-frame temperature and the fact that it is a constant guarantees the divergence of the heat capacity. When an interaction with a system (whose thermodynamic variables will not carry any label, as usual) is enabled, system and heat bath will exchange energy and momentum, conserving the total four-momentum Thus, considering that where u ν H is the center of mass four-velocity of the bath, we obtain that In the limit in which MH −→ +∞, with finite exchanges of four-momentum, so the heat bath does not accelerate. As a result, a heat bath in special relativity is an object with constant temperature and center of mass four-velocity. The manifestly covariant formulation of this statement is Let us study the condition of equilibrium of a system in contact with a heat bath. The law of non-decreasing entropy reads With the aid of equation (60) we can rewrite this condition as Invoking the conservation of the total four-momentum we find Since uHν and TH are constant, they can be brought inside the variation, producing the condition with This is the covariant formulation of the principle of minimum free energy for a system in contact with a heat bath. Note that in the reference frame of the bath the expression for the covariant free energy reduces to Thus we have proven that the equilibrium state of a system in contact with a heat bath is the one which minimizes the Helmholtz free energy (over the manifold of states with TRF = TH ) measured in the rest-frame of the heat bath. This is in agreement with the quantum statistical result of Sewell (2008), who proved that a body that serves as a heat bath (in the sense of the zeroth law) can obey the KMS conditions only in its own rest-frame, making equation (70) the only possible covariant generalization of the free energy.
Finally we note that if we search for the equilibrium state of the system imposing we obtain the conditions in accordance with our formulation of the zeroth law.

Relativistic unification of heat and friction
The root of the Planck-Ott imbroglio was the disagreement on the relativistic transformation of the heat (Farías et al. 2017). The two views, and a simple way of deriving them, are summarized in appendix C. Now we are able to clarify this issue. In standard thermodynamics, the work exerted on a system is its change of energy due the time-dependence of external macroscopic forces. Following Landau & Lifshitz (2013), a macroscopic force can be modelled as an external field which appears in the microscopic Hamiltonian of the system and the work it makes is the result of a time-dependence of it. In fact, if this field changes with time, this breaks the invariance of the microscopic theory under time translations and, as a result, the (Noether) conservation of the energy of the body.
If we follow this interpretation, the generalization to special relativity is straightforward. Let us consider a system in contact with a heat bath and interacting with an external field (which does not act on the bath directly). From (61) we find The presence of the field now breaks the invariance of the theory under the whole Poincaré group, because the field might have an arbitrary dependence both on space and time. Therefore the total four-momentum is not conserved and we call its variation work four-vector: Note that if we consider the whole universe (external field included) as a bigger system, and the field becomes a dynamical variable itself, then the Poincaré invariance is restored and the four-momentum of the universe is again conserved. Thus −δW ν represents the four-momentum transferred from the body to the external environment mediated by the action of the field, in agreement with the common practical interpretations.
Considering that the heat bath does not interact directly with the field, its variation of four-momentum can only be the outcome of a transfer to the body, which allows the introduction of a heat four-vector As a result, equation (74) becomes the first law in special relativity: Formally, this four-vectorial construction reminds the one proposed by Ott (see appendix C), but the separation into contributions is completely different. It is interesting to study two particular cases which will clarify its physical meaning and show its consistency with the standard definitions.
Let us consider the case in which no interaction with the heat bath occurs. From (76) we have δQ ν = 0. Now if we choose a reference frame and decompose (77) into its time and space components we obtain the equations Let us assume that, in this reference frame, the external field does not depend on time. Then the invariance under time translations is restored and the energy of the body is conserved, giving δE = δW 0 = 0. However, if the field depends on space, the momentum is not conserved and in principle δW j = 0. This is the case, for example, of a gas enclosed in a box with perfectly reflecting walls. These ideal walls are nothing but an external stationary potential which break the conservation of the momentum of the gas. If, on the other hand, the walls start moving slowly, then also the energy can change, and it does according to the well known formula δE = −P δV , where P and V are respectively pressure and volume. Thus in this case we have So we hope we have convinced the reader that the fourvector δW ν is the natural relativistic generalization of the thermodynamic work.
Now we can focus on the heat. To do this we consider an opposite situation in which no external field is applied and the body interacts only with a heat bath. Then δW ν = 0 and we have To study the physical interpretation of this equation, we work in the reference frame of the heat bath and write the decomposition In this frame the condition of non-increasing free energy (69) can be easily rewritten in the form If we impose that the body is at rest with respect to the bath, then we have u j = 0 and equation (82), combined with (81), becomes This allows us to identify δQ 0 with the heat exchange and we have recovered the Clausius formulation of the second law 5 , which holds strictly for bodies which are at rest with respect to each other. On the other hand, if we impose that the two bodies have the same temperature TRF = TH and their relative speed is non-zero, but small compared to the speed of light (i.e. u 0 ≈ 1), we find from the combination of (82) and (81) the condition However, the only force which acts on a body which is moving with respect to the environment, in the absence of external fields, is the friction with the environment f j F . Thus from Newton's second law we find where δt is the time interval in which the exchange of momentum occurs. Plugging (85) into (84) we obtain the other familiar law which states that the friction always acts in a way to reduce the relative speed between the bodies (in agreement with our formulation of the zeroth law).
The analysis we have made shows that we can interpret the heat four-vector δQ ν as the joint action of friction and heat exchanges with the bath. Special relativity has dictated the fundamental non-divisibility of these two dissipative phenomena, as different components of the same four-vector. Our analysis in subsection 5.1 also provides a microscopic interpretation of this unification. It shows that, since any interaction is the result of the exchange of a mediator, it always involves a transfer of both energy and momentum, making any separation of the contributions merely artificial.
In conclusion, heat transforms as a four-vector in special relativity. However, its space components do not necessarily vanish in the rest-frame of the body, thus Ott's transformation law does not apply in general.

Temperature of rotating objects
It is well known that rotating relativistic objects in full thermodynamic equilibrium have non-uniform temperature Cercignani & Kremer (2002). The Killing condition for the temperature vector field implies that the local rest-frame temperature of the volume elements has a dependence where ω is the (uniform) angular velocity of the body and R is the distance from the axis of rotation. The natural question which now arises is how we can define the temperature of a rotating object which is compatible with the zeroth law.
To address this issue we need to consider equation (25) (ignoring the presence of charges) including a non-zero norm Our intuition tells us that we can define the inverse of the temperature as the partial derivative of S with respect to M , but again we face the problem that we do not know which variables we should keep constant. Thus, in analogy with what we did in the previous sections, we consider an interaction with an ideal (spin-less) thermometer and we search for the maximum of the function The maximum needs to be computed compatibly with the constraints of conservation of the total four-momentum and angular momentum tensor: If one performs the calculation of the variations explicitly, imposing they will find, as a unique result, that the thermometer has to be at rest in the center of mass of the rotating body, measuring a temperature It turns out, however, that this is not the maximum of the entropy, but only a saddle point, which results from the mathematical symmetries of the problem. The entropy does not admit a maximum, but only a supremum, which can be computed using the following argument. It is natural to assume that because, as the spin grows at constant mass, we are subtracting energy from the "chaotic" motions, forcing it into the collective rotation. We consider a state in which the thermometer and the body are far away from each other, in the limit in which the center of mass of the thermometer goes to infinity. If we remove the spin-angular momentum from the body entirely, setting this needs to be transferred into orbital angular momentum to ensure the overall conservation. However the orbital angular momentum of the thermometer scales as where R is the distance of the thermometer from the chosen pole (which can be set in the center of mass of the body) and pτ is the spatial transversal component of the momentum. Thus we have that, for R −→ +∞, only a negligible value of pτ is required to provide enough angular momentum to ensure the conservation of the total. Therefore we have proven that with an infinitesimal variation of the momentum of the thermometer we can always remove the spin angular momentum from the body and impose equation (95) without violating the conservation of the total angular momentum. Considering equation (94), we see that this transformation is always favourable and leads to a growth of entropy. Thus we obtain that the supremum entropy is achieved for which is reached only in the limit in which body and thermometer are infinitely far from each other. This result remarkably shows that, even if a rotating body can be, in principle, in thermodynamic equilibrium, it is impossible to associate a temperature to its state from the zeroth law if W = 0. This, obviously, does not prevent one from defining a generalised notion of temperature through, e.g., the saddle point equation (93). However, assuming this as the temperature, all the machinery of equilibrium thermodynamics is not guaranteed to apply consistently.

CONCLUSIONS
We have shown that the presence of other constants of motion apart from the energy in a thermodynamic system can lead to a fundamental ambiguity in the definition of the temperature. The Planck-Ott imbroglio has been explained to arise as a direct consequence of this problem, produced by the need of requiring the conservation of the total linear momentum.
We have explained that the zeroth law of thermodynamics plays a crucial role in selecting the appropriate experimental setting which defines a temperature measurement, removing all the ambiguities. However, we have seen that the standard notion of thermal equilibrium invoked in classical thermodynamics refers to experimental conditions which break the covariance of the theory at a fundamental level and therefore has to be revisited to be applicable to the case of moving bodies in special relativity.
We have proposed a new notion of thermal equilibrium which is fully covariant and well suited for applications in both relativistic and non-relativistic contexts (provided that the gravitational field is negligible). Under the ergodic assumption we have proven that, using this definition, the zeroth law of thermodynamics is still valid and full thermal equilibrium is achieved only when all the systems have the same rest-frame temperature and are at rest with respect to each other.
We have, then, applied our results to three selected open problems of relativistic thermodynamics. We have provided a covariant formulation of the notion of a heat bath and of the principle of minimum free energy. The result is in complete agreement with quantum statistical mechanical calculations (Sewell 2008), establishing a direct connection of our approach with microphysics. Then, we have proposed a solution to the long-lasting debate about the relativistic notions of thermodynamic work and heat. Our minimal approach has been to generalize the definition provided in standard textbooks (Landau & Lifshitz 2013) to a relativistic spacetime. This extension was constructed in a way to be rigorously defined at every scale, this making it well suited for both theoretical modeling and practical application. In the end, we studied the problem of defining the temperature of rotating relativistic objects. We found that it is not possible to attribute to them a temperature from the zeroth law. This is in accordance with the fact that, since their temperature is not uniform (Cercignani & Kremer 2002), thermometers located at different distances from the rotation axis measure a different temperature.
This work completes the axiomatisation of the relativistic thermodynamics proposed by Israel (1989Israel ( , 2009, solving the major open controversies. The formalism was already fully self-consistent (encompassing the first and the second law) and represents the theoretical ground upon which the modern formulations of relativistic hydrodynamics are constructed. Our consistent implementation of the zeroth law provides a direct contact with statistical mechanics and with the standard formulation of thermodynamics.
The take-home message is that heat and friction are the components of a four-vector, representing respectively the exchange of energy and momentum between two thermodynamic bodies. This unification solves the controversy about the relativistic transformation of the heat and, at the same time, changes our understanding of the zeroth law. In fact, since relativity treats energy and momentum symmetrically, so the relativistic thermodynamics will do, adding to the condition of equilibrium with respect to energy exchanges other 3 conditions associated with the exchanges of momentum. This produces in equilibrium 4 constraints, instead of 1, proving that in relativity the zeroth law is still valid and still establishes an equivalence relation. However, the equivalence classes now need to be parametrized using 4 independent parameters (temperature and velocity of the center of mass) instead of just 1.

APPENDIX A: TWO-LEVEL THERMOMETER
We consider an ideal non-relativistic Fermi gas enclosed in a box with periodic boundary conditions. Let Cp,σ be the annihilation operator of a particle occupying the single-particle state of (discrete) momentum p and spin σ = ±1/2. They satisfy the standard anticommutation relations The Hamiltonian of the gas is where p is the single-particle energy of a fermion of momentum p. The operator number of particles is We imagine the thermometer to be a two-level system 6 with energy separation ε > 0 and ground-state energy conventionally set to zero. Therefore the Hamiltonian of the isolated thermometer has the form, in an appropriate basis, where σ± are constructed as the operators σx, σy, σz being the Pauli matrices acting on the two-dimensional state space of the thermometer. The total Hilbert space is assumed to be the tensor product between the space of the thermometer and the Fock space of the fermions and we have σj, C † p,σ = 0.
When the thermometer is put into contact with the gas, we assume the total Hamiltonian to be where the interaction term Vgτ has the form where gp are real coefficients (reassuring Hermitianity). This potential models a process in which the thermometer makes level transitions absorbing and destroying (or creating and emitting) a fermion, breaking the particle number conservation. However it is easy to check that the operator commutes with H and therefore describes a constant of motion. In the limit of small Vgτ (weak interaction) the quantity Z introduced in equation (14) is represented by the operator and is, thus, conserved.
When the system gas+thermometer is in thermal equilibrium, its density matrix can be assumed to be the Generalised Gibbs ensemble (Perarnau-Llobet et al. 2016) ρ ∝ exp(−βH + λQ). (A12) In the limit Vgτ → 0 it splits into the tensor product with The state ρg is the thermal state of the Fermi gas with temperature Tg and chemical potential µ given by On the other hand, ρτ is the thermal state of the thermometer with temperature Combining (A15) with (A16) we find which is in agreement with equation (16). Note that, since the gas is a Fermi gas, µ can in principle be positive. So Tτ can be infinite (for µ = ε) or negative (for µ > ε). In the diluted limit (for µ → −∞) the temperature of the thermometer goes to zero, because the number of fermions is small compared to the number of available single particle states, so the probability to have a particle with exactly the energy ε to be absorbed is small. We remark that having Tτ = Tg is possible only as a result of the existence of an other constant of motion apart from the energy, as we clarified in section 2. In fact, if we break the conservation of Q, then λ = 0 (so the chemical potential µ is in turn zero) and (A17) becomes Tτ = Tg.

APPENDIX B: A PROBLEM OF ERGODICITY
We have proven that a thermometer can maintain, in equilibrium, a relative motion with the body only if we impose some limitations on the possible exchanges of four-momentum allowed by the interaction, preventing δp ν τ from having arbitrary direction. It is clear that, for macroscopic (i.e. comprised of large numbers of particles) systems with realistic interactions, the existence of an exact constant of motion of this kind is nearly impossible to occur. We propose the following thought experiment to explain the basic mechanisms which prevent it.

B1 Measuring Planck's and Ott's temperature: an attempt
Consider a real scalar boson φ of mass m, which self-interacts with a short-range (compared with the average distance among the bosons) interaction. Since this particle coincides with its own antiparticle we can assume reactions of the type to be allowed, implying that the particle number is not conserved (the chemical potential of the boson vanishes). There are, therefore, no conserved charges and the thermal state of this scalar boson can be characterised by an equation of state of the type (26). We will consider a gas of bosons φ to be the body of which we measure the temperature. We construct the thermometer as a collection of comoving, with respect to each other, distinguishable two-level systems, where the ground state is denoted by |0 and the excited state is denoted by |1 . We impose the mass separation between the two levels to be equal to the mass of the boson: The interaction between the thermometer and the gas is assumed to happen only through the absorption or the emission of a boson φ by a two-level system, namely through a reaction where B |0 represents a two-level system in the ground state and B |1 represents a two-level system in the excited state. Equation (B2) implies that the reaction (B3) can happen only in the case in which the boson φ is at rest with respect to the thermometer, to conserve the total four-momentum. Therefore the reaction alters the mass of the thermometer but not its state of motion. We have constructed a thermometer whose four-velocity u ν τ is conserved by the interaction with the body.
According to the statistical arguments we exposed in subsection 4, this thermometer will measure, in equilibrium, Planck's temperature. This can be also shown directly from kinetic theory. In fact, if we work in the reference frame of the thermometer, it is easy to show that the number N |1 of two-level systems in the excited state evolves according to the equation (Dirac 1947) where R is the spontaneous decay rate of the state |1 , N |0 is the number of two-level systems in the ground state and nq is the average number of bosons φ with spatial momentum q. Once thermal equilibrium is reached, N |1 becomes constant and from (B4) we obtain Recalling that the interaction is short range, we can approximate the gas as ideal. The equilibrium occupation number nq of the ideal boson gas in a thermal state is thus equation (B5) becomes which describes the macrostate of the thermometer having temperature Recalling equation (28), we see that the above equilibrium condition reduces to Planck's prescription. Thus, this thought experiment might seem, at the first sight, to support equation (33) as the transformation law of the temperature under Lorentz boosts. A supporter of Ott's view, however, performing the same experiment might consider the collection of two-level systems to be body of which they are measuring the temperature and the boson gas as the thermometer. They will therefore exchange Tτ with TRF , obtaining a measurement of the temperature of the two-level system in agreement with Ott's law, equation (37).

B2 Realistic interactions
The situation we have proposed represents an idealised system in which the thermometer can exchange energy but not momentum (in its reference frame). Unfortunately such a system cannot be constructed in realistic conditions and represents only a non-physical limit. In fact the spontaneous decay rate R appearing in equation (B4) is given by the Fermi Golden Rule and must be equal to (Peskin & Schroeder 1995) where | 0, φ| V |1 | 2 is the matrix element of the interaction potential responsible for the transition and q f is the momentum of the emitted particle φ in the original frame of the two-level system. So if we set q f = 0, which is the necessary condition to guarantee the conservation of u ν τ , we will find that the reaction cannot occur and the thermometer does not interact with the body at all. The only way to make the transfusion of energy possible is to set |q f | = 0, breaking the conservation of u ν τ . The typical acceleration that the thermometer will, then, experience is which is a second order in |q f |/M |0 . Therefore the system presented in subsection B1 can exist only as a limit in which the time required for the thermometer to reach comotion with the body is much longer than the time of the experiment. There is, however, an other complication. Interactions coming from an underlying field theory in general admit the possibility of having higher order processes, of the kind where a spectator φ takes part of the four-momentum. In this situation the two-level system does not need to be at rest at the end of the process, breaking again the conservation of u ν τ . This process is not suppressed by the phase space and therefore becomes dominant, leading anyway to the inevitable acceleration of the thermometer.

APPENDIX C: AMBIGUITY IN THE DEFINITION OF THE HEAT
Let us start from the general differential δp ν = u ν δM + M δu ν .
This represents an orthogonal decomposition of the variation of the four-momentum, because uν δu ν = 0, which is ensured by the conservation of the normalization condition uν u ν = −1. Let us assume an equation of state (26), which implies that we do not have chemical-type forms of work µ A δQA (where µ A is the chemical potential of the charge QA), but the only possible way to exert work on the body is by impressing an acceleration through the action of a force. This suggests a relativistic first-law The four-vector δW ν can be interpreted as the fourdimensional generalization of the work element. In fact, in a given reference frame, which is the formula for the relativistic work of an external force acting on a moving particle. From equation (C4) one finds that in a given frame δQ 0 = u 0 δM = u 0 TRF δS, where we have employed the definition (29). This formula is the relativistic transformation of the heat proposed by Ott (Farías et al. 2017). There is, however, an other possibility. Let us rewrite equation (20) in a chosen reference frame in the form E = M 2 + pjp j . (C7) Its differential reads The second term reminds the standard formula of the variation of the kinetic energy provided in Hamiltonian mechanics, which then suggests the decomposition This is the relativistic transformation for the heat proposed by Planck (Farías et al. 2017). We see that the source of ambiguity is in the definition of the work as the variation of the kinetic energy of the system in situations in which the mass is changing with time (in the case in which δM = 0 the formulas of the work (C5) and (C10) coincide, as it happens in point-particle mechanics).
As we clarify in the main text, none of these two subdivisions reflects the standard physical interpretation of the splitting of the energy variation into heat and work. The subdivision needs to be performed considering how the environment is acting on the body and cannot be uniquely determined in terms of internal properties of the body itself.