\section{The norm of the chain}\label{sec:chain-norm} The lower chain $\Theta_\vartheta=\iota_\vartheta$ goes from the target forms on $Y_0$ through $Y_1,\dots,Y_{m-1}$ to the definite space $Y_m$, mostly outside Weil's range. Its Gram operator is computed by arranging the lifts in a triangle whose rows are chains of lifts starting from copies of $Y_0$ and whose descents remove the first block; the squares of the triangle commute up to constants by the exchange identity, and a descent along one square turns a chain of $n+1$ lifts into a chain of $n$ lifts one row lower. At the bottom only single lifts remain, whose norms are given by Rallis' formula (\cref{thm:norm-one-lift}). The result is a factorisation of the volume $Z(\vartheta)$ into the volumes of the single lifts times ratios of Hecke values (\cref{thm:factorisation}). The section has four parts: linear algebra over a finite ring, which moves a datum around one square (\cref{ss:square-law}); the abstract triangle, in which the Gram form of a full chain is computed by induction on its length (\cref{ss:triangles}); the triangle of theta lifts, whose squares are instances of the one-square identity (\cref{ss:theta-triangle}); and the bookkeeping of the constants, which are ratios of Hecke values up to powers of the norm of the modulus (\cref{ss:hecke-ratios,ss:chain-norm}). \subsection{The finite square law}\label{ss:square-law} Let $R$ be a finite commutative ring and $\chi$ a multiplicative character. Functions $L$ on $a\times n$ matrices and $L'$ on $n\times b$ matrices, with $\sigma\colon b\sqcup a\to n$, satisfy the \emph{square law with constant $c$} if both transform by $\chi\circ\det$ (on the left, resp.\ the right) and $\sum\Psi L'=c\sum\Phi L$ for all matched $\Phi$, $\Psi$ (\cref{ss:exchange-statement}). The \emph{point datum} is the indicator of the inclusion matrix $\binom10$; for a function $p$ on $n\times a$ matrices the \emph{next datum} is the function on $(n\sqcup b)\times(a\sqcup b)$ matrices with the value $p(-\eta)/\#M_{n\times b}(R)$ at $\binom{\eta\ s}{0\ 1}$ and $0$ elsewhere. \lean{New.Exchange.SquareLaw, New.Exchange.pointDatum, New.Exchange.nextDatum, New.Exchange.swapFirstTwo, New.Exchange.sum_eq_sum_fromRows, New.Exchange.sum_eq_sum_fromCols, New.Exchange.sum_eq_sum_fromBlocks, New.Exchange.inclMatrix_inl, New.Exchange.sum_nextDatum_mul, New.Exchange.star_nextDatum, New.Exchange.sum_inv_det_mul_eq_card_mul, New.Exchange.SquareLaw.card_mul_apply_fromRows_eq, New.Exchange.SquareLaw.sum_eq_nextDatum, New.Exchange.blockInlGL, New.Exchange.blockInlGL_sumEmpty, New.Exchange.matchOf, New.Exchange.exists_firstCols_eq_mul_of_invLastRows_eq, New.Exchange.areMatched_matchOf, New.AreMatched.unique, New.AreMatched.translate, New.Exchange.hasLeftInv_submatrix_invLastRows, New.Exchange.hasLeftInv_toCols_of_hasLeftInv_toRows, New.Exchange.exists_eq_firstCols, New.Exchange.matrixFourier_nextDatum_fromBlocks, New.Exchange.exists_sum_matrixFourier_nextDatum_eq, New.Exchange.SquareLaw.exists_sum_matrixFourier_eq_sum_nextDatum} In this subsection matched functions are taken over all of $R$: $\Phi$ vanishes off the rows $x_k$ of the inverses and $\Psi$ off the columns $y_k$ of the invertible matrices $k$ over $R$, and $\Phi(x_k)=\chi(\det k)\Psi(y_k)$. The \emph{Fourier transform} of a function $f$ of matrices is $\hat f(\rho)=\sum_vf(v)\psi(\tr(\rho v))$ for an additive character $\psi$; a character is \emph{primitive} if it is nontrivial on every nonzero ideal, and for a multiplicative character this means that for every $a\ne0$ some $\chi(1+ca)$ is neither $0$ nor $1$. \begin{lemma}[Matched functions over a finite ring]\label{lem:finite-matching} \begin{enumerate}[label=\textup{(\alph*)}] \item If $x_\gamma=x_{\gamma'}$ for invertible $\gamma$, $\gamma'$, then $y_{\gamma'}=y_\gamma h$ for an invertible $h$ with $\det\gamma'=\det\gamma\det h$. \item If $\Psi$ vanishes off the $y_\gamma$ and $\chi(\det h)\Psi(yh)=\Psi(y)$ for invertible $h$, the function $\Phi$ with $\Phi(x_\gamma)=\chi(\det\gamma)\Psi(y_\gamma)$ and $0$ off the $x_\gamma$ is well defined and matched with $\Psi$. A function matched with $\Psi$ is unique, and if $\Phi$, $\Psi$ are matched, so are $x\mapsto c\chi(\det g)\Phi(xg)$ and $y\mapsto c\Psi(g^{-1}y)$. \item If $f(g)=\chi(\det g)v$ for all invertible $g$, then $\sum_u\chi^{-1}(\det u)f(u)$ over all square matrices $u$ is $\#\GL(R)\,v$, where $\chi^{-1}$ is read as $0$ at non-units. \item Let $R$ be such that any two elements are multiples of $(1-\varepsilon)r+\varepsilon s$ for some idempotent $\varepsilon$, and split $N\sqcup n$ into $b$ and $a$. If the rows $N$ or the rows $n$ of an $(N\sqcup n)\times b$ matrix $y$ have a left inverse, then $y=y_\gamma$ for an invertible $\gamma$; and for invertible $k$, if the rows $N$ of $y_k$ have a left inverse, so have the columns $n$ of $x_k$, and conversely. \end{enumerate} \end{lemma} \begin{proof} (a) Both blocks of columns span the kernel of the common rows $x_\gamma$, so they differ by an invertible $h$. Stacking a matrix $P$ with $Py_\gamma=1$ on $x_\gamma$ gives a square matrix whose product with $\gamma$ is block triangular with unit diagonal blocks, because $x_\gamma y_\gamma=0$ and $x_\gamma$ times the other columns of $\gamma$ is $1$; with $h^{-1}P$ in place of $P$ the same holds for $\gamma'$, and comparing determinants gives $\det\gamma'=\det\gamma\det h$. (b) Well defined by (a) and the transformation of $\Psi$; matched by construction; unique because a matched function is determined on the $x_\gamma$ and vanishes elsewhere; and the translates are matched because $x_\gamma g=x_{g^{-1}\gamma}$, $g^{-1}y_\gamma=y_{g^{-1}\gamma}$ and $\chi(\det g)\chi(\det g^{-1}\gamma)=\chi(\det\gamma)$. (c) The nonzero terms are those of invertible $u$, each equal to $v$. (d) Extend a left inverse $L$ of the rows $N$ of $y$ by zero to a left inverse $s$ of $y$; stacking $s$ on a complement gives an invertible matrix (the hypothesis on $R$ allows one to choose complements componentwise), whose inverse has $y$ as its first columns. For the second statement, the square matrix with rows $s$ and $x_k$ has determinant inverse to $\det k$, and reading $P^{-1}P=1$ in the columns $n$, the rows $s$ contribute nothing, so the columns $n$ of $x_k$ have a left inverse; the converse is symmetric. \end{proof} \begin{proposition}[Square law]\label{prop:square-law} Let $L$, $L'$ satisfy the square law with constant $c$. \begin{enumerate}[label=\textup{(\alph*)}] \item For an $a\times b$ matrix $w$, $\#\GL_b(R)\,L'\binom1{-w}=c\,\#\GL_a(R)\,L(w\ 1)$. \item With $L'$ evaluated at $y$ stacked on the inclusion of $a$ in $a\sqcup b$ and $L$ at the inclusion of $n$ in $n\sqcup b$ placed left of $x$, $\#\GL_a(R)\sum_yp(y)L'(\cdot)=c\,\#\GL_{n\sqcup b}(R)\sum_x\mathrm{next}(p)(x)L(\cdot)$. \item If the additive and multiplicative characters of $R$ are primitive, there is $\gamma$ with $\abs\gamma^{-2}=\#R^{\#T(\#T+2\#N)}$ such that the same identity holds for the Fourier transforms of the conjugates of $p$ and of $\mathrm{next}(p)$, with $\gamma c$ in place of $c$. \end{enumerate} \end{proposition} In (c) the shapes are $n=N$, $a=N\sqcup T$ and $b=T$. \begin{proof} (a) Let $\delta$ be the indicator of $w$ among the $a\times b$ matrices. The block determinant functions $\Phi(x_1\ x_2)=\chi^{-1}(\det x_2)\delta(x_2^{-1}x_1)$ and $\Psi\binom{y_1}{y_2}=\chi^{-1}(\det y_1)\delta(-y_2y_1^{-1})$ are matched (\cref{prop:matched}(a), which holds over any commutative ring). The matrices $y$ with $\Psi(y)\ne0$ are $\binom1{-w}y_1$ with $y_1\in\GL_b(R)$, and there $\Psi(y)L'(y)=\chi^{-1}(\det y_1)\chi(\det y_1)L'\binom1{-w}$, so $\sum\Psi L'=\#\GL_b(R)L'\binom1{-w}$. Likewise the matrices $x$ with $\Phi(x)\ne0$ are $x_2(w\ 1)$ with $x_2\in\GL_a(R)$, and $\sum\Phi L=\#\GL_a(R)L(w\ 1)$. The square law gives the identity. (b) Order $n\sqcup a\sqcup b$ so that $a$ comes first, and apply (a) with $a$ in the role of $b$ and $n\sqcup b$ in the role of $a$, at $w=\binom{-y}0$ for an $n\times a$ matrix $y$. Then $\binom1{-w}$ is $y$ stacked on the inclusion $\binom10$ of $a$ in $a\sqcup b$, and $(w\ 1)$, with the columns reordered, is $\begin{pmatrix}1&-y&0\\0&0&1\end{pmatrix}$. For $x=\binom{\eta\ s}{0\ 1}$ the matrix obtained by placing the inclusion of $n$ in $n\sqcup b$ left of $x$ is $\begin{pmatrix}1&\eta&s\\0&0&1\end{pmatrix}$, which the unipotent matrix $\binom{1\ -s}{0\ \ 1}$ of determinant $1$ carries to $\begin{pmatrix}1&\eta&0\\0&0&1\end{pmatrix}$; so $L$ there does not depend on $s$ and equals $L(w\ 1)$ with $y=-\eta$. Summing (a) over $y$ with the weights $p(y)$ and writing $y=-\eta$, the right side is $c\,\#\GL_{n\sqcup b}(R)$ times the sum over $\eta$ and the average over $s$ of $p(-\eta)L(\cdots)$, which is the sum weighted by $\mathrm{next}(p)$ (\cref{lem:finite-matching}, and the description of the sums over block matrices as iterated sums over the blocks). (c) \emph{Fourier transform of the next datum.} At a block matrix $\binom{A\ B}{C\ D}$ the transform of $\mathrm{next}(p)$ is $\hat p(-A)\psi(\tr D)$ if $C=0$ and $0$ otherwise: the sum over $s$ of $\psi(\tr(Cs))$ is $\#M(R)$ or $0$ according as $C=0$ or not, the additive character being primitive. \emph{The Gauss sum.} Let $G=\sum_d\chi(\det d)\psi(\tr d)$ over the $T\times T$ matrices $d$; for primitive characters $\abs G^2=\#R^{\#T^2}$. For a function $L$ transforming by $\chi\circ\det$ on the left, the weight given by the transform of $\overline{\mathrm{next}(p)}$ spreads over all corner blocks $d$ with the factor $\psi(\tr d)$, while the weight $\mathrm{next}(\hat{\bar p})$ lives on $d=1$. Replacing $d$ by $gd$ multiplies the term by $\chi(\det g)$, so the transform in $d$ at $1$ is $G$ times the value at $d=1$, and the sum over the blocks $s$ contributes the number $\#R^{\#N\#T}$ of such blocks. Hence the two weighted sums of $L$ differ by a constant $\gamma_0$ with $\abs{\gamma_0}^2=\#R^{\#T^2}\#R^{2\#N\#T}=\#R^{\#T(\#T+2\#N)}$. \emph{The identity.} Apply (b) to $q=\hat{\bar p}$ and replace $\mathrm{next}(q)$ by $\gamma_0^{-1}$ times the transform of $\overline{\mathrm{next}(p)}$; here $a=N\sqcup T$ and $n\sqcup b=N\sqcup T$, so the two general linear groups in (b) have the same order and cancel. The constant is $\gamma=\gamma_0^{-1}$. \end{proof} \subsection{Abstract triangles}\label{ss:triangles} A \emph{triangle of size $m$} consists of inner product spaces $F_{i,n}$, arrows $a_{i,n}\colon F_{i,n}\to F_{i,n+1}$ along the rows, descents $d_{i,n}\colon F_{i,n+1}\to F_{i+1,n}$, nonzero weights $w_n$ and isometries $j_i\colon V\to F_{i,0}$, all depending on a parameter, such that the squares commute up to scalars, $\langle v,a(j_iy)\rangle=\langle dv,j_{i+1}y\rangle$ on the copies of $V$, and $d\circ a$ maps each copy injectively to the next. The \emph{weighted chain} $X_{i,n}$ is the composite of the first $n$ arrows of row $i$, each multiplied by its weight. A triangle \emph{has square moduli} $L$ for a unital multiplicative relation $c\sim f$, read \emph{$c$ has modulus $f$}, if the square at $(i,n)$ reads $w_n\,a\circ d=(w_{n+2}/\bar\beta)\,d\circ a$ with $\beta$ of modulus $L_{i+1,i+n+2}$, and the adjoint law holds with constants of modulus $1$. \lean{New.blockTriangular_fromBlocks_blockNumber_succ_iff, New.card_parabolic_blockNumber_succ, New.Exchange.SquareCommutes, New.Exchange.SquareAdjoint, New.Exchange.IsTriangle, New.Exchange.HasSquareModuli, New.Exchange.weightedChain, New.Exchange.weightedChain_zero_apply, New.Exchange.weightedChain_succ_apply, New.Exchange.ChainCommutes, New.Exchange.ChainAdjoint, New.Exchange.ChainCommutes.succ, New.Exchange.ChainAdjoint.succ, New.Exchange.IsTriangle.exists_chainAdjoint, New.Exchange.chainCommutes_zero, New.Exchange.IsTriangle.exists_chainCommutes, New.Exchange.HasSquareModuli.exists_chainCommutes, New.Exchange.IsTriangle.exists_chainCommutes_and_chainAdjoint, New.Exchange.IsTriangle.eq_zero_of_weightedChain_eq_zero, New.Exchange.IsTriangle.ne_zero_of_chainCommutes, New.Exchange.IsTriangle.ne_zero_of_squareCommutes, New.Exchange.IsTriangle.inner_weightedChain_succ, New.Exchange.IsTriangle.exists_inner_weightedChain_eq} Here the square at $(i,n)$, for $i+n+2\le m$, has the corners $F_{i,n+1}$, $F_{i,n+2}$, $F_{i+1,n}$, $F_{i+1,n+1}$; \emph{commuting up to $\beta$} means $w_n\,a\circ d=(w_{n+2}/\bar\beta)\,d\circ a$ on $F_{i,n+1}$, the second scalar being read as $0$ where $\beta=0$. The \emph{adjoint law} with constant $\kappa$ asks that every $z\in F_{i,n+2}$ have a vector $x\in F_{i,n+1}$ with $\langle av,z\rangle=\langle v,x\rangle$ for all $v$ and $\langle dx,y\rangle=\kappa\langle dz,ay\rangle$ for all $y$. The weights are real in the application, and the inner products are conjugate linear in the first argument. Two laws for chains are used: \emph{$d$ moves past the $n$-chain up to $\beta$} if \[ X_{i+1,n}\circ d\circ a=\frac{w_{n+1}}{w_1w_0\bar\beta}\,d\circ X_{i,n+1}\qquad\text{on }F_{i,0}, \] and \emph{the arrow after the $n$-chain is adjoint to $d$ up to $\kappa$} if $\langle z,a(X_{i,n}j_iy)\rangle=\kappa\langle dz,X_{i+1,n}j_{i+1}y\rangle$ for all $z\in F_{i,n+1}$ and $y\in V$. \begin{lemma}[Chain laws]\label{lem:chain-laws} Consider a triangle of size $m$. \begin{enumerate}[label=\textup{(\alph*)}] \item $d$ moves past the empty chain up to $1$. If $d$ moves past the $n$-chain of row $i$ up to $\beta$ and the square at $(i,n)$ commutes up to $\beta'$, then $d$ moves past the $(n+1)$-chain up to $\beta\beta'$. Hence for $i+n0$. \end{enumerate} \end{lemma} \begin{proof} (a) The hypothesis says $u^*u=aS$; take determinants. (b) By \cref{thm:norm-one-lift}(c) the Gram operator of the $j$-th lift on the forms of level $J_M$ is $c_jc_QR_{j,\vartheta^j}$, and on the good forms, which are stable, the same holds; (a) gives $Z_j=(c_jc_Q)^{d}\det R_{j,\vartheta^j}$, with $d$ the dimension of the good forms of $W_j$. The good forms on $W_j$ and on $Y_0$ correspond with the same Hecke eigenvalues (\cref{thm:equal-multiplicities}), and the Rallis series acts on both by the same spherical Hecke operator, so its determinant is the same on the two spaces and the dimensions agree: $d=\dimT$, and $A_j=c_j$. Positivity is the injectivity of the lift (\cref{thm:norm-one-lift}(a)). \end{proof} \begin{lemma}[Gram form of the chain]\label{lem:chain-gram} \begin{enumerate}[label=\textup{(\alph*)}] \item There are $\kappa(\vartheta)$ with modulus $\prod_{1\le i0$, an integer $e$ and numbers $c(\vartheta)$ such that for every $m$-fold twist $\vartheta$ \[ \abs{c(\vartheta)}=C(\Nm Q)^{e/2}\prod_{1\le i0$. If $c(1)=0$, then $\Theta_1^*\Theta_1=0$, so $\Theta_1=0$, and as $\Theta_1$ is injective (\cref{prop:theta-triangle}(d)) the target is $0$; then any numbers serve, for instance $c(\vartheta)=f(\vartheta)$ with $C=1$, $e=0$. \emph{Positivity.} $Z(\vartheta)=\det(\Theta_\vartheta^*\Theta_\vartheta)$ is the square of the norm of the determinant of an injective map (\cref{prop:theta-triangle}(d)), hence positive; $Z_j>0$ by \cref{lem:volumes}(b). \emph{The factorisation.} By \cref{lem:volumes}(a) and \cref{thm:chain-norm}, \[ Z(\vartheta)=(c(\vartheta)c_Q^m)^{\dimT}\det R_\vartheta,\qquad\det R_\vartheta=\prod_{j=1}^m\det R_{j,\vartheta^j}, \] the determinant of a product being the product of the determinants. By \cref{lem:volumes}(b) each $\det R_{j,\vartheta^j}$ is $Z_j(\vartheta^j)/(A_jc_Q)^{\dimT}$; the powers $\vartheta^j$ have the same modulus $Q$ as $\vartheta$, hence the same $c_Q$. Hence \[ Z(\vartheta)=c(\vartheta)^{\dimT}\prod_{j=1}^m\frac{Z_j(\vartheta^j)}{A_j^{\dimT}}, \] the factors $c_Q$ cancelling. Divide by the same identity at $\vartheta=1$, where $Q$ is empty: the $A_j$ cancel, and $(c(\vartheta)/c(1))^{\dimT}$ is a positive real number, being a quotient of positive numbers by positive numbers; so it is its modulus $\bigl((\Nm Q)^{e/2}\prod\varrho_{i,j}(\vartheta)\bigr)^{\dimT}$. \emph{The height.} By \cref{prop:moduli}(c) each $\varrho_{i,j}$ is a ramified ratio, a product of at most $t$ ratios of $L$-values of a ramified pair at a power $\xi_\iota^n$, $1\le n\le m$; for a family with small ratios the inverse of each such ratio has height at most $x_1$ (\cref{def:small-ratios}), so the inverse of $\varrho_{i,j}(\xi_\iota)$ has height at most $tx_1$. There are at most $m^2$ pairs $i