\section{The result}
\label{sec:result}

\subsection{The quartic coefficient}

The one-loop quantities at the Hagedorn point, in the literal scheme, are $c_3=0.16821(1)$ and $Q_4=2.1222(3)$. With $A_2=0.9742786$ they give $I=1.11918(15)$ in \eqref{eq:master2}. The two-loop quantity is the sum of \eqref{eq:q4a} and \eqref{eq:q4b},
\begin{equation}
q_4(x_H)=-0.7340(1)-1.500(3)=-2.234(3).
\label{eq:q4}
\end{equation}
With $\beta_0=2.6339158$ and $\beta_0^2=6.93751$ the master formula gives
\begin{equation}
b=g^4\big[-4\beta_0^2\,I+\beta_0\,q_4\big]=g^4\big[-31.057(5)-5.884(8)\big]=-36.94(1)\,g^4 .
\label{eq:b}
\end{equation}
In terms of the 't Hooft coupling, $g^4=\lambda^2/256\pi^4$ and
\begin{equation}
b=-1.481\times10^{-3}\,\lambda^2 .
\label{eq:b-lambda}
\end{equation}
The quartic coefficient is negative. The deconfinement transition of weakly coupled $\cN=4$ super Yang--Mills theory on $S^3$ is first order.

\begin{figure}[t]
\centering
\includegraphics[width=0.72\textwidth]{figs/budget.pdf}
\caption{The four contributions to $b$ in units of $g^4$, in the literal scheme. The division between the first two bars depends on the scheme. Their sum, and each of the other two, does not. The dashed line marks the value that the sum of the last two bars would need to reach for $b$ to vanish.}
\label{fig:budget}
\end{figure}

Figure~\ref{fig:budget} shows the composition of the result. The square of the one-loop operator gives $-29.45$, the exchange of $u_2$ gives $-1.61$, the tree part of the two-loop operator gives $-1.93$ and its loop part gives $-3.95$. All four are negative. The terms that come from the one-loop operator make up 84 per cent of the total.

The sign is not marginal. For $b$ to be positive the two-loop term would have to satisfy
\begin{equation}
q_4(x_H)>\frac{4\beta_0^2I}{\beta_0}=11.79 ,
\end{equation}
and we find $-2.23$. An error in $q_4$ of order one, which is already far larger than any discrepancy we have met, would not matter. The sign of $b$ could have been guessed from $I$ alone if one had a reason to believe that the two-loop operator contributes a number of order one. We know of no such reason in advance. In pure Yang--Mills theory the corresponding term is positive in our evaluation, and cancels about thirty per cent of the rest.

For comparison, the pure Yang--Mills value of AMMPV is $b=-5.7\times10^{-4}\lambda_A^2$ with their coupling $\lambda_A=\lambda/2$, that is $-1.4\times10^{-4}\lambda^2$. At the same 't Hooft coupling the $\cN=4$ theory has a quartic coefficient ten times as large. The matter fields make the transition more strongly first order.

\subsection{The transition temperature and the three saddles}

Combine \eqref{eq:b} with the Landau analysis of section~\ref{sec:landau}. From \eqref{eq:Tc},
\begin{equation}
\frac{T_H-T_c}{T_H}=\frac{|b|}{6\beta_0}=2.337\,g^4=9.37\times10^{-5}\lambda^2,
\qquad
\frac{T_H-T_{\min}}{T_H}=4.67\,g^4 .
\label{eq:window}
\end{equation}
Together with the two-loop Hagedorn temperature \eqref{eq:HW} this gives all three characteristic temperatures to order $\lambda^2$,
\begin{equation}
\begin{aligned}
T_H&=T_H^{(0)}\big(1+2g^2-11.50\,g^4\big),\\
T_c&=T_H^{(0)}\big(1+2g^2-13.84\,g^4\big),\\
T_{\min}&=T_H^{(0)}\big(1+2g^2-16.18\,g^4\big).
\end{aligned}
\label{eq:three-T}
\end{equation}
Below $T_{\min}$ the only saddle point is the confined one, $u_1=0$. Between $T_{\min}$ and $T_H$ there are three: the confined one, an unstable one at $|u_1|=u_s$ given by \eqref{eq:us}, and a deconfined one at
\begin{equation}
|u_1|\simeq\half+\frac{\sqrt{|b|}}4=\half+1.52\,g^2 .
\end{equation}
The confined and deconfined saddles exchange dominance at $T_c$. At $T_H$ the unstable saddle merges with the confined one, which disappears as a minimum. The latent heat at $T_c$ is $\tfrac38N^2/R$ to leading order.

The window is narrow. At $\lambda=1$ the three temperatures differ by one part in ten thousand. This is expected. The first-order character of the transition is a second-order effect in $\lambda$ on top of a degenerate zeroth-order problem. What is robust is the ordering $T_{\min}<T_c<T_H$ and the list of saddles, and those are the ordering and the list of the gravitational problem.

\subsection{Near-BPS limits}

There is a family of cases in which $b$ can be obtained from the one-loop operator alone. Harmark and Orselli considered the theory with chemical potentials for the R-charges \cite{HO1,HO2}, and with Kristj\'ansson they added those for the spins \cite{HKO}. The potentials are set in fixed ratios to one parameter $\Omega$, and the limit is
\begin{equation}
T\to0,\qquad\Omega\to1,\qquad\lambda\to0,\qquad\tilde T=\frac{T}{1-\Omega}\ \mbox{and}\ \tilde\lambda=\frac{\lambda}{1-\Omega}\ \mbox{fixed}.
\end{equation}
In this limit only the letters that saturate a BPS bound survive, and the Hamiltonian of what remains is $D_0+\tilde g^2D_2$ exactly, at any $N$, with $\tilde g^2=\tilde\lambda/16\pi^2$. Depending on those ratios, the surviving letters form a representation of a subalgebra of $psu(2,2|4)$. There are fourteen such limits, twelve of them non-trivial \cite{HKO}, and we treat nine of the twelve. Each non-trivial decoupled theory has its own Hagedorn transition in $\tilde T$; those with scalar letters are described as Spin Matrix theories in \cite{SMT}. The one-loop Hagedorn temperatures were found in \cite{HO1} for $su(2)$ and $su(2|3)$ and in \cite{HKO} for the rest. The order of the transitions was left open \cite{HO2,HKO}; for $su(2)$ a first-order transition was called likely in \cite{SMT}, with a second-order one left as an alternative.

Since $D_4$ is absent, the master formula reduces to $b=-\tilde G^2I$ with $\tilde G=\tilde\beta\tilde\lambda/8\pi^2$, and $I$ is computed with the letters of the sector. Table~\ref{tab:nearbps} gives the results. For the compact sectors the functions are polynomials and the entries are exact. For the non-compact ones they are series, which we summed to between $y^{26}$ and $y^{60}$.

\begin{table}[t]
\centering
\begin{tabular}{lrrrrr}
\toprule
sector & $\tilde x_H$ & $A_2$ & $c_3$ & $Q_4$ & $b/\tilde G^2$ \\
\midrule
$su(2)$ & $1/2$ & $0.5$ & $0.25$ & $1$ & $-0.75$ \\
$su(1|1)$ & $0.569840$ & $0.86032$ & $-0.12495$ & $0.69701$ & $-0.38480$ \\
$su(1|2)$ & $0.381966$ & $0.76393$ & $0.11146$ & $1.41020$ & $-0.73762$ \\
$su(2|3)$ & $1/4$ & $0.84375$ & $0.10547$ & $1.74023$ & $-0.89648$ \\
$su(1,1)$ bosonic & $1/2$ & $2/3$ & $-0.23105$ & $1.80509$ & $-1.06270$ \\
$su(1,1)$ fermionic & $0.569840$ & $1.27402$ & $-2.00053$ & $-12.2707$ & $-0.1473$ \\
$su(1,1|1)$ & $0.381966$ & $0.89443$ & $-0.50591$ & $0.31743$ & $-0.73103$ \\
$su(1,1|2)$ & $1/4$ & $0.9$ & $-0.27467$ & $1.41794$ & $-0.87662$ \\
$su(1,2|3)$ & $0.145898$ & $0.94900$ & $-0.40721$ & $1.20645$ & $-0.95268$ \\
\bottomrule
\end{tabular}
\caption{The quartic coefficient in nine of the twelve non-trivial decoupling limits of \cite{HKO}, in the commutator scheme. $\tilde x_H$ is the Hagedorn value of $e^{-1/\tilde T}$ in the free decoupled theory. The last column is negative in every sector.}
\label{tab:nearbps}
\end{table}

The coefficient is negative in all nine. The Hagedorn transitions of these nine decoupled theories are first order at small $\tilde\lambda$. The fermionic $su(1,1)$ sector is instructive. There $Q_4$ is large and negative, so that the first term of $I$ alone would make $b$ positive. The exchange of $u_2$ overturns it. This illustrates again that the individual terms have no separate meaning, and that the sign of $b$ is not fixed by any simple positivity argument.
