Thus, upon shrinking $U_z$ if need be, one has that

$$ \varphi_{\Gamma_{eq;eff}}(\omega) = \mathrm{Re} (\Phi_{\Gamma_{eq;eff}}(\omega)) \begin{cases} < 0 & \text{on } U_z \cap \{+\text{side of } \gamma([0; 1])\} \\ < 0 & \text{on } U_z \cap \{-\text{side of } \gamma([0; 1])\} \end{cases}. \quad (B.1) $$

Hence, $z$ cannot be a boundary point of $C_i$ as there exist an open neighbourhood $U_z$ thereof such that

$$ U_z \subset \gamma([0; 1]) \cup \{z \in \mathbb{C} : \varphi_{\Gamma_{eq;eff}}(z) < 0\}. \quad \square $$

<figure><img src="image_16.png" /></figure>

*Proof of Proposition B.2.* An open connected set in $\mathbb{C}$ is also path connected, so we need only show that $\gamma(-\epsilon')$ and $\mathrm{Re}^{\frac{2\pi i \alpha}{\kappa}}$ belong to the same connected component of $\Lambda$; and similarly that $\gamma(1 + \epsilon')$ and $\mathrm{Re}^{\frac{2\pi i \alpha'}{\kappa}}$ belong to the same connected component.

By the assumption of one-cut regularity there exists a contour $\tilde{\Gamma} \in \mathcal{T}(\alpha, \alpha')$ solving the max-min energy problem and for which $R$ has simple zeros at $\zeta_1, \zeta_2 \in \tilde{\Gamma}$, the endpoints of the support of the equilibrium measure, and no other zeros on $\tilde{\Gamma}$. Furthermore, because of the way $\varphi_{\tilde{\Gamma};eff}(z) = \varphi_{\Gamma_{eq;eff}}(z)$ scales as $|z| \to \infty$ (recall that the effective potential only depends on the support of the equilibrium measure), we can without loss of generality assume that $L_\alpha, L_{\alpha'} \subset \tilde{\Gamma}$. Since it solves the max-min energy problem, we must have $\tilde{\Gamma} \subset \{z \in \mathbb{C} : \varphi_{\tilde{\Gamma};eff}(z) \ge 0\} = \mathrm{supp} \mu_{\Gamma_{eq}} \cup \bar{\Lambda}$ (by Lemma 2.15 and Lemma B.3).

Let $C_1, \dots, C_m$ be the connected components of $\Lambda$ such that $\overline{C_i} \cap \tilde{\Gamma} \neq \emptyset$ for $i = 1, \dots, m$. Hence $\tilde{\Gamma} \subset \overline{C_1} \cup \dots \cup \overline{C_m} \cup \mathrm{supp} \mu_{\Gamma_{eq}}$. If $\overline{C_i} \cap \mathrm{supp} \mu_{\Gamma_{eq}} \neq \emptyset$ then, by Lemma B.7, for all $z \in \overline{C_i} \cap \mathrm{supp} \mu_{\Gamma_{eq}}$, $R(z) = 0$. Hence at most two such connected components, when closed, insect nontrivially with $\mathrm{supp} \mu_{\Gamma_{eq}}$. Let us call these components $C_i$ and $C_j$ (we will later see that $C_i \neq C_j$ but so far we haven't shown this).

We now claim that $m \le 2$, i.e. no more than two connected components, when closed, intersect non-trivially with $\tilde{\Gamma}$. To see this consider the closed set

$$ K = \tilde{\Gamma} \cap \bigcup_{\substack{p=1 \\ p \neq i, j}}^{m} \overline{C_p} $$

$K \cap \mathrm{supp} \mu_{\Gamma_{eq}} = \emptyset$ by construction. We also claim $K \cap \overline{C_i} = \emptyset$ and $K \cap \overline{C_j} = \emptyset$. This is because any point $z \in K \cap \overline{C_i}$, by Lemma B.5, is a zero of $R$. But the only zeros of $R$ on $\tilde{\Gamma}$ are the endpoints $\zeta_1, \zeta_2 \in \mathrm{supp} \mu_{\Gamma_{eq}}$ by the one-cut regularity assumption. Hence $K$ is disjoint from $\overline{C_i} \cup \overline{C_j} \cup \mathrm{supp} \mu_{\Gamma_{eq}}$. However $K$ and $\tilde{\Gamma} \cap (\overline{C_i} \cup \overline{C_j} \cup \mathrm{supp} \mu_{\Gamma_{eq}})$ are a pair of disjoint closed sets whose union is $\tilde{\Gamma}$. Since $\tilde{\Gamma}$ is connected, $K = \emptyset$.

Next we claim that $C_i \neq C_j$. By construction $\zeta_1 \in \overline{C_i}$ and $\zeta_2 \in \overline{C_j}$ (or the other way round). Thus $\gamma(-\epsilon') \in C_i$ and $\gamma(1+\epsilon') \in C_j$, since $\gamma([\epsilon'; 1+\epsilon'] \setminus [0; 1]) \subset \Lambda$ by (2.29). Now suppose by way of contradiction $C_i = C_j$. Then there is a continuous path from $\gamma(-\epsilon')$ to $\gamma(1+\epsilon')$ contained entirely in $\Lambda$. Using $\gamma$ to define a path from $\gamma(-\epsilon')$ to $\gamma(1+\epsilon')$, we thus have constructed a continuous path, without self-intersections, lying in $\{z \in \mathbb{C} : \varphi_{\Gamma_{eq;eff}}(z) \ge 0\}$. This path passes through $\mathrm{supp} \mu_{\Gamma_{eq}}$, where $\varphi_{\Gamma_{eq;eff}} < 0$ on both sides. Hence this path encloses a connected component of $\{z \in \mathbb{C} : \varphi_{\Gamma_{eq;eff}}(z) < 0\}$. However by the same arguments used in the proof of Lemma B.4, the connected components of $\{z \in \mathbb{C} : \varphi_{\Gamma_{eq;eff}}(z) < 0\}$ are unbounded, and so they cannot be any enclosed by any compact loop. A similar argument can also be used to show that $\overline{C_i} \cap \overline{C_j} = \emptyset$.

Finally, we conclude the proof by showing that $\mathrm{Re}^{\frac{2\pi i \alpha}{\kappa}}$ and $\mathrm{Re}^{\frac{2\pi i \alpha'}{\kappa}}$ belong to different connected components, i.e. $\mathrm{Re}^{\frac{2\pi i \alpha}{\kappa}} \in C_i$ and $\mathrm{Re}^{\frac{2\pi i \alpha'}{\kappa}} \in C_j$ (or the other way round). Let us think of $\tilde{\Gamma}$ as parametrised by a piecewise $C^1$ function $\tilde{\gamma} : \mathbb{R} \to \mathbb{C}$. Let $x_1$ be the smallest real number such that
$\tilde{\gamma}(x_1) = \zeta_1$ and $x_2$ the largest real number such that $\tilde{\gamma}(x_2) = \zeta_2$, where the path is oriented such that $x_1 < x_2$. If $\mathrm{Re} \frac{2\pi i \alpha'}{\kappa} \in C_i$ then $\gamma$ defines a path from $\zeta_2$ to $\mathrm{Re} \frac{2\pi i \alpha'}{\kappa}$, and so for some $x_3 > x_2$, $\gamma(x_3) = \zeta_1$. However by the same arguments used in the proof of Lemma B.1, the energy of the curve can be increased by removing $\tilde{\gamma}([x_1, x_3])$ and so $\tilde{\gamma}$ cannot be a solution of the max-min energy problem. $\square$

**Remark B.8.** In the above proof we are regularly using the basic topological principle that if $A$ and $B$ are closed sets and $\gamma: [0; 1] \to A \cup B$ a continuous path, where $\gamma(0) \in A$ and $\gamma(0) \in B$, then $\gamma([0; 1]) \cap A \cap B \neq \emptyset$. This follows because if $\gamma([0; 1]) \cap A$ and $\gamma([0; 1]) \cap B$ were disjoint they would define a partition of $\gamma([0; 1])$ and hence show that $\gamma([0; 1])$ is disconnected, but $\gamma([0; 1])$ is connected by the continuity of $\gamma$.

**Lemma B.9.** (Continuous paths may be replaced by piecewise linear paths). Let $U \subset \mathbb{C}$ be an open, connected (and hence path connected) set. Then given any two points $a, b \in U$, there is a path from $a$ to $b$ contained in $U$ consisting of a finite sequence of straight line segments.

*Proof.* Because $U$ is path connected, there is a continuous path $\eta: [0; 1] \to U$ such that $\eta(0) = a$ and $\eta(1) = b$. Let $\chi = \eta([0; 1])$, which is clearly a compact set. Next, there exists an $\epsilon > 0$ such that $\mathrm{dist}(\chi, \mathbb{C} \setminus U) > 2\epsilon$. Hence $\{D_{\epsilon,z}\}_{z \in \chi}$ is an open cover of $\chi$. By compactness we may pass to a finite subcover labelled by $z_1, \dots, z_n \in \chi$, where without loss of generality $z_1 = a$ and $z_n = b$.

Next, for any $|z_k - z_j| < 2\epsilon$, $k \neq j$, let us draw a straight line between these two points, and note that this straight line is entirely contained in $D_{\epsilon,z_j} \cup D_{\epsilon,z_k} \subset U$. Let $\tilde{\chi}$ be the union of the set of such points $\{z_1, \dots, z_n\}$ and the line segments connecting them. We claim that $\tilde{\chi}$ is a connected set, which if so would complete the proof. Hence by way of contradiction let $A$ and $\tilde{A}$ be two nonempty sets such that $A \cup \tilde{A} = \{z_1, \dots, z_n\}$, $A \cap \tilde{A} = \emptyset$, and such that $|z - \tilde{z}| \ge 2\epsilon$ for all $z \in A$ and $\tilde{z} \in \tilde{A}$. But then

$$U = \bigcup_{z \in A} D_{\epsilon,z} \quad \text{and} \quad \tilde{U} = \bigcup_{z \in \tilde{A}} D_{\epsilon,z}$$

are disjoint open sets which together form an open cover of $\chi$. If both these sets were nonempty $\chi \cap U$ and $\chi \cap \tilde{U}$ would be a partition of $\chi$. However $\chi$ is connected and so either $A$ or $\tilde{A}$ is empty. $\square$

Hence we can construct a contour $\tilde{\Gamma}$ consisting of $L_\alpha$, $L_{\alpha'}$, $\gamma([-\epsilon'; 1 + \epsilon'])$ and a finite number of straight lines connecting $\mathrm{Re} \frac{2\pi i \alpha}{\kappa}$ to $\gamma(-\epsilon')$ and $\mathrm{Re} \frac{2\pi i \alpha'}{\kappa}$ to $\gamma(1 + \epsilon')$, where these straight lines lie in $\Lambda$. Hence $\tilde{\Gamma} \in \mathcal{T}(\alpha, \alpha')$, $\tilde{\Gamma} \setminus \mathrm{supp} \mu_{\Gamma_{\mathrm{eq}}} \subset \Lambda$ and $\gamma([-\epsilon; 1 + \epsilon]) \subset \tilde{\Gamma}$.

We almost have the desired contour except for the "corners" where each analytic arc meets the next. To fix this we "round" the corners in such a way to achieve a globally $\mathcal{C}^\infty$ curve. For example, if we have two analytic arcs $\eta_1: [-1; \delta] \to \mathbb{C}$ and $\eta_2: [-\delta; 1] \to \mathbb{C}$ (for some $\delta > 0$), such that $\eta_1(0) = \eta_2(0)$, we may join these together smoothly by $\tilde{\eta}: [-1; 1] \to \mathbb{C}$ where

$$\tilde{\eta}(x) = \eta_1(x) + (\eta_2(x) - \eta_1(x)) \theta\left(\frac{x}{\delta}\right)$$

where $\theta: \mathbb{R} \to [0; 1]$ is a $\mathcal{C}^\infty$ function such that $\theta(x) = 0$ for $x < 1$ and $\theta(x) = 1$ for $x > 1$.

By making the region of the "rounding" sufficiently small we can ensure the new $\mathcal{C}^\infty$ contour $\Gamma_{\mathrm{eq}}$ obtain by this procedure has the properties that $\Gamma_{\mathrm{eq}} \setminus \mathrm{supp} \mu_{\Gamma_{\mathrm{eq}}} \subset \Lambda$ and $\gamma([-\epsilon; 1 + \epsilon]) \subset \Gamma_{\mathrm{eq}}$. By Corollary 2.12 our new contour $\Gamma$ has the same equilibrium measure as the contour solving the max-min energy problem, hence our new contour also solves the max-min energy problem. This completes the proof of Proposition 2.20.

**Remark B.10.** The fact that we are in the off-critical regime is what allows us to make the contour $\mathcal{C}^\infty$. If we were in the critical regime we would only generally expect to be able to make our contour piecewise $\mathcal{C}^\infty$.
C Fredholm determinant

In this section we prove the following important proposition.

**Proposition C.1.** Let {$\psi(x)$}$_{x\in\mathbb{R}}$ be a family of complex-valued random variables, viewed as a random measurable function, with the following properties.

$$
(1) \quad \overline{\psi(x)} = \psi(-x) \text{ and } \psi(0) = 0.
$$

$$
(2) \text{ Any finite subset of } \{\text{Re } \psi(x), \text{Im } \psi(x)\}_{x>0} \text{ is jointly Gaussian (not necessarily centred).}
$$

$$
(3) \text{ For every } k \ge 0, \mathbb{E}[|\psi(x)|^k] \le C(1 + |x|^{b_k}) \text{ for some } b_k \ge 0.
$$

$$
(4) \quad \mathbb{E} \left[ \int_{\mathbb{R}} |\psi(x)|^2 dx \right] < +\infty, \quad \text{which implies that } \psi \in L^2(\mathbb{R}) \text{ almost surely.}
$$

$$
(5) \quad B(x, y) \stackrel{\text{def}}{=} \operatorname{cov}(\psi(x), \overline{\psi(y)}) \text{ is such that } \int_{\mathbb{R}^2} |B(x, y)|^2 dx dy < +\infty.
$$

Define $\mu \in L^2(\mathbb{R})$ by $\mu(x) \stackrel{\text{def}}{=} \mathbb{E}[\psi(x)]$ and let $A : \mathbb{R}^2 \to \mathbb{C}$ be a continuous function such that

$$
\overline{A(x, y)} = A(y, x) = A(-x, -y) \quad \text{and} \quad \int_{\mathbb{R}^2} |A(x, y)|^2 dx dy < +\infty,
$$

and let $\lambda \in L^2(\mathbb{R})$ be such that $\overline{\lambda(x)} = \lambda(-x)$

Then, $\mathbf{A} : L^2(\mathbb{R}) \to L^2(\mathbb{R})$, resp. $\mathbf{B} : L^2(\mathbb{R}) \to L^2(\mathbb{R})$, defined by

$$
Af(x) = \int_{\mathbb{R}} A(x, y)f(y) \, dy, \quad \text{resp.} \quad Bf(x) = \int_{\mathbb{R}} B(x, y)f(y) \, dy
$$

are self-adjoint Hilbert-Schmidt operators and one has

$$
\begin{align}
& \mathbb{E} \left[ \exp \left( \frac{i}{2} \int_{\mathbb{R}^2} \overline{\psi(x)} A(x, y) \psi(y) \, dy + i \int_{\mathbb{R}} \overline{\lambda(x)} \psi(x) \, dx \right) \right] \nonumber \\
&= \frac{\exp\left(\frac{1}{2}i\langle\mu, A(1 - iBA)^{-1}\mu\rangle_{L^2(\mathbb{R})} + i\langle\lambda, (1 - iBA)^{-1}\mu\rangle_{L^2(\mathbb{R})} - \frac{1}{2}\langle\lambda, (1 - iBA)^{-1}B\lambda\rangle_{L^2(\mathbb{R})}\right)}{\sqrt{\det_{L^2(\mathbb{R})}(1 - iBA)}} \tag{C.1}
\end{align}
$$

We prove Proposition C.1 in two stages. We first prove the result in the finite rank case and
then extend by continuity.

**Lemma C.2.** *Denote* $\mathcal{S}_n = [[-n; n]] \setminus \{0\}$ *and let*

$$
\bullet \xi = \{\xi_k\}_{k \in S_n} \in \mathbb{C}^{2n} \text{ satisfy } \bar{\xi}_j = \xi_{-j} \text{ with } \{\text{Re } \xi_k, \text{Im } \xi_k\}_{k=1}^n \text{ a Gaussian random variable;}
$$

- $\lambda = (\lambda_k)_{k \in S_n}$ be such that $\bar{\lambda}_k = \lambda_{-k}$;

- $A = \mathrm{Mat}(A_{ij} : i, j \in S_n)$ be such that $A_{ij} = A_{-j, -i}$.

Then, one has

$$
\begin{align}
& \mathbb{E} \left[ \exp \left( \frac{i}{2} \langle \boldsymbol{\xi}, A \boldsymbol{\xi} \rangle + i \langle \boldsymbol{\lambda}, \boldsymbol{\xi} \rangle \right) \right] \nonumber \\
&= \frac{\exp \left( \frac{1}{2} i \langle \boldsymbol{\mu}, A(1 - iBA)^{-1} \boldsymbol{\mu} \rangle + i \langle \boldsymbol{\lambda}, (1 - iBA)^{-1} \boldsymbol{\mu} \rangle - \frac{1}{2} \langle \boldsymbol{\lambda}, (1 - iBA)^{-1} B \boldsymbol{\lambda} \rangle \right)}{\sqrt{\det(1 - iBA)}} \tag{C.2}
\end{align}
$$

where $B = \mathrm{Mat}(\mathrm{cov}(\xi_i, \bar{\xi}_j) : i,j \in S_n)$, $\mu = (\mathbb{E}[\xi_i])_{i \in S_n}$ and $\langle \mathbf{x}, \mathbf{y} \rangle = \sum_{i \in S_n} \bar{x}_i y_i$. Finally, the quantity in the denominator corresponds to the determination of the square roots of the map $z \mapsto \det(1 - ziBA)$ in $\mathrm{Re}(z) > 0$ equal to 1 at $z = 0$.
Proof. To show this we transform to real variables. Let

$$X_k = \frac{\xi_k + \xi_{-k}}{\sqrt{2}} \quad \text{for } k > 0 \quad \text{and} \quad X_k = \frac{\xi_{-k} - \xi_k}{\sqrt{2i}} \quad \text{for } k < 0, \qquad (C.3)$$

which can be encapsulated in terms of the matrix transformation $\mathbf{X} = J\boldsymbol{\xi}$ with $J$ unitary in respect to $\langle \cdot, \cdot \rangle$. Upon introducing $\tilde{B} = JBJ^\dagger$, one gets $\operatorname{cov}(X_i, X_j) = \tilde{B}_{ij}$. Similarly let $\tilde{A} = JAJ^\dagger$, $\tilde{\lambda} = J\lambda \in \mathbb{R}^{2n}$ and $\tilde{\mu} = \mathbb{E}[\mathbf{X}] = J\mu \in \mathbb{R}^{2n}$. Then the expectation of interest reduces to the evaluation of the integral

$$\frac{\sqrt{\det(\tilde{B}^{-1})}}{(2\pi)^n} \int_{\mathbb{R}^{2n}} e^{-\frac{1}{2}(x-\tilde{\mu})^T \tilde{B}^{-1} (x-\tilde{\mu}) + \frac{1}{2}i\boldsymbol{\alpha}^T \tilde{A} \boldsymbol{\alpha} + i\tilde{\lambda}^T \boldsymbol{x}} d\boldsymbol{x}$$

A short calculation involving completing the square then yields the desired formula. To conclude, one observes that since $B$ is positive definite, $\sqrt{BA}\sqrt{B}$ is a Hermitian matrix and thus has real eigenvalues $\lambda_a$, $a = 1, \dots, 2n$ counted with multiplicities. Hence,

$$\det(1 - z i B A) = \det(1 - z i \sqrt{B} A \sqrt{B}) = \prod_{a=1}^{2n} (1 - i z \lambda_a) \neq 0 \qquad (C.4)$$

if $\operatorname{Re}(z) > 0$. The function thus admits a determination of its square root in that simply connected domain which, moreover, may be chosen to be equal to 1 at $z = 0$. The non-vanishing of this determinant also implies the invertibility, in that domain, of the matrix $1 - z i B A$.

<figure><img src="image_17.png" /></figure>

The last step of the proof consists in demonstrating that we can approximate $A$ by a finite rank operator. Let $\varphi_k(x) = H_k(x)e^{-\frac{1}{2}x^2}$ where $H_k$ is the $k$th normalised Hermite polynomial, so that

$$\langle \varphi_k, \varphi_j \rangle_{L^2(\mathbb{R})} = \int_{\mathbb{R}} \overline{\varphi_k(x)} \varphi_j(x) \, dx = \delta_{jk}. \qquad (C.5)$$

Note that $\varphi_k$ is an even function for even $k$ and odd for odd $k$, hence $\langle \varphi_k, \psi \rangle_{L^2(\mathbb{R})}$ is purely real for $k$ even and purely imaginary for $k$ odd. Let

$$\sigma_k = \frac{1}{\sqrt{2}}\varphi_{2k} + \frac{1}{\sqrt{2}}\varphi_{2k+1} \quad \text{and} \quad \sigma_{-k} = \frac{1}{\sqrt{2}}\varphi_{2k} - \frac{1}{\sqrt{2}}\varphi_{2k+1} \quad \text{for } k \in [1, n].$$

Then given $S_n$ as in Lemma C.2 and $\sigma_k^*$ being the one-form canonically associated with $\sigma_k$ by means of the $L^2(\mathbb{R})$ scalar product, we define the orthogonal projection $P_n = \sum_{k \in S_n} \sigma_k \otimes \sigma_k^*$.

**Lemma C.3.** The real and imaginary parts of $\xi_k = \langle \sigma_k, \psi \rangle_{L^2(\mathbb{R})}$ are jointly Gaussian with

$$\mathbb{E}[\xi_k] = \langle \sigma_k, \mu \rangle_{L^2(\mathbb{R})} \quad \text{and} \quad \operatorname{cov}(\xi_i, \xi_j) = \langle \sigma_i, B \sigma_j \rangle_{L^2(\mathbb{R})}.$$

Proof. Let $\alpha = (\alpha_k)_{k \in S_n}$ with $\overline{\alpha_k} = \alpha_{-k}$. We will show that the moments of $\sum_{k \in S_n} \overline{\alpha_k} \xi_k$ coincide with those of a Gaussian random variable and hence $\{\operatorname{Re} \xi_k, \operatorname{Im} \xi_k\}_{k=1}^n$ are jointly Gaussian. Thus, let $f = \sum_{k \in S_n} \alpha_k \sigma_k$, so that $\langle f, \psi \rangle_{L^2(\mathbb{R})} = \sum_{k \in S_n} \overline{\alpha_k} \xi_k$. Then, for $m \in \mathbb{N}$,

$$\mathbb{E}\left[\left(\sum_{k \in S_n} \overline{\alpha_k} \xi_k\right)^m\right] = \mathbb{E}\left[\langle f, \psi \rangle_{L^2(\mathbb{R})}^m\right] = \mathbb{E}\left[\int_{\mathbb{R}^m} \overline{f(x_1)} \cdots \overline{f(x_m)} \psi(x_1) \cdots \psi(x_m) \, dx\right]$$

Because $f$ is a Schwarz function and $\mathbb{E}[|\psi(x)|^m]$ grows at most algebraically as $|x| \to \infty$, we may exchange the expectation with the integral sign. Then applying Wick's theorem and reversing our steps we find that $\sum_{k \in S_n} \overline{\alpha_k} \xi_k$ has the moments of a Gaussian random variable with the predicted variance, and hence is Gaussian.

<figure><img src="image_18.png" /></figure>
Proof of C.1. Let $A^{(n)} = P_n A P_n$, $B^{(n)} = P_n B P_n$, $\lambda^{(n)} = P_n \lambda$. By Lemma C.2, since the associated finite-size matrices $A^{(n)}, B^{(n)}$ and vectors $\lambda^{(n)}, \mu^{(n)}$ enjoy the hypotheses of that lemma, we have

$$ \mathbb{E} \left[ \exp \left( \frac{i}{2} \langle \psi, A^{(n)} \psi \rangle_{L^2(\mathbb{R})} + i \langle \lambda^{(n)}, \psi \rangle_{L^2(\mathbb{R})} \right) \right] = \frac{e^{\frac{1}{2} i \langle \mu, A^{(n)} (1 - i \mathbf{B}^{(n)} A^{(n)})^{-1} \mu \rangle_{L^2(\mathbb{R})} + i \langle \lambda^{(n)}, (1 - i \mathbf{B}^{(n)} A^{(n)})^{-1} \mu \rangle_{L^2(\mathbb{R})} - \frac{1}{2} \langle \lambda^{(n)}, (1 - i \mathbf{B}^{(n)} A^{(n)})^{-1} \mathbf{B}^{(n)} \lambda^{(n)} \rangle_{L^2(\mathbb{R})}}{\sqrt{\det_{L^2(\mathbb{R})} (1 - i \mathbf{B}^{(n)} A^{(n)})}} \quad (C.6) $$

Observing that, by construction, $\overline{B(x, y)} = B(y, x) = B(-x, -y)$, one infers from the properties of the integral kernels $A(x, y)$ and $B(x, y)$ readily ensure that $A$ and $B$ are Hilbert-Schmidt and thus BA is trace class. This ensures that the Fredholm determinant $\det_{L^2(\mathbb{R})}(1 - iBA)$ is well-defined. Furthermore $B \ge 0$ and so has a well-defined square root $\sqrt{B}$. Then by Sylvester's identity

$$ \det_{L^2(\mathbb{R})} (1 - z i B A) = \det_{L^2(\mathbb{R})} (1 - z i \sqrt{B} A \sqrt{B}) = \prod_{a=1}^{\infty} (1 - i z \lambda_a) \neq 0, \quad \text{since } \sqrt{B} A \sqrt{B} $$

is a compact self-adjoint operator with eigenvalues $\lambda_a$, $a \in \mathbb{N}$, repeated with their multiplicities. This ensures that $(1 - iBA)^{-1}$ is well-defined and that the holomorphic map $z \mapsto \det_{L^2(\mathbb{R})}(1 - z iBA)$ on $\mathrm{Re}(z) > 0$ admits a determination of its square root which equals 1 when $z = 0$.

Now, one can readily check that $A^{(n)} \to A$ and $B^{(n)} \to B$ in the Hilbert-Schmidt norm $\|\cdot\|_{HS}$, and thus $B^{(n)}A^{(n)} \to BA$ in the trace class norm. It is direct to see that all $n$-dependent quantities in the rhs of (C.6) converge to the same expression with $n$ removed, i.e. we may replace $A^{(n)}, B^{(n)}, \lambda^{(n)}$ with $A, B, \lambda$ respectively throughout. On the left hand side of (C.6) we observe that

$$ \begin{aligned} & \left| \mathbb{E} \left[ \exp \left( \frac{i}{2} \langle \psi, A^{(n)} \psi \rangle_{L^2(\mathbb{R})} + i \langle \lambda^{(n)}, \psi \rangle_{L^2(\mathbb{R})} \right) \right] - \mathbb{E} \left[ \exp \left( \frac{i}{2} \langle \psi, A \psi \rangle_{L^2(\mathbb{R})} + i \langle \lambda, \psi \rangle_{L^2(\mathbb{R})} \right) \right] \right| \\ & \le \frac{1}{2} \|A - A^{(n)}\|_{HS} \mathbb{E} \left[ \|\psi\|_{L^2(\mathbb{R})}^2 \right] + \|\lambda - \lambda^{(n)}\|_{L^2(\mathbb{R})} \sqrt{\mathbb{E} \left[ \|\psi\|_{L^2(\mathbb{R})}^2 \right]} \xrightarrow{n \to +\infty} 0 \end{aligned} $$

since $\mathbb{E}[\|\psi\|_{L^2(\mathbb{R})}^2] < +\infty$ by hypothesis. $\square$
# D Asymptotic expansion of the Selberg integral

In this section we prove Theorem 6.4. We begin with the exact formula for the partition function $Z_{N,\Gamma_0}[V_0]$.

**Proposition D.1** (Selberg-Mehta integral, Ch. 17 of [30]). Let $V_0$ be the quadratic potential given in (2.40). Then, one has the closed formula

$$Z_{N,\Gamma_0}[V_0] = (2\pi)^{\frac{N}{2}} \left(\frac{\zeta_2 - \zeta_1}{\sqrt{8N\beta}}\right)^{N\beta\left(\frac{1}{\beta} - \frac{1}{2}\right) + \frac{\beta N^2}{2}} e^{-\beta N^2 V\left(\frac{\zeta_1 + \zeta_2}{2}\right)} \left[\left(\frac{\beta}{2}\right)\right]^{-N} \prod_{j=1}^{N} \left(\frac{\beta j}{2}\right)! . \quad (D.1)$$

The terms on the right hand side all have straightforward asymptotic expansions except for $\prod_{j=1}^{N} \left(\frac{\beta j}{2}\right)!$. For this we need the following lemma which relates it to a Barnes G-function.

**Lemma D.2.** Let $t, n \in \mathbb{N}$ be integers greater or equal to 1. Then

$$\prod_{j=1}^{n-1} (tj)! = t^{-\frac{n(t-1)}{2}} \left( \prod_{j=1}^{t-1} j! \right)^{\frac{1}{t}} \cdot \prod_{p=1}^{t-1} \frac{\Gamma(\frac{p}{t})^{1-\frac{p}{t}}}{\Gamma(\frac{p}{t}+n)^{1-\frac{p}{t}}} .$$

*Proof.* Let $H(n) := \prod_{j=1}^{n-1} (tj)!$ and consider the product

$$\prod_{j=1}^{t-1} j! = \prod_{k=0}^{n-1} \prod_{\ell=0}^{t-1} (tk + \ell)! = [H(n)]^t \cdot \prod_{k=0}^{n-1} \prod_{\ell=0}^{t-1} \prod_{p=1}^{\ell} (tk + p) = [H(n)]^t \cdot \prod_{p=1}^{t-1} \left( \prod_{k=0}^{n-1} (tk + p) \right)^{t-p}.$$

Finally, we observe that $\prod_{k=0}^{n-1} (tk + p) = t^n \frac{\Gamma(\frac{p}{t}+n)}{\Gamma(\frac{p}{t})}$. $\square$

From this we have

$$\ln Z_{N,\Gamma_0}[V_0] = \frac{N}{2} \ln(2\pi) + \left[ N\beta\left(\frac{1}{\beta} - \frac{1}{2}\right) + \frac{\beta N^2}{2} \right] \left( \ln(\zeta_2 - \zeta_1) - \frac{1}{2}\ln(8\beta) - \frac{1}{2}\ln N \right) \\ - \beta N^2 V\left(\frac{\zeta_1 + \zeta_2}{2}\right) - N \ln\left[\left(\frac{\beta}{2}\right)\right]! + \ln\left[\left(\frac{\beta N}{2}\right)\right]! \\ - \frac{N}{2}\left[\frac{\beta}{2} - 1\right] \ln\frac{\beta}{2} + \frac{2}{\beta} \ln\left[\prod_{j=1}^{\frac{\beta N}{2}-1} j!\right] + \sum_{p=1}^{\frac{\beta}{2}-1} \left(1 - \frac{2p}{\beta}\right) \left\{ \Gamma\left(\frac{2p}{\beta}\right) - \Gamma\left(\frac{2p}{\beta} + N\right) \right\}.$$

Using Stirling's approximation and the asymptotic expansion of the Barnes G-function we obtain the $N \to +\infty$ expansion,

$$\ln Z_{N,\Gamma_0}[V_0] = \frac{N}{2} \ln(2\pi) + \left[ N\beta\left(\frac{1}{\beta} - \frac{1}{2}\right) + \frac{\beta N^2}{2} \right] \left( \ln(\zeta_2 - \zeta_1) - \frac{1}{2}\ln(8\beta) - \frac{1}{2}\ln N \right) \\ - \beta N^2 V\left(\frac{\zeta_1 + \zeta_2}{2}\right) - N \ln\left[\left(\frac{\beta}{2}\right)\right]! + \frac{\beta N}{2} \ln N + \frac{\beta N}{2} \ln\frac{\beta}{2} - \frac{\beta N}{2} + \frac{1}{2} \ln N \\ - \sum_{p=1}^{\frac{\beta}{2}-1} \left(1 - \frac{2p}{\beta}\right) \left\{ \left(N + \frac{2p}{\beta} - 1\right) \ln N - N + \frac{1}{2} \ln N \right\} - \frac{N}{2} \left[\frac{\beta}{2} - 1\right] \ln\frac{\beta}{2} \\ + \frac{2}{\beta} \left\{ \frac{\beta^2 N^2}{8} \ln N + \frac{\beta^2 N^2}{8} \ln\frac{\beta}{2} - \frac{3\beta^2 N^2}{16} + \frac{\beta N}{4} \ln(2\pi) - \frac{1}{12} \ln N \right\} + O(1).$$

We remark that logarithm of the Barnes G-function and the logarithm of the Gamma function both admit, from the $O(1)$ scale and beyond, a full asymptotic expansion in powers of $\frac{1}{N}$. Hence also
the above O(1) error could be expanded in a full asymptotic power series in $1/N$. Finally, collecting terms at each scale, and observing that

$$ \begin{aligned} \mathcal{I}_{\Gamma_0}[\mu_{\Gamma_0}] &= -\ln(\zeta_2 - \zeta_1) + \ln(4) + 2V\left(\frac{\zeta_1 + \zeta_2}{2}\right) + \frac{3}{4} \\ \mathrm{Ent}[\mu_{\Gamma_0}] &= -\int_{\Gamma_0} \ln\left\{\frac{d\mu_{\Gamma_0}(z)}{dz}\right\} \cdot d\mu_{\Gamma_0}(z) = -\frac{1}{2} + \ln\frac{\pi}{2} + \ln(\zeta_2 - \zeta_1), \end{aligned} $$

we obtain Theorem 6.4.

**Acknowledgments:** A.G., K.K.K. and A. L. gratefully acknowledge the support of the ERC Project LDRAM: ERC-2019-ADG Project 884584.

## References

[1] Greg W. Anderson, Alice Guionnet, and Ofer Zeitouni. *An introduction to random matrices*, volume 118 of *Cambridge Studies in Advanced Mathematics*. Cambridge University Press, Cambridge, 2010.

[2] H. Babujian and M. Karowski. Exact form factors in integrable quantum field theories: the sine-Gordon model (II). *Nucl. Phys. B*, 620:407-455, 2002.

[3] A. Barhoumi, P. Bleher, A. Deaño, and M. Yattselev. Investigation of the two-cut phase region in the complex cubic ensemble of random matrices. *J. Math. Phys.*, 63(6):063303, 06 2022.

[4] F. Bekerman, A. Figalli, and A. Guionnet. Transport maps for $\beta$-matrix models and universality. *Commun. Math. Phys.*, 338(2):589-619, 2015.

[5] F. Bekerman, T. Leblé, and S. Serfaty. CLT for Fluctuations of $\beta$-ensembles with general potential. *Electron. J. Probab.*, 23(none):1-31, 2018.

[6] G. Ben Arous and A. Guionnet. Large deviations for Wigner's law and Voiculescu's non-commutative entropy. *Probab. Theory Related Fields*, 108(4):517-542, 1997.

[7] G. Ben Arous and O. Zeitouni. Large deviations from the circular law. *ESAIM Probab. Statist.*, 2:123-134, 1998.

[8] D. Bernard and A. Leclair. Differential equations for sine-Gordon correlation functions at the free fermion point. *Nucl. Phys. B*, 426:534-558, 1994.

[9] M. Bertola. Boutroux curves with external field: equilibrium measures without a variational problem. *Anal. Math. Phys.*, 1(2):167-211, 2011.

[10] M. Bertola, P. Bleher, R. Gharakhloo, K. T. R. McLaughlin, and A. Tovbis. *Openness of Regular Regimes of Complex Random Matrix Models*, pages 151-192. Springer International Publishing, Cham, 2022.

[11] M. Bertola and A. Tovbis. Asymptotics of orthogonal polynomials with complex varying quartic weight: Global structure, critical point behavior and the first painlevé equation. *Constr. Approx.*, 41:529-587, 2011.

[12] P. Bleher and A. Deaño. Topological expansion in the cubic random matrix model. *Int. Math. Res. Not.*, 2013(12):2699-2755, 2013.

[13] P. Bleher, R. Gharakhloo, and K. T-R McLaughlin. Phase diagram and topological expansion in the complex quartic random matrix model. *Commun. Pure Appl. Math.*, 77(2):1405-1485, 2024.

[14] G. Borot and A. Guionnet. Asymptotic expansion of $\beta$ matrix models in the one-cut regime. *Commun. Math. Phys.*, 317(2):447-483, 2013.
[15] G. Borot and A. Guionnet. Asymptotic expansion of $\beta$ matrix models in the multi-cut regime. *Forum Math. Sigma*, 12:93, 2024. Id/No e13.

[16] G. Borot, A. Guionnet, and K. K. Kozlowski. Large-N Asymptotic Expansion for Mean Field Models with Coulomb Gas Interaction. *Int. Math. Res. Not.*, 2015(20):10451-10524, 01 2015.

[17] Gaëtan Borot, Alice Guionnet, and Karol K. Kozlowski. *Asymptotic expansion of a partition function related to the sinh-model*. Mathematical Physics Studies, 222 pages. Springer, 2016.

[18] U. Cegrell, S. Kolodziej, and N. Levenberg. Two problems on potential theory for unbounded sets. *Math. Scand.*, 83(2):265-276, 1998.

[19] Nicolaas Govert de Bruijn. *Asymptotic Methods in Analysis*. North-Holland Publishing Co., 1958.

[20] P. Deift, T. Kriecherbauer, K. T.-R. McLaughlin, S. Venakides, and X. Zhou. Strong asymptotics of orthogonal polynomials with respect to exponential weights. *Comm. Pure Appl. Math*, 52:1491-1552, 1999.

[21] Percy Deift. *Orthogonal polynomials and random matrices: a Riemann-Hilbert approach*. Courant Lecture Notes 3. New-York University, 1999.

[22] Bertrand Eynard. *Counting Surfaces*, volume 70 of *Progress in Mathematical Physics*. Birkhäuser, 2016.

[23] J. M. Gonzalez-Barrios and R. M. Dudley. Metric entropy conditions for an operator to be of trace class. *Proc. Am. Math. Soc.*, 118(1):175-180, 1993.

[24] Alice Guionnet. *Asymptotics of random matrices and related models. The uses of Dyson-Schwinger equations*, volume 130 of CBMS Reg. Conf. Ser. Math. Providence, RI: American Mathematical Society (AMS), published for the Conference Board of the Mathematical Sciences (CBMS), 2019.

[25] N. Kitanine, K. K. Kozlowski, J.-M. Maillet, N. A. Slavnov, and V. Terras. Algebraic Bethe Ansatz approach to the asymptotics behavior of correlation functions. *J. Stat. Mech: Th. and Exp.*, 04:P04003, 2009.

[26] K. K. Kozlowski. On convergence of form factor expansions in the infinite volume quantum Sinh-Gordon model in 1+1 dimensions. *Invent. Math.*, 233:725-827, 2023.

[27] A. B. J. Kuijlaars and G. Lima Ferreira da Silva. S-curves in polynomial external fields, 2015-03-01.

[28] A. B. J. Kuijlaars and K. T.-R. McLaughlin. Generic behavior of the density of states in random matrix theory and equilibrium problems in the presence of real analytic external fields. *Commun. Pure Appl. Math.*, 53(6):736-785, 2000.

[29] M. Maïda and É. Maurel-Segala. Free transport-entropy inequalities for non-convex potentials and application to concentration for random matrices. *Probab. Theory Relat. Fields*, 159(1):329-356, 2014.

[30] M. L. Mehta. *Random Matrices*. Elsevier, 2004.

[31] Edward B. Saff and Vilmos Totik. *Logarithmic Potentials with External Fields*, volume 316 of *Grundlehren der mathematischen Wissenschaften*. Springer-Verlag, 1997.