\chapter{The endpoint matrix}\label{s:endpoint} In this section, we show that, up to a small error, the determinant of $\Mmat_N^\sharp(J)$ in \zcref{c:exact} is the determinant of an $r \times r$ matrix $\Amat_N(J)$ whose entries are differences of values of $(\Id - K_J)^{-1} g_{a_i}$ at the endpoints of $J$. Recall that $g_{a_i}$ was defined in \eqref{e:gtdef}. We then show that $\Amat_N(J)$ is close to a diagonal matrix when the intervals of $J$ are far apart. \section{Setting} Throughout this section, we fix $\delta \in (0, 1/2]$ and an integer $r_0 \ge 1$. The constants $C$, $c$, and $N_0$ depend only on $\delta$ and $r_0$, and all statements hold for $N \ge N_0$. We consider sets $J = \bigcup_{j = 1}^r (a_j, b_j)$ as in \eqref{e:Jdef}, with $r \le r_0$, and we assume that \begin{equation}\label{e:Jassumption} \overline J \subset \bulk_N(\delta) , \qquad L(J) \le N^{1/8} , \end{equation} where $L(J)$ is the microscopic length from \eqref{e:Ldef}. In particular, $|J| \le 1$, so that \zcref{p:inverse,l:pointvalues} apply. We also define the \emph{microscopic separation} of the intervals of $J$ by \begin{equation}\label{e:Ddef} \operatorname{sep}(J) = \sqrt{2N} \min_{i \neq j} \dist(J_i, J_j) \end{equation} when $r \ge 2$, and $\operatorname{sep}(J) = \infty$ when $r = 1$. Given a function $G$ on $J$ that has one-sided limits at the endpoints of $J$, we set \begin{equation}\label{e:Deltadef} \Delta_j G = G(b_j^-) - G(a_j^+) , \qquad 1 \le j \le r . \end{equation} \begin{definition}\label{d:endpointmatrix} We define the \emph{endpoint matrix} of $J$ to be the $r \times r$ matrix $\Amat_N(J)$ with entries \begin{equation}\label{e:Adef} \Amat_N(J)_{ij} = \1_{i = j} - \Delta_j \Big[ (\Id - K_J)^{-1} \big( \1_J \, g_{a_i} \big) \Big] , \qquad 1 \le i, j \le r . \end{equation} \end{definition} Note that the restriction of $g_{a_i}$ to each interval $J_k$ is bounded and extends continuously to the closure $\overline{J_k}$, where at the point $a_i$ we use the value $\lim_{y \downarrow a_i} g_{a_i}(y)$. In particular, the one-sided limits in \eqref{e:Adef} are defined through \eqref{e:resolventidentity}. The main result of this section is the following proposition. \begin{proposition}\label{p:endpoint} Under the assumptions \eqref{e:Jassumption}, we have \begin{equation}\label{e:endpoint} \big| \det \Mmat^\sharp_N(J) - \det \Amat_N(J) \big| \le C e^{C L(J)} N^{-1/2} , \qquad |\det \Amat_N(J)| \le C e^{C L(J)} . \end{equation} Consequently, $\Pgoe_N(J)^2 \le C e^{C L(J)} \Dgue_N(J)$. \end{proposition} \section{Reduction to local quantities} The entries of $\Mmat^\sharp_N(J)$ are pairings of bounded functions $Y$ on $\R$ with $Q_N(J)^{-1} X$, where $X \in V_N$. We first show that these pairings depend on $Y$ only through $\ip{Y}{X}$ and the restriction of $K_N Y$ to $J$, and for $X = k_j$ only through the latter. \begin{lemma}\label{l:local} Let $Y$ be a bounded measurable function on $\R$, and let $X \in V_N$. Then \begin{equation}\label{e:local} \ip{Y}{Q_N(J)^{-1} X} = \ip{Y}{X} + \ip{\1_J K_N Y}{(\Id - K_J)^{-1} (\1_J X)} . \end{equation} Moreover, for $1 \le j \le r$, we have $\ip{Y}{Q_N(J)^{-1} k_j} = \Delta_j \big[ (\Id - K_J)^{-1} (\1_J K_N Y) \big]$. \end{lemma} \begin{proof} Let $f \in V_N$, and set \begin{equation} G = (\Id - K_J)^{-1} (\1_J f) \in L^2(J) . \end{equation} Then $f + K_N(\1_J G) \in V_N$, and \begin{equation} \begin{split} Q_N(J) \big( f + K_N(\1_J G) \big) & = f + K_N(\1_J G) - K_N \big( \1_J f + \1_J K_N(\1_J G) \big) \\ & = f - K_N(\1_J f) + K_N\big( \1_J (\Id - K_J) G \big) = f , \end{split} \end{equation} where we used $\1_J K_N (\1_J G) = K_J G$ on $J$. Therefore $Q_N(J)^{-1} f = f + K_N(\1_J G)$. Pairing with $Y$ and using the symmetry of $K_N$, we obtain \eqref{e:local} with $f = X$. To prove the second claim, we take $X = k_j$. Since $K_N Y \in V_N$, we have $\ip{Y}{k_j} = \Delta_j (K_N Y)$. Also, by the symmetry of $(\Id - K_J)^{-1}$, \begin{equation} \begin{split} \ip{\1_J K_N Y}{(\Id - K_J)^{-1} (\1_J k_j)} & = \ip{(\Id - K_J)^{-1} (\1_J K_N Y)}{\1_J k_j} \\ & = \Delta_j \big[ K_N\big( \1_J (\Id - K_J)^{-1} (\1_J K_N Y) \big) \big] . \end{split} \end{equation} Adding the two terms and using \eqref{e:resolventidentity}, we obtain the claim. \end{proof} We now compute $\1_J K_N w_i$, where $w_i = \1_{J^c} \eps_{a_i}$ was defined in \eqref{e:kwdef}. This is the step where the sign function becomes local. \begin{lemma}\label{l:Kw} For $1 \le i \le r$, we have \begin{equation}\label{e:Kw} \1_J K_N w_i = (\Id - K_J)(\1_J \eps_{a_i}) + \1_J g_{a_i} . \end{equation} Consequently, $\Mmat_N(J)_{ij} = \Amat_N(J)_{ij}$ for all $1 \le i, j \le r$. \end{lemma} \begin{proof} We have $K_N w_i = K_N \eps_{a_i} - K_N (\1_J \eps_{a_i})$, and $\1_J K_N(\1_J \eps_{a_i}) = K_J (\1_J \eps_{a_i})$. The definition \eqref{e:gtdef} also gives $\1_J K_N \eps_{a_i} = \1_J \eps_{a_i} + \1_J g_{a_i}$. Combining these identities, we obtain \eqref{e:Kw}. Applying \zcref{l:local} with $Y = w_i$ and $X = k_j$, and using \eqref{e:Kw}, we have \begin{equation} \ip{w_i}{Q_N(J)^{-1} k_j} = \Delta_j \big[ \1_J \eps_{a_i} \big] + \Delta_j \big[ (\Id - K_J)^{-1} (\1_J g_{a_i}) \big] . \end{equation} The function $\eps_{a_i}$ is constant on each interval $J_j$, with the value $1/2$ on $J_i$ and on the intervals to the right of $J_i$, and the value $-1/2$ on the intervals to the left of $J_i$. Hence $\Delta_j [\1_J \eps_{a_i}] = 0$ for all $j$. Recall that $Y_i = w_i$ and $X_j = k_j$ in \eqref{e:XYdef}. The claim now follows from \eqref{e:Mdef} and \eqref{e:Adef}. \end{proof} \begin{remark}\label{r:mechanism} \zcref{l:Kw} is where the nondecaying sign function in the GOE kernel is removed. The function $w_i$ does not decay, and a direct estimate of the pairing $\ip{w_i}{Q_N(J)^{-1} k_j}$ would require control of the projection $K_N$ on the whole real line. However, $w_i$ is locally constant away from the endpoints of $J$, and \eqref{e:Kw} shows that after discarding the term $(\Id - K_J)(\1_J \eps_{a_i})$, which does not contribute to the endpoint differences, only the function $g_{a_i}$ remains. By \zcref{c:gt}(b), we have \begin{equation} |g_{a_i}(y)| \le C (1 + \sqrt N |y - a_i|)^{-1} + C N^{-1/4} , \end{equation} so this function is small away from $a_i$ on the microscopic scale and can be computed in terms of the kernel in the bulk. \end{remark} \section{Bounds on the remaining entries} We now bound the entries of $\Mmat^\sharp_N(J)$, including those that involve the top modes. We will use repeatedly that \begin{equation}\label{e:kernelL1} \int_J |K_N(y, z)| \dd z \le C \log \big( 2 + L(J) \big) , \qquad y \in \bulk_N(\delta) . \end{equation} To see this, note that the bound $C \sqrt N (1 + \sqrt N |y - z|)^{-1}$ from \zcref{l:pointwise}(c) is a decreasing function of $|y - z|$. So the integral over $J$ is bounded by the integral of this bound over the interval $\{ z : |z - y| \le |J|/2 \}$, which is equal to $2 C \log(1 + \sqrt N |J| / 2)$. Since $\sqrt N |J| \le L(J)$, the claim follows. \begin{lemma}\label{l:KYbounds} For $1 \le i \le r$, we have $\sup_J |K_N w_i| \le C \log(2 + L(J))$. Further, with $Y_0 = Y_N(J)$ and $Y^\sharp_N(J)$ as in \eqref{e:Y0def} and \eqref{e:borderdef}, \begin{equation}\label{e:KYbounds} \sup_J |K_N Y_0| + \sup_J |K_N Y^\sharp_N(J)| \le C \big( 1 + L(J) \big)^2 N^{-1/2} . \end{equation} \end{lemma} \begin{proof} The first claim follows from \eqref{e:Kw}, \eqref{e:kernelL1}, and \zcref{c:gt}(b). Next, we observe that for all integrable $f$, \begin{equation} \1_{J^c} \eps(\1_J f) = \sum_{k = 1}^r \big( \int_{J_k} f \big) w_k \end{equation} almost everywhere. Indeed, $\sgn(x - z) = \sgn(x - a_k)$ for $x \notin \overline{J_k}$ and $z \in J_k$. Therefore \begin{equation} Y_0 = \1_{J^c} \omega_N - \sum_{k = 1}^r \Big( \int_{J_k} \varphi_N \Big) w_k , \qquad Y^\sharp_N(J) = - 2 c_N \Big( \1_J \eps \psi_N + \sum_{k = 1}^r \Big( \int_{J_k} \psi_N \Big) w_k \Big) . \end{equation} To bound $\sup_J |K_N Y_0|$, we recall from \zcref{l:parity}(c) that $K_N \omega_N = 0$, so that $K_N(\1_{J^c} \omega_N) = - K_N(\1_J \omega_N)$. Then \zcref{l:globalfunctions}(c) and \eqref{e:kernelL1} imply that \begin{equation} \sup_J |K_N(\1_J \omega_N)| \le C N^{-1/2} \log(2 + L(J)) . \end{equation} Further, \zcref{l:pointwise}(a) gives \begin{equation} |\int_{J_k} \varphi_N| \le C |J| \le C L(J) N^{-1/2} . \end{equation} Combining these bounds with the first claim, we obtain the desired bound. For $Y^\sharp_N(J)$, we may assume that $N$ is odd, since otherwise $Y^\sharp_N(J) = 0$. Then \zcref{l:globalfunctions}(b) gives $|\eps \psi_N| \le C N^{-1/2}$ on $J$, and the same argument applies, using $c_N \le 1$. \end{proof} \begin{lemma}\label{l:topentries} The entries of $\Mmat_N^\sharp(J)$ satisfy the following bounds, for $1 \le i, j \le r$ and $0 \le \beta \le r$: \begin{equation}\label{e:topentries} \begin{gathered} |\Mmat_N(J)_{i 0}| + |\Mmat_N(J)_{ij}| \le C e^{C L(J)} , \\ |\Mmat_N(J)_{00} - 1| + |\Mmat_N(J)_{0j}| + |z_N(J)_\beta| + |d_N(J) - 1| + |v_N(J)_0| \le C e^{C L(J)} N^{-1/2} . \end{gathered} \end{equation} \end{lemma} \begin{proof} We first consider the entries in the columns $j \ge 1$. By \zcref{l:local}, for all bounded $Y$, we have \begin{equation} \ip{Y}{Q_N(J)^{-1} k_j} = \Delta_j \big[ (\Id - K_J)^{-1}(\1_J K_N Y) \big] , \end{equation} and \zcref{l:pointvalues} bounds this by $C e^{C L(J)} \sup_J |K_N Y|$. Taking $Y = w_i$, $Y = Y_0$, and $Y = Y^\sharp_N(J)$, and using \zcref{l:KYbounds}, we obtain the bounds on $\Mmat_N(J)_{ij}$, $\Mmat_N(J)_{0j}$, and $z_N(J)_j$. Next, we consider the column $\beta = 0$, where $X_0 = - \psi_N$. \zcref{l:local} also gives, for all bounded $Y$, \begin{equation}\label{e:column0} \ip{Y}{Q_N(J)^{-1} \psi_N} = \ip{Y}{\psi_N} + \ip{\1_J K_N Y}{(\Id - K_J)^{-1}(\1_J \psi_N)} . \end{equation} Using \zcref{p:inverse} and \zcref{l:pointwise}(a), we bound the second term in \eqref{e:column0} by \begin{equation} |J|^{1/2} \sup_J |K_N Y| \cdot C e^{C L(J)} \| \1_J \psi_N \|_2 \le C e^{C L(J)} \sup_J |K_N Y| . \end{equation} It remains to bound $\ip{Y}{\psi_N}$ for the three choices of $Y$. For $Y = w_i$, we have \begin{equation} \ip{w_i}{\psi_N} = \ip{\eps_{a_i}}{\psi_N} - \ip{\1_J \eps_{a_i}}{\psi_N} = - (\eps \psi_N)(a_i) - \ip{\1_J \eps_{a_i}}{\psi_N} , \end{equation} which \zcref{l:globalfunctions}(b) and \zcref{l:pointwise}(a) bound by $C$ in absolute value. When $Y = Y_0$, we use $\ip{\omega_N}{\psi_N} = 0$ from \zcref{l:parity}(c) and the formula for $Y_0$ in the proof of \zcref{l:KYbounds} to write \begin{equation} \ip{Y_0}{\psi_N} = - \ip{\1_J \omega_N}{\psi_N} - \sum_{k = 1}^r \Big( \int_{J_k} \varphi_N \Big) \ip{w_k}{\psi_N} , \end{equation} which is bounded by $C N^{-1/2} |J| + C L(J) N^{-1/2}$ in absolute value. The same computation for $Y = Y^\sharp_N(J)$ with $N$ odd gives \begin{equation} |\ip{Y^\sharp_N(J)}{\psi_N}| \le C N^{-1/2} |J| + C |J| \max_k |\ip{w_k}{\psi_N}| , \end{equation} and the right side can be bounded by $C L(J) N^{-1/2}$. Combining these bounds with \zcref{l:KYbounds}, and recalling that $\Mmat_N(J)_{\alpha 0} = \1_{\alpha = 0} + \ip{Y_\alpha}{Q_N(J)^{-1} \psi_N}$ and $z_N(J)_0 = - \ip{Y^\sharp_N(J)}{Q_N(J)^{-1} \psi_N}$, we obtain the bounds for the column $\beta = 0$. Finally, \zcref{l:pointwise}(a) gives \begin{equation} |d_N(J) - 1| = c_N |\int_J \psi_N| \le C |J| \end{equation} and $|v_N(J)_0| \le C |J|$. This completes the proof, since $|J| \le C L(J) N^{-1/2}$ and $L(J) \le e^{L(J)}$. \end{proof} \begin{proof}[Proof of \zcref{p:endpoint}] We order the rows and columns of $\Mmat_N^\sharp(J)$ as $0, 1, \dots, r, r + 1$, where the index $r + 1$ corresponds to the last row and column in \eqref{e:Msharpdef}. Let $\mathbf E$ denote the matrix obtained from $\Mmat^\sharp_N(J)$ by replacing the row with index $0$ by the unit vector $e_0$ and the row with index $r + 1$ by the unit vector $e_{r + 1}$. \zcref{l:topentries} implies that every entry of $\Mmat_N^\sharp(J)$ is bounded by $C e^{C L(J)}$ in absolute value, and that the rows with index $0$ and $r + 1$ differ from $e_0$ and $e_{r + 1}$ by vectors with entries bounded by $C e^{C L(J)} N^{-1/2}$. Since the determinant is linear in each row and $r \le r_0$, we find \begin{equation} \big| \det \Mmat^\sharp_N(J) - \det \mathbf E \big| \le C e^{C L(J)} N^{-1/2} . \end{equation} Expanding $\det \mathbf E$ along the two unit rows, we find that $\det \mathbf E$ is the determinant of the submatrix of $\Mmat_N^\sharp(J)$ with rows and columns indexed by $1, \dots, r$. \zcref{l:Kw} shows that this submatrix coincides with $\Amat_N(J)$, which gives the first bound in \eqref{e:endpoint}. The second bound follows from \zcref{l:topentries} and $r \le r_0$, and the last claim follows from \zcref{c:exact}. \end{proof} \section{Separated intervals} We now show that the endpoint matrix of a union of well-separated intervals is close to the diagonal matrix formed by the endpoint matrices of the individual intervals. \begin{lemma}\label{l:offdiagonal} Under the assumptions \eqref{e:Jassumption}, suppose that $r \ge 2$ and $\operatorname{sep}(J) \ge 1$. Then for all $1 \le i, j \le r$ with $i \neq j$, \begin{equation}\label{e:offdiagonal} \begin{gathered} |\Amat_N(J)_{ij}| \le C e^{C L(J)} \big( \operatorname{sep}(J)^{-1} + N^{-1/4} \big) , \\ \big| \Amat_N(J)_{jj} - \Amat_N(J_j) \big| \le C e^{C L(J)} \operatorname{sep}(J)^{-1} , \end{gathered} \end{equation} where $\Amat_N(J_j)$ is the endpoint matrix of the single interval $J_j$, which is a real number. \end{lemma} \begin{proof} Throughout the proof, we write $L = L(J)$ and $\mathsf d = \operatorname{sep}(J)$. Let $K_0$ denote the operator on $L^2(J) = \bigoplus_k L^2(J_k)$ that acts as $K_{J_k}$ on each $L^2(J_k)$, and set $R = K_J - K_0$. The kernel of this operator is equal to $K_N(x, y)$ for $x$ and $y$ in different intervals of $J$, and to $0$ otherwise. Using \zcref{l:pointwise}(c), we see that $|K_N(x, y)| \le C \sqrt N \mathsf d^{-1}$ when $x$ and $y$ belong to different intervals, so the Hilbert--Schmidt norm of $R$ satisfies \begin{equation}\label{e:offHS} \| R \|_2^2 \le \sum_{k \neq l} |J_k| |J_l| \, C N \mathsf d^{-2} \le C L^2 \mathsf d^{-2} . \end{equation} By the resolvent identity, we have \begin{equation}\label{e:blockresolvent} (\Id - K_J)^{-1} = (\Id - K_0)^{-1} + (\Id - K_J)^{-1} R \, (\Id - K_0)^{-1} . \end{equation} Fix $i$. We define \begin{equation} G = (\Id - K_J)^{-1}(\1_J g_{a_i}) \end{equation} and \begin{equation} G_0 = (\Id - K_0)^{-1} (\1_J g_{a_i}) . \end{equation} By \zcref{c:gt}(b), we have $|g_{a_i}| \le C$ on $J$, and $|g_{a_i}(y)| \le C (\mathsf d^{-1} + N^{-1/4})$ for $y \in J_k$ with $k \neq i$, since then $\sqrt N |y - a_i| \ge \mathsf d / \sqrt 2$. Applying \zcref{p:inverse} to each $J_k$ separately, we have \begin{equation}\label{e:G0bounds} \| \1_{J_k} G_0 \|_2 \le C e^{C L} |J|^{1/2} \big( \mathsf d^{-1} + N^{-1/4} \big) , \quad k \neq i , \qquad \| G_0 \|_2 \le C e^{C L} |J|^{1/2} . \end{equation} Combining \eqref{e:blockresolvent} and \eqref{e:offHS} with \zcref{p:inverse}, we also have \begin{equation}\label{e:GminusG0} \| G - G_0 \|_2 \le C e^{C L} \| R \|_2 \| G_0 \|_2 \le C e^{C L} \mathsf d^{-1} |J|^{1/2} , \end{equation} where in the last inequality we absorbed the factor $L$ from \eqref{e:offHS} into $e^{C L}$. We now evaluate $G$ at an endpoint $t \in \{a_j, b_j\}$ with $j \neq i$. By \eqref{e:resolventidentity}, we have \begin{equation} G(t) = g_{a_i}(t) + \sum_{k = 1}^r \int_{J_k} K_N(t, z) G(z) \dd z . \end{equation} The first term is bounded by $C(\mathsf d^{-1} + N^{-1/4})$, since $\sqrt N |t - a_i| \ge \mathsf d / \sqrt 2$. When $k \neq j$, we have $|K_N(t, z)| \le C \sqrt N \mathsf d^{-1}$ for $z \in J_k$. Then the Cauchy--Schwarz inequality, together with \eqref{e:G0bounds} and \eqref{e:GminusG0}, shows that the term with index $k$ is bounded by \begin{equation} C \sqrt N \mathsf d^{-1} |J|^{1/2} \| G \|_2 \le C e^{C L} L \mathsf d^{-1} . \end{equation} For $k = j$, the Cauchy--Schwarz inequality and \zcref{l:pointwise}(b) give \begin{equation} \Big| \int_{J_j} K_N(t, z) G(z) \dd z \Big| \le C N^{1/4} \big( \| \1_{J_j} G_0 \|_2 + \| G - G_0 \|_2 \big) \le C e^{C L} \big( \mathsf d^{-1} + N^{-1/4} \big) , \end{equation} where we used $N^{1/4} |J|^{1/2} \le L^{1/2}$ and $j \neq i$. Taking the difference between $t = b_j$ and $t = a_j$, we obtain the first bound in \eqref{e:offdiagonal}. To prove the second bound, we define \begin{equation} G^{(i)} = (\Id - K_{J_i})^{-1}(\1_{J_i} g_{a_i}) . \end{equation} By the definition of the endpoint matrix, $\Amat_N(J_i) = 1 - \Delta_i G^{(i)}$. We also have $\1_{J_i} G_0 = G^{(i)}$. For $t \in \{a_i, b_i\}$, we can then write \begin{equation} G(t) - G^{(i)}(t) = \sum_{k \neq i} \int_{J_k} K_N(t, z) G(z) \dd z + \int_{J_i} K_N(t, z) \big( G - G_0 \big)(z) \dd z . \end{equation} As above, the first sum is bounded by $C e^{C L} L \mathsf d^{-1}$. Using \eqref{e:GminusG0}, we bound the last term by $C N^{1/4} \| G - G_0 \|_2 \le C e^{C L} \mathsf d^{-1}$. This gives the second bound in \eqref{e:offdiagonal}, after renaming $i$ as $j$. \end{proof}