{'fraction_non_alphanumeric': 0.039482499711216354, 'fraction_numerical': 0.009911054637865312, 'mean_word_length': 4.197646493756004, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Thermodynamics and phase transitions of black holes in contact with a gravitating heat bath

We study the thermodynamics of a shell of self-gravitating radiation, bounded by two spherical surfaces. This system provides a consistent model for a gravitating thermal reservoir for different solutions to vacuum Einstein equations in the shell's interior. The latter include black holes and flat space, hence, this model allows for the study of black hole phase transitions. Following the analysis of arXiv:1103.3898 , we show that the inclusion of appropriate entropy terms to the spacetime boundaries (including the Bekenstein-Hawking entropy for black hole horizons) leads to a consistent thermodynamic description. The system is characterized by four phases, two black hole phases distinguished by the size of the horizon, a flat space phase and one phase that describes naked singularities. We undertake a detailed analysis of black-hole phase transitions, the non-concave entropy function, the properties of temperature at infinity, and system's heat capacity.


Introduction
Ever since Bekenstein's proposal of black hole entropy [1] and Hawking's derivation of black hole radiation [2] , black holes are understood as thermodynamic objects. According to the generalized second law of thermodynamics (GSL) [3], black hole entropy adds up with the entropy of matter, and their sum is a non-decreasing function of time.
The GSL implies that there exists a larger thermodynamic space that contains black holes and self-gravitating systems, i.e., systems of ordinary matter in which the gravitational self-interaction contributes significantly to their thermodynamic properties. Therefore, we expect the presence of phase transitions between black holes and self-gravitating systems.
In this work, we undertake the analysis of such phase transitions in a simple system, that consists of a shell of self-gravitating radiation. The geometry inside the shell is either of Minkowski space, or of a black hole or of a singular solution. The different interior geometries correspond to different thermodynamic phases for the system, while the shell acts as a thermal bath for these phases. We analyze the thermodynamic properties of the system and the characteristics of the associated phase transitions.

Motivation
There is substantial work on black-hole to black-hole phase transitions, first on Kerr-Newman black holes [4][5][6], and later on asymptotically anti-de Sitter (AdS) black holes [7][8][9][10]. Phase transitions in self-gravitating systems have also been extensively studied, see, for example, [11][12][13][14]. However, there is much less work on phase transitions between black holes and selfgravitating systems. The most well known case is the Hawking-Page phase transition between black holes and radiation [15], albeit in asymptotically AdS spacetimes. In asymptotically flat spacetimes, phase transitions have been studied by comparing the entropy of a Schwarzschild black hole in a box with the entropy of (non-gravitating) radiation in the box [4,5,[16][17][18]. Backreaction from the Hawking radiation can also be included in the thermodynamical description [19].
Certainly, understanding phase transitions between black holes and self-gravitating systems is by itself important. Furthermore, progress in this direction could provide significant insights to quantum gravity theories [20]. For example, consider a self-gravitating system that involves conserved quantities like particle numbers. These quantities disappear in the black hole case, by virtue of the no-hair theorem. A thermodynamic study of the formation of a black hole phase can provide novel information about the relation between black hole hair and quantum effects, the latter being incorporated in black hole entropy. Thermodynamic processes that cross from the black hole phase to ordinary matter may be relevant to discussions of black hole information loss. In the longer term, an analysis of critical exponents, or of non-equilibrium properties in such phase transitions could constrain candidate quantum theories of gravity.
A different context for this work is the long-standing effort to understand the physics of non-extensive thermodynamic systems in equilibrium. Non-extensivity arises whenever the range of interactions of the system is larger than the size of the system: this is possible, ei-ther with short-range forces in small systems [21] or with long-range forces [22,23], including gravity [24,25]. Non-extensive systems exhibit novel thermodynamic properties. They are spatially inhomogeneous even in equilibrium, their micro-canonical and canonical ensembles are inequivalent [26], their entropy function is not be concave (hence, heat capacities may be negative). The model examined here is novel and informative for non-extensive thermodynamics. It involves full General Relativity (rather than Newtonian approximations), it brings together black holes and self-gravitating system. Crucially, it can be treated semianalytically, thereby, providing a workable testing ground for understanding the structure of gravitational thermodynamics.

Background
The natural place to start an analysis of black hole phase transitions is the simplest selfgravitating system in General Relativity, namely, static, spherically symmetric solutions to Einstein's equations. These are described by the Tolman-Oppenheimer-Volkoff (TOV) equation. One might expect that for a given type of matter, there may exist a region of the parameter space that corresponds to black hole horizons coexisting with matter. This turns out to not be the case: if matter satisfies the dominant energy conditions, then no horizons are encountered when integrating the TOV equation from the boundary inwards [27,28]. In fact, if the equation of state is thermodynamically consistent, there are only two types of solutions, regular ones and singular ones [28]. The former are everywhere locally Minkowskian, and they describe ordinary compact stars. The latter contain a strongly repulsive naked singularity at the center, where the geometry is locally isomorphic to negative-mass Schwarzschild spacetime.
The situation is different when we consider a shell rather than a ball of matter. Suppose we place an interior boundary at r = r 0 so that the geometry for r < r 0 is a solution to the vacuum Einstein equations. Then, the associated thermodynamic state space contains regular solutions, singular solutions and also black hole solutions. Hence, we can undertake a thermodynamic analysis that includes black hole phase transitions.
In this paper, we study a shell of radiation, bounded between two reflecting and nonthermally conducting surfaces at r = r 0 and at r = R. The simplicity of the equation of state, implies that some properties of the solutions can be evaluated semi-analytically. For past studies of self-gravitating radiation, see, Refs. [29][30][31][32][33][34].
The radiation shell considered here defines a concrete model of a thermal reservoir in contact with a black hole. This model is an improvement of existing ones-see, for example, [18]-which employ the rather extreme idealization of switching off the gravitational interaction of the reservoir. Such an approximation is justified in extensive systems: when a system is brought into contact with a reservoir, it may acquire the reservoir's temperature or pressure, but its constitutive equations remain unchanged. This is due to the fact that short range forces affect only a small region around the interface of the system with the reservoir. In contrast, when long-range forces are involved, the reservoir acts directly on the whole of the system, and it can affect its constitutive equation.
Our analysis employs the formal structure of equilibrium thermodynamics, as described by Callen [35]. We mentioned earlier that there exists as yet no set of thermodynamic axioms applicable to non-extensive systems. In principle, some axiomatic approaches to thermodynamics [36][37][38] can be generalized for non-extensive systems; for work in this direction, see Ref. [39]. Still, a definitive axiomatic formulation of thermodynamics for gravitating systems does not yet exist. We note the work of Martinez in adapting Callen's axioms to gravitational systems in Ref. [40], and Ref. [41] for formulating the three laws of thermodynamics in this context.
The key point in Callen's formulation of thermodynamics is that an isolated thermodynamic system is described in terms of a set of macroscopic constraints that determine its thermodynamic state space Q. The values of any variable that is not fixed by the constraints correspond to global maxima of the entropy function, subject to the constraints. This statement is the Maximum Entropy Principle (MEP). Eventually, all thermodynamic information is contained in the fundamental thermodynamic function, i.e., the entropy function S : Q → R + . In the present system, the thermodynamic state space Q is three dimensional, it is determined by the shell radii r 0 and R and by the Arnowitt-Deser-Misner (ADM) mass M .

Results
Our results are the following.
1. The space Z of solutions to the TOV equation is larger than the thermodynamic state space Q. This means that the equilibrium values of the additional degrees of freedom must determined the MEP. We show that if the entropy function involves only contributions from radiation, the entropy function is unbounded and the MEP cannot be implemented. The system would then have no consistent thermodynamic description. This is an analogue of the gravothermal catastrophe [43,44] that appears in non-relativistic self-gravitating systems. 2. To restore thermodynamic consistency, we must add entropy terms associated to the internal boundaries of the system, i.e., the horizons and the singularities that appear in the interior region. For horizons, we use the Bekenstein-Hawking entropy. For the repulsive singularity, the associated entropy is obtained by Wald's Noether charge for spacetime boundaries [42], modulo a multiplicative constant. The latter is determined uniquely by the requirement of thermodynamic consistency, i.e., that the MEP can be implemented. The resulting expression for the boundary entropy is consistent with a previous result of Ref. [32] for a ball of self-gravitating radiation. 3. After the implementation of the MEP, we construct the entropy function on the thermodynamic state space Q. Q splits into four regions, corresponding to four distinct phases. Phase F corresponds to a shell in locally Minkowski spacetime, phase B I describes a large black hole solution with little radiation in the shell, phase B II describes a small black hole coexisting with radiation, and phase S corresponds to singular solutions. 4. We find that the phase transitions between the F phase and the B I and B II phases are first-order. The latent heat in all transitions from the F phase to the black hole phases is negative, i.e., a heat must be removed from a self-gravitating system in order to form a black hole. We explain that this occurs because black holes constitute a higher-energy phase but not a higher-temperature phase. The transition between the B I and the B II phases is continuous, and so is the transition between the F and S phases. There is also one triple point for the F, B I and B II phases. 5. There is no coexistence curve between the black hole phases and the S phase. This could change by a modification of the Bekenstein-Hawking expression for black hole entropy at very small masses. 6. We analyse the behavior of other thermodynamic observables, focusing on the temperature at infinity, on the heat capacity. The heat capacity of the system can become negative, however, in the context of non-extensive thermodynamics, this is not necessarily a sign of instability [45].
The plan of this paper is the following. In Sec. 2. we analyse the geometry of the shell of gravitating radiation, and all types of solutions. In Sec. 3, we show that the inclusion of entropy contributions from boundary terms allows for a thermodynamically consistent description of the system. In Sec. 4, we implement the MEP, we identify the four phases that characterize the system, and we analyze phase transitions and other thermodynamic properties. In Sec. 5, we summarize and discuss our results. The Appendix contains a proof that the entropy of radiation in the box has no global maxima.
2 Spacetime geometry for a shell of self-gravitating radiation

Constitutive equations
The system under study is a spherical shell of self-gravitating radiation in thermal equilibrium. The thermodynamic equations for radiation are where ρ is the energy density, P is the pressure, T is the temperature, s is the entropy density and b = π 2 /15 in geometrized units (c = G =h = k B = 1). The spacetime metric is static and spherically symmetric, where L(r) is the lapse function, m(r) is the mass function and (t, r, θ, φ) is the usual coordinate system. The radiation is contained between two reflecting spherical boundaries, an external boundary at r = R, and an internal one at r = r 0 < R.
For r > R, the solution is Schwarzschild with ADM mass M , i.e., For r ∈ [r 0 , R], the geometry is determined by the TOV equation for radiation, For fixed ADM mass M , we solve the TOV equation from the boundary r = R inwards. To this end, we must specify the density ρ R at R (or equivalently the temperature T R at r = R), in addition to the mass m(R) = M . The temperature at the boundary T R is related to the temperature at infinity T ∞ by Tolman's law, LT = T ∞ , Tolman's law also determines the lapse function for r ∈ [r 0 , R], Let m 0 := m(r 0 ) and ρ 0 := ρ(r 0 ). The solution for r < r 0 is Schwarzschild, since there is no matter present. In particular, where κ is a scaling constant for the time coordinate t. By continuity at r = r 0 , If m 0 > 0, there is a Schwarzschild horizon at r = 2m 0 1 . If m 0 = 0, the geometry for r < r 0 is Minkowskian. If m 0 < 0, the geometry for r < r 0 is Schwarzschild with negative mass, i.e., there is a naked curvature singularity at the center.

Solution curves
Here, we consider the solution curves obtained when solving the TOV equations from the boundary inwards.
A solution of Eqs. (4) is uniquely specified by the boundary data (R, M, T R ). It is convenient to introduce the variables, which allow us to write the TOV equations as Eqs. (10) are simpler than Eqs. (4), because they define an autonomous two-dimensional dynamical system. They need only two positive numbers (u R , v R ) for boundary data, the outer boundary corresponding to ξ = 0. The center corresponds to ξ → −∞.
This simplification is possible only in linear equations of state, because they introduce no scale into the TOV equations. Hence, the solutions are invariant under the transformation r → λr, m → λm, and ρ → λ −2 ρ, for any λ > 0.
In order to describe the behavior of the solution curves, we identify two straight lines on the u − v plane ( Fig.1): • ε 1 : 2v − u = 0, at which all solution curves satisfy du/dξ = 0.  A typical solution curve C : u = u(ξ), v = v(ξ) satisfies the following properties [28].
(i) There is a point r 1 < R, such that u(r) = 0. Furthermore, u(r) < 0 for all r < r 1 .
The only non-trivial exception is the curve Γ of regular solutions, i.e., solutions that satisfy m(0) = 0. On Γ, lim ξ→−∞ (u, v) = O. The variables v and u attain maximum values on Γ at the points P and Q respectively, where (u P , v P ) ≈ (0.3861, 0.3416) and The following solution curves are degenerate cases. (i) The points K and O = (0, 0) are equilibrium points, so each defines a distinct solution curve. (ii) A point on the u axis (v R = 0, u R = 0), evolves with u(ξ) = u R e −ξ , v(ξ) = 0, and it encounters an even horizon. This corresponds to a Schwarzschild black hole without matter.

Shell configurations
The solution curves uniquely determine the spacetime geometry associated to a shell of radiation-for a past treatment of this system, see, Ref. [34]. We select R, M, T R , and we follow the solution curve until we encounter r 0 . The segment of the solution curve between r 0 and R determines the shell's geometry, for r > R, and r < r 0 the geometry is Schwarzschild with mass M and m 0 respectively. Hence, the space Z of equilibrium configurations for a shell of self-gravitating radiation is four-dimensional. It can be described by the coordinates (R, r 0 , M, T R ) or equivalently by the coordinates (R, ξ 0 , u R , v R ), where ξ 0 = log(r 0 /R).
The solutions classes fall into three types, depending on the value of m 0 = m(r 0 ).
F-type solutions form a set of measure zero in Z that acts as a the boundary between the subset of B-type and S-type solutions. The curve of the F-type solutions on the u R − v R plane (the F-curve for brevity ) depends only on ξ 0 , because of the scaling symmetry.
In Fig. 2, the F-curve is plotted for different ξ 0 . B-type solutions lie in the region between the F-curve and the u R axis; the remainder corresponds to S-type solutions. As ξ 0 decreases, so does the area of the B phase. At ξ → −∞, B-type solutions disappear and the F-curve coincides with the line Γ of Fig.1. For fixed ξ 0 , the F-curve has two distinctive points.
• The point u max (ξ 0 ) that corresponds to the maximum value of u R .
• The final point u f (ξ 0 ) = 0, where the curve intersects the horizontal axis (v R = 0). From Fig.2, we see that both u max (ξ 0 ) and u f (ξ 0 ) decrease with decreasing ξ 0 -see, Fig. (3). As ξ 0 → −∞, u max → u Q , i.e., it corresponds to the Oppenheimer-Volkoff limit for a sphere of radiation [29]. In the same limit, u f vanishes as e −ξ 0 . The dependence of u max and of u f on ξ 0 is plotted in Fig. (3).
From Fig. 2, we can analyse how the three types of solution are distributed in the one-dimensional submanifolds (fibers) V (u R ,ξ 0 ,R) of constant (u R , ξ 0 , R). For given ξ 0 , each fiber corresponds to a line u R =constant in the plots of 2. We characterize the fibers in terms of their intersection with the R-curve. There are three types of behavior, by which we characterize the fibers as being of type I, II, and III.
• Fibers of type I are defined by u R ≤ u f (ξ 0 ). The line u R = constant intersects the F-curve only once, at some point v 1 . For v R < v 1 , the fiber contains solutions of type B, and for v R > v 1 , it contains solutions of type S.
• Fibers of type II are defined by u f (ξ 0 ) < u R < u max (ξ 0 ). The line u R = constant intersects the F-curve at least twice. Hence, these fibers involve two solutions of type are of type S. In the interval (v 1 , v 2 ) the solutions are either of type B, or there exist alternating regions of type B and type S solutions. The latter is the case for large negative values of ξ 0 where the R-curve develops a spiraling shape, hence, it intersects the line u R = constant more than twice.
• Fibers of type III are defined by u R > u max (ξ 0 ). All points in these fibers correspond to solutions of type S. the total energy M and the constraints in the extension of the system, namely the area of the bounding surfaces, as expressed in the variables r 0 and R.
In extensive systems, the choice of representation does not affect physical predictions. Extensivity together with the second law of thermodynamics imply that S is a concave function of the extensive variables [35]. The Legendre transform for concave functions fully preserves their information: it is an involution, i.e., the double Legendre transform of a functions S returns the original function S. Since the different representations are connected by a Legendre transform, they all contain the same information about the system.
In a non-extensive system, the entropy S needs not be a concave function. Typically, convex insertions appear, i.e., regions of the fundamental thermodynamic space where S is convex. The double application of the Legendre transform does not return the original function S but its concave hull [46] 2 . In this sense, the Legendre transform does not preserve all thermodynamically relevant information. As a result, the other thermodynamic representations are not equivalent to the fundamental one.
At the microscopic level, this difference is manifested in the inequivalence between the microcanonical and the canonical ensembles. The equivalence of these ensembles in ordinary statistical mechanics follows from the requirement that the size of the system is much larger than the range of the force between the constituents. Then, the entropy obtained from the microcanonical distribution is concave [47]. In presence of long-range forces, the microcanonical entropy is generically non-concave, leading to the inequivalence of ensembles. A convex insertion in some region of the fundamental space implies the presence of a first-order phase transition [48,49].
Hence, when studying an isolated gravitational system, it is necessary to use the fundamental representation, as any other representation will misrepresent the physics 3 . Typically, the other representations (Gibbs, Helmholtz, enthalpy) are obtained by coupling the system to an external reservoir. We mentioned previously that idealized couplings to a reservoir make no sense in a gravitating system, because the reservoir can affect even the constitutive equations of the system.
The shell of radiation considered here can be viewed as a gravitating reservoir for the system in the interior region. However, radiation is strongly affected and it strongly affects the interior region, so that a split between a system and a reservoir makes no sense. In gravitational systems, we must treat system and reservoir as a single isolated system, and for this reason, we must always work with the fundamental representation.

The maximum-entropy principle
First, we consider the shell system with gravity switched off. In the entropy representation, the entropy S is a function of R, r 0 and M , where V (R, r 0 ) = 4π 3 (R 3 − r 3 0 ) is the volume of the shell. The thermodynamic state space The thermodynamic state space remains the same when gravity is switched on. Since the volume is a variable in a gravitational system, the dependence of S on R and r 0 is non trivial. The problem now is that the set Z of solutions to the TOV equation is four dimensional. Hence, the independent thermodynamic variables do not fix uniquely the solution.
In compact stars (r 0 = 0), this problem is usually addressed by an additional assumption, namely, regularity at the center m(0) = 0. Regular solutions form a set of measure zero in the set of all solutions. Almost all solutions have m(0) < 0, and there are no solutions with m(0) > 0. Solutions with m(0) < 0 have a curvature singularity at the center. However, this singularity causes no problems with causality and predictability: the spacetime has no inextensible geodesics, it is bounded-acceleration complete, and it is conformal to a globally hyperbolic spacetime with boundary [28].
The problem with the regularity condition is that it does not cover the whole thermodynamic state space, as there are no solutions with m(0) = 0, if M > M OV , where M OV is the Oppenheimer-Volkoff limit. In Ref. [32], it was also argued that there is no good reason to a priori exclude singular solutions from all considerations, since they would appear in the sum of geometries of a quantum theory of gravity, at least as virtual solutions.
An important benefit of using a shell as our thermodynamic system is that it demonstrates unambiguously the inadequacy of the regularity condition for selecting equilibrium configurations. Even if one wants to a priori exclude solutions of type S-presumably because they involve a naked singularity-, there is no justification in excluding solutions of type B. Hence, the regularity condition cannot identify an equilibrium configuration for the radiation shell.
We will select the equilibrium configurations by employing the maximum entropy principle. The MEP asserts that the values assumed by any parameters in absence of constraints are those that maximize the entropy over the manifold of constrained states [35].
In the entropy representation, the total mass M and the shell radii R and r 0 are assumed to be constrained. As shown in Sec. 2.3, the manifold Z is foliated by surfaces of constant (M, R, r 0 ), or equivalently, of constant (R, u R , ξ 0 ). Each fiber V (R,u R ,ξ 0 ) of the foliation is parameterized by v R .
We can construct an entropy function S Z on Z, S Z (R, u R , ξ 0 , v R ). The MEP asserts that the equilibrium state for M, R, r 0 is obtained by maximizing the entropy functional along the associated fiber, If there is no global maximum of S Z on a fiber, the MEP fails to apply. This is the case in some gravitating systems, known as the gravothermal catastrophe [43].
In what follows, we will show that if S Z (R, u R , ξ 0 , v R ) involves only a contribution S rad from radiation, the shell system is not thermodynamically consistent. In contrast, an appropriate gravity contribution S gr makes the system consistent. The gravitational entropy S gr is a Noether charge associated to the spacetime boundaries in the region r < r 0 . For Btype solutions, S gr is the Bekenstein-Hawking entropy. For the S-type solutions, the working expression for S gr is the same with the one identified in Ref. [32] From a thermodynamic point of view, the need of a term S gr from r < r 0 is obvious. If we view the radiation shell as a thermal reservoir in contact with the interior region, then it is necessary to include a contribution from the interior region, otherwise a black hole would be thermodynamically indistinguishable from flat space. Since the interior solution is vacuum, the only contribution to entropy can be of gravitational origin.

Radiation entropy
The radiation entropy S rad of a solution to the TOV equation is given by Solutions to the TOV equation satisfy [29] from which we obtain where u 0 = u(ξ 0 ) and v 0 = v(ξ 0 ). The simple dependence of S rad on R is due to the scaling symmetry.
The key point here is that S rad has no global maximum. The reason is that it diverges at infinity. In particular, we found that • For all R, and for ξ 0 < log u R , lim v R →∞ S rad = ∞.
These limits can easily be seen in numerical calculation. Fig. 4 shows the results of such a calculation, S rad /R 3/2 is plotted as function of v R for fixed u R and ξ 0 .
We also obtained an analytic proof of the entropy limits above, which is detailed in the Appendix A. The proof is rather long, as it requires an explicit construction of the solution curves for v R >> 1 and for v R << 1. Still, it is instructive as the same methods can be employed in the study of other solutions to the TOV equation.
To conclude, the MEP cannot be applied in the shell system if S rad is the only contribution to the system's entropy.There is no global maximum of entropy in the fibers of constant (R, u R , ξ 0 ).

Entropy from spacetime boundaries
Ever since Bekenstein's and Hawking's work on black hole thermodynamics, we know that entropy can be meaningfully assigned to gravitational degrees of freedom.
Wald showed that black hole entropy can be expressed in terms of the Noether charge Q(ξ) of spacetime diffeomorphisms [42], as The Noether charge Q(ξ) is defined in terms of the time-like Killing vector ξ = ∂ ∂t , normalized so that ξ µ ξ µ = −1 at infinity, and evaluated on the horizon, viewed as a boundary of the surfaces of constant t: where λ is an arbitrary multiplicative constant. For positive-mass Schwarzschild spacetime, Q(ξ) = 2λM , when evaluated at the horizon. Since T ∞ = 8πM , the Bekenstein-Hawking entropy S BH = 4πM 2 is obtained for λ = 1 4 . We will use the Bekenstein-Hawking entropy for the entropy of the horizon that appears in solutions of type B: S grav = 4πm 2 0 .
For type S solutions, the singularity at r = 0 defines a timelike boundary [28]. For this boundary, suggesting an entropy associated to singularity equal to The only way we have found to specify λ is through the requirement of thermodynamic consistency. In [32], it was shown that the only way to implement the MEP for a sphere of self-gravitating radiation is by assigning entropy to the singularity with λ = 2.
The same holds in the shell system studied here. The only value of λ that provides a consistent implementation of the MEP is λ = 2. This is best seen in Fig. (5).There we define S sing for λ = 2, and consider candidate entropy functions S Z := S rad + αS sigma or different values of α. Only the value α = 1 leads to a thermodynamically consistent function S Z : for α < 1, S Z is not bounded from below 4 , and for α > 1, S Z has no global maximum on fibers. In what follows, we will take S sing with λ = 2 as the gravitational contribution to the total entropy in the S phase. S sing is negative, and vanishes for m 0 = 0, thereby enhancing the stability of R-type solutions 5 .
We found numerically that all F-type solutions at a fiber of constant (u R , R, ξ 0 ) correspond to local maxima of S rad + S sing , with respect to v R . S-type maxima are only possible in fibers with no F-type solutions, i.e., for u R > u c (ξ 0 ). This behavior is demonstrated in Fig. 6. This result is identical with the one of Ref. [32] for balls of radiation, and it also persists for other equations of state. We conclude that the entropy function S Z (R, ξ 0 , u R , v R ) is We note that both S rad (R, ξ 0 , u R , v R ) and S sing (R, ξ 0 , u R , v R ) can be expressed as f (ξ 0 , u R , v R )R 3/2 , i.e., they scale with R 3/2 . In contrast, Type I fibers: If u R < u f (ξ 0 ), then the fiber contains a single solution of type F, say at v R = v 1 , that is a local maximum. Solutions for v R > v 1 are of type S, and they have all smaller entropy than the F-type solution. There is no local maximum of entropy for S-type solutions.
For v R < v 1 , solutions are of type B. The maximum value of entropy for B-type solutions occurs typically at very small v R , often numerically indistinguishable from v R = 0, i.e., a black hole with very little radiation in the shell. We will refer to this type of black hole, as a solution of type B I .
Hence, the entropy along a type I fiber contains one local entropy maximum S F of type F, and one local maximum S B I of type B I . The global maximum is the highest of the two local maxima.
Typical plots of the entropy along a fiber are given in Fig. 7. The behavior is characteristic of a first-order phase transition. As the location of the fiber changes, so does the relative height of the two maxima. If S B I > S R , the equilibrium phase is of type B I ; if S F > S B I the equilibrium phase is of type F. The submanifold of Q where S B I = S F is the coexistence curve for the B-F transition. Type II fibers: Type II fibers are characterized by several local maxima of type F and at least one local maximum of type B. The main difference from fiber I is that the B-type local maxima lie at an intermediate value between two F-type maxima-see, Fig. 8.
In these B-type solutions a significant fraction of mass is in the form of radiation in the shell, and the black hole horizon is often very small. We will denote these solutions as B II t To summarize, the implementation of the MEP demonstrates that the thermodynamic state space Q splits into four components, which corresponds to phases of types R, B I , B II and S. The results of this analysis are summarized in Table 1.   ) and (c) we use a logarithmic scale for the u R axis. In plot (d), we use a linear scale for the u R axis, the plot is practically insensitive to R, since the differences at small u R cannot be distinguished.

Phase diagrams and coexistence curves
In Fig. (9), we show how the submanifolds of constant R are partitioned into the four phases, for different values of R. We remark the following.
1. The phases are separated by four coexistence curves. Two coexistence curves coincide with the submanifolds that separate fibers of different types. In particular, the surface u R = u max (ξ 0 ) separates between fibers of type I and fibers of type II, and the surface u R = u f (ξ 0 ) separates between fibers of type II and fibers of type III. Phase transitions across these surfaces are continuous, because the value of v R at maximum entropy is continuous. Hence, the temperature at infinity T ∞ is also continuous. The former surface describes the F-S phase transition, and the second surface describes the B I -B II phase transition. The F-B I and the F-B II transitions occur within the same fiber. As explained earlier, v R is discontinuous along the phase transition, so the transitions are of first order.
There is one triple point (actually a curve in the thermodynamic state space Q) for the F-B I -B II phases. Both u R and ξ 0 on the triple point decrease with R.
2. There is no coexistence curve between the S-and either of the B I and the B II phases. The S phase has only a coexistence curve with the R phase. This leads to a rather 'bizarre' behavior, of a thin strip of F-phase being intermediate between the B II and the S phase.
However, this is mathematically necessary, since one cannot go from positive values of m 0 to negative values of m 0 without crossing the surface m 0 = 0. In absence of this strip, the F phase is always at lower energy than the black hole phases, in accordance with the Page-Hawking phase transition [15] or the heuristic discussions of black hole formation in a box [4,17].
The strip of F-phase may be removed, if the Bekenstein-Hawking expression for entropy changes at small masses. A small-mass black hole emits more energy in Hawking radiation, and in presence of the box the black hole would have to coexist with its Hawking radiation. If the Hawking radiation contributes negatively to the energy, then it would be possible to have m o < 0 even in presence of the horizon. It would then be possible to pass from the S phase to the B phase without crossing from the R phase. However, such a modification is not only conjectural 6 , but, at the current state of knowledge, it can only be implemented by inserting by hand a phenomenological parameter in the Bekenstein-Hawking formula.
3. In linear scale for u R , the F-phase can only be distinguished in the thin strip interpolating between the S and B II phases. We need a logarithmic scale for u R in order to see the intuitively obvious result that the F-phase dominates at small masses.
The B-phases dominate at high R and they are suppressed at small R. This is obvious since the horizon contribution to the entropy grows faster than any other contribution with the scale of the system. However, the B-phases disappear as ξ 0 → −∞ for all R, reflecting the fact that there are no horizons in a ball of self-gravitating radiation.
4. B I solutions have smaller ADM mass than B II solutions for the same ξ 0 and R. However, the area of the horizon (determined by m 0 ) in B I is typically larger, because a large part of the mass of B II consists of radiation in the shell.
Two different black hole phases, one with little surrounding radiation and a large horizon , and one with a small horizon also appear in the heuristic analysis of a black hole coexisting with radiation in a box [4]. The physical systems under consideration are different, but the main distinction is that in the model of [4], the large black hole phase is unstable, while here the phase B I is stable.

The entropy function in equilibrium
After the implementation of the MEP, we evaluate the entropy function S eq (R, u R , ξ 0 ) on Q, using Eq. (12). Characteristic plots of S eq as a function of u R , for fixed ξ 0 and R are given in Fig. 10. We see that the entropy function is, in general, a non-concave function of u R , and hence, of M . By construction, S is continuous across phase transitions.
We note that the entropy is not an increasing function of u R , and that it is bounded from above for fixed R and ξ 0 . This maximum satisfies Bekenstein's bound [51,52], S < 2πM R, or equivalently for all values of R that can be reasonably be considered as macroscopic.
We emphasize that it is the consistent implementation of the MEP, through the inclusion of the term S sing , that makes this system satisfy Bekenstein's bound.

Temperature and heat capacity
The maximization of the MEP also allows us to identify v R as a function on Q for the equilibrium solutions. Then, the temperature at infinity is The temperature T R cannot be identified with a partial derivative of the entropy function. This is only possible for solutions with a simply connected boundary [41], which includes regular solutions to the TOV equation [29].
Plots of T R as a function of u R , for fixed ξ 0 and R are given in Fig. 11. The temperature T R is not an increasing function of the total energy M for fixed R and r 0 , and it has finite jumps at first-order phase transitions. The natural definition of heat capacity C when the boundaries of the system are kept fixed (the analogue of heat capacity at constant volume) is [31] Clearly, the heat capacity is negative in any region of the thermodynamic state space Q where T R decreases with u R -see, Fig. 11. At the local maxima of T R , ∂T∞ ∂u R R,ξ 0 = 0, hence, C diverges and changes sign. At the points of the first-order phase transition, C exhibits discontinuities. Similar to the ball of self-gravitating radiation that was studied in Ref. [31], the present system is also characterized by alternating regions of positive and negative heat capacities throughout the thermodynamic state space.

Latent heat
Since the transitions F-B I and B II -F are first-order, they involve latent heat. In extensive systems, the latent heat L is identified as the difference ∆H of the enthalpy between the two phases, while the Gibbs free energy is constant. Hence, L = ∆H = ∆(G + T S) = ∆(T S). In the fundamental representation, S is constant along the transition, hence, L = S∆T .
We employ the analogue of this formula in our system, i.e., we consider the quantity as a candidate for the latent heat in the first order transitions between flat space and the black hole phases. This choice is based primarily on the basis of analogy with extensive thermodynamics. However, it appears plausible that this is the amount of heat (25) we must give the system on the coexistence curve-together with work ∆W = −L, so that ∆U = 0-for the phase change to occur. In Fig. (12), we plot the reduced latent heat L/M as a function of ξ 0 , for fixed R. We note the following.
1. The latent heat is negative for both the F → B I and the F → B II transitions. This means that the black hole phases are always low temperature phases compared to flat space, one needs to 'boil' a black hole in order to remove the horizon. This result may appear surprising. Except for the the narrow strip of F phase before the S phase, the F phase has lower internal energy than the B phases. However, the temperature of the F phase is higher. This is due to the fact that the temperature T R is not a monotonous function of the energy.
To the best of our knowledge, the fact that black holes have lower temperature than self-gravitating systems along the coexistence curve has not been noted. It is easy to see that this must be the case. Consider, for example, a simplified analysis of black hole phase transitions in the vein of [4]. A box of radius R contains either a black hole of mass M or (non-gravitating) radiation with the same mass M . In the former case, the entropy is given by the Bekenstein-Hawking expression S 1 = 4πM 2 , in the latter by S 2 = i.e., we verify that the black hole has lower temperature than radiation along the coexistence curve.
It is important to understand the role of the negative latent heat in a non-equilibrium setting of gravitational collapse. A plausible conjecture is that it refers to the amount of radiation (electromagnetic or gravitational) that must be emitted before the system settles as a black hole. To test this conjecture, we must undertake an analysis of gravitational collapse in the context of non-equilibrium thermodynamics, while keeping track of all heat currents throughout the collapse.
2. The reduced latent heat is almost constant for a large range of values of ξ 0 . It vanishes as ξ 0 → −∞, well outside the range of the plots in Fig. (12), because the black hole phases disappear at this limit.
3. The latent heat is much smaller in transitions involving the B II phase than in transitions with the B I phase. This is because the horizon in the B II phase is much smaller. In contrast, the latent heat with respect to the B I phase is a substantial fraction of the total mass.

Conclusions
We analysed the thermodynamics of a shell of gravitating radiation surrounding a solution to vacuum Einstein's equation, which may either correspond to flat space, a black hole or a repulsive singularity. The shell can be interpreted as a gravitating heat reservoir. However, the presence of long range forces necessitates an analysis of the total system that consists of the shell and its interior.
We showed that the only way to obtain a consistent thermodynamic description of the system is by assigning a specific expression for entropy to the naked singularity, thus, confirming the proposal of Ref. [32] in a more complex set-up. The result is a concrete model for describing phase transitions between black holes and self-gravitating systems that is fully compatible with the rules of thermodynamics. Such models are important for black hole thermodynamics and quantum gravity, but also for expounding the mathematical and physical structure of non-extensive gravitating systems.
The methods of this paper can be straightforwardly generalized, for example, to different equations of state, rotating systems and other shell geometries. The self-gravitating shell of radiation can also be used as a generic thermal reservoir in studies of system-reservoir thermodynamics in self-gravitating systems.
Furthermore, our results strongly suggest the importance of a thermodynamic analysis to gravitational collapse. The non-equilibrium evolution of a self-gravitating shell is perhaps the simplest model for analyzing the interplay between horizon formation and thermodynamics in a gravitating system. We expect that the solutions studied in this paper will correspond to asymptotic states of a non-equilibrium analysis.

A The asymptotic behavior of radiation entropy
In this section, we prove the asymptotic behavior of the radiation entropy S rad (u R , v R , R, ξ 0 ) of (15), as v R → ∞ and as v R → 0, the other parameters being fixed. In particular, we show that (i) S rad → ∞ as v R → ∞, for all u R , R, ξ 0 , (ii) S rad → ∞ as v R → 0, for ξ 0 < log u R , and (iii)S rad → 0 as v R → 0, for ξ 0 > log u R .
A. 3 Case v R → 0 and ξ 0 > log u R Consider a solution with v R << u R < 1. Integrating from ξ = 0, u increases with decreasing ξ; v initially decreases with decreasing ξ and then increases again. The condition v << u remains valid for an interval (ξ r , 0), in which These equations admit solutions For sufficiently small v R , Eq. (39) applies up to a point where = 1 − u << 1.