\FloatBarrier \appendix \section{The block calculator}\label{sec:algo} This appendix describes the reference kernel of the program, which computes the block traces of Proposition~\ref{prop:odd} and Theorem~\ref{thm:even} modulo a prime $p$, and states the formulas it evaluates; the program itself remains the complete specification. All quantities are rational. As described in Section~\ref{sec:comp}, their denominators come from the Gelfand--Tsetlin formulas, which are products of small integers, and from the inverses of coordinate and pairing matrices; the kernel stops if a number it divides by is $0$ modulo $p$ or a matrix it inverts is singular modulo $p$. The faster kernels used for $n = 15, 16$ compute the same traces and are described at the end. \subsection{Gelfand--Tsetlin coordinates} A \emph{colour} is a coordinate of $\Q^d$, and the \emph{content} of a weight vector of $S_\nu(\Q^d)$ is its weight $c = (c_1, \dots, c_d)$. The module $S_\nu(\Q^d)$ has the Gelfand--Tsetlin basis $\xi_\Lambda$ indexed by patterns $\Lambda = (\lambda^{(d)} = \nu, \lambda^{(d-1)}, \dots, \lambda^{(1)})$ of interlacing partitions; $\xi_\Lambda$ has content $c_k = |\lambda^{(k)}| - |\lambda^{(k-1)}|$. With $l_{ki} = \lambda^{(k)}_i - i + 1$ the generators act by \cite[Theorem~2.3]{Molev} \[ E_{k,k+1}\, \xi_\Lambda = -\sum_i \frac{\prod_j (l_{ki} - l_{k+1,j})}{\prod_{j \ne i} (l_{ki} - l_{kj})}\, \xi_{\Lambda + \delta_{ki}}, \qquad E_{k+1,k}\, \xi_\Lambda = \sum_i \frac{\prod_j (l_{ki} - l_{k-1,j})}{\prod_{j \ne i} (l_{ki} - l_{kj})}\, \xi_{\Lambda - \delta_{ki}}, \] where $\Lambda \pm \delta_{ki}$ changes $\lambda^{(k)}_i$ by $\pm 1$ and terms with a pattern that does not interlace are omitted. The basis is orthogonal for the contravariant form, the symmetric bilinear form with $\langle \xi, \xi \rangle = 1$ for the highest vector $\xi$ and $\langle E_{ij} u, w\rangle = \langle u, E_{ji} w\rangle$, with explicit norms that are products of factorials of differences $l_{ki} - l_{kj}$ and $l_{ki} - l_{k-1,j}$ \cite[Section~2]{Molev}. Restriction to $\mathrm{GL}_{d-1}$ removes the top row of the pattern, so $S_\nu(\Q^d)$ is the orthogonal sum of the modules $S_\mu(\Q^{d-1})$ over the partitions $\mu$ that interlace $\nu$; the vectors of content $c$ come from those $\mu$ with $|\nu| - |\mu| = c_d$, that is, from the $\mu$ with $\nu/\mu$ a horizontal strip of $c_d$ boxes. The transposition of the last two colours is needed to impose invariance. It is expressed through the generators. \begin{lemma}\label{lem:swap} Let $s$ be the transposition matrix in $\mathrm{GL}_2$, $E = E_{12}$, $F = E_{21}$, and let $v$ be a vector of weight $(x, y)$ in a polynomial representation of $\mathrm{GL}_2$. Put $h = |x - y|$, $t = \min(x, y)$, and $(U, V) = (E, F)$ if $x \ge y$, otherwise $(U, V) = (F, E)$. Then \[ s\,v = (-1)^t\, V^h \sum_{k=0}^{t} \frac{(-1)^k}{k!\,(k+h)!} \prod_{j=0}^{k-1} \bigl(VU - j(h+j+1)\bigr)\, v . \] \end{lemma} \begin{proof} It suffices to check the formula on each irreducible summand $\det^\ell \otimes \mathrm{Sym}^{x+y-2\ell}$, where $v$ is a multiple of one monomial. There $VU$ acts on $v$ by $r(r+h+1)$ with $r = t - \ell$, the factors of the product are $(r-j)(r+h+1+j)$, and the sum is a terminating Vandermonde sum with value $(-1)^r r!/(r+h)!$. The operator $V^h$ multiplies the monomial by $(r+h)!/r!$ and moves it to the weight $(y, x)$, so the right-hand side is $(-1)^{t+r} = (-1)^\ell$ times the swapped monomial. This is the action of $s$, since $\det(s)^\ell = (-1)^\ell$ and $s$ swaps the two variables of $\mathrm{Sym}$. \end{proof} \subsection{Fixed subspaces} Write a content $c$ as a sequence of maximal blocks of consecutive equal entries, of lengths $m_1, \dots, m_k$ and values $t_1, \dots, t_k$. Let $W_{\nu,c} \subseteq S_\nu(\Q^d)$ be the space of vectors of content $c$ that are fixed by the permutations of colours inside each block. Restricting to $\mathrm{GL}_{m_1} \times \dots \times \mathrm{GL}_{m_k}$ and applying Remark~\ref{rem:plethysm} to each factor gives \[ \dim W_{\nu,c} = \Bigl\langle s_\nu,\ \prod_{i=1}^{k} h_{m_i}[h_{t_i}] \Bigr\rangle . \] The spaces $V_a$ and $V_b$ of Lemma~\ref{lem:fixed} are $W_{\nu,(b^a)}$ and $W_{\nu,(a^b)}$, with a single block. The recursion below also needs the spaces with non-constant content that occur on the way (prefixes of contents, and the contents of the hole blocks). Only colours inside one block are symmetrised, not colours of equal content in different blocks; Algorithm~\ref{alg:basis} relies on this. The dimensions are computed in advance by exact symmetric function arithmetic; this gives the \emph{plan} of a run, the list of all pairs $(\nu, c)$ that occur with their dimensions $q$ and their children. Each $W_{\nu,c}$ is stored by a matrix $X_{\nu,c}$ whose columns are an orthogonal basis, written in the \emph{ambient} space \[ A_{\nu,c} = \bigoplus_{\mu} W_{\mu,c'} , \qquad c' = (c_1, \dots, c_{d-1}), \] the sum over the children $\mu$ of $\nu$ (horizontal strips of $c_d$ boxes). The ambient space carries the diagonal form whose entries are the norms of the children's basis vectors times the Gelfand--Tsetlin norm factor of the step from $\nu$ to $\mu$. Algorithm~\ref{alg:basis} builds these bases from the smallest $d$ upwards. It is called only for admissible pairs, in which $\nu$ has at most $d$ parts and $c$ is a weight of $S_\nu(\Q^d)$; for any other pair $W_{\nu,c} = 0$, and such children are left out of the ambient sums. For $d = 1$ the only admissible pair is $\nu = (c_1)$, and $W_{\nu,c} = S_\nu(\Q^1)$ is one-dimensional. \begin{algorithm}[ht] \caption{Basis of the fixed subspace $W_{\nu,c}$}\label{alg:basis} \begin{algorithmic}[1] \If{$d = 1$} \Return the basis $(1)$ \EndIf \State form the ambient space $A_{\nu,c} = \bigoplus_\mu W_{\mu,c'}$ with its diagonal form \State $g \gets$ the length of the last block of $c$ \If{$g = 1$} \Return the identity basis of $A_{\nu,c}$ \EndIf \State $\sigma \gets$ the matrix of the transposition of the colours $d-1$ and $d$ on $A_{\nu,c}$, followed by the orthogonal projection onto $A_{\nu,c}$; its entries are computed through the grandchildren with Lemma~\ref{lem:swap} \State $P \gets \frac1g\,(I + (g-1)\,\sigma)$ \State check $\Tr P = q$; choose $q$ columns of $P$ by pivoting on its diagonal and orthogonalise them \State \Return these columns as $X_{\nu,c}$, with their norms \end{algorithmic} \end{algorithm} The ambient space consists of vectors fixed by the permutations inside the blocks of $c'$, and the blocks of $c$ are those of $c'$ except that the last one grows by the colour $d$. On such vectors the average over the permutations of the last block of $c$ is $\frac1g\bigl(1 + (g-1)\,\pi\sigma\bigr)$, where $\pi$ is the average over the permutations of the first $g-1$ of them; $\pi$ is the orthogonal projection onto the ambient space. So $P$ is the orthogonal projection onto $W_{\nu,c}$, its trace is $\dim W_{\nu,c}$, and its columns span $W_{\nu,c}$. The program checks $\Tr P = q$ against the plan in every field. \subsection{Coefficient maps} The map $\Theta_\nu = [X^{J}]\,S_\nu(X)$ and its relatives take the coefficient of a product of variables, one row of the matrix at a time. Let $x_k^{\mathsf T}$ be row $k$ of $X$, let $Z$ be the $(d+1) \times d$ matrix with rows $I_d$ and $x_k^{\mathsf T}$, and let $\tilde Y$ be the $d \times (d+1)$ matrix obtained from $X$ by replacing row $k$ by zero and appending the column $e_k$. Then $X = \tilde Y Z$, so $S_\nu(X) = S_\nu(\tilde Y)\, S_\nu(Z)$, and $Z$ is $\exp(\sum_i x_{ki} E_{d+1,i})$ applied after the natural embedding of $\Q^d$ into $\Q^{d+1}$. The operators $E_{d+1,i}$ commute, so the coefficient of $\prod_i x_{ki}^{\delta_i}$ in $S_\nu(Z)$ is $\prod_i E_{d+1,i}^{\delta_i}$ applied after the embedding of $S_\nu(\Q^d)$ into $S_\nu(\Q^{d+1})$. This operator moves one unit of content from each colour $i$ with $\delta_i = 1$ to the new colour $d+1$, which $\tilde Y$ then sends to row $k$. Here $\delta = (1, \dots, 1)$ for a full row and $\delta$ has one entry $0$ for a row of $J - I$. The \emph{local row} $L^{c,\delta}_{\nu,\lambda}$ is the matrix of this operator from $W_{\nu,c}$ to $W_{\lambda,c-\delta}$, followed by the orthogonal projection. Moving the new colour from the first position to the last by transpositions of neighbouring colours, each preceded by the corresponding $E_{i,i+1}^{\delta_i}$, changes only one row of a Gelfand--Tsetlin pattern at each step. The last step involves three rows and Lemma~\ref{lem:swap}. This gives the recursion, from the bases of the children $\eta$ of $\nu$ and $\zeta$ of $\lambda$, \[ L_{\nu,\lambda} = G_\lambda^{-1} \sum_{\eta, \zeta} r(\nu,\eta)\, \gamma(\nu,\eta,\zeta;\lambda,\delta_d)\, \mathcal N(\lambda,\zeta)\, X_{\lambda,\zeta}^{\mathsf T}\, G_\zeta\, L_{\eta,\zeta}\, X_{\nu,\eta}, \] where $\delta_d$ is the last entry of $\delta$, $X_{\nu,\eta}$ is the block of $X_{\nu,c}$ belonging to the child $\eta$, $L_{\eta,\zeta}$ is the local row one level lower (for $\delta$ without its last entry), $G_\zeta$ is the diagonal matrix of the norms of the basis of $W_{\zeta,\cdot}$, $\mathcal N(\lambda,\zeta)\,G_\zeta$ is the form of the ambient space of $W_{\lambda,c-\delta}$ on the block of $\zeta$, and $G_\lambda$ is the diagonal matrix of the norms of the columns of $X_{\lambda,c-\delta}$. The three scalars are as follows. The coefficient $\gamma$: in $S_\nu(\Q^{d+1})$ take the pattern with rows $\nu, \eta, \zeta$ in the levels $d+1, d, d-1$. The colours $d$ and $d+1$ have the weights $x = |\eta| - |\zeta|$ and $y = |\nu| - |\eta|$. Apply $E_{d,d+1}^{\delta_d}$, which moves the weights to $(x+\delta_d,\, y-\delta_d)$, and then the transposition of the colours $d$ and $d+1$ in the form of Lemma~\ref{lem:swap} for these weights. Each generator in these formulas changes only the middle row, by the formulas of \cite[Theorem~2.3]{Molev}, so the result is a combination $\sum_\lambda \gamma(\nu,\eta,\zeta;\lambda,\delta_d)$ of the patterns with rows $\nu, \lambda, \zeta$; this defines $\gamma$. The norm factor: with $l_i = \nu_i - i + 1$ and $m_j = \mu_j - j + 1$, \[ \mathcal N(\nu,\mu) = \prod_{1 \le i \le j \le d-1} \frac{(l_i - m_j)!}{(m_i - m_j)!} \prod_{1 \le i < j \le d} \frac{(l_i - l_j - 1)!}{(m_i - l_j - 1)!} . \] The embedding ratio is $r(\nu,\eta) = \theta(\nu,d)\,\psi(\eta,d-1) / \theta(\eta,d-1)$ with \[ \theta(\nu,d) = \Bigl(\prod_{j=1}^{d} \nu_j!\, \prod_{i=1}^{d-1}\prod_{j=1}^{i} (\nu_j + i - j + 1)\Bigr)^{-1}, \qquad \psi(\mu,i) = \prod_{j=1}^{i} (\mu_j + i - j + 1). \] The base case $d = 1$ is the matrix $(1)$. Only the pairs $(\eta, \zeta)$ needed for the requested targets are visited. To assemble a whole coefficient map, the program does not expand basis vectors. For each fixed subspace it selects $q$ Gelfand--Tsetlin patterns at which the basis has an invertible coordinate matrix $E$; these are found recursively by pivoting, since the coordinate matrices of the children are invertible and $X_{\nu,c}$ has full column rank. A coefficient map $\Theta$ from $W_{\nu,(a^b)}$ to $W_{\nu,(b^a)}$ is then determined by its values $G = E\,\Theta$ at the selected patterns $\Lambda = (\lambda^{(1)}, \dots, \lambda^{(a)} = \nu)$ of the target. Row $k = 0, \dots, a-1$ of the matrix of variables contributes the block of the local row from $W_{\lambda^{(a-k)},((a-k)^b)}$ to $W_{\lambda^{(a-k-1)},((a-k-1)^b)}$, with $\lambda^{(0)} = \varnothing$ and $\delta = (1, \dots, 1)$ (one entry $0$ and the contents adjusted for a hole block). The product of these blocks, from $k = a-1$ down to $k = 0$, is a row vector on $W_{\nu,(a^b)}$, and the row of $G$ at $\Lambda$ is this vector times \[ \operatorname{sc}(\Lambda) = \prod_{k=0}^{a-1} I(\Delta_k, b) \Big/ \prod_{i=0}^{b-1} I(\varnothing^i \Lambda, 0). \] Here $\Delta_k = (\mu^{\le 1}, \dots, \mu^{\le b}, \lambda^{(a-k+1)}, \dots, \lambda^{(a)})$ with $\mu = \lambda^{(a-k)}$ and $\mu^{\le i}$ its first $i$ parts, $\varnothing^i \Lambda$ is $\Lambda$ preceded by $i$ empty partitions, and for a sequence $\Pi = (\pi^{(1)}, \dots, \pi^{(R)})$ with top $\pi = \pi^{(R)}$ and $0 \le s \le R$ \[ I(\Pi, s) = \prod_{t=1}^{s} \frac{(\pi^{(s)}_t + s - t + 1)!}{(\pi_t + s - t + 1)!}\; \prod_{i=s+2}^{R} \prod_{t=1}^{i-1} \frac{\pi^{(i-1)}_t + i - t}{\pi_t + i - t}\; \Big/ \prod_{t=s+1}^{R} \pi_t! . \] These factors convert the products of local rows, which are normalised by the embeddings $\theta$ and $\psi$, into coordinates of the Gelfand--Tsetlin basis. Finally $\Theta = E^{-1} G$ (Algorithm~\ref{alg:trace}). \subsection{Pairing and traces} The diagonal maps come from Lemma~\ref{lem:inverse} through the pairing between $W_{\nu,c}$ and $W_{\kappa,c^*}$ for the complementary partition $\kappa$. Its matrix is computed recursively along the same branching, \[ F_{\nu,\kappa} = \sum_{\mu} \frac{(-1)^{|\mu|}}{\prod_{i