% Revision of 22 November 2026. New modules carry the prefix r1_; all other modules are shared with paper.tex. % Begin papers/redei/src/r1_00_frontmatter.tex \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{microtype} \usepackage{hyperref} \hypersetup{ hidelinks, pdfauthor={Zhongpai Gao}, pdftitle={Four-ranks of class groups and the spectrum of Legendre symbols}, pdfsubject={Quadratic class groups, Redei matrices, random matrices} } \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{remark}[theorem]{Remark} \newtheorem{example}[theorem]{Example} \title{Four-ranks of class groups and the spectrum of Legendre symbols} \author{Zhongpai Gao\\\texttt{gaozhongpai@gmail.com}} \date{} \setlength{\emergencystretch}{2em} \begin{document} \maketitle \begin{abstract} We study how much of the narrow $4$-rank $k$ of a real quadratic field can be recovered from the complete Legendre matrix of its squarefree radicand $d$. Let $n$ be the number of prime factors and $N=2^{n-1-k}$. If exactly $N$ eigenvalues lie outside $[-1,1]$, the count recovers $k$. At a prescribed $4$-rank, for radicands $d\le X$ with all prime factors $1$ modulo $4$ and $r$ prime factors above a suitable cutoff, the success probability tends to $\exp(-e^{-c})$ if $N\to\infty$ and $r/N-\log N\to c$, and to $1$ or $0$ above or below this window. This is unconditional when all prime factors exceed the cutoff. The real Dirichlet critical-line theorem extends it to a prescribed set of $O(\log\log\log X)$ small prime factors. We identify the critical empirical law through a free multiplicative convolution of Poisson laws and construct a family where the small primes change the scale of both extreme eigenvalues. On the broader family, the two edge fluctuations have independent Tracy--Widom limits at each fixed $4$-rank. \end{abstract} \medskip \noindent\textbf{2020 Mathematics Subject Classification.} Primary 11R29, 60B20; secondary 11R45, 46L54, 05C50. \noindent\textbf{Keywords.} Class group, $4$-rank, R\'edei matrix, Legendre symbol, random matrix, free multiplicative convolution, Tracy--Widom law. % End papers/redei/src/r1_00_frontmatter.tex % Begin papers/redei/src/r1_01_introduction.tex \section{Introduction} How much of the narrow $4$-rank of $\mathbb Q(\sqrt d)$ can be read from the real eigenvalues of its complete Legendre matrix? Let $d>1$ be squarefree, with prime factors $p_1<\cdots1/4$, and its failure probability is less than $2^{t-M}$ (zero for $t=0$). For $u\le t$, the selected $u$ projections are independent except with probability less than $2^{u-t}$, or less than $4\,2^{u-t}$ after $E$. Given independence, their laws agree by $\mathrm{GL}_t$ symmetry. The components in the exposed span remain independent uniforms. Thus the selected labels change in total variation by at most \[ \min\{2^{t-M},5\,2^{u-t}\} \le\sqrt5\,2^{(u-M)/2}. \] For $u>t$ the second bound is trivial. Averaging over the actual posterior of the exposed labels and $B$ costs no conditioning mass. Before spanning, the character is a quadratic phase with polar matrix $A_F\otimes B$, of rank $s\operatorname{rank}(A_F)$. For a quadratic form $Q$ on $\mathbb F_2^d$ with polar form $\mathcal B$, differencing gives \[ \left|2^{-d}\sum_x(-1)^{Q(x)}\right|^2 =2^{-d}\sum_{z\in\operatorname{rad}\mathcal B}(-1)^{Q(z)}, \] which is zero or $2^{-\operatorname{rank}\mathcal B}$. This proves the first term, uniformly in $B$. Twice the total-variation bound proves \eqref{eq:partial-character-comparison}. For $A=\varnothing$, $t=s$ and $M=n$ give \eqref{eq:quotient-character-comparison} before the geometric-mean bound. Finally every nonempty $A_F$ has even rank at least two, while its Wigner character has mean zero. Summing coefficients proves the polynomial comparisons. \end{proof} % End papers/redei/src/03_quotient_character_comparison.tex % Begin papers/redei/src/r1_02_single_matrix.tex \subsection{One matrix at a time} \label{sec:single-matrix} The identities \eqref{eq:quotient-occupancy} use no randomness. They hold for every symmetric binary matrix $R$ with zero row sums, with $s$ its rank: the principal minor of $R$ factors as $CBC^{\mathsf T}$ by the counting argument in the proof of Lemma~\ref{lem:quotient-representation}. We record their consequences in the form used for class groups. Call two indices \emph{linked} if $e_i+e_j\in\ker R$. This is an equivalence relation, and its classes are the sets of rows with a common label. \begin{proposition}[Rank and spectrum of a single matrix] \label{prop:single-matrix} Let $R$ be a symmetric $r\times r$ matrix over $\mathbb F_2$ with zero row sums, let $k=\dim\ker R-1$, and let $K$ be its sign matrix. Then \begin{enumerate} \item at most $2^{\,r-1-k}$ eigenvalues of $K$ lie outside $[-1,1]$; \item $\|K\|\ge r\,2^{-(r-1-k)/2}-1$, equivalently \[ k\le r-1-2\log_2\frac{r}{\|K\|+1}; \] \item $\|K\|\ge\ell-1$, where $\ell$ is the size of the largest class of linked indices. \end{enumerate} In particular, for $d$ squarefree with $r$ prime factors, none congruent to $3$ modulo $4$, \begin{equation} \operatorname{rk}_4\operatorname{Cl}^+(d) \le r-1-2\log_2\frac{r}{\|K_d\|+1}. \label{eq:four-rank-spectral-bound} \end{equation} \end{proposition} \begin{proof} Put $M=K+\Delta=\sqrt N\,ZUZ^{\mathsf T}$ with $N=2^{\,r-1-k}$. All entries of $M$ are $\pm1$, so its Frobenius norm is $r$, and its rank is at most $N$. Since $\|\Delta\|=1$, Weyl's inequality gives the first assertion. A matrix of rank at most $N$ has operator norm at least its Frobenius norm divided by $\sqrt N$; hence $\|K\|\ge\|M\|-1\ge r/\sqrt N-1$. For the third, the rows in one class have a common label $v$, so $M$ equals the constant $(-1)^{v^{\mathsf T}Bv}$ on the corresponding principal block. The normalized indicator vector $x$ of the class has $|x^{\mathsf T}Mx|=\ell$. The last assertion is the second one for $R=R_d$; see Section~\ref{sec:arithmetic} for the identification of the corank. \end{proof} Equality holds in \eqref{eq:four-rank-spectral-bound} when all symbols equal $1$: then $k=r-1$ and $K_d=J-I$. For typical $d$ the right side is about $r-\log_2r$, far from the truth. Theorem~\ref{thm:rough-all-ranks} shows that the bound becomes sharp, up to rounding, once $2^{\,r-1-k}\log 2^{\,r-1-k}=o(r)$. % End papers/redei/src/r1_02_single_matrix.tex % Begin papers/redei/src/03_quotient_spectral_scales.tex \section{Spectral laws} \label{sec:quotient-scales} We use the quotient sample of Section~\ref{sec:uniform} throughout, with $H=K/\sqrt r$ and $m_p(H)=r^{-1}\operatorname{tr}H^p$. A common walk expansion first gives the empirical law; the same kernel then gives occupancy spikes and, through compressed traces, GOE edges. All estimates are uniform in the invertible symmetric form $B$. \subsection{The distribution of all eigenvalues} \label{sec:bulk-crossover} \begin{proposition}[Walk comparison] \label{prop:quotient-spectral-scales} For positive integers $p_1,\ldots,p_t$ with $J=\sum_a p_a0$ follows, for example, along $r=\lfloor\lambda2^s\rfloor$. All estimates are uniform in $B$. The moment polynomials and the locally uniform bounds prove weak continuity at every finite positive $\lambda$. Their constant term counts the empty-odd-support patterns with $v=j+1$, namely tree walks traversing each edge twice. This is the Catalan number, giving continuity at zero and the semicircle law. For $\lambda>1$, the rank bound also gives $\nu_\lambda(\{0\})\ge1-1/\lambda$: at most $N/r$ of the finite-sample eigenvalues lie outside $[-r^{-1/2},r^{-1/2}]$. Hence $\nu_\lambda\Rightarrow\delta_0$ as $\lambda\to\infty$. Every sequence $r/N$ has a convergent subsequence in the compactified half-line. The preceding limits and continuity prove the moving-target bounded-Lipschitz assertion. At infinity there is no second-moment convergence, as the deterministic second moment shows. \end{proof} \begin{corollary}[Sparse edge locations] \label{cor:sparse-edge-locations} If $s/(\log r\log\log r)\to\infty$, then the two extreme eigenvalues of $K/\sqrt r$ tend in probability to $2$ and $-2$. \end{corollary} \begin{proof} In \eqref{eq:quotient-scale-moments} take $J=2m$ with $m=\lceil a\log r\rceil$. The Wigner bound $\mathbb E\operatorname{tr}(W_r/\sqrt r)^{2m}\ll r4^m$ follows from \cite[Theorem~3]{Soshnikov} by power-mean interpolation. The hypothesis pays $J\log J=O_a(\log r\log\log r)$ and the spanning correction is exponentially small. Markov's inequality, with $a$ large depending on $\varepsilon>0$, gives $\Pr(\|K\|/\sqrt r>2+\varepsilon)\to0$. The bulk law supplies eigenvalues near both edges from inside. \end{proof} % End papers/redei/src/03_quotient_bulk_crossover.tex % Begin papers/redei/src/r1_03_critical_law.tex \subsection{The limiting distributions} \label{sec:critical-law} For $\lambda>0$ let $\Pi_\lambda$ be the Poisson law of mean $\lambda$. Let $d_1,d_2$ be free self-adjoint elements of a tracial noncommutative probability space $(\mathcal A,\tau)$ whose moments are those of $\Pi_\lambda$ \cite[Lectures~6 and~14]{NS}. We write \[ m_j(\Pi_\lambda\boxtimes\Pi_\lambda)=\tau\bigl((d_1d_2)^j\bigr), \] the moments of the free multiplicative convolution of $\Pi_\lambda$ with itself. The theorem below shows in particular that they are the moments of a unique probability measure on $[0,\infty)$, which we denote by $\Pi_\lambda\boxtimes\Pi_\lambda$. \begin{theorem}[The measures $\nu_\lambda$] \label{thm:critical-law} For every $\lambda>0$ and $j\ge1$, \begin{equation} c_{2j}(\lambda)=\lambda^{-(j+1)}\, m_j(\Pi_\lambda\boxtimes\Pi_\lambda). \label{eq:critical-law-moments} \end{equation} Equivalently, if $X$ has law $\nu_\lambda$, then $\lambda X^2$ has law \[ \lambda^{-1}\,\Pi_\lambda\boxtimes\Pi_\lambda+(1-\lambda^{-1})\delta_0 . \] Moreover \[ (\Pi_\lambda\boxtimes\Pi_\lambda)(\{0\})=e^{-\lambda},\qquad \nu_\lambda(\{0\})=1-\frac{1-e^{-\lambda}}{\lambda}. \] \end{theorem} For $\lambda<1$ the coefficient of $\delta_0$ is negative; the atom of $\Pi_\lambda\boxtimes\Pi_\lambda$ compensates, since $e^{-\lambda}\ge1-\lambda$. \begin{proof} Fix an invertible symmetric $B$ and the matrix $U$ of \eqref{eq:quotient-occupancy}. For a partition $\pi$ of the cyclically ordered positions $1,\ldots,2j$ put \[ T_\pi=\sum_{a}\ \prod_{i=1}^{2j}(-1)^{a_i^{\mathsf T}Ba_{i+1}}, \] where $a=(a_1,\ldots,a_{2j})$ runs over the tuples in $\mathbb F_2^s$ that are constant on the blocks of $\pi$, and $a_{2j+1}=a_1$. The quotient of the $2j$-cycle by $\pi$ is a closed walk on $|\pi|$ vertices, possibly with loops. Let $d(\pi)$ be the binary adjacency rank of its odd-multiplicity edges between distinct vertices. The sum $T_\pi$ is a quadratic character sum in $|\pi|$ variables of $\mathbb F_2^s$ whose polar form has rank $s\,d(\pi)$; loops change the quadratic form but not its polar form. The differencing identity in the proof of Proposition~\ref{prop:quotient-character} gives $|T_\pi|\le N^{|\pi|-d(\pi)/2}$. Let $w$ be the walk obtained by deleting the $\ell$ loop steps. It has the same vertices and the same odd edges, and length $2j-\ell$. The budget \eqref{eq:walk-rank-budget} with one component gives $2|\pi|-(2j-\ell)-2\le d(\pi)$, that is, \begin{equation} |\pi|-1-j-\tfrac12d(\pi)\le-\tfrac12\ell . \label{eq:critical-budget} \end{equation} Call $\pi$ \emph{surviving} if it has no loop and equality holds. The surviving partitions are exactly the equality patterns counted in \eqref{eq:bulk-crossover-moments}, and for them the proof of Theorem~\ref{thm:bulk-crossover} gives $T_\pi=N^{|\pi|-d(\pi)/2}$. Every other $\pi$ has $N^{-1-j}|T_\pi|\le N^{-1/2}$; without loops the bound is $N^{-1}$, because $d(\pi)$ is even. \emph{A surviving partition respects parity.} Let $G$ be the support graph of the walk and $F$ its odd edges. In the equality case every edge outside $F$ is traversed exactly twice, and their number is $v-v_F+c_F-1$ in the notation of \eqref{eq:walk-rank-budget}. These edges therefore join the components of $F$ and the remaining vertices as a tree, and add no cycle: $G$ and $F$ have the same cycle space. The proof of Theorem~\ref{thm:bulk-crossover} shows that $F$ is bipartite. Hence $G$ is bipartite, the walk alternates between its two sides, and positions in one block of $\pi$ have the same parity. \emph{Two diagonal matrices.} Let $D_1,D_2$ be independent $N\times N$ diagonal matrices with independent $\Pi_\lambda$ entries. All cumulants of $\Pi_\lambda$ equal $\lambda$, and joint cumulants of entries at different sites vanish. The moment--cumulant formula gives \[ \frac1N\mathbb E\operatorname{tr}(D_1U)^{2j} =N^{-1-j}\sum_\pi\lambda^{|\pi|}T_\pi,\qquad \frac1N\mathbb E\operatorname{tr}(D_1UD_2U)^{j} =N^{-1-j}\sum_{\pi\ \mathrm{respecting\ parity}}\lambda^{|\pi|}T_\pi . \] By the two preceding paragraphs both converge, as $N\to\infty$, to \[ \sum_{\pi\ \mathrm{surviving}}\lambda^{|\pi|} =\lambda^{j+1}c_{2j}(\lambda), \] since a surviving $\pi$ has $|\pi|=j+1+d(\pi)/2$. \emph{Freeness.} We claim that $D_1$ and $UD_2U$ are asymptotically free in expectation. Since $U^2=I$, a polynomial in $UD_2U$ is $Ug(D_2)U$. Let $f_1,g_1,\ldots,f_m,g_m$ be polynomials with $\int f_i\,d\Pi_\lambda=\int g_i\,d\Pi_\lambda=0$. Then \[ \frac1N\mathbb E\operatorname{tr}\prod_{i=1}^m f_i(D_1)\,Ug_i(D_2)U =N^{-1-m}\sum_{a}\mathbb E\Bigl[\prod_if_i(D_{1,a_{2i-1}})\Bigr] \mathbb E\Bigl[\prod_ig_i(D_{2,a_{2i}})\Bigr] \prod_{i=1}^{2m}\sqrt N\,U_{a_ia_{i+1}} . \] The first expectation vanishes unless every site occurring among the odd positions occurs at least twice there, and similarly for the even positions. Such tuples have at most $m$ distinct sites, so there are $O_m(N^m)$ of them. The expectations are bounded and $|\sqrt N\,U_{ab}|=1$. The mean trace is therefore $O(N^{-1})$. For an odd alternating word, cycle the two end factors together and write their product as its centred part plus its mean. The centred part gives an even alternating word, and the mean gives a shorter odd word. Induction starts with one centred factor. Since $D_1$ and $UD_2U$ each have the exact mean moments of $\Pi_\lambda$, their joint mean moments converge to those of free elements $d_1,d_2$ with law $\Pi_\lambda$. In particular \[ \frac1N\mathbb E\operatorname{tr}(D_1UD_2U)^j\longrightarrow \tau\bigl((d_1d_2)^j\bigr)=m_j(\Pi_\lambda\boxtimes\Pi_\lambda). \] Comparison with the previous step proves \eqref{eq:critical-law-moments}. \emph{An operator model and the atom.} Realize $d_1,d_2$ as free positive operators affiliated with a finite von Neumann algebra with faithful normal trace $\tau$, each with distribution $\Pi_\lambda$; for instance in the free product of two copies of $L^\infty(\Pi_\lambda)$. They have moments of all orders, so $A=\overline{d_2^{1/2}d_1^{1/2}}$ in the algebra of $\tau$-measurable operators defines $T=A^*A$, with $\tau(T^j)=\tau((d_1d_2)^j)$; the moment formula for free elements extends from the bounded truncations $d_i\mathbf1_{\{d_i\le n\}}$ by H\"older's inequality. The distribution $\rho$ of $T$ is therefore a probability measure on $[0,\infty)$ with moments $m_j(\Pi_\lambda\boxtimes\Pi_\lambda)=\lambda^{j+1}c_{2j}(\lambda)$. These grow at most like $\lambda^{j+1}(2j)^{2j}\max(1,\lambda^{j-1})$ by the proof of Theorem~\ref{thm:bulk-crossover}. The Stieltjes Carleman sum $\sum_j m_j(\rho)^{-1/(2j)}$ diverges, so these moments determine $\rho$. This is the measure $\Pi_\lambda\boxtimes\Pi_\lambda$. Let $e_i$ be the kernel projection of $d_i$, so $\tau(e_i)=e^{-\lambda}$. The inverse square root of $d_i$ on its support is bounded, since its nonzero spectrum lies in $\{1,2,\ldots\}$. If $k$ is the kernel projection of $T$, then $Ak=0$. Multiplying by that inverse for $d_2$ shows that the range of $d_1^{1/2}k$ lies in both $e_2$ and $1-e_1$. The projections $e_2$ and $1-e_1$ are free, with traces $e^{-\lambda}$ and $1-e^{-\lambda}$. For free projections $p,q$ the element $pqp$ has an atom at $1$ of mass $\max(0,\tau(p)+\tau(q)-1)$ \cite[Example~3.6.7]{VDN}, and the spectral projection of $pqp$ at $1$ is the meet $p\wedge q$. Here the two traces add up to exactly one, so the meet has trace zero and vanishes, the trace being faithful. Hence $d_1^{1/2}k=0$, that is $k\le e_1$. Conversely $Te_1=0$. So $k=e_1$ and $\rho(\{0\})=e^{-\lambda}$. \emph{The law of the square.} The measure $\lambda^{-1}\rho+(1-\lambda^{-1})\delta_0$ has total mass one and mass $\lambda^{-1}e^{-\lambda}+1-\lambda^{-1}\ge0$ at zero, so it is a probability measure. Its $j$th moment is $\lambda^jc_{2j}(\lambda)$ for $j\ge1$, which is the $j$th moment of $\lambda X^2$. Both are determined by their moments, hence equal. Evaluating at zero gives $\nu_\lambda(\{0\})$. \end{proof} \begin{remark}[Classes of linked rows] \label{rem:linked-classes} The atom has a direct meaning. The matrix $K+\Delta$ has rank at most the number of distinct labels. For $r$ independent uniform labels with $r/N\to\lambda$ this number has mean $N(1-(1-1/N)^r)$ and variance at most its mean; the dependent last label and the spanning condition change it by at most one and by a bounded factor in probability. Thus the number of classes of linked rows, divided by $r$, tends in probability to $(1-e^{-\lambda})/\lambda$. The theorem says that the rank deficiency accounts for the whole atom, in the sense that the proportion of eigenvalues of $K/\sqrt r$ in $[-\epsilon,\epsilon]$ beyond it tends to zero when first $r\to\infty$ and then $\epsilon\to0$. The step proving freeness uses only $U^2=I$ and $|U_{ab}|=N^{-1/2}$; the earlier steps use the quadratic form $B$. \end{remark} % End papers/redei/src/r1_03_critical_law.tex % Begin papers/redei/src/r1_03b_moments.tex \begin{proposition}[Generating function and size of the moments] \label{prop:critical-moments} Fix $\lambda>0$ and write $G(w)=\sum_{n\ge0}m_n(\Pi_\lambda)w^n$ for the moment series of the Poisson law. \begin{enumerate} \item There is a unique formal power series $w(z)=\lambda z+\cdots$ with \[ w(z)^2\,G(w(z))=z\,\{G(w(z))-1\}, \] and \[ 1+\sum_{j\ge1}\lambda^{j+1}c_{2j}(\lambda)\,z^j=G(w(z)) . \] \item For every $j\ge1$, \begin{equation} \frac2\lambda\,m_j(\Pi_\lambda)-\lambda^{j-1} \ \le\ c_{2j}(\lambda)\ \le\ \lambda^{-(j+1)}\,m_{2j}(\Pi_\lambda). \label{eq:critical-moment-bounds} \end{equation} \item The support of $\nu_\lambda$ is unbounded. \end{enumerate} \end{proposition} \begin{proof} For a law $\mu$ with all moments and nonzero mean put $\psi_\mu(w)=\sum_{n\ge1}m_n(\mu)w^n$, let $\chi_\mu$ be its inverse under composition, and $S_\mu(u)=\chi_\mu(u)(1+u)/u$. For free elements the $S$-transform of the product is the product of the $S$-transforms, as an identity of formal power series \cite[Lecture~18]{NS}. With $\mu=\Pi_\lambda$ and $\rho=\Pi_\lambda\boxtimes\Pi_\lambda$ this reads $\chi_\rho(u)=\chi_\mu(u)^2(1+u)/u$. Put $u=\psi_\rho(z)$ and $w=\chi_\mu(u)$. Then $\psi_\mu(w)=u$ and $z=w^2(1+u)/u$, which is the displayed equation because $1+\psi_\mu=G$. It determines the coefficients of $w$ recursively from $w=\lambda z+\cdots$. Theorem~\ref{thm:critical-law} converts $1+\psi_\rho(z)=G(w(z))$ into the second display. For the lower bound in \eqref{eq:critical-moment-bounds} return to the proof of Theorem~\ref{thm:critical-law}. Let $\omega$ be any partition of the $j$ odd positions, and let $\pi$ consist of the blocks of $\omega$ and the $j$ even positions as singletons. Summing over the label at an even position between two odd positions with labels $a,a'$ gives $\sum_c(-1)^{c^{\mathsf T}B(a+a')}=N\mathbf1_{a=a'}$, since $B$ is invertible. Going around the cycle forces all odd labels to coincide, so $T_\pi=N^{j+1}$ exactly, and $N^{-1-j}\lambda^{|\pi|}T_\pi=\lambda^{j+|\omega|}$. Hence $\pi$ is surviving. The same holds with the roles of odd and even positions exchanged. The two families share only the partition into singletons, whose term is $\lambda^{2j}$. Every surviving term is positive, and $\sum_\omega\lambda^{|\omega|}=m_j(\Pi_\lambda)$. Therefore \[ \lambda^{j+1}c_{2j}(\lambda)\ge2\lambda^jm_j(\Pi_\lambda)-\lambda^{2j}. \] For the upper bound, H\"older's inequality for Schatten norms and the Cauchy--Schwarz inequality give \[ \frac1N\mathbb E\operatorname{tr}(D_1UD_2U)^j \le\mathbb E\Bigl[\Bigl(\frac1N\operatorname{tr}D_1^{2j}\Bigr)^{1/2} \Bigl(\frac1N\operatorname{tr}D_2^{2j}\Bigr)^{1/2}\Bigr] \le m_{2j}(\Pi_\lambda), \] and the left side tends to $\lambda^{j+1}c_{2j}(\lambda)$. By Jensen's inequality $m_j(\Pi_\lambda)\ge\lambda^j$, so the lower bound gives $c_{2j}(\lambda)\ge\lambda^{-1}m_j(\Pi_\lambda)$. Since $\Pi_\lambda$ has unbounded support, $m_j(\Pi_\lambda)^{1/j}\to\infty$, and therefore $c_{2j}(\lambda)^{1/(2j)}\to\infty$. \end{proof} The factor $2$ comes from the two families of partitions in the proof. % End papers/redei/src/r1_03b_moments.tex % Begin papers/redei/src/03_quotient_occupancy_extremes.tex \subsection{Large eigenvalues from repeated labels} \label{sec:occupancy-extremes} % Primary inputs: TroppSubmatrices Thm1.1; TroppBernstein Thm6.1(ii). \begin{theorem}[Extreme eigenvalues and label counts] \label{thm:occupancy-extremes} \label{cor:occupancy-location-scale} Suppose $N=2^s\to\infty$ and $\lambda_r=r/N\ge(\log N)^{-\beta}$ for fixed $0<\beta<1$. Let $b_N>\lambda_r$ be the unique solution of \[ b_N\log(b_N/\lambda_r)-b_N+\lambda_r=\log N. \] For the actual maximum occupancy $\ell_r$ of Section~\ref{sec:uniform}, \[ \frac{\ell_r}{b_N}\longrightarrow1,\qquad \frac{\lambda_{\max}(K)}{\sqrt{r b_N}}\longrightarrow1,\qquad \frac{\lambda_{\min}(K)}{\sqrt{r b_N}}\longrightarrow-1 \quad\text{in probability}. \] The conclusions are uniform in the invertible symmetric quotient form $B$. \end{theorem} \begin{proof} Use the kernel $U$ of \eqref{eq:quotient-occupancy}. We first replace the actual sample by $r$ independent uniform rows, with occupancy matrix $D$ and $\ell=\max_aD_a$; the source corrections are paid below. It suffices to locate the extremes of $D^{1/2}UD^{1/2}$. We use the following consequence of Tropp's principal restriction bound \cite[Theorem~1.1]{TroppSubmatrices}. For a Bernoulli coordinate projector $P$ of density $p$ and $q\ge2\log N$, \begin{equation} \bigl(\mathbb E\|PUP\|^q\bigr)^{1/q} \le C\{qN^{-1/2}+\sqrt{pq}+p\}+N^{-1/2}. \label{eq:occupancy-flat-restriction} \end{equation} Indeed the off-diagonal part of $U$ has maximum entry $N^{-1/2}$, maximum column norm at most one and operator norm at most two. If $p\le(\log N)^{-10}$, choosing $q=A\log N$ gives $\|PUP\|\le C_A(\log N)^{-4}$ with failure at most $N^{-A}$. \emph{Poisson occupancies.} For now assume $(\log N)^{-\beta}\le\lambda_r\le(\log N)^2$ and let the $D_a$ be independent Poisson variables of mean $\lambda=\lambda_r$. All operator events below have failure $O(N^{-3})$; constants may depend on $\beta$ and can be fixed uniformly on this entire range of $\lambda$. First suppose $\lambda\le\sqrt{\log N}$. Set $t=\lceil C_0(\lambda+\log\log N)\rceil$ with fixed $C_0$ large, $H=\{a:D_a>t\}$, $L=H^c$. Poisson Chernoff gives $p:=\Pr(a\in H)\le(\log N)^{-10}$. With the stated failure bound, \begin{equation} \alpha:=|H|/N\le(\log N)^{-8},\qquad \frac{\log N}{4(1+\beta)\log\log N}\le\ell\le \frac{10\log N}{\log\log N},\qquad \|U_{HH}\|\le C(\log N)^{-4}. \label{eq:occupancy-small-mean-good} \end{equation} The cardinality bound is scalar Chernoff. For the lower load bound, monotonicity reduces to mean $(\log N)^{-\beta}$; the probability of one box having the displayed load is $N^{-1/4+o(1)}$. Independence then pays the failure. The upper Poisson tail is uniform for $\lambda\le\sqrt{\log N}$. The restriction bound is \eqref{eq:occupancy-flat-restriction}. Conditional on $H$, the low occupancies are independent, bounded by $t$, with mean $\mu_t$ and variance at most $2\lambda$. By Cauchy--Schwarz, $|\mu_t/\lambda-1|\le2\sqrt{p/\lambda}=o(1)$ uniformly. For the variance, center first at the unconditioned mean: $\operatorname{Var}(D_a\mid D_a\le t) \le\lambda/\Pr(D_a\le t)$. Put $u_a=P_HUe_a$, so $\|u_a\|^2=\alpha$ exactly. Then \[ Q=P_HUD_LUP_H=\sum_{a\in L}D_a u_a u_a^{\mathsf T},\qquad \mathbb E[Q\mid H]=\mu_t(I_H-U_{HH}^2). \] The centered summands have norm at most $t\alpha$ and total variance at most $2\lambda\alpha$. Matrix Bernstein \cite[Theorem~6.1(ii)]{TroppBernstein}, in both signs at $\delta=\lambda/\log N$, gives the conditional failure bound \[ 2N\exp\!\left[-\frac{\delta^2} {2(2\lambda\alpha+t\alpha\delta/3)}\right] \le2N\exp\{-c_1(\log N)^{6-\beta}\}. \] Here $t/\log N\to0$ uniformly on this range. Thus $Q=\lambda(I_H+o(1))$ in operator norm. For $C_H=D_H^{1/2}U_{HL}D_L^{1/2}$ this yields \[ (1-o(1))\lambda D_H\preccurlyeq C_HC_H^{\mathsf T} \preccurlyeq(1+o(1))\lambda D_H. \] The largest occupancy belongs to $H$ eventually, so $\|C_H\|\sim\sqrt{\lambda\ell}$. The two diagonal blocks of $D^{1/2}UD^{1/2}$ have norms at most $\ell\|U_{HH}\|$ and $t$. Both are $o(\sqrt{\lambda\ell})$: the first costs at most $C(\log N)^{-4+(1+\beta)/2}/\sqrt{\log\log N}$ relatively, while \[ \frac{t^2}{\lambda\ell}\ll_\beta \frac{\log\log N}{\sqrt{\log N}}+ \frac{(\log\log N)^3}{(\log N)^{1-\beta}}\longrightarrow0. \] The off-diagonal block matrix has extremes $\pm\|C_H\|$, proving both signed estimates in this range. Now suppose $\sqrt{\log N}\le\lambda\le(\log N)^2$. Set $\delta=(C_2\log\log N/\lambda)^{1/2}=o(1)$, and take $H=\{a:|D_a-\lambda|>\delta\lambda\}$. Scalar Chernoff with $C_2$ large again gives $p\le(\log N)^{-10}$. Outside an event of probability $O(N^{-3})$, \[ h:=|H|\le N(\log N)^{-8},\quad \|U_{HH}\|\le\varepsilon_N=C(\log N)^{-4},\quad \ell\le C_3(\lambda+\log N). \] Let $D_0$ agree with $D$ on $H$ and equal $\lambda I$ on $L$. Since $D_L/\lambda=I+O(\delta)$, and $L$ is nonempty, $\ell\ge(1-\delta)\lambda$ and \begin{equation} \|D^{1/2}UD^{1/2}-D_0^{1/2}UD_0^{1/2}\| \le C\delta\sqrt{\lambda\ell}. \label{eq:occupancy-low-replacement} \end{equation} There is a useful exact block description of $U$. Write $A=U_{HH}$, $S=(I-A^2)^{1/2}$ and $W=S^{-1}U_{HL}$. Then $WW^{\mathsf T}=I_H$ and $U_{LL}W^{\mathsf T}=-W^{\mathsf T}A$. In the orthogonal decomposition $H\oplus\operatorname{ran}W^{\mathsf T}\oplus\ker W$, \[ U=\begin{pmatrix}A&S&0\\S&-A&0\\0&0&V\end{pmatrix}, \qquad V=V^{\mathsf T},\quad V^2=I,\quad\operatorname{tr}V=\operatorname{tr}U. \] Replace the first two blocks by $\left(\begin{smallmatrix}0&I\\I&0\end{smallmatrix}\right)$ to obtain an involution $U_0$ with $\|U-U_0\|\le2\varepsilon_N$. As $D_0=\lambda I$ on the low space, the spectrum of $D_0^{1/2}U_0D_0^{1/2}$ consists exactly of $\pm\sqrt{\lambda D_a}$, $a\in H$, and the spectrum of $\lambda V$. Both signs of $V$ occur for large $N$, because $\dim V=N-2h=N-o(N)$ and $|\operatorname{tr}V|\le\sqrt N$. Its extremes are consequently \[ \pm\max\{\lambda,\sqrt{\lambda\max_{a\in H}D_a}\} =\pm(1+O(\delta))\sqrt{\lambda\ell}. \] For $H=\varnothing$ interpret the inner maximum as zero. The remaining perturbation has norm at most $C\varepsilon_N\ell=o(\sqrt{\lambda\ell})$, since $\ell/\lambda\ll1+\log N/\lambda\ll\sqrt{\log N}$. Together with \eqref{eq:occupancy-low-replacement}, Weyl proves both extreme estimates on this second range. The sum of the Poisson occupancies has mean $r$ and equals $r$ with probability $\asymp r^{-1/2}\gg N^{-1/2}(\log N)^{-1}$. Conditioning therefore preserves the preceding high-probability operator statements and gives exactly the multinomial law of the iid row sample. For $\lambda_r\ge(\log N)^2$, work directly with the multinomial sample. Chernoff with $\eta=(\log N/\lambda_r)^{1/4}=o(1)$ gives $\max_a|D_a/\lambda_r-1|=o_{\Pr}(1)$. Hence $D^{1/2}UD^{1/2}=\lambda_r U+o_{\Pr}(\lambda_r)$ and $\ell\sim\lambda_r$. Since $U$ has both signs, this proves both extreme estimates here as well. In all ranges the factor $\lambda_r^{-1/2}$ leaves the kernel extremes equal to $\pm(1+o_{\Pr}(1))\sqrt{r\ell}$ before normalization. The load bounds show that the largest occupancy tends to infinity throughout the stated range. Deleting the sign diagonal changes the norm by at most one. Replacing one iid row vector by the required sum changes its row and column by operator norm at most $2\sqrt r$, and changes the largest occupancy by at most one. These errors are $o(\sqrt{r\ell})$. Finally full-column-rank conditioning has failure at most $N2^{-r+1}=o(1)$, since $r\ge N/(\log N)^\beta$. All estimates are uniform in $B$. \emph{Deterministic normalization.} First use the fixed iid row sample; its last-row correction changes the maximum by at most one. Put $F(x)=x\log(x/\lambda_r)-x+\lambda_r$, so $F(b_N)=\log N$. First suppose $\lambda_r\le C\log N$; then $b_N=O_C(\log N)$. For fixed $0<\varepsilon<1$, convexity gives \[ F((1+\varepsilon)b_N)\ge(1+\varepsilon)\log N. \] Indeed $b_NF'(b_N)=b_N\log(b_N/\lambda_r)\ge F(b_N)$. A binomial Chernoff union bound proves the upper occupancy bound. If $(1-\varepsilon)b_N\le\lambda_r$, the lower bound follows from $\ell_r\ge\lambda_r$ for a fixed sample. Otherwise write $(1-\varepsilon)b_N=(1-a)\lambda_r+ab_N$, where $a\le1-\varepsilon$. Convexity now gives $F((1-\varepsilon)b_N)\le(1-\varepsilon)\log N$. For $u=\lfloor(1-\varepsilon)b_N\rfloor$, Stirling's formula gives $N\Pr(D_1=u)\ge N^{\varepsilon+o(1)}$. Moreover, exactly, \[ \frac{\Pr(D_1=u,D_2=u)}{\Pr(D_1=u)^2} =\frac{(r-u)!^2}{r!(r-2u)!} \frac{(1-2/N)^{r-2u}}{(1-1/N)^{2r-2u}}=1+o(1). \] The error is $O_C((\log N)^{2+\beta}/N)$ uniformly here. The second moment of the number of boxes of occupancy $u$ therefore proves the lower bound. When $\lambda_r/\log N\to\infty$, Chernoff gives $\max_a|D_a/\lambda_r-1|\to0$ in probability, whereas the defining equation implies $b_N/\lambda_r\to1$. These two alternatives cover every subsequence. Changing the last row and conditioning on full span have the negligible costs already proved. \end{proof} In particular, if $\lambda_r/\log N\to\gamma\in(0,\infty)$, then $b_N/\lambda_r\to u_\gamma>1$, where $u_\gamma\log u_\gamma-u_\gamma+1=1/\gamma$. If $\lambda_r/\log N\to\infty$, then $b_N/\lambda_r\to1$. For $\lambda_r$ bounded above and away from zero, $b_N\sim\log N/\log\log N$. If $\lambda_r\sim C(\log N)^{-\alpha}$ with $C>0$ and $0<\alpha<1$, then $b_N\sim\log N/((1+\alpha)\log\log N)$ (apply the theorem with any $\beta>\alpha$). The special cases follow directly from the defining equation. \begin{corollary}[Nearly equal label counts] \label{thm:small-quotient} If $N(s+1)=o(r)$, precisely $N$ eigenvalues of $K$ lie outside $[-1,1]$ with probability tending to one. Uniformly over their indices, they are $(1+o_{\Pr}(1))r/\sqrt N$ or $-(1+o_{\Pr}(1))r/\sqrt N$, with respective multiplicities \[ (m_+,m_-)= \begin{cases} ((N+\sqrt N)/2,(N-\sqrt N)/2),&B\text{ alternating},\\ (N/2,N/2),&B\text{ nonalternating}. \end{cases} \] This includes bounded $N$ and $s=0$; the other $r-N$ eigenvalues stay in $[-1,1]$. \end{corollary} \begin{proof} The first $n=r-1$ rows are iid before full-span conditioning, whose cost is at most four; the last row adds one occupancy. Thus Chernoff gives \[ \Pr\!\left(\max_a|D_a-r/N|>un/N+1\right) \le8N e^{-u^2n/(3N)}\qquad(0un/N+1)\le8Ne^{-u^2n/(3N)}$ for $03\log2$. The right side is then at most $8\cdot2^se^{-C^2(s+1)n/(3r)}$, which tends to zero because $N\to\infty$. Hence $\|E\|=O_{\Pr}(\sqrt{N(s+1)/r})=o_{\Pr}(1)$. The occupancies of the first $r-1$ labels are binomial before the spanning condition, which costs $o(1)$. Their mean is $(r-1)/N=r/N+O(1)$, so we write $\mu=r/N$ for the deviation estimate. For a deviation $u=(1\pm\epsilon)\sqrt{2\mu\log N}$ the binomial upper-tail logarithm is $-(1+o(1))u^2/(2\mu)$. The upper bound is Chernoff's inequality. For the lower bound tilt the binomial to mean $\mu+u+3\sqrt{\mu}$ and retain the interval of radius $2\sqrt{\mu}$ about that mean. Its tilted probability is bounded below, and undoing the tilt adds $O(u/\sqrt{\mu}+1)$ to the logarithmic cost. The quadratic expansion of binomial relative entropy applies since $u=o(\mu)$ and $N\to\infty$. For the upper threshold apply a union bound. For the lower threshold the expected number of exceedances tends to infinity and its variance is at most its mean. Indeed, conditioning on one occupancy, the other has a binomial law with a number of trials decreasing in the conditioned value. The last label changes the maximum occupancy by at most one. Hence $\max_aE_a=(1+o_{\Pr}(1))\sqrt{2N\log N/r}$. As in the previous proof, $\lambda_{\max}(A)\le1+\lambda_{\max}(P_+EP_+) +O(\|E\|^2)$, and a compression of $E$ has largest eigenvalue at most $\max_aE_a$. For the lower bound let $a$ maximize $E_a$ and take $x=P_+e_a/\|P_+e_a\|$. Then $x^{\mathsf T}Ax=1+x^{\mathsf T}Ex +O(\|E\|^2)$. Here $\|P_+e_a\|^2=(1+U_{aa})/2$, $(P_+)_{ac}^2=1/(4N)$ for $c\ne a$, and $\sum_cE_c=0$, so \[ x^{\mathsf T}Ex=\frac{(P_+)_{aa}^2E_a-E_a/(4N)}{(1+U_{aa})/2} =\bigl(\tfrac12+O(N^{-1/2})\bigr)E_a . \] Multiply by $r/\sqrt N$. The second-order term is $O_{\Pr}(\sqrt N(s+1))$, which is $o(\sqrt{r\log N})$, and $\Delta$ costs at most one. At $-1$ the same site is used. Since $P_-HP_-=-P_-EP_-+O(\|E\|^2)$, one has $\lambda_{\min}(A)\ge-1-\lambda_{\max}(P_-EP_-)-O(\|E\|^2) \ge-1-\max_aE_a-O(\|E\|^2)$. For the other direction take $x=P_-e_a/\|P_-e_a\|$ with the same maximizing $a$. Now $\|P_-e_a\|^2=(1-U_{aa})/2$ and $(P_-)_{ac}^2=1/(4N)$ for $c\ne a$, so again $x^{\mathsf T}Ex=(\frac12+O(N^{-1/2}))E_a$ and $x^{\mathsf T}Ax=-1-x^{\mathsf T}Ex+O(\|E\|^2)$. Both extremes are thus governed by the most occupied label, as in Theorem~\ref{thm:occupancy-extremes}. \end{proof} The proposition leaves a factor two. Treating $P_+$ as a free projection of trace one half suggests that the lower constant is the true one; we do not prove this. % End papers/redei/src/r1_03c_outliers.tex % Begin papers/redei/src/r1_03d_observed_blocks.tex \subsection{Gaussian edge laws for observed blocks} \label{sec:compression} \label{sec:edge} The GOE edge process describes the limiting eigenvalues near one end of the spectrum of a real symmetric Gaussian matrix. Its largest point has law $\mathrm{TW}_1$. Put $\mathfrak c(m)=m^{1/3}(\log m)^{3/2}$. \begin{theorem}[Joint limits for observed blocks] \label{thm:fixed-edge} Let $K$ have the law conditioned on binary rank $s=r-k-1$. Fix a deterministic set $A\subseteq[r]$ and any positive-probability event $\mathcal C$ determined by $B$ and the labels in $A$; arbitrary feasible conditions on the internal signs of $A$ are allowed. For fixed $b$, take deterministic sets $I_1,\ldots,I_b\subseteq[r]\setminus A$ with $|I_i\cap I_j|\le1$ for $i\ne j$. Put $m_j=|I_j|$ and assume $m_j\to\infty$ and $\sum_j\mathfrak c(m_j)=o(s)$. Conditional on $\mathcal C$, the $2b$ processes \[ \Xi_j^\pm=\sum_{\xi\in\operatorname{Spec}K_{I_j,I_j}} \delta_{m_j^{1/6}(\pm\xi-2\sqrt{m_j})} \] converge jointly to independent GOE edge processes, and their largest points to independent $\mathrm{TW}_1$ variables. The conclusions are uniform over feasible $\mathcal C$, however small its probability, and over the invertible quotient form $B$. Block sizes need not be comparable. Without the additional condition, the limits hold jointly with the global approximations in Theorems~\ref{thm:bulk-crossover} and~\ref{thm:occupancy-extremes} whenever their hypotheses apply. \end{theorem} The proof in \hyperref[sec:revised-edge-proof]{[7, Section~S5]} compares Chebyshev approximations to high trace powers using Proposition~\ref{prop:quotient-character}. % End papers/redei/src/r1_03d_observed_blocks.tex % Begin papers/redei/src/04_arithmetic_model.tex \section{Quadratic fields} \label{sec:arithmetic} The preceding results concern a finite ensemble. We now use arithmetic equidistribution to transfer its GOE law to quadratic fields. The comparison retains its absolute error before any rank selection. Let \[ \mathcal D(X)=\{10$, $q=S(\Omega)$, and $b=|S-T|(\Omega)$, the total absolute error before normalization. If $b0$ and \[ |q-p|\le b,\qquad d_{\rm TV}(S/q,T/p)\le b/p. \] In particular, for probability laws $P,Q$ and a measurable weight $0\le h\le1$, use $S=hP$, $T=hQ$ and $b(h)=\int h\,|dP-dQ|$, with $p=Qh$. The following are sufficient error estimates. Here, for $f=dP/dQ$, define $D_{\chi^2}(P\Vert Q)=\int(f-1)^2\,dQ$. \[ \begin{array}{c|c|c} \text{input}&b(h)\text{ bound}&\text{sufficient condition}\\ \hline d_{\rm TV}(P,Q)\le\epsilon&2\epsilon&\epsilon=o(p)\rule{0pt}{2.4ex}\\ D_{\chi^2}(P\Vert Q)\le D&\sqrt{pD}&D=o(p)\\ |dP/dQ-1|\le\epsilon&\epsilon p&\epsilon=o(1). \end{array} \] All statements hold after restriction to the sigma-algebra of the observables actually being transferred. \end{proposition} \begin{proof} The mass bound is immediate. Since $q\ge p-b>0$, \[ \left|\frac pqS-T\right|(\Omega) \le |S-T|(\Omega)+|p-q|\le2b. \] Division by $2p$ proves the assertion. For the three budgets use, respectively, the variation norm, Cauchy--Schwarz in the form $\int h|f-1|\,dQ\le\sqrt{Qh\int h(f-1)^2dQ}$, and the pointwise density bound. Thus every application uses its true normalizing mass, and a small conditioning event is charged only to the extent required by the available error. \end{proof} Measurable observation maps cannot increase total variation. Thus the same budget applies to a spectral measure, a collection of blocks or a graph-zeta statistic, once the corresponding reference law is known. The analytic input remains family-specific: CKMP supplies the absolute error below, while the companion proves a relative-pattern estimate on the uniformly relabelled rough-prime family. % End papers/redei/src/04_normalized_comparison.tex % Begin papers/redei/src/04_arithmetic_application.tex \subsection{Residue symbols on boxes} \label{sec:boxwise} All CKMP numbering refers to the published version \cite{CKMP}. We first check its pattern estimate for the full matrix, including the dyadic row; the ensuing averaging must retain an absolute error. \begin{lemma}[Pattern comparison] \label{lem:ckmp-applicability} \label{lem:boxwise-transfer} In \cite[Theorem~5.9]{CKMP}, replace the printed hypotheses $k_2>D_1$ and $\log t_{k_1}5+c_7/c_9$, $c_2>0$ small, $c_1=c_2/4$, $c_4=c_2/10$, $c_5=c_2$, $c_6>3$, and $c_{10}>0$ sufficiently small. Thus $c_2c_3+3c_4+c_5<1/4$. The full singleton cutoff of Definition~5.12 has $D_1k_1$; if $j_i\le r$, then $\ell_i=O(\log\mu)$, $j_i\gg\log\mu$, and regularity or monotonicity gives $\ell_{j_i}>c_6\ell_i$, as required for spacing. Apply the pattern estimate with all pairs $\mathcal M=\{(i,j):i0$, \begin{equation}\label{eq:quantitative-event-transfer} \|\mu_X-\nu_X\|_{\rm inv}\le CT_X^{-\rho}. \end{equation} The invariant events may depend on both $X$ and $r$. \end{proposition} \begin{proof} CKMP's Theorems~4.1, 5.14 and the above parameters give uniform box error $O(T_X^{-\rho_0})$ and discarded counts $G_r$ with $\sum_{r\in\mathcal R_X}G_r\ll\Phi(X)T_X^{-\rho_0}$, for some $\rho_0>0$. These estimates concern full sign patterns and hence are independent of the chosen event. Apply the two preceding results with $\delta_r=\Pr(W_r\in\mathcal A_{r,X})$. The discrepancy in size $r$ is at most $O(T_X^{-\rho_0}\Phi_r(X)+G_r+B_r)$, where $B_r=\Phi_r(X)-\Phi_r(X(1-C_1/\log D_1))$. The endpoint estimate on p.~32 gives $\sum_rB_r\ll\Phi(X)/\log D_1$, and Equation~(4.2) gives $\eta_X:=\sum_{r\notin\mathcal R_X}w_{X,r} \ll e^{-cT_X^{1/3}}$. Sum these bounds and take $\rho\le\min(\rho_0,c_9)$. No division by $\Phi_r(X)$ is used. \end{proof} \begin{lemma}[Symmetric-corank probabilities] \label{lem:moving-corank-mass} For a uniform symmetric binary $n\times n$ matrix, its corank probabilities satisfy, uniformly for $0\le k\le n$, $a_-2^{-k(k+1)/2}\le p_{n,k}\le a_+2^{-k(k+1)/2}$ for absolute $a_\pm>0$. In particular $\Pr(\kappa\ge K)\ll2^{-K(K+1)/2}$, and each fixed $k$ has a positive limiting probability. \end{lemma} \begin{proof} Counting radicals and invertible quotients gives, for $m=n-k$, \[ p_{n,k}=2^{-k(k+1)/2} \prod_{j=1}^{\lceil m/2\rceil}(1-2^{1-2j}) \frac{\prod_{j=m+1}^n(1-2^{-j})} {\prod_{j=1}^k(1-2^{-j})} \] \cite[proof of Theorem~5.16]{CKMP}. Empty products equal one; the corresponding infinite products are positive. The bounds, tail sum and fixed-$k$ limits follow. \end{proof} \begin{corollary}[Event transfer] \label{thm:global-transfer} \label{cor:fixed-corank-transfer} If invariant events $\mathcal A_r$ have Wigner probabilities tending to $L$, their arithmetic probabilities tend to $L$; the same holds for uniformly bounded invariant observables. For fixed $k$, the corresponding conditional assertion holds whenever the Wigner limit given $\kappa(R)=k$ exists, with arithmetic conditioning $\operatorname{rk}_4\operatorname{Cl}^+(d)=k$. \end{corollary} \begin{proof} Apply the comparison with $r\asymp T_X$ off mass $\eta_X=o(1)$. Level sets give bounded observables; fixed-corank conditioning divides by a positive limiting mass, using $\operatorname{rk}_4\operatorname{Cl}^+(d)=\kappa(R_d)$ also for even $d$ \cite[proof of Theorem~5.16]{CKMP}. \end{proof} \begin{theorem}[Rank-weighted arithmetic universality] \label{thm:weighted-rank-transfer} For arbitrary $h_X(r,k)\in[0,1]$, set \[ p_X=\sum_{r\ge1}w_{X,r}\sum_{k=0}^{r-1}h_X(r,k)p_{r-1,k}. \] If $T_X^\rho p_X\to\infty$, the probability law on $\mathcal D(X)$ proportional to $h_X(r(d),\operatorname{rk}_4\operatorname{Cl}^+(d))$ has the joint independent GOE edge-process and independent $\mathrm{TW}_1$ extreme-value limits of Theorem~\ref{thm:fixed-edge}, with its $r^{1/6}$ scaling and centering at $2\sqrt r$. For any bounded continuous test $F$ of either pair and $|a_X(r,k)|\le1$, \[ \mathbb E_h[a_XF]-\mathbb E_h[a_X]\mathbb E F_\infty\longrightarrow0. \] \end{theorem} \begin{proof} Put $h=h_X(r,\kappa(R))$ and $\epsilon_X=CT_X^{-\rho}$. Layer cake gives $|\mu_X(h)-p_X|\le\epsilon_X$. Proposition~\ref{prop:normalized-comparison}, on the invariant algebra, therefore makes the true normalizer positive and gives \begin{equation}\label{eq:conditional-mixture-error} \|\mu_X^h-\nu_X^h\|_{\rm inv} \le\frac{2\epsilon_X}{p_X}=o(1). \end{equation} Choose $K_X=\lceil\sqrt{2(\rho+2)\log T_X/\log2}\rceil$. The previous lemma bounds the $\nu_X^h$-mass of $r\notin\mathcal R_X$ or $k>K_X$ by \[ O\left(\frac{e^{-cT_X^{1/3}}+T_X^{-\rho-2}}{p_X}\right)=o(1). \] For the remaining indices $r\asymp T_X$ and $k=O(\sqrt{\log T_X})$, Theorem~\ref{thm:fixed-edge} is uniform: a violating subsequence would satisfy its quotient-growth hypothesis. Average with the exact posterior weights $w_{X,r}h_X(r,k)p_{r-1,k}/p_X$, then apply \eqref{eq:conditional-mixture-error} and the R\'edei identity. The argument remains valid after multiplication by bounded $a_X$, giving the asserted decorrelation. \end{proof} \begin{corollary}[Arithmetic spectral laws] \label{cor:unconditioned-laws} \label{cor:fixed4} \label{cor:moving-corank-transfer} Unconditionally, $K_d/\sqrt{r(d)}$ has limiting semicircle measure and norm tending to $2$ in arithmetic probability, and its two edge processes and extremes have the independent GOE and $\mathrm{TW}_1$ limits above. The edge conclusions also hold after conditioning on $\operatorname{rk}_4\operatorname{Cl}^+(d)=k_X(r(d))$ for any nonnegative integer profile with \[ \max_{r\in\mathcal R_X}k_X(r)(k_X(r)+1) \le c_0\log\log\log X, \] where $c_0>0$ is absolute. This includes every fixed $4$-rank. \end{corollary} \begin{proof} For the unconditioned empirical measure and norm, apply event transfer to the Wigner laws \cite{BY}; take $h_X\equiv1$ for the edges. Choose $c_0<2\rho/\log2$ and $\alpha=c_0\log2/2<\rho$. The corank-mass bound gives $p_X\gg(1-\eta_X)T_X^{-\alpha}$ for $h_X(r,k)=\mathbf1_{\{k=k_X(r)\}}$. The weighted theorem applies. \end{proof} % End papers/redei/src/04_arithmetic_application.tex % Begin papers/redei/src/r1_04_independence.tex \begin{corollary}[The edge is independent of a bounded $4$-rank] \label{cor:rank-edge-independence} Let $\alpha_k=\lim_np_{n,k}$ be the limiting corank probabilities of Lemma~\ref{lem:moving-corank-mass}, and let $F_1$ be the distribution function of $\mathrm{TW}_1$. For every fixed $k\ge0$ and real $t,t'$, the proportion of $d\in\mathcal D(X)$ with \[ \operatorname{rk}_4\operatorname{Cl}^+(d)=k,\qquad \frac{\lambda_{\max}(K_d)-2\sqrt r}{r^{-1/6}}\le t,\qquad \frac{-\lambda_{\min}(K_d)-2\sqrt r}{r^{-1/6}}\le t', \qquad r=r(d), \] tends to $\alpha_kF_1(t)F_1(t')$ as $X\to\infty$. In particular, among the discriminants whose largest Legendre eigenvalue lies in a fixed Tracy--Widom window of positive limiting probability, the $4$-rank has the same limiting distribution as in $\mathcal D(X)$. \end{corollary} \begin{proof} The event $\operatorname{rk}_4\operatorname{Cl}^+(d)=k$ has limiting density $\alpha_k>0$ by Corollary~\ref{cor:fixed-corank-transfer} and Lemma~\ref{lem:moving-corank-mass}. Conditionally on it, Corollary~\ref{cor:moving-corank-transfer} with the constant profile $k_X\equiv k$ gives independent $\mathrm{TW}_1$ limits for the two normalized extremes. Multiply. The last assertion is Bayes' rule. \end{proof} % End papers/redei/src/r1_04_independence.tex % Begin papers/redei/src/r1_05_rough.tex \section{Rough discriminants at every 4-rank} \label{sec:rough-all-ranks} To condition on ranks whose model probabilities lie below the absolute error in \eqref{eq:quantitative-event-transfer}, we use a relative comparison. Put $L=\log\log X$ and $e=\binom r2$. Fix $01$ assume \begin{equation} \log y\le L^B,\qquad\frac{\log y-Y_r}{\log L}\longrightarrow\infty . \label{eq:rough-cutoff} \end{equation} Let $\mathcal D^{\rm rough}(X;y)$ be the set of squarefree $d\le X$ with exactly $r$ prime factors, all exceeding $y$ and congruent to $1$ modulo $4$, and let $a_X$ be its cardinality. In the typical window, $y=(\log X)^{64}$ is admissible. Let $\widetilde\mu_{X,y}$ be the law of $K_d$ on this family after independently permuting the prime labels uniformly, and let $U_r$ be the law of $W_r$. \begin{theorem}[Relative pattern comparison {\hyperref[thm:rough-law]{[7, Theorem~S1.1]}}] \label{thm:relative-pattern} Under \eqref{eq:rough-cutoff}, uniformly in the indicated range of $r$, \[ \epsilon_{X,y}:=\max_\tau\bigl|2^e\,\widetilde\mu_{X,y}(\tau)-1\bigr| \longrightarrow0, \] the maximum being over all symmetric sign patterns $\tau$ with zero diagonal. Consequently, for every event $C$ with $p=U_r(C)>0$, \[ \widetilde\mu_{X,y}(C)=p\{1+O(\epsilon_{X,y})\},\qquad d_{\rm TV}\bigl(\widetilde\mu_{X,y}(\cdot\mid C),U_r(\cdot\mid C)\bigr) \le\frac{\epsilon_{X,y}}{1-\epsilon_{X,y}}, \] uniformly in $C$, however small $p$ is. \end{theorem} The proof in \cite{Companion} expands the indicator of a pattern into products of Legendre symbols over independent prime variables, bounds them with the bilinear estimate of Friedlander and Iwaniec \cite{FI}, and removes the cutoff $d\le X$ and repeated primes without a factor equal to the number of patterns. The consequence for events is Proposition~\ref{prop:normalized-comparison} with a pointwise density bound. For $N=2^s$ and $\lambda_r=r/N$ let $b_N>\lambda_r$ be the solution of $b_N\log(b_N/\lambda_r)-b_N+\lambda_r=\log N$, as in Theorem~\ref{thm:occupancy-extremes}. \begin{theorem}[The Legendre spectrum at every $4$-rank] \label{thm:rough-all-ranks} Assume \eqref{eq:rough-cutoff}. Let $k=k_X$ be integers with $0\le k_X\le r-1$, put $s=r-1-k_X$ and $N=2^s$, and let $d$ be uniform among the elements of $\mathcal D^{\rm rough}(X;y)$ with $\operatorname{rk}_4\operatorname{Cl}^+(d)=k_X$. \begin{enumerate} \item The number of such $d$ is $a_X\,p_{r-1,k_X}\{1+o(1)\}$, where $p_{r-1,k}\asymp2^{-k(k+1)/2}$ is the corank probability of Lemma~\ref{lem:moving-corank-mass}. It tends to infinity. \item With $\mathcal L_d=r^{-1}\sum_i\delta_{\lambda_i(K_d)/\sqrt r}$, one has $d_{\rm BL}(\mathcal L_d,\nu_{r/N})\to0$ in probability. \item If $s/\{r^{1/3}(\log r)^{3/2}\}\to\infty$, the two point processes $\sum_i\delta_{r^{1/6}(\pm\lambda_i(K_d)-2\sqrt r)}$ converge jointly to independent GOE edge processes. In particular $r^{1/6}(\lambda_{\max}(K_d)-2\sqrt r)$ and $r^{1/6}(-\lambda_{\min}(K_d)-2\sqrt r)$ converge to independent $\mathrm{TW}_1$ variables. \item If $s/(\log r\log\log r)\to\infty$, then $\lambda_{\max}(K_d)/\sqrt r\to2$ and $\lambda_{\min}(K_d)/\sqrt r\to-2$ in probability. \item If $N\to\infty$ and $r/N\ge(\log N)^{-\beta}$ for a fixed $0<\beta<1$, then \[ \frac{\lambda_{\max}(K_d)}{\sqrt{rb_N}}\longrightarrow1,\qquad \frac{\lambda_{\min}(K_d)}{\sqrt{rb_N}}\longrightarrow-1 \quad\text{in probability.} \] \item If $N(s+1)=o(r)$, with $N$ bounded or not, then with probability tending to one exactly $N$ eigenvalues of $K_d$ lie outside $[-1,1]$, each of them is $\pm(1+o(1))\,r/\sqrt N$, and \[ \operatorname{rk}_4\operatorname{Cl}^+(d) =r-1-\log_2\#\{i:|\lambda_i(K_d)|>1\} =r-1-\operatorname{round}\Bigl(2\log_2\frac{r}{\lambda_{\max}(K_d)}\Bigr). \] \item If $N=1$, the normalized shift of the largest eigenvalue tends to zero. If $N\ge2$ is fixed, $(\lambda_{\max}(K_d)-r/\sqrt N)/\sqrt r$ converges in distribution to the mixture, over a uniform invertible symmetric $B$, of the laws of $\theta_1$ in Theorem~\ref{thm:outlier-fluctuations}. If $N\to\infty$ and $N(s+1)=o(r)$, then $\lambda_{\max}(K_d)-r/\sqrt N$ lies between $(\frac12-o(1))\sqrt{2r\log N}$ and $(1+o(1))\sqrt{2r\log N}$ with probability tending to one. \end{enumerate} \end{theorem} \begin{proof} For these discriminants $\operatorname{rk}_4\operatorname{Cl}^+(d)$ is the excess corank $\kappa$ of the binary Laplacian of $K_d$, as in Section~\ref{sec:arithmetic}. The event $C=\{\kappa=k_X\}$ is invariant under simultaneous permutation of rows and columns, and $U_r(C)=p_{r-1,k_X}>0$. Theorem~\ref{thm:relative-pattern} gives the count in the first assertion. It tends to infinity because $a_X\ge X\exp\{-O_{B,c,C}(L)\}$ by the population estimate in \hyperlink{section.supp.3}{[7, Section~S3]}, while $p_{r-1,k}\gg2^{-r^2}=\exp\{-O(L^2)\}$. The same theorem bounds the total variation distance between the conditional law of the relabelled $K_d$ and $U_r(\cdot\mid\kappa=k_X)$ by $o(1)$. The latter is the law of the sign matrix of a uniform symmetric binary matrix with zero row sums and corank $k_X$, the model of Section~\ref{sec:uniform}. The spectrum does not depend on the labelling. Each remaining assertion says either that a permutation-invariant event has probability tending to one or that a function of the spectrum converges in distribution. Both kinds of statement survive an error $o(1)$ in total variation, so it suffices to quote the model. The second assertion is Theorem~\ref{thm:bulk-crossover}, which holds for every corank sequence. The third is Theorem~\ref{thm:fixed-edge} with $A=\varnothing$, $b=1$ and $I_1=[r]$. The fourth and fifth are Corollary~\ref{cor:sparse-edge-locations} and Theorem~\ref{thm:occupancy-extremes}. The last one is Theorem~\ref{thm:outlier-fluctuations}, averaged over the uniform form $B$ of Lemma~\ref{lem:quotient-representation}, and Proposition~\ref{prop:outlier-shift}. For the sixth, Corollary~\ref{thm:small-quotient} gives exactly $N$ eigenvalues outside $[-1,1]$, all equal to $\pm(1+o(1))\,r/\sqrt N$, and at least one of them is positive since $m_+\ge1$. Hence $\log_2\#\{i:|\lambda_i(K_d)|>1\}=s$ and $2\log_2(r/\lambda_{\max}(K_d))=s+o(1)$. \end{proof} \begin{remark}[Intermediate ranks] \label{rem:three-ranges} When $s=\log_2r+O(1)$, the two extremes have magnitude of order $\sqrt{r\log r/\log\log r}$. The sparse edge location is known throughout the range in item 4. Its fluctuation law remains open where that range extends beyond item 3. \end{remark} % End papers/redei/src/r1_05_rough.tex % Begin papers/redei/src/r1_06_small_primes.tex \section{Small prime factors, under the Riemann hypothesis for real characters} \label{sec:small-primes} Theorem~\ref{thm:rough-all-ranks} excludes prime factors below $y$. Two small primes have a fixed symbol, and for a fixed small prime $p$ and a prime $q$ of size about $y$ there is no second variable to average over. A comparison with relative error then needs $\sum_q(q/p)$ over a short range of primes to be smaller than the number of terms by a power of $\log X$, although $q$ is only of size $\exp((\log\log X)^{O(1)})$. This is a power saving in the prime number theorem for progressions. We assume it in the following form. \medskip \noindent\textbf{Hypothesis $\mathrm{GRH}_2$.} \emph{For every real primitive Dirichlet character $\chi$, the function $L(s,\chi)$ has no zero with real part larger than $1/2$.} \medskip Under $\mathrm{GRH}_2$, for a real nonprincipal character $\chi$ modulo $q$, real $t$ and $z\ge2$, \begin{equation} \sum_{p\le z}\chi(p)p^{-it}\ll\sqrt z\,\log^2\bigl(qz(|t|+2)\bigr), \label{eq:grh-prime-sum} \end{equation} Apply the explicit formula under GRH to the primitive inducing character in $L(s+it,\chi)$ \cite[Theorem~5.15]{IK}. Its analytic conductor is $O(q(|t|+2))$, and its logarithmic derivative has coefficients $\Lambda(n)\chi(n)n^{-it}$ at the unramified primes. Removing prime powers, using partial summation gives the prime sum for the primitive character. The imprimitive character omits at most $\omega(q)$ primes, which gives \eqref{eq:grh-prime-sum}. The real primitive case used here is covered by Alp\"oge's Dirichlet critical-line theorem \cite{Alpoge,Sutherland}. We state the input explicitly to identify the dependence of this section. \subsection{The comparison} Keep $L=\log\log X$, $cL\le r\le CL$, $e=\binom r2$ and the cutoff \eqref{eq:rough-cutoff}. In particular $r$ can lie in the typical window $|r-L/2|\le L^{2/3}$. Fix $J\ge1$ and let $h=h(X)$ be integers with $2^h\le L^J$. Let $\mathcal D^{\rm sm}(X;y,h)$ be the set of squarefree $d\le X$, all of whose prime factors are congruent to $1$ modulo $4$, with exactly $r$ prime factors exceeding $y$ and at most $h$ prime factors not exceeding $y$. Write $d=ab$, where $a=a(d)$ is the product of the prime factors not exceeding $y$, and put $g=\omega(a)$. Order the prime factors of $a$ by size and label those of $b$ by an independent uniform permutation. Then \[ K_d=\begin{pmatrix}K_a&C_d\\ C_d^{\mathsf T}&K_b\end{pmatrix}, \] where $K_a$ is determined by $a$, the $g\times r$ matrix $C_d$ holds the symbols between small and large prime factors, and $K_b$ is the Legendre matrix of the large ones. We fix the small-prime product $a$ when making the relative comparison. \begin{theorem}[Relative comparison with small prime factors] \label{thm:small-prime-comparison} Assume $\mathrm{GRH}_2$ and \eqref{eq:rough-cutoff}. There is $\epsilon^{\rm sm}_X\to0$ such that, for every squarefree $a$ with at most $h$ prime factors, all at most $y$ and congruent to $1$ modulo $4$, and for $d$ uniform in $\mathcal D^{\rm sm}(X;y,h)$ conditioned on $a(d)=a$, \[ \max_{\sigma,\tau}\Bigl|2^{\,gr+e}\Pr\bigl(C_d=\sigma,\ K_b=\tau \mid a(d)=a\bigr)-1\Bigr|\le\epsilon^{\rm sm}_X . \] The maximum is over all $\sigma\in\{\pm1\}^{g\times r}$ and all symmetric sign patterns $\tau$ of size $r$ with zero diagonal. The error is uniform in $a$ and $r$ in the stated ranges. \end{theorem} \begin{proof} We follow the proof of \hyperref[thm:rough-law]{[7, Theorem~S1.1]} with $X/a$ in place of $X$, and indicate the changes. Since $\log a\le h\log y=o(\log X)$, the parameter $L_a=\log\log(X/a)$ satisfies $L_a=L+o(1)$ uniformly. The population estimates of \hyperlink{section.supp.3}{[7, Section~S3]} apply with $r\asymp L_a$ and the same $y$: the lower cutoff changes by $31(L_a-L)=o(1)$ and the upper bound still holds with $B+1$. As there, each rough coordinate $p_i$ is uniform on the primes congruent to $1$ modulo $4$ in a cell $(z,\lambda z]$ with $z\ge y$ and $\lambda=1+r^{-\ell}$. Write $\mu_i$ for this measure and $P_i\gg z/(r^\ell\log z)$ for its population. Put $N_0=\exp(1)X/a$. \emph{Residue classes.} For a nonempty set $S$ of prime factors of $a$ let $\chi_S$ be the Jacobi symbol modulo $a_S=\prod_{p\in S}p$. On odd primes the restriction $\mathbf1_{p\equiv1\bmod4}\chi_S(p)$ is $\{\chi_S(p)+\chi_4(p)\chi_S(p)\}/2$. Both characters are real and nonprincipal, of modulus dividing $4a_S$. By \eqref{eq:grh-prime-sum}, partial summation and the lower bound for $P_i$, for $|t|\le T$ and $0\le\varsigma\le1$, \begin{equation} \bigl|\mathbb E_{\mu_i}\chi_S(p)\,p^{-\varsigma-it}\bigr| \le\vartheta:=C_\ell\,r^\ell y^{-1/2}\log^3(XT). \label{eq:small-prime-theta} \end{equation} Given the $i$th column $\sigma_i$ of $\sigma$, put \[ W_i(p)=\prod_{q\mid a}\bigl(1+\sigma_{qi}\,(p/q)\bigr) =1+\sum_{S\ne\varnothing}\sigma_{S,i}\,\chi_S(p). \] It equals $2^g$ if $p$ has the prescribed symbols and $0$ otherwise. Hence $\mathbb E_{\mu_i}W_i=1+\delta_i$ with $|\delta_i|\le2^g\vartheta$. Let $\nu_i=W_i\mu_i/(1+\delta_i)$, the uniform measure on the primes of the cell with the prescribed symbols. \emph{The bilinear estimate on the restricted cells.} The estimate of Friedlander and Iwaniec \cite[Lemma~2]{FI} allows arbitrary coefficients of modulus at most one. For functions $f,f'$ of modulus at most one, \[ \bigl|\mathbb E_{\nu_i\otimes\nu_j}f(p)B(p,p')f'(p')\bigr| =\frac{\bigl|\mathbb E_{\mu_i\otimes\mu_j}(fW_i)(p)B(p,p')(f'W_j)(p')\bigr|} {(1+\delta_i)(1+\delta_j)} \le\frac{4^g}{(1-2^g\vartheta)^2}\,\|T\|^{\mu}_{\infty\to1}, \] because $0\le W_i\le2^g$. The $L^1\to L^\infty$ norm is still at most one. Interpolation as in \hyperlink{equation.supp.6}{[7, Equation~(6)]} gives, for the kernels on $\nu_i\otimes\nu_j$, \[ \eta'\ll_\ell2^g\,r^\ell y^{-1/12}(\log X)^{19/12}+2^g/P_{\min}, \] where the last term is the cost of the artificial diagonal on the restricted cell, whose population is at least $2^{-g-1}P_{\min}$. Since $2^g\le L^J$, we have $r^22^r\eta'\to0$ under \eqref{eq:rough-cutoff}. \emph{The pattern count.} For patterns $(\sigma,\tau)$ put $Z_\tau=\prod_{i1\} =\omega(d)-1-\operatorname{round}\Bigl(2\log_2\frac r{\lambda_{\max}(K_b)}\Bigr). \] If $N\to\infty$ and $N(s+1)=o(r)$, the bounds of Proposition~\ref{prop:outlier-shift} hold for $\lambda_{\max}(K_b)$. All statements are uniform in $a$, and therefore hold for $d$ uniform in $\mathcal D^{\rm sm}(X;y,h)$ conditioned on its $4$-rank and on $\omega(a(d))=g$, for every $g\le h$. \end{theorem} \begin{proof} For these discriminants the $4$-rank is the excess corank $\kappa$ of the binary Laplacian of $K_d$. By Theorem~\ref{thm:small-prime-comparison} the law of $(C_d,K_b)$ given $a(d)=a$ has density $1+O(\epsilon^{\rm sm}_X)$ with respect to independent uniform signs. By Proposition~\ref{prop:normalized-comparison} with a pointwise density bound, the law given in addition $\kappa(K_d)=k$ is within $o(1)$ in total variation of the reference law conditioned on the same event; the event has positive reference probability because the arithmetic set is not empty. The reference law is the model on $g+r$ rows conditioned on rank $s$ and on the internal pattern $K_a$ of the rows in $A=\{1,\ldots,g\}$, and $K_b=K_{A^c}$. Section~\hyperref[sec:full-matrix-proof]{S6} of \cite{Companion} uses Lemma~\ref{lem:exposed-rows} to compare the large-prime block with the quotient model. It gives the empirical and edge limits, the count of large eigenvalues, and the growing-outlier bounds. Uniform relabelling of the large-prime indices preserves the spectrum. The eigenvalue count gives $s$, and $k=\omega(d)-1-s$. \end{proof} \subsection{The complete Legendre matrix} The complete matrix has the same empirical limit as $K_b$. The small-prime rows can change both extreme eigenvalues through the multiplicities of their labels. \begin{theorem}[Spectrum of the complete matrix] \label{thm:full-small-prime-spectrum} Keep the assumptions and notation of Theorem~\ref{thm:small-prime-spectrum}, put $n=r+g$, and write $E_+(K)=\lambda_{\max}(K)$ and $E_-(K)=-\lambda_{\min}(K)$. \begin{enumerate} \item At every feasible $4$-rank $k$, the empirical eigenvalue law of $K_d/\sqrt r$ approaches $\nu_{r/N}$ in bounded Lipschitz distance in probability. \item If $s/(\log r\log\log r)\to\infty$, then both $E_\pm(K_d)/\sqrt n$ tend to $2$ in probability. If $r^{1/3}(\log r)^{3/2}=o(s)$, the two edge point processes centred at $\pm2\sqrt n$ and scaled by $n^{1/6}$ converge jointly to independent GOE edge processes. \item Suppose $N\to\infty$ and $r/N\ge(\log N)^{-\beta}$ for fixed $0<\beta<1$. Partition the small-prime indices by the relation $i\sim j$ if $e_i+e_j\in\ker R_d$, and let $m_A(d)$ be the largest class size (zero if $g=0$). Then \[ E_\pm(K_d)=(1+o_{\Pr}(1))\sqrt{r\max\{b_N,\ r/N+m_A(d)\}} . \] In particular, with probability tending to one, each $E_\pm(K_d)$ is between $(1-o(1))\sqrt{rb_N}$ and $(1+o(1))\sqrt{r\max\{b_N,r/N+g\}}$. If $g=o(b_N)$, then both extremes have the same first-order magnitudes as for $K_b$. \item If $N(s+1)=o(r)$, then with probability tending to one there are exactly $N$ eigenvalues outside $[-1,1]$, all of magnitude $(1+o(1))n/\sqrt N$. In particular, \[ k=n-1-\log_2\#\{i:|\lambda_i(K_d)|>1\} =n-1-\operatorname{round}\left(2\log_2\frac{n}{E_+(K_d)}\right). \] For growing $N$, Proposition~\ref{prop:outlier-shift} holds with $n$ in place of $r$. At fixed $N$, centre the outliers at $\pm n/\sqrt N$ and divide the shifts by $\sqrt n$. Their law is asymptotic to the mixture of the Gaussian compression laws of Theorem~\ref{thm:outlier-fluctuations}, with each form $B$ weighted by the number of $g$-tuples of labels producing $K_a$. The two collections of shifts are viewed as finite point measures, and the weights may depend on $a=a_X$. \end{enumerate} These assertions are uniform over the prescribed small-prime parts and feasible ranks, with the indicated growth conditions on $r$ and $s$. \end{theorem} \begin{proof} The density comparison in the proof of Theorem~\ref{thm:small-prime-spectrum} holds for the full sign pattern. The difference of $K_d$ and $0_g\oplus K_b$ has rank at most $2g$. The rank inequality for empirical distribution functions gives the first assertion since $g=O(\log r)$. To pass to bounded Lipschitz distance, truncate using the bounded second moments of the two empirical laws. The extra mass at zero of $0_g\oplus K_b$ is $g/n$. For the remaining assertions, use Lemma~\ref{lem:exposed-rows}. In the sparse range, the exposed labels are linearly independent with probability tending to one, uniformly in the prescribed pattern. Products of signs involving unexposed rows then have the same comparison with independent signs as in the proof for $K_b$. The Wigner matrix in this comparison has the prescribed block on the first $g$ rows. Section~\hyperref[sec:full-matrix-proof]{S6} of \cite{Companion} proves the comparison and verifies the two edge limits for this reference. In the range of item 3 the equivalence classes are precisely the sets of equal labels by \eqref{eq:quotient-occupancy} and the argument following it. The $r$ independent draws have maximum occupancy asymptotic to $b_N$. On the at most $g$ labels that appear among the small primes, their occupancies are $r/N+o_{\Pr}(b_N)$ uniformly. Adding the exposed rows thus gives maximum occupancy asymptotic to $\max\{b_N,r/N+m_A(d)\}$. Section~\hyperref[sec:full-matrix-proof]{S6} of \cite{Companion} checks how the calculation of the two extremes changes when the extra rows concentrate on these labels. In the dense range $gN=o(r)$: if $s\le\frac12\log_2r$, use $N\le\sqrt r$, and otherwise use $g=O(s+1)$. The relative occupancy deviations, now centred at $n/N$, are $o_{\Pr}(1)$. Equation~\eqref{eq:quotient-occupancy} and Weyl's inequality give exactly $N$ outliers and the stated recovery formula. To compare shifts, couple the full sample with $r$ independent labels by replacing one draw with the required sum and adding the exposed rows. The quotient matrices differ in norm by $O_{\Pr}((g+1)\sqrt N)$, since their occupancies are comparable to $r/N$ in every class. For growing $N$ this is $o(\sqrt{r\log N})$ by the same split on $s$. At fixed $N$ its order is $o(\sqrt r)$, and the multinomial central limit theorem gives the Gaussian compression laws for each $B$. Before conditioning on span, each exposed label tuple has the same probability. The remaining labels fail to span with probability at most $N2^{-r+1}$ uniformly in the exposed tuple, so the mixture weights are as stated. \end{proof} \begin{example}[Small primes can change the extreme-eigenvalue scale] \label{ex:core-changes-edge} Take $r=\lfloor L/2\rfloor$, $s=\lfloor\log_2r\rfloor$ and $g=3s$, allowed with $J=4$. Prescribe the small-prime pattern in three groups of size $s$. In the binary encoding the cross block between the first two groups is $I_s$, and all off-diagonal entries touching the third group are zero. Complete the pattern by taking the Gram signs for $B=I_s$, with two copies of the standard basis and $s$ zero labels. In every rank-$s$ realization the first two groups are bases, by their cross block. All labels of the third group must therefore be zero. Each nonzero label has multiplicity at most two, so $m_A=s$ for large $s$. Here $r/N\in[1,2)$ and $b_N\sim\log r/\log\log r$. The extreme magnitudes of the complete matrix are asymptotic to $\sqrt{rs}$, whereas for the large-prime submatrix they are asymptotic to $\sqrt{rb_N}$. For an arithmetic realization, take $y=(\log X)^{64}$. Under $\mathrm{GRH}_2$ one can choose the $g$ primes successively in $(y/2,y]$, congruent to $1$ modulo $4$ and satisfying the prescribed symbols with earlier primes. The prime number theorem modulo $4$ gives the principal term, and expansion of the further restrictions into real characters gives \eqref{eq:grh-prime-sum} for their contribution. The relative error at each step is $O(2^g y^{-1/2}(g+1)^2\log^3y)=o(1)$, so there are enough primes to avoid repetitions. Reordering these primes by size preserves the pattern up to permutation. The prescribed pattern extends to binary rank $s$ by assigning zero labels to all large-prime rows: the two bases in this realization have sum zero together. There are $r$ distinct primes congruent to $1$ modulo $4$ in $(y,y^2]$ for large $X$, and their product with $a$ is at most $y^{g+2r}4$. The count cannot succeed for $N>n$. Otherwise $N\le n$ and the first $r-1$ free labels span with probability $1-o(1)$, uniformly in the exposed labels. Above the threshold a union bound shows that these draws already occupy all labels. Below it the number of empty labels outside the exposed set has mean $(N-|S|)(1-1/N)^{r-1}\to\infty$, where $S$ is the set of exposed labels and $|S|\le g$. The emptiness indicators have nonpositive pairwise covariances, so with probability tending to one at least two labels remain empty. The final label can fill at most one. At the threshold the number of empty labels after the independent draws converges to a Poisson variable of mean $e^{-c}$: its $j$th factorial moment is $(N)_j(1-j/N)^{r-1}\to e^{-jc}$ for each fixed $j$. The $g=O(\log N)$ exposed labels cover an empty label with probability at most $g(1-1/N)^{r-1}=o(1)$. Given that a label $x$ is empty, each free draw is uniform on $\mathbb F_2^s\setminus\{x\}$. Every nontrivial character has mean of absolute value $1/(N-1)$ for that law. Fourier inversion bounds the conditional probability that the final sum label equals $x$ by $N^{-1}+(N-1)^{-(r-1)}$, regardless of the exposed labels. Summing over empty labels shows that the final label fills one with probability $o(1)$. The probability that the Poisson limit is zero is $\exp(-e^{-c})$. \end{proof} The largest-eigenvalue rounding rule has a different range. At the threshold with $g=0$, Theorem~\ref{thm:rough-all-ranks}, item~5, gives $2\log_2(n/E_+(K_d))-s\to-\log_2 e$ in probability since $b_N/(r/N)\to e$. Rounding then gives $s-1$. % End papers/redei/src/r1_06_small_primes.tex % Begin papers/redei/src/r1_08_scope_and_bibliography.tex \section*{Acknowledgements and declarations} No external funding was received for this work. The author declares no competing interests. OpenAI Codex was used to develop ideas, explore and check arguments, perform symbolic and finite computations, check references, and draft and revise the text. The author is responsible for all mathematical and bibliographic claims. Finite computations do not prove the asymptotic statements. Anthropic Claude also assisted with project-internal reviews and numerical checks. These checks are not external peer review or formal verification. \begin{thebibliography}{99} \bibitem{Alpoge} L.~Alp\"oge, \emph{A remark on the Riemann hypothesis}, 20 November 2026, \href{https://alpo.ge/remark.pdf}{announcement and Lean source}. \bibitem{Sutherland} A.~V.~Sutherland, \emph{Verification files for the Lean proof of the Riemann hypothesis}, \href{https://math.mit.edu/~drew/grh/}{verification report}. \bibitem{AEKS} J.~Alt, L.~Erd\H{o}s, T.~Kr\"uger and D.~Schr\"oder, \emph{Correlated random matrices: band rigidity and edge universality}, Ann. Probab. \textbf{48} (2020), 963--1001. DOI: 10.1214/19-AOP1379. \bibitem{BB} K.~Bangachev and G.~Bresler, \emph{Random algebraic graphs and their convergence to Erd\H{o}s--R\'enyi}, Random Structures Algorithms \textbf{66} (2025), e21276. DOI: 10.1002/rsa.21276. Numbered references use \href{https://arxiv.org/abs/2305.04802v2}{arXiv:2305.04802}, version~2 (2023). \bibitem{BY} Z.~D.~Bai and Y.~Q.~Yin, \emph{Necessary and sufficient conditions for almost sure convergence of the largest eigenvalue of a Wigner matrix}, Ann. Probab. \textbf{16} (1988), 1729--1741. DOI: 10.1214/AOP/1176991594. \bibitem{CKMP} S.~Chan, P.~Koymans, D.~Milovic, and C.~Pagano, \emph{The 8-rank of the narrow class group and the negative Pell equation}, Forum Math. Sigma \textbf{10} (2022), e46. DOI: 10.1017/fms.2022.40. \bibitem{Companion} Z.~Gao, \emph{Supplement to Four-ranks of class groups and the spectrum of Legendre symbols}, 2026. \bibitem{EHR} L.~Erd\H{o}s, J.~Henheik and V.~Riabov, \emph{Cusp universality for correlated random matrices}, \href{https://arxiv.org/abs/2410.06813v2}{arXiv:2410.06813}, version~2 (2024). \bibitem{FI} J. Friedlander and H. Iwaniec, \emph{Ternary quadratic forms with rational zeros}, J. Th\'eor. Nombres Bordeaux \textbf{22} (2010), 97--113. \href{https://doi.org/10.5802/jtnb.706}{doi:10.5802/jtnb.706}. \bibitem{FK} \'{E}.~Fouvry and J.~Kl\"uners, \emph{On the negative Pell equation}, Ann. of Math. (2) \textbf{172} (2010), 2035--2104. DOI: 10.4007/annals.2010.172.2035. \bibitem{IK} H.~Iwaniec and E.~Kowalski, \emph{Analytic Number Theory}, Amer. Math. Soc. Colloq. Publ. \textbf{53}, American Mathematical Society, 2004. \bibitem{KP} P.~Koymans and C.~Pagano, \emph{Effective convergence of coranks of random R\'edei matrices}, Acta Arith. \textbf{212} (2024), 337--358. DOI: 10.4064/aa230318-4-1. \bibitem{NS} A.~Nica and R.~Speicher, \emph{Lectures on the Combinatorics of Free Probability}, London Math. Soc. Lecture Note Ser. \textbf{335}, Cambridge University Press, 2006. DOI: 10.1017/CBO9780511735127. \bibitem{ST} I.~Soloveychik and V.~Tarokh, \emph{On the spectral norms of pseudo-Wigner and related matrices}, arXiv:1708.04291 (2017). \bibitem{SXT} I.~Soloveychik, Y.~Xiang and V.~Tarokh, \emph{Pseudo-Wigner matrices}, arXiv:1701.05544, version 5 (2018). \bibitem{SV} S.~Sachdeva and N.~K.~Vishnoi, \emph{Faster Algorithms via Approximation Theory}, Found. Trends Theor. Comput. Sci. \textbf{9} (2013), 125--210. DOI: 10.1561/0400000065. Section~3. \bibitem{Sodin} S.~Sodin, \emph{Several applications of the moment method in random matrix theory}, Proc. Int. Congr. Math., Seoul 2014, Vol.~III, 451--475. \href{https://arxiv.org/abs/1406.3410}{arXiv:1406.3410}. \bibitem{Soshnikov} A.~Soshnikov, \emph{Universality at the edge of the spectrum in Wigner random matrices}, Comm. Math. Phys. \textbf{207} (1999), 697--733. DOI: 10.1007/s002200050743. \bibitem{Stevenhagen} P.~Stevenhagen, \emph{R\'edei reciprocity, governing fields and negative Pell}, Math. Proc. Cambridge Philos. Soc. \textbf{172} (2022), 627--654. DOI: 10.1017/S0305004121000335. \bibitem{TroppSubmatrices} J.~A.~Tropp, \emph{Norms of random submatrices and sparse approximation}, C. R. Math. Acad. Sci. Paris \textbf{346} (2008), 1271--1274. DOI: 10.1016/j.crma.2008.10.008. \bibitem{TroppBernstein} J.~A.~Tropp, \emph{User-friendly tail bounds for sums of random matrices}, Found. Comput. Math. \textbf{12} (2012), 389--434. DOI: 10.1007/s10208-011-9099-z. \bibitem{TWkernel} C.~A.~Tracy and H.~Widom, \emph{Matrix kernels for the Gaussian orthogonal and symplectic ensembles}, Ann. Inst. Fourier \textbf{55} (2005), 2197--2207. \href{https://www.numdam.org/item/AIF_2005__55_6_2197_0/}{Published article}. \bibitem{VDN} D.~V.~Voiculescu, K.~J.~Dykema and A.~Nica, \emph{Free Random Variables}, CRM Monograph Series \textbf{1}, American Mathematical Society, 1992. \end{thebibliography} \clearpage \section*{Supplementary proofs} We give the uniform relative comparison for complete Legendre-sign patterns when the number of rough prime factors is of order $\log\log X$. The proof keeps the product cutoff and removes repeated prime coordinates before conditioning on the rank. We also give the proofs of the joint edge laws for observed blocks and for the complete matrix with prescribed small-prime signs. Theorem references prefixed M point back to the main article. The supplementary sections and their results keep the S numbering of the separate supplement; all links in this combined version are internal. \setcounter{section}{0} \setcounter{subsection}{0} \setcounter{equation}{0} \setcounter{theorem}{0} \renewcommand{\thesection}{S\arabic{section}} \renewcommand{\theHsection}{supp.\arabic{section}} \renewcommand{\theHsubsection}{supp.\arabic{section}.\arabic{subsection}} \renewcommand{\theHequation}{supp.\arabic{equation}} \providecommand{\theHtheorem}{} \renewcommand{\theHtheorem}{supp.\arabic{section}.\arabic{theorem}} \newcommand{\mainref}[1]{\hyperref[#1]{M\ref*{#1}}} \newcommand{\maineqref}[1]{\textup{(\mainref{#1})}} \renewcommand{\refname}{References for the supplementary proofs} \section{Relative comparison on a rough-prime family} \label{sec:rough-transfer} Put $L=\log\log X$ and $e=\binom r2$. Fix $01$ and let $cL\le r\le CL$ be an integer. All logarithms are natural. Set $Y_r=31L+12r\log2$ and assume \begin{equation} \log y\le L^B,\qquad \frac{\log y-Y_r}{\log L}\longrightarrow\infty. \label{eq:focused-cutoff} \end{equation} Let $\mathcal D^{\rm rough}(X;y)$ be the squarefree $d\le X$ with exactly $r$ prime factors, all exceeding $y$ and congruent to one modulo four, and write $a_X=|\mathcal D^{\rm rough}(X;y)|$. The parameters of this set include $r$. The window $|r-L/2|\le L^{2/3}$ is admissible, and $y=(\log X)^{64}$ satisfies the cutoff in that window. Even for typical $r$, every prime factor is required to exceed $y$. Choose $d$ uniformly and label its prime factors by an independent uniform permutation. Let $\widetilde\mu_{X,y}$ be the resulting law of its zero-diagonal sign matrix $K_d$, and let $U_r$ be the law of the zero-diagonal Rademacher Wigner matrix. For a sign matrix $K$, write $\kappa(K)$ for the excess corank of its binary graph Laplacian. It equals the narrow $4$-rank for these discriminants. For fixed $\ell\ge1$, set $\lambda=1+r^{-\ell}$ and mark each labelled prime by $J_i$ when $p_i\in(y\lambda^{J_i},y\lambda^{J_i+1}]$. Write $\mathsf P=\mathcal L(\mathbf J,K_d)$ and $\rho=\mathcal L(\mathbf J)$; the output marks need not be sorted. \begin{theorem}[Relative pattern comparison] \label{thm:rough-law} Uniformly for $cL\le r\le CL$ and $Y_r\le\log y\le L^B$, \begin{align} \Delta_{X,y,\ell} &:=\sum_{\mathbf j}\max_\tau |2^e\mathsf P(\mathbf j,\tau)-\rho(\mathbf j)|\notag\\ &\ll_{\ell,B,c,C} \exp\{-\tfrac1{12}\log y+\tfrac{31}{12}L+r\log2+O_{\ell,B,c,C}(\log L)\} \notag\\ &\quad+\exp\{-\log y+L+r\log2+O_{\ell,B,c,C}(\log L)\}+a_X^{-1}. \label{eq:rough-marked} \end{align} Under \eqref{eq:focused-cutoff}, $\Delta_{X,y,\ell}L^J\to0$ for every fixed $J$. In particular \begin{equation} \epsilon_{X,y}:=\max_\tau|2^e\widetilde\mu_{X,y}(\tau)-1| \le\Delta_{X,y,1}=o(1). \label{eq:rough-pointwise} \end{equation} For every graph event $C$ with $p=U_r(C)>0$, \begin{align*} \widetilde\mu_{X,y}(C)&=p\{1+O(\epsilon_{X,y})\},\\ d_{\rm TV}(\widetilde\mu_{X,y}(\cdot\mid C),U_r(\cdot\mid C)) &\le\epsilon_{X,y}/(1-\epsilon_{X,y}),\\ d_{\rm TV}(\mathsf P(\cdot\mid C),\rho\otimes U_r(\cdot\mid C)) &\le\Delta_{X,y,\ell}/(1-\Delta_{X,y,\ell}). \end{align*} These bounds are uniform even when $p$ tends to zero arbitrarily fast. If $r\le L$ and $y\ge(\log X)^{64}$, then $\Delta_{X,y,\ell}\ll_{\ell,B,c,C}(\log X)^{-2}$. If $y=\exp(L^2)$ is admissible, then $\epsilon_{X,y}\le\exp\{-L^2/12+O_{\ell,c,C}(L)\}$. \end{theorem} The graph event may include both an exact corank and a prescribed internal pattern. Uniform relabelling is part of the arithmetic law: the theorem makes no statement about labels ordered by prime size. \section{Counting signs on independent prime sets} The following edge-deletion estimate \cite[proof of Theorem~4.10]{supp:KS} is used before the norm cutoff and the distinct-prime restriction. All operator norms below use probability measures. \begin{lemma}[Weighted kernel count] \label{lem:focused-kernel-count} Let $x_1,\ldots,x_m$ be independent finite probability spaces, and let $B_{ij}(x_i,x_j)\in\{\pm1\}$ have averaging-operator norms at most $\eta$. For $\Phi=\prod_i\phi_i(x_i)$, $|\phi_i|\le1$, and signs $\tau_{ij}$, put $Z_\tau=\prod_{iy}q^{-2}\ll r^2/(yH^2)=o(1)$. Dividing distinct tuples by $(r-1)!$ and using Stirling therefore gives \begin{equation} a_X\gg\frac X{\log X}\frac{H^{r-1}}{(r-1)!} \ge X\exp\{-O_{B,c,C}(L)\},\qquad \frac{\mathcal M}{a_X}\ll L^{C_0}. \label{eq:rough-denominator} \end{equation} For the last bound use $H=H_Q\asymp L$, with $H_Q\ge L/2-O_B(\log L)$, and $H_N-H_Q=O(\log L)$, so $(H_N/H_Q)^{r-1}\le L^{O(1)}$; the fixed exponent $C_0$ may depend on $B,c,C$, and the $\sqrt N$ term is negligible. In fact the upper and lower bounds, with Stirling's formula, give \[ \log(a_X/X)=-L+(r-1)\left(1+\log\frac{L}{2(r-1)}\right) +O_{B,c,C}(\log L). \] This controls population, with no factor equal to the number of cells or boxes. Retain the cell labels when summing \eqref{eq:rough-injective-repair}. Only input-box indices are sorted; both output marks and graph are relabelled. For each output mark the triangle inequality bounds the maximum atom discrepancy by the sum of its box contributions. Summing over output marks charges each box just once, since the relabelling weights sum to one. Thus \begin{equation} \Delta_{X,y,\ell}\ll\frac{\mathcal M}{a_X} \{(\log X)D_r^{(1)}+r^22^r/P_{\min}+N^{-1}\}. \label{eq:rough-full-budget} \end{equation} This step establishes a joint estimate, not just its graph marginal. Uniformly for $Y_r\le\log y\le L^B$, $r^22^r\eta\le\exp\{-L+O_{\ell,B,c,C}(\log L)\}=o(1)$, so $D_r^{(1)}\ll r^22^r\eta$. Combining \eqref{eq:rough-operator}, \eqref{eq:rough-injective-repair} and \eqref{eq:rough-denominator} with this assembly budget proves \eqref{eq:rough-marked}. The second term includes the artificial-diagonal operator cost and its Perron factor as well as the smaller injectivity-repair cost. The structural cutoff makes the first exponent $-(\log y-Y_r)/12+O_{\ell,B,c,C}(\log L)$ tend to minus infinity faster than any fixed multiple of $\log L$; the second term and $a_X^{-1}$ are smaller. This proves $\Delta_{X,y,\ell}L^J\to0$ for every fixed $J$. If $r\le L$ and $\log y\ge64L$, the first exponent is at most $-(11/4-\log2)L+O_{\ell,B,c,C}(\log L)$; its coefficient $11/4-\log2=2.056852\ldots>2$. The other terms are smaller. This gives the stated stronger rate and the special case $y=\exp(L^2)$, also with $\Delta$ in place of $\epsilon$. For a graph event $C$ of reference mass $p>0$, the relative density bound gives $|\widetilde\mu_{X,y}(C)-p|\le\epsilon p$ and localized variation at most $\epsilon p$. Normalizing as in Proposition~\mainref{prop:normalized-comparison} gives the conditional bound without reciprocal mass loss. For the marked assertion put $\delta_{\mathbf j}=\max_\tau|2^e\mathsf P(\mathbf j,\tau)-\rho(\mathbf j)|$. The unnormalized $L^1$ discrepancy on $C$ is at most $p\sum_{\mathbf j}\delta_{\mathbf j}=p\Delta$, and its arithmetic normalizer is at least $p(1-\Delta)$. The same normalization proves the marked bound. \end{proof} \section{Blocks outside prescribed vertices} The relative estimate and the main article's partial-observation comparison concern different steps. The former reaches rare arithmetic conditions; the latter determines which observed spectra retain GOE limits after those conditions. \begin{corollary}[Exterior block laws under internal constraints] \label{cor:focused-exterior-goe} In Theorem~\ref{thm:rough-law}, fix an integer-valued corank $k=k(X)$ and put $s=r-k-1$. Let $A\subseteq[r]$ be deterministic, and let $\mathcal C$ be any event determined by the internal off-diagonal signs on $A$, with $U_r(\kappa=k,\mathcal C)>0$. For a fixed number of deterministic sets $I_1,\ldots,I_b\subseteq[r]\setminus A$, suppose $|I_i\cap I_j|\le1$ for $i\ne j$, $m_j=|I_j|\to\infty$, and \[ \sum_{j=1}^b m_j^{1/3}(\log m_j)^{3/2}=o(s). \] Conditioned on $\kappa(K_d)=k$ and $\mathcal C$, the $2b$ processes \[ \sum_{\xi\in\operatorname{Spec}(K_d)_{I_j,I_j}} \delta_{m_j^{1/6}(\pm\xi-2\sqrt{m_j})} \] converge jointly to independent GOE edge processes. Their largest points converge to independent $\mathrm{TW}_1$ variables. The result is uniform over all feasible internal conditions, including cyclic or dense patterns, with no lower bound on their probability. \end{corollary} \begin{proof} Apply Theorem~\ref{thm:rough-law} to the single graph event $C=\{\kappa=k\}\cap\mathcal C$. Its conditional labelled law differs from $U_r(\cdot\mid\kappa=k,\mathcal C)$ by at most $\epsilon_{X,y}/(1-\epsilon_{X,y})=o(1)$. The latter law has the asserted limits by Theorem~\mainref{thm:fixed-edge}. Observation cannot increase total variation, so the same limits hold arithmetically. \end{proof} For example, at fixed $k$, an arbitrary feasible internal pattern on $\lfloor\gamma r\rfloor$ vertices, $0<\gamma<1$, leaves the entire complement with GOE edge laws. This is an assertion about the complement, not about the spectrum of the full conditioned matrix. All sets and conditions refer to the independent uniform prime labelling above; prime-size-selected blocks, cross-sign conditions and mark-adaptive constraints are not covered. No extension to the main article's global CKMP family follows from this relative estimate for a different family. \section{Proof of the joint edge laws} \label{sec:revised-edge-proof} We prove Theorem~\mainref{thm:fixed-edge} of the main article. Use its conditioned binary model and quotient labels. Here $W_r$ is the symmetric sign matrix with independent uniform off-diagonal signs and zero diagonal, and $\mathfrak c(m)=m^{1/3}(\log m)^{3/2}$. We first prove the unconditioned whole-matrix case $A=\varnothing$, $b=1$, $I_1=[r]$, under \begin{equation} \label{eq:quotient-growth} s_r/[r^{1/3}(\log r)^{3/2}]\longrightarrow\infty, \qquad s_r=r-k(r)-1. \end{equation} The block argument is given at the end of the proof. In the base case put \[ A_r=K/(2\sqrt r),\quad A_r^{\rm Wig}=W_r/(2\sqrt r),\quad d_r=r^{1/3}\sqrt{\log r},\quad\rho_r=r^{-2/3}\log r,\quad R_r=1+\rho_r, \] and write $\Xi_r^\pm=\sum_i\delta_{r^{1/6}(\pm\lambda_i(K)-2\sqrt r)}$. Let $\Xi_{\rm GOE}^\pm$ be independent GOE edge processes. \paragraph{Compressed traces.} Let $S_p$ be a sum of $p$ independent uniform signs and $T_j$ the first-kind Chebyshev polynomial, with $T_{-j}=T_j$. For fixed $t>0$ and $\epsilon\in\{0,1\}$ define \[ p=2\lfloor tr^{2/3}\rfloor+\epsilon,\quad m=\lceil4(t+1)d_r\rceil, \qquad P_{r,t,\epsilon}(x)=R_r^p\, \mathbb E\bigl[T_{S_p}(x/R_r)\mathbf1_{\{|S_p|\le m\}}\bigr]. \] This has degree at most $m$ and parity $\epsilon$; the underlying identity $x^p=\mathbb E T_{S_p}(x)$ is classical \cite[Section~3]{supp:SV}. \begin{lemma}[Approximation and exterior control] \label{lem:compressed-power} For every fixed $t>0$ and $\epsilon\in\{0,1\}$, eventually \begin{equation} \label{eq:compressed-uniform-error} \sup_{|x|\le R_r}|P_{r,t,\epsilon}(x)-x^p|\le r^{-8}. \end{equation} The absolute monomial coefficient sum is at most $R_r^p3^m$. For every fixed positive integer $h$, \begin{equation} \label{eq:wigner-compression-lh} \mathbb E_{\rm Wig}\left| \operatorname{tr}P_{r,t,\epsilon}(A_r^{\rm Wig}) -\operatorname{tr}(A_r^{\rm Wig})^p\right|^h\longrightarrow0. \end{equation} \end{lemma} \begin{proof} The cosine identity gives $x^p=\mathbb E T_{S_p}(x)$ on $[-1,1]$, hence everywhere by polynomial continuation. Hoeffding's bound gives \[ \sup_{|x|\le R_r}|P_{r,t,\epsilon}(x)-x^p| \le2R_r^pe^{-m^2/(2p)},\qquad p\log R_r-\frac{m^2}{2p} =\bigl(2t-4(t+1)^2/t+o(1)\bigr)\log r<-12\log r. \] The recurrence $T_{j+1}=2xT_j-T_{j-1}$ gives coefficient sum at most $3^j$, proving the remaining coefficient assertion. For $|x|=R_r\cosh u$, $u\ge0$, we have $|P_{r,t,\epsilon}(x)|\le R_r^pe^{mu}$. If $L$ is even and $m/L\le1/2$, maximizing at $u=\operatorname{arctanh}(m/L)$ and using $\operatorname{arctanh}v\le2v$ give \[ \sup_{u\ge0}(mu-L\log\cosh u)\le m^2/L,\qquad |P_{r,t,\epsilon}(x)|\le e^{-(L-p)\log R_r+m^2/L}|x|^L\quad(|x|\ge R_r). \] Take $L=2\lfloor8(t+1)^2r^{2/3}\rfloor$. The exponent divided by $\log r$ tends to $-16t^2-30t-15<-8$; $|x|^p$ satisfies the same bound without $m^2/L$. Hence for every real symmetric $A$, \[ |\operatorname{tr}P_{r,t,\epsilon}(A)-\operatorname{tr}A^p| \le r^{-7}+2r^{-8}\operatorname{tr}A^L. \] Soshnikov's mixed high-trace bounds \cite[Theorem~3]{supp:Soshnikov} bound every fixed moment of the last trace for $A=A_r^{\rm Wig}$, proving \eqref{eq:wigner-compression-lh}. \end{proof} \begin{proposition}[Compressed trace comparison] \label{prop:compressed-trace-comparison} Under \eqref{eq:quotient-growth}, for fixed $\ell$, $t_a>0$ and $\epsilon_a\in\{0,1\}$, \begin{align*} &\mathbb E\!\left[\prod_{a=1}^{\ell} \operatorname{tr}P_{r,t_a,\epsilon_a}(A_r)\;\middle|\;\kappa(R)=k(r)\right]\\ &\quad-\mathbb E_{\rm Wig}\!\left[\prod_{a=1}^{\ell} \operatorname{tr}(A_r^{\rm Wig})^{2\lfloor t_a r^{2/3}\rfloor+\epsilon_a} \right]\longrightarrow0. \end{align*} Each compressed trace has bounded moments of every fixed even order. \end{proposition} \begin{proof} Put $M=\sum_a\lceil4(t_a+1)d_r\rceil$. The product is an edge-sign polynomial of degree at most $M$, with absolute coefficient sum \[ r^\ell R_r^{\sum_ap_a}(3\sqrt r)^M=\exp\{O(d_r\log r)\}. \] The odd-multiplicity edges of its closed walks form Eulerian graphs, so each nonconstant monomial uses at most $M0$, $\Pr(\|A_r\|>R_r\mid\kappa(R)=k(r))\le C_Br^{-B}$. Outside this event both rescaled edges have no points above $w_r=2\log r$. \end{lemma} \begin{proof} For fixed $D>0$ put $R_{0,r}=1+\rho_r/2$, $d=\lceil Dd_r\rceil$ and $Q_r(x)=T_d(x/R_{0,r})^2$. This is nonnegative everywhere and at most one on $[-R_{0,r},R_{0,r}]$. The preceding exterior argument, with $2d$ in place of $m$, gives \[ Q_r(x)\le e^{-L\log R_{0,r}+4d^2/L}|x|^L\qquad(|x|\ge R_{0,r}). \] For $L=2\lfloor u_Dr^{2/3}\rfloor$, $u_D=4(D+1)^2$, the exponent is $(-u_D+2D^2/u_D+o(1))\log r$, with coefficient below $-7/2$. The Wigner even-trace bound gives $\mathbb E_{\rm Wig}\operatorname{tr}Q_r(A_r^{\rm Wig})\le r+O(r^{-2})$. Its degree is $2d=O(d_r)$ and its edge-sign coefficient sum is at most $r(3\sqrt r)^{2d}$, so the same character comparison gives $\mathbb E\operatorname{tr}Q_r(A_r)\le r+o(1)$. For $|x|\ge R_r$, \[ Q_r(x)\ge\tfrac14e^{2d\operatorname{arcosh}(R_r/R_{0,r})} =\tfrac14r^{2D+o(1)}, \] since $\operatorname{arcosh}(R_r/R_{0,r})\sim\sqrt{\rho_r}$. Positivity and Markov give $O(r^{1-2D+o(1)})$; choose $D>B+2$. The edge cutoff follows from $2r^{2/3}(R_r-1)=2\log r$. \end{proof} All times, moment orders and confidence exponents are fixed before $r\to\infty$; \eqref{eq:quotient-growth} pays every fixed multiple of the compressed degree. \paragraph{Recovering the edge processes.} Retain in $\Xi_r^+$ the points at most $w_r$ that come from positive eigenvalues, and call the result $\widetilde\Xi_r^+$. Define $\widetilde\Xi_r^-$ analogously from negative eigenvalues, with the same inclusive cutoff. These measures agree with $\Xi_r^\pm$ on every fixed compact set eventually. \begin{lemma}[Local factorial-Laplace transfer] \label{lem:local-laplace} The joint factorial moment measures of $(\widetilde\Xi_r^+,\widetilde\Xi_r^-)$ converge vaguely in every fixed order to those of $(\Xi_{\rm GOE}^+,\Xi_{\rm GOE}^-)$. They identify the joint point-process limit. \end{lemma} \begin{proof} \emph{Trace replacement.} Fix $t>0$, let $m(u)=\lfloor ur^{2/3}\rfloor$, $E_r=\{\|A_r\|>R_r\}$ and put \[ L_r^\pm(t)=\int e^{tx}\,d\widetilde\Xi_r^\pm(x),\quad H_r^\pm(t)=\tfrac12\operatorname{tr} (P_{r,t,0}\pm P_{r,t,1})(A_r),\quad G_r^\pm(t)=\tfrac12\operatorname{tr}A_r^{2m(t)}(1\pm A_r). \] Set $Z_r(t)=1+\operatorname{tr}A_r^{2m(t/2)}+ \operatorname{tr}A_r^{2m(4t)}$, and obtain $\widehat Z_r(t)$ by replacing its powers by compressed polynomials. On $E_r^c$ their trace errors, and $H_r^\pm-G_r^\pm$, are $O(r^{-7})$. Proposition~\ref{prop:compressed-trace-comparison} gives, for fixed $h$, \begin{equation} \label{eq:compressed-envelope-moments} \mathbb E|\widehat Z_r(t)|^{2h}=O_{h,t}(1),\qquad \mathbb E[Z_r(t)^{2h}\mathbf1_{E_r^c}]=O_{h,t}(1). \end{equation} For $|x|\le w_r$ and $y=1+x/(2r^{2/3})$, Taylor's formula gives $y^{2m(t)}=e^{tx}\{1+O_t(r^{-2/3}(|x|+x^2))\}$. The smaller and larger powers in $Z_r$ control the two signs of $x$; the parity projector's error at either edge is $O(r^{-2/3}w_r)$. In the inner region $1/2\le y\le1-w_r/(2r^{2/3})$, \[ y^{2m(t)}+e^{2tr^{2/3}(y-1)} \le C_te^{-c_tw_r}y^{2m(t/2)}. \] This follows by subtracting powers and using $2(1-y)+\log y\ge(1-y)/2$ on $[1/2,1]$. The region $|y|<1/2$ contributes $O_t(re^{-c_tr^{2/3}})$. Applying these bounds at both edges yields, on $E_r^c$, \[ |G_r^\pm(t)-L_r^\pm(t)| \le C_t\{r^{-2/3}(\log r)^2+r^{-c_t}\}Z_r(t) +C_tre^{-c_tr^{2/3}}. \] This tends to zero in every fixed moment by \eqref{eq:compressed-envelope-moments}. On $E_r$, $H_r^\pm$ has bounded $2h$th moment and $L_r^\pm(t)\le r^{1+2t}$ deterministically. Cauchy--Schwarz and Lemma~\ref{lem:coarse-confinement} bound its contribution by $O_{h,t}(\Pr(E_r)^{1/2})+r^{h(1+2t)}\Pr(E_r)=o(1)$, taking $B>h(1+2t)+1$. Thus \begin{equation} \label{eq:edge-linear-lp} L_r^\pm(t)-H_r^\pm(t)\longrightarrow0 \quad\text{in every fixed }L^h. \end{equation} \emph{Factorial measures.} Fix $q$ and an open rectangle \begin{equation} \label{eq:local-parameter-box} U_q\Subset(0,\infty)^q. \end{equation} For one colour the distinct-index sum satisfies \begin{equation} \label{eq:factorial-partition} \sum_{i_1,\ldots,i_q\ \mathrm{distinct}}e^{\sum_jt_jx_{i_j}} =\sum_{\pi\in\Pi_q}\prod_{B\in\pi} (-1)^{|B|-1}(|B|-1)!\, L_r\!\left(\sum_{j\in B}t_j\right). \end{equation} Apply this separately to the two colours, whose underlying eigenvalue index sets are disjoint. Equations~\eqref{eq:edge-linear-lp}--\eqref{eq:factorial-partition}, Proposition~\ref{prop:compressed-trace-comparison} and \cite[Corollary~6]{supp:Soshnikov} give convergence of every joint factorial Laplace transform on $U_q$ to the independent GOE transforms. The same comparison at doubled orders bounds the required second moments. Write $\alpha_r^{a,b}$ for the order-$(a,b)$ factorial measure, $a+b=q$. Choose $\mathbf t^0+[-2\delta,2\delta]^q\subset U_q$ and set $d\nu_r(\mathbf x)=e^{\langle\mathbf t^0,\mathbf x\rangle} d\alpha_r^{a,b}(\mathbf x)$. The convergent transforms at the cube corners imply \[ \sup_r\int e^{2\delta\|\mathbf x\|_1}\,d\nu_r<\infty, \qquad e^{2\delta\|\mathbf x\|_1} \le\sum_{\boldsymbol\sigma\in\{\pm1\}^q} e^{\langle2\delta\boldsymbol\sigma,\mathbf x\rangle}. \] Thus these finite measures are tight, and their transform tails are $O(e^{-\delta R})$ on $\|\mathbf x\|_1>R$ when $\|\mathbf z\|_\infty\le\delta$. Every subsequential limit has the prescribed transform near zero; uniqueness of the multivariate Laplace transform identifies it with the tilted GOE factorial measure. Untilting on compact sets proves the asserted vague convergence. \emph{Point-process identification.} On a bounded interval $I$, let $M_I$ bound the entries of the $2\times2$ GOE kernel \cite[Section~IV]{supp:TWkernel}. Its Pfaffian expansion gives \[ 0\le\rho_j(\mathbf x)\le(2j-1)!!M_I^j\le j!(2M_I)^j, \qquad \mathbb E(N_I)_j\le j!(2M_I|I|)^j. \] Hence $\mathbb E(1+u)^{N_I}<\infty$ for small $u>0$; the independent colours also have an exponential moment for their total count. Their joint occupation laws on finitely many bounded intervals are therefore moment determinate. First factorial measures give local tightness. Any subsequential limit has no atom at a fixed endpoint: test a shrinking continuous bump there and use the continuous GOE first-measure density. Counts on finitely many bounded intervals consequently converge along that subsequence. Their joint factorial moments converge, and bounds at twice each order give uniform integrability of all count products. The limiting counts thus have the GOE moments; determinacy identifies their joint law and hence the two point processes. Since $w_r\to\infty$, the same local identification holds for the untruncated measures. \end{proof} \begin{proof}[Proof of Theorem~\mainref{thm:fixed-edge}] First take $b=1$ and $I_1=[r]$. Lemma~\ref{lem:local-laplace} identifies the two processes. Moreover its proof gives $\sup_r\mathbb E L_r^\pm(t)<\infty$ for fixed $t>0$. Markov and Lemma~\ref{lem:coarse-confinement} therefore give \[ \limsup_{r\to\infty}\Pr(\Xi_r^\pm((L,\infty))>0)\ll_te^{-tL}. \] For fixed $a,b$ and $T>\max(a,b)$, the joint maximum distribution at $(a,b)$ differs from the probability \[ \Pr\{\Xi_r^+((a,T])=0,\Xi_r^-((b,T])=0\} \] by at most the probability of a point above $T$. The zero-count probability converges by point-process convergence and the absence of GOE endpoint atoms. The same exponential tail bound holds for the limiting processes. Letting first $r\to\infty$, then $T\to\infty$, proves the joint extreme-value law. \emph{Observed blocks after a partial observation.} Put $M=r-1-|A|$ and $S=\sum_j\mathfrak c(m_j)$. In block $j$, repeat the compression at size $m_j$, with $A_j=K_{I_j,I_j}/(2\sqrt{m_j})$. For fixed moment orders, the total degree is $L=O(\sum_jm_j^{1/3}\sqrt{\log m_j})$, and the absolute coefficient sum is $\exp\{O(S)\}$. If $m_* =\max_jm_j$, then $M\ge m_*-1$ and $S\le b\mathfrak c(m_*)=o(M)$. Hence $|A|+L1+m_j^{-2/3}\log m_j\mid\mathcal C)\le C_Dm_j^{-D}$ for each fixed $D$; its comparison error is smaller than any fixed power of $m_j$. The trace replacement in Lemma~\ref{lem:local-laplace} consequently holds in every fixed $L^p$ at each block's own size. Telescope mixed products and apply H\"older to these individual errors and moment bounds. This avoids charging a large block to a smaller block's exceptional probability. The factorial-transform and count-determinacy argument then applies with $2b$ fixed colours; its individual tail bounds also give convergence of their largest points. Without $\mathcal C$, the global approximations adjoin because their metric errors tend to zero in probability, by Slutsky's theorem on subsequences with limiting ratios. Every estimate is uniform in $B$, proving the theorem before averaging over the quotient form. \end{proof} \begin{remark} The additional condition may inspect only $B$ and the exposed labels. The complete matrix can have different extreme-eigenvalue scales when many exposed labels coincide, as in Example~\mainref{ex:core-changes-edge}. Corollary~\ref{cor:focused-exterior-goe} uses the relative comparison to transfer the joint block law to the rough-prime family. \end{remark} \section{Spectral limits with prescribed small-prime signs} \label{sec:full-matrix-proof} We prove the model estimates used in Theorems~\mainref{thm:small-prime-spectrum} and \mainref{thm:full-small-prime-spectrum}. The first $g=O(\log r)$ labels, on a set $A$, give the prescribed small-prime block. The remaining $r$ labels give the large-prime block. Put $n=r+g$, $N=2^s$ and $\lambda=r/N$. We use the normalization $b_N$ from Theorem~\mainref{thm:occupancy-extremes}. All estimates are uniform in the prescribed pattern and the nondegenerate symmetric form $B$. \paragraph{The large-prime submatrix.} After exposing $B$ and the labels on $A$, use Lemma~\mainref{lem:exposed-rows} for the remaining $r$ labels. For the sparse bulk and sparse edge locations, use the conditional character comparison in Proposition~\mainref{prop:quotient-character} with $M=r-1$. For $t$ traces of total walk length $J$, the additional spanning error after normalization is at most $2\sqrt5\, r^{J/2-t}2^{(J-r+1)/2}$. It is negligible for the fixed walk lengths for the bulk and the logarithmic lengths in the edge-location argument. The quadratic character bound is unchanged. When $s>r-1$ this range gives the semicircle limit, since $r/2^s\to0$. In the other bulk, occupancy and dense ranges one has $s=O(\log r)$. Given the exposed labels, the probability of a failure to span among the $r-1$ independent labels is at most $2^{s-r+1}$. Changing the last label changes the empirical distribution by at most $2/r$ in distribution-function distance and each occupancy by at most one. The replacement affects one row and column of the sign matrix, so its operator cost is $O(\sqrt r)$, smaller than the occupancy edge scale $\sqrt{rb_N}$ since $b_N\to\infty$. This gives the bulk and occupancy conclusions. In the dense range, every class is occupied with high probability, and the occupancy comparison gives the count of the large eigenvalues. For the growing-outlier estimate, the last label changes the relative occupancy deviations by $O(N/r)$ in norm, or $O(\sqrt N)$ on the eigenvalue scale. This is $o(\sqrt{r\log N})$ in the dense range. The block edge law follows from Theorem~\mainref{thm:fixed-edge} with $b=1$ and $I_1=A^c$, and the other estimates hold uniformly in the exposed labels and $B$. \paragraph{Products of signs for the complete matrix.} Suppose $s/(\log r\log\log r)\to\infty$. Before conditioning on span, a tuple of independent labels on $A$ with the prescribed signs can be chosen in at least $\prod_{i=0}^{g-1}(2^{s-i}-2^i)$ ways. At step $i$, the $i$ linear conditions are independent and at most $2^i$ solutions are in the previous span. A tuple of rank $t2$, approximate $(z-x)^{-1}$ by a polynomial on $[-2-\varepsilon,2+\varepsilon]$ with $0<\varepsilon