\documentclass[11pt,reqno]{amsart} \usepackage{jaswal} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\F}{\mathbb{F}} \newcommand{\Af}{\mathbb{A}_f} \newcommand{\Zhat}{\widehat{\mathbb{Z}}} \newcommand{\Qbar}{\overline{\mathbb{Q}}} \newcommand{\Gm}{\mathbb{G}_{\mathrm{m}}} \newcommand{\PP}{\mathbb{P}} \newcommand{\Lb}{\mathcal{L}} \newcommand{\ad}{\mathrm{ad}} \newcommand{\der}{\mathrm{der}} \newcommand{\ab}{\mathrm{ab}} \newcommand{\BB}{\mathrm{BB}} \newcommand{\QRH}{\mathrm{QRH}} \DeclareMathOperator{\Sh}{Sh} \DeclareMathOperator{\Gal}{Gal} \theoremstyle{definition} \newtheorem{algorithm}[theorem]{Algorithm} \crefname{algorithm}{Algorithm}{Algorithms} \AddToHook{env/algorithm/begin}{\crefalias{theorem}{algorithm}} \theoremstyle{remark} \newtheorem*{remark*}{Remark} \theoremstyle{plain} \DeclareMathOperator{\Irr}{Irr} \DeclareMathOperator{\MT}{MT} \DeclareMathOperator{\disc}{disc} \DeclareMathOperator{\Lie}{Lie} \DeclareMathOperator{\Ad}{Ad} \DeclareMathOperator{\Sel}{Sel} \renewcommand{\thepart}{\Roman{part}} \makeatletter \def\part{\@startsection{part}{0}\z@{1.5\linespacing\@plus\linespacing}{\linespacing}{\normalfont\large\bfseries\centering}} \makeatother \begin{document} \title[Effective André--Oort for Shimura varieties]{An effective André--Oort theorem for Shimura varieties} \author{Manvir Jaswal} \address{Toronto, Canada} \email{manvirjaswal@icloud.com} \urladdr{https://manvirjaswal.github.io} \date{November 27, 2026} \subjclass[2020]{Primary 11G18; Secondary 14G35, 11R42, 11F46} \keywords{André--Oort conjecture, Shimura varieties, special subvarieties, Hecke correspondences, zero-free regions} \hypersetup{pdftitle={An effective André–Oort theorem for Shimura varieties},pdfauthor={Manvir Jaswal},pdfkeywords={André–Oort conjecture, Shimura varieties, special subvarieties, Hecke correspondences, zero-free regions}} \begin{abstract} We prove an effective André--Oort theorem for every Shimura variety. Let $Z$ be a subvariety defined over a number field. For every special subvariety maximal in $Z$ we bound its degree, and the discriminant and level invariant that Klingler and Yafaev attach to it, by effectively computable constants, polynomial in the degree of $Z$ and that of its field of definition. The proof follows Edixhoven, Klingler, Ullmo and Yafaev through Hecke correspondences. For the discriminant and level bounds, a zero-free half-plane for one Dedekind zeta function suffices in place of the generalized Riemann hypothesis, and Cureton and Thorner prove such a half-plane for every number field. In Mumford's moduli spaces of abelian varieties an algorithm lists the special subvarieties maximal in $Z$ from equations for its closure. \end{abstract} \maketitle \contents \section{Introduction}\label{sec:intro} Let $S$ be a Shimura variety and $Z\subset S$ a closed subvariety. A special subvariety $V\subset Z$ is \emph{maximal in $Z$} if no special subvariety $V'$ with $V\subsetneq V'\subset Z$ exists. The André--Oort conjecture \cite{Andre89,Oort97} says that $Z$ contains only finitely many maximal special subvarieties. By the o-minimal strategy of Pila and Zannier \cite{PilaZannier}, Tsimerman proved it for $\mathcal{A}_g$ \cite{Tsimerman}, and Pila, Shankar and Tsimerman for every Shimura variety, by bounding the heights of special points \cite[Thm.~1.2]{PST}, to which Binyamini, Schmidt and Yafaev had reduced it \cite[Thms.~1 and~2]{BSY}. Earlier, Klingler and Yafaev \cite{KY} and Ullmo and Yafaev \cite{UY} proved it under the generalized Riemann hypothesis (GRH) for CM fields, along a route through Hecke correspondences and Galois orbits that goes back to Edixhoven \cite{Edixhoven98,Edixhoven}, Edixhoven and Yafaev \cite{EY} and Yafaev \cite{Yafaev}. Neither proof bounds the maximal special subvarieties of $Z$ effectively in terms of $Z$. Given the theorem, Scanlon's automatic uniformity shows that their number and their degrees are bounded in terms of the degree of $Z$ \cite[Thms.~2.4 and~4.2]{Scanlon}, without a way to compute the bounds. In the o-minimal proofs the counting theorem of Pila and Wilkie \cite{PilaWilkie} for sets definable in $\R_{\mathrm{an},\exp}$ is not effective in general \cite{BinyaminiCrelle}; the uniformizations of Shimura varieties are definable in Binyamini's effectively o-minimal structure $\R_{\mathrm{LN},\exp}$, whose counting theorem is effective once their format is computed \cite{BinyaminiLN}. The lower bounds for Galois orbits of special points rest on the Brauer--Siegel theorem \cite[Prop.~6]{BSY}, \cite{Tsimerman}, whose constants are ineffective \cite{Siegel35} unless Siegel zeros are excluded \cite{Stark}. In the proof under GRH the existence of a small prime that splits completely in the splitting field of a torus is proved for the members of a Zariski-dense set of special subvarieties of $Z$, after the set is replaced by a subset with the same Zariski closure \cite[Prop.~10.2.3]{KY}, not for each special subvariety. The other half of the proof is equidistribution, through Ratner's theorem \cite{ClozelUllmo,UY}, which gives no bound; Daw replaced it in that proof by Hecke correspondences and degree bounds \cite[Thm.~10.1]{Daw}. We give effective bounds along the route through Hecke correspondences, for every Shimura variety and polynomial in the degree of $Z$ and the degree of a field of definition: for the degrees with no hypothesis, and for the discriminants and level invariants that Klingler and Yafaev attach to a special subvariety, with GRH replaced by a zero-free half-plane for one Dedekind zeta function. In Mumford's moduli spaces the bounds give an algorithm that lists the maximal special subvarieties of $Z$ from equations for the closure of $Z$, and so their number (\cref{thm:list}). \subsection{Results}\label{sec:results} Let $(G,X)$ be a Shimura datum and $K=\prod_pK_p\subset G(\Af)$ a neat compact open subgroup, and fix a faithful representation $\rho\colon G\to\mathrm{GL}_{n_\rho}$ with $\rho(K)\subset\mathrm{GL}_{n_\rho}(\Zhat)$. Degrees on $\Sh_K(G,X)$ are taken for the Baily--Borel bundle $\Lb_K$, the extension of the bundle of top-degree holomorphic forms to the Baily--Borel compactification (\cref{sec:setting}). A special subvariety $V$ has a generic Mumford--Tate group $H_V$; let $T_V$ be the connected center of its image in the adjoint group $G^\ad$, let $L_V$ be the splitting field of $T_V$ and $d_{L_V}$ its absolute discriminant, and let $\alpha_V\ge1$ be the invariant of Klingler and Yafaev that measures how far the level is from maximal on $T_V$ (\cref{def:alpha}); in \cref{thm:main,thm:Ag} it is taken on the adjoint Shimura variety, for the adjoint representation. For $\delta\in(0,1/2]$ and a number field $L$ we write \[ \QRH(\delta;L)\colon\quad \zeta_L(s)\ne0\quad\text{for }\operatorname{Re}s>1-\delta,\ s\ne1 , \] a quasi-Riemann hypothesis for $\zeta_L$. \needspace{4\baselineskip} \begin{theorem}\label{thm:main} Let $(G,X)$, $K$ and $\rho$ be as above, and let $\delta\in(0,1/2]$. For all integers $D,d\ge1$ there are numbers $c_{\deg}(D)$ and $c(\delta,D,d)$, effectively computable from $(G,X,K,\rho)$, $D$, $d$, $\delta$ and fixed representatives of the connected components of the adjoint Shimura variety, with the following property. Let $F\supset E(G,X)$ be a number field with $[F:\Q]=d$, let $Z\subset\Sh_K(G,X)$ be a closed subvariety that is geometrically irreducible, defined over $F$ and of degree at most $D$, and let $V$ be a special subvariety maximal in $Z$. Then \begin{enumerate}[(i)] \item $\deg V\le c_{\deg}(D)$; \item if $\QRH(\delta;L_V)$ holds, then $d_{L_V}\le c(\delta,D,d)$ and $\alpha_V\le c(\delta,D,d)$. \end{enumerate} Moreover, for every $\varepsilon>0$ there are $C'_\varepsilon$, effectively computable from $(G,X,K,\rho)$, $\varepsilon$ and the same representatives, and $C_\varepsilon$, effectively computable from these and $\delta$, such that $c_{\deg}(D)\le C'_\varepsilon D^{4^n+\varepsilon}$ and $c(\delta,D,d)\le C_\varepsilon\,d^{2^n/\mu+\varepsilon}D^{3\cdot4^n/\mu+\varepsilon}$, where $n:=\dim\Sh_K(G,X)$ and $\mu\le1/32$ is the exponent of $d_{L_V}$ in the lower bound for Galois orbits (\cref{cor:D}), formed for the adjoint datum (\cref{thm:NA}); $\mu$ does not depend on $\delta$. \end{theorem} The only analytic hypothesis is the zero-free half-plane for the one Dedekind zeta function $\zeta_{L_V}$ of the subvariety in question. It is used only to produce primes that split completely in $L_V$, so no lower bound for class numbers is needed. Two choices keep the bounds of (ii) polynomial: the lower bound for the Galois orbit of $V$ is used as a power of $d_{L_V}$, where Klingler and Yafaev use a power of its logarithm, and the Hecke step is applied to the union of the Galois conjugates of $Z$, so that $d$ does not enter the exponent of the prime $l$ (\cref{sec:method}). Cureton and Thorner prove $\QRH(1/32;L)$ for every number field $L$ \cite[Theorem~1.1]{CuretonThorner}. \begin{corollary}[with {\cite[Theorem~1.1]{CuretonThorner}}]\label{cor:unconditional} In the setting of \cref{thm:main}, $\deg V\le c_{\deg}(D)$, $d_{L_V}\le c(1/32,D,d)$ and $\alpha_V\le c(1/32,D,d)$ for every special subvariety $V$ maximal in $Z$. \end{corollary} Hu's zero-free half-plane $\operatorname{Re}s>7/8$ for Hecke $L$-functions \cite[Theorem~1.2]{Hu} gives $\QRH(1/8;L)$ for every $L$, and with it \cref{cor:unconditional} holds with $c(1/8,D,d)$. The hypothesis that $Z$ be geometrically irreducible can be dropped at the cost of replacing $d$ by $dD$, and part~(i) of \cref{thm:main} holds for every closed $Z\subset\Sh_K(G,X)_\C$ of degree at most $D$, with $c_{\deg}$ evaluated at an explicit power of $D$ (\cref{cor:reducible}). We also prove lower bounds for Galois orbits of special points. With $\delta=1/32$ the second bound of \cref{thm:galois}(a) is Daw's Conjecture~22.1 \cite{Daw15} and \cref{thm:galois}(b) is Edixhoven's form \cite[Thm.~5.1]{Tsimerman}, each with effective constants. \needspace{4\baselineskip} \begin{theorem}\label{thm:galois} Let $(G,X)$ be a Shimura datum with $G$ adjoint and $G\ne1$, $K$ a neat product level, $\rho$ as above and $\delta\in(0,1/2]$. \begin{enumerate}[(a)] \item There are $A,\varepsilon>0$, effectively computable from $(G,X,K,\rho)$, $\delta$ and the representatives of the connected components, such that for every special point $x\in\Sh_K(G,X)$ for which $\QRH(\delta;L)$ holds for the splitting field $L$ of its Mumford--Tate group $T$, and every number field $F\supset E(G,X)$, $[F(x):F]\ge A\operatorname{disc}(x)^{\varepsilon}/[F:\Q]$, with $\operatorname{disc}(x)$ the discriminant of \cite[Def.~1]{BSY}. For $x$ in the image of $X^+\times\{1\}$, also $|\Gal(\Qbar/L)\cdot x|\ge c_1B_1^{i(T)}[K^m_T:K_T]\,d_L^{\mu}$, with $\mu$ of \cref{tab:constants} for $\rho$, in the form of \cite[Thm.~6.1]{UY15}, with $c_1,B_1>0$ effectively computable from $(G,X,K,\rho)$ and $\delta$. \item Let $g\ge1$. For every CM point $x$ of $\mathcal A_{g,1}$, or of $\mathcal A_{g,K(N)}$ with $N\ge1$, for which $\QRH(\delta;L)$ holds for the splitting field $L$ of its Mumford--Tate group, $|\Gal(\Qbar/\Q)\cdot x|\ge c_g(\delta)\operatorname{Disc}(R_x)^{\mu_g}$, with $R_x$ the center of $\mathrm{End}(A_x)$ and $c_g(\delta),\mu_g>0$ effectively computable from $g$ and $\delta$. \end{enumerate} By \cite[Theorem~1.1]{CuretonThorner}, (a) and (b) hold with $\delta=1/32$ for every special point. \end{theorem} \Cref{thm:galois}(a) is \cref{cor:anylevel}, with its second bound from \cref{cor:points,cor:pointsany}, and \cref{thm:galois}(b) is \cref{thm:AgDisc}. Daw states his conjecture for $G$ adjoint, $K$ a neat product level and special points in the image of $X^+\times\{1\}$. For a special point $V=\{x\}$ and $G$ adjoint, $d_{L_V}$ is the $d_L$ in the discriminant $\operatorname{disc}(x)=[K^m_T:K_T]\,d_L$ of \cite[Def.~1]{BSY}, the quantity in \cite[Thm.~1.2]{PST}. For $x$ maximal in $Z$, under $\QRH(\delta;L_V)$, both $\operatorname{disc}(x)$, at every neat product level and on every component, and $[F(x):F]$ are bounded by polynomials in $D$ and $d$ (\cref{cor:disc,cor:anylevel,cor:pointfield}), and for $\mathcal A_g$ so is $\operatorname{Disc}(R_x)$ (\cref{cor:AgOrder}). For the Siegel modular varieties the constants simplify. \begin{theorem}\label{thm:Ag} Let $g\ge1$, $N\ge3$, and let $\mathcal{A}_{g,K(N)}$ be the Shimura variety of $(\mathrm{GSp}_{2g},\mathcal{H}_g^\pm)$ at the principal congruence level $K(N)$. \begin{enumerate}[(i)] \item \Cref{thm:main} and \cref{cor:unconditional} hold for $\mathcal{A}_{g,K(N)}$, with $L_V$ the splitting field of the connected center of $H_V$ itself, $\alpha_V$ computed at the image of $K(N)$ in $\mathrm{PGSp}_{2g}(\Af)$, and with constants given in \cref{thm:AgK}(a). \item The same holds for $\mathcal{A}_{g,1}=\mathrm{Sp}_{2g}(\Z)\backslash\mathcal{H}_g$, whose level is not neat, with degrees defined through the cover $\mathcal{A}_{g,K(3)}$ (\cref{lem:degAg1}), $\alpha_V$ computed at the image of $\mathrm{GSp}_{2g}(\Zhat)$ in $\mathrm{PGSp}_{2g}(\Af)$, and constants given in \cref{thm:AgK}(b). \end{enumerate} \end{theorem} In genus~$4$ the closure of the Jacobian locus is the zero set of one modular form of weight~$8$, so its degree has an explicit upper bound, and \cref{thm:Ag}(ii) bounds $\deg V$, $d_{L_V}$ and $\alpha_V$ for its maximal special subvarieties~$V$ (\cref{cor:torelli4}). The bounds are polynomial in $D$ and $d$ (\cref{cor:size}). With $z:=\dim Z$, for adjoint $G$ the bound of \cref{thm:adjoint} is at most $(dD)^{2^z/\mu+o(1)}$ as $dD\to\infty$, with $\mu$ of \cref{tab:constants} for $\rho$ (\cref{rem:size}). Turning these bounds into a list needs, in addition, an explicit model of the Shimura variety with a universal family of abelian varieties. No explicit model is known in general. Let $g\ge2$, let $d_\Upsilon$ be a positive multiple of $8$ and $\Upsilon:=(d_\Upsilon,\dots,d_\Upsilon)$, with $g$ entries. Mumford's moduli space $M_\Upsilon$ of principally polarized abelian varieties with an $\Upsilon$-marking is open in a closed subscheme of a projective space given by explicit equations over $\Q$, and $M_\Upsilon\otimes\C$ is a connected Shimura variety for $\mathrm{GSp}_{2g}$, at a level $K_\Upsilon$ (\cref{sec:mumford}). \needspace{4\baselineskip} \begin{theorem}[with {\cite[Theorem~1.1]{CuretonThorner}}]\label{thm:list} Let $g\ge2$, $8\mid d_\Upsilon$, and let $Z\subset M_\Upsilon\otimes\Qbar$ be closed, geometrically irreducible and defined over a number field. Then \cref{alg:listing} computes, from equations in Mumford's coordinates for the closure of $Z$ in Mumford's projective space, the special subvarieties maximal in $Z$. In particular, if $Z$ is a curve that is not special, it computes the special points of $Z$. \end{theorem} \Cref{alg:listing} is built on Urbanik's algorithm \cite[Cor.~6.3]{Urbanik} (\cref{sec:method}) and is run with the bounds that \cref{thm:Ag}(i) gives at the level $K(2d_\Upsilon)$, which lies in the level of $M_\Upsilon$ (\cref{lem:Kdelta,lem:TR}), with $\delta=1/32$ (\cref{cor:unconditional}). These bounds depend on $Z$ through $\deg_{\Lb_{K_\Upsilon}}Z$ and the degree of its field of definition (\cref{lem:TR}), and $\deg_{\Lb_{K_\Upsilon}}Z$ is $(2(g+1))^{\dim Z}$ times the degree of the closure of $Z$ in Mumford's projective space (\cref{lem:Theta}). Most effective results concern products of modular curves: curves in $\C^2$ \cite{Kuhne,BMZ,FowlerWBH}, subvarieties of $Y(1)^n$ \cite{BinyaminiCrelle,BinyaminiPi,Papas}, linear subvarieties \cite{BiluKuhne} and linear relations among powers of singular moduli \cite{Fowler24,Fowler26}; beyond them, non-compact curves in Hilbert modular varieties \cite{BinyaminiMasser} and fiber powers of the Legendre family \cite{BJST}. In \cite{BinyaminiCrelle} Binyamini's degree bounds are effective and his discriminant bounds are effective up to one possible exceptional imaginary quadratic field, and \cite[Thm.~7]{BinyaminiPi} has one constant from Siegel's theorem. Both exceptions disappear with the zero-free half-plane of \cite{CuretonThorner}, as Bhattacharya observed with one for Dirichlet $L$-functions \cite[Thms.~35.2 and~35.3]{Bhattacharya}. For fixed $n$, the bounds of \cite[Thm.~7]{BinyaminiPi}, and the number of steps of its algorithm that lists the maximal special subvarieties, are polynomial in the degree and logarithmic height of $Z$ and the degree of its field of definition. As in \cite{BinyaminiCrelle}, the height of $Z$ does not enter the constants of \cref{thm:adjoint}. Daw \cite{Daw} bounded the degrees of strongly special subvarieties from below; Daw, Javanpeykar and Kühne extended this bound to all special subvarieties of positive dimension \cite[Thm.~6.1]{DJK} and bounded, with no arithmetic hypothesis, the degrees of maximal special subvarieties that are not of facteur type \cite[Thm.~1.3]{DJK}, a class defined by Ullmo \cite{Ullmo07}. Binyamini and Daw bounded the degree of every weakly optimal subvariety of $Z$, on a connected Shimura variety $\Gamma\backslash X^+$ with $\Gamma$ neat and $Z(G)(\R)$ compact, hence of every special subvariety of positive dimension maximal in $Z$, by a polynomial in the degree of $Z$; the polynomial depends on equations for a Baily--Borel embedding and for the canonical connection \cite[Thm.~5 and p.~2157]{BinyaminiDaw}. \subsection{The method}\label{sec:method} We follow the route of Edixhoven, Klingler, Ullmo and Yafaev. For a special subvariety $V\subset Z$ that is not strongly special, their Hecke step says that $Z$ contains a larger special subvariety once a prime $l$ as in \cite[Thm.~9.2.1, (9.1)]{KY} exists. For a suitable prime $l$ that splits completely in $L_V$ and a Hecke correspondence $T_m$ at $l$, the Galois orbit of $V$ lies in $Z\cap T_mZ$; if $Z\not\subset T_mZ$, an upper bound for the degree of this intersection contradicts a lower bound for the Galois orbit, and if $Z\subset T_mZ$, then $Z$ contains a larger special subvariety \cite[Thm.~7.2.1]{KY}. Two inputs make this work: a lower bound for the Galois orbit of $V$ of the form $C(N)\alpha_V(\log d_{L_V})^N$ \cite[Thm.~2.19]{UY}, and the existence of a split prime $l$ smaller than a fixed power of $\alpha_V\log d_{L_V}$ \cite[Prop.~10.2.3]{KY}. GRH enters only here, both times to find primes that split completely in $L_V$ \cite[Prop.~10.1.2]{KY}, \cite[Prop.~2.13]{UY}. We make each step explicit and replace GRH by $\QRH(\delta;L_V)$. \emph{Split primes.} Under $\QRH(\delta;L)$ an explicit formula with a smoothing that removes the constants at $s=0$ and $s=-1$ gives primes that split completely in $L$ in every interval $(x/4,x]$ with $x$ a fixed power of $\log d_L$, the power being $1/\delta$ instead of the $2+o(1)$ of GRH (\cref{lem:SP,lem:Aprime}). Frei, Sofos and Widmer obtain, under the same hypothesis, primes of every Frobenius class in $(x/2,x]$ for $x\ge c(\delta)(\log d_L)^{1/\delta}(\log\log d_L)^{2/\delta}$, with a constant $c(\delta)$ that is not made explicit \cite[Cor.~1.2]{FSW}. Hu deduces from his half-plane, with no hypothesis, a prime of every Frobenius class of norm $\ll(\log(e\,d_L)+[L:\Q])^8$ \cite[Cor.~9.6]{Hu}. We need only the completely split case, but with explicit constants. For the Galois bound we rerun the argument of Ullmo and Yafaev for the torus $T_V$ \cite[\S6]{UY15}, with the split primes taken up to a fixed power of the discriminant, as Tsimerman does under GRH for CM points of $\mathcal{A}_g$ \cite[\S7.3, Thm.~7.6]{Tsimerman12} (Ullmo and Yafaev take them up to about $|H|\log|H|$, with $|H|$ the class-group factor of the orbit \cite[pp.~33 and~35]{UY15}). So any $\delta>0$ suffices, and the exponent $\mu$ in the bound $\gg\alpha_Vd_{L_V}^{\mu}$ does not depend on $\delta$ (\cref{prop:C,cor:D}). Klingler and Yafaev use this bound in the weaker form $\gg\alpha_V(\log d_{L_V})^N$; we use the power of $d_{L_V}$ itself. Then the prime $l$ of the Hecke step, of size a power of $\log d_{L_V}$ and $\log\alpha_V$, is set against an orbit of size $\alpha_Vd_{L_V}^\mu$, so any $\delta>0$ works there too, and for adjoint $G$ the bounds for $\alpha_V$ and $d_{L_V}$ are at most a power of $[F:\Q]\deg Z$ (\cref{lem:solve,rem:size}). \emph{Uniformity in the level.} The Hecke step works at an Iwahori level $I_l$ that varies with the prime $l$. Every constant must therefore be uniform in the level, including the constant in Bézout's inequality. The proof of \cite[Thm.~9.2.1]{KY} bounds the degree of $Z\cap T_mZ$, taken at an Iwahori level, by Bézout's inequality with constant $1$ \cite[(9.5)]{KY}, and the proof of \cite[Prop.~10.1]{DJK} does the same at its Iwahori level. For an ample bundle this inequality can fail (\cref{ex:bezout}); we use the constant $c_B$ of \cref{lem:bezout}, which does not affect the main theorem of \cite{KY}: the choice of $l$ in \cite[\S10.2]{KY} absorbs it. We show that the complete linear system of $\Lb_J^{\otimes e}$ is base-point free and separates points for every $e\ge e^*(n)$, at every neat level $J$ of every Shimura datum of dimension at most $n$ (\cref{thm:e0}, proved in \cref{sec:e0}). So Bézout's inequality holds at every neat level with the constant $e^*(n)^{2n}$ (\cref{lem:bezout}), and the Hecke step runs as in \cite{KY}, with degrees taken for the Baily--Borel bundle at each level and the exponent $2^r$, $r$ the codimension of $V$ in $Z$. \needspace{4\baselineskip} \begin{theorem}\label{thm:e0} Let $(G,X)$ be a Shimura datum, $K$ neat, and $n:=\dim\Sh_K(G,X)$. Put $e^*(n):=\lfloor\sum_{k=1}^n k\,2^{1/k}\rfloor+2$. For every integer $e\ge e^*(n)$ the complete linear system $|\Lb_K^{\otimes e}|$ on the Baily--Borel compactification is base-point free and separates points. Moreover $e^*(n)\le n(n+3)/2+2$. \end{theorem} The proof applies Fujino's Angehrn--Siu theorem for log canonical pairs \cite{Fujino} to the Baily--Borel compactification, which is log canonical with log canonical bundle $\Lb_K$ by Mumford's description of the canonical extension \cite[Prop.~3.4]{Mumford77}. For ball quotients, G.~Di~Cerbo and L.~F.~Di~Cerbo show that on a smooth toroidal compactification $\widetilde Y$ of dimension $n\ge2$ with boundary $\partial\widetilde Y$ the divisor $m(K_{\widetilde Y}+\partial\widetilde Y)$ is base-point free for $m\ge\binom n2+1$ and separates the points of $\widetilde Y\smallsetminus\partial\widetilde Y$ for $m\ge\binom n2+2$ \cite[Cor.~3.3 and~3.4]{DiCerbo}. \emph{Degrees.} Daw, Javanpeykar and Kühne bound the degree of a maximal special subvariety that is not of facteur type by an iteration of Hecke correspondences \cite[\S10]{DJK}, which builds on the one Daw ran for strongly special subvarieties \cite[Thm.~9.3]{Daw} after \cite[Thm.~9.2.1]{KY}. For adjoint $G$, the iteration of \cite{DJK}, with the uniform Bézout step and a fiber-saturation lemma, also bounds every positive-dimensional one by an effectively computable function of $D$ whose constants depend only on $(G,X,K,\rho)$. The bound of \cite[Thm.~5]{BinyaminiDaw} holds for every weakly optimal subvariety of $Z$ and is polynomial in $D$ of unspecified degree; \cref{thm:degrees}, proved in \cref{sec:degrees}, treats only the positive-dimensional special subvarieties maximal in $Z$, for adjoint $G$ and a neat product level, and there gives $D^{2^{\dim Z}+o(1)}$. \begin{theorem}\label{thm:degrees} Let $(G,X)$ be a Shimura datum with $G$ adjoint and $K$ a neat product level, let $Z\subset\Sh_K(G,X)_\C$ be closed and irreducible, of degree $D$, and let $V$ be a special subvariety maximal in $Z$ with $\dim V\ge1$. Then $\deg V$ is at most the largest of the constants $c_{\deg}^\ad(\dim Z,D)$ of \cref{thm:D} at the connected components of $\Sh_K(G,X)_\C$ (\cref{sec:special}), a number that depends only on $(G,X,K,\rho)$, $\dim Z$ and $D$, is effectively computable given representatives of the components, and is $D^{2^{\dim Z}+o(1)}$ as $D\to\infty$. No arithmetic hypothesis is used. \end{theorem} \emph{Assembly.} Call the smallest special subvariety containing $Z$ its \emph{special closure}. Maximal special subvarieties fall into three classes: strongly special ones, which \cref{thm:degrees} bounds; those that are not strongly special in the special closure of $Z$, which the Hecke step bounds; and those whose torus is the center of the generic Mumford--Tate group of $Z$, which are strongly special in the special closure but not in $S$. The last class needs a separate argument (\cref{lem:Za,lem:Zb}). So that $[F:\Q]$ does not enter the exponent of $l$ in the Hecke step, we apply it to the union of the Galois conjugates of the lift of $Z$ to its special closure, over the reflex field of the closure; if the larger special subvariety lies in another conjugate, $V$ lies in the intersection of $Z$ with that conjugate, which has smaller dimension, and we repeat until $V$ is in the last class relative to the intersection (proof of \cref{thm:adjoint}). For a general Shimura datum, the map to the adjoint Shimura variety need not be injective on connected components, and maximality can be lost under it; a recursion on dimension at the fixed level handles this (\cref{sec:general}). \emph{Listing.} For $\mathcal A_g$ in Mumford's model, the bounds determine finitely many PEL data, each with an explicit locus of abelian varieties with the given endomorphisms (\cref{lem:Oprime}). Every special subvariety $V$ is rigid in the normalization of one of these loci (\cref{lem:P}), so it lies in the finite set of weakly special subvarieties of bounded degree, containing the rigid ones, that Urbanik's algorithm computes on the normalization \cite[Cor.~6.3]{Urbanik}; a test on the algebraic monodromy at one point, computed on a certified curve (\cref{lem:Rprime,lem:G,prop:T3}), decides which outputs are rigid, and rigid ones are special. \subsection{Plan}\label{sec:plan} \Cref{part:bounds} proves the bounds: \cref{thm:adjoint} in \cref{sec:adjoint} for adjoint groups, and from it \cref{thm:main} in \cref{sec:general}. \Cref{sec:primes,sec:e0} are independent of each other, and \cref{sec:hecke} uses both. \Cref{part:listing} proves \cref{thm:list}; it uses \cref{part:bounds} only through \cref{thm:AgK} and its constants, \cref{lem:Oprime} and the argument of \cref{lem:LV}, and can be read after \cref{sec:setting} and \cref{lem:Oprime}. \Cref{app:SP,app:KY816} prove \cref{lem:SP,lem:KY816}, and \cref{app:index} proves \cref{lem:DJK67} and the bound for $h_K$ in \cref{cor:H}. \part{Bounds}\label{part:bounds} \section{Setting, notation and the complexity}\label{sec:setting} \subsection{Shimura varieties and degrees}\label{sec:shimura} A Shimura datum $(G,X)$ satisfies Deligne's axioms; $E(G,X)$ is its reflex field and $X^+$ a connected component of $X$. For a compact open subgroup $K\subset G(\Af)$, \[ \Sh_K(G,X)_\C=G(\Q)\backslash X\times G(\Af)/K, \] with its canonical model over $E(G,X)$. We say that $K$ is a \emph{product level} if $K=\prod_pK_p$ with $K_p\subset G(\Q_p)$, and \emph{neat} in the sense of Pink \cite[0.6]{Pink}. We write $G(\Q)_+:=G(\Q)\cap\lambda^{-1}(G^\ad(\R)^+)$, where $\lambda\colon G\to G^\ad$ is the adjoint map and $G^\ad(\R)^+$ the identity component, and $G^\ad(\Q)_+:=G^\ad(\Q)\cap G^\ad(\R)^+$. For neat $K$ every connected component of $\Sh_K(G,X)_\C$ is a quotient $\Gamma\backslash X^+$, with $\Gamma\subset G^\ad(\Q)_+$ the image of $G(\Q)_+\cap gKg^{-1}$ for some $g\in G(\Af)$ \cite[\S4.1]{KY}, which is neat \cite[0.5]{Pink} and arithmetic \cite[Prop.~3.2]{Milne}, as $G(\Q)_+\cap gKg^{-1}$ has finite index in the congruence subgroup $G(\Q)\cap gKg^{-1}$, $G^\ad(\R)$ having finitely many components \cite[p.~54]{Milne}. We fix a faithful representation $\rho\colon G\to\mathrm{GL}_{n_\rho}$ with $\rho(K)\subset\mathrm{GL}_{n_\rho}(\Zhat)$, and write $n:=\dim\Sh_K(G,X)$. Let $\overline{\Sh}_K(G,X)$ be the Baily--Borel compactification. For neat $K$ the line bundle of holomorphic forms of top degree on $\Sh_K(G,X)_\C$ extends to an ample line bundle $\Lb_K$ on $\overline{\Sh}_K(G,X)$, given at the generic points of the boundary divisors by forms with logarithmic poles and defined over $E(G,X)$; for neat $K_2\subset gK_1g^{-1}$ the morphism $\Sh_{K_2}\to\Sh_{K_1}$ induced by $g$ extends to the compactifications and pulls $\Lb_{K_1}$ back to $\Lb_{K_2}$ \cite[Prop.~5.3.2]{KY}. For a closed subvariety $Y\subset\Sh_K(G,X)_\C$ we put \[ \deg Y:=\sum_{Y'}\deg_{\Lb_K}\overline{Y'}, \] the sum over the irreducible components $Y'$ of $Y$ of the degrees of their closures \cite[\S5.1 and Def.~5.3.3]{KY}. We use the projection formula in the form $\deg_{f^*\Lb}Y=(\deg f)\deg_{\Lb}f(Y)$ for $f$ generically finite and proper \cite[\S5.1]{KY}. \subsection{Special subvarieties}\label{sec:special} A \emph{special subvariety} of $\Sh_K(G,X)_\C$ is an irreducible component of the image of $\Sh_{K_H}(H,X_H)_\C\to\Sh_K(G,X)_\C$, $[x,h]\mapsto[x,hg]$, for a Shimura subdatum $(H,X_H)\subset(G,X)$, an element $g\in G(\Af)$ and $K_H:=H(\Af)\cap gKg^{-1}$. We may and do take $H$ to be the generic Mumford--Tate group on $X_H$, and write $H_V$ for it. Irreducible components of preimages and images of special subvarieties under the morphisms of Shimura varieties used below are special \cite[p.~14]{KY}. An irreducible subvariety is \emph{Hodge generic} if it is not contained in a special subvariety of smaller dimension than the connected component containing it, and a subvariety defined and irreducible over a number field is Hodge generic if its geometric components are \cite[Def.~7.1.1, Lemma~7.1.2]{KY}. The reflex field of a Shimura subdatum contains that of the datum, $E(G,X)\subset E(H,X_H)$ \cite[Remark~12.3(c)]{Milne}, and a morphism of Shimura varieties induced by $(H,X_H)\to(G,X)$ is defined over $E(H,X_H)$ \cite[Remark~13.8]{Milne}. Let $V$ be special with generic Mumford--Tate group $H_V$. In \crefrange{sec:setting}{sec:adjoint} the group $G$ is adjoint wherever $T_V$ appears (except in \cref{lem:LV}, where $T_V$ is the torus of the introduction), and we write $T_V$ for the connected center of $H_V$; in \cref{sec:general} we pass to the adjoint group first, so that $T_V$ is always the torus of the introduction. Let $L_V$ be the splitting field of $T_V$, $d_{L_V}:=|\disc L_V|$, and \[ \beta_V:=\log d_{L_V}. \] The subvariety $V$ is \emph{strongly special} if $T_V=1$ \cite[Def.~2.1.5]{KY}. More generally, a special subvariety of $\Sh_{K_P}(P,X_P)_\C$ for a Shimura datum $(P,X_P)$ is strongly special there if the connected center of the image of its generic Mumford--Tate group in $P^\ad$ is trivial \cite[Def.~2.1.5]{KY}. If $T_V\ne1$, then $T_V(\R)$ is compact and $T_V$ is not split over $\Q$ \cite[Lemma~2.4.3]{KY}, so $L_V\ne\Q$ and $\beta_V\ge\log3$ by Minkowski's theorem. Let $K^m_{T_V}$ be the maximal compact open subgroup of $T_V(\Af)$ and, for $V$ given by $(H_V,X_{H_V})$ and $g$ as above, $K_{T_V}:=T_V(\Af)\cap gKg^{-1}$. Replacing $(H_V,X_{H_V},g)$ by $(qH_Vq^{-1},qX_{H_V},qgk)$ with $q\in G(\Q)$ and $k\in K$ conjugates $K^m_{T_V}$ and $K_{T_V}$ by $q$, and replacing $g$ by $hg$ with $h\in H_V(\Af)$ changes neither, as $T_V$ is central in $H_V$; so the indices $|K^m_{T_V,p}/K_{T_V,p}|$ depend only on $V$ (compare \cite[Remark~2.4.2]{KY}). \needspace{4\baselineskip} \begin{definition}[{\cite[Def.~2.5.1]{KY}}]\label{def:alpha} For $V$ special with $T_V\ne1$, \[ \alpha_V:=\prod_{p:\,K^m_{T_V,p}\ne K_{T_V,p}}\max\bigl(1,B\,|K^m_{T_V,p}/K_{T_V,p}|\bigr), \] with the constant $B$ of \cref{tab:constants}. If $T_V=1$, we put $\alpha_V:=1$ and $d_{L_V}:=1$. The \emph{complexity} of $V$ is \[ \Delta(V):=\max\bigl(\deg V,\ d_{L_V},\ \alpha_V\bigr). \] \end{definition} Right translation $[x,a]\mapsto[x,ag^{-1}]$ is an isomorphism $\Sh_K(G,X)\to\Sh_{gKg^{-1}}(G,X)$, defined over $E(G,X)$ \cite[Thm.~13.6]{Milne} and pulling $\Lb_{gKg^{-1}}$ back to $\Lb_K$ (\cref{sec:shimura}), so it preserves degrees and fields of definition containing $E(G,X)$; it maps special subvarieties to special subvarieties with the same $T_V$, $L_V$ and indices, and the image of $X^+\times\{g\}$ onto $\Sh_{gKg^{-1}}(G,X^+)_\C$, the image of $X^+\times\{1\}$. The level $gKg^{-1}$ is again a neat product level, and if $K$ satisfies (Lv$'$) or (Lv) of \cref{sec:constants}, so does $gKg^{-1}$ for the lattice $\rho(g)\Zhat^{n_\rho}$. So in \crefrange{sec:hecke}{sec:adjoint} we assume, as \cite[p.~14]{KY} and \cite[\S9.1]{DJK} do, that $Z$ lies in $\Sh_K(G,X^+)_\C$. A special subvariety $V$ of $\Sh_K(G,X^+)_\C$ is then the image of $X_{H_V}^+\times\{1\}$ with $X_{H_V}^+\subset X^+$ \cite[Lemma~2.1]{UY}, so that $K_{T_V}=T_V(\Af)\cap K$; the same convention is used for a Shimura subdatum $(P,X_P)$ with $X_P^+\subset X^+$ in place of $(G,X)$, and for an $F$-irreducible $Z$ (\cref{sec:hecke}) it applies to a geometric component of $Z$ containing $V$; when a proof chooses a component of a preimage in $\Sh_J(P,X_P)_\C$, for $J\subset K\cap P(\Af)$ compact open, it is chosen in the image of $X_P^+\times\{1\}$. For $Z$ in the image of $X^+\times\{g_i\}$, with $g_i$ in a fixed finite set of representatives of $G(\Q)_+\backslash G(\Af)/K$, \cref{thm:D,thm:adjoint} hold with the constants of the level $g_iKg_i^{-1}$ and the lattice $\rho(g_i)\Zhat^{n_\rho}$ in place of those of $K$ and $\Zhat^{n_\rho}$. The symbols $c_{\deg}^\ad(z,D)$ and $c^\sharp(\delta,z,D,d)$ below are the constants of the level $K$; \cref{sec:general} uses the maxima $\bar c_{\deg}^\ad$ of $c_{\deg}^\ad$ and $\bar c^\sharp$ of $c^\sharp$ over the representatives. These maxima are effectively computable from $(G,X,K,\rho)$ and the chosen representatives; we do not discuss how to compute a set of representatives in general (for $\mathcal A_g$ none is needed, proof of \cref{thm:AgK}). \subsection{The constants of the datum}\label{sec:constants} We use the following normalization of the level: \begin{enumerate}[label=(Lv$'$)] \item $K$ is a neat product level, $\rho(K)\subset\mathrm{GL}_{n_\rho}(\Zhat)$, and $K_{p_0}$ is neat for some prime $p_0$. \end{enumerate} Here a subgroup of $G(\Q_p)$ is neat if, for each $k$ in it, the subgroup of $\overline{\Q}_p^\times$ generated by the eigenvalues of $\rho(k)$ contains no root of unity other than $1$, and a product level with one neat factor is neat \cite[\S4.1.4]{KY}. Klingler and Yafaev's normalization \cite[Situation~9.1]{KY}, \begin{enumerate}[label=(Lv)] \item $K$ is a neat product level, and $K_3$ lies in the principal congruence subgroup of level $3$ of $\mathrm{GL}_{n_\rho}(\Z_3)$, \end{enumerate} implies (Lv$'$) with $p_0=3$, since that subgroup is neat \cite[0.6]{Pink}; \cref{lem:LV} passes from any neat product level to one satisfying (Lv), at an explicit cost. Ullmo and Yafaev assume (Lv) in \cite[\S2.2]{UY} only to make the level neat \cite[p.~20 and Thm.~2.19]{UY}. The weaker condition serves $\mathcal A_g$, since at the level $K(N)$ the adjoint level $\lambda(K(N))$ has a neat factor at a prime dividing $N$, which need not be $3$ (proof of \cref{thm:AgK}(a)). \needspace{4\baselineskip} \begin{lemma}\label{lem:LV} Let $K$ be a neat product level, $K'_p:=K_p$ for $p\ne3$, $K'_3:=K_3\cap\ker(\mathrm{GL}_{n_\rho}(\Z_3)\to\mathrm{GL}_{n_\rho}(\F_3))$, $K':=\prod_pK'_p$ and $g_3:=|\mathrm{GL}_{n_\rho}(\F_3)|$. Then $K'$ satisfies (Lv), $[K:K']\le g_3$, and $\pi\colon\Sh_{K'}(G,X)\to\Sh_K(G,X)$ is finite étale of degree at most $[K:K']$ with $\pi^*\Lb_K=\Lb_{K'}$. Let $Z\subset\Sh_K(G,X)$ be closed and geometrically irreducible, defined over $F\supset E(G,X)$, of degree $D$, and $V$ special and maximal in $Z$. Then there are a closed, geometrically irreducible $Z'\subset\Sh_{K'}(G,X)$, defined over a field of degree at most $\deg\pi\cdot[F:\Q]$, with $\deg_{\Lb_{K'}}Z'\le\deg\pi\cdot D$, and a special $V'$ maximal in $Z'$ with $\pi(V')=V$, $\deg V\le\deg_{\Lb_{K'}}V'$ and $T_{V'}=T_V$. \end{lemma} \begin{proof} $K/K'$ acts transitively on the fibers of $\pi$, and for neat $K$ the stabilizers are the image of $Z(G)(\Q)\cap K$, which acts trivially; so $\pi$ is finite étale of degree at most $[K:K']$, and $\pi^*\Lb_K=\Lb_{K'}$ \cite[Prop.~5.3.2(1)]{KY}. Choose a component $V'$ of $\pi^{-1}(V)$ and a component $Z'$ of $\pi^{-1}(Z)$ containing it. The set $\pi^{-1}(Z)$ is defined over $F$ and has at most $\deg\pi$ components, which gives the field of $Z'$; and $\deg_{\Lb_{K'}}Z'\le\deg_{\Lb_{K'}}\pi^{-1}(Z)=\deg\pi\cdot D$ by the projection formula. If $V'\subsetneq V''\subset Z'$ with $V''$ special, $\pi(V'')$ would be a special subvariety of $Z$ of dimension larger than $\dim V$. \end{proof} Since $gK'g^{-1}\cap T(\Af)\subset gKg^{-1}\cap T(\Af)$ for every torus $T$ and every $g\in G(\Af)$, each index $|K^m_{T,p}/K_{T,p}|$ can only grow when $K$ is replaced by $K'$, so $\alpha$ computed at $K'$ is at least $\alpha$ computed at $K$. Put $c_U:=1/(2C_\Phi)$, where $C_\Phi$ bounds the orders of the component groups of the stabilizers in \cite[Lemma~4.4.1]{EY} in the following form. For a special $V$ let $T:=T_V$, let $F_T\supset L_T$ and $r_T\colon\mathrm{Res}_{F_T/\Q}\Gm\to T$ be the field and surjection of \cite[p.~42]{UY}, and for $d\ge1$ and a vector $v$ of the $d$-th exterior power of $\Qbar^{n_\rho}$ let $N$ be the subgroup of $X^*(\mathrm{Res}_{F_T/\Q}\Gm)$ generated by the differences $x-x'$ of the weights $x,x'$ of $\mathrm{Res}_{F_T/\Q}\Gm$, acting through $\rho\circ r_T$, in the support of $v$. The bound $C_\Phi$ satisfies \[ \bigl|\bigl(X^*(\mathrm{Res}_{F_T/\Q}\Gm)/N\bigr)_{\mathrm{tors}}\bigr|\ \le\ C_\Phi\qquad\text{for all special }V,\ d\ge1\text{ and }v\in\textstyle\bigwedge^d\Qbar^{n_\rho}. \] These come from the finitely many characters allowed by \cite[Lemmas~2.5--2.6]{UY}, so $C_\Phi$, and with it $c_U$, is computable from $(G,\rho)$. \begin{table}[ht] \caption{Constants attached to $(G,X,K,\rho)$, for $G$ adjoint.}\label{tab:constants} \begin{tabular}{@{}lp{7.4cm}l@{}} \toprule Constant & Meaning & Source\\ \midrule $n_T$ & a bound for $[L_V:\Q]$ over all special $V$ & \cite[proof of Lemma~2.5]{UY}\\ $R_G$ & a bound for the degree of the Galois closure of $E(H_V,X_{H_V})$ over all special $V$ & \cite[Lemma~2.5]{UY}, \cite[Def.~2.5.1]{KY}\\ $C_0$ & every prime $l>C_0$ has $K_l=G(\Z_l)$ hyperspecial & \cite[p.~53]{KY}\\ $a$, $A$, $r_U$ & $a$ bounds the indices of the auxiliary levels; $A$ an integer as in \cite[Prop.~2.9]{UY}; $r_U$ bounds the number of cyclic factors of $K^m_{T_V,p}/K_{T_V,p}$ & \cite[pp.~20--22, 29]{UY}\\ $B$ & $B=1/(A^{r_U}(a!)^{r_U})$ & \cite[p.~31]{UY}\\ $c_U$ & $|K^m_{T_V,p}/K_{T_V,p}|\ge c_Up$ for $p>C_0$ unramified in $L_V$ with $K^m_{T_V,p}\ne K_{T_V,p}$ & \begin{tabular}[t]{@{}l@{}}\cite[Prop.~3.15]{UY}, \cite[\S4.4]{EY},\\ \cref{rem:converse}\end{tabular}\\ $k_1$, $f$ & $k_1=2An_\rho^3B_\rho$; $f:=(\dim G+1)^2$ & \cite[Prop.~7.4.3]{EY}, \cite[(8.6)]{KY}\\ $t_\rho$, $s_\rho$ & $s_\rho$, for instance $s_\rho=n_\rho$, bounds the number of characters of the representation of $H_V/H_V^\der$ induced by $t\mapsto\rho(t)^m$ ($m$ the degree of $T_V\to H_V/H_V^\der$); $t_\rho$ is a positive integer bounding the absolute values of their Hodge weights & \cite[proof of Lemma~2.6]{UY}\\ $\mu$ & $\mu=1/(16\,t_\rho s_\rho\,n_T(n_T-1))$ & \cref{prop:C}\\ \bottomrule \end{tabular} \end{table} The constants in \cref{tab:constants} depend only on $(G,X,K,\rho)$ and, except $\mu$ and $f$, are the ones in \cite{KY,UY,EY}. We write $B':=Bc_U$. In \cref{tab:constants}, $a$ bounds the indices $[K^m_H:K^{m'}_H]$ and $[K_H:K'_H]$ of the auxiliary levels of \cite[pp.~21--22]{UY}, for instance $a=|\mathrm{GL}_{n_\rho}(\F_3)|$; $A$, with the property of \cite[Prop.~2.9]{UY}, is fixed once and for all; and $r_U$ is a bound over all special $V$ and primes $p$. In $k_1$, $B_\rho$ is the bound $B$ of \cite[Prop.~7.4.3]{EY} for $\rho|_{T_V}$, uniform in $V$ by \cite[Lemma~2.6]{UY} as in \cite[\S8.3.1]{KY} (\cite[Prop.~2.6]{Yafaev} for special points), and $f$ bounds the Iwahori indices of \cite[(8.8)]{KY} as $1-\delta$, $s\ne1$. By \cite[Theorem~1.1]{CuretonThorner}, $\QRH(1/32;L)$ holds for every number field $L$, and by \cite[Theorem~1.2]{Hu}, $\QRH(1/8;L)$ does; so every statement below made under $\QRH(\delta;L)$ holds with no hypothesis at $\delta=1/32$ and at $\delta=1/8$. We put \[ \kappa(\delta):=\frac{2-\delta}{\delta(1+\delta)},\qquad w(\delta):=(1+2^{-1-\delta})(1+2^{-\delta})<3 . \] \section{Split primes and Galois orbits under a zero-free half-plane}\label{sec:primes} This section proves the two analytic inputs of the Hecke step for one Galois field $L$ under $\QRH(\delta;L)$: a count of primes that split completely in $L$ from $x$ a power of $\log d_L$ on, and the lower bound of Ullmo and Yafaev \cite[\S6]{UY15} for Galois orbits with an explicit constant. The first is an explicit formula; the second uses it. \subsection{Split primes}\label{sec:SP} Let $L/\Q$ be Galois of degree $n_L$ and signature $(r_1,r_2)$, $d_L:=|\disc L|$, and put \[ A_L:=\tfrac32+\tfrac12\log d_L,\qquad \vartheta_L(x):=\sum_{\substack{x/42\mathfrak d\log x$, then $\ell<|\mathrm{Im}_L|$ \cite[p.~33]{UY15}. (6) Let $\beta:=\log d_L\ge\beta_0(\delta)$ and $x:=d_L^\theta$. Then $x^\delta=e^{\theta\delta\beta}\ge(\theta\delta\beta)^2/2\ge64\kappa(\delta)\beta$; $\theta\beta\ge64n_T\ge2\log(48n_T)$; and $\sqrt x=e^{\theta\beta/2}\ge(\theta\beta/2)^3/6\ge2\beta\ge\beta+1$. By \cref{lem:Aprime} there are at least $x/(8n_T\log x)$ such primes in $(x/4,x]$. Also $\beta-\frac32n_T\log n_T>\beta/2=2\mathfrak d\log x$. By (5), $|\mathrm{Im}_L|>x/(8n_T\log x)=e^{2y}/(16n_Ty)$ with $y:=\theta\beta/2\ge32n_T$, and $e^y\ge y^2/2\ge16n_Ty$, so $|\mathrm{Im}_L|\ge e^{y}=d_L^\mu$. If $\beta<\beta_0(\delta)$, then $|\mathrm{Im}_L|\ge1\ge c_*(\delta)d_L^\mu$. \end{proof} For a special $V$ with $T_V\ne1$ let $F_V$ be the Galois closure of $E(H_V,X_{H_V})$; it contains $L_V$ \cite[proof of Prop.~2.14]{UY} and $[F_V:\Q]\le R_G$. Put \[ C_*:=\frac{c_*(\delta)}{R_G\,a\,(a!)^{r_U}},\qquad \Omega_V:=C_*\,\alpha_V\,d_{L_V}^{\mu}. \] \begin{corollary}\label{cor:D} Let $G$ be adjoint and $K$ satisfy \textup{(Lv$'$)}. Let $(H,X_H)\subset(G,X)$ be a Shimura subdatum with $H$ the generic Mumford--Tate group on $X_H$ and $T:=Z(H)^\circ\ne1$, $K_H:=K\cap H(\Af)$, $V_H$ a geometric component of $\Sh_{K_H}(H,X_H)_\C$ and $V$ its image in $\Sh_K(G,X)_\C$, so that $T_V=T$. Let $F\supset E(H,X_H)$ be a number field whose Galois closure $F^c$ has degree at most $R_G$ (for instance $F=E(H',X_{H'})$ for a subdatum $(H',X_{H'})\subset(H,X_H)$, or its Galois closure). Assume $\QRH(\delta;L_V)$. Then: \begin{enumerate}[(i)] \item $\deg_{\Lb_{K_H}}\bigl(\Gal(\Qbar/F)\cdot V_H\bigr)\ge\Omega_V$, and hence $\deg\bigl(\Gal(\Qbar/F)\cdot V\bigr)\ge\Omega_V$ in $\Sh_K(G,X)$; \item if $Y\subset V_H$ is closed, geometrically irreducible and defined over $\Qbar$, $K^m_H:=K^m_TK_H$, $\pi\colon\Sh_{K_H}(H,X_H)\to\Sh_{K^m_H}(H,X_H)$ is the natural map, $\Theta_A\subset K^m_T/K_T$ is the image of $x\mapsto x^A$, with $A$ the integer of \cref{tab:constants}, and $\Theta_A\cdot Y\subset\Gal(\Qbar/F)\cdot Y\cap\pi^{-1}\pi(Y)$, then $\deg_{\Lb_{K_H}}\bigl(\Gal(\Qbar/F)\cdot Y\bigr)\ge\Omega_V$. \end{enumerate} The same bounds hold for the orbits under any Galois group containing $\Gal(\Qbar/F)$. \end{corollary} \begin{proof} The field $F^c$ contains the Galois closure of $E(H,X_H)$, hence $L_V$ \cite[proof of Prop.~2.14]{UY}. We first prove (i) for $F=F_V$, the Galois closure of $E(H,X_H)$. The first bound of (i) is then \cite[Thm.~2.19, (6)]{UY} (which is \cite[Thm.~2.4.4]{KY}) with GRH replaced by $\QRH(\delta;L_V)$, and with $d_{L_V}^\mu$ in place of $(\log d_{L_V})^N$. In its proof GRH is used only in \cite[Prop.~2.13]{UY} (see \cite[pp.~30 and 33]{UY}), which bounds $|\mathrm{Im}_L|$ from below for $L=L_V$; this bound enters the proof of \cite[Thm.~2.19]{UY} only as a factor, the number of Galois conjugates in \cite[Prop.~2.14]{UY}. We replace it by \cref{prop:C}. The image of $r_{(H^\ab,\bar x)}((\Af\otimes F_V)^\times)=r_L(N_{F_V/L}((\Af\otimes F_V)^\times))$ has index at most $[F_V:L]\le R_G$ in $\mathrm{Im}_L$, because $r_L$ maps $L^\times$ into $H^\ab(\Q)$ and the unit ideles into $K^m_{H^\ab}$, so factors through an idele class group of $L$, where the norm from $F_V$ has image of index at most $[F_V:L]$ by class field theory. So the number of conjugates in \cite[Prop.~2.14]{UY} is at least $c_*(\delta)d_L^\mu/R_G$. By \cite[Remark~2.20]{UY} the constant of \cite[Thm.~2.19]{UY} is that of Prop.~2.14 divided by $a\,(a!)^{r_U}$, and the factor $\alpha_V$ comes from \cite[Lemmas~2.15--2.18]{UY}, which use no GRH. This gives (6) of \cite[Thm.~2.19]{UY}, which is the first bound of (i); the second follows from the first by \cite[Lemma~2.2]{UY} and \cite[Cor.~5.3.10]{KY}, as $Z(H)(\R)$ is compact. Form (7) of \cite[Thm.~2.19]{UY} is proved in the same way for $Y$ in place of $V_H$ \cite[pp.~29--31]{UY}, at the auxiliary levels $K'_H\subset K^{m'}_H$ of \cite[pp.~21--22]{UY}, for components $V'$ and $Y'$ over $V_H$ and $Y$ and the map $\pi'\colon\Sh_{K'_H}(H,X_H)\to\Sh_{K^{m'}_H}(H,X_H)$ \cite[Lemma~2.11]{UY}. By \cite[Lemma~2.12]{UY} the degree of the Galois orbit of $Y'$ is at least the degree of the union of its irreducible components mapping onto $\pi'(Y')$ times the number of Galois conjugates of $\pi'(Y')$. GRH enters only in this number, through \cite[Prop.~2.14]{UY}, whose assertion for $Y'$ follows from that for $V'$ because the Galois conjugates of $\pi'(V')$ are disjoint. For general $F$ we prove (ii), and then (i), by running this argument over $F$ itself: \cite[(5) and Lemmas~2.12, 2.16--2.18]{UY} use only that the map $\Sh_{K'_H}(H,X_H)\to\Sh_{K_H}(H,X_H)$, $\pi$ and $\pi'$ are defined over $F$, and the hypothesis on $\Theta_A$ is used with $F$; the remaining factor, the number of $\Gal(\Qbar/F)$-conjugates of $\pi'(Y')$, is at least the number of $\Gal(\Qbar/F^c)$-conjugates, which the argument above bounds with $F^c\supset L_V$ in place of $F_V$ and index at most $[F^c:L_V]\le R_G$. This is (ii). For (i), $\Gal(\Qbar/F)\cdot V_H\supset\Gal(\Qbar/F^c)\cdot V_H$, and the argument above applies verbatim to $F^c$. \end{proof} \needspace{4\baselineskip} \begin{corollary}\label{cor:points} Let $(G,X)$ be a Shimura datum with $G$ adjoint and $G\ne1$, let $K$ satisfy \textup{(Lv$'$)}, and let $\delta\in(0,1/2]$. Let $x\in X^+$ be such that $[x,1]$ is a special point, $T:=\mathrm{MT}(x)$, $L$ the splitting field of $T$, $K_T:=K\cap T(\Af)$, $K^m_T$ the maximal compact open subgroup of $T(\Af)$, and $i(T)$ the number of primes $p$ with $K_{T,p}\ne K^m_{T,p}$. If $\QRH(\delta;L)$ holds, then \[ \bigl|\Gal(\Qbar/L)\cdot[x,1]\bigr|\ \ge\ C_*\,\alpha_{[x,1]}\,d_L^{\mu}\ \ge\ C_*\,B^{i(T)}\,[K^m_T:K_T]\,d_L^{\mu}, \] with $C_*=c_*(\delta)/(R_G\,a\,(a!)^{r_U})$ and $B$, $\mu$ of \cref{tab:constants}; all are effectively computable from $(G,X,K,\rho)$ and $\delta$, and $\mu$ does not depend on $\delta$. \end{corollary} \begin{proof} As $G\ne1$ is adjoint, $T\ne1$ (\cref{sec:constants}). The subdatum $(T,\{x\})$ has $T$ as its generic Mumford--Tate group and $Z(T)^\circ=T$, and $V:=\{[x,1]\}$ is the image of a point of $\Sh_{K_T}(T,\{x\})_\C$, with $T_V=T$, $L_V=L$ and $K_{T_V}=K_T$ (\cref{sec:special}). By \cref{cor:D}(i) for $F=F_V$, which contains $L$, and its last sentence, $|\Gal(\Qbar/L)\cdot[x,1]|\ge\Omega_V=C_*\alpha_Vd_L^\mu$, as a finite set of points has degree its number of points. As $K$ is a product level, $[K^m_T:K_T]=\prod_p|K^m_{T,p}/K_{T,p}|$, and each factor $\max(1,B|K^m_{T,p}/K_{T,p}|)$ of $\alpha_V$ is at least $B|K^m_{T,p}/K_{T,p}|$, so $\alpha_V\ge B^{i(T)}[K^m_T:K_T]$. \end{proof} This is the form of \cite[Thm.~6.1]{UY15}. \needspace{4\baselineskip} \begin{corollary}\label{cor:pointsany} Let $(G,X)$ and $\delta$ be as in \cref{cor:points}, let $K$ be a neat product level, and let $x$, $T$, $L$, $K_T$, $K^m_T$ and $i(T)$ be as there. If $\QRH(\delta;L)$ holds, then \[ \bigl|\Gal(\Qbar/L)\cdot[x,1]\bigr|\ \ge\ \frac{C'_*B_{K'}}{g_3}\,B_{K'}^{\,i(T)}\,[K^m_T:K_T]\,d_L^{\mu}, \] where $K'$ and $g_3$ are as in \cref{lem:LV} and $C'_*$, $B_{K'}$ are the constants $C_*$ and $B$ at $K'$. \end{corollary} \begin{proof} This follows from \cref{cor:points} at $K'$, which satisfies (Lv): the map $\Sh_{K'}(G,X)\to\Sh_K(G,X)$ is defined over $E(G,X)\subset L$, its fibers have at most $g_3$ points, and $K'_T\subset K_T$ differs from $K_T$ only at $3$. \end{proof} With $\delta=1/32$ this is \cite[Conj.~22.1]{Daw15}, with any $c_1\sigma(n)^k$, as $\deg_{\Lb_K}W$ is a positive integer and $e-1\ge\lfloor\sigma(n)\rfloor+1$. With the constant choice $c(k):=\sigma(n)$ we have $\sum_{k\le n}2^{1/k}k/c(k)=1$ and $\sum_{k\le n}k/c(k)\le1$. Fujino's theorems \cite[Thms.~1.1 and 1.2]{Fujino} now give, for every point of $Y$, a section of $\Lb_K^{\otimes e}|_Y$ not vanishing there, and, for every two points, sections separating them. Finally $k\,2^{1/k}\le k+1$ because $(1+1/k)^k\ge2$, so $\sigma(n)\le n(n+3)/2$. \end{proof} The values are $e^*(1)=4$, $e^*(2)=6$, $e^*(3)=10$. In the compact case $\Delta=0$ and $\Lb_K$ is the canonical bundle, and \cref{thm:e0} is an Angehrn--Siu bound for it. \section{Bézout's inequality uniformly in the level}\label{sec:bezout} In this section $(G,X)$ is a Shimura datum and $K\subset G(\Af)$ a neat compact open subgroup. The Hecke step works on Shimura varieties of subdata at levels that vary with a prime. \subsection{An example} \begin{example}\label{ex:bezout} Let $C$ be a hyperelliptic curve of genus $g\ge2$ with hyperelliptic involution $\iota$, let $p\in C$, and let $\Lb:=\mathcal O(p)\boxtimes\mathcal O(p)$ on $C\times C$, an ample line bundle. The diagonal $\Delta_C$ and the graph $\Gamma_\iota$ of $\iota$ both have $\Lb$-degree $2$, but $\Delta_C\cap\Gamma_\iota$ consists of the $2g+2$ fixed points of $\iota$. So $\deg(V\cap W)\le\deg V\cdot\deg W$, which holds for a very ample bundle \cite[Example~8.4.6]{Fulton}, fails for an ample one. \end{example} \subsection{The inequality at every neat level} \begin{lemma}\label{lem:bezout} \begin{enumerate}[(a)] \item Let $A,B\subset\PP^N_\C$ be closed; the degree of a closed set is the sum of the degrees of its irreducible components, and $\Irr$ denotes the set of irreducible components, of all dimensions. Then $\sum_{C\in\Irr(A\cap B)}\deg C\le\deg A\cdot\deg B$. \item Let $(H,X_H)$ be a Shimura datum, $J\subset H(\Af)$ a neat compact open subgroup, $n_J:=\dim\Sh_J(H,X_H)$ and $e\ge e^*(n_J)$ an integer. For closed $A,B\subset\overline{\Sh}_J(H,X_H)$, of dimensions $a$ and $b$ (maxima over components), \[ \sum_{C\in\Irr(A\cap B)}\deg_{\Lb_J}C\ \le\ e^{a+b}\deg_{\Lb_J}A\cdot\deg_{\Lb_J}B. \] The same holds for closed $A,B\subset\Sh_J(H,X_H)_\C$, with degrees of closures and $C$ running over $\Irr(A\cap B)$. \item In particular, if $(H,X_H)$ is a Shimura subdatum of $(G,X)$ and $n:=\dim\Sh_K(G,X)$, then (b) holds with $e:=e^*(n)$ at every neat $J\subset H(\Af)$, so with the constant $c_B:=e^*(n)^{2n}$, which does not depend on $(H,X_H)$ or $J$. \end{enumerate} \end{lemma} \begin{proof} (a) is \cite[Cor.~2, pp.~98--99]{FultonLazarsfeld} for irreducible $A$, $B$; in general each component of $A\cap B$ is a component of some $A_i\cap B_j$, and we sum over pairs of components. (b) By \cref{thm:e0} for $(H,X_H)$ and $J$, the complete linear system $|\Lb_J^{\otimes e}|$ is base-point free and separates points of $\overline{\Sh}_J$. It defines $\varphi\colon\overline{\Sh}_J\to\PP^N$ with $\varphi^*\mathcal O(1)\cong\Lb_J^{\otimes e}$; $\varphi$ is finite, since $\Lb_J$ is ample and so $\varphi$ contracts no curve, and injective. A finite injective morphism is a homeomorphism onto its closed image, so $\varphi$ maps $\Irr(A\cap B)$ bijectively onto $\Irr(\varphi(A)\cap\varphi(B))$, and $\varphi(A\cap B)=\varphi(A)\cap\varphi(B)$. In characteristic $0$, $\varphi$ restricted to an irreducible closed $Y$ is birational onto $\varphi(Y)$, so the projection formula gives $\deg\varphi(Y)=\deg_{\Lb_J^{\otimes e}}Y=e^{\dim Y}\deg_{\Lb_J}Y$. By (a), \begin{multline*} \sum_C\deg_{\Lb_J}C\le\sum_Ce^{\dim C}\deg_{\Lb_J}C=\sum_C\deg\varphi(C)\\ \le\deg\varphi(A)\cdot\deg\varphi(B)\le e^{a+b}\deg_{\Lb_J}A\cdot\deg_{\Lb_J}B, \end{multline*} using $e\ge1$ and, for reducible $A$, $B$, the sum over pairs of components. For $A$, $B$ in the open part, the components of $\overline A\cap\overline B$ that meet $\Sh_J$ are the closures of the components of $A\cap B$, and the others only add to the left side. (c) As $X_H\subset X$, $n_J\le n$ for every neat $J$, so $e^*(n)\ge e^*(n_J)$, and $a,b\le n_J\le n$. \end{proof} \needspace{4\baselineskip} \begin{lemma}\label{lem:H} \begin{enumerate}[(a)] \item Let $(H,X_H)$ be a Shimura datum, $I\subset H(\Af)$ neat compact open, $m\in H(\Q_l)$, $I_m:=I\cap mIm^{-1}$, and $T_m:=\pi_2\circ\pi_1^{-1}$ on $\Sh_I(H,X_H)$, with $\pi_1$ natural and $\pi_2$ induced by $m$. Then $\overline\pi_1^{\,*}\Lb_I\cong\Lb_{I_m}\cong\overline\pi_2^{\,*}\Lb_I$, and $\deg_{\Lb_I}T_mY\le[I:I_m]\deg_{\Lb_I}Y$ for every closed $Y$. \item If $(H,X_H)\subset(G,X)$, $K_H:=K\cap H(\Af)$ and $t\in Z(H)(\Af)$, then $\theta_t\colon[x,h]\mapsto[x,ht]$ satisfies $\overline\theta_t^{\,*}\Lb_{K_H}\cong\Lb_{K_H}$. \end{enumerate} \end{lemma} \begin{proof} \cite[Prop.~5.3.2(1)]{KY} (\cref{sec:shimura}) for the morphisms induced by $1$, by $m$ and by $t$; then the projection formula, $\pi_1$ being finite étale of degree at most $[I:I_m]$. \end{proof} \section{The Hecke step with constants uniform in the level}\label{sec:hecke} Under $\QRH(\delta;L_V)$, a special subvariety $V\subset Z$ that is not strongly special lies in a larger special subvariety of $Z$ once $\Omega_V$ exceeds an explicit bound in terms of $\deg Z$, the degree of the field of definition of $Z$, $\log d_{L_V}$ and $\log\alpha_V$ (\cref{thm:H}); for maximal $V$ the inequality fails, which bounds $\alpha_Vd_{L_V}^\mu$ (\cref{lem:solve}). The argument is that of \cite[\S9]{KY}, with constants uniform in the level of the Hecke correspondence and with Galois groups over the field of definition of $Z$: a saturation lemma (\cref{lem:saturation}), a criterion (\cref{thm:hecke-uniform}), then a prime that meets it (\cref{prop:B}). \subsection{Saturation}\label{sec:saturation} In this subsection $G$ is adjoint and $K$ is a neat product level. We do not assume (Lv$'$), as \cref{sec:degrees} uses both lemmas at every neat product level. Let $(P,X_P)\subset(G,X)$ be a Shimura subdatum with $P$ the generic Mumford--Tate group on $X_P$, and put $K(P):=K\cap P(\Af)$, $K(P)_\ell:=K_\ell\cap P(\Q_\ell)$ and $K(P)^p:=\prod_{\ell\ne p}K(P)_\ell$ for primes $\ell$ and $p$. Let $P^\ad=P_1\times\dots\times P_s$ be the decomposition into $\Q$-simple factors, with projections $\pi_i$, and $X_P^+=X_1^+\times\dots\times X_s^+$ the corresponding decomposition. For $\mathcal A\subset\{1,\dots,s\}$ write $P_{\mathcal A}:=\prod_{i\in\mathcal A}P_i$, $X^+_{\mathcal A}:=\prod_{i\in\mathcal A}X_i^+$ and $\mathcal A^c$ for the complement. A subset $\widehat Y\subset X_P^+$ is \emph{$X_{\mathcal A}^+$-saturated} if $\widehat Y=X^+_{\mathcal A}\times\mathrm{pr}_{\mathcal A^c}(\widehat Y)$. For $x\in X_P^+$ we write $x_{\ne i}:=\mathrm{pr}_{\{i\}^c}(x)$. \needspace{4\baselineskip} \begin{lemma}\label{lem:saturation} Let $Y\subset\Sh_{K(P)}(P,X_P^+)_\C$ be closed, irreducible and Hodge generic, containing a special point, and let $\widehat Y\subset X_P^+$ be its preimage. Let $p$ be a prime, $J_p\subset K(P)_p$ compact open, $J:=K(P)^pJ_p$, $\widetilde Y$ a component of the preimage of $Y$ in $\Sh_J(P,X_P)_\C$, $\alpha\in P(\Q_p)$ and $\mathcal I\subset\{1,\dots,s\}$. Suppose that $\widetilde Y\subset T_\alpha\widetilde Y$, and that $\pi_i(u_1\alpha u_2)$ generates an unbounded subgroup of $P_i(\Q_p)$ for all $i\in\mathcal I$ and $u_1,u_2\in J_p$. Then $\widehat Y$ is $X^+_{\mathcal I}$-saturated. \end{lemma} \begin{proof} This is the proof of \cite[Thm.~7.2.1]{KY}, applied to $\widetilde Y$ itself in place of the preimage of a special subvariety, with the monodromy step of \cite[p.~33]{KY} argued from a special point of $Y$ (Step~1) and the last step (Step~2) carried out on $X_P^+$ rather than at the adjoint product level of \cite[Lemma~7.2.8]{KY}. \emph{Step 0.} Let $\widetilde Y^\infty$ be a component of the preimage of $\widetilde Y$ in the pro-étale cover of $\Sh_J(P,X_P)$ with group $J_p$ \cite[\S4.1.3]{KY}. As $Y$ is geometrically irreducible, the argument of \cite[(7.2)]{KY} gives $u_1,u_2\in J_p$ with $\widetilde Y^\infty=\widetilde Y^\infty\cdot(u_1\alpha u_2)$; the Galois step of \cite[Lemma~7.2.4]{KY} is not needed. Let $\widehat Y'$ be an analytic component of $\widehat Y$. \emph{Step 1 (the monodromy).} Let $M_Y$ be the identity component of the Zariski closure of the monodromy of the variation of Hodge structure over the smooth locus $Y^{\mathrm{sm}}$ of $Y$. Let $r\colon Y'\to Y$ be a resolution of singularities that is an isomorphism over $Y^{\mathrm{sm}}$. The pull-back to $Y'$ of the variation on $\Sh_{K(P)}(P,X_P^+)_\C$ is polarizable; its Mumford--Tate group is $P$ at the points over the Hodge generic points of $Y$, and a torus at the points over a special point of $Y$. Hence its connected monodromy group is $P^\der$ \cite[Prop.~2]{Andre92}; this group is $M_Y$, as $\pi_1(Y^{\mathrm{sm}})\to\pi_1(Y')$ is onto. So $M_Y=P^\der$, and the closure $K'_p$ in $P(\Q_p)$ of the monodromy of $\widetilde Y$ at the lift $\widehat Y'$ contains an open subgroup of $M_Y(\Q_p)$ \cite[Prop.~4.2.1]{KY}. (Without a special point this fails: for $N\ge3$ and an algebraic non-CM point $\sigma\in Y(N)$, the curve $Y(N)\times\{\sigma\}\subset Y(N)^2$ is Hodge generic with connected monodromy $\mathrm{PGL}_2\times1$ in the adjoint variation.) \emph{Step 2.} Steps 0 and 1 hold for every choice of $\widetilde Y^\infty$ and $\widehat Y'$; translating by some $k\in K(P)_p$, which replaces $J_p$ and $\alpha$ by $k^{-1}J_pk$ and $k^{-1}\alpha k$ and keeps the hypotheses, we may assume that $\widetilde Y$ is the image of $\widehat Y'\times\{1\}$, and we take for $\widetilde Y^\infty$ the component containing the image of $\widehat Y'\times\{1\}$; then $K'_p$ is the closure of the stabilizer of $\widehat Y'$ in $P(\Q)_+\cap J$. By Steps 0 and 1, $\widetilde Y^\infty$ is stabilized by $U_p:=\langle K'_p,u_1\alpha u_2\rangle$ \cite[Cor.~7.2.5]{KY}, and $M_Y=P^\der$, so $K'_p$ contains an open subgroup of $P^\der(\Q_p)$ and the image $\bar U_p$ of $U_p$ in $P^\ad(\Q_p)$ is open. Fix $i\in\mathcal I$. Let $P_i^\natural$ be the $\Q$-simple factor of $P^\der$ over $P_i$, $\varpi\colon\widetilde P_i\to P_i^\natural$ its simply connected cover, $\mathsf H$ a $\Q_p$-simple factor of $P_{i,\Q_p}$ in which the image of $u_1\alpha u_2$ is unbounded, and $\widetilde{\mathsf H}$ the factor of $\widetilde P_{i,\Q_p}$ over $\mathsf H$. By \cite[Lemma~7.2.6]{KY} for $\bar U_p$, $\varpi(\widetilde{\mathsf H}(\Q_p))\subset U_p\,Z(P)(\Q_p)$, so commutators of elements of $\varpi(\widetilde{\mathsf H}(\Q_p))$ lie in $U_p$. The group $\widetilde{\mathsf H}(\Q_p)$ is perfect: it is $\widetilde{\mathsf H}'(\mathsf k)$ for a finite $\mathsf k/\Q_p$ and $\widetilde{\mathsf H}'$ simply connected and absolutely almost simple, isotropic because $\mathsf H(\Q_p)$ is not compact \cite{Prasad82}, so $\widetilde{\mathsf H}'(\mathsf k)=\widetilde{\mathsf H}'(\mathsf k)^+$ \cite{Platonov69}, \cite[Thm.~7.6]{PlatonovRapinchuk}, which is perfect \cite[Fait~4.1]{Gille}. Hence $\varpi(\widetilde{\mathsf H}(\Q_p))\subset U_p$. Let $\Gamma_i:=\{\gamma\in P_i^\natural(\Q)\cap P(\Q)_+\cap K(P)^p:\gamma_p\in K'_p\}$, an arithmetic subgroup of $P_i^\natural$ with closure $\overline\Gamma_i\subset K'_p$ in $P(\Q_p)$, and fix $g\in\widetilde{\mathsf H}(\Q_p)$ lying in no compact subgroup. By strong approximation for $\widetilde P_i$ with respect to the infinite place ($P_i(\R)$ is not compact), $\widetilde P_i(\Q)$ is dense in $\widetilde P_i(\Af)$ \cite[Thm.~4.16]{Milne}. So $\overline\Gamma_i$ contains $\varpi(\widetilde C_p)$, with $\widetilde C_p$ the preimage of $K'_p$ in $\widetilde P_i(\Q_p)$ (the elements of $\widetilde P_i(\Q)$ in $\widetilde C_p$ whose image lies in $K(P)^p$ are dense in $\widetilde C_p$, and their images lie in $\Gamma_i$), and is therefore open in $P_i^\natural(\Q_p)$; and there is $q'\in\varpi(\widetilde P_i(\Q))$ that lies in $K(P)_\ell$ for every prime $\ell\ne p$ and has $q'_p\in\varpi(g)\overline\Gamma_i$; so $q'\in P(\Q)_+$ and $q'_p\in U_p$. The closure of $\Gamma'_i:=\langle\Gamma_i,q'\rangle$ in $P(\Q_p)$ contains $\varpi(g)$, so $\Gamma_i$ has infinite index in $\Gamma'_i$. The image $\pi_i(\Gamma'_i)$ is dense in $P_i(\R)^+$. Indeed, let $\mathsf C$ be its closure in $P_i(\R)$ and $\mathfrak c$ the Lie algebra of $\mathsf C$. The group $\pi_i(\Gamma_i)$ is arithmetic in $P_i$ \cite[Prop.~3.2]{Milne}, hence a lattice in $P_i(\R)$ and Zariski dense in $P_i$ \cite[Thms.~3.3 and 3.19]{Milne}, and it normalizes $\mathsf C$; so $\mathfrak c$ is an ideal of $\mathrm{Lie}\,P_i(\R)$, and $P_i(\R)=\mathsf N\times\mathsf N'$ with $\mathsf N$, $\mathsf N'$ products of $\R$-simple factors and $\mathrm{Lie}\,\mathsf N=\mathfrak c$. Suppose $\mathsf N'\ne1$. As $\mathsf C$ is closed with the identity component of $\mathsf N$ as its identity component, and $\mathsf N$ has finitely many components, the projection of $\mathsf C$ to $\mathsf N'$ is discrete; and $P_i(\Q)\to\mathsf N'$ is injective, as $P_i$ is $\Q$-simple. Hence a sequence in $\pi_i(\Gamma'_i)$ that tends to $1$ is eventually $1$, and $\pi_i(\Gamma'_i)$ is discrete; it then contains the lattice $\pi_i(\Gamma_i)$ with finite index, and $[\Gamma'_i:\Gamma_i]$ is finite, as $P_i^\natural\to P_i$ has finite kernel. Thus $\mathsf N'=1$ and $\mathsf C\supset P_i(\R)^+$. Each $\gamma\in\Gamma'_i$ lies in $P(\Q)_+\cap K(P)^p$, has $\gamma_p\in U_p$ and moves only the $i$-th coordinate of $X_P^+$; for $x\in\widehat Y'$, $[\gamma x,1]=[x,\gamma_p^{-1}]\in\widetilde Y^\infty U_p=\widetilde Y^\infty$, so $\gamma x\in\widehat Y$. As $\widehat Y$ is closed, $X_i^+\times\{x_{\ne i}\}\subset\widehat Y$ for every $x\in\widehat Y'$, hence for every $x\in\widehat Y=(K(P)\cap P(\Q)_+)\cdot\widehat Y'$, since $P(\Q)_+$ acts factorwise. Applying this for each $i\in\mathcal I$ in turn gives the lemma. \end{proof} \needspace{4\baselineskip} \begin{lemma}\label{lem:saturated-degree} In \cref{lem:saturation}, let $V\subset Y$ be a special subvariety defined by $(H,X_H)$, and suppose that the image of $H^\der$ in $P^\ad$ is $P_{\mathcal I}$. Then $\deg_{\Lb_{K(P)}}V\le\deg_{\Lb_{K(P)}}Y$. \end{lemma} \begin{proof} Let $\Gamma\subset P^\ad(\Q)$ be the image of $K(P)\cap P(\Q)_+$, so that $\Sh_{K(P)}(P,X_P^+)_\C=\Gamma\backslash X_P^+$, and put $\Gamma_{\mathcal I}:=\pi_{\mathcal I}(\Gamma)$ and $\Gamma_c:=\pi_{\mathcal I^c}(\Gamma)$. These are arithmetic, as images of an arithmetic group under surjective homomorphisms \cite[Prop.~3.2]{Milne}, and neat \cite[0.5]{Pink}, \cite[\S4.1.4]{KY}, so $\Gamma$ has finite index $e$ in $\Gamma_{\mathcal I}\times\Gamma_c$, and $f\colon\Gamma\backslash X_P^+\to S':=\Gamma_{\mathcal I}\backslash X^+_{\mathcal I}\times\Gamma_c\backslash X^+_{\mathcal I^c}$ is finite étale of degree $e$. The Baily--Borel compactification of $S'$ is the product of those of the factors, and $f^*(\Lb_{\mathcal I}\boxtimes\Lb_c)=\Lb_{K(P)}$, where $\Lb_{\mathcal I}$, $\Lb_c$ are the extensions of the canonical bundles of the factors. Since $Z(H)(\R)$ fixes the points of $X_H$ and $H^\der$ maps onto $P_{\mathcal I}$, $X_H^+=X^+_{\mathcal I}\times\{x_2\}$, so $f(V)=S'_{\mathcal I}\times\{w_0\}$ with $S'_{\mathcal I}:=\Gamma_{\mathcal I}\backslash X^+_{\mathcal I}$. By \cref{lem:saturation}, $f(Y)=S'_{\mathcal I}\times W$ with $W$ closed and irreducible, of dimension $b$. Every fiber $f^{-1}(S'_{\mathcal I}\times\{w\})$ is irreducible: for $w=\Gamma_cy$ it is the image of $X^+_{\mathcal I}\times\Gamma_cy$, and $\Gamma$ permutes the slices $X^+_{\mathcal I}\times\{\gamma y\}$ transitively, as $\pi_{\mathcal I^c}(\Gamma)=\Gamma_c$. Every component of $f^{-1}(S'_{\mathcal I}\times W)$ maps onto $S'_{\mathcal I}\times W$, as $f$ is finite and flat, so it contains the fiber over a general point of $W$; hence $f^{-1}(S'_{\mathcal I}\times W)$ is irreducible, and $Y=f^{-1}(S'_{\mathcal I}\times W)$, $V=f^{-1}(S'_{\mathcal I}\times\{w_0\})$, each of degree $e$ over its image. With $a:=\dim X^+_{\mathcal I}$ the projection formula gives $\deg_{\Lb_{K(P)}}V=e\deg_{\Lb_{\mathcal I}}S'_{\mathcal I}$ and $\deg_{\Lb_{K(P)}}Y=e\binom{a+b}{a}\deg_{\Lb_{\mathcal I}}S'_{\mathcal I}\deg_{\Lb_c}W\ge\deg_{\Lb_{K(P)}}V$, since $\deg_{\Lb_c}W\ge1$. \end{proof} The choice of the groups $\Gamma_{\mathcal I}$, $\Gamma_c$ rather than the projections of $K(P)$ is what makes the fibers irreducible: with $\pi_{\mathcal I^c}(K(P))\cap P_{\mathcal I^c}(\Q)_+$ in place of $\Gamma_c$ the fiber would have as many components as the index of $\Gamma_c$ in that group. \subsection{The criterion} In the rest of this section $G$ is adjoint and $K$ satisfies (Lv$'$), and we put $n:=\dim\Sh_K(G,X)$ and $c_B:=e^*(n)^{2n}$ (\cref{lem:bezout}(c)). Let $(P,X_P)\subset(G,X)$ be a Shimura subdatum, $K_P:=K\cap P(\Af)$, $F\supset E(P,X_P)$ a number field and $\bar d\ge1$ an integer. For a special subvariety $V$ put $E_V:=E(H_V,X_{H_V})$; a special subvariety $V$ of $\Sh_{K_P}(P,X_P)_\C$ and its image in $\Sh_K(G,X)_\C$, which is special, have the same $\alpha_V$, $\beta_V$ and reflex field $E_V$ \cite[Remark~9.1.1]{KY}. All degrees on $\Sh_J(P,X_P)$ are taken for its own Baily--Borel bundle $\Lb_J$. Put $k_F:=k_1\bar d+f$ and, for $D'\ge1$ and a prime $l$, \[ \Psi(D'):=c_B\,D'^{\,2},\qquad \Psi_l(D'):=l^{k_F+2f}\,\Psi(D')=c_B\,l^{k_F+2f}D'^{\,2}. \] \needspace{4\baselineskip} \begin{theorem}\label{thm:hecke-uniform} Let $G$ be adjoint and $K$ satisfy \textup{(Lv$'$)}, and let $(P,X_P)$ and $F$ be as above. Let $Z\subset\Sh_{K_P}(P,X_P)_\C$ be Hodge generic and $F$-irreducible, $D_Z:=\deg_{\Lb_{K_P}}Z$, and $V\subset Z$ special with $r:=\dim Z-\dim V>0$. Let $\bar d\ge[FE_V:E_V]$ be an integer and assume $\QRH(\delta;L_V)$. Suppose that \begin{enumerate}[(1)] \item $V$ is not strongly special in $\Sh_{K_P}(P,X_P)_\C$, and \item there is a prime $l>C_0$ that splits completely in $L_V$, with $l>1/c_U$ and $K_{T_V,l}=K^m_{T_V,l}$, such that \begin{equation}\label{eq:criterion} \bigl(c_B\,l^{k_F+2f}\,\bar d\,D_Z\bigr)^{2^r}\ <\ \Omega_V. \end{equation} \end{enumerate} Then $Z$ contains a special subvariety $V'$ with $V\subsetneq V'$, in a geometric component of $Z$ containing $V$. \end{theorem} \begin{lemma}\label{rem:converse} Let $V$ be special, $T:=T_V$, and let $p>C_0$ be a prime unramified in $L_V$ with $K^m_{T,p}\ne K_{T,p}$. Then $|K^m_{T,p}/K_{T,p}|\ge(p-1)/C_\Phi\ge c_Up$. \end{lemma} \begin{proof} This is \cite[Prop.~3.15]{UY} at the primes $p>C_0$, with an explicit constant; we derive it from \cite[\S4.4]{EY}. As $p$ is unramified in $L_V$, $T_{\Q_p}$ is the generic fiber of a torus $\mathcal T$ over $\Z_p$ \cite[\S3.3]{EY}, and $\mathcal T(\Z_p)=K^m_{T,p}$, as a compact subgroup of $T(\Q_p)$ lies in $\mathcal T(\mathcal O_{\mathsf k})\cap T(\Q_p)=\mathcal T(\Z_p)$ for an unramified splitting field $\mathsf k$. As $K_p=G(\Q_p)\cap\mathrm{GL}_{n_\rho}(\Z_p)$ for $p>C_0$, $K_{T,p}$ is the stabilizer of $W:=\Z_p^{n_\rho}$ in $\mathcal T(\Z_p)$, so $|K^m_{T,p}/K_{T,p}|=|\mathcal T(\Z_p)\cdot W|$, and $\mathcal T$ does not fix $W$ if $K_{T,p}\ne K^m_{T,p}$. The argument of \cite[\S4.4]{EY} gives $|\mathcal T(\Z_p)\cdot W|\ge(p-1)/|\Phi|$, where $\Phi$ is the group of components of the stabilizer in $\mathcal T_{\overline{\F}_p}$ of a subspace; if the subspace has dimension $d$, the stabilizer is $\bigcap\ker(x-x')$ over the weights $x,x'$ in the support of one vector of its $d$-th exterior power, which are weights of $T$ under $X^*(\mathcal T_{\overline{\F}_p})=X^*(T_{\Qbar_p})$ \cite[proof of Lemma~4.4.1]{EY}; so $|\Phi|$ is at most the order of the torsion of $X^*(T)/N$, with $N$ the subgroup generated by these differences. As the map $r_T^*\colon X^*(T)\to X^*(\mathrm{Res}_{F_T/\Q}\Gm)$ dual to the surjection $r_T$ of \cite[p.~42]{UY} is injective, $X^*(T)/N$ embeds in $X^*(\mathrm{Res}_{F_T/\Q}\Gm)/r_T^*N$, whose torsion has order at most $C_\Phi$. So $|K^m_{T,p}/K_{T,p}|\ge(p-1)/C_\Phi\ge c_Up$. \end{proof} \begin{remark*} The condition $l>1/c_U$ in (2) of \cref{thm:hecke-uniform} is needed for $(T_V)_{\F_l}$ to be a torus, as \cite[Thm.~8.1]{KY} requires. A split torus whose level is maximal need not have a torus as its closure. Let $\Gm$ act on $\Q^3$ by $t\mapsto\mathrm{diag}(1,t^2,t)$ with the lattice $\Lambda_0:=\Z(e_1+e_2)+3\Z e_2+\Z e_3$. In the basis $e_1+e_2,3e_2,e_3$ of $\Lambda_0$, $t$ sends $e_1+e_2$ to $(e_1+e_2)+\frac{t^2-1}3\,3e_2$, so $\Gm(\Q_3)\cap\mathrm{GL}(\Lambda_0\otimes\Z_3)=\Z_3^\times$ is maximal, while the closure is $\operatorname{Spec}\Z_3[t^{\pm1},(t^2-1)/3]$, whose special fiber is $\Z/2\times\mathbb G_{\mathrm a}$. By the argument of \cite[\S4.4]{EY}, maximality does give a torus once $p-1>C_\Phi$; here the analogue of $C_\Phi$ is $2$, $p=3$, and $1/c_U=4>3$. The CM elliptic curve with endomorphism ring $\Z[\sqrt{-7}]$ gives the same phenomenon at $l=2$ inside $(\mathrm{GL}_2,\mathcal H^\pm)$. \end{remark*} Compared with \cite[(9.1)]{KY}, which reads $l^{(k+2f)2^r}(\deg Z)^{2^r}\ \Psi_l^{\circ r}(\bar dD_Z), \end{equation} the form the proof uses; also $\bar d\,\Psi_l(D')\le\Psi_l(\bar dD')$ and $\Psi_l(x)\ge x$ for $x\ge1$. The proof follows that of \cite[Thm.~9.2.1]{KY}, with the following differences. The Galois groups are those over $F$, which need not lie in $E_V$, at the cost of the factor $\bar d$ (Step~1, \cref{lem:LB}). The Galois lower bound is that of \cref{cor:D}. Bézout's inequality, at \cite[(9.5)]{KY} and in \cite[Sublemma~9.2.5]{KY}, has the constant of \cref{lem:bezout}. In Step~3, as $P$ need not be adjoint, the proof of \cite[Thm.~7.2.1]{KY} is run on the image of $\widetilde Z$ (the union of the conjugates of a component of the preimage of $Z$ at the Iwahori level, Step~2) in the Shimura variety $\Sh_{I^\ad}(P^\ad,X_P^\ad)$ of the adjoint group at an adjoint level $I^\ad$. Finally, $\widetilde Y_H$, the lift of the union $\widetilde Y$ of $\Gal(\Qbar/F)$-conjugate components of $\widetilde Z\cap T_m\widetilde Z$ (Step~4) to the Shimura variety of the smallest special subvariety containing it, is chosen so as to be Hodge generic of dimension $\dim\widetilde Y$ (\cref{lem:descent}). Step~1 of the proof of \cref{thm:hecke-uniform} follows \cite[\S8.3.2]{KY}, with the following lemma in place of \cite[Lemma~8.1.6]{KY}. It writes every maximal compact subgroup of $P(\Q_l)$ that contains the level as the fixer of a point in the apartment of a maximal split torus containing $T_V$, using a condition on weights that (2) gives, and it bounds the Iwahori indices without a hyperspecial subgroup, which $P(\Q_l)$ need not have, as (2) does not make $P$ unramified at $l$. For a connected reductive $\Q_l$-group $H$ we write $\mathcal B(H)$ for its extended Bruhat--Tits building \cite[1.2 and 2.1]{TitsCorvallis} and $H(\Q_l)^\Omega$ for the fixer of $\Omega\subset\mathcal B(H)$ in $H(\Q_l)$; as in \cite[\S8.1.1 and Remark~8.1.1]{KY}, the fixers of chambers are called Iwahori subgroups. \begin{lemma}\label{lem:KY816} Let $l$ be a prime and $H$ a connected reductive $\Q_l$-group, and put $d:=\dim H$. \begin{enumerate}[(a)] \item Let $T\subset H$ be a split torus such that no nonzero weight of $T$ on $\Lie H$ lies in $(l-1)X^*(T)$, and let $\Theta\subset T(\Q_l)$ be the subgroup of elements of order dividing $l-1$. Then every point of $\mathcal B(H)$ fixed by $\Theta$ lies in the apartment of a maximal split torus $S\supset T$ of $H$, and the maximal compact subgroup of $S(\Q_l)$ fixes that apartment pointwise. \item If a point $y\in\mathcal B(H)$ lies in the closure of a chamber $C$, then $[H(\Q_l)^y:H(\Q_l)^C]\le l^{d(d+1)/2}$. \item Let $(P,X_P)$, $V$ and $l$ be as in \cref{thm:hecke-uniform}, with \textup{(2)}, and $K_{P,l}:=K_l\cap P(\Q_l)$. Every maximal compact subgroup $K^1_l\supset K_{P,l}$ of $P(\Q_l)$ is $P(\Q_l)^y$ for a point $y$ of the apartment of a maximal split torus $S\supset T_{V,\Q_l}$ of $P_{\Q_l}$. Let $C^1$ be a chamber of this apartment with $y$ in its closure, $x_0$ a special point in the closure of $C^1$, and $C^2$ a chamber of the apartment with $x_0$ in its closure. Then $I^1_l:=P(\Q_l)^{C^1}\subset K^1_l$ and $I^2_l:=P(\Q_l)^{C^2}$ are in good position with respect to $S$, $I_l:=I^1_l\cap I^2_l\cap K_{P,l}$ is in good position with respect to $T_V$, and $[K_{P,l}:I_l]0$. Let $\widetilde Y^{(1)}$ be a geometric component of $\widetilde Y$ containing $\widetilde V$, and $S_Y$ the smallest special subvariety of $\Sh_J(P,X_P)_\C$ containing $\widetilde Y^{(1)}$. It is the image of $X_H^+\times\{1\}$ for a Shimura subdatum $(H,X_H)\subset(P,X_P)$ with $H$ the generic Mumford--Tate group on $X_H$ and $X_H^+\subset X_P^+$ \cite[Lemma~2.1]{UY}. Put $K_H:=K_P\cap H(\Af)$, $J_H:=J\cap H(\Af)$ and $F_H:=E(H,X_H)$; then $F_H\subset E_V$, because a Hodge generic point of $\widetilde V$ lifts to $X_H^+$, so that $(H,X_H)$ contains a $P(\Q)$-conjugate of $(H_V,X_{H_V})$. Let $q$ denote the natural maps $\Sh_{J_H}(H,X_H)\to\Sh_J(P,X_P)$ and $\Sh_{K_H}(H,X_H)\to\Sh_{K_P}(P,X_P)$, and $\tau$ also the map $\Sh_{J_H}(H,X_H)\to\Sh_{K_H}(H,X_H)$; these maps are finite and defined over $F_H$, and $q\tau=\tau q$. Let $S_H$ be the image of $X_H^+\times\{1\}$ in $\Sh_{J_H}(H,X_H)_\C$, so that $q(S_H)=S_Y$. As $q$ is finite, some component $C_1$ of $q^{-1}(\widetilde Y^{(1)})\cap S_H$ maps onto $\widetilde Y^{(1)}$, and some component $\widetilde V_H$ of $q^{-1}(\widetilde V)\cap C_1$ maps onto $\widetilde V$; so $\dim C_1=\dim\widetilde Y$ and $\dim\widetilde V_H=\dim\widetilde V$. Let $\widetilde Y_H$ be the union of the $\Gal(\Qbar/FF_H)$-conjugates of $C_1$, and put $V_H:=\tau(\widetilde V_H)$ and $Y_H:=\tau(\widetilde Y_H)\subset\Sh_{K_H}(H,X_H)_\C$. \needspace{4\baselineskip} \begin{lemma}\label{lem:descent} In this situation $Y_H$ is $FF_H$-irreducible and Hodge generic, $q(V_H)=V$ and $V_H$ has torus $T_V$, and $\dim Y_H-\dim V_H=r_Y$ \cite[pp.~48--49]{KY}. Moreover: \begin{enumerate}[(a)] \item $\deg_{\Lb_{K_H}}Y_H\le\deg_{\Lb_J}\widetilde Y$; \item if $\Psi^{\circ r_Y}(\bar d\deg_{\Lb_{K_H}}Y_H)<\Omega_V$, then $V_H$ is not strongly special in $\Sh_{K_H}(H,X_H)_\C$; \item if $Y_H$ contains a special $V_H'\supsetneq V_H$, then $Z$ contains a special $V'\supsetneq V$ in a geometric component of $Z$ containing $V$. \end{enumerate} \end{lemma} \begin{proof} A special subvariety $S'\subsetneq S_H$ containing $C_1$ would give the special subvariety $q(S')\supset\widetilde Y^{(1)}$, of dimension less than $\dim S_Y$; so $C_1$ is Hodge generic in $\Sh_{J_H}(H,X_H)_\C$. Galois conjugates of special subvarieties are special \cite[proof of Lemma~7.1.2]{KY}, so every component $\sigma(C_1)$ of $\widetilde Y_H$ is Hodge generic, of dimension $\dim\widetilde Y$, and $\widetilde Y_H$ is closed and $FF_H$-irreducible. Hence $Y_H$ is closed, $FF_H$-irreducible and Hodge generic. As $\tau$ and $q$ are finite, $\dim Y_H-\dim V_H=\dim\widetilde Y-\dim\widetilde V=r_Y$. The irreducible closed set $\widetilde V_H$ has the dimension of $q^{-1}(\widetilde V)$, so it is a component of it, hence special, and so is $V_H$; and $q(V_H)=\tau(q(\widetilde V_H))=\tau(\widetilde V)=V$. As $V_H$ lies in the image of $X_H^+\times\{1\}$, it is the image of $X_{H''}^+\times\{1\}$ for a subdatum $(H'',X_{H''})\subset(H,X_H)$ with $H''$ the generic Mumford--Tate group on $X_{H''}$ and $X_{H''}^+\subset X_H^+$ \cite[Lemma~2.1]{UY}, and then so is $V=q(V_H)$ in $\Sh_{K_P}(P,X_P)_\C$. So $X_{H''}^+=\gamma X_{H_V}^+$ for some $\gamma\in P(\Q)_+\cap K_P$, and we may take $(H'',X_{H''})$ for $(H_V,X_{H_V})$ (\cref{sec:special}): $V_H$ and $V$ have the same torus $T_V$ and the same $K_{T_V}=T_V(\Af)\cap K$, hence the same $L_V$, $E_V$, $\alpha_V$ and $\Omega_V$ (compare \cite[Remark~9.1.1]{KY}). (a) Each geometric component of $Y_H$ is $\tau(C)$ for a component $C$ of $\widetilde Y_H$, and $\deg_{\Lb_{J_H}}C=\deg(\tau|_C)\deg_{\Lb_{K_H}}\tau(C)$ by the projection formula, so $\deg_{\Lb_{K_H}}Y_H\le\deg_{\Lb_{J_H}}\widetilde Y_H$. For a component $C=\sigma(C_1)$ of $\widetilde Y_H$, $q(C)=\sigma(\widetilde Y^{(1)})$ is a geometric component of $\widetilde Y$, because $q$ is defined over $F_H$ and $\widetilde Y$ over $F$. Distinct $C$ give distinct components, as $q$ is injective on the Hodge generic locus \cite[Lemma~2.2]{UY}, and $\deg_{\Lb_{J_H}}C\le\deg_{\Lb_J}q(C)$ \cite[Cor.~5.3.10]{KY}, as $Z(H)(\R)$ is compact. So $\deg_{\Lb_{J_H}}\widetilde Y_H\le\deg_{\Lb_J}\widetilde Y$. (c) $V':=q(V'_H)$ is special; it lies in $q(Y_H)=\tau(q(\widetilde Y_H))\subset\tau(\widetilde Y)\subset Z$ and contains $q(V_H)=V$; and $\dim V'=\dim V'_H>\dim V_H=\dim V$, as $q$ is finite. Being irreducible, $V'$ lies in a geometric component of $Z$, which contains $V$. (b) As in \cite[Lemma~9.2.3]{KY}, suppose $V_H$ is strongly special in $\Sh_{K_H}(H,X_H)_\C$, that is, $T_V\subset Z(H)$. Then $T_V=Z(H)^\circ$ \cite[Lemma~6.2]{KY}. Put $K^m_H:=K^m_{T_V}K_H$ and let $\pi\colon\Sh_{K_H}(H,X_H)\to\Sh_{K^m_H}(H,X_H)$ be the natural map. The group $K^m_{T_V}/K_{T_V}$ acts on $\Sh_{K_H}(H,X_H)$ by the maps $\theta_t$ of \cref{lem:H}(b), which are defined over $F_H$ and so commute with $\Gal(\Qbar/E_V)$, and its orbits are the fibers of $\pi$. Let $\Theta_A\subset K^m_{T_V}/K_{T_V}$ be the group of \cref{cor:D}(ii). Then $\Theta_A\cdot V_H\subset\Gal(\Qbar/E_V)\cdot V_H$ \cite[Sublemma~9.2.4]{KY}. Write $\deg$ for $\deg_{\Lb_{K_H}}$ and $\mathcal Y:=\Gal(\Qbar/E_V)\cdot Y$ for geometrically irreducible $Y$; $\deg\theta\mathcal Y=\deg\mathcal Y$ by \cref{lem:H}(b), and $\Gal(\Qbar/E_V)$-conjugate subvarieties have equal degrees, as $\Lb_{K_H}$ is defined over $F_H\subset E_V$. Let $Y_1$ be a geometric component of $Y_H$ containing $V_H$. As $Y_H$ is defined over $FF_H\subset FE_V$, it contains $\Gal(\Qbar/FE_V)\cdot Y_1$, and $\mathcal Y_1$ is the union of at most $\bar d$ conjugates of this set; so $\deg\mathcal Y_1\le D_1:=\bar d\deg Y_H$. Suppose $Y_j$ is geometrically irreducible, $V_H\subset Y_j$, $\dim Y_j>\dim V_H$ and $\deg\mathcal Y_j\le D_j:=\Psi^{\circ(j-1)}(D_1)$. If $\Theta_A\cdot Y_j\subset\mathcal Y_j$, stop. Otherwise choose $\theta\in\Theta_A$ with $\theta Y_j\not\subset\mathcal Y_j$. The sets $\mathcal Y_j$ and $\theta\mathcal Y_j$ are of pure dimension $\dim Y_j$, and they have no common component: the components of $\theta\mathcal Y_j$ are the $\sigma\theta Y_j$, and $\sigma\theta Y_j=\sigma'Y_j$ would give $\theta Y_j\subset\mathcal Y_j$. Also $V_H\subset\mathcal Y_j\cap\theta\mathcal Y_j$: as $\Theta_A$ is a group, $\theta^{-1}V_H=\sigma V_H\subset\sigma Y_j$ for some $\sigma\in\Gal(\Qbar/E_V)$. Let $Y_{j+1}$ be a geometric component of $\mathcal Y_j\cap\theta\mathcal Y_j$ containing $V_H$. This set is $\Gal(\Qbar/E_V)$-stable, so the conjugates of $Y_{j+1}$ are among its components; $\dim Y_{j+1}<\dim Y_j$; and \cref{lem:bezout}(c) at the neat level $K_H$ gives \[ \deg\mathcal Y_{j+1}\le c_BD_j^2=D_{j+1}. \] The dimension drops at each step, so $j\le r_Y$ throughout, and $D_j\le D_{j+1}\le\Psi^{\circ r_Y}(D_1)<\Omega_V$, as $\Psi(x)\ge x$. If $Y_{j+1}=V_H$, then $\deg(\Gal(\Qbar/E_V)\cdot V_H)\le D_{j+1}<\Omega_V$, contradicting \cref{lem:LB} for $V_H$ at the level $K_H$. Otherwise we continue. So the process stops at some $Y'$ with $\Theta_A\cdot Y'\subset\Gal(\Qbar/E_V)\cdot Y'$ and $\deg(\Gal(\Qbar/E_V)\cdot Y')<\Omega_V$. As the orbits of $\Theta_A$ lie in the fibers of $\pi$, also $\Theta_A\cdot Y'\subset\pi^{-1}\pi(Y')$, and $Y'$ lies in the geometric component of $\Sh_{K_H}(H,X_H)_\C$ containing $V_H$; so \cref{cor:D}(ii), applied to this component, whose image has torus $Z(H)^\circ=T_V$ and hence the same $L_V$, $\alpha_V$ and $\Omega_V$, with $F=E_V\supset E(H,X_H)$ and $Y=Y'$, gives $\deg(\Gal(\Qbar/E_V)\cdot Y')\ge\Omega_V$: a contradiction. \end{proof} \begin{proof}[Proof of \cref{thm:hecke-uniform}] We prove the theorem with \eqref{eq:criterion-iterate} in place of \eqref{eq:criterion}, by induction on $r$, for all subdata $(P,X_P)$, fields $F$, and $Z$, $V$, $\bar d$ and $l$ at once. Recall that $V$ is the image of $X_{H_V}^+\times\{1\}$ with $X_{H_V}^+\subset X_P^+$ (\cref{sec:special}). \emph{Step 1 (the level $I$, the element $m$ and $\sigma$).} Put $K_{P,l}:=K_l\cap P(\Q_l)$. As $l>C_0$, $K_l=G(\Z_l)$ is hyperspecial, and $l$ splits $T_V$. Under (2) the Zariski closure of $T_V$ in $\mathrm{GL}_{n_\rho,\Z_l}$ is a torus, by \cite[Lemma~3.3.1 and \S4.4]{EY} applied to the split torus model of $T_{V,\Q_l}$ and the lattice $\Z_l^{n_\rho}$, so $(T_V)_{\F_l}$ is a torus, as \cite[Thm.~8.1]{KY} requires. So $(P,X_P)$, $V$ and $l$ are as in \cite[Thm.~8.1]{KY}, whose proof \cite[\S8.3]{KY} we follow. By (1) the image of $T_V$ in $P^\ad$ is not trivial, and \cite[Prop.~7.4.3]{EY} gives $m_0\in T_V(\Q_l)$ whose image in $P^\ad(\Q_l)$ lies in no compact subgroup, with $[K_{P,l}:K_{P,l}\cap m_0^{Aj}K_{P,l}m_0^{-Aj}]\dim V$; being irreducible, $V'$ lies in a geometric component of $Z$, which contains $V$. \emph{Step 4 (the case $\widetilde Z\not\subset T_m\widetilde Z$).} As $T_m\widetilde Z$ is defined over $F$ and $\Gal(\Qbar/F)$ permutes the geometric components of $\widetilde Z$ transitively, no geometric component of $\widetilde Z$ lies in $T_m\widetilde Z$; so every component of $\widetilde Z\cap T_m\widetilde Z$ has dimension less than $\dim Z$. Suppose $\widetilde V$ is one of them, as it must be if $r=1$. Then so are its $\Gal(\Qbar/FE_V)$-conjugates, by Step~2, and \cref{lem:LB} at $J=I$ and \eqref{eq:cut} give $\Omega_V/\bar d\le\deg_{\Lb_I}(\Gal(\Qbar/FE_V)\cdot\widetilde V)\le\Psi_l(D_Z)$, against $\bar d\,\Psi_l(D_Z)\le\Psi_l(\bar dD_Z)\le\Psi_l^{\circ r}(\bar dD_Z)<\Omega_V$. So this case does not occur for $r=1$, and for $r\ge2$ a geometric component $\widetilde Y^{(1)}$ of $\widetilde Z\cap T_m\widetilde Z$ contains $\widetilde V$ properly. Let $\widetilde Y$ be the union of the $\Gal(\Qbar/F)$-conjugates of $\widetilde Y^{(1)}$, which are components of $\widetilde Z\cap T_m\widetilde Z$. It is closed and $F$-irreducible, $\tau(\widetilde Y)\subset Z$, $\deg_{\Lb_I}\widetilde Y\le\Psi_l(D_Z)$ by \eqref{eq:cut}, and $0C_0$ that splits completely in $L_V$ and has $K_{T_V,l}=K^m_{T_V,l}$. Moreover $l>x_V/4>1/c_U$. \end{proposition} \begin{proof} We follow the proof of \cite[Prop.~10.2.3]{KY}. (1) As $T_V\ne1$, $\beta_V\ge\log3>1$ (\cref{sec:special}), and $[L_V:\Q]\le n_T$; so the first three terms of $x_V$ give the three conditions of \cref{lem:Aprime} at $x=x_V$ for $L=L_V$. Hence at least $x_V/(8n_T\log x_V)\ge\sqrt{x_V}/(8n_T)$ primes in $(x_V/4,x_V]$ split completely in $L_V$, as $x/\log x\ge\sqrt x$ for $x>1$. By the last term of $x_V$ there are at least $\max(e^2/B',\log\alpha_V)+2$ of them, and by the fourth they exceed $C_0$. (2) We count as in \cite[Lemma~10.2.5]{KY}, over the primes $p>C_0$ only. Let $i_V$ be the number of primes $p>C_0$, unramified in $L_V$, with $K^m_{T_V,p}\ne K_{T_V,p}$; for these $|K^m_{T_V,p}/K_{T_V,p}|\ge c_Up$ by \cref{rem:converse}. As $i_V$ distinct primes have product at least $i_V!$, $\alpha_V\ge B'^{\,i_V}i_V!\ge(B'i_V/e)^{i_V}$, which exceeds $e^{i_V}$ if $i_V>e^2/B'$. Hence $i_V\le\max(e^2/B',\log\alpha_V)$. (3) The primes of (1) are unramified in $L_V$ and exceed $C_0$, and there are more than $i_V$ of them; so one of them has $K_{T_V,l}=K^m_{T_V,l}$. (4) $l>x_V/4>1/c_U$, since $x_V/4\ge16n_T^2(e^2/B'+2)^2>16e^4/c_U^2>1/c_U$, as $B'=Bc_U\le c_U\le1/2$. \end{proof} \needspace{8\baselineskip} Step~(2) of the proof of \cref{prop:B} also bounds the index of $K_{T_V}$ in $K^m_{T_V}$ from above. \needspace{4\baselineskip} \begin{lemma}\label{lem:index} Let $V$ be special with $T_V\ne1$. Then \[ \alpha_V\ \le\ [K^m_{T_V}:K_{T_V}]\ \le\ B^{-(C_0+e^2/B')}\,\alpha_V^{1+\log(1/B)}\,d_{L_V}^{\log_2(1/B)}, \] with $B$, $B'=Bc_U$ and $C_0$ of \cref{tab:constants}, which depend only on $(G,X,K,\rho)$. \end{lemma} \begin{proof} Let $\mathcal P_V$ be the set of primes $p$ with $K^m_{T_V,p}\ne K_{T_V,p}$. As $K$ is a product level, $[K^m_{T_V}:K_{T_V}]=\prod_{p\in\mathcal P_V}|K^m_{T_V,p}/K_{T_V,p}|$, and as $00$. Let $\bar d\ge[FE_V:E_V]$ be an integer and assume $\QRH(\delta;L_V)$. If \[ \Omega_V\ >\ \Delta_r(D_Z)\,x_V^{\,b_r}, \] then $Z$ contains a special subvariety $V'\supsetneq V$ in a geometric component of $Z$ containing $V$. \end{theorem} \begin{proof} The prime $l$ of \cref{prop:B} satisfies $l^{b_r}\Delta_r(D_Z)\le x_V^{b_r}\Delta_r(D_Z)<\Omega_V$, which is \eqref{eq:criterion}; so \cref{thm:hecke-uniform} gives $V'$. \end{proof} For maximal $V$ the inequality of \cref{thm:H} fails, and the following lemma turns that into bounds for $\alpha_V$ and $d_{L_V}$. Put \[ \varsigma:=\max\Bigl(\frac{64\kappa(\delta)+1}{\mu}+8n_T,\ 1+48n_T+4C_0+8n_T\bigl(e^2/B'+2\bigr)\Bigr), \] and for $\Lambda\ge1$ and $b\ge1$ \[ \mathcal W(\Lambda,b):=2\log\Lambda+1+\frac{2b}{\delta}\log\frac{2\varsigma b}{e\,\delta},\qquad \mathcal B(\Lambda,b):=\Lambda\,\bigl(\varsigma\,(\mathcal W(\Lambda,b)+1)\bigr)^{b/\delta}. \] \needspace{4\baselineskip} \begin{lemma}\label{lem:solve} Let $\Lambda\ge1$ and $b\ge1$, and let $V$ be special with $T_V\ne1$. If $\alpha_Vd_{L_V}^\mu\le\Lambda\,x_V^{\,b}$, then $\alpha_Vd_{L_V}^\mu\le\mathcal B(\Lambda,b)$. The function $\mathcal B$ is non-decreasing in $\Lambda$ and in $b$. \end{lemma} \begin{proof} Put $\omega:=\log(\alpha_Vd_{L_V}^\mu)=\log\alpha_V+\mu\beta_V\ge0$ and $S:=(64\kappa(\delta)+1)\beta_V+8n_T\log\alpha_V+1+48n_T+4C_0+8n_T(e^2/B'+2)$. Since $S\ge1$ and $1/\delta\ge2$, each of the five terms of $x_V$ is at most $S^{1/\delta}$, as $64\kappa(\delta)\beta_V$, $\beta_V+1$, $48n_T$, $4C_0$ and $8n_T(\max(e^2/B',\log\alpha_V)+2)$ are at most $S$. As $\beta_V\le\omega/\mu$ and $\log\alpha_V\le\omega$, we have $S\le\varsigma(\omega+1)$. So the hypothesis gives \[ \omega\ \le\ \log\Lambda+\frac b\delta\log\bigl(\varsigma(\omega+1)\bigr). \] With $\log y\le y/s+\log s-1$ for $y=\omega+1$ and $s=2b/\delta$, this gives $\omega\le\mathcal W(\Lambda,b)$; putting this back into the right side gives $\omega\le\log\mathcal B(\Lambda,b)$. Both $\mathcal W$ and $\mathcal B$ are non-decreasing in $\Lambda$, and in $b$ because $2\varsigma b/(e\delta)>1$. \end{proof} \section{Degrees of maximal special subvarieties}\label{sec:degrees} In this section $G$ is adjoint, $K$ is a neat product level, $n:=\dim\Sh_K(G,X)$ and $c_B:=e^*(n)^{2n}$ (\cref{lem:bezout}(c)); (Lv$'$) is not assumed and no analytic hypothesis is used. The iteration of \cite[\S10]{DJK} cuts $Z$ by a Hecke translate at an Iwahori level and bounds the intersection by Bézout's inequality with constant $1$ at that level \cite[proof of Prop.~10.1, p.~24]{DJK}. We run it with \cref{lem:bezout} at the level of the Hecke translate and at primes $p\ge N_K$, with the inputs (DJK1)--(DJK3) in the form given below, and treat the facteur case, which Daw, Javanpeykar and Kühne exclude \cite[p.~2]{DJK}, with a saturation lemma (\cref{lem:saturation}). \subsection{Inputs}\label{sec:DJK} Let $\mathcal G_{\Z_p}$ be the Zariski closure of $\rho(G)$ in $\mathrm{GL}_{n_\rho,\Z_p}$, and let $N_K>2D_{\mathrm{sp}}+1$ be an integer such that $K_p=\mathcal G_{\Z_p}(\Z_p)$ is hyperspecial for every prime $p\ge N_K$, where $D_{\mathrm{sp}}\ge1$ is an integer for which \cite[Lemma~7.5]{DJK} holds. For a reductive $\Q$-group $H$ and a product level $K_H\subset H(\Af)$, let $\Sigma(H,K_H)$ be the set of primes $p$ at which $H_{\Q_p}$ is not quasi-split, or does not split over an unramified extension, or $K_{H,p}$ is not hyperspecial, and $\Pi(H,K_H)$ the product of these primes ($1$ if there are none) \cite[\S2.5]{DJK}. For a Shimura subdatum $(P,X_P)\subset(G,X)$ write $K(P):=K\cap P(\Af)$ (the $K_P$ of \cref{sec:hecke,sec:adjoint}), and for a special subvariety $V$ of $\Sh_K(G,X^+)_\C$, the image of $X_H^+\times\{1\}$, put $\Sigma_V:=\Sigma(H^\der,K(H^\der))$ and $\Pi_V:=\Pi(H^\der,K(H^\der))$; these depend only on $V$ \cite[Def.~3.5]{DJK}, and are the same for $V$ in $\Sh_{K(P)}(P,X_P)$ and for its image in $\Sh_K(G,X)$, since $K(P)\cap H^\der(\Af)=K\cap H^\der(\Af)$. We use the following results of \cite{DJK}, all with effectively computable constants depending only on $(G,X,K,\rho)$. \begin{enumerate}[({DJK}1)] \item \cite[Thm.~6.1]{DJK} There are $c_1,\eta_1>0$ such that $\deg V>c_1\Pi_V^{\eta_1}$ for every special subvariety $V$ of $\Sh_K(G,X^+)_\C$ of positive dimension. \item \cite[Lemmas~4.1 and 4.2]{DJK} There is an integer $d_G\ge1$ such that for every Shimura subdatum $(P,X_P)$ with a component $X_P^+\subset X^+$, every closed irreducible $Y_P\subset\Sh_{K(P)}(P,X_P^+)_\C$ and its image $Y$ in $\Sh_K(G,X)_\C$, we have $\deg Y\le d_G\deg_{\Lb_{K(P)}}Y_P$; and $\deg_{\Lb_{K(P)}}Y_P\le\deg Y$ for every Hodge generic closed irreducible $Y_P\subset\Sh_{K(P)}(P,X_P)_\C$. \item \cite[Thm.~7.1]{DJK}, for primes $p\ge N_K$. There are integers $k_2,f_2\ge1$ with the following property. Let $(P,X_P)$ be a Shimura subdatum with a component $X_P^+\subset X^+$, $P^\ad=P_1\times\dots\times P_s$ the decomposition into $\Q$-simple factors with projections $\pi_i$, $V\subset\Sh_{K(P)}(P,X_P^+)_\C$ a special subvariety of positive dimension, the image of $X_H^+\times\{1\}$ for $(H,X_H)\subset(P,X_P)$ and a component $X_H^+\subset X_P^+$, $\mathcal I$ the set of $i$ with $\pi_i(H^\der)\ne1$, and $p\ge N_K$ a prime with $p\notin\Sigma_V$. Then there are a compact open $J_p\subset K(P)_p:=K_p\cap P(\Q_p)$ and $\alpha\in P(\Q_p)$ such that, with $J:=K(P)^pJ_p$: \begin{enumerate} \item $[K(P)_p:J_p]\le p^{f_2}$; \item $[J_p:J_p\cap\alpha J_p\alpha^{-1}]\le p^{k_2}$; \item the image $\widetilde V$ of $X_H^+\times\{1\}$ in $\Sh_J(P,X_P)_\C$ satisfies $\widetilde V\subset T_\alpha\widetilde V$; \item $\pi_i(u_1\alpha u_2)$ generates an unbounded subgroup of $P_i(\Q_p)$ for all $i\in\mathcal I$ and $u_1,u_2\in J_p$. \end{enumerate} \end{enumerate} The argument of the proof of \cite[Lemma~4.2]{DJK} gives $\deg Y\le d^{\dim Y_P}\deg_{\Lb_{K(P)}}Y_P$ for the integer $d$ of that proof, so (DJK2) holds with $d_G:=d^{\dim\Sh_K(G,X)}$. \needspace{4\baselineskip} \begin{lemma}\label{lem:DJK1} Let $V$ be a special subvariety of $\Sh_K(G,X^+)_\C$, the image of $X_H^+\times\{1\}$, let $p\ge5$ be a prime with $K_p=\mathcal G_{\Z_p}(\Z_p)$, let $\mathcal H$ be a reductive model over $\Z_p$ of $H^\der_{\Q_p}$, and let $K'$ be the stabilizer of $\Z_p^{n_\rho}$ in $\mathcal H(\Z_p)$. Then $K'=\mathcal H(\Z_p)$ or $[\mathcal H(\Z_p):K']\ge(p-1)/c$, with $c$ the constant of \cite[p.~19]{DJK}. \end{lemma} \begin{proof} Suppose $K'\ne\mathcal H(\Z_p)$. The kernel $\mathcal H_1$ of $\mathcal H(\Z_p)\to\mathcal H(\F_p)$ is a pro-$p$ group; if $\mathcal H_1\not\subset K'$, the $\mathcal H_1$-orbit of $\Z_p^{n_\rho}$ has more than one element and a power of $p$ as size, so $[\mathcal H(\Z_p):K']\ge p$. Otherwise $K'$ is the preimage of a proper subgroup of $\mathcal H(\F_p)$. As $p\ge5$, $\mathcal H(\F_p)$ is generated by the groups $\bar T(\F_p)$ of its maximal tori $\bar T$ defined over $\F_p$: for $\mathcal H_{\F_p}$ simply connected because every semisimple element of $\mathcal H(\F_p)$ lies in such a group, so they generate a normal subgroup with quotient a $p$-group, and $\mathcal H(\F_p)$, a product of groups $\mathcal H_i(\F_{q_i})$ with $\mathcal H_i$ absolutely almost simple and simply connected, is perfect \cite[Thm.~24.17]{MalleTesterman}, and in general because $\mathcal H(\F_p)=\bar T(\F_p)\,\pi(\widetilde{\mathcal H}(\F_p))$ for the simply connected cover $\pi\colon\widetilde{\mathcal H}\to\mathcal H_{\F_p}$, by Lang's theorem. So some $\bar T(\F_p)$ is not in the image of $K'$, and $\bar T$ lifts to a maximal torus $\mathcal T$ of $\mathcal H$ \cite[Thm.~3.2.6]{Conrad}, by Hensel's lemma, which also makes $\mathcal T(\Z_p)\to\bar T(\F_p)$ onto; so $\mathcal T(\Z_p)\not\subset K'$. Then $\mathcal T$ does not fix $\Z_p^{n_\rho}$ in the sense of \cite[\S3.3]{EY}, and the proof of \cite[Prop.~4.3.9]{EY} in \cite[\S4.4]{EY}, applied to $\mathcal T$, to the largest sublattice $W'$ of $\Z_p^{n_\rho}$ that $\mathcal T$ fixes \cite[proof of Lemma~3.3.1]{EY}, and to $\Z_p^{n_\rho}$, gives $[\mathcal T(\Z_p):\mathcal T(\Z_p)\cap K']\ge(p-1)/|\pi_0(S)(\overline{\F}_p)|$, where $S\subset\mathcal T_{\F_p}$ is the stabilizer of the image $L'$ of $p\Z_p^{n_\rho}\cap W'$ in $W'/pW'$ \cite[p.~633]{EY}. Over $\overline{\F}_p$, $S$ is the common kernel of the differences $\chi-\chi'$ of the characters lying in one block of the finest partition of the weights of $W'\otimes\overline{\F}_p$ along which $L'\otimes\overline{\F}_p$ decomposes, and these characters are bounded by \cite[Lemma~6.9]{DJK}; so $|\pi_0(S)(\overline{\F}_p)|\le c$, and $[\mathcal H(\Z_p):K']\ge[\mathcal T(\Z_p):\mathcal T(\Z_p)\cap K']\ge(p-1)/c$. \end{proof} \begin{proof}[Proof of \textup{(DJK1)}] We follow \cite[\S6]{DJK}, with \cref{lem:DJK1} for the bound that \cite[Lemmas~6.10 and~6.11]{DJK} take from the proof of \cite[Lemma~6.6]{Daw}. Let $V$ be the image of $X_H^+\times\{1\}$, $\pi\colon\widetilde H\to H^\der$ the simply connected cover, $K(\widetilde H):=\pi^{-1}(K(H^\der))$, and $K(\widetilde H)^m\supset K(\widetilde H)$ a maximal compact open subgroup of $\widetilde H(\Af)$, as in \cite[proof of Thm.~6.3]{DJK}. Let $B_Z$ and $b$ be the constants of \cite[Lemmas~6.4 and~6.5]{DJK}, so that $|\ker\pi(\C)|\le B_Z$, let $p_K$ be the largest prime with $K_p\ne\mathcal G_{\Z_p}(\Z_p)$ ($p_K:=1$ if there is none), and let $p\notin\Sigma(\widetilde H,K(\widetilde H)^m)$ be a prime with $p>\max\{B_Z,p_K\}$, so that $K(\widetilde H)^m_p$ is hyperspecial. Let $\widetilde{\mathcal H}$ be the reductive model of $\widetilde H_{\Q_p}$ with $\widetilde{\mathcal H}(\Z_p)=K(\widetilde H)^m_p$, $\mathcal H$ the reductive model of $H^\der_{\Q_p}$ to which $\pi$ extends, and $\mathcal Z$ the kernel of $\widetilde{\mathcal H}\to\mathcal H$, which is étale over $\Z_p$ as $p\nmid|\ker\pi(\C)|$. The group $K(H^\der)_p$ need not lie in $\mathcal H(\Z_p)$, and we put $K':=K(H^\der)_p\cap\mathcal H(\Z_p)$. As $K(\widetilde H)_p=\pi^{-1}(K(H^\der)_p)$ lies in $\widetilde{\mathcal H}(\Z_p)$ and contains $\ker\pi$, we have $[K(\widetilde H)^m_p:K(\widetilde H)_p]\ge[\mathcal H(\Z_p):K']/|H^1(\Gal(\Q_p^{\mathrm{un}}/\Q_p),\mathcal Z(\Z_p^{\mathrm{un}}))|$, and $K'\ne\mathcal H(\Z_p)$ if $K(\widetilde H)_p\ne K(\widetilde H)^m_p$, since otherwise $K(\widetilde H)_p\supset\widetilde{\mathcal H}(\Z_p)=K(\widetilde H)^m_p$. This $H^1$ has order at most $B_Z^{2b+2}$ \cite[proof of Lemma~6.10]{DJK}, and $K'$ is the group of \cref{lem:DJK1}. So, by \cref{lem:DJK1}, if $p>c_3:=\max\{4,B_Z,p_K\}$ and $K(\widetilde H)_p\ne K(\widetilde H)^m_p$, then \[ [K(\widetilde H)^m_p:K(\widetilde H)_p]\ \ge\ \frac{p-1}{c\,B_Z^{2b+2}}\ >\ c_4\,p,\qquad c_4:=(3cB_Z^{2b+2})^{-1}, \] with $c$ the constant of \cref{lem:DJK1}. This is \cite[Lemma~6.10]{DJK} with these $c_3$ and $c_4$, and the conclusion of \cite[Lemma~6.11]{DJK} with $\Sigma(H^\der,K(H^\der))$ in place of its printed $\Sigma(H,K(H))$ follows, as in its proof, from \cref{lem:DJK1} and the bound for this $H^1$, with $c_5:=\max\{c_3,c_4^{-1}B_Z^{2b+2}\}$. We now write in the notation of \cref{lem:DJK67} (\cref{sec:DJK67}). In that notation $\widetilde H=\prod_i\mathrm{Res}_{K_i/\Q}H'_i$, with $H'_i$ absolutely almost simple and simply connected over a number field $K_i$; $\ell_i$ and $s_i$ are the field and the integer of \cite[\S\S0.2 and~0.4]{Prasad89} for the quasi-split inner form of $H'_i$, $N_i=d_{\ell_i}/d_{K_i}^{[\ell_i:K_i]}$, $\varpi_i=d_{K_i}^{\dim H'_i/2}N_i^{s_i/2}$, $r_G$ is the absolute rank of $G$, and $c_2^*$ is the constant of the lemma. Its bound carries $\prod_i\varpi_i^{1/2}$, where $\prod_i\varpi_i$ is the discriminant factor of Prasad's formula \cite[Thm.~3.7]{Prasad89}, from which \cite[proof of Thm.~6.3]{DJK} draw the lower bound for the volume of $\Gamma(\widetilde H)^m\backslash\widetilde H(\R)$; in that bound the remaining factor $\prod_i\varpi_i^{1/2}$ suffices. Prasad's theorem applies to each $H'_i$, with $S$ the set of archimedean places of $K_i$, because $H'_i(K_i\otimes\R)$ is not compact. Indeed, as $H$ is the generic Mumford--Tate group on $X_H$, the projection of $h\in X_H$ to each $\Q$-simple factor of $H^\ad$ is non-trivial, so that factor has non-compact real points \cite[Lemma~4.7]{Milne}. As $\dim H'_i\ge3$, and $s_i\ge5$ when $\ell_i\ne K_i$, we have $\varpi_i^{1/2}\ge(d_{K_i}N_i)^{1/2}$, which pays the primes of $\Sigma(\widetilde H,K(\widetilde H)^m)$ that divide some $d_{K_i}N_i$. At every other prime $p$ of that set, some $H'_i$ at some place $v\mid p$ of $K_i$ is not quasi-split, or splits over the maximal unramified extension of $K_{i,v}$ while $K(\widetilde H)^m$ is not hyperspecial at $v$ (otherwise, as $K_i$ and $\ell_i$ are unramified above $p$, $\widetilde H_{\Q_p}$ would be quasi-split and split over an unramified extension, and $K(\widetilde H)^m_p$ would be hyperspecial). Then the factor of Prasad's Euler product at $v$ is at least $q_v^{r_v+1}/(q_v+1)\ge q_v^2/(q_v+1)$, where $q_v$ is the order of the residue field and $r_v\ge1$ the rank of $H'_i$ over the maximal unramified extension of $K_{i,v}$ \cite[\S2.5 and Prop.~2.10(iv)]{Prasad89}; this is at least $\sqrt p$ for $p\ge3$ and $\tfrac43=\tfrac{2\sqrt2}{3}\sqrt2$ for $p=2$, and all the factors are greater than $1$ \cite[Rem.~3.10]{Prasad89}. So $\prod_i\varpi_i^{1/2}$ times the Euler product is at least $\tfrac{2\sqrt2}{3}\,\Pi(\widetilde H,K(\widetilde H)^m)^{1/2}$; dividing by the bound of \cref{lem:DJK67} as in \cite[proof of Thm.~6.3]{DJK}, the factors $\prod_i\varpi_i^{1/2}$ cancel, and \cite[(7)]{DJK} holds with $C:=B_Z^{3r_G}$ and $c_2:=3c_2^*/(2\sqrt2)$. As in \cite[\S6]{DJK}, (DJK1) follows from \cite[(7)]{DJK}, \cite[Lemmas~6.10 and~6.11]{DJK} and \cite[Thm.~6.2]{DJK}. \end{proof} \begin{proof}[Proof of \textup{(DJK3)}] The proof of \cite[Thm.~7.1]{DJK} follows that of \cite[Thm.~7.1]{Daw}, which takes $J_p\subset P(\Q_p)$ from \cite[\S8.3.2]{KY} and bounds its index by \cite[Lemma~8.1.6(b)]{KY} applied in $P(\Q_p)$ \cite[p.~98]{Daw}; \cite[p.~22]{DJK} makes this bound explicit by the proof of \cite[Lemma~8.1.6(b)]{KY}, with the Weyl group of $H^\der_{\Q_p}$. That proof first reduces to a hyperspecial subgroup of the group containing the Iwahori subgroups, here $P(\Q_p)$, which need not have one, as $p\notin\Sigma_V$ constrains only $H^\der$; the proof goes through with \cref{lem:KY816} in place of \cite[Lemma~8.1.6]{KY}. Let $T$ be a maximal split torus of $H^\der_{\Q_p}$ whose apartment contains the point fixed by the hyperspecial subgroup $K_p\cap H^\der(\Q_p)$ \cite[3.8.1]{TitsCorvallis}; the maximal compact subgroup of $T(\Q_p)$ fixes that apartment pointwise (proof of \cref{lem:KY816}), so it lies in $K_p\cap H^\der(\Q_p)\subset K(P)_p$. Let $\Theta\subset T(\Q_p)$ be the subgroup of elements of order dividing $p-1$. Two distinct characters $\chi,\chi'$ of $T$ intervening in $\rho$ have coordinates of absolute value at most $D_{\mathrm{sp}}$ in the basis of \cite[Lemma~7.5]{DJK}, so $\chi-\chi'\notin(p-1)X^*(T)$, as $p-1>2D_{\mathrm{sp}}$, and $\chi\ne\chi'$ on $\Theta$. As $\Theta\subset\mathrm{GL}_{n_\rho}(\Z_p)$ has order prime to $p$ and its characters have values in $\Z_p^\times$, the projectors onto the weight spaces of $T$ preserve $\Z_p^{n_\rho}$; so the Zariski closure $T_{\Z_p}$ of $T$ in $\mathrm{GL}_{n_\rho,\Z_p}$ is a torus \cite[Lemma~3.3.1]{EY}, as \cite[Prop.~7.4.3]{EY} requires. A nonzero weight of $T$ on $\Lie P\subset\mathfrak{gl}_{n_\rho}$ is such a difference $\chi-\chi'$, so it does not lie in $(p-1)X^*(T)$; and $\Theta\subset K(P)_p$. So \cref{lem:KY816}(a), with $H=P_{\Q_p}$, and \cref{lem:KY816}(b) give the torus, chambers and groups of \cref{lem:KY816}(c) with $p$, $T$ and $K(P)_p$ in place of $l$, $T_{V,\Q_l}$ and $K_{P,l}$, the chamber $C^2$ being chosen with respect to $\alpha$ as in \cite[\S8.3.2]{KY}; hence (i) with $f_2:=(\dim G+1)^2$; then (ii) holds with $k_2:=k'+f_2$, for the integer $k'$ of \cite[p.~21]{DJK}, and (iv) follows from \cite[Prop.~8.1.4]{KY} in each $P_{i,\Q_p}$, $i\in\mathcal I$. \end{proof} \subsection{The degree bound}\label{sec:degbound} For $\Pi\ge1$ put $y(\Pi):=\max(6,\,N_K+\log_2\Pi+1)$ and $p^*(\Pi):=2y(\Pi)\log y(\Pi)$. For integers $0\le z\le n$ and $D\ge1$ put \[ R_{z,D}(\Pi):=d_G\bigl(d_G\,c_B\,p^*(\Pi)^{k_2+2f_2}\bigr)^{2^z-1}D^{2^z}, \] let $\Pi_0(z,D):=\sup\{\Pi\ge1:c_1\Pi^{\eta_1}\le R_{z,D}(\Pi)\}$, which is finite because $R_{z,D}$ grows like a power of $\log\Pi$ ($\Pi_0:=1$ if the set is empty), and \[ c_{\deg}^\ad(z,D):=R_{z,D}\bigl(\Pi_0(z,D)\bigr). \] \needspace{4\baselineskip} \begin{theorem}\label{thm:D} Let $Z\subset\Sh_K(G,X)_\C$ be closed and irreducible, $D:=\deg Z$, and $V$ a special subvariety maximal in $Z$ with $\dim V\ge1$. Put $r:=\dim Z-\dim V$. For every prime $p\ge N_K$ with $p\notin\Sigma_V$, \begin{equation}\label{eq:thmD} \deg V\ \le\ d_G\bigl(d_G\,c_B\,p^{k_2+2f_2}\bigr)^{2^r-1}D^{2^r},\qquad c_B=e^*(n)^{2n}. \end{equation} Consequently $\deg V\le c_{\deg}^\ad(\dim Z,D)$. \end{theorem} \begin{proof} Fix $p$. We build closed irreducible $Y_0:=Z\supset Y_1\supset\dots$, all containing $V$, with $\dim Y_{j+1}<\dim Y_j$ and $\deg Y_j\le D_j$, where $D_0:=D$ and $D_{j+1}:=d_G\,c_B\,p^{k_2+2f_2}D_j^2$. Since $Y_j\subset Z$, $V$ is maximal in every $Y_j$. If $Y_j=V$, we stop. Otherwise $Y_j$ is not special. Let $(P,X_P)$ be the Shimura subdatum, with $P$ the generic Mumford--Tate group on $X_P$, of the smallest special subvariety containing $Y_j$, let $\psi\colon\Sh_{K(P)}(P,X_P)_\C\to\Sh_K(G,X)_\C$ be the natural map, $Y_P$ a component of $\psi^{-1}(Y_j)$ with $\psi(Y_P)=Y_j$, which is Hodge generic, and $V_P\subset Y_P$ a component of $\psi^{-1}(V)$ with $\psi(V_P)=V$ \cite[proof of Thm.~1.3]{DJK}. Then $V_P$ is special, of positive dimension and maximal in $Y_P$, since $\psi$ is finite and maps special subvarieties to special subvarieties, and $\Sigma_{V_P}=\Sigma_V$. By (DJK2), $\deg_{\Lb_{K(P)}}Y_P\le\deg Y_j\le D_j$. Let $J_p$, $\alpha$ and $\mathcal I$ be as in (DJK3) for $V_P$ and $p$, $J:=K(P)^pJ_p$, $\psi_J\colon\Sh_J(P,X_P)_\C\to\Sh_K(G,X)_\C$ the natural map, $\widetilde V$ the component of the preimage of $V_P$ given by (DJK3)(iii), and $\widetilde Y$ a component of the preimage of $Y_P$ containing $\widetilde V$. By the projection formula and \cref{lem:H}(a), \[ \deg_{\Lb_J}\widetilde Y\le p^{f_2}D_j,\qquad \deg_{\Lb_J}T_\alpha\widetilde Y\le p^{k_2+f_2}D_j . \] \emph{Cut case: $\widetilde Y\not\subset T_\alpha\widetilde Y$.} By (DJK3)(iii), $\widetilde V\subset T_\alpha\widetilde V\subset T_\alpha\widetilde Y$, so $\widetilde V\subset\widetilde Y\cap T_\alpha\widetilde Y$, a proper closed subset of the irreducible $\widetilde Y$. Let $C$ be a component of $\widetilde Y\cap T_\alpha\widetilde Y$ containing $\widetilde V$ and $Y_{j+1}:=\psi_J(C)$, closed and irreducible as $\psi_J$ is finite, containing $V$, with $\dim Y_{j+1}=\dim C<\dim Y_j$. The level $J\subset K(P)$ is neat, so \cref{lem:bezout}(c) gives $\deg_{\Lb_J}C\le c_B\,p^{k_2+2f_2}D_j^2$, and by (DJK2) and the projection formula for $\Sh_J\to\Sh_{K(P)}$, $\deg Y_{j+1}\le d_G\deg_{\Lb_J}C\le D_{j+1}$. \emph{Stable case: $\widetilde Y\subset T_\alpha\widetilde Y$.} The variety $Y_P$ contains a special point, as the special subvariety $V_P\subset Y_P$ does \cite[Lemma~13.3]{Milne}. By (DJK3)(iv) and \cref{lem:saturation}, the preimage of $Y_P$ in $X_P^+$ is $X^+_{\mathcal I}$-saturated. By saturation, $Y_P$ contains the image $V'$ of $X^+_{\mathcal I}\times\mathrm{pr}_{\mathcal I^c}(X_H^+)$, which contains $V_P$; the second factor is a point, as $Z(H)(\R)$ fixes the points of $X_H$ and $\pi_i(H^\der)=1$ for $i\notin\mathcal I$, and $V'$ is special, as in Step~3 of the proof of \cref{thm:hecke-uniform} with $P_{\mathcal I}$ and $\mathcal I^c$ in place of $P_i$ and $\{i\}^c$. If $V'=V_P$, then $X_H^+=X^+_{\mathcal I}\times\mathrm{pr}_{\mathcal I^c}(X_H^+)$ by dimension, so $H$ is the generic Mumford--Tate group on this set; its image in $P^\ad$ lies in the product of $P_{\mathcal I}$ with the image of $H$ in $P_{\mathcal I^c}$, a torus, and projects onto $P_{\mathcal I}$, as $P$ is the generic Mumford--Tate group on $X_P$; so its derived group, the image of $H^\der$, is $P_{\mathcal I}$. Otherwise $V'$ strictly contains $V_P$, which the maximality of $V_P$ excludes (this is the dichotomy of \cite[Thm.~8.1]{DJK}). So \cref{lem:saturated-degree} and (DJK2) give \[ \deg V\le d_G\deg_{\Lb_{K(P)}}V_P\le d_G\deg_{\Lb_{K(P)}}Y_P\le d_G\deg Y_j\le d_GD_j, \] and we stop. Each cut lowers the dimension, so there are at most $r$ cuts. The recursion gives \[ D_j=(d_G\,c_B\,p^{k_2+2f_2})^{2^j-1}D^{2^j}, \] which is increasing in $j$, so every $D_j$ that occurs is at most $D_r$. With the factor $d_G$ of the stable case this is \eqref{eq:thmD}. For the last assertion let $p$ be the least prime $p\ge N_K$ not dividing $\Pi_V$; then $p\notin\Sigma_V$. At most $\log_2\Pi_V$ primes divide $\Pi_V$. With $y:=y(\Pi_V)$ and $x:=p^*(\Pi_V)\ge17$ we have $x/\log x\ge y$, since $\log(2y\log y)\le2\log y$, and $\pi(x)\ge x/\log x$ \cite[(3.5)]{RosserSchoenfeld}; so $[N_K,x]$ contains at least $y-N_K+1>\log_2\Pi_V$ primes, and $p\le p^*(\Pi_V)$. As the bases in \eqref{eq:thmD} are at least $1$ and $r\le\dim Z$, (DJK1) and \eqref{eq:thmD} give $c_1\Pi_V^{\eta_1}<\deg V\le R_{\dim Z,D}(\Pi_V)$. Hence $\Pi_V\le\Pi_0(\dim Z,D)$, and $\deg V\le c_{\deg}^\ad(\dim Z,D)$, as $R_{z,D}$ is non-decreasing. \end{proof} \Cref{thm:degrees} is \cref{thm:D}, applied at the level $g_iKg_i^{-1}$, with the lattice $\rho(g_i)\Zhat^{n_\rho}$, of the component containing $Z$ (\cref{sec:special}), with $c_B=e^*(n)^{2n}$ (\cref{lem:bezout}(c)). So, in the setting of \cref{thm:degrees}, \eqref{eq:thmD} holds with $d_G$, $k_2$, $f_2$ and $N_K$ the maxima over the connected components of the constants of \cref{sec:DJK} at the levels $g_iKg_i^{-1}$ with the lattices $\rho(g_i)\Zhat^{n_\rho}$, and $\Sigma_V$ that of the translate of $V$. The bound holds for facteur and non-facteur $V$ alike; for non-facteur $V$ and neat $K$ it gives \cite[Thm.~1.3]{DJK}, with the constant effectively computable given the $g_i$. Facteur special subvarieties of bounded degree come in infinite families \cite[p.~2]{DJK}, so a bound for the degree alone leaves infinitely many candidates; \cref{thm:adjoint} bounds the other two terms $d_{L_V}$ and $\alpha_V$ of $\Delta(V)$. \section{The main theorem for adjoint groups}\label{sec:adjoint} In this section $G$ is adjoint, $K$ satisfies (Lv$'$), $n:=\dim\Sh_K(G,X)$ and $e_0:=e^*(n)$. Let $F\supset E(G,X)$ be a number field, $d:=[F:\Q]$, and $Z\subset\Sh_K(G,X)$ a closed subvariety, geometrically irreducible and defined over $F$, with $D:=\deg Z$ and $z:=\dim Z$. Let $(P,X_P)\subset(G,X)$ be the Shimura subdatum, with $P$ the generic Mumford--Tate group on $X_P$, that defines the smallest special subvariety containing $Z$ \cite[p.~14]{KY}, the special closure of $Z$; put $K_P:=K\cap P(\Af)$, $E_P:=E(P,X_P)$, $T_Z:=Z(P)^\circ$, and let $\psi\colon\Sh_{K_P}(P,X_P)\to\Sh_K(G,X)$ be the natural morphism, defined over $E_P$ \cite[Remark~13.8]{Milne}. \subsection{Statement} A special subvariety $V$ maximal in $Z$ belongs to exactly one of three classes: \begin{enumerate} \item[(S)] $T_V=1$; \item[(N)] $T_V\ne1$ and $T_V\not\subset Z(P)$; \item[(C)] $T_V\ne1$ and $T_V\subset Z(P)$. \end{enumerate} Here $V$ is regarded inside the special subvariety defined by $(P,X_P)$ (\cref{lem:lift}). Class (N) says that $V$ is not strongly special in $\Sh_{K_P}(P,X_P)_\C$, since the image of $T_V$ in $P^\ad$ is the connected center of the image of $H_V$; so the Hecke step applies to it. Class (C) consists of special subvarieties that are strongly special in $\Sh_{K_P}(P,X_P)_\C$ but not in $\Sh_K(G,X)_\C$, and the Hecke step says nothing about them; the bounds come instead from the Galois orbit of the component containing the lift $Z_P$ of $Z$ (\cref{lem:lift}), for $d_{L_V}$ (\cref{lem:Za}), and from the translates of $Z_P$ by the center, for $\alpha_V$ (\cref{lem:Zb}). With $b_r$, $\Delta_r$ of \cref{sec:hecke} and $\mathcal B$ of \cref{lem:solve}, computed with $\bar d=d$, and $c_{\deg}^\ad$ of \cref{sec:degrees}, put \[ c_{\mathrm N}(\delta,z,D,d):=\mathcal B\bigl(\Delta_z(D)/C_*,\ b_z\bigr), \] and \begin{align*} c_{\mathrm N}^\sharp(\delta,z,D,d)&:=\mathcal B\bigl((c_BdD)^{2^z}/C_*,\ (k_1+3f)2^z\bigr),\\ c^\sharp(\delta,z,D,d)&:=\max\Bigl(c_{\deg}^\ad(z,D),\ c_{\mathrm N}^\sharp(\delta,z,D,d)^{1/\mu},\\ &\qquad\quad e^{\beta_0(\delta)}\bigl(R_G^2(c_BdD)^{2^z}\bigr)^{1/\mu},\ a^4(a!)^{r_U}R_G\,e_0^{2z(z+1)}(c_BdD)^{2^{z+1}}\Bigr). \end{align*} The arguments of $\mathcal B$ in $c_{\mathrm N}^\sharp$ are $\Delta_z(dD)/C_*$ and $b_z$ computed with $\bar d=1$. \needspace{4\baselineskip} \begin{theorem}\label{thm:adjoint} In this setting let $V$ be a special subvariety maximal in $Z$. \begin{enumerate}[(a)] \item $\deg V\le c_{\deg}^\ad(z,D)$. \item If $V$ is of class (S), then $\Delta(V)=\deg V\le c_{\deg}^\ad(z,D)$. \item If $V$ is of class (N) and $\QRH(\delta;L_V)$ holds, then $\alpha_V\,d_{L_V}^{\mu}\le c_{\mathrm N}(\delta,z,D,d)$; hence $\alpha_V\le c_{\mathrm N}(\delta,z,D,d)$ and $d_{L_V}\le c_{\mathrm N}(\delta,z,D,d)^{1/\mu}$. Moreover, either $\alpha_V\,d_{L_V}^\mu\le c_{\mathrm N}^\sharp(\delta,z,D,d)$, or $d_{L_V}\le e^{\beta_0(\delta)}\bigl(R_G^2(c_BdD)^{2^z}\bigr)^{1/\mu}$ and $\alpha_V\le a^4(a!)^{r_U}R_G\,e_0^{2z(z+1)}(c_BdD)^{2^{z+1}}$. \item If $V$ is of class (C), then $T_V=T_Z$ and $\alpha_V\le a^4(a!)^{r_U}\,d\,(e_0^zD)^{2(z+1)}$; if moreover $\QRH(\delta;L_V)$ holds, then $d_{L_V}\le e^{\beta_0(\delta)}(R_Gd)^{1/\mu}$. \end{enumerate} In particular, if $\QRH(\delta;L_V)$ holds, then $\Delta(V)\le c^\sharp(\delta,z,D,d)$. No hypothesis is used in (a), (b) and in the bound for $\alpha_V$ in (d). \end{theorem} The constants are non-decreasing in $z$, $D$ and $d$ (by their definitions, with \cref{lem:solve} for $\mathcal B$). \needspace{4\baselineskip} \begin{remark}\label{rem:size} For adjoint $G$ the constant $c^\sharp(\delta,z,D,d)$ is at most $(dD)^{2^z/\mu+o(1)}$ as $dD\to\infty$, the $o(1)$ depending on $(G,X,K,\rho)$, $z$ and $\delta$. Indeed, let $t:=dD$, $\Lambda:=(c_Bt)^{2^z}/C_*$, $b:=(k_1+3f)2^z$ and $p:=b/\delta$. Then $\mathcal W(\Lambda,b)+1=2^{z+1}\log t+C_1$ with $C_1:=2^{z+1}\log c_B+2\log(1/C_*)+2+2p\log(2\varsigma p/e)$, which depends only on $(G,X,K,\rho)$, $z$ and $\delta$, so \[ c_{\mathrm N}^\sharp(\delta,z,D,d)\ =\ \frac{(c_Bt)^{2^z}}{C_*}\,\bigl(\varsigma\,(2^{z+1}\log t+C_1)\bigr)^{p}\ =\ O\bigl(t^{2^z}(1+\log t)^p\bigr)\ =\ t^{2^z+o(1)}, \] effectively, since for every $\eta>0$ the maximum $C_\eta$ of $(1+u)^pe^{-\eta u}$ on $u\ge0$ gives $(1+\log t)^p\le C_\eta t^\eta$; the last two terms of $c^\sharp$ are $O(t^{2^z/\mu})$ and $O(t^{2^{z+1}})$, and $2^{z+1}<2^z/\mu$ as $1/\mu\ge32$; and as $\log\Pi_0(z,D)=O(\log D)$ (\cref{thm:D}), $c_{\deg}^\ad(z,D)$ is at most $D^{2^z+o(1)}$. In $c_{\mathrm N}$ the exponent $b_z=(k_1d+3f)2^z$ grows with $d$, but for fixed $d$ the same computation gives, for $V$ of class (N), $\alpha_V\le D^{2^z+o(1)}$ and $d_{L_V}\le D^{2^z/\mu+o(1)}$ as $D\to\infty$. For $\alpha_V$ this is better than the second assertion of \cref{thm:adjoint}(c), whose bound for $\alpha_V$, from class (C) at a later stage of the recursion, is of order $D^{2^{z+1}}$ for fixed $d$; so (c) keeps both. With the form $C(N)\alpha_V(\log d_{L_V})^N$ of the Galois bound used in \cite{KY} and a fixed $N>b/\delta$, the same argument bounds only $\alpha_V(\log d_{L_V})^{N-b/\delta}$, so $d_{L_V}$ would be exponential in a power of $dD$. At $\delta=1/32$ the factor $1/C_*$ is large. As $\kappa(\delta)/\delta^2\ge8$ and $1/\theta\ge8n_T\ge16$, the first term of $\beta_0(\delta)$ is the largest, so $\log(1/c_*(\delta))=\mu\beta_0(\delta)=32\kappa(\delta)/(\mu\delta^2)$, about $2.0\cdot10^6/\mu$. \end{remark} \needspace{6\baselineskip} \subsection{The lift to the special closure} \begin{lemma}\label{lem:lift} \begin{enumerate}[(a)] \item Exactly one irreducible component $Z_P$ of $\psi^{-1}(Z)$ satisfies $\psi(Z_P)=Z$. It is Hodge generic, geometrically irreducible and defined over $FE_P$, $\psi|_{Z_P}\colon Z_P\to Z$ is finite and birational, and $\deg_{\Lb_{K_P}}Z_P\le D$. \item If $V\subset Z$ is special and maximal in $Z$, some component $V_P$ of $\psi^{-1}(V)\cap Z_P$ has $\psi(V_P)=V$. It is special in $\Sh_{K_P}(P,X_P)_\C$, maximal among the special subvarieties of $Z_P$, and has the same $T_V$, $\alpha_V$, $\beta_V$ and reflex field as $V$. \end{enumerate} \end{lemma} \begin{proof} (a) Let $z_0=[h_0,1]\in Z$, $h_0\in X_P^+$, have Mumford--Tate group $P$; such points form the complement in $Z$ of a countable union of proper closed subsets. If $[h,g]\in\psi^{-1}(z_0)$, then $h=qh_0$ for some $q\in G(\Q)$, so the Mumford--Tate group of $h$ is $qPq^{-1}$; it is contained in $P$, as $h\in X_P$, hence equal to $P$. So every point over $z_0$ is Hodge generic, and $\psi^{-1}(z_0)$ is one point by the injectivity of $\psi$ on the Hodge generic locus \cite[Lemma~2.2]{UY}. As $\psi$ is finite and $Z$ lies in its image, the smallest special subvariety containing $Z$ being the image of $X_P^+\times\{1\}$ (\cref{sec:setting}), some component of $\psi^{-1}(Z)$ maps onto $Z$. Two such components $C_1,C_2$ both contain the points over the Hodge generic points of $Z$, which are dense in each by Baire's theorem, as $\psi|_{C_i}$ is finite onto $Z$; so $C_1=C_2$. The group $\Gal(\Qbar/FE_P)$ permutes the components of $\psi^{-1}(Z)$ that map onto $Z$, so it fixes $Z_P$. Finally $\psi|_{Z_P}$ is finite and injective on a dense set, so of degree $1$, and $\deg_{\Lb_{K_P}}Z_P\le\deg Z=D$ by \cite[Cor.~5.3.10]{KY}, as $Z_P$ is Hodge generic and $Z(P)(\R)$ is compact. (b) Some component of $\psi^{-1}(V)\cap Z_P$ maps onto $V$, as $\psi|_{Z_P}$ is finite onto $Z$; it has dimension $\dim V$, so it is a component of $\psi^{-1}(V)$, hence special \cite[p.~14]{KY}. A special $V'$ with $V_P\subsetneq V'\subset Z_P$ would give the special subvariety $\psi(V')\subset Z$ of dimension larger than $\dim V$. Finally $V_P$ and $V$ are defined by the same Shimura datum $(H,X_H)\subset(P,X_P)$, $V_P$ being the image of $X_H^+\times\{1\}$ (\cref{sec:setting}), and $K_P\cap T(\Af)=K\cap T(\Af)$ for every torus $T\subset P$. \end{proof} \needspace{5\baselineskip} \begin{lemma}\label{lem:C0} If $V$ is special and maximal in $Z$, with $T_V\ne1$ and $T_V\subset Z(P)$, then $T_V=T_Z$. If moreover $V$ is a point, then $Z=V$. \end{lemma} \begin{proof} Let $\nu\colon P\to P^\ab:=P/P^\der$. All $h\in X_P$ have the same image $h^\ab:=\nu\circ h$, as $X_P$ is one $P(\R)$-conjugacy class and $P^\ab$ is commutative. The Mumford--Tate group of $h^\ab$ is the image of that of a Hodge generic $h$, so it is $P^\ab$. For $h\in X_{H_V}$ the Mumford--Tate group of $h$ lies in $H_V$ and maps onto that of $h^\ab$, so $\nu(H_V)=P^\ab$; as $H_V=T_V\cdot H_V^\der$ with $H_V^\der\subset P^\der$, $\nu(T_V)=P^\ab$. If $T_V\subset Z(P)$, then $T_V\subset Z(P)^\circ$, and $Z(P)^\circ\to P^\ab$ is an isogeny, so $\dim T_V\ge\dim Z(P)^\circ$ and $T_V=T_Z$. If $V$ is a point $h$, then $H_V=T_V$ is central in $P$, so $X_P=\{h\}$ and $Z=V$. \end{proof} \needspace{6\baselineskip} \subsection{Class (C): the discriminant} \begin{lemma}\label{lem:Za} Suppose $T_Z\ne1$ and let $L$ be its splitting field. If $\QRH(\delta;L)$ holds, then $c_*(\delta)d_L^{\mu}\le R_Gd$, that is, $d_L\le e^{\beta_0(\delta)}(R_Gd)^{1/\mu}$. \end{lemma} \begin{proof} Let $S_P^+$ be the connected component of $\Sh_{K_P}(P,X_P)_\C$ containing $Z_P$. Every $\sigma\in\Gal(\Qbar/FE_P)$ fixes $Z_P$ (\cref{lem:lift}(a)), hence $S_P^+$; so the $\Gal(\Qbar/E_P)$-orbit of $S_P^+$ has at most $[FE_P:E_P]\le d$ members. Let $C:=P^\ab$, $\bar x:=h^\ab$, $E_C:=E(C,\bar x)\subset E_P$, $K^m_C$ the maximal compact open subgroup of $C(\Af)$ and $\mathrm{Cl}_C:=C(\Q)\backslash C(\Af)/K^m_C$. The map $\pi_0(\Sh_{K_P}(P,X_P)_\C)\to\mathrm{Cl}_C$, $[x,g]\mapsto[\nu(g)]$, is well defined, as $\nu(K_P)\subset K^m_C$, and it is $\Gal(\Qbar/E_P)$-equivariant when $\sigma$ acts on $\mathrm{Cl}_C$ by multiplication by $r_C(N_{E_P/E_C}(s_\sigma))$, where $s_\sigma$ is a finite idele of $E_P$ with Artin symbol $\sigma|_{E_P^\ab}$ and $r_C$ is the reciprocity morphism of $(C,\bar x)$. This follows from Shimura reciprocity at a special point $x$ of $X_P$ and $\nu\circ r_x=r_C\circ N_{E(x)/E_C}=r_C\circ N_{E_P/E_C}\circ N_{E(x)/E_P}$, as in \cite[\S13, (64) and footnote~73]{Milne}; that argument does not use that $P^\der$ is simply connected. Hence the orbit of $S_P^+$ has at least $|\mathrm{Im}_{E_P}|$ members, where $\mathrm{Im}_{E_P}$ is the image of $r_C\circ N_{E_P/E_C}$ in $\mathrm{Cl}_C$. The splitting field of $C$ is $L$, as $C$ and $T_Z$ are isogenous \cite[Remark~2.20]{UY}, and $E_C\subset L$ \cite[Remark~12.3(a)]{Milne}. Let $L':=LE_P$. Since $N_{E_P/E_C}\circ N_{L'/E_P}=N_{L/E_C}\circ N_{L'/L}$, $\mathrm{Im}_{E_P}$ contains the image of $N_{L'/L}((\Af\otimes L')^\times)$ under $r_L:=r_C\circ N_{L/E_C}$. As in the proof of \cref{cor:D}, this image has index at most $[L':L]\le[E_P:\Q]\le R_G$ in $\mathrm{Im}_L$. \Cref{prop:C}, applied to $(H,X_H)=(P,X_P)$, gives $|\mathrm{Im}_L|\ge c_*(\delta)d_L^\mu$. So $c_*(\delta)d_L^\mu/R_G\le d$. \end{proof} \subsection{Class (C): the level} For the next two lemmas compare \cite{Heintz83}; we include short proofs, which give the constants used. \needspace{4\baselineskip} \begin{lemma}\label{lem:S} Let $Y\subset\PP^N_\C$ be closed, reduced and of pure dimension, of degree $e$ (the sum of the degrees of its components). Then $Y$ is the common zero set of the forms of degree $e$ vanishing on $Y$. \end{lemma} \begin{proof} Let $Y=Y_1\cup\dots\cup Y_t$, with $\deg Y_i=a_i$ and $\dim Y=:m\Delta_r(D)x_V^{b_r}$, then $\Omega_V>\Delta_r(D_Z)x_V^{b_r}$, as $\Delta_r$ is increasing, and \cref{thm:H} gives a special $V'$ with $V_P\subsetneq V'\subset Z_P$, and $\psi(V')\subset Z$ is special of dimension larger than $\dim V$, against maximality. So $\alpha_Vd_{L_V}^\mu\le(\Delta_r(D)/C_*)\,x_V^{b_r}$, and \cref{lem:solve} gives $\alpha_Vd_{L_V}^\mu\le\mathcal B(\Delta_r(D)/C_*,b_r)\le c_{\mathrm N}(\delta,z,D,d)$, as $r\le z$, $\Delta_r(D)/C_*\ge1$ and $b_r$, $\Delta_r(D)$ are non-decreasing in $r$. As $\alpha_V\ge1$ and $d_{L_V}\ge1$, both bounds follow. For the second assertion we apply \cref{thm:H} with $\bar d=1$, to the Galois orbit of a lift over the reflex field of a special closure, as Klingler and Yafaev do with the conjugates of $Z$ over $E(G,X)$ \cite[\S10.2]{KY}; then $d$ enters only through the degree of the orbit, not through the exponent $b_r$. The larger special subvariety may then lie in another conjugate, and we pass to an intersection of two conjugates, of smaller dimension. Put $E:=E(G,X)$. For a closed subvariety $Y\subset Z$ (so $Y$ lies in the image of $X^+\times\{1\}$), geometrically irreducible and defined over a number field, let $M(Y)$ be the number of its $\Gal(\Qbar/E)$-conjugates, and $F_Y$ the fixed field of its stabilizer in $\Gal(\Qbar/E)$, over which $Y$ is defined, with $[F_Y:E]=M(Y)$. As $\Lb_K$ and the Baily--Borel compactification are defined over $E$, conjugates have the same degree, and the orbit of $Y$ has degree \[ \mathcal D(Y):=\deg\bigl(\Gal(\Qbar/E)\cdot Y\bigr)=M(Y)\deg Y . \] So $M(Y)\le\mathcal D(Y)$, and $\mathcal D(Z)\le[F:E]\,D\le dD$. The setting of this section applies to $Y$ over $F_Y$ in place of $Z$ over $F$. We write $(P_Y,X_{P_Y})$, $K_{P_Y}$, $E_{P_Y}$ and $\psi_Y$ for the objects attached there to $Y$, $Y_{P_Y}$ and $V_{P_Y}$ for the lifts of \cref{lem:lift}, and speak of the class of $V$ relative to $Y$. \emph{Step 1 (one Hecke step).} Let $V$ be maximal in $Y$ and of class (N) relative to $Y$, put $r:=\dim Y-\dim V$, and suppose that $\Omega_V>(c_B\mathcal D(Y))^{2^r}x_V^{(k_1+3f)2^r}$. Then there is $\sigma\in\Gal(\Qbar/E_{P_Y})$ with $\sigma Y\ne Y$ and $V\subset Y\cap\sigma Y$. Indeed, $r\ge1$, as $Y=V$ would put $V$ in class (C). Let $\mathcal Y:=\Gal(\Qbar/E_{P_Y})\cdot Y_{P_Y}$, a closed and $E_{P_Y}$-irreducible subvariety of $\Sh_{K_{P_Y}}(P_Y,X_{P_Y})_\C$; it is Hodge generic, as $Y_{P_Y}$ is and Galois conjugates of special subvarieties are special \cite[proof of Lemma~7.1.2]{KY}. If $\sigma Y=\sigma'Y$ for $\sigma,\sigma'\in\Gal(\Qbar/E_{P_Y})$, then $\tau:=\sigma'^{-1}\sigma$ fixes $Y$, and $\tau Y_{P_Y}$ is a component of $\psi_Y^{-1}(Y)$ mapping onto $Y$, as $\psi_Y$ is defined over $E_{P_Y}$; so $\tau Y_{P_Y}=Y_{P_Y}$ by \cref{lem:lift}(a). Hence distinct components $\sigma Y_{P_Y}$ of $\mathcal Y$ have distinct images $\sigma Y$, so there are at most $M(Y)$ of them, each of degree $\deg_{\Lb_{K_{P_Y}}}Y_{P_Y}\le\deg Y$, and $\deg\mathcal Y\le\mathcal D(Y)$. As above, $E_{P_Y}\subset E_V$, so \cref{thm:H} applies to $(P_Y,X_{P_Y})$, the field $E_{P_Y}$, $\mathcal Y$ and $V_{P_Y}$ with $\bar d=1$, for which $b_r=(k_1+3f)2^r$ and $\Delta_r(\deg\mathcal Y)\le(c_B\mathcal D(Y))^{2^r}$. It gives a special $V'\supsetneq V_{P_Y}$ in a component $\sigma Y_{P_Y}$ of $\mathcal Y$. As $V_{P_Y}$ is maximal in $Y_{P_Y}$ (\cref{lem:lift}(b)), $\sigma Y_{P_Y}\ne Y_{P_Y}$; so $\sigma Y\ne Y$, and $V=\psi_Y(V_{P_Y})\subset\psi_Y(\sigma Y_{P_Y})=\sigma Y$. \emph{Step 2 (intersections).} Let $\sigma\in\Gal(\Qbar/E)$ with $\sigma Y\ne Y$, and let $Y'$ be a component of $Y\cap\sigma Y$. Then $\dim Y'<\dim Y$, and $Y'$ is defined over a number field, as $\Gal(\Qbar/F_Y\sigma(F_Y))$ permutes the components of $Y\cap\sigma Y$. Moreover $\mathcal D(Y')\le c_B\,\mathcal D(Y)^2$: each conjugate $\tau Y'$ is a component of $\tau Y\cap\tau\sigma Y$, an intersection of two distinct conjugates of $Y$, so \cref{lem:bezout}(c) at the level $K$ gives \[ \mathcal D(Y')\ \le\ \sum_{A\ne B}\ \sum_{C\in\Irr(A\cap B)}\deg C\ \le\ c_B\sum_{A\ne B}\deg A\,\deg B\ \le\ c_B\,\mathcal D(Y)^2, \] the sums running over ordered pairs of distinct conjugates of $Y$. \emph{Step 3 (the recursion).} For $V$ of class (N) put $b^\sharp:=(k_1+3f)2^z$. If $\Omega_V\le(c_BdD)^{2^z}x_V^{b^\sharp}$, then \cref{lem:solve} with $\Lambda=(c_BdD)^{2^z}/C_*\ge1$ and $b=b^\sharp$ gives $\alpha_Vd_{L_V}^\mu\le c_{\mathrm N}^\sharp(\delta,z,D,d)$. Otherwise we build $Z=Y_0\supsetneq Y_1\supsetneq\cdots$, closed, geometrically irreducible and containing $V$, with $\dim Y_j\le z-j$ and $\mathcal D(Y_j)\le c_B^{2^j-1}(dD)^{2^j}$; $V$ is maximal in each $Y_j$, as it is in $Z$. If $V$ is of class (C) relative to $Y_j$, we stop. Otherwise $r_j:=\dim Y_j-\dim V$ satisfies $1\le r_j\le z-j$, so \[ \bigl(c_B\mathcal D(Y_j)\bigr)^{2^{r_j}}\le(c_BdD)^{2^{j+r_j}}\le(c_BdD)^{2^z},\qquad x_V^{(k_1+3f)2^{r_j}}\le x_V^{b^\sharp}, \] and Step~1 gives $\sigma$ with $\sigma Y_j\ne Y_j$ and $V\subset Y_j\cap\sigma Y_j$. Let $Y_{j+1}$ be a component of $Y_j\cap\sigma Y_j$ containing $V$; by Step~2, $\mathcal D(Y_{j+1})\le c_B\mathcal D(Y_j)^2\le c_B^{2^{j+1}-1}(dD)^{2^{j+1}}$. The dimension drops at each step, and a stage of dimension $\dim V$ is $V$, of class (C) relative to itself; so we stop at some $Y_s$ with $s\le z$, of dimension $z_s\le z-s$. By \cref{lem:C0} for $Y_s$, $L_V$ is the splitting field of $T_{Y_s}$. The field $F_{Y_s}$ has degree $[E:\Q]M(Y_s)\le R_GM(Y_s)$, as $E\subset E_V$, and $M(Y_s)\le\mathcal D(Y_s)\le(c_BdD)^{2^s}$. So \cref{lem:Za,lem:Zb} for $Y_s$ over $F_{Y_s}$ give $d_{L_V}\le e^{\beta_0(\delta)}\bigl(R_G^2(c_BdD)^{2^z}\bigr)^{1/\mu}$ and \begin{align*} \alpha_V&\le a^4(a!)^{r_U}R_G\,M(Y_s)\bigl(e_0^{z_s}\deg Y_s\bigr)^{2(z_s+1)}\le a^4(a!)^{r_U}R_G\,e_0^{2z(z+1)}\mathcal D(Y_s)^{2(z-s+1)}\\ &\le a^4(a!)^{r_U}R_G\,e_0^{2z(z+1)}(c_BdD)^{2^{z+1}}, \end{align*} as $M(Y_s)\ge1$ and $z-s+1\le2^{z-s}$. (d) $T_V=T_Z$ by \cref{lem:C0}, so $L_V$ is the splitting field of $T_Z$; \cref{lem:Za,lem:Zb} give the bounds. The last assertion follows from (a)--(d), since the three classes exhaust the maximal $V$; in class (N), $\alpha_V\le c_{\mathrm N}^\sharp\le(c_{\mathrm N}^\sharp)^{1/\mu}$ when $\alpha_V d_{L_V}^\mu\le c_{\mathrm N}^\sharp$, as $c_{\mathrm N}^\sharp\ge1$; in class (C) the bounds of (d) are at most the last two terms of $c^\sharp$, as $R_G,c_B\ge1$ and $2(z+1)\le2^{z+1}$. \qed \needspace{4\baselineskip} \begin{corollary}\label{cor:disc} Let $G$ be adjoint, let $K$ satisfy \textup{(Lv$'$)}, let $F$, $d$, $Z$, $D$ and $z$ be as in \cref{thm:adjoint}, and let $x$ be a special point maximal in $Z$ and in the image of $X^+\times\{1\}$. If $\QRH(\delta;L_V)$ holds for $V:=\{x\}$, then \[ \operatorname{disc}(x)\ \le\ B^{-(C_0+e^2/B')}\,c^\sharp(\delta,z,D,d)^{2+\log(1/B)+\log_2(1/B)}, \] with $\operatorname{disc}$ as in \cite[Def.~1]{BSY} and $B$, $C_0$ and $B'=Bc_U$ of \cref{tab:constants}. \end{corollary} \begin{proof} As $G\ne1$ is adjoint, $T_V\ne1$ (\cref{sec:constants}), and $\operatorname{disc}(x)=[K^m_{T_V}:K_{T_V}]\,d_{L_V}$ (the paragraph before \cref{cor:galoisdisc}). By \cref{lem:index}, \[ \operatorname{disc}(x)\ \le\ B^{-(C_0+e^2/B')}\alpha_V^{1+\log(1/B)}d_{L_V}^{1+\log_2(1/B)}, \] and \cref{thm:adjoint} gives $\alpha_V,d_{L_V}\le\Delta(V)\le c^\sharp(\delta,z,D,d)$. \end{proof} \Cref{cor:galoisdisc,cor:disc} extend to every neat product level $K$ and every connected component. For such $K$ and each representative $g_i$ of \cref{sec:special}, let $J_i\subset g_iKg_i^{-1}$ be the level of \cref{lem:LV} for the lattice $\rho(g_i)\Zhat^{n_\rho}$, which satisfies (Lv), and let $g_3$ be as in \cref{lem:LV}. \needspace{4\baselineskip} \begin{corollary}\label{cor:anylevel} Let $G\ne1$ be adjoint, $K$ a neat product level and $\delta\in(0,1/2]$. There are $A,\varepsilon>0$, effectively computable from $(G,X,K,\rho)$, $\delta$ and the representatives $g_i$, such that for every special point $x=[h,g_i]$ with $h\in X^+$, $T:=\MT(h)$ with splitting field $L$ satisfying $\QRH(\delta;L)$, and every number field $F\supset E(G,X)$, $[F(x):F]\ge A\operatorname{disc}(x)^{\varepsilon}/[F:\Q]$, with $\operatorname{disc}(x):=[K^m_T:K_T]\,d_L$ and $K_T:=T(\Af)\cap g_iKg_i^{-1}$. If moreover $x$ is maximal in a closed geometrically irreducible $Z\subset\Sh_K(G,X)$ of dimension $z$ and degree at most $D$, defined over $F$ with $[F:\Q]=d$, then $\operatorname{disc}(x)$ is at most the right side of \cref{cor:disc} at $(\delta,z,g_3D,g_3d)$ for the level $J_i$. \end{corollary} \begin{proof} Here $\operatorname{disc}(x)$ is the discriminant of \cite[Def.~1]{BSY} of the translate $[h,1]$ of $x$ at the level $g_iKg_i^{-1}$ (\cref{sec:special}). Let $x':=[h,1]$ at $J_i$. The map to the level $g_iKg_i^{-1}$ is defined over $E(G,X)$, has fibers of at most $g_3$ points and maps $x'$ to the translate of $x$, and $\operatorname{disc}(x')\ge\operatorname{disc}(x)$, as $T$ and $L$ are unchanged and $T(\Af)\cap J_i\subset K_T$. So under $\QRH(\delta;L)$, \cref{cor:galoisdisc} at $J_i$ gives, for every number field $F\supset E(G,X)$, \[ [F(x):F]\ \ge\ \frac{A_i}{g_3[F:\Q]}\operatorname{disc}(x)^{\varepsilon_i}, \] with $A_i:=C_*B^{\varepsilon_i(C_0+e^2/B')}$ and $\varepsilon_i$ formed at $J_i$. If moreover $x$ is maximal in $Z$ as in the statement, then a component of the preimage of the translate of $Z$ through $x'$ has degree at most $g_3D$, is defined over a field of degree at most $g_3d$ and contains $x'$ as a maximal special point (\cref{lem:LV} and its proof), so \cref{cor:disc} at $J_i$ bounds $\operatorname{disc}(x)\le\operatorname{disc}(x')$ by its right side at $(\delta,z,g_3D,g_3d)$. As $\operatorname{disc}(x)\ge1$, the least $A_i/g_3$ and the least $\varepsilon_i$ over the finitely many $i$ give $A$ and $\varepsilon$. \end{proof} \section{Every Shimura datum}\label{sec:general} Let $(G,X)$ be any Shimura datum, $K=\prod_pK_p$ a neat product level, $\rho\colon G\to\mathrm{GL}_{n_\rho}$ faithful with $\rho(K)\subset\mathrm{GL}_{n_\rho}(\Zhat)$, $\lambda\colon G\to G^\ad$ the adjoint map and $(G^\ad,X^\ad)$ the adjoint datum. The morphism $f\colon\Sh_K(G,X)\to\Sh_{K^\ad}(G^\ad,X^\ad)$, for a level $K^\ad\supset\lambda(K)$, maps special subvarieties to special subvarieties, and a subvariety is special if and only if its image is \cite[Prop.~2.2]{EY}. But $f$ need not be injective on connected components, and then a special subvariety maximal in $Z$ can have an image that is not maximal in $f(Z)$. We choose an adjoint level for which the restriction of $f$ to each component is the quotient by a finite group of automorphisms, and we recurse on the dimension at that fixed level. \subsection{The level} For the rest of this section we replace $K$ by the level $K'$ of \cref{lem:LV}, so that $K_3$ lies in the level-$3$ congruence subgroup for $\rho$. \emph{An integral model.} Let $\mathcal G$ be the schematic closure of $\rho(G)$ in $\mathrm{GL}_{n_\rho,\Z}$. For some integer $M_0$ it is reductive over $\Z[1/M_0]$: its non-smooth locus lies over finitely many primes, as $\mathcal G\to\mathrm{Spec}\,\Z$ is of finite presentation with smooth generic fiber \cite[Tag~054K]{Stacks}, and then \cite[Props.~3.1.9 and 3.1.12]{Conrad} apply. Let $\mathcal S$ be the finite set of primes consisting of $3$, the primes dividing $M_0$, and the $p$ with $K_p\ne\mathcal G(\Z_p)$. For $p\notin\mathcal S$ put $\mathcal G_p:=\mathcal G\otimes\Z_p$, let $\mathcal Z_p$ be its center, a group of multiplicative type with generic fiber $Z(G)$ \cite[Thm.~3.3.4]{Conrad}, and $\mathcal G_p^\ad:=\mathcal G_p/\mathcal Z_p$, an adjoint semisimple $\Z_p$-group with generic fiber $G^\ad$; the sequence $1\to\mathcal Z_p\to\mathcal G_p\to\mathcal G_p^\ad\to1$ is exact as fppf sheaves \cite[Lemma~3.3.1(2), Cor.~3.3.5]{Conrad}. \needspace{4\baselineskip} \begin{lemma}\label{lem:delta} Let $R$ be a ring and $1\to\mathcal Z\to\mathcal G\to\mathcal G'\to1$ an exact sequence of fppf sheaves of groups over $R$ with $\mathcal Z$ central. Then $\mathcal G(R)\to\mathcal G'(R)\xrightarrow{\ \partial\ }H^1_{\mathrm{fppf}}(R,\mathcal Z)$ is exact, and $\partial$ is a homomorphism. \end{lemma} \begin{proof} For $y\in\mathcal G'(R)$ the sheaf $P_y$ of local lifts of $y$ is a $\mathcal Z$-torsor: $\mathcal Z$ acts simply transitively, and $P_y$ has sections locally, as $\mathcal G\to\mathcal G'$ is an epimorphism. Let $\partial(y)$ be its class \cite[Tag~03AJ]{Stacks}; it vanishes if and only if $P_y(R)\ne\emptyset$. The map $(a,b)\mapsto ab$ identifies $P_y\wedge^{\mathcal Z}P_{y'}$ with $P_{yy'}$, which is well defined because $\mathcal Z$ is central, and the class of a contracted product is the sum of the classes: the group law on $H^1$ is the contracted product, since on a cover trivializing both torsors the contracted product has the product Čech cocycle. \end{proof} \emph{The adjoint level.} Put \[ K^\ad:=\prod_{p\in\mathcal S}\lambda(K_p)\times\prod_{p\notin\mathcal S}\mathcal G_p^\ad(\Z_p)\ \subset G^\ad(\Af). \] When $Z(G)$ is not connected, $\lambda(K)$ itself need not be open: for $W=M_2(\Q)$ with the quadratic form $\det$, $\mathrm{SO}(W)=\{(A,B)\in\mathrm{GL}_2^2:\det A=\det B\}/\Gm$ has center $\mu_2$ and adjoint group $\mathrm{PGL}_2^2$, and the image of $\mathrm{SO}(W)(\Z_p)$ has index $2$ in $\mathrm{PGL}_2(\Z_p)^2$ for odd $p$. \begin{lemma}\label{lem:Kad} \begin{enumerate}[(i)] \item $K^\ad$ is a compact open subgroup of $G^\ad(\Af)$ containing $\lambda(K)$, and it normalizes $K$ for the action of $G^\ad$ on $G$ by inner automorphisms. \item Let $\rho^\ad:=\mathrm{Ad}\colon G^\ad\to\mathrm{GL}(\mathrm{Lie}\,G^\der)$ and $\Lambda:=\mathrm{Lie}\,G^\der\cap\mathrm{End}(\Z^{n_\rho})$, via $d\rho$. Then $\rho^\ad(K^\ad)$ preserves $\Lambda\otimes\Zhat$, $K^\ad_3$ lies in the level-$3$ congruence subgroup for $(\rho^\ad,\Lambda)$, and $K^\ad$ is neat. So $K^\ad$ satisfies (Lv) for $(\rho^\ad,\Lambda)$. \item $\lambda^{-1}(K^\ad)=Z(G)(\Af)\cdot K$. \item If $Z(G)$ is connected, then $K^\ad=\lambda(K)$. \end{enumerate} \end{lemma} \begin{proof} (i) Each $\lambda(K_p)$ is compact open, as $\lambda$ is smooth, and for $p\notin\mathcal S$ the factor is $\mathcal G^\ad(\Z_p)$ for the model $\mathcal G/Z(\mathcal G)$ of $G^\ad$ over $\Z[1/M_0]$; so $K^\ad$ is compact open. At $p\notin\mathcal S$, $\lambda(\mathcal G_p(\Z_p))\subset\mathcal G_p^\ad(\Z_p)$. At $p\in\mathcal S$, $\mathrm{Int}(\lambda(k))=\mathrm{Int}(k)$ preserves $K_p$; at $p\notin\mathcal S$ the conjugation action of $\mathcal G_p$ on itself factors through $\mathcal G_p^\ad$ \cite[proof of Cor.~3.3.5]{Conrad}, so $\mathcal G_p^\ad(\Z_p)$ preserves $\mathcal G_p(\Z_p)=K_p$. (ii) At $p\in\mathcal S$, $\mathrm{Ad}(\lambda(k))$ is conjugation by $\rho(k)\in\mathrm{GL}_{n_\rho}(\Z_p)$, which preserves $\mathrm{End}(\Z_p^{n_\rho})$ and $\mathrm{Lie}\,G^\der\otimes\Q_p$. At $p\notin\mathcal S$, $\Lambda\otimes\Z_p$ is the Lie algebra of the derived group $\mathcal G_p^\der$ \cite[Thm.~5.3.1]{Conrad}, a smooth closed subgroup of $\mathrm{GL}_{n_\rho,\Z_p}$, whose Lie algebra is saturated in $\mathrm{End}(\Z_p^{n_\rho})$; and $\mathcal G_p^\ad$ acts on $\mathcal G_p^\der$ by (i). For $k\in K_3$ write $\rho(k)=1+3M$ and $\rho(k)^{-1}=1+3M'$ with $M,M'$ integral; then $\rho(k)Y\rho(k)^{-1}-Y=3(MY+YM'+3MYM')$ lies in $3\,\mathrm{End}(\Z_3^{n_\rho})\cap(\mathrm{Lie}\,G^\der\otimes\Q_3)=3(\Lambda\otimes\Z_3)$. For neatness: the eigenvalues of $\mathrm{Ad}(\lambda(k_3))$ are ratios of eigenvalues of $\rho(k_3)$, which are $\equiv1$ modulo $3$ in $\overline{\Z}_3$, so every element $\xi$ of the group they generate satisfies $\xi\equiv1\bmod3$, and a root of unity $\equiv1\bmod3$ is $1$ \cite[p.~5]{Pink}. So every element of $K^\ad$ is neat in the sense of \cite[0.6]{Pink}, and so is every conjugate of $K^\ad$ under $G^\ad(\Af)$. (iii) ``$\supset$'' is clear, and at $p\in\mathcal S$ the kernel of $\lambda$ on $G(\Q_p)$ is $Z(G)(\Q_p)$. Let $p\notin\mathcal S$, $x\in G(\Q_p)$ with $y:=\lambda(x)\in\mathcal G_p^\ad(\Z_p)$. By \cref{lem:delta}, applied over $\Z_p$ and $\Q_p$, the class of $y$ in $H^1(\Z_p,\mathcal Z_p)$ maps to $0$ in $H^1(\Q_p,Z(G))$, as $y$ lifts to $x$. We show that $H^1(\Z_p,\mathcal Z_p)\to H^1(\Q_p,Z(G))$ is injective; then $y=\lambda(k)$ with $k\in\mathcal G_p(\Z_p)$, and $x\in Z(G)(\Q_p)K_p$. Let $\mathcal T\subset\mathcal G_p$ be a maximal torus over $\Z_p$; it exists by \cite[Thm.~3.2.6]{Conrad}, Lang's theorem and Hensel's lemma, and contains $\mathcal Z_p$ \cite[Cor.~3.3.5]{Conrad}. Let $\mathcal Z_p^\circ$ be the maximal subtorus of $\mathcal Z_p$ \cite[App.~B]{Conrad}, $\mathcal T_1:=\mathcal T/\mathcal Z_p^\circ$ and $\mathcal T^\ad:=\mathcal T/\mathcal Z_p$, so that $\lambda|_{\mathcal T}=\varkappa\circ\pi$ with $\varkappa\colon\mathcal T_1\to\mathcal T^\ad$ an isogeny. Torsors under a smooth affine $\Z_p$-group with connected special fiber are trivial (Lang's theorem and Hensel's lemma), so $H^1(\Z_p,\mathcal T)=H^1(\Z_p,\mathcal Z_p^\circ)=0$ and $H^1(\Z_p,\mathcal Z_p)=\mathcal T^\ad(\Z_p)/\lambda(\mathcal T(\Z_p))$, which maps to $T^\ad(\Q_p)/\lambda(T(\Q_p))\subset H^1(\Q_p,Z(G))$. Let $u\in\mathcal T^\ad(\Z_p)$ with $u=\lambda(t)$, $t\in T(\Q_p)$. For every character $\chi$ of $\mathcal T_1$ over an unramified splitting field, some multiple $m\chi$ is a character $\chi'$ of $\mathcal T^\ad$, so $|\chi(\pi(t))|^m=|\chi'(u)|=1$; hence $\pi(t)\in\mathcal T_1(\Z_p)$. As $H^1(\Z_p,\mathcal Z_p^\circ)=0$, $\pi(t)=\pi(t')$ with $t'\in\mathcal T(\Z_p)$, so $t'^{-1}t\in Z(G)(\Q_p)$ and $u=\lambda(t')\in\lambda(\mathcal T(\Z_p))$. Adelically, if $x=(z_pk_p)_p$, then $z_p\in Z(G)(\Q_p)\cap\mathcal G_p(\Z_p)$ for almost all $p$, so $(z_p)\in Z(G)(\Af)$. (iv) If $Z(G)$ is connected, $\mathcal Z_p$ is a torus for $p\notin\mathcal S$, $H^1(\Z_p,\mathcal Z_p)=0$, and $\lambda(\mathcal G_p(\Z_p))=\mathcal G_p^\ad(\Z_p)$ by \cref{lem:delta}. \end{proof} \subsection{The adjoint map on one component} Let $S_i=[X^+\times g_i]$ be a connected component of $\Sh_K(G,X)_\C$, $\Gamma_i:=G(\Q)_+\cap g_iKg_i^{-1}$, so that $S_i=\lambda(\Gamma_i)\backslash X^+$, and $\Gamma'_i:=G^\ad(\Q)_+\cap\lambda(g_i)K^\ad\lambda(g_i)^{-1}$, so that the component of $\Sh_{K^\ad}(G^\ad,X^\ad)_\C$ containing $f(S_i)$ is $\Gamma'_i\backslash X^+$. Put $\mathfrak G_i:=\Gamma'_i/\lambda(\Gamma_i)$, \[ h_K:=\max_i|\mathfrak G_i|, \] and let $\mathrm{Cl}(K):=Z(G)(\Q)\backslash Z(G)(\Af)/(Z(G)(\Af)\cap K)$, which is finite. \needspace{4\baselineskip} \begin{proposition}\label{prop:adjmap} \begin{enumerate}[(a)] \item $\lambda(\Gamma_i)$ is a normal subgroup of finite index of $\Gamma'_i$, both are neat and arithmetic, and $f|_{S_i}\colon S_i\to\Gamma'_i\backslash X^+$ is the quotient by $\mathfrak G_i$, which acts freely. So $h_K$ is finite. \item Each element of $\mathfrak G_i$ is an automorphism of $S_i$ that extends to the Baily--Borel compactification and preserves $\Lb_K$. If $S_i$ is defined over $F\supset E(G,X)$, all these automorphisms are defined over one extension $F_{\mathfrak G}$ of $F$ of degree at most $h_K!$. Each $\bar\gamma\in\Gamma'_i\cap\lambda(G(\Q))$ acts as right translation by an element of $Z(G)(\Af)$, which is defined over $E(G,X)$; so $F_{\mathfrak G}=F$ if $\Gamma'_i\subset\lambda(G(\Q))$ for every $i$. \item $f^*\Lb_{K^\ad}=\Lb_K$ on the compactification of $S_i$. Hence, for every closed irreducible $Y\subset S_i$, we have $\deg_{\Lb_{K^\ad}}f(Y)\le\deg Y$ and $\deg Y\le h_K\deg_{\Lb_{K^\ad}}f(Y)$. \item Let $\mathrm{Sel}_{\mathcal S}(Z(G))$ be the set of $c\in H^1(\Q,Z(G))$ with $c_\infty=0$, $c_p=0$ for $p\in\mathcal S$, and $c_p$ in the image of $H^1(\Z_p,\mathcal Z_p)$ for $p\notin\mathcal S$. Then $|\mathfrak G_i|\le|\mathrm{Cl}(K)|\cdot|\mathrm{Sel}_{\mathcal S}(Z(G))|$. If $\mathrm{Sel}_{\mathcal S}(Z(G))=0$, which holds if $H^1(\Q,Z(G))=0$ or if $Z(G)$ is split, then $\Gamma'_i\subset\lambda(G(\Q))$ and $|\mathfrak G_i|\le|\mathrm{Cl}(K)|$. \end{enumerate} \end{proposition} \begin{proof} Here $G(\Q)_+=G(\Q)\cap\lambda^{-1}(G^\ad(\R)^+)$, as in \cref{sec:shimura}. (a) $\lambda(\Gamma_i)\subset\Gamma'_i$ by \cref{lem:Kad}(i). The group $\Gamma'_i$ has finite index in the congruence subgroup $G^\ad(\Q)\cap\lambda(g_i)K^\ad\lambda(g_i)^{-1}$, as $G^\ad(\R)^+$ has finite index in $G^\ad(\R)$ \cite[p.~54]{Milne}, and $\lambda(\Gamma_i)$ is arithmetic \cite[Prop.~3.2]{Milne}; two arithmetic subgroups are commensurable, so $[\Gamma'_i:\lambda(\Gamma_i)]$ is finite. They are neat by \cref{lem:Kad}(ii) and \cite[0.5--0.6]{Pink}. Let $\bar\gamma\in\Gamma'_i$, $\bar\gamma=\lambda(g_i)\kappa\lambda(g_i)^{-1}$ with $\kappa\in K^\ad$. On $G(\Af)$, $\mathrm{Int}(\bar\gamma)$ preserves $g_iKg_i^{-1}$ by \cref{lem:Kad}(i); it preserves $G(\Q)$, and $G(\Q)_+$ because $\lambda(\mathrm{Int}(\bar\gamma)\gamma')=\bar\gamma\lambda(\gamma')\bar\gamma^{-1}$. So $\mathrm{Int}(\bar\gamma)\Gamma_i=\Gamma_i$, and $\lambda(\Gamma_i)$ is normal in $\Gamma'_i$. As $\Gamma'_i$ is neat, it acts freely on $X^+$, and $f|_{S_i}$ is the Galois covering with group $\mathfrak G_i$. (b) Each $\bar\gamma\in\Gamma'_i$ normalizes $\lambda(\Gamma_i)$, so it induces an automorphism of $S_i$, which extends to the compactification and preserves the extension of the canonical bundle. $\Gal(\Qbar/F)$ acts on the finite group $\mathfrak G_i=\mathrm{Aut}(S_i/f(S_i))$ by conjugation, and the kernel of this action has index at most $|\mathrm{Aut}\,\mathfrak G_i|\le h_K!$. If $\bar\gamma=\lambda(\gamma)$ with $\gamma\in G(\Q)$, then $\gamma\in G(\Q)_+$, and $\gamma\in g_i\lambda^{-1}(K^\ad)g_i^{-1}=Z(G)(\Af)g_iKg_i^{-1}$ by \cref{lem:Kad}(iii); writing $\gamma=zk$ we get $[\bar\gamma^{-1}x,g_i]=[x,\gamma g_i]=[x,g_izk']$ with $k'\in K$, as $z$ is central. So $\bar\gamma$ acts as right translation by $z^{-1}$, a Hecke translation, defined over $E(G,X)$. (c) $f|_{S_i}$ is étale between quotients of $X^+$ by neat groups, so it pulls top-degree forms back to top-degree forms; the two extensions agree in codimension one on the normal compactification, as logarithmic forms pull back to logarithmic forms, and so are isomorphic (compare \cite[Prop.~5.3.2]{KY}). The projection formula and $\deg(f|_Y)\le|\mathfrak G_i|$ give the inequalities. (d) Let $\partial\colon G^\ad(\Q)\to H^1(\Q,Z(G))$ be the connecting map of \cref{lem:delta}, a homomorphism with kernel $\lambda(G(\Q))$. For each place $v$, $\partial_v(\bar\gamma)=\partial_v(\kappa_v)$, since $\partial_v$ kills $\lambda(G(\Q_v))\ni\lambda(g_{i,v})$. So $\partial_p(\bar\gamma)=0$ for $p\in\mathcal S$, as $\kappa_p\in\lambda(K_p)$; $\partial_p(\bar\gamma)$ comes from $H^1(\Z_p,\mathcal Z_p)$ for $p\notin\mathcal S$, as $\kappa_p\in\mathcal G_p^\ad(\Z_p)$; and $\partial_\infty(\bar\gamma)=0$, as $G(\R)^+\to G^\ad(\R)^+$ is onto. Hence $\Gamma'_i/(\Gamma'_i\cap\lambda(G(\Q)))$ embeds in $\mathrm{Sel}_{\mathcal S}(Z(G))$. Next, $\bar\gamma=\lambda(zk)\mapsto[z]$, with $z,k$ as in (b), is a well-defined homomorphism $(\Gamma'_i\cap\lambda(G(\Q)))/\lambda(\Gamma_i)\to\mathrm{Cl}(K)$: $\gamma$ is determined up to $Z(G)(\Q)$, and then $z$ up to $Z(G)(\Af)\cap K$. It is injective: if $z=rw$ with $r\in Z(G)(\Q)$ and $w\in Z(G)(\Af)\cap K$, then $r^{-1}\gamma=wk\in\Gamma_i$. If $Z(G)$ is split, a product of copies of $\Gm$ and of groups $\mu_m$, then $H^1(\Q,\Gm)=0$ and $H^1(\Q,\mu_m)=\Q^\times/\Q^{\times m}$, and a class $a$ in $\mathrm{Sel}_{\mathcal S}$ has $v_p(a)\equiv0\bmod m$ for $p\notin\mathcal S$ and is an $m$-th power in $\Q_p$ for $p\in\mathcal S$, so $a\in\pm\Q^{\times m}$; for $m$ odd $-1$ is an $m$-th power, and for $m$ even $c_\infty=0$ excludes $-1$. Thus $\mathrm{Sel}_{\mathcal S}(Z(G))=0$. \end{proof} For example, for $\mathrm{SO}(W)$ with $W$ of signature $(2,m)$, $m\ge2$ even, $Z(G)=\mu_2$ is split, and $h_K\le2^{|\mathcal S|-1}$, since $-1\notin K_3$. \subsection{Where maximality is lost} \begin{lemma}\label{lem:NA} Let $Z\subset S_i$ be closed and irreducible and $V\subset Z$ special and maximal in $Z$. If $f(V)$ is not maximal in $f(Z)$, there is $\theta\in\mathfrak G_i$ with $\theta Z\ne Z$ and $V\subset Z\cap\theta Z$. \end{lemma} \begin{proof} Let $V^\sharp$ be special with $f(V)\subsetneq V^\sharp\subset f(Z)$, and $\widetilde V$ a component of $f^{-1}(V^\sharp)$ containing $V$. It is special \cite[p.~14]{KY}, of dimension $\dim V^\sharp>\dim V$ as $f$ is finite, and lies in $S_i$, being connected. By \cref{prop:adjmap}(a), $\widetilde V\subset f^{-1}(f(Z))\cap S_i=\bigcup_{\theta\in\mathfrak G_i}\theta Z$, so $\widetilde V\subset\theta Z$ for some $\theta$. If $\theta Z=Z$, $\widetilde V$ would contradict the maximality of $V$. \end{proof} \subsection{The theorem} For a special subvariety $V$ of $\Sh_K(G,X)_\C$, $f(V)$ is special with torus $T_V$, the connected center of $\lambda(H_V)$, as in the introduction. We put \[ \alpha_V:=\alpha_{f(V)}\ \text{in}\ \Sh_{K^\ad}(G^\ad,X^\ad)\ \text{(\cref{def:alpha})},\qquad \Delta(V):=\max\bigl(\deg V,\ d_{L_V},\ \alpha_V\bigr), \] with $\deg V$ taken for $\Lb_K$ at the original level. For $V$ at the original level, where $\lambda(K)$ need not lie in $K^\ad$, $\alpha_V:=\alpha_{f(V')}$ for a component $V'$ of the preimage of $V$ in $\Sh_{K'}(G,X)$; as $K'$ is normal in $K$, these components are the $V'k$, $k\in K$, and $f(V'k)=f(V')\lambda(k)$ with $\lambda(k)$ normalizing $K^\ad$, so $\alpha_{f(V')}$ does not depend on $V'$. If $G$ is adjoint and $K$ satisfies (Lv), then $K^\ad=K$ and these are the invariants of \cref{sec:setting} for the representation $\rho^\ad$ and the lattice $\Lambda$; they are those for $\rho$ formed with the same constant $B$, as the groups $K_{T_V,p}$ and $K^m_{T_V,p}$ do not depend on the representation; this $B$ is admissible for $\rho$ as well if $a$ also bounds the indices of \cite[pp.~21--22]{UY} for $\rho$, as $a=|\mathrm{GL}_{\dim G}(\F_3)|$ does when $n_\rho\le\dim G$. At any compact open product level containing $K^\ad$, $\alpha_{f(V)}$ is at most this $\alpha_V$. Let $\bar g_1,\dots,\bar g_m$ represent $G^\ad(\Q)_+\backslash G^\ad(\Af)/K^\ad$, a finite set \cite[Lemma~5.12]{Milne}, and let $\bar c^\sharp(\delta,z,D,d)$ and $\bar c_{\deg}^\ad(z,D)$ be the maxima over $t$ of the constants $c^\sharp$ and $c_{\deg}^\ad$ of \cref{sec:degrees,sec:adjoint} for $(G^\ad,X^\ad)$ at the level $\bar g_tK^\ad\bar g_t^{-1}$, with $\rho^\ad$ and the lattice $\mathrm{Ad}(\bar g_t)(\Lambda\otimes\Zhat)$ (\cref{sec:setting}), and with $n:=\dim\Sh_K(G,X)$; put $e_0:=e^*(n)$. The constant $B$ of \cref{tab:constants} is the same at all these levels (we take $a:=|\mathrm{GL}_{\dim G^\der}(\F_3)|$, which bounds the indices of \cite[pp.~21--22]{UY} for every lattice $\mathrm{Ad}(\bar g_t)(\Lambda\otimes\Zhat)$). Put $h_{\mathfrak G}:=1$ if $\Gamma'_i\subset\lambda(G(\Q))$ for every $i$, and $h_{\mathfrak G}:=h_K!$ otherwise, and define \[ D_0:=g_3D,\quad d_0:=g_3d\,h_{\mathfrak G},\qquad D_{j+1}:=e_0^{2n}D_j^2,\quad d_{j+1}:=e_0^{2n}D_j^2\,d_j . \] \needspace{4\baselineskip} \begin{theorem}\label{thm:NA} Let $(G,X)$ be a Shimura datum with $G^\ad\ne1$, $K$ a neat product level and $\rho$ as above, $F\supset E(G,X)$ a number field with $[F:\Q]=d$, $Z\subset\Sh_K(G,X)$ closed and geometrically irreducible, defined over $F$, of degree $D$ and dimension $z$, and $V$ a special subvariety maximal in $Z$. Let $K'$ be the level of \cref{lem:LV}, and $K^\ad$, $h_K$, $h_{\mathfrak G}$ as above, built from $K'$; \cref{cor:H} bounds $h_K$ in closed form, and $h_{\mathfrak G}\le h_K!$. \begin{enumerate}[(a)] \item $\deg V\le h_K\,\bar c_{\deg}^\ad(z,D_z)$, and if $\QRH(\delta;L_V)$ holds, then $\Delta(V)\le h_K\,\bar c^\sharp(\delta,z,D_z,d_z)$. \item If $\lambda(K)$ is open in $G^\ad(\Af)$, for instance if $Z(G)$ is connected, the same holds with $K^\ad:=\lambda(K)$ and $h_K$, $h_{\mathfrak G}$ computed at the level $K$ itself, with $D_0:=D$, $d_0:=d\,h_{\mathfrak G}$, and with $\bar c^\sharp$, $\bar c_{\deg}^\ad$ the maxima for $(G^\ad,X^\ad)$ at the level that \cref{lem:LV} makes from $\lambda(K)$ for $(\rho^\ad,\Lambda)$, evaluated at $(g_3^\ad D_z,g_3^\ad d_z)$, where $g_3^\ad:=|\mathrm{GL}_{\dim G^\der}(\F_3)|$. If $\lambda(K)$ satisfies (Lv$'$) for $(\rho^\ad,\Lambda)$, the constants are those at the level $\lambda(K)$ itself, evaluated at $(D_z,d_z)$ (\cref{thm:adjoint}). \end{enumerate} In either part, if $h_K=1$, the bounds hold with $(D_0,d_0)$ in place of $(D_z,d_z)$. \end{theorem} If $Z(G)$ is connected, $K^\ad=\lambda(K')\subset\lambda(K)$ (\cref{lem:Kad}(iv)), so the bound for $\alpha_V$ holds with $\alpha_V$ computed at $\lambda(K)$; for $\mathcal A_g$ at $K(N)$, $N\ge3$, this is the level of \cref{thm:Ag}(i). If $G$ is adjoint, $K^\ad=K'\subset K$, so $\alpha_V$ may be computed at $K$. \begin{proof} (a) \Cref{lem:LV} gives $Z'\subset\Sh_{K'}(G,X)$, geometrically irreducible over a field $F'$ of degree at most $g_3d$, with $\deg_{\Lb_{K'}}Z'\le g_3D$, and $V'$ maximal in $Z'$ with $\pi(V')=V$, $\deg V\le\deg_{\Lb_{K'}}V'$ and $T_{V'}=T_V$. Let $S_i$ be the component containing $Z'$. Put $Z^{(0)}:=Z'$, defined over $F_0:=F'F_{\mathfrak G}$, of degree at most $d_0$ over $\Q$. Given $Z^{(j)}\supset V'$ closed and irreducible, defined over $F_j$ with $[F_j:\Q]\le d_j$, and of degree at most $D_j$: $V'$ is maximal in $Z^{(j)}\subset Z'$. If $f(V')$ is maximal in $f(Z^{(j)})$, stop. Otherwise \cref{lem:NA} gives $\theta\in\mathfrak G_i$ with $\theta Z^{(j)}\ne Z^{(j)}$ and $V'\subset Z^{(j)}\cap\theta Z^{(j)}$, and we let $Z^{(j+1)}$ be a component of this intersection containing $V'$; $\dim Z^{(j+1)}<\dim Z^{(j)}$. Put $\Lb:=\Lb_{K'}|_{\overline S_i}$. As $\theta$ preserves $\Lb$ (\cref{prop:adjmap}(b)), $\theta Z^{(j)}$ has $\Lb$-degree at most $D_j$, and by \cref{lem:bezout}(b) at the neat level $K'$, with $e=e_0$, the components of $Z^{(j)}\cap\theta Z^{(j)}$ have total $\Lb$-degree at most $e_0^{2n}D_j^2$. So $\deg_{\Lb}Z^{(j+1)}\le D_{j+1}$, and $Z^{(j)}\cap\theta Z^{(j)}$ has at most $e_0^{2n}D_j^2$ components. It is defined over $F_j$, since $\theta$ is defined over $F_{\mathfrak G}\subset F_j$, so $Z^{(j+1)}$ is defined over an extension $F_{j+1}$ of $F_j$ of degree at most $e_0^{2n}D_j^2$. The recursion stops after $j^*\le z-\dim V\le z$ steps, since $Z^{(j)}=V'$ once $\dim Z^{(j)}=\dim V$. If $h_K=1$, every $\mathfrak G_i$ is trivial, so by \cref{lem:NA} it stops at $j^*=0$. Put $W:=f(Z^{(j^*)})$; then $f(V')$ is maximal in $W$. Let $\bar g_t$ be the representative for which $W$ lies in the image of $X^+\times\{\bar g_t\}$ in $\Sh_{K^\ad}(G^\ad,X^\ad)_\C$. The level $K^\ad$ satisfies (Lv) for $(\rho^\ad,\Lambda)$ (\cref{lem:Kad}(ii)), so $\bar g_tK^\ad\bar g_t^{-1}$ satisfies it for the lattice $\mathrm{Ad}(\bar g_t)(\Lambda\otimes\Zhat)$, and we apply \cref{thm:adjoint} at that level to the translates of $W$ and $f(V')$ by $\bar g_t^{-1}$ (\cref{sec:setting}); the translation changes no degree, field of definition, $T_V$, $L_V$ or $\alpha_V$. The variety $W$ is geometrically irreducible, defined over $F_{j^*}\supset E(G,X)\supset E(G^\ad,X^\ad)$ \cite[2.2.1]{Deligne79}, of dimension at most $z$ and degree at most $D_{j^*}$ by \cref{prop:adjmap}(c). This bounds $\deg f(V')$, $d_{L_V}$ and $\alpha_V$, and $\deg V\le\deg_{\Lb_{K'}}V'\le h_K\deg f(V')$ by \cref{prop:adjmap}(c). The constants are non-decreasing in $z$, $D$ and $d$, and $D_j$, $d_j$ increase with $j$, so the values at $j=z$ bound all cases, and those at $j=0$ if $h_K=1$. (b) When $\lambda(K)$ is open, the argument runs at the level $K$ with $K^\ad:=\lambda(K)$: \cref{prop:adjmap}(a)--(d) and \cref{lem:NA} hold with the same proofs, $\lambda(K)$ being neat \cite[0.6]{Pink} and normalizing $K$, and $\lambda^{-1}(\lambda(K))=Z(G)(\Af)K$. \Cref{thm:adjoint} is applied at the level $\lambda(K)$ through \cref{lem:LV} for $(G^\ad,X^\ad,\lambda(K),\rho^\ad)$, which costs the factor $g_3^\ad$ and can only increase $\alpha$. Here too the constants at a level $K''$ are the maxima over the levels $\bar g_tK''\bar g_t^{-1}$, with the lattices $\mathrm{Ad}(\bar g_t)(\Lambda\otimes\Zhat)$, for $\bar g_t$ representing $G^\ad(\Q)_+\backslash G^\ad(\Af)/K''$. \end{proof} \begin{proof}[Proof of \cref{thm:main}] If $G^\ad=1$, then $G$ is a torus, $\Sh_K(G,X)$ is finite and $V=Z$ is a point with $T_V=1$, so $\deg V=d_{L_V}=\alpha_V=1$, and we put $c_{\deg}(D)=c(\delta,D,d):=1$. Otherwise a special point $x$ has $\lambda(\mathrm{MT}(x))\ne1$, so $n_T\ge2$ (\cref{sec:special}) and $s_\rho,t_\rho\ge1$ for $(G^\ad,X^\ad,\rho^\ad)$, and \cref{thm:NA}(a) with $z\le n$ and the monotonicity of the constants give the bounds of \cref{thm:main} with $h_K\,\bar c_{\deg}^\ad(n,D_n)$ and $h_K\,\bar c^\sharp(\delta,n,D_n,d_n)$. Let $H_K$ be the integer part of the right side of \cref{cor:H} for the level $K'$ of \cref{lem:LV}, and let $d_n^*$ be $d_n$ computed from $d_0:=g_3d\,H_K!$. As $h_K\le H_K$, $h_{\mathfrak G}\le h_K!\le H_K!$ and the constants are non-decreasing in $d$, \cref{thm:main} holds with \[ c_{\deg}(D):=H_K\,\bar c_{\deg}^\ad(n,D_n),\qquad c(\delta,D,d):=H_K\,\bar c^\sharp(\delta,n,D_n,d_n^*), \] and these are effectively computable, $H_K$ being read off the character group of $Z(G)$, $\rho$ and the level. Smaller bounds for $h_K$ and $h_{\mathfrak G}$, such as those in \cref{thm:AgK}, may be used in place of $H_K$ and $H_K!$. The bounds in the last sentence of the theorem are \cref{cor:size}(a). \end{proof} \needspace{4\baselineskip} \begin{corollary}\label{cor:size} Let $(G,X)$, $K$, $\rho$, $\delta$, $n$ and $\mu$ be as in \cref{thm:main}. \begin{enumerate}[(a)] \item For every $\varepsilon>0$ the constants of \cref{thm:main} satisfy \[ c_{\deg}(D)\ \le\ C'_\varepsilon\,D^{4^n+\varepsilon},\qquad c(\delta,D,d)\ \le\ C_\varepsilon\,d^{2^n/\mu+\varepsilon}D^{3\cdot4^n/\mu+\varepsilon}, \] with $C'_\varepsilon$ effectively computable from $(G,X,K,\rho)$, $\varepsilon$ and the representatives of \cref{sec:general}, and $C_\varepsilon$ from these and $\delta$. \item If $G^\ad\ne1$ and $h_K=1$, then \cref{thm:main} holds with $\bar c_{\deg}^\ad(n,D_0)$ and $\bar c^\sharp(\delta,n,D_0,d_0)$, $D_0=g_3D$, $d_0=g_3d$, in place of $c_{\deg}(D)$ and $c(\delta,D,d)$, and for every $\varepsilon>0$ these constants are at most $C'_\varepsilon D^{2^n+\varepsilon}$ and $C_\varepsilon(dD)^{2^n/\mu+\varepsilon}$. \end{enumerate} \end{corollary} \begin{proof} For a general Shimura datum with $G^\ad\ne1$ (for a torus the constants are~$1$, proof of \cref{thm:main}), \cref{thm:NA} evaluates the constants of \cref{rem:size} at $(D_n,d_n)$, where $D_n\le(e_0^{2n}D_0)^{2^n}$ and $d_n\le d_0(e_0^{2n}D_0)^{2^{n+1}}$. With $H_K$ and $d_n^*$ as in the proof of \cref{thm:main}, $d_n^*D_n\le g_3H_K!\,d\,(e_0^{2n}g_3D)^{3\cdot2^n}$, so for every $\varepsilon>0$, by \cref{rem:size} with exponent slack $\varepsilon/(3\cdot2^n)$, $c(\delta,D,d)$ satisfies the bound of (a). By \cref{rem:size}, $\bar c_{\deg}^\ad(n,D)\le D^{2^n+o(1)}$ as $D\to\infty$, the maximum being over finitely many levels, and $c_{\deg}^\ad$ involves no $\delta$; with $c_{\deg}(D)=H_K\,\bar c_{\deg}^\ad(n,D_n)$ and $D_n\le(e_0^{2n}g_3D)^{2^n}$, exponent slack $\varepsilon/2^n$ gives the bound of (a) for $c_{\deg}(D)$. If $h_K=1$, then $h_{\mathfrak G}=1$ and the recursion of \cref{thm:NA}(a) stops at $j^*=0$, so \cref{thm:main} holds with $\bar c_{\deg}^\ad(n,D_0)$ and $\bar c^\sharp(\delta,n,D_0,d_0)$, $D_0=g_3D$, $d_0=g_3d$, in place of $c_{\deg}(D)$ and $c(\delta,D,d)$ (the last sentence of \cref{thm:NA}); by \cref{rem:size} at these inputs, these constants are at most $C'_\varepsilon D^{2^n+\varepsilon}$ and $C_\varepsilon(dD)^{2^n/\mu+\varepsilon}$. \end{proof} \needspace{5\baselineskip} \begin{corollary}\label{cor:reducible} Let $(G,X)$, $K$, $\rho$ and $\delta$ be as in \cref{thm:main}, $n:=\dim\Sh_K(G,X)$, $D,d\ge1$, and $V$ a special subvariety maximal in a closed subvariety $Z$. \begin{enumerate}[(a)] \item If $Z\subset\Sh_K(G,X)$ is defined over a number field $F\supset E(G,X)$ with $[F:\Q]=d$ and has degree at most $D$, then $\deg V\le c_{\deg}(D)$, and $d_{L_V},\alpha_V\le c(\delta,D,dD)$ if $\QRH(\delta;L_V)$ holds. \item If $Z\subset\Sh_K(G,X)_\C$ has degree at most $D$, then $\deg V\le c_{\deg}\bigl(c_B^{2^n-1}D^{2^n}\bigr)$, with $c_B$ as in \cref{lem:bezout}(c). \end{enumerate} \end{corollary} \begin{proof} Let $W$ be an irreducible component of $Z_\C$ containing $V$; then $V$ is maximal in $W$, and $\deg W\le\deg Z$, the degree being the sum over the components (\cref{sec:shimura}). (a) $Z_\C$ has at most $D$ components, which $\Gal(\Qbar/F)$ permutes, so $W$ is defined over an extension of $F$ of degree at most $D$, and \cref{thm:main} for $W$ gives the bounds, its constants being non-decreasing in $d$ (proof of \cref{thm:NA}). (b) Put $W_0:=W$. If $W_j\supset V$ is irreducible and not defined over $\Qbar$, some $\sigma\in\mathrm{Aut}(\C/\Qbar)$ has $\sigma W_j\ne W_j$. As $V$ is defined over $\Qbar$ (\cref{sec:special}) and $\Lb_K$ over $E(G,X)$, $V=\sigma V\subset W_j\cap\sigma W_j$ and $\deg\sigma W_j=\deg W_j$. Let $W_{j+1}$ be a component of $W_j\cap\sigma W_j$ containing $V$; then $\dim W_{j+1}<\dim W_j$, $V$ is maximal in $W_{j+1}$, and $\deg W_{j+1}\le c_B(\deg W_j)^2$ by \cref{lem:bezout}(b),(c). A stage of dimension $\dim V$ is $V$, so after $j\le n$ steps $W_j$ is geometrically irreducible and defined over a number field containing $E(G,X)$, with $\deg W_j\le c_B^{2^j-1}D^{2^j}\le c_B^{2^n-1}D^{2^n}$, and \cref{thm:main}(i) for $W_j$ gives the bound, as $c_{\deg}$ is non-decreasing. \end{proof} \needspace{5\baselineskip} \begin{corollary}\label{cor:pointfield} In the setting of \cref{thm:main}, let $G^\ad\ne1$, let $x$ be a special point maximal in $Z$, $V:=\{x\}$, and assume $\QRH(\delta;L_V)$. Then \[ [F(x):F]\ \le\ g_3\,H_K\,n_T\,C_{\mathrm{ind}}\,h_{L_V}\,c(\delta,D,d)^{1+\log(1/B)+\log_2(1/B)}, \] with $g_3$ as in \cref{lem:LV}, $H_K$ as in the proof of \cref{thm:main}, $h_{L_V}$ the class number of $L_V$, which \cref{lem:classgroup}(a) bounds through $d_{L_V}\le c(\delta,D,d)$, and $n_T$, $B$ and $C_{\mathrm{ind}}:=\max_tB^{-(C_0+e^2/B')}$ formed with the constants of \cref{tab:constants} for $(G^\ad,X^\ad,\rho^\ad)$ at the levels $\bar g_tK^\ad\bar g_t^{-1}$ of \cref{sec:general}, each with the lattice $\mathrm{Ad}(\bar g_t)(\Lambda\otimes\Zhat)$ and the common $B$. By \cref{cor:size}, the right side is at most a polynomial in $D$ and $d$. \end{corollary} \begin{proof} By \cref{thm:main}(ii), $d_{L_V},\alpha_V\le c:=c(\delta,D,d)$, with $\alpha_V=\alpha_{f(V')}$ at the level $K^\ad$ built from the level $K'$ of \cref{lem:LV}. By that lemma and its proof there are $x'$ over $x$ and a component $Z'$ of $\pi^{-1}(Z)$ through $x'$, defined over an extension $F'$ of $F$ of degree at most $g_3$, as $\Gal(\Qbar/F)$ permutes the at most $\deg\pi\le g_3$ components of $\pi^{-1}(Z)$. Let $S_i$ be the connected component of $\Sh_{K'}(G,X)_\C$ containing $Z'$, and $y:=f(x')$. Every $\sigma\in\Gal(\Qbar/F'(y))$ preserves $Z'$, hence $S_i$, and maps $x'$ into $S_i\cap f^{-1}(y)$, an orbit of $\mathfrak G_i$, which acts freely (\cref{prop:adjmap}(a)); so $[F'(x'):F'(y)]\le h_K\le H_K$. For the $t$ with $y$ in the image of $X^+\times\{\bar g_t\}$, the right translation by $\bar g_t$ is an isomorphism from $\Sh_J(G^\ad,X^\ad)$, $J:=\bar g_tK^\ad\bar g_t^{-1}$, onto $\Sh_{K^\ad}(G^\ad,X^\ad)$, defined over $E(G^\ad,X^\ad)\subset F'$ (\cref{sec:special}); so we may write $y=[h,1]$ at the level $J$, which satisfies (Lv) for $\mathrm{Ad}(\bar g_t)(\Lambda\otimes\Zhat)$ by \cref{lem:Kad}(ii) and transport of the lattice, with $\MT(h)=T_V$ and $\alpha_y=\alpha_V$. As $\Gal(\Qbar/L_V)$ acts on $y$ through the reciprocity map $r_{L_V}$, which maps $L_V^\times$ into $T_V(\Q)$ and the unit ideles into $K^m_{T_V}$ (proof of \cref{cor:D}), the orbit of $y$ maps to at most $h_{L_V}$ points of $T_V(\Q)\backslash T_V(\Af)/K^m_{T_V}$, with fibers of at most $[K^m_{T_V}:K_{T_V}]$ points, $K_{T_V}:=T_V(\Af)\cap J$. With \cref{lem:index} at $J$, \begin{multline*} [F'(y):F']\ \le\ [F'L_V:F']\,|\Gal(\Qbar/L_V)\cdot y|\ \le\ n_T\,h_{L_V}\,[K^m_{T_V}:K_{T_V}]\\ \le\ n_T\,h_{L_V}\,C_{\mathrm{ind}}\,c^{1+\log(1/B)+\log_2(1/B)}. \end{multline*} Finally $[F(x):F]\le[F'(x'):F]=[F':F]\,[F'(x'):F'(y)]\,[F'(y):F']$, as $x=\pi(x')$ and $y=f(x')$ with $\pi$ and $f$ defined over $E(G,X)\subset F$. \end{proof} \subsection{Siegel modular varieties}\label{sec:Ag} In this subsection $\nu\colon\mathrm{GSp}_{2g}\to\Gm$ is the similitude character. \needspace{4\baselineskip} \begin{theorem}\label{thm:AgK} Let $g\ge1$, $(G,X)=(\mathrm{GSp}_{2g},\mathcal H_g^\pm)$ with its standard representation, $n=g(g+1)/2$, $e_0=e^*(n)$, and $s_g:=|\mathrm{Sp}_{2g}(\F_3)|=3^{g^2}\prod_{i=1}^g(3^{2i}-1)$ \cite[p.~70]{Taylor}. Let $c^\sharp(\delta,z,D,d)$ and $c_{\deg}^\ad(z,D)$ be the constants of \cref{sec:adjoint} for $(\mathrm{PGSp}_{2g},X^\ad)$ with $(\mathrm{Ad},\mathfrak{sp}_{2g}(\Zhat))$ at the level named below. Let $F$, $d$, $Z$, $D$, $z$ and $V$ be as in \cref{thm:NA}, and define $D_j$, $d_j$ by $D_{j+1}:=e_0^{2n}D_j^2$, $d_{j+1}:=e_0^{2n}D_j^2d_j$ from the initial values given in (a). \begin{enumerate}[(a)] \item Let $N\ge3$, $K=K(N)$ the principal congruence subgroup of level $N$, $D_0:=D$ and $d_0:=d$. Then $h_K$, computed at the level $K(N)$ as in \cref{thm:NA}(b), is at most $\#\{u\in(\Z/N)^\times:u^2=1\}/2$, $h_{\mathfrak G}=1$, and \[ \deg V\le h_K\,c_{\deg}^\ad(z,D_z),\qquad \Delta(V)\le h_K\,c^\sharp(\delta,z,D_z,d_z)\ \text{ if }\QRH(\delta;L_V)\text{ holds}, \] with the constants, and $\alpha_V$, at the level $\lambda(K(N))$. If $\pm1$ are the only square roots of $1$ in $(\Z/N)^\times$, that is, if $N=4$, $p^k$ or $2p^k$ for an odd prime $p$, then $h_K=1$ and these bounds hold with $(D,d)$ in place of $(D_z,d_z)$. \item Let $K(1):=\mathrm{GSp}_{2g}(\Zhat)$, so that $\Sh_{K(1)}(G,X)_\C=\mathcal A_{g,1}$, and take degrees on $\mathcal A_{g,1}$ as in \cref{lem:degAg1}. Then \begin{gather*} \deg V\le c_{\deg}^\ad\bigl(z,(s_g/2)D\bigr),\\ \max\bigl(\deg V,d_{L_V},\alpha_V\bigr)\le c^\sharp\bigl(\delta,z,(s_g/2)D,s_gd\bigr)\ \text{ if }\QRH(\delta;L_V)\text{ holds}, \end{gather*} with the constants at the level $\lambda(K(3))$ and $\alpha_V$ computed at the level $\lambda(K(1))$. \end{enumerate} In both cases $d_{L_V}$ is also the discriminant of the splitting field of the connected center of $H_V$. \end{theorem} For $\mathcal A_{g,1}$ we need a degree. Let $\pi\colon\Sh_{K(3)}(G,X)\to\Sh_{K(1)}(G,X)$ be the natural map. The group $K(1)/K(3)=\mathrm{GSp}_{2g}(\F_3)$ acts on $\Sh_{K(3)}(G,X)$ by right translations, which preserve $\Lb_{K(3)}$, through $\overline G:=\mathrm{GSp}_{2g}(\F_3)/\{\pm1\}$, the image of $Z(G)(\Q)\cap K(1)=\{\pm1\}$ acting trivially; $\pi$ is the quotient by $\overline G$, and $\deg\pi=|\overline G|=s_g$, since a general point of $\mathcal H_g$ has stabilizer $\{\pm1\}$ in $\mathrm{Sp}_{2g}(\Z)$. The two geometric components of $\Sh_{K(3)}(G,X)$ correspond to $\F_3^\times$, and $k$ moves them by $\nu(k)$, so the stabilizer of a component has order $s_g/2$. \begin{lemma}\label{lem:degAg1} For $Y\subset\Sh_{K(1)}(G,X)_\C$ closed and irreducible and $C$ an irreducible component of $\pi^{-1}(Y)\subset\Sh_{K(3)}(G,X)_\C$, both over $\C$, put $\deg Y:=\deg_{\Lb_{K(3)}}C/[\kappa(C):\kappa(Y)]$. \begin{enumerate}[(a)] \item This does not depend on $C$. \item Let $G_C\subset\overline G$ be the stabilizer of $C$ and $I_C\subset G_C$ the subgroup fixing $C$ pointwise. Then $[\kappa(C):\kappa(Y)]=|G_C/I_C|\le s_g/2$, and $\deg_{\Lb_{K(3)}}\pi^{-1}(Y)/\deg\pi=\deg Y/|I_C|$, with $1\le|I_C|\le s_g/2$. \item If $\mathcal M$ is a $\Q$-line bundle on the Baily--Borel compactification of $\mathcal A_{g,1}$ with $\pi^*\mathcal M\cong\Lb_{K(3)}$, then $\deg Y=\deg_{\mathcal M}\overline Y$. \item Replacing $K(3)$ by any neat $K''$ normal in $K(1)$ gives the same number. \end{enumerate} \end{lemma} \begin{proof} (a) $\overline G$ permutes the components of $\pi^{-1}(Y)$ transitively; each $\sigma\in\overline G$ preserves $\Lb_{K(3)}$, so $\deg\sigma C=\deg C$, and $\sigma\colon C\to\sigma C$ is an isomorphism over $Y$. (b) There are $|\overline G|/|G_C|$ components, all of degree $\deg_{\Lb_{K(3)}}C$. Take $x\in C$ off the proper closed subsets $C\cap\sigma C$ ($\sigma\notin G_C$) and $C^\sigma$ ($\sigma\in G_C\smallsetminus I_C$); the fiber of $C\to Y$ through $x$ is $G_C\cdot x$, with $|G_C/I_C|$ points, and a finite dominant morphism of complex varieties has $[\kappa(C):\kappa(Y)]$ points in its general fiber. So $\deg_{\Lb_{K(3)}}\pi^{-1}(Y)=(|\overline G|/|G_C|)\,|G_C/I_C|\deg Y$, and we divide by $\deg\pi=|\overline G|$. Finally $G_C$ stabilizes a geometric component, so $|G_C|\le s_g/2$. (c) The projection formula for the finite surjective map $\overline C\to\overline Y$, applied to a multiple of $\mathcal M$ that is a line bundle, gives $\deg_{\pi^*\mathcal M}\overline C=[\kappa(C):\kappa(Y)]\deg_{\mathcal M}\overline Y$. (d) For neat $K'''\subset K''$, both normal in $K(1)$, the map $\Sh_{K'''}\to\Sh_{K''}$ is finite étale and pulls $\Lb_{K''}$ back to $\Lb_{K'''}$ \cite[Prop.~5.3.2]{KY}; for a component $C'''$ over $C$, the projection formula gives $\deg C'''=[\kappa(C'''):\kappa(C)]\deg C$, and the field degrees multiply. Two such subgroups compare through their intersection. \end{proof} \begin{proof}[Proof of \cref{thm:AgK}] (a) $K(N)$ is a neat product level for $N\ge3$. The center $Z(G)=\Gm$ is connected and $H^1(\Q,\Gm)=0$, so $\lambda(K)$ is open and \cref{thm:NA}(b) applies; $\Gamma'_i\subset\lambda(G(\Q))$, so $h_{\mathfrak G}=1$ and $d_0=d$; and \cref{prop:adjmap}(d) gives $h_K\le|\Q^\times\backslash\Af^\times/\ker(\Zhat^\times\to(\Z/N)^\times)|=|\Zhat^\times/\{\pm1\}\ker(\Zhat^\times\to(\Z/N)^\times)|=\varphi(N)/2$. More precisely, the class of $\bar\gamma=\lambda(zk)$ in $\mathrm{Cl}(K)$ is that of $z$, and $\nu(zk)=z^2\nu(k)\in\Q_{>0}$ with $\nu(k)\in\ker(\Zhat^\times\to(\Z/N)^\times)$, so writing $z=qu$ with $q\in\Q^\times$, $u\in\Zhat^\times$, we get $u^2\in\ker(\Zhat^\times\to(\Z/N)^\times)$. Hence $h_K\le\#\{u\in(\Z/N)^\times:u^2=1\}/2$. Let $p_0$ be an odd prime dividing $N$, or $p_0=2$ if $N$ is a power of $2$, and $v:=v_{p_0}(N)$, so $v\ge2$ if $p_0=2$. Every eigenvalue $\xi$ of an element of $K(N)_{p_0}\subset1+p_0^vM_{2g}(\Z_{p_0})$ has $v_{p_0}(\xi-1)\ge v$; the elements with this property form a group; and a root of unity $\zeta\ne1$ has $v_{p_0}(\zeta-1)\le1/(p_0-1)0}$ and $u\in\Zhat^\times$, and take $\gamma\in\mathrm{GSp}_{2g}(\Q)$ with $\nu(\gamma)=q$ and $k\in\mathrm{GSp}_{2g}(\Zhat)$ with $\nu(k)=u$; then $\gamma^{-1}xk^{-1}\in\mathrm{Sp}_{2g}(\Af)=\mathrm{Sp}_{2g}(\Q)\,\mathrm{Sp}_{2g}(\Zhat)$ by strong approximation for $\mathrm{Sp}_{2g}$, and $\nu>0$ on $\gamma\,\mathrm{Sp}_{2g}(\Q)$. The group $\lambda(\mathrm{GSp}_{2g}(\Zhat))$ normalizes $\lambda(K(M))$ for every $M$, and the level that \cref{lem:LV} makes from it, and preserves $\mathfrak{sp}_{2g}(\Zhat)$; so the maxima of \cref{thm:NA} are the constants at the level named. If $\pm1$ are the only square roots of $1$ in $(\Z/N)^\times$, then $h_K=1$, and \cref{thm:NA} gives the bounds at $(D_0,d_0)=(D,d)$. (b) Choose a component $V'$ of $\pi^{-1}(V)$ and a component $Z'$ of $\pi^{-1}(Z)$ containing it. As in \cref{lem:LV}, $V'$ is special and maximal in $Z'$, with $T_{V'}=T_V$, and $Z'$ is defined over a field of degree at most $s_gd$, since $\pi^{-1}(Z)$ has at most $|\overline G|=s_g$ components. By \cref{lem:degAg1}(b), $\deg_{\Lb_{K(3)}}Z'=[\kappa(Z'):\kappa(Z)]\,D\le(s_g/2)D$. Part (a) at $N=3$, where $h_{K(3)}=1$, bounds $\deg_{\Lb_{K(3)}}V'$ and the torus data at $\lambda(K(3))$, with the constants at $\bigl((s_g/2)D,s_gd\bigr)$, as they are non-decreasing in $D$ and $d$. Finally $\deg V=\deg_{\Lb_{K(3)}}V'/[\kappa(V'):\kappa(V)]\le\deg_{\Lb_{K(3)}}V'$, and since $\lambda(K(3))\subset\lambda(K(1))$, each index $|K^m_{T_V,p}/K_{T_V,p}|$ of \cref{def:alpha}, and hence $\alpha_V$ (the constant $B$ does not depend on the level), is at least as large at $\lambda(K(3))$ as at $\lambda(K(1))$. In both cases the connected center of $H_V$ contains the central $\Gm$ (the weight) and is isogenous to $\Gm\times T_V$, so the two splitting fields coincide. \end{proof} For $\mathcal A_{g,1}$, and for $\mathcal A_{g,K(N)}$ with $N=4$, $p^k$ or $2p^k$ for an odd prime $p$, where $h_K=1$, \cref{thm:AgK} gives bounds of the forms $C'_\varepsilon D^{2^n+\varepsilon}$ and $C_\varepsilon(dD)^{2^n/\mu+\varepsilon}$ of \cref{cor:size}(b). For every $N\ge3$, \cref{thm:AgK}(a) evaluates $c_{\deg}^\ad$ at $D_z$ and $c^\sharp$ at $(D_z,d_z)$, and from $D_{j+1}=e_0^{2n}D_j^2$, $d_{j+1}=e_0^{2n}D_j^2d_j$ one gets $D_z\le(e_0^{2n}D)^{2^z}$ and $d_zD_z\le d\,(e_0^{2n}D)^{3\cdot2^z}$; so, by \cref{rem:size} with exponent slack $\varepsilon/2^z$ and $\varepsilon/(3\cdot2^z)$ and as $z\le n$, $h_K\,c_{\deg}^\ad(z,D_z)\le C'_\varepsilon D^{4^n+\varepsilon}$ and $h_K\,c^\sharp(\delta,z,D_z,d_z)\le C_\varepsilon\,d^{2^n/\mu+\varepsilon}D^{3\cdot4^n/\mu+\varepsilon}$, the bounds of \cref{thm:main}, with $C'_\varepsilon$ and $C_\varepsilon$ depending also on $N$. The bound for $h_K$ in \cref{thm:AgK}(a) is $1$ unless $(\Z/N)^\times$ has a square root of $1$ other than $\pm1$, for instance for $N=8$, $12$ or $15$; only then can $f$ fail to be injective on a component, and only then is \cref{lem:NA} needed. In genus~$4$ the closure of the Jacobian locus is a hypersurface with an explicit equation. Let $\overline J_4\subset\mathcal A_{4,1}$ be the Zariski closure of the locus of Jacobians of smooth projective curves of genus~$4$, the closure of the image of the Torelli map; it is defined over~$\Q$, irreducible and of dimension~$9$. Let $S_3:=\Gamma(3)\backslash\mathcal H_4$, with $\Gamma(3)\subset\mathrm{Sp}_8(\Z)$ the principal congruence subgroup; as $K(3)$ is normal in $\mathrm{GSp}_8(\Zhat)$, both geometric components of $\Sh_{K(3)}(\mathrm{GSp}_8,\mathcal H_4^\pm)$ are copies of~$S_3$. Let $s_4=|\mathrm{Sp}_8(\F_3)|$ be as in \cref{thm:AgK}. \needspace{5\baselineskip} \begin{corollary}\label{cor:torelli4} Put $D_4:=\tfrac85\deg_{\Lb_{K(3)}}S_3$. Let $V$ be a special subvariety of $\mathcal A_{4,1}$ maximal in~$\overline J_4$, with $\deg V$ as in \cref{lem:degAg1} and $\alpha_V$ computed at $\lambda(K(1))$. Then $\deg V\le c_{\deg}^\ad(9,D_4)$, and if $\QRH(\delta;L_V)$ holds, then \[ \max\bigl(\deg V,d_{L_V},\alpha_V\bigr)\le c^\sharp(\delta,9,D_4,s_4), \] with the constants of \cref{thm:AgK} at the level $\lambda(K(3))$. \end{corollary} \begin{proof} For $g\ge1$ let $F_g:=2^g\sum_m\theta_m^{16}-\bigl(\sum_m\theta_m^8\bigr)^2$, with $m$ running over the even characteristics in $(\tfrac12\Z/\Z)^{2g}$ and $\theta_m$ the theta constant of genus~$g$ with characteristic~$m$. Then $F_4$ is a modular form of weight~$8$ for $\mathrm{Sp}_8(\Z)$, not identically zero, that vanishes on the Jacobian locus \cite[Thm.~3.8 and eq.~(9), p.~10]{Grushevsky}. It is a cusp form: Siegel's operator~$\Phi$ takes $\theta[(\varepsilon',\varepsilon_4),(\delta',\delta_4)]$ to $\theta[\varepsilon',\delta']$ if $\varepsilon_4=0$ and to~$0$ otherwise, so, as each even characteristic of genus~$3$ arises for both values of~$\delta_4$, $\Phi F_4=2^5\sum_{m'}\theta_{m'}^{16}-4\bigl(\sum_{m'}\theta_{m'}^8\bigr)^2=4F_3$, which vanishes identically \cite[Thm.~3.8]{Grushevsky}. By Freitag's theorem \cite[Satz~1, p.~256]{Freitag}, the zero divisor of a cusp form of weight at most~$8$ for $\mathrm{Sp}_8(\Z)$ that is not identically zero is irreducible; as $\overline J_4$ is irreducible of dimension~$9$ and lies in the zero set of~$F_4$, that zero set is~$\overline J_4$. This is Igusa's theorem \cite{Igusa}, which we use in Freitag's form. Let $\Lb:=\Lb_{K(3)}$ and let $Z_3\subset S_3$ be the preimage of~$\overline J_4$. On~$S_3$, $\Lb=\omega^{\otimes5}$ \cite[\S II.1]{HulekSankaran}, with $\omega$ the bundle of modular forms of weight~$1$, so $F_4^5$ is a section of $\Lb^{\otimes8}$ on~$S_3$. It extends to $S_3^\BB$, which is normal with boundary of codimension~$4$, as in the proof of \cref{lem:Theta}. Its divisor is $5\sum_im_i\overline Z_i$, with $Z_i$ the components of~$Z_3$, $\overline Z_i$ their closures and integers $m_i\ge1$, and intersecting with $c_1(\Lb)^9$ gives $5\sum_im_i\deg_\Lb Z_i=8\deg_\Lb S_3$. So $\deg_\Lb Z_3\le D_4$. Let $\pi\colon\Sh_{K(3)}(G,X)\to\Sh_{K(1)}(G,X)$ be as in \cref{lem:degAg1}, $V'$ a component of $\pi^{-1}(V)$ and $Z'$ a component of $\pi^{-1}(\overline J_4)$ containing~$V'$. Then $Z'$ is a component of the preimage of~$\overline J_4$ in a copy of~$S_3$, so $\deg_\Lb Z'\le D_4$, and $\dim Z'=9$. As in the proof of \cref{thm:AgK}(b), $V'$ is special and maximal in~$Z'$, with $T_{V'}=T_V$, and $Z'$ is defined over a field of degree at most~$s_4$. \Cref{thm:AgK}(a) at $N=3$, where $h_{K(3)}=1$, bounds $\deg_\Lb V'$ and the torus data at $\lambda(K(3))$ with the constants at $(D_4,s_4)$, as they are non-decreasing in $D$ and~$d$, and the last step of the proof of \cref{thm:AgK}(b) passes to~$V$. \end{proof} By Hirzebruch--Mumford proportionality in van der Geer's form \cite[Thm.~(1.13), p.~8, and p.~9]{vanderGeer}, $\omega^{10}$ has degree $1/1814400$ on the stack $[\mathrm{Sp}_8(\Z)\backslash\mathcal H_4]$, which $S_3$ covers with degree~$s_4$. So $\deg_{\Lb_{K(3)}}S_3=5^{10}s_4/1814400=2^8\cdot3^{12}\cdot5^{10}\cdot13\cdot41$, and $D_4=2^{11}\cdot3^{12}\cdot5^9\cdot13\cdot41\approx1.13\cdot10^{18}$. \needspace{5\baselineskip} \begin{remark}\label{rem:torelli4} In \cref{cor:torelli4}, ``maximal in'' cannot be weakened to ``contained in''. Let $k$ be an imaginary quadratic field, $x\in\mathcal A_{1,1}$ a point with complex multiplication by an order of~$k$, and $V_k$ the image of $\{x\}\times\mathcal A_{3,1}$ under $(\tau_1,\tau_3)\mapsto\tau_1\oplus\tau_3$. Each theta constant of $\tau_1\oplus\tau_3$ is the product of one of~$\tau_1$ and one of~$\tau_3$, and the odd ones vanish, so $F_4(\tau_1\oplus\tau_3)=16A_{16}B_{16}-A_8^2B_8^2$, where $A_j$ and~$B_j$ are the sums of the $j$-th powers of the even theta constants of~$\tau_1$ and of~$\tau_3$; and $2A_{16}=A_8^2$ and $8B_{16}=B_8^2$, as $F_1$ and~$F_3$ vanish identically \cite[Thm.~3.8]{Grushevsky}. So the image of $\mathcal A_{1,1}\times\mathcal A_{3,1}$, a special subvariety, lies in~$\overline J_4$, and so does~$V_k$. The variety $V_k$ is special of dimension~$6$, with generic Mumford--Tate group $\mathrm{Res}_{k/\Q}\Gm\times_{\Gm}\mathrm{GSp}_6$, the fiber product over the norm and the similitude; its connected center is split exactly by~$k$, so $d_{L_{V_k}}$ is the absolute discriminant of~$k$, which is unbounded. The closure of the genus-$4$ Jacobian locus also contains infinitely many Shimura curves whose general points parametrize Jacobians of smooth curves \cite{GrushevskyMoller}. By a remark of Daw, Javanpeykar and Kühne \cite[p.~3]{DJK}, explicit bounds for the degrees of the maximal special subvarieties of the closure of the Jacobian locus that are not of facteur type follow from their theorem and an effective bound for the degree of that closure. For $g\ge5$ the closure has codimension $(g-2)(g-3)/2\ge3$, so it is not cut out by one modular form, and \cref{thm:AgK}(b) needs an explicit bound for its degree. \end{remark} \section{Orders and Galois orbits in \texorpdfstring{$\mathcal A_g$}{A\_g}}\label{sec:orders} In this section $G=\mathrm{GSp}(W,\psi)$ with $W=\Q^{2g}$, $W_\Z=\Z^{2g}$ and $\psi$ perfect on $W_\Z$, $X=\mathcal H_g^\pm$, and $\lambda\colon G\to G^\ad$. For a special subvariety $V$ we write $T:=T_V^G$ for the connected center of $H_V$ itself, which contains the scalars, and $\bar T:=\lambda(T)$ for the torus of \cref{sec:general}. Let $K=\prod_pK_p$ be compact open with $K(N)\subset K\subset G(\Zhat)$ for some $N\ge1$, and let $V\subset\Sh_K(G,X)_\C$ be special, defined by $(H,X_H)$, the image of $X_H^+\times\{\gamma\}$ with $\gamma\in G(\Af)$. Put $\mathcal E:=\Q[T]$, the $\Q$-span of $T(\Q)$ in $\mathrm{End}(W)$, $n_{\mathcal E}:=\dim_\Q\mathcal E$, $\Lambda_V\subset W$ the lattice with $\Lambda_{V,p}=\gamma_pW_{\Z_p}$, and $R:=\mathcal E\cap\mathrm{End}(\Lambda_V)$. For a prime $p$ let $\iota_p:=[K^m_{T,p}:T(\Q_p)\cap\gamma_pK_p\gamma_p^{-1}]$, and $\bar\iota_p$ the same index for $\bar T$ and $\lambda(\gamma_pK_p\gamma_p^{-1})$; so $\alpha_V=\prod_{\bar\iota_p>1}\max(1,\bar B\bar\iota_p)$ with $\bar B$ the constant $B$ of the adjoint datum. Let $m_V$ be the least common multiple of the dimensions of the irreducible summands of $W\otimes\Qbar$ under $H_V$; so $m_V=1$ if $V$ is a point, and $m_V\le\mathrm{lcm}(1,\dots,2g)$. \begin{lemma}\label{lem:Oprime} Suppose $d_{L_V}\le D_1$ and $\alpha_V\le A_1$ with $A_1\ge1$. Put $A_1':=A_1\max(1,1/\bar B)$ and $P_1:=1+m_VA_1'$. \begin{enumerate}[(a)] \item $\mathcal E=\prod_iF_i$ with each $F_i\subset L_V$ a totally real or CM field, $d_{F_i}\le D_1$ and $n_{\mathcal E}\le2g$. $R$ is an order of $\mathcal E$ and $R=\mathcal E\cap\mathrm{End}(A_x)$ for the abelian variety $A_x$ of the point $[x,\gamma]$, for every $x\in X_H^+$ (so $H_1(A_x,\Z)=\Lambda_V$); if $V$ is a point, $R$ is the center of $\mathrm{End}(A_x)$. \item For every prime $p\ge m_V+2$ unramified in $L_V$, either $R_p=\mathcal O_{\mathcal E,p}$ or $\iota_p\ge(p-1)/m_V$. \item $R_p=\mathcal O_{\mathcal E,p}$ for every prime $p>P_1$ with $p\nmid Nd_{L_V}$. \item Both as written and with $n_{\mathcal E}$ replaced by $2g$, \[ [\mathcal O_{\mathcal E}:R]\le\Bigl(2\cdot4^{P_1}N^2D_1A_1'^{\,P_1+\log_2(ND_1)}\Bigr)^{n_{\mathcal E}(n_{\mathcal E}-1)/2}\Bigl(2m_Vn_{\mathcal E}(n_{\mathcal E}-1)(n_{\mathcal E}!)^2D_1^{1/2}\Bigr)^{n_{\mathcal E}(n_{\mathcal E}-1)/2}. \] \end{enumerate} Parts (c) and (d) hold with $\bar B$ replaced in $A_1'$ by any $\bar B_0\in(0,\bar B]$. \end{lemma} \begin{proof} Part (b) is an explicit form of \cite[Prop.~4.11]{DawOrr} combined with \cite[Prop.~3.15]{UY}, and the proof of (d) follows \cite[Lemmas~7.4 and~7.5]{Tsimerman12}, \cite[Props.~4.8 and~4.12]{DawOrr}. \emph{Weights and the involution.} Let $\Phi$ be the set of weights of $T$ on $W\otimes\Qbar$. As $T(\Q)$ is Zariski dense in $T$, $\mathcal E\otimes\Qbar$ is the algebra of operators that are scalar on each weight space; so $\mathcal E$ is étale of dimension $|\Phi|$, with embeddings $\varphi_\chi$, $\chi\in\Phi$, taking values in $L_V$. The $\psi$-adjoint of $t\in T(\Q)$ is $\nu(t)t^{-1}\in T(\Q)$, with $\nu$ the similitude character, so the adjoint preserves $\mathcal E$; on $\mathcal E\subset\mathrm{End}^0(A_x)$ it is the Rosati involution, which is positive, so it preserves each factor of $\mathcal E$ and is the identity or complex conjugation on it. As $d_{F_i}^{[L_V:F_i]}$ divides $d_{L_V}$, $d_{F_i}\le D_1$; and $n_{\mathcal E}\le\dim W$. For a point, $\mathrm{End}^0(A_x)=\mathrm{End}_{\mathcal E}(W)$ has center $\mathcal E$. This gives (a). Let $\mu_c\in X_*(T)\otimes\Q$ be the preimage, under the isogeny $T\to H^\ab$, of the Hodge cocharacter of $H^\ab$, which is the same for all $x\in X_H$. If $T$ acts on an irreducible $H_{\Qbar}$-summand $W_j$ by $\chi$, then $\det_{W_j}$ is trivial on $H^\der$ and equals $\dim(W_j)\chi$ on $T$, so $\langle\chi,\mu_c\rangle=a_j/\dim W_j\in[0,1]\cap m_V^{-1}\Z$, with $a_j$ the multiplicity of the weight $1$ of a Hodge generic cocharacter on $W_j$. Let $Y$ be the Galois orbit of $m_V\mu_c$. Then $\langle\chi,y\rangle\in\{0,\dots,m_V\}$ for $y\in Y$ and $\chi\in\Phi$, so $Y\subset X_*(T)$; and $Y$ spans $X_*(T)\otimes\Q$, since otherwise the Hodge cocharacter would factor through a proper subtorus and $h_x$ through a proper $\Q$-subgroup of $H$. For $\chi\ne\chi'$ in $\Phi$ some $y\in Y$ has $\langle\chi-\chi',y\rangle\ne0$, and $|\langle\chi-\chi',y\rangle|\le m_V$ for all $y\in Y$. (b) Let $p\ge m_V+2$ be unramified in $L:=L_V$, $\mathfrak P\mid p$, $f$ the degree and $\sigma$ the Frobenius of $L_{\mathfrak P}/\Q_p$, $q:=p^f$, and $\zeta$ a generator of the roots of unity of order $q-1$ in $L_{\mathfrak P}$. For $y\in Y$ the element $t:=\sum_{kP_1$, $p\nmid Nd_{L_V}$ and $R_p\ne\mathcal O_{\mathcal E,p}$, then $p\ge m_V+2$ and (b) gives $\bar\iota_p\ge\iota_p\ge(p-1)/m_V>A_1'\ge1$, so $\alpha_V\ge\bar B\bar\iota_p>A_1$, a contradiction. (d) Let $\mathfrak t:=\mathrm{Lie}\,T\subset\mathcal E$, $k_p:=1$ for odd $p$ and $k_p:=2$ for $p=2$. For $y_0\in\mathfrak t\cap\mathcal O_{\mathcal E}$ with $\Delta_0:=\disc(y_0)\ne0$, the element $u:=\exp(p^{k_p}y_0)^{\iota_p}$ lies in $(K^m_{T,p})^{\iota_p}\subset R_p^\times$, since $\exp$ converges on $p^{k_p}\mathcal O_{\mathcal E,p}$ and maps $p^{k_p}\mathcal O_{\mathcal E,p}\cap(\mathfrak t\otimes\Q_p)$ into $T(\Q_p)\cap\mathcal O_{\mathcal E,p}^\times=K^m_{T,p}$. As $v_p(e^z-1)=v_p(z)$ for $v_p(z)>1/(p-1)$, $v_p(\disc u)=n_{\mathcal E}(n_{\mathcal E}-1)(v_p(\iota_p)+k_p)+v_p(\Delta_0)$, so $\Z_p[u]\subset R_p$ gives $[\mathcal O_{\mathcal E,p}:R_p]\le p^{(n_{\mathcal E}(n_{\mathcal E}-1)(v_p(\iota_p)+k_p)+v_p(\Delta_0))/2}$. To choose $y_0$, identify $\mathcal E\otimes L=L^\Phi$, let $w:=(\langle\chi,m_V\mu_c\rangle)_\chi$ and $y_\ell:=(\mathrm{id}\otimes\mathrm{Tr}_{L/\Q})(w\ell)\in\mathfrak t\cap\mathcal O_{\mathcal E}$ for $\ell\in\mathcal O_L$. The $\Q$-linear map $L\to\mathfrak t$, $\ell\mapsto y_\ell$, is onto: in $\mathfrak t\otimes L=X_*(T)\otimes L$ we have $y_\ell=\sum_\sigma\sigma(\ell)\,\sigma(m_V\mu_c)$, so by the independence of the embeddings of $L$ the $L$-span of its image is that of $Y$, which is $\mathfrak t\otimes L$; so the image, a $\Q$-subspace, is $\mathfrak t$, and $\disc$ is a nonzero polynomial on $\mathfrak t$, of degree $n_{\mathcal E}(n_{\mathcal E}-1)$. With $v_1,\dots,v_{[L:\Q]}\in\mathcal O_L$ attaining the successive minima of the house, which are at most $D_1^{1/2}$ by Minkowski's second theorem, some $\ell=\sum c_kv_k$ with $0\le c_k\le n_{\mathcal E}(n_{\mathcal E}-1)$ has $\Delta_0:=\disc(y_\ell)\ne0$, and $|\Delta_0|\le(2m_Vn_{\mathcal E}(n_{\mathcal E}-1)[L:\Q]^2D_1^{1/2})^{n_{\mathcal E}(n_{\mathcal E}-1)}$, with $[L:\Q]\le n_{\mathcal E}!$ since $\Gal(L/\Q)$ acts faithfully on $\Phi$. By (c) the bad primes number at most $P_1+\log_2(ND_1)$, and for them $p^{v_p(\iota_p)}\le p^{v_p(N)}A_1'$ and $\prod p^{k_p}\le2\cdot4^{P_1}ND_1$. Multiplying gives (d); the bound increases with $n_{\mathcal E}$. The last assertion holds with the same proofs, as $\bar B$ enters only through $A_1'\ge A_1/\bar B$. \end{proof} The estimate in the proof of \cref{lem:Oprime}(b) is attained, for instance at $p=5$: take $\mathcal E=\Q(i)\times\Q$ and $T=\{(t,s):N(t)=s^2\}$, the torus of $\{x_0\}\times Y(1)\subset\mathcal A_2$ for the point $x_0$ of $Y(1)$ with complex multiplication by $\Q(i)$, with $m_V=2$. At the level $K(1)$ the proof of \cref{lem:Oprime}(d) gives, for a CM point, a bound by powers of $\alpha_V$ and $d_{L_V}$ with exponents that depend only on $g$. For a CM point of $\mathcal A_{g,1}$, \cref{lem:Opoint} below is a form, with explicit constants, of \cite[Lemma~7.2]{Tsimerman12} and of \cite[Thm.~4.1]{DawOrr}. \needspace{4\baselineskip} \begin{lemma}\label{lem:Opoint} Let $x$ be a CM point of $\mathcal A_{g,1}=\mathrm{Sp}_{2g}(\Z)\backslash\mathcal H_g$, written $x=[h,1]$ with $h\in\mathcal H_g$, and use the notation above with $K=K(1)$ and $V=\{x\}$. Let $R_x$ be the center of $\mathrm{End}(A_x)$, $\operatorname{Disc}(R_x)$ the absolute value of the discriminant of its trace form, $N_2:=g(2g-1)$, $\pi(y)$ the number of primes $p\le y$, and \[ C_{\mathcal O}:=\Bigl(16g(2g-1)\bigl((2g)!\bigr)^2\,\bar B^{-6\pi(1+\bar B^{-2})}\Bigr)^{N_2}. \] Then \[ [\mathcal O_{\mathcal E}:R_x]\le C_{\mathcal O}\,\alpha_V^{6N_2}\,d_{L_V}^{3N_2/2}\qquad\text{and}\qquad\operatorname{Disc}(R_x)\le C_{\mathcal O}^2\,\alpha_V^{12N_2}\,d_{L_V}^{3N_2+g}. \] Both bounds hold with $\bar B$ replaced, in $\alpha_V$ and in $C_{\mathcal O}$, by any $\bar B_0\in(0,1]$. \end{lemma} \begin{proof} By \cref{lem:Oprime}(a), $R_x=R$ and $\mathcal E=\prod_iF_i$ with $F_i\subset L:=L_V$, so $\operatorname{Disc}(R_x)=[\mathcal O_{\mathcal E}:R]^2\prod_id_{F_i}$. Here $N=1$, $\gamma=1$ and $m_V=1$. Let $n:=n_{\mathcal E}\le2g$, $n_2:=n(n-1)/2\le N_2$, $\mathcal S$ the set of primes $p$ with $R_p\ne\mathcal O_{\mathcal E,p}$, and $\mathcal S_u$ the set of $p\in\mathcal S$ with $p\ge3$ and $p\nmid d_L$. We use three facts from the proof of \cref{lem:Oprime}. First, $\iota_p\le\bar\iota_p$ for every $p$, by the proof of (c), as $K_p=G(\Z_p)\supset\Z_p^\times$; so $\max(1,\bar B\iota_p)\le\max(1,\bar B\bar\iota_p)$, and the product of the $\max(1,\bar B\iota_p)$ over any set of primes with $\iota_p>1$ is at most $\alpha_V$. Second, $\iota_p\ge p-1\ge2$ for $p\in\mathcal S_u$, by (b). Third, the proof of (d), with $D_1=d_L$, gives a nonzero integer $\Delta_0$ with $|\Delta_0|\le(2n(n-1)(n!)^2d_L^{1/2})^{n(n-1)}$ and $[\mathcal O_{\mathcal E,p}:R_p]\le p^{n_2(v_p(\iota_p)+k_p)+v_p(\Delta_0)/2}$ for every $p$; so \[ [\mathcal O_{\mathcal E}:R]\le|\Delta_0|^{1/2}\,\Pi^{n_2},\qquad\Pi:=\prod_{p\in\mathcal S}p^{k_p+v_p(\iota_p)}. \] The primes of $\mathcal S\smallsetminus\mathcal S_u$ are $2$ and primes dividing $d_L$, so their factors $p^{k_p}$ multiply to at most $4d_L$. For $p\in\mathcal S_u$ we have $p\le\iota_p+1\le\iota_p^2$, so $p^{k_p+v_p(\iota_p)}\le\iota_p^3$; for $p\in\mathcal S\smallsetminus\mathcal S_u$, $p^{v_p(\iota_p)}\le\iota_p$, and it is $1$ unless $p\mid\iota_p$. Let $\mathcal P$ be the union of $\mathcal S_u$ and the set of $p\in\mathcal S\smallsetminus\mathcal S_u$ dividing $\iota_p$. Then $\Pi\le4d_L\prod_{p\in\mathcal P}\iota_p^3$, and every $p\in\mathcal P$ has $\iota_p>1$ and $p\le\iota_p+1$. If $\iota_p\ge\bar B^{-2}$, then $\iota_p\le(\bar B\iota_p)^2=\max(1,\bar B\iota_p)^2$; if $\iota_p<\bar B^{-2}$, then $p<1+\bar B^{-2}$, which holds for at most $\pi(1+\bar B^{-2})$ primes. So \[ \prod_{p\in\mathcal P}\iota_p\le\alpha_V^2\,\bar B^{-2\pi(1+\bar B^{-2})},\qquad\Pi\le4d_L\,\alpha_V^6\,\bar B^{-6\pi(1+\bar B^{-2})}, \] and with $|\Delta_0|^{1/2}\le(2n(n-1)(n!)^2)^{n_2}d_L^{n_2/2}$, \[ [\mathcal O_{\mathcal E}:R]\le\Bigl(8n(n-1)(n!)^2\,\bar B^{-6\pi(1+\bar B^{-2})}\Bigr)^{n_2}\alpha_V^{6n_2}\,d_L^{3n_2/2}. \] The right side increases with $n\le2g$, which gives the first bound. For the second, $d_{F_i}^{[L:F_i]}$ divides $d_L$, so $\prod_id_{F_i}\le d_L^{n/[L:\Q]}\le d_L^g$, as $n\le2g$ and $d_L=1$ if $L=\Q$. The proof uses only $0<\bar B\le1$. \end{proof} Edixhoven's form of the Galois bound for a CM point $x$ of $\mathcal A_g$ is a lower bound for $|\Gal(\Qbar/\Q)\cdot x|$ by a power of $\operatorname{Disc}(R_x)$, with $R_x$ the center of $\mathrm{End}(A_x)$ \cite[p.~17]{Tsimerman12}, \cite[Thm.~5.1]{Tsimerman}. With \cref{lem:Opoint}, \cref{cor:points} gives it with effective constants. \needspace{4\baselineskip} \begin{theorem}\label{thm:AgDisc} Let $g\ge1$ and $\delta\in(0,1/2]$. Let $C_*$, $\mu$ and $\bar B$ be the constants of \cref{cor:points} and \cref{tab:constants} for $(\mathrm{PGSp}_{2g},X^\ad)$ with $(\mathrm{Ad},\mathfrak{sp}_{2g}(\Zhat))$ at the level $\lambda(K(3))$, $s_g$ as in \cref{thm:AgK}, and $C_{\mathcal O}$ as in \cref{lem:Opoint}, formed with this $\bar B$. Put \[ \mu_g:=\frac{\mu}{2g(3g-1)},\qquad c_g(\delta):=\frac{C_*}{s_g}\,C_{\mathcal O}^{-2\mu_g}. \] \begin{enumerate}[(a)] \item For every CM point $x$ of $\mathcal A_{g,1}$ such that $\QRH(\delta;L)$ holds for the splitting field $L$ of its Mumford--Tate group, \[ |\Gal(\Qbar/\Q)\cdot x|\ \ge\ c_g(\delta)\operatorname{Disc}(R_x)^{\mu_g}, \] with $R_x$ the center of $\mathrm{End}(A_x)$. \item The same holds, with the same constants, for every CM point $x$ of $\mathcal A_{g,K(N)}=\Sh_{K(N)}(G,X)_\C$, $K(N)$ the principal congruence subgroup of level $N\ge1$. \item For a number field $F$, $[F(x):F]\ge c_g(\delta)\operatorname{Disc}(R_x)^{\mu_g}/[F:\Q]$ in (a) and (b). \end{enumerate} The constants are effectively computable from $g$ and $\delta$, and $\mu_g$ does not depend on $\delta$. \end{theorem} \begin{proof} \emph{Step~1.} Let $x$ be as in (a) and $C_*$, $\mu$, $\bar B$ the constants of the statement, at the level $\lambda(K(3))$; form $\bar\alpha:=\alpha_V$ for $V=\{x\}$ as in \cref{lem:Opoint}, at the level $\lambda(K(1))$ and with this $\bar B$. We show \[ |\Gal(\Qbar/\Q)\cdot x|\ \ge\ (C_*/s_g)\,\bar\alpha\,d_L^{\mu}. \] Write $x=[h,1]$ with $h\in\mathcal H_g$, and put $x':=[h,1]\in\Sh_{K(3)}(G,X)$ and $\bar x:=[\lambda\circ h,1]\in\Sh_{\lambda(K(3))}(G^\ad,X^\ad)$. The map $\pi$ of \cref{sec:Ag} and the map $\Sh_{K(3)}(G,X)\to\Sh_{\lambda(K(3))}(G^\ad,X^\ad)$ induced by $\lambda$ are defined over $E(G,X)=\Q$ (\cref{sec:special}), and they map $x'$ to $x$ and to $\bar x$. The fibers of $\pi$ are orbits of $\overline G$, so they have at most $s_g$ points, and $\Gal(\Qbar/\Q)\cdot x'\subset\pi^{-1}(\Gal(\Qbar/\Q)\cdot x)$; the second map carries $\Gal(\Qbar/\Q)\cdot x'$ onto $\Gal(\Qbar/\Q)\cdot\bar x$. So $|\Gal(\Qbar/\Q)\cdot x|\ge|\Gal(\Qbar/\Q)\cdot\bar x|/s_g$. The level $\lambda(K(3))$ satisfies (Lv$'$) for $(\mathrm{Ad},\mathfrak{sp}_{2g}(\Zhat))$ (proof of \cref{thm:AgK}(a) at $N=3$), and $\lambda\circ h$ lies in $X^{\ad,+}$, the connected component of $X^\ad$ containing $\lambda(\mathcal H_g)$, which we take as the $X^+$ of \cref{cor:points} for the adjoint datum. The point $\bar x$ is special with Mumford--Tate group $\bar T=\lambda(T)$, whose splitting field is $L$, as $T$ is isogenous to $\Gm\times\bar T$ (end of the proof of \cref{thm:AgK}). So \cref{cor:points} gives $|\Gal(\Qbar/\Q)\cdot\bar x|\ge|\Gal(\Qbar/L)\cdot\bar x|\ge C_*\,\alpha_{\bar x}\,d_L^{\mu}$, with $\alpha_{\bar x}$ at the level $\lambda(K(3))$. Finally $\lambda(K(3))\subset\lambda(K(1))$, so each index $\bar\iota_p$ is at least as large at $\lambda(K(3))$ as at $\lambda(K(1))$, and $\alpha_{\bar x}\ge\bar\alpha$, both being formed with $\bar B$. (a) With $N_2=g(2g-1)$ we have $3N_2+g=2g(3g-1)$, so $\mu_g=\mu/(3N_2+g)$, and \cref{lem:Opoint}, with $\alpha_V=\bar\alpha$ and $C_{\mathcal O}$ formed with $\bar B$, gives \[ \operatorname{Disc}(R_x)^{\mu_g}\le C_{\mathcal O}^{2\mu_g}\,\bar\alpha^{12N_2\mu_g}\,d_L^{\mu}. \] Here $12N_2\mu_g=6(2g-1)\mu/(3g-1)\le4\mu\le1$, as $\mu\le1/32$ (\cref{tab:constants}, with $n_T\ge2$ and $s_\rho,t_\rho\ge1$). So $\bar\alpha^{12N_2\mu_g}\le\bar\alpha$, as $\bar\alpha\ge1$, and Step~1 gives (a). (b) The natural map $\pi_N\colon\mathcal A_{g,K(N)}\to\mathcal A_{g,1}$ is defined over $\Q$ and forgets the level structure, so $A_{\pi_N(x)}\cong A_x$, and $x$ and $\pi_N(x)$ have the same $R_x$, Mumford--Tate group and $L$; and $|\Gal(\Qbar/\Q)\cdot x|\ge|\Gal(\Qbar/\Q)\cdot\pi_N(x)|$. So (a) gives (b). (c) $[F(x):F]=|\Gal(\Qbar/F)\cdot x|\ge|\Gal(\Qbar/\Q)\cdot x|/[F:\Q]$, as $\Gal(\Qbar/F)$ has index $[F:\Q]$ in $\Gal(\Qbar/\Q)$. \end{proof} \needspace{5\baselineskip} \begin{corollary}\label{cor:AgOrder} Let $g\ge1$ and $\delta\in(0,1/2]$, let $Z$ be as in \cref{thm:Ag}(ii) for $\mathcal A_{g,1}$ or as in \cref{thm:Ag}(i) for $\mathcal A_{g,K(N)}$ with $N\ge3$, and let $x$ be a special point maximal in $Z$ such that $\QRH(\delta;L)$ holds for the splitting field $L$ of its Mumford--Tate group. For $V:=\{x\}$ let $c$ be the right side of the bound for $\max(\deg V,d_{L_V},\alpha_V)$ in \cref{thm:AgK}(b), resp.\ for $\Delta(V)$ in \cref{thm:AgK}(a), $B$ the constant with which $\alpha_V$ is formed there, and $C_{\mathcal O}$ as in \cref{lem:Opoint}, formed with this $B$. Then \[ \operatorname{Disc}(R_x)\ \le\ C_{\mathcal O}^2\,c^{15g(2g-1)+g}, \] with $R_x$ the center of $\mathrm{End}(A_x)$. \end{corollary} \begin{proof} Let $\alpha_V$ and $d_{L_V}$ be as in \cref{thm:AgK}, so that $\alpha_V,d_{L_V}\le c$, with $L_V=L$ (\cref{thm:Ag}). On $\mathcal A_{g,1}$, \cref{lem:Opoint} with $\bar B_0:=B$ gives $\operatorname{Disc}(R_x)\le C_{\mathcal O}^2\alpha_V^{12N_2}d_{L_V}^{3N_2+g}\le C_{\mathcal O}^2c^{15N_2+g}$, with $N_2=g(2g-1)$. On $\mathcal A_{g,K(N)}$, the map $\pi_N$ of the proof of \cref{thm:AgDisc}(b) keeps $R_x$, the Mumford--Tate group and $L$. For $x=[h,a]$, $\lambda(aK(N)a^{-1})\subset\lambda(aK(1)a^{-1})$, so each local index of \cref{def:alpha} for $\pi_N(x)$ at the level $\lambda(K(1))$ is at most the one for $x$ at $\lambda(K(N))$; as $j\mapsto\max(1,Bj)$ is non-decreasing and is $1$ at $j=1$, $\alpha_{\{\pi_N(x)\}}\le\alpha_V\le c$, both formed with $B$, and \cref{lem:Opoint} for $\pi_N(x)$ gives the bound. \end{proof} \part{Listing}\label{part:listing} \section{Listing in Mumford's moduli spaces}\label{sec:listing} The bounds of \cref{thm:AgK} leave a finite set of candidates for the maximal special subvarieties of $Z$, but the set has to be found. The bounds for $d_{L_V}$ and $\alpha_V$ bound the index of the order of endomorphisms attached to $V$ (\cref{sec:orders}), which leaves finitely many PEL data; in Mumford's model (\cref{sec:mumford}) the locus of each datum is computable (\cref{sec:PEL}), and $V$ is rigid in the normalization of one of its components (\cref{sec:containers}), with degree there bounded in terms of $\deg V$ (\cref{sec:theta-degree,sec:normalization}). Urbanik's algorithm \cite[Cor.~6.3]{Urbanik} then computes a finite set of weakly special subvarieties of bounded degree that contains the rigid ones, a test on the algebraic monodromy selects the rigid ones, which are special (\cref{sec:rigidity}), and \cref{sec:algorithm} states the algorithm and proves \cref{thm:listing}. In Mumford's model the degree of $Z$ is read off the equations of its closure in Mumford's projective space (\cref{lem:Theta}), so the algorithm runs from these equations for every closed irreducible $Z$ (\cref{thm:list}). We keep the setting and notation of \cref{sec:orders}: $G=\mathrm{GSp}(W,\psi)$, $X=\mathcal H_g^\pm$, $\lambda\colon G\to G^\ad$, and $T$, $\bar T$ for a special subvariety $V$. \subsection{Mumford's model and its level}\label{sec:mumford} To list special subvarieties we need $\mathcal A_g$ and its universal family by explicit equations. Let $d_\Upsilon$ be a positive multiple of $8$, $\Upsilon:=(d_\Upsilon,\dots,d_\Upsilon)$ with $g$ entries, $K(\Upsilon):=(\Z/d_\Upsilon\Z)^g$, and $V_\Upsilon$ the $\Q$-vector space of functions on $K(\Upsilon)$, so that $\PP(V_\Upsilon)$ has coordinates $Q(a)$, $a\in K(\Upsilon)$. Mumford considers the functor $\mathcal M_\Upsilon$ of abelian schemes with an $\Upsilon$-marking: an abelian scheme $\mathcal X$ over $S$, a relatively ample, totally symmetric, normalized invertible sheaf $L$ on $\mathcal X$ of type $\Upsilon$, and a symmetric $\vartheta$-structure for $L$ \cite[pp.~78--79]{MumfordII}. An $\Upsilon$-marking embeds $\mathcal X$ in $\PP(V_\Upsilon)\times S$, and the theta-null map $t\colon\mathcal M_\Upsilon\to\PP(V_\Upsilon)$ takes the image of the zero section \cite[pp.~82--83]{MumfordII}. Mumford writes down a closed subscheme $\overline M_\Upsilon\subset\PP(V_\Upsilon)$, cut out by Riemann's quartic theta relations and the relations $Q(a)=Q(-a)$, and a closed subscheme $\overline{\mathcal A}_\Upsilon\subset\PP(V_\Upsilon)\times\overline M_\Upsilon$, cut out by relations of bidegree $(2,2)$ in the coordinates of the two factors \cite[p.~83]{MumfordII}, and he proves the following \cite[Theorem, p.~83, and Further Theorem, p.~84]{MumfordII}: there is an open subscheme $M_\Upsilon\subset\overline M_\Upsilon$ such that $t$ is an isomorphism of $\mathcal M_\Upsilon$ with the functor of points of $M_\Upsilon$, and $\mathcal A_\Upsilon:=\overline{\mathcal A}_\Upsilon\times_{\overline M_\Upsilon}M_\Upsilon$ is the universal abelian scheme over $M_\Upsilon$, with its zero section, embedded in $\PP(V_\Upsilon)\times M_\Upsilon$; in particular the origin of the fiber over $s\in M_\Upsilon$ is the point $s$ itself. We use these schemes over $\Q$. The open set $M_\Upsilon$ is not given explicitly; the algorithm computes $M_\Upsilon\otimes\Qbar$ from Mumford's equations and those of the closure of $Z$ (\cref{lem:N0}). Over $\C$, $M_\Upsilon\otimes\C$ is a Shimura variety $\Sh_{K_\Upsilon}(G,X)$: a point is a principally polarized abelian variety $A$ with a similitude $\eta\colon W_{\Zhat}\to H_1(A,\Zhat)$, and $\eta$, $\eta'$ give the same point if and only if $\eta'=\alpha\eta k$ with $\alpha\in\mathrm{Aut}(A,\varphi_0)$ and $k$ in the subgroup $K_\Upsilon\subset G(\Zhat)$ of elements for which $\eta$ and $\eta k$ induce the same $\Upsilon$-marking on $A$. Here $\varphi_0$ is the principal polarization, $L$ is the totally symmetric sheaf with $\varphi_L=d_\Upsilon\varphi_0$, which has type $\Upsilon$ and is unique \cite[p.~307]{MumfordI}, and the marking induced by $\eta$ is the symmetric $\vartheta$-structure for $L$ that \cite[\S2, Remark~3, p.~319]{MumfordI} attaches to the symplectic isomorphism $H(L^{\otimes2})=A[2d_\Upsilon]\cong H(2\Upsilon)$ defined by $\eta$ as in the proof of \cref{lem:Kdelta}(i); every $\Upsilon$-marking on $A$ arises in this way \cite[\S2, Remark~4]{MumfordI}. Let $e_1,\dots,e_g,f_1,\dots,f_g$ be a symplectic basis of $W_\Z$, with $\psi(e_i,e_j)=\psi(f_i,f_j)=0$, $\psi(e_i,f_i)=1$ and $\psi(e_i,f_j)=0$ for $i\ne j$, let $\nu$ be the similitude character, and for $m\ge1$ put \[ K'(m):=\{k\in G(\Zhat):k\equiv\mathrm{diag}(1_g,\nu(k)1_g)\bmod m\}\supset K(m), \] and $\Gamma(m):=\mathrm{Sp}_{2g}(\Z)\cap K(m)$. \begin{lemma}\label{lem:Kdelta} \begin{enumerate}[(i)] \item $K'(2d_\Upsilon)\subset K_\Upsilon\subset K'(d_\Upsilon)$. In particular $K(2d_\Upsilon)\subset K_\Upsilon$ and $K_\Upsilon\cap\mathrm{Sp}(W)(\Af)\subset K(d_\Upsilon)$. \item $\nu(K_\Upsilon)=\Zhat^\times$. Hence $S:=M_\Upsilon\otimes\C$ is connected, $S=\Gamma_\Upsilon\backslash\mathcal H_g$ with $\Gamma_\Upsilon:=\mathrm{Sp}_{2g}(\Z)\cap K_\Upsilon$, and $\Gamma(2d_\Upsilon)\subset\Gamma_\Upsilon\subset\Gamma(d_\Upsilon)$. \item $K_\Upsilon$ is not neat. But if $(H',X_{H'})$ is a Shimura subdatum of $(G,X)$, $X_{H'}^+$ a connected component of $X_{H'}$ and $h\in G(\Af)$, then every subgroup of $H'(\Q)\cap hK_\Upsilon h^{-1}$ that preserves $X_{H'}^+$ is neat. In particular $G(\Q)_+\cap hK_\Upsilon h^{-1}$ is neat for every $h$. \end{enumerate} \end{lemma} \begin{proof} (i) Mumford defines $H(\Upsilon):=K(\Upsilon)\oplus\widehat K(\Upsilon)$ with $\widehat K(\Upsilon):=\mathrm{Hom}(K(\Upsilon),\C^*)$ \cite[p.~294]{MumfordI}, so the commutator pairing of the Heisenberg group $\mathcal G(\Upsilon)$ takes values in $\mu_{d_\Upsilon}$ with no choice of a root of unity. For $L$ of type $\Upsilon$ the group $H(L)$ is $A[d_\Upsilon]$, and an $\Upsilon$-marking induces a symplectic isomorphism $H(L)\cong H(\Upsilon)$. On $A[d_\Upsilon]$ the Weil pairing $\langle\ ,\ \rangle$ satisfies $\langle\eta v,\eta w\rangle=\zeta^{\nu(\eta)\psi(v,w)}$ with $\zeta:=\exp(2\pi i/d_\Upsilon)$; the other sign convention replaces $\zeta$ by $\zeta^{-1}$ and changes nothing below. The isomorphism attached to $\eta$ matches $a\in K(\Upsilon)$ with $\sum_ia_i\eta e_i$, and the character $a\mapsto\zeta^{\sum_ia_ib_i}$ of $K(\Upsilon)$ with the unique $P\in\sum_i(\Z/d_\Upsilon\Z)\,\eta f_i$ such that $\langle\eta e_i,P\rangle=\zeta^{b_i}$ for all $i$, namely $P=\nu(\eta)^{-1}\sum_ib_i\eta f_i$. So $\eta$ and $\eta k$ give the same isomorphism if and only if $ke_i\equiv e_i$ and $\nu(k)^{-1}kf_i\equiv f_i$ modulo $d_\Upsilon$ for all $i$, that is, $k\in K'(d_\Upsilon)$. Since the $\Upsilon$-marking determines this isomorphism, $K_\Upsilon\subset K'(d_\Upsilon)$. \emph{$K'(2d_\Upsilon)\subset K_\Upsilon$.} The same computation for $L^{\otimes2}$, which has type $2\Upsilon$ and $H(L^{\otimes2})=A[2d_\Upsilon]$, shows that $\eta$ and $\eta k$ induce the same symplectic isomorphism $H(L^{\otimes2})\cong H(2\Upsilon)$ if and only if $k\in K'(2d_\Upsilon)$; and by \cite[\S2, Remark~3, p.~319]{MumfordI} such an isomorphism determines the symmetric $\vartheta$-structure for $L$. So $K'(2d_\Upsilon)\subset K_\Upsilon$. \emph{An element $k\in K'(d_\Upsilon)$ changes the marking by an automorphism that depends only on $k$.} For $k\in K'(d_\Upsilon)$ write $k=(1+d_\Upsilon M)\,\mathrm{diag}(1_g,\nu(k)1_g)$. By the formula for $P$ at level $2d_\Upsilon$, the isomorphisms $H(L^{\otimes2})\cong H(2\Upsilon)$ attached to $\eta k$ and $\eta$ differ by $\mathrm{diag}(1_g,\nu(\eta)1_g)(1+d_\Upsilon M)\,\mathrm{diag}(1_g,\nu(\eta)^{-1}1_g)$, which is $1+N$ with $N:=d_\Upsilon M$ modulo $2d_\Upsilon$, as $\nu(\eta)$ is odd and the entries of $N$ are $0$ or $d_\Upsilon$; so it depends only on $k$, and $N(H(2\Upsilon))\subset H(2\Upsilon)[2]$. In blocks for $K(2\Upsilon)\oplus\widehat K(2\Upsilon)$, $1+N=(1+N_{\mathrm d})(1+N_{\mathrm o})$ with $N_{\mathrm d}$ block-diagonal and $N_{\mathrm o}$ off-diagonal, both factors symplectic. For $1+N_{\mathrm o}$, the computation after \cite[\S2, Remark~3, p.~319]{MumfordI} shows that the marking is replaced by its composite with the automorphism $F_\sigma\colon(t,y,m)\mapsto(\sigma(y,m)t,y,m)$ of $\mathcal G(\Upsilon)=\C^*\times K(\Upsilon)\times\widehat K(\Upsilon)$ \cite[pp.~294 and 318]{MumfordI}, where $\Delta_1\colon K(2\Upsilon)\to\widehat K(2\Upsilon)$ and $\Delta_2\colon\widehat K(2\Upsilon)\to K(2\Upsilon)$ are the two blocks of $N_{\mathrm o}$, $\bar l$ is the image of $l$ in $\widehat K(\Upsilon)$, and $\sigma((2x,\bar l))=\Delta_1x(x)\cdot l(\Delta_2l)$ for $x\in K(2\Upsilon)$ and $l\in\widehat K(2\Upsilon)$; this depends only on $N_{\mathrm o}$. The factor $1+N_{\mathrm d}$ acts by $x\mapsto\varepsilon x$ and $l\mapsto l\circ\varepsilon^{-1}$, with $\varepsilon$ its block on $K(2\Upsilon)$. Recall Mumford's homomorphisms $D_{-1}\colon\mathcal G(2\Upsilon)\to\mathcal G(2\Upsilon)$, $(t,x,l)\mapsto(t,-x,-l)$, $H_2\colon\mathcal G(2\Upsilon)\to\mathcal G(\Upsilon)$, $(t,x,l)\mapsto(t^2,2x,\bar l)$, and $E_2\colon\mathcal G(\Upsilon)\to\mathcal G(2\Upsilon)$, $(t,x,l)\mapsto(t^2,x,2*l)$, where $K(\Upsilon)\subset K(2\Upsilon)$ by $a\mapsto2a$ and $(2*l)(x):=l(2x)$ \cite[p.~316]{MumfordI}. The automorphism $U\colon(t,x,l)\mapsto(t,\varepsilon x,l\circ\varepsilon^{-1})$ of $\mathcal G(2\Upsilon)$ commutes with $D_{-1}$ and satisfies $H_2\circ U=H_2$ and $U\circ E_2=E_2$, as $\varepsilon-1$ has values of order $2$; so $U$ carries a symmetric lift of the first isomorphism to one of the second with the same composite with $H_2$, and by \cite[\S2, Remarks~1 and~3]{MumfordI} the marking does not change. Hence the markings induced by $\eta k$ and $\eta$ differ by an automorphism of $\mathcal G(\Upsilon)$ that depends only on $k$, so $K_\Upsilon$ does not depend on $(A,\eta)$. \emph{$K_\Upsilon$ is a group and a product level.} It is a group, since for $k,k'\in K_\Upsilon$ the pair $(A,\eta k)$ gives that $\eta kk'$ induces the marking of $\eta k$, which is that of $\eta$, and likewise $\eta k^{-1}$ that of $\eta k^{-1}k=\eta$. Elements of $K'(d_\Upsilon)$ with $\nu=1$ are $\equiv1$ modulo $d_\Upsilon$. Both $K'(d_\Upsilon)$ and $K'(2d_\Upsilon)$ are product levels with the same factor at every odd $p$, so $K_\Upsilon$ is a product level. (ii) $\mathrm{diag}(1_g,u1_g)\in K'(2d_\Upsilon)$ for every $u\in\Zhat^\times$, so $\nu(K_\Upsilon)=\Zhat^\times$. As $\mathrm{Sp}_{2g}$ is simply connected, $\pi_0(\Sh_K(G,X)_\C)=\Q_{>0}\backslash\Af^\times/\nu(K)=\Zhat^\times/\nu(K)$ for every compact open $K\subset G(\Zhat)$ \cite[2.1.3]{Deligne79}, which is trivial for $K=K_\Upsilon$. An element of $G(\Q)_+\cap K_\Upsilon$ has similitude in $\Q_{>0}\cap\Zhat^\times=\{1\}$, so it lies in $\mathrm{Sp}_{2g}(\Z)\cap K_\Upsilon=\Gamma_\Upsilon$, and the inclusions follow from (i). (iii) The element $\mathrm{diag}(1_g,-1_g)$ of $G(\Z)$ has similitude $-1$ and lies in $K'(2d_\Upsilon)\subset K_\Upsilon$; its eigenvalues at every $p$ are $\pm1$, so it is not neat \cite[0.6]{Pink}. Let $\Gamma'$ be a subgroup of $H'(\Q)\cap hK_\Upsilon h^{-1}$ that preserves $X_{H'}^+$. Then $\Gamma'$ preserves the component of $\mathcal H_g^\pm$ that contains $X_{H'}^+$, so $\nu(\Gamma')\subset\Q_{>0}\cap\nu(K_\Upsilon)=\{1\}$, and $\Gamma'\subset G(\Q)\cap h(K_\Upsilon\cap\mathrm{Sp}(W)(\Af))h^{-1}\subset G(\Q)\cap hK(d_\Upsilon)h^{-1}$ by (i). As $d_\Upsilon\ge3$, $K(d_\Upsilon)$ is neat, and neatness passes to conjugates and to subgroups \cite[0.6]{Pink}. \end{proof} So $K_\Upsilon$ is not a neat level in the sense of \cref{sec:shimura}, but $S$ is the quotient of $\mathcal H_g$ by the neat group $\Gamma_\Upsilon$, and everything below uses only the neatness of the arithmetic groups in (iii). In particular the bundle of top-degree forms on $S$ extends to the Baily--Borel compactification as a line bundle $\Lb_{K_\Upsilon}$ \cite[Prop.~3.4(b)]{Mumford77}, whose sections are the modular forms of weight $g+1$ for $\Gamma_\Upsilon$, and degrees on $S$ are taken for it. The bounds of \cref{sec:Ag} are proved at neat product levels, and reach $K_\Upsilon$ through $K(2d_\Upsilon)$. \needspace{4\baselineskip} \begin{lemma}\label{lem:TR} Let $K':=K(2d_\Upsilon)$, $\pi\colon\Sh_{K'}(G,X)\to S$ the natural map, and $c_\Upsilon:=[K_\Upsilon:K']\le|\mathrm{GSp}_{2g}(\Z/2d_\Upsilon\Z)|$. Let $Z\subset S$ be closed and geometrically irreducible, defined over a number field $F$ with $[F:\Q]=d$, with $D:=\deg_{\Lb_{K_\Upsilon}}Z$, and let $V$ be special and maximal in $Z$. Then there are a geometrically irreducible component $Z'$ of $\pi^{-1}(Z)$, defined over a field of degree at most $c_\Upsilon d$, with $\deg_{\Lb_{K'}}Z'\le c_\Upsilon D$, and a special subvariety $V'$ maximal in $Z'$ with $\pi(V')=V$, $T_{V'}=T_V$, $\deg_{\Lb_{K_\Upsilon}}V\le\deg_{\Lb_{K'}}V'$ and $\alpha_V\le\alpha_{V'}$, where $\alpha_V$ is computed at the level $\lambda(K_\Upsilon)$ and $\alpha_{V'}$ at $\lambda(K')$. \end{lemma} \begin{proof} This is the proof of \cref{lem:LV} with $K_\Upsilon\supset K'$ in place of $K\supset K'$; that proof uses the neatness of $K$ only through the arithmetic groups, which are neat here by \cref{lem:Kdelta}(iii). Each component of $\Sh_{K'}(G,X)_\C$ is $\Gamma(2d_\Upsilon)\backslash\mathcal H_g$, and $\pi$ restricted to it is the covering $\Gamma(2d_\Upsilon)\backslash\mathcal H_g\to\Gamma_\Upsilon\backslash\mathcal H_g$ of quotients by neat groups, so $\pi$ is finite étale of degree at most $c_\Upsilon$; top-degree forms pull back to top-degree forms, and the two extensions are given by modular forms of weight $g+1$, so $\pi^*\Lb_{K_\Upsilon}=\Lb_{K'}$. If $V$ is the image of $X_H^+\times\{\gamma\}$, let $V'$ be the image of $X_H^+\times\{\gamma\}$ in $\Sh_{K'}(G,X)$: a component of $\pi^{-1}(V)$ with the same datum $(H,X_H)$, so $T_{V'}=T_V$. Let $Z'$ be a component of $\pi^{-1}(Z)$ containing $V'$. As $\pi$ is defined over $\Q$ (the $\Upsilon$-marking induced by $\eta$ involves no choice of a root of unity), $\pi^{-1}(Z)$ is defined over $F$ and has at most $c_\Upsilon$ geometric components, $Z'$ is defined over an extension of degree at most $c_\Upsilon$; by the projection formula $\deg_{\Lb_{K'}}\pi^{-1}(Z)=\deg\pi\cdot D\le c_\Upsilon D$ and $\deg V\le\deg(\pi|_{V'})\deg V=\deg_{\Lb_{K'}}V'$. If $V'\subsetneq V''\subset Z'$ with $V''$ special, then $\pi(V'')\subset Z$ is special of dimension larger than $\dim V$, against maximality. Finally, with the same $\gamma$, $\bar T(\Q_p)\cap\lambda(\gamma_pK'_p\gamma_p^{-1})\subset\bar T(\Q_p)\cap\lambda(\gamma_pK_{\Upsilon,p}\gamma_p^{-1})$, so each index $\bar\iota_p$ can only grow when $K_\Upsilon$ is replaced by $K'$, and $\alpha$ can only grow, as after the proof of \cref{lem:LV}. \end{proof} So, in the setting of \cref{lem:TR}, since the constants of \cref{thm:AgK}(a) are non-decreasing in $(D,d)$ (proof of \cref{thm:NA}), \cref{thm:AgK}(a) with $N=2d_\Upsilon$, evaluated at $(c_\Upsilon D,c_\Upsilon d)$, bounds $\deg_{\Lb_{K_\Upsilon}}V$, and, if $\QRH(\delta;L_V)$ holds, $d_{L_V}$ and $\alpha_V$. \needspace{4\baselineskip} \begin{lemma}\label{lem:N0} Let $Z\subset M_\Upsilon\otimes\Qbar$ be closed and irreducible. Put $n':=g(g+1)/2$ and $P_\Upsilon(t):=d_\Upsilon^gt^g$. Let $Y:=(\overline M_\Upsilon\otimes\Qbar)_{\mathrm{red}}$, let $Y^\circ\subset Y$ be the open set of points at which $Y$ is smooth over $\Qbar$ of local dimension $n'$, $\mathcal X^\circ:=\overline{\mathcal A}_\Upsilon\times_{\overline M_\Upsilon}Y^\circ$, $H_\Upsilon\subset Y^\circ$ the set of points $y$ whose fiber $\mathcal X^\circ_y\subset\PP(V_\Upsilon)_{\kappa(y)}$ is smooth of pure dimension $g$ with Hilbert polynomial $P_\Upsilon$, $U$ the interior of $H_\Upsilon$ in $Y^\circ$, $C_Z$ the irreducible component of $Y$ containing $Z$, and $N_0:=U\cap C_Z$. \begin{enumerate}[(i)] \item $\mathcal X^\circ\times_{Y^\circ}U\to U$ is smooth. \item $M_\Upsilon\otimes\Qbar\subset U$. In particular $Z\subset Y^\circ$, and $C_Z$ is well defined. \item $N_0=M_\Upsilon\otimes\Qbar$. \item $N_0$ can be computed from Mumford's equations and equations for the closure $\overline Z$ of $Z$ in $\PP(V_\Upsilon)$, as a quasi-projective variety given by explicit equations and inequations. \end{enumerate} \end{lemma} \begin{proof} (i) Each $y\in U$ has an open neighborhood $W\subset H_\Upsilon$. As $Y^\circ$ is smooth over $\Qbar$, each connected component of $W$ is integral, and over it the fibers of $\mathcal X^\circ$ have the same Hilbert polynomial $P_\Upsilon$, so $\mathcal X^\circ_W$ is flat over $W$ \cite[III.9.9]{Hartshorne}. A flat morphism of finite presentation with smooth fibers is smooth \cite[17.5.1]{EGAIV4}. (ii) $M_\Upsilon\otimes\Qbar$ is open in $\overline M_\Upsilon\otimes\Qbar$ and smooth of dimension $n'$ (it is a fine moduli space, and $S=\Gamma_\Upsilon\backslash\mathcal H_g$ with $\Gamma_\Upsilon$ neat by \cref{lem:Kdelta}), so it is an open subscheme of $Y$ contained in $Y^\circ$. Its fibers are abelian varieties embedded by a sheaf $L$ of type $\Upsilon$, which are smooth of pure dimension $g$ with Hilbert polynomial $\chi(L^{\otimes t})=t^g\chi(L)=d_\Upsilon^gt^g$, because $\chi(L)^2=\deg\varphi_L=|K(L)|=d_\Upsilon^{2g}$ and $\chi(L)>0$ for ample $L$ \cite[Thm.~11.1]{MilneAV}. So $M_\Upsilon\otimes\Qbar$ is an open subset of $Y^\circ$ contained in $H_\Upsilon$, hence in $U$. A point of $Y^\circ$ lies on exactly one irreducible component of $Y$. (iii) Two distinct components of $Y$ of dimension $n'$ meet only at points where $Y$ is not smooth, so the connected components of $Y^\circ$ are the non-empty $C_j\cap Y^\circ$, for the components $C_j$ of $Y$ of dimension $n'$; as each $U\cap C_j$ is open in the irreducible $C_j$, the connected components of $U$ are the non-empty $U\cap C_j$. By (ii), $Z\subset U\cap C_Z=N_0$, and $N_0$ is connected. The family $\overline{\mathcal A}_\Upsilon\times_{\overline M_\Upsilon}N_0$ is smooth over $N_0$ by (i), and every geometric point of $Z$ is in the image of $\mathcal M_\Upsilon$ under $t$. Mumford's Step~IV \cite[p.~94]{MumfordII} says, with $\Upsilon$ for his $\delta$: ``Suppose that $N$ is a connected subscheme of $\overline M_\Upsilon$ such that if $\overline{\mathcal A}_\Upsilon$ induces a subscheme $B$ over $N$, then $B$ is smooth over $N$. Suppose that some geometric point $x$ of $N$ is in the image of $\mathcal M_\Upsilon$ under $t$. Then the $N$-valued point $1_N$ of $N$ is in the image of $\mathcal M_\Upsilon$.'' Its proof \cite[pp.~94--95]{MumfordII} uses $N$ only as a connected scheme with a morphism to $\overline M_\Upsilon$, so it applies to $N_0\to\overline M_\Upsilon$. Hence $N_0\subset M_\Upsilon\otimes\Qbar$. Now $N_0$ is open in $U$, hence open in $M_\Upsilon\otimes\Qbar$, and closed in $U\supset M_\Upsilon\otimes\Qbar$, hence closed in $M_\Upsilon\otimes\Qbar$. By \cref{lem:Kdelta}(ii), $M_\Upsilon\otimes\Qbar$ is connected, so $N_0=M_\Upsilon\otimes\Qbar$. (iv) The components of $Y$ are computed by absolute primary decomposition, $Y^\circ$ by the Jacobian criterion, and $C_Z$ by ideal membership, as the one component of $Y$ that contains $\overline Z$: a component containing $\overline Z$ contains $Z\subset Y^\circ$, and a point of $Y^\circ$ lies on exactly one component (ii). A flattening stratification, computable by parametric Gröbner bases \cite[Prop.~5.1(i)]{Urbanik}, applied to $\mathcal X^\circ\to Y^\circ$, gives locally closed $T_1,\dots,T_k$ covering $Y^\circ$ over which $\mathcal X^\circ$ is flat. Over each irreducible component $T'$ of each $T_i$ the fibers have one Hilbert polynomial \cite[III.9.9]{Hartshorne}, computed at the generic point by a Gröbner basis. Let $H'_\Upsilon$ be the set of $y\in Y^\circ$ whose fiber has Hilbert polynomial $P_\Upsilon$ and whose Jacobian matrix has rank $\dim\PP(V_\Upsilon)-g$ at every point of the fiber. The points of $\mathcal X^\circ_{T'}$ at which the Jacobian matrix of the fiber has rank different from $\dim\PP(V_\Upsilon)-g$ form a constructible set, and its image in $T'$ is constructible and computable \cite[Thm.~1.0]{BLH}. So $H'_\Upsilon$ is constructible and computable, and so is its interior $U'$ in $Y^\circ$, the complement of the closure of $Y^\circ\smallsetminus H'_\Upsilon$. Clearly $H_\Upsilon\subset H'_\Upsilon$, so $U\subset U'$. Conversely, let $y\in U'\cap C_Z$ and let $W\subset U'\cap C_Z$ be an irreducible open neighborhood of $y$ in $Y^\circ$. The open set $M_\Upsilon\otimes\Qbar$ meets $C_Z$ (it contains $Z$), so $W$ contains the generic point of $C_Z$, over which the fiber is an abelian variety. As the fibers over $W$ all have Hilbert polynomial $P_\Upsilon$, $\mathcal X^\circ_W$ is flat over the integral $W$ \cite[III.9.9]{Hartshorne}, so its associated points lie over the generic point of $W$; hence $\mathcal X^\circ_W$ is integral of dimension $n'+g$, and every fiber over $W$ is of pure dimension $g$ \cite[III.9.6]{Hartshorne}. On a fiber of pure dimension $g$, rank $\dim\PP(V_\Upsilon)-g$ of the Jacobian matrix at every point is smoothness. Hence $W\subset H_\Upsilon$, and $U'\cap C_Z=U\cap C_Z=N_0$. \end{proof} \subsection{PEL loci}\label{sec:PEL} \emph{PEL data.} A PEL datum $\mathfrak d=(\mathcal E,R,\tau)$ consists of a product $\mathcal E=\prod_iF_i$ of totally real and CM fields with its positive involution $*$ (the identity on each totally real factor and complex conjugation on each CM factor), an order $R\subset\mathcal O_{\mathcal E}$ stable under $*$, given by generators $e_1,\dots,e_m$ of $R$ as a $\Z$-module, and a type $\tau$: multiplicities $m_i\ge1$ with $\sum_im_i[F_i:\Q]=2g$, together with, for each CM factor $F_i$ and each place $v$ of its maximal totally real subfield $F_i^+$, an integer $0\le a_v\le m_i$, the multiplicity on the tangent space of a fixed embedding $\varphi_v$ of $F_i$ above $v$ (its conjugate then has multiplicity $m_i-a_v$); a totally real $F_i$ carries $m_i/2$ copies of each of its embeddings, $m_i$ even. Then $\tau$ gives, for each $r\in R$, a characteristic polynomial $\tau(r)$ of degree $g$, and we let $W'$ be the $\mathcal E$-module whose character is $\tau\bar\tau$. The \emph{PEL locus} $\mathfrak E(\mathfrak d)\subset S$ is the set of points $s$ for which there is a ring homomorphism $\iota\colon R\to\mathrm{End}(A_s)$ with $\iota(r)^\dagger=\iota(r^*)$ for the Rosati involution $\dagger$ of the polarization, and $\det(T-\iota(r)\mid\mathrm{Lie}\,A_s)=\tau(r)$ for all $r\in R$; then $H_1(A_s,\Q)\cong W'$ as $\mathcal E$-modules, as $H_1(A_s,\C)=\mathrm{Lie}\,A_s\oplus\overline{\mathrm{Lie}\,A_s}$. For a special $V$ with torus algebra $\mathcal E=\Q[T]$ as in \cref{sec:orders} we put $\mathfrak d_V:=(\mathcal E,R,\tau_V)$, with $R=\mathcal E\cap\mathrm{End}(\Lambda_V)$ and $\tau_V(r)$ the characteristic polynomial of $r$ on $\mathrm{Lie}\,A_x=W_\C/F^0_x$ for $x\in X_H^+$, which does not depend on $x$, being continuous with values in a countable set. \emph{Endomorphisms by their graphs.} Let $s\in N_0$, with abelian variety $A_s\subset\PP(V_\Upsilon)$ embedded by $L$ of type $\Upsilon$. A closed subscheme $\Gamma\subset A_s\times A_s$ such that $\mathrm{pr}_1|_\Gamma$ is an isomorphism and $(0,0)\in\Gamma$ is the graph of the homomorphism $f:=\mathrm{pr}_2\circ(\mathrm{pr}_1|_\Gamma)^{-1}$, since a regular map of abelian varieties is a homomorphism followed by a translation \cite[Cor.~1.2]{MilneAV}. On $\Gamma_f\cong A_s$ the bundle $\mathcal O(1)\boxtimes\mathcal O(1)$ restricts to $L\otimes f^*L$, and $\varphi_{L\otimes f^*L}=\varphi_L\circ(1+f^\dagger f)$, so \begin{equation}\label{eq:graphHilbert} \chi\bigl((L\otimes f^*L)^{\otimes t}\bigr)=t^g\,d_\Upsilon^g\,\det\nolimits_{H_1(A_s,\Q)}(1+f^\dagger f)^{1/2}, \end{equation} because $\chi(M)^2=\deg\varphi_M$ and $\chi(M)>0$ for ample $M$, $\chi(M^{\otimes t})=t^g\chi(M)$, and the degree of an endomorphism is its determinant on $H_1(A_s,\Q)$ \cite[Thm.~11.1 and Prop.~10.20]{MilneAV}. If $f=\iota(e)$ with $\iota(e)^\dagger=\iota(e^*)$, this is the polynomial $P_e(t):=t^gd_\Upsilon^g\det_{W'}(1+e^*e)^{1/2}$, computed from $\mathfrak d$. \needspace{6\baselineskip} \begin{lemma}\label{lem:Hilb} Let $B$ be a quasi-projective variety over a number field, $\mathcal X\subset\PP^M\times B$ a closed subscheme whose ideal sheaf is generated by explicitly given bihomogeneous $F_1,\dots,F_k$ of degrees at most $m$ in the coordinates $x$ of $\PP^M$, and $p(t)$ a Hilbert polynomial with Gotzmann number $r_0$. Put $r:=\max(r_0,m)$, $N(t):=\binom{M+t}{M}$ and $q(t):=N(t)-p(t)$. Then the relative Hilbert scheme $\mathrm{Hilb}^p(\mathcal X/B)$ is the closed subscheme of $\mathrm{Hilb}^p(\PP^M)\times B\subset\mathrm{Gr}(q(r),N(r))\times B$ defined by $x^\alpha F_j(\cdot\,;b)\in \Omega$ for all $j$ and all monomials $x^\alpha$ of degree $r-\deg_xF_j$, where $\Omega\subset\Qbar[x]_r$ is the point of the Grassmannian; and its universal family is cut out in $\PP^M\times\mathrm{Hilb}^p(\mathcal X/B)$ by $\Omega$. \end{lemma} \begin{proof} For the absolute case, by Gotzmann's regularity theorem \cite{Gotzmann78} the ideal sheaf of a subscheme $\mathcal Z\subset\PP^M_A$ with Hilbert polynomial $p$ is $r$-regular, $I(\mathcal Z)_{\ge r}$ is generated by $I(\mathcal Z)_r$, and $\mathcal Z\mapsto I(\mathcal Z)_r$ embeds $\mathrm{Hilb}^p(\PP^M)$ in $\mathrm{Gr}(q(r),N(r))$ as a closed subscheme with explicit equations, for every $r\ge r_0$ by the proofs of \cite[Thms.~1.21, 1.24 and 1.25, (1.22), (1.23)]{Lella}, written there for $r=r_0$. For a $T$-point $T\to B$ and $\mathcal Z\subset\PP^M_T$ flat with Hilbert polynomial $p$, let $\Omega$ be the module of sections of $I_{\mathcal Z}(r)$, locally a direct summand of rank $q(r)$. If $F_j$ vanishes on $\mathcal Z$, then $x^\alpha F_j\in \Omega$. Conversely, if $x^\alpha F_j\in \Omega$ for all $|\alpha|=r-\deg F_j$, then on $D_+(x_i)$ the function $F_j/x_i^{\deg F_j}=x_i^{r-\deg F_j}F_j/x_i^r$ is a section of $I_{\mathcal Z}$, so $F_j$ vanishes on $\mathcal Z$. Membership of a given vector in a subbundle of rank $q(r)$ is the vanishing of exterior products, a closed condition compatible with base change. \end{proof} Let $\mathcal H$ be a scheme of finite type over a number field $k$, $\mathcal A\to\mathcal H$ an abelian scheme of relative dimension $g$ embedded in $\PP(V_\Upsilon)\times\mathcal H$, and $\Gamma\subset\mathcal A\times_{\mathcal H}\mathcal A$ closed, flat and proper over $\mathcal H$ with fibers $\Gamma_t$ of dimension $g$; in our application $\mathcal H$ is one of the relative Hilbert schemes $\mathcal H_{i,n}$ in the proof of \cref{lem:PELcomp}, $\mathcal A$ the pull-back of the universal abelian scheme over $N_0$, and $\Gamma$ the universal subscheme. Let $\pi_t:=\mathrm{pr}_1|_{\Gamma_t}\colon\Gamma_t\to\mathcal A_t$ and $U_{\mathrm{iso}}:=\{t\in\mathcal H:\pi_t\text{ is an isomorphism}\}$. As $\mathrm{pr}_1\colon\Gamma\to\mathcal A$ and $\mathcal A\to\mathcal H$ are proper, and $\Gamma_t$ and the integral $\mathcal A_t$ have dimension $g$, $\pi_t$ is an isomorphism if and only if it is a monomorphism, if and only if every fiber $\pi_t^{-1}(y)$, $y\in\mathcal A_t$, is empty or $\kappa(y)$-isomorphic to $\mathrm{Spec}\,\kappa(y)$, and $U_{\mathrm{iso}}$ is open in $\mathcal H$ \cite[18.12.6 and~18.12.7]{EGAIV4}. \needspace{4\baselineskip} \begin{lemma}\label{lem:iso} Let $t\in\mathcal H$, $\kappa:=\kappa(t)$, and $J\subset\kappa[x,y]$ a bihomogeneous ideal whose sheaf is the ideal sheaf of $\Gamma_t$ in $\PP_x\times\PP_y$, two copies of $\PP(V_\Upsilon)$ with coordinates $x_0,\dots,x_M$ and $y_0,\dots,y_M$; let $J'$ be the same ideal in variables $(x,y')$. Then $\pi_t$ is an isomorphism if and only if for every $(i,j,l)$ each minor $y_ay'_b-y_by'_a$, dehomogenized by $x_i=y_j=y'_l=1$, lies in the dehomogenization of $J+J'\subset\kappa[x,y,y']$. \end{lemma} \begin{proof} As $\mathcal A_t\to\PP_x$ is a closed immersion, $\Gamma_t\times_{\mathcal A_t}\Gamma_t=\Gamma_t\times_{\PP_x}\Gamma_t$ is the closed subscheme of $\PP_x\times\PP_y\times\PP_{y'}$ with ideal $J+J'$, and the diagonal is cut out in it by the $2\times2$ minors of the matrix with rows $y$ and $y'$. So the diagonal is an isomorphism if and only if these minors vanish on $\Gamma_t\times_{\mathcal A_t}\Gamma_t$, which on the charts $D_+(x_iy_jy'_l)$ is the stated membership. A morphism is a monomorphism if and only if its diagonal is an isomorphism \cite[Tag~01L3]{Stacks}; conclude by the equivalences before the lemma. \end{proof} On an affine chart $C=V(I_C)\cap D(h_C)$ of the Hilbert base $\mathcal H\subset\mathrm{Gr}(q(r),N(r))\times N_0$ with coordinates $u$, where $I_C$ includes the Hilbert equations with their original scheme structure, the point $\Omega(t)$ of \cref{lem:Hilb} has a basis $w_1(u),\dots,w_{q(r)}(u)$ with coefficients polynomial in $u$, and pulling back along the Segre map gives generators $w_s(t)(x\otimes y)$ of the ideal sheaf of $\Gamma_t$ in $\PP_x\times\PP_y$, admissible in \cref{lem:iso} at every $t\in C$, including generic points of closed subsets. To compute $U_{\mathrm{iso}}$, run the induction of the proof of \cite[Prop.~5.1(iii)]{Urbanik} with ``reduced fiber'' replaced by ``$\pi_t$ is an isomorphism'': on each irreducible $V(\mathfrak p)$ of a chart, decide at the generic point by \cref{lem:iso} (the generators above are admissible there); a no loses nothing, as $U_{\mathrm{iso}}$ is open; a yes holds on $V(\mathfrak p)\cap D(h)$ for $h$ a common denominator of the cofactors that express the minors of \cref{lem:iso} in the generators, and one recurses on $V(\mathfrak p)\smallsetminus D(h)$, of smaller dimension. \needspace{4\baselineskip} \begin{lemma}\label{lem:PELcomp} For every PEL datum $\mathfrak d$, the set $\mathfrak E(\mathfrak d)\cap N_0$ is constructible, and it can be computed from Mumford's equations, $N_0$ and $\mathfrak d$ as a finite union of explicit locally closed subsets of $N_0$. \end{lemma} \begin{proof} Let $\mathcal A:=\overline{\mathcal A}_\Upsilon\times_{\overline M_\Upsilon}N_0$, the universal abelian scheme over $N_0$ (\cref{lem:N0}), and embed $\mathcal A\times_{N_0}\mathcal A$ in $\PP(V_\Upsilon\otimes V_\Upsilon)\times N_0$ by the Segre map, so that $\mathcal O(1)$ restricts to $\mathcal O(1)\boxtimes\mathcal O(1)$; its ideal sheaf is generated by the Segre quadrics and by $F(x;b)y^\beta$, $F(y;b)x^\beta$ ($|\beta|=\deg F$) for Mumford's equations $F$ of $\mathcal A$. For each generator $e_i$ and each $n=1,\dots,2g+1$, let $\mathcal H_{i,n}$ be the relative Hilbert scheme of \cref{lem:Hilb} for the polynomial $P_{ne_i}$, with universal subscheme $\Gamma_{i,n}$, and let $\mathcal H$ be their fiber product over $N_0$. Impose: (1) $\mathrm{pr}_1$ is an isomorphism on each $\Gamma_{i,n}$ (the open set $U_{\mathrm{iso}}$, computed as above), and $(0,0)\in\Gamma_{i,n}$, i.e.\ every element of $\Omega$ vanishes at $s\otimes s$, as the origin of $A_s$ is the point $s$; so $\Gamma_{i,n}$ is the graph of a homomorphism $f_{i,n}$. (2) $df_{i,n}=n\,df_{i,1}$, the $\Z$-linear relations among the $e_i$, and the expressions of $1$ and of each product $e_ie_j$ as $\Z$-linear combinations of the $e_k$, hold for the differentials $df_{i,1}$ at the origin, and $\det(T-df_{i,1}\mid\mathrm{Lie})=\tau(e_i)$; these are closed conditions on the tangent spaces of the graphs at $(0,0)$. In characteristic $0$, $f\mapsto df$ is injective on $\mathrm{End}(A_s)$, by complex uniformization; so (2) gives $f_{i,n}=nf_{i,1}$, a ring homomorphism $\iota\colon R\to\mathrm{End}(A_s)$ with $\iota(e_i)=f_{i,1}$, and the type $\tau$, as the traces on $\mathrm{Lie}\,A_s$, additive in $r$, agree on the $e_i$, hence on $\mathcal E$, and fix the multiplicity of each embedding. (3) By \cref{eq:graphHilbert}, the Hilbert polynomials give $\det(1+n^2f^\dagger f)=\det_{W'}(1+n^2e^*e)$ for $f=f_{i,1}$, $e=e_i$ and $2g+1$ values of $n^2$, so $f^\dagger f$ and $e^*e$ have the same characteristic polynomial. Hence $\mathrm{Tr}(f^\dagger f)=\sum|\xi|^2$ over the eigenvalues $\xi$ of $f$, which is the case of equality in Schur's inequality for the positive definite Rosati form; so $f$ is normal, and $f^\dagger=\iota(e_i^*)$, as both act by $\bar\xi$ on the $\xi$-eigenspace of $f$. Conversely every $s\in\mathfrak E(\mathfrak d)\cap N_0$ with its $\iota$ gives such graphs. So $\mathfrak E(\mathfrak d)\cap N_0$ is the image in $N_0$ of an explicit finite union of locally closed subsets of $\mathcal H$, and the image is constructible and computable \cite[Thm.~1.0]{BLH}, on finitely many affine charts. \end{proof} \subsection{Containers}\label{sec:containers} We use Urbanik's algorithm \cite{Urbanik}, with his definitions. Let $\widetilde S$ be a smooth quasi-projective variety carrying a polarizable integral variation of Hodge structure $\mathbb V$. The algebraic monodromy group $H_Y$ of an irreducible subvariety $Y$ (not the Mumford--Tate group of \cref{sec:special}) is the identity component of the Zariski closure of the monodromy of $\mathbb V$ on the normalization of $Y$; $Y$ is \emph{weakly special} if it is maximal among irreducible subvarieties with its algebraic monodromy group \cite[Defs.~1.3--1.4]{Urbanik}; and $Y$ is \emph{rigid} if there is no weakly special $Y'$ with $Y\subsetneq Y'\subset\widetilde S$ such that $H_Y$ is normal in $H_{Y'}$ \cite[Def.~4.28]{Urbanik}. Special subvarieties are weakly special. For a projective compactification of $\widetilde S$, a very ample line bundle on it and an integer $d'$, \cite[Cor.~6.3]{Urbanik} (with the remark below) gives an algorithm that computes a finite set of weakly special subvarieties of degree at most $d'$ containing the rigid ones, from equations for $\widetilde S$ and the data $(\mathcal H,F^\bullet,\nabla)$ of the variation \cite[Thm.~2.4]{Urbanik}. \begin{remark*} The stopping test in the proof of \cite[Prop.~5.14]{Urbanik} needs one more condition. There, for a component $\mathcal T$ of $\mathrm{Var}(\widetilde S)$ and the distinct types $\mathcal C(V_{i_1}),\dots,\mathcal C(V_{i_p})$ of dimension $\ell$ among $\mathcal C(V_0),\dots,\mathcal C(V_k)$ (repeats removed), the loci $W_{r,i_j}\subset\mathcal T$ cut out by the constraints of order at most $r$ are computed until (i) they are closed and (ii) of their components of generic type dimension $\ell$ for different $j$, no one contains another. The general linear group is transitive on the flag variety $\check L$, so $W_{0,i}=\mathcal T$ for every $i$, and (i) and (ii) hold at $r=0$, with nothing returned, whenever $\dim\mathcal G(\mathcal T)\ne\ell$; but $\mathcal T$ can have optimal components of smaller type dimension (for $H^1\oplus H^1$ on $Y(3)\times Y(3)$, the diagonal among the $(1,1)$-curves). Add (iii): every component of every $W_{r,i_j}$ has generic type of dimension at most $\ell$. This is decidable \cite[Lemma~5.8]{Urbanik} and holds, with (i) and (ii), once $W_{r,i_j}=\mathcal T\cap W(\mathcal C(V_{i_j}))$ for all $j$. Then a component $A$ of $W_{r,i_j}$ with $\dim\mathcal G(A)=\ell$ lies in the closed locus $W(\mathcal G(A))$ \cite[Prop.~4.31]{Urbanik}, so in a component $A'$ of $W_{r,i_{j'}}$ with $\mathcal C(V_{i_{j'}})=\mathcal G(A)$; $\dim\mathcal G(A')\ge\dim\mathcal G(A)=\ell$, from $A\subset A'\subset W(\mathcal G(A'))$, and $\dim\mathcal G(A')\le\ell$ by (iii), so $j'=j$ by (ii), and $A$ is an optimal component of $\mathcal T\cap W(\mathcal C(V_{i_j}))$. Conversely, an optimal component lies in a component of $W_{r,i_j}$ whose generic type has dimension $\ell$ by (iii), which is therefore optimal and equal to it. So \cite[Prop.~5.14, Thm.~5.15]{Urbanik} hold as stated. Let $\mathcal W\subset\mathrm{Var}(\widetilde S)$ be the locus of weakly special subvarieties \cite[\S4.8]{Urbanik}, and $\mathrm{Var}(\widetilde S)_{d'}\subset\mathrm{Var}(\widetilde S)$ the subscheme parametrizing subvarieties whose closures have degree at most $d'$ \cite[Lemma~5.10]{Urbanik}. The proof of \cite[Cor.~6.3]{Urbanik} takes the isolated points of $\mathcal W\cap\mathrm{Var}(\widetilde S)_{d'}$ by \cite[Thm.~6.1(ii)]{Urbanik}; the proof of that theorem shows that a rigid weakly special $Y$ is an isolated point of $W(\mathcal C(Y))$. Taking, for each type, the isolated points of the locus of weakly special subvarieties of that type and of degree at most $d'$, which the algorithm of \cite[Thm.~5.15]{Urbanik} computes type by type, gives a finite set with the properties stated in \cite[Cor.~6.3]{Urbanik}. (On the bases $\Gamma\backslash X^+$ with $\Gamma$ neat used below, every weakly special subvariety has the dimension of its type, and isolation in $\mathcal W$ holds.) We use only these statements. \end{remark*} A maximal special subvariety of $Z$ need not be rigid in $S$: a special curve $\{x\}\times Y(1)$ in $\mathcal A_2$, with $x$ a CM point, moves in the family $\{x'\}\times Y(1)$. We make it rigid by passing to the normalization of a component of the PEL locus defined by the connected center of its generic Mumford--Tate group (\cref{lem:P}). \begin{lemma}\label{lem:P} Let $V\subset S$ be special, the image of $X_H^+\times\{\gamma\}$ for a Shimura subdatum $(H,X_H)$ with $H$ the generic Mumford--Tate group, let $T$ be the connected center of $H$, $\mathcal E:=\Q[T]$, and $M:=Z_G(T)=Z_G(\mathcal E)$. \begin{enumerate}[(a)] \item For $x\in X_H$, $h_x(\mathbb S)\subset M_\R$ and $T\subset Z(M)$. Let $X_M^+$ be the component of $M(\R)h_x$ containing $X_H^+$, and $S_V$ the image of $X_M^+\times\{\gamma\}$. Then $S_V$ is special and $V\subset S_V$. If $H'$ is the generic Mumford--Tate group on $X_M^+$, then $T\subset Z(H')$, $X_{H'}^+=X_M^+$, and $S_V$ is the image of $X_{H'}^+\times\{\gamma\}$. \item For every PEL datum $\mathfrak d$, $\mathfrak E(\mathfrak d)$ is closed in $S$, and each of its irreducible components is a special subvariety of a dimension $\dim\mathfrak d$ determined by $\mathfrak d$. $S_V$ is an irreducible component of $\mathfrak E(\mathfrak d_V)$. \item Let $K_{H'}:=\gamma K_\Upsilon\gamma^{-1}\cap H'(\Af)$, $\widetilde S_V$ the image of $X_{H'}^+\times\{1\}$ in $\Sh_{K_{H'}}(H',X_{H'})_\C$, and $\nu\colon\widetilde S_V\to S_V$ the map induced by $[x,h]\mapsto[x,h\gamma]$. Then $\widetilde S_V$ is smooth and $\nu$ is the normalization. The image $W_V$ of $X_H^+\times\{1\}$ in $\widetilde S_V$ is special, $\nu(W_V)=V$, and $\nu|_{W_V}$ is birational onto $V$. The first two sentences hold for every special $S'\subset S$ in place of $S_V$, with its generic Mumford--Tate group and its $\gamma'$ in place of $H'$ and $\gamma$; this covers every irreducible component of every $\mathfrak E(\mathfrak d)$. \item $W_V$ is rigid in $\widetilde S_V$, for the variation of Hodge structure $\nu^*\mathbb V$ given by $W$. \item For every very ample line bundle $\mathcal L'$ on a projective compactification of $\widetilde S_V$ and every integer $d'\ge\deg_{\mathcal L'}\overline W_V$, the point $[W_V]$ lies in the finite set that \cite[Cor.~6.3]{Urbanik} computes for $(\widetilde S_V,\nu^*\mathbb V,d')$. If $\mathcal L'=\nu^*\mathcal O(1)$ for a projective embedding of $\overline S_V$, then $\deg_{\mathcal L'}\overline W_V=\deg_{\mathcal O(1)}\overline V$. \end{enumerate} \end{lemma} We call $S_V$ the \emph{container} of $V$. \begin{proof} (a) $h_x(\mathbb S)\subset H_\R$ and $T$ is central in $H$, so $h_x(\mathbb S)\subset M_\R$; $M$ is reductive, being the centralizer of a torus, and $T\subset Z(M)$. $X_H^+\subset M(\R)h_x$ is connected, so it lies in one component $X_M^+$, and $V\subset S_V$. For $y\in X_H$, $(M,M(\R)h_y)$ satisfies (2.1.1.1) and (2.1.1.2) of \cite{Deligne79}, as $\mathrm{Lie}\,M$ is a sub-Hodge structure of $\mathrm{Lie}\,G$ and $\psi(\cdot,h_y(i)\cdot)$ is definite, but (2.1.1.3) can fail (for $A_y\cong A_0^2$ with $A_0$ a CM elliptic curve, $M^\ad$ is compact); so $h_y$ projects trivially to the $\Q$-simple factors of $M^\ad$ with compact real points \cite[2.1.1]{Deligne79} and factors through $M_1:=Z(M)^\circ M_{\mathrm{nc}}$, with $M_{\mathrm{nc}}$ the product of the other $\Q$-simple factors of $M^\der$. As $Z(M)^\circ$ and the compact factors centralize $h_y$, $X_M^+=M_1(\R)^+h_y$ for $y\in X_H^+$, a component of the Shimura subdatum $(M_1,M_1(\R)h_y)$, which satisfies (2.1.1.3) because a $\Q$-factor of $M_1^\ad$ on which $h_y$ projects trivially has compact real points by (2.1.1.2); so $S_V$ is special. By \cite[Lemma~2.1]{UY}, $S_V$ is the image of $X_{H'}^+\times\{\gamma\}$, and $X_{H'}^+=X_M^+$, both being connected complex submanifolds of the same dimension, the first closed in the second. As $\mathrm{MT}(y)\subset H'$ for $y\in X_H$, $H\subset H'$ and $T\subset Z(M)\cap H'\subset Z(H')$. (b) Let $s=[x',\gamma']\in\mathfrak E(\mathfrak d)$ with $\iota$ as in the definition. Then $\iota\otimes\Q$ embeds $\mathcal E$ in $\mathrm{End}(W)$, compatibly with $\psi$-adjoints, and commutes with $h_{x'}$. Let $M_\iota:=Z_G(\iota(\mathcal E))$, the group of $\iota(\mathcal E)$-linear symplectic similitudes, which is connected and reductive (\cite[Prop.~8.7]{Milne}, on each factor of $\mathcal E$) and contains $h_{x'}(\mathbb S)$. The image $S_{\iota,s}$ of the component of $M_\iota(\R)h_{x'}$ through $x'$, times $\{\gamma'\}$, is special as in (a), contains $s$, and lies in $\mathfrak E(\mathfrak d)$, since the lattice and $\iota(R)$ do not change along it and $\tau$ is locally constant. Its dimension is that of the symmetric space of $M_{\iota,\R}$, which is determined by $\mathfrak d$: the $\psi$-orthogonal decomposition $W_\R=\bigoplus_vW_v$ over the places of the factors of $\mathcal E$ gives a Siegel space of dimension $r(r+1)/2$ for a real place of a totally real factor, with $2r=\dim_\R W_v$, and a unitary symmetric space of dimension $a_v(m_i-a_v)$ for a place $v$ of $F_i^+$ with $F_i$ CM, as $\dim_\C W_v=m_i$; call the sum $\dim\mathfrak d$. Now $\mathfrak E(\mathfrak d)$ is constructible (\cref{lem:PELcomp}; here $N_0=M_\Upsilon\otimes\Qbar$ by \cref{lem:Kdelta}(ii) and \cref{lem:N0}(iii)) and is the union of the countably many $S_{\iota,s}$. Let $C$ be an irreducible component of its Zariski closure. Then $\mathfrak E(\mathfrak d)\cap C$ contains a dense open subset of $C$, which is a countable union of the closed sets $S_{\iota,s}\cap C$; by Baire's theorem one of them has interior, so $C\subset S_{\iota,s}\subset\mathfrak E(\mathfrak d)$ and $C=S_{\iota,s}$. So $\mathfrak E(\mathfrak d)$ is closed and its components have dimension $\dim\mathfrak d$. Finally $S_V=S_{\iota_V,x}$ for the inclusion $\iota_V$ of $R_V$, so $S_V$ is irreducible of dimension $\dim\mathfrak d_V$ in $\mathfrak E(\mathfrak d_V)$, and the component containing it is $S_V$. (c) $\widetilde S_V=\Gamma_{H'}\backslash X_{H'}^+$ with $\Gamma_{H'}:=\{q\in H'(\Q):qX_{H'}^+=X_{H'}^+\}\cap\gamma K_\Upsilon\gamma^{-1}$, which is neat by \cref{lem:Kdelta}(iii); so $\widetilde S_V$ is smooth. The map $\nu$ is finite, and it is injective on the Hodge generic locus by \cite[Lemma~2.2]{UY}. That lemma assumes $Z(G)(\R)$ compact; its proof uses this only to show that $N_G(H')/H'$ has compact real points, from the compactness of the stabilizer of a point of $X$ in $G(\R)$. For $G=\mathrm{GSp}$ this stabilizer is compact modulo $Z(G)(\R)=\R^\times$, and $Z(G)\subset H'$, so $N_G(H')/H'$ still has compact real points. Ullmo and Yafaev assume $K$ neat. Here we use instead that two Hodge generic points of $X_{H'}^+$ with the same image in $S$ differ by some $q\in N_G(H')(\Q)\cap G(\Q)_+\cap\gamma K_\Upsilon\gamma^{-1}$. As the similitude of $q$ is in $\Q_{>0}\cap\Zhat^\times=\{1\}$, $q$ lies in $N_G(H')(\Af)\cap\gamma K(d_\Upsilon)\gamma^{-1}$ (\cref{lem:Kdelta}(i)), a compact neat group, whose image $K''$ in $\overline N(\Af)$, $\overline N:=N_G(H')/H'$, is compact and neat \cite[0.6]{Pink}. So the image of $q$ lies in $\overline N(\Q)\cap K''$, which is neat \cite[0.6]{Pink} and discrete in the compact $\overline N(\R)$, hence finite and trivial, so $q\in H'(\Q)\cap\gamma K_\Upsilon\gamma^{-1}$ preserves $X_{H'}^+$ and the two points agree in $\widetilde S_V$. A finite morphism from a normal variety that has degree $1$ onto its image is the normalization. The same argument for $(H,X_H)\subset(G,X)$ shows that the image of $X_H^+\times\{\gamma\}$ in $S$ is reached generically injectively; as that map factors through $W_V\to V$, $\nu|_{W_V}$ is birational. $W_V$ is special in $\widetilde S_V$, defined by $(H,X_H)\subset(H',X_{H'})$. For a special $S'\subset S$ in place of $S_V$ the first two sentences of (c) have the same proof, and by (b) every irreducible component of every $\mathfrak E(\mathfrak d)$ is such an $S'$. (d) Suppose that $Y$ is weakly special in $\widetilde S_V$ with $W_V\subsetneq Y$ and $H_{W_V}$ normal in $H_Y$. For a special subvariety defined by $(H,X_H)$ of a quotient $\Gamma\backslash X$ with $\Gamma$ neat and the variation of a faithful representation, the algebraic monodromy group is $H^\der$ (proof of \cite[Cor.~6.2]{Urbanik}); so $H_{W_V}=H^\der$. Algebraic monodromy groups are semisimple (proof of \cite[Lemma~4.29]{Urbanik}), so $H_Y=H^\der H''$ with $H''$ the product of the other $\Q$-simple factors, which commutes with $H^\der$. As $H_Y$ is normal in $\mathrm{MT}(Y)\subset H'$, $H''\subset Z_{H'}(H^\der)$, which also centralizes $T\subset Z(H')$, hence centralizes $H=T\cdot H^\der$ and $h_x(\mathbb S)$ for $x\in X_H$. Being semisimple, $H''\subset\mathrm{Sp}(W,\psi)$; it fixes $h_x(i)$, so $H''(\R)$ preserves the positive definite form $\psi(\cdot,h_x(i)\cdot)$ and is compact. By \cite[Lemma~4.11]{Urbanik} an algebraic monodromy group has no $\Q$-simple factor with compact real points, so $H''=1$ and $H_Y=H_{W_V}$. Then $Y\supsetneq W_V$ has the algebraic monodromy group of the weakly special $W_V$, which contradicts the maximality in the definition. So $W_V$ is rigid. (e) $\widetilde S_V$ is smooth and $\nu^*\mathbb V$ is a polarizable integral variation, so \cite[Cor.~6.3]{Urbanik} applies, and $[W_V]$ is in the output by (d). The projection formula and (c) give $\deg_{\nu^*\mathcal O(1)}\overline W_V=\deg_{\mathcal O(1)}\overline V$. \end{proof} A special point $Q$ has $S_Q=\{Q\}$: $h_x$ factors through $T\subset Z(M)$, so $M(\R)h_x=\{h_x\}$. For the curve $\{x\}\times Y(1)\subset\mathcal A_2$ above, with $x$ a CM point with CM by $k$, $\mathcal E=k\times\Q$ and $M=H$, so $S_V=V$; the curve is its own container and is rigid there. \subsection{Degrees in Mumford's coordinates}\label{sec:theta-degree} Urbanik's degrees are taken for $\mathcal O(1)$ on the closure in $\PP(V_\Upsilon)$, ours for the Baily--Borel bundle. Theta constants have weight $1/2$ and no common zero on the boundary, so in dimension $r$ the two differ by the factor $(2(g+1))^r$. \begin{lemma}\label{lem:Theta} Let $g\ge2$, $\varphi\colon S\to\PP(V_\Upsilon)$ the theta-null immersion, $\Lb:=\Lb_{K_\Upsilon}$ and $N_\Upsilon:=d_\Upsilon^g$. Then $\varphi$ extends to a morphism $\bar\varphi\colon S^\BB\to\PP(V_\Upsilon)$ from the Baily--Borel compactification $S^\BB$ of $S$, with $\bar\varphi^*\mathcal O(1)^{\otimes8N_\Upsilon^4(g+1)}\cong\Lb^{\otimes4N_\Upsilon^4}$. For every closed irreducible $Y\subset S$ of dimension $r$, with closure $\overline Y$ in $\PP(V_\Upsilon)$, $\overline Y$ is the image of the closure of $Y$ in $S^\BB$, and \[ \deg_{\mathcal O(1)}\overline Y=\deg_{\Lb}Y/(2(g+1))^r\le\deg_{\Lb}Y. \] \end{lemma} \begin{proof} \emph{The theta constants.} Write $d:=d_\Upsilon$, $e(x):=\exp(2\pi ix)$ and, for $\tau\in\mathcal H_g$ and $a\in K(\Upsilon)$, $\Theta_a(\tau):=\sum_{m\in\Z^g,\,m\equiv a\bmod d}e(m^t\tau m/2d)$. Let $A_\tau:=\C^g/(\tau\Z^g+\Z^g)$, $L_0$ the line bundle with factor of automorphy $e(-\tfrac12n^t\tau n-n^tz)$ at $\tau n+m$, and $L_\tau:=L_0^{\otimes d}$, the totally symmetric sheaf with $\varphi_{L_\tau}=d\varphi_0$ \cite[p.~307]{MumfordI}. The functions $f_a(z):=\sum_ne(\tfrac d2(n+\tfrac ad)^t\tau(n+\tfrac ad)+d(n+\tfrac ad)^tz)$ form a basis of $H^0(A_\tau,L_\tau)$; translation by $m/d$ multiplies $f_a$ by $e(a^tm/d)$, and translation by $\tau k/d$, followed by multiplication by $e(k^tz+k^t\tau k/2d)$, takes $f_a$ to $f_{a+k}$. In Mumford's action these operators come from lifts over $-m/d$ and $-\tau k/d$, respectively, in $\mathcal G(L_\tau)$ \cite[pp.~289, 295]{MumfordI}, so $f_a\mapsto\delta_a$ is equivariant for a $\vartheta$-structure, and the theta-null point of $A_\tau$, $L_\tau$ and that structure is $[\Theta(\tau)]$ \cite[pp.~297--298]{MumfordI}. Any other $\vartheta$-structure differs from it by one of the finitely many automorphisms of $\mathcal G(\Upsilon)$ that fix $\C^*$, which changes the theta-null point by a fixed linear map \cite[Prop.~3, p.~295]{MumfordI}. The same definitions in genus $q\ge1$ give $A_{\tau'}$, $L_{\tau'}$ and $\Theta^{(q)}(\tau')$ for $\tau'\in\mathcal H_q$. Let $\pi\colon\mathcal H_g\to S$ be the uniformization. The maps $\tau\mapsto\varphi(\pi(\tau))$ and $\tau\mapsto[\Theta(M\tau)]$, $M\in\mathrm{Sp}_{2g}(\Z)$, are holomorphic, and as $(A_{M\tau},L_{M\tau})\cong(A_\tau,L_\tau)$, at each $\tau$ they take a value in a finite set $\{[\beta_1\Theta(\tau)],\dots,[\beta_s\Theta(\tau)]\}$ with $\beta_1,\dots,\beta_s\in\mathrm{GL}(V_\Upsilon\otimes\C)$ independent of $\tau$. For each of these maps, the sets where it agrees with $[\beta_i\Theta]$ are closed analytic and cover $\mathcal H_g$; by Baire's theorem one of them has interior, and by the identity theorem it is all of $\mathcal H_g$. This gives $\beta,\rho_M\in\mathrm{GL}(V_\Upsilon\otimes\C)$ with $\varphi(\pi(\tau))=[\beta\Theta(\tau)]$ and $[\Theta(M\tau)]=[\rho_M\Theta(\tau)]$ for all $\tau$. \emph{The cusps.} For $\mathrm{Sp}_{2g}$ the Baily--Borel compactification is Satake's \cite[\S I.2]{HulekSankaran}. Let $0\le qh^{\dim S'}c_{\deg}$, obtained from a rational upper bound for this product. For each output $Y$, keep it if $\nu(Y)\subset\overline Z$ (ideal membership; as $\nu(Y)\subset S'\subset N_0$ and $\overline Z\cap N_0=Z$, this is $\nu(Y)\subset Z$) and $Y$ is rigid (\cref{lem:Rprime}, with $\mathfrak h_Y$, $\mathfrak h_{\widetilde S}$ and $F^\bullet$ from \cref{prop:T3}), and put $\nu(Y)$ on the list. \item \emph{Maximality.} Delete every member of the list that is strictly contained in another member. \end{enumerate} \end{algorithm} \begin{theorem}\label{thm:listing} \begin{enumerate}[(a)] \item \Cref{alg:listing} terminates, and its output is exactly the set of special subvarieties of $S$ maximal among the special subvarieties contained in $Z$. \item Let $(G',X')\hookrightarrow(\mathrm{GSp}_{2g},\mathcal H_g^\pm)$ be a Shimura datum of Hodge type, $K_{G'}:=K_\Upsilon\cap G'(\Af)$, and suppose $Z$ lies in the image of $\Sh_{K_{G'}}(G',X')$ in $S$. Then the output of \cref{alg:listing} is exactly the set of special subvarieties of $\Sh_{K_{G'}}(G',X')$ (through their images) maximal in $Z$. \end{enumerate} \end{theorem} \begin{proof} (a) \emph{Every member put on the list is special and lies in $Z$.} An output $Y$ of step~(3) is weakly special and rigid, hence special by \cref{lem:Rprime}, which applies to $\nu^{-1}(S')$ by \cref{lem:P}(c). The map $\nu$ is induced by a morphism of Shimura data, so $\nu(Y)$ is special, and $\nu(Y)\subset Z$ is tested exactly. \emph{Every maximal $V$ is put on the list.} By \cref{lem:Oprime}(a),(d), applied with $N=2d_\Upsilon$ (as $K(2d_\Upsilon)\subset K_\Upsilon$, \cref{lem:Kdelta}) and $m_V\le\mathrm{lcm}(1,\dots,2g)$, with $\bar B_0$ in place of $\bar B$ in $A_1'$ (as in the last sentence of \cref{lem:Oprime}), the bound being increasing in $n_{\mathcal E}$ and $m_V$, the datum $\mathfrak d_V$ is enumerated in step~(1). By \cref{lem:P}(b), $S_V$ is a component of $\mathfrak E(\mathfrak d_V)$; it meets $Z$, and it lies in $N_0$, which is all of $M_\Upsilon\otimes\Qbar$ by \cref{lem:N0}(iii) and \cref{lem:Kdelta}(ii), so it is found in step~(2). By \cref{lem:P}(c), the part of the normalization of $\overline S_V$ over $S_V$ is $\widetilde S_V$, and by \cref{lem:P}(d) $W_V$ is rigid in it. By \cref{lem:P}(e), \cref{lem:V}(f) and \cref{lem:Theta}, \[ \deg_{\nu^*\mathcal O(h)}\overline W_V=h^{\dim V}\deg_{\mathcal O(1)}\overline V\le h^{\dim S_V}\deg_{\Lb_{K_\Upsilon}}V\le h^{\dim S_V}c_{\deg}, \] so $[W_V]$ is among the outputs of \cite[Cor.~6.3]{Urbanik}. Then $\nu(W_V)=V\subset Z$, and $W_V$ passes the rigidity test, because \cref{prop:T3} returns the true $\mathfrak h_{W_V}$ (\cref{lem:G}(c)). So $V$ is put on the list. \emph{Termination.} Step~(0) is \cref{lem:N0}(iv), step~(1) is finite by \cref{lem:Oprime}(d), and step~(2) is \cref{lem:PELcomp} with primary decomposition. The data of step~(1) are enumerated as follows. Fields: by Minkowski's second theorem a field $F$ of degree at most $2g$ has $\Q$-independent integers $v_k$ of house at most $d_F^{1/2}$; as $F$ has at most $s(2g)$ proper subfields, with $s(2g)$ the number of subgroups of the symmetric group $\mathfrak S_{2g}$, some $\theta=\sum_kc_kv_k$ with $0\le c_k\le s(2g)$ generates $F$, and the coefficients of its minimal polynomial are at most $\binom{2g}{j}(2g\,s(2g)D_1^{1/2})^j$. Orders: an order of index $b$ contains $\Z+b\mathcal O_{\mathcal E}$, as $\mathcal O_{\mathcal E}/R$ has exponent dividing $b$, so the orders of index at most $B_{\mathcal O}$ are among the finitely many subgroups between $\Z+b\mathcal O_{\mathcal E}$ and $\mathcal O_{\mathcal E}$, $b\le B_{\mathcal O}$; keep those that are rings stable under $*$. Types: finitely many for each $\mathcal E$. Step~(3) uses \cite[Algorithm~3]{GLS}, \cref{lem:V}, \cite[Thm.~2.4 and Cor.~6.3]{Urbanik}, whose output is finite, ideal membership, and \cref{lem:Rprime} with \cref{prop:T3}, which terminates. Step~(4) is finite. \emph{Step~(4).} A listed $V$ that is maximal in $Z$ is not strictly contained in another member, since members are special and lie in $Z$. A member that is not maximal lies in a maximal $V'\subset Z$, which is listed, so it is deleted. (b) Images of special subvarieties of $\Sh_{K_{G'}}(G',X')$ are special in $S$. Conversely, if $V\subset S$ is special and lies in the image, its generic Mumford--Tate group is conjugate into $G'$, since the Mumford--Tate groups of the points of $X'$ lie in $G'$, so $V$ is the image of a special subvariety of $\Sh_{K_{G'}}(G',X')$ \cite[Lemma~2.1]{UY}. So the two notions of maximal special subvariety of $Z$ agree, and (a) applies. \end{proof} For a special point $Q$, $S_Q=\{Q\}$, and step~(3) reduces to testing $Q\in Z$. \begin{remark}\label{rem:abelian} Let $(G'',X'')$ be of abelian type: there are a Shimura datum $(G',X')$ of Hodge type and a central isogeny $G'^\der\to G''^\der$ inducing $(G'^\ad,X'^\ad)\cong(G''^\ad,X''^\ad)$ (\cite[2.3.10]{Deligne79} constructs such data). For a neat $K''$, a connected component $\Gamma''\backslash X''^+$ of $\Sh_{K''}(G'',X'')_\C$ \cite[2.1.2]{Deligne79} then receives a finite étale morphism $\pi$ from a connected component of a Shimura variety for $(G',X')$, which for a small enough level is a closed subvariety of some $M_\Upsilon\otimes\C$ (as in \cite[Prop.~1.15]{Deligne71}). The special subvarieties maximal in a closed $Z\subset\Gamma''\backslash X''^+$ are exactly the images under $\pi$ of those maximal in $\pi^{-1}(Z)$. We know no model of $\Gamma''\backslash X''^+$ or of $\pi$ from the data defining it, so we state no algorithm for abelian type. \end{remark} \begin{proof}[Proof of \cref{thm:list}] Let $F$ be a number field over which $Z$ is defined, and $\overline Z$ the closure of $Z$ in $\PP(V_\Upsilon)\otimes\Qbar$. By \cref{lem:Theta} for $Z\otimes_{\Qbar}\C$, which is irreducible, $D:=\deg_{\Lb_{K_\Upsilon}}Z=(2(g+1))^{\dim Z}\deg_{\mathcal O(1)}\overline Z$; closures and degrees do not change from $\Qbar$ to $\C$. The homogeneous prime ideal of $\overline Z$ is the radical of the ideal generated by the given equations, computed by Gröbner bases, and $\deg_{\mathcal O(1)}\overline Z$ is $(\dim Z)!$ times the leading coefficient of its Hilbert polynomial. By \cref{lem:TR}, \cref{thm:AgK}(a) at $N=2d_\Upsilon$, evaluated at $(c_\Upsilon D,c_\Upsilon[F:\Q])$, gives $c_{\deg}$ with no hypothesis and $D_1$, $A_1$ under $\QRH(1/32;L_V)$, which holds for every $L_V$ (\cref{sec:QRH}); they are computable from $g$, $d_\Upsilon$, $D$ and $[F:\Q]$, as for $\mathcal A_g$ no representatives of components are needed (proof of \cref{thm:AgK}). With these numbers and $\bar B_0$ of \cref{sec:algorithm}, \cref{thm:listing}(a) gives the output. A special subvariety of a curve is a point or the curve, so if $Z$ is a curve that is not special, its maximal special subvarieties are its special points. \end{proof} \appendix \addtocontents{toc}{\protect\vspace{12pt plus 2pt}} \section{The smoothed explicit formula}\label{app:SP} \begin{proof}[Proof of \cref{lem:SP}] Write $-\zeta_L'/\zeta_L(s)=\sum_na(n)n^{-s}$, with $a(n)=\sum_{N\mathfrak p^k=n}\log N\mathfrak p$. As $L$ is Galois, $a(p)=n_L\log p$ if $p$ splits completely, $a(p)=0$ if $p$ is unramified and does not split completely, and $a(p^k)\le n_L\log p$ for every prime $p$ and every $k\ge1$ (indeed, with $e_p$ and $f_p$ the ramification index and the residue degree of $p$ in $L$, $a(p^k)=(n_L/e_p)\log p$ if $f_p\mid k$ and $0$ otherwise). In particular $a(n)\le n_L\log p$ when $n=p$ is a ramified prime and when $n=p^k$ with $k\ge2$, and $a(n)=0$ when $n$ is not a prime power. By the functional equation every nontrivial zero $\varrho$ of $\zeta_L$ satisfies $\delta\le\operatorname{Re}\varrho\le1-\delta$. \emph{Step 1 (a smoothed explicit formula).} Let $F(x):=\sum_{n\le x}a(n)(x-n)$. Then \[ F(x)=\frac1{2\pi i}\int_{(2)}\Bigl(-\frac{\zeta_L'}{\zeta_L}(s)\Bigr)\frac{x^{s+1}}{s(s+1)}\,ds . \] Let $x\ge2$. The kernel decays like $|s|^{-2}$, so the contour may be moved to the left and $F(x)$ is the absolutely convergent sum of the residues; the side integrals tend to $0$, by the bounds of Lagarias and Odlyzko for $\zeta_L'/\zeta_L$ \cite[Lemmas~5.4, 5.6 and~6.2]{LO}, along heights $T_k\to\infty$ chosen away from the zeros, which exist by \cite[Lemma~5.4]{LO}; the computation is carried out in the proof of \cite[Prop.~6]{DKN}, with decay exponent $1$; the left sides $\operatorname{Re}s=-j-\tfrac12$ avoid the additional pole of our kernel at $s=-1$. Let $o_0:=r_1+r_2-1$ and $o_1:=r_2$ be the orders of vanishing of $\zeta_L$ at $s=0$ and $s=-1$, and $o_m\in\{r_2,r_1+r_2\}$ its order at $s=-m$ for $m\ge2$. The residues are $x^2/2$ at $s=1$ and $-x^{\varrho+1}/(\varrho(\varrho+1))$ at each nontrivial zero $\varrho$, with multiplicity. At $s=0$ and $s=-1$ they are $-o_0x(\log x-1)+c_0x$ and $o_1(\log x+1)-c_1$, for some constants $c_0,c_1$ (both poles have order at most $2$). At $s=-m$, $m\ge2$, the residue is $-o_mx^{1-m}/(m(m-1))$. \emph{Step 2 (removing $c_0$ and $c_1$).} As $x\ge8$, Step 1 applies to $x$, $x/2$ and $x/4$. Let $G(x):=F(x)-3F(x/2)+2F(x/4)=\sum_na(n)b_x(n)$, where $b_x(n)=(x-n)_+-3(x/2-n)_+ +2(x/4-n)_+$. Then $b_x(n)=0$ for $n\le x/4$, $b_x(n)=2n-x/2$ on $(x/4,x/2]$ and $b_x(n)=x-n$ on $(x/2,x]$, so $0\le b_x\le x/2$. In the combination the terms $c_0x$ and $c_1$ cancel, $x(\log x-1)$ becomes $(x\log2)/2$, $\log x+1$ becomes $-\log2$, a zero $\varrho$ acquires the factor $(1-2^{-\varrho-1})(1-2^{-\varrho})$, and the trivial zero at $-m$ the factor $(2^{m-1}-1)(2^m-1)$. Hence \[ G(x)=\frac{3x^2}{16}-\sum_\varrho\frac{x^{\varrho+1}(1-2^{-\varrho-1})(1-2^{-\varrho})}{\varrho(\varrho+1)}-\frac{o_0\log2}{2}x-o_1\log2-R(x), \] with $R(x):=\sum_{m\ge2}o_m(2^{m-1}-1)(2^m-1)x^{1-m}/(m(m-1))\ge0$. For $x\ge8$, $R(x)\le2n_L\sum_{k\ge1}2^{-k}/(k(k+1))=2n_L(1-\log2)<0.614\,n_L$. \emph{Step 3 (the zeros).} For each $\varrho$, $|x^{\varrho+1}(1-2^{-\varrho-1})(1-2^{-\varrho})|\le w(\delta)x^{2-\delta}$. By the Cauchy--Schwarz inequality $|\varrho||\varrho+1|\ge\operatorname{Re}\varrho(1+\operatorname{Re}\varrho)+(\operatorname{Im}\varrho)^2$, and so, with $u:=\operatorname{Re}\varrho$ and $v:=(\operatorname{Im}\varrho)^2$, \[ \frac{|2-\varrho|^2}{(2-u)|\varrho||\varrho+1|}\le\frac{(2-u)^2+v}{(2-u)(u(1+u)+v)}\le\max\Bigl(\frac{2-u}{u(1+u)},\frac1{2-u}\Bigr)\le\kappa(\delta), \] because $(2-u)/(u(1+u))$ decreases on $[\delta,1]$ and $1/(2-u)\le1/(1+\delta)\le\kappa(\delta)$. Hence $\sum_\varrho|\varrho(\varrho+1)|^{-1}\le\kappa(\delta)\sum_\varrho\operatorname{Re}(2-\varrho)^{-1}$. \emph{Step 4 (Hadamard's product at $s=2$).} Stark's identity \cite[Lemma~1, (5)]{Stark}, applied to $\xi_L(s)=s(s-1)d_L^{s/2}\Gamma_\R(s)^{r_1}\Gamma_\C(s)^{r_2}\zeta_L(s)$, gives \[ \sum_\varrho\operatorname{Re}\frac1{2-\varrho}=\frac32+\frac12\log d_L+r_1\Bigl(-\frac{\log\pi}2+\frac{\Gamma'(1)}{2\Gamma(1)}\Bigr)+r_2\Bigl(-\log2\pi+\frac{\Gamma'(2)}{\Gamma(2)}\Bigr)+\frac{\zeta_L'}{\zeta_L}(2)\le A_L, \] since the coefficients of $r_1$ and $r_2$, $-(\gamma+\log\pi)/2$ and $1-\gamma-\log2\pi$ with $\gamma$ Euler's constant, are negative and $\zeta_L'/\zeta_L(2)<0$. With Steps 2 and 3, and $o_0\le n_L$, $o_1\le n_L/2$, \[ G(x)\ge\frac{3x^2}{16}-w(\delta)\kappa(\delta)A_Lx^{2-\delta}-0.347\,n_Lx-0.961\,n_L . \] \emph{Step 5 (counting).} Since $0\le b_x\le x/2$ and $b_x$ vanishes on $[1,x/4]$, \[ G(x)\le\frac{x}{2}\,n_L\Bigl(\vartheta_L(x)+\bigl(\psi(x)-\vartheta(x)\bigr)+\epsilon_L(x)\log\operatorname{rad}(d_L)\Bigr), \] where $\psi$ and $\vartheta$ are Chebyshev's functions, and $\psi(x)-\vartheta(x)<1.42620\sqrt x$ for $x>0$ \cite[Thm.~13, (3.36)]{RosserSchoenfeld}. Dividing the two bounds for $G(x)$ by $xn_L/2$ gives the lemma. \end{proof} \section{Fixers in Bruhat--Tits buildings}\label{app:KY816} \begin{proof}[Proof of \cref{lem:KY816}] For a maximal split torus $S$ of $H$, the group $Z_H(S)(\Q_l)$ acts on the apartment $\mathcal A(S)$ by translations through the homomorphism $\nu$ of \cite[1.2]{TitsCorvallis}, which vanishes on bounded elements; so the maximal compact subgroup of $S(\Q_l)$ fixes $\mathcal A(S)$ pointwise. Also $h\mathcal A(S)=\mathcal A(hSh^{-1})$ for $h\in H(\Q_l)$ \cite[2.1]{TitsCorvallis}, and fixers of points are compact open \cite[3.2 and 3.4.1]{TitsCorvallis}. (a) The assertion about fixed points is a case of the main theorem of Prasad and Yu \cite{PrasadYu}, applied to the conjugation action of $\Theta$, whose connected fixed group is $Z_H(T)$ by the hypothesis on weights. We give a direct proof. Let $y$ be fixed by $\Theta$. Choose a maximal split torus $S\supset T$ and $\lambda\in X_*(T)$ with $\langle\beta,\lambda\rangle\ne0$ for every nonzero weight $\beta$ of $T$ on $\Lie H$. By \cite[Thm.~4.1.7]{Conrad}, $P_H(\lambda)=Z_H(\lambda)\ltimes U_H(\lambda)$, where $U:=U_H(\lambda)$ is unipotent, $\Lie U$ is the sum of the weight spaces $(\Lie H)_\beta$ with $\langle\beta,\lambda\rangle>0$, and $\lambda(t)u\lambda(t)^{-1}\to1$ as $t\to0$ for $u\in U(\Q_l)$; and $Z_H(\lambda)=Z_H(T)=:L$, as $Z_H(T)\subset Z_H(\lambda)$ and both are connected with Lie algebra $(\Lie H)_0$, by the choice of $\lambda$. Let $D\subset X_*(S)\otimes\R$ be a vector chamber whose closure contains $\lambda$, and $U_D$ the group generated by the root groups $U_a(\Q_l)$ with $a$ positive on $D$ \cite[3.3]{TitsCorvallis}; $\lambda$ has weights $\ge0$ on their Lie algebras, so $U_D\subset P_H(\lambda)(\Q_l)=U(\Q_l)L(\Q_l)$. The Iwasawa decomposition $H(\Q_l)=U_D\,N_H(S)(\Q_l)\,P_{x}$, for $x\in\mathcal A(S)$ and $P_x$ its stabilizer \cite[Cor.~7.3.2(i)]{BT1}, which applies to $H(\Q_l)$ by \cite[Thm.~5.1.20]{BT2}, gives $\mathcal B(H)=U_D\cdot\mathcal A(S)$; so $y=uu_2\cdot x$ with $u\in U(\Q_l)$, $u_2\in L(\Q_l)$ and $x\in\mathcal A(S)$. The point $z:=u_2\cdot x$ lies in $\mathcal A(u_2Su_2^{-1})$ and $u_2Su_2^{-1}\supset T$, so $\Theta$ fixes $z$; it remains to show $u\cdot z=z$. The group $U_z:=U(\Q_l)\cap H(\Q_l)^z$ is compact open in $U(\Q_l)$ and normalized by $\Theta$. For $n$ large, $\lambda(l)^nu\lambda(l)^{-n}\in U_z$, so $u$ lies in the compact subgroup $\Gamma:=\lambda(l)^{-n}U_z\lambda(l)^n$, which $\Theta$ normalizes, as it commutes with $\lambda(l)$. Compact subgroups of $U(\Q_l)$ are pro-$l$, as $U$ has a composition series with quotients $\mathbb G_{\mathrm a}$. For $\theta\in\Theta$ put $c_\theta:=u^{-1}\theta u\theta^{-1}\in\Gamma$; as $\theta u\theta^{-1}\cdot z=\theta\cdot y=y=u\cdot z$, $c_\theta$ lies in the pro-$l$ group $\Delta:=\Gamma\cap U_z$, and $\theta\mapsto c_\theta$ is a $1$-cocycle of $\Theta$ in $\Delta$. As $|\Theta|$ is prime to $l$, it is a coboundary (by the Schur--Zassenhaus theorem on the finite quotients of $\Delta$ by its open normal $\Theta$-stable subgroups, and compactness): $c_\theta=u'^{-1}\theta u'\theta^{-1}$ for some $u'\in\Delta$ and all $\theta\in\Theta$. Then $v:=uu'^{-1}\in U(\Q_l)$ commutes with $\Theta$. The torus $T$ is split, so $\Theta=\mathrm{Hom}(X^*(T),\mu_{l-1})$, and $\Theta$ acts on each $(\Lie H)_\beta\subset\Lie U$ through $\beta|_\Theta\ne1$, as $\beta\notin(l-1)X^*(T)$; so $(\Lie U)^\Theta=0$, and since $\log\colon U\to\Lie U$ is a $T$-equivariant isomorphism, $v=1$. Hence $u=u'\in U_z$, and $y=u\cdot z=z\in\mathcal A(u_2Su_2^{-1})$. (b) Let $S$ be a maximal split torus whose apartment contains $C$, hence $y$; put $B:=H(\Q_l)^C\subset H(\Q_l)^y$, and let $\widetilde W$ be the group of affine transformations of $\mathcal A(S)$ induced by $N_H(S)(\Q_l)$ \cite[1.2]{TitsCorvallis}, and $q_w:=|BwB/B|$ for $w\in\widetilde W$ \cite[3.3.1]{TitsCorvallis}. By the Bruhat decomposition \cite[3.3.1]{TitsCorvallis}, $H(\Q_l)^y$ is the disjoint union of the $BwB$ with $w$ in the stabilizer $\widetilde W_y$ of $y$ in $\widetilde W$ (as $B\subset H(\Q_l)^y$, and $n\in N_H(S)(\Q_l)$ fixes $y$ if and only if its image in $\widetilde W$ does), so $[H(\Q_l)^y:B]=\sum_{w\in\widetilde W_y}q_w$. An element of $\widetilde W_y$ with trivial image in the finite Weyl group $W_0:=N_H(S)(\Q_l)/Z_H(S)(\Q_l)$ is a translation fixing $y$, hence trivial; so $|\widetilde W_y|\le|W_0|\le2^N$, where $N$ is the number of reflections of $W_0$ (a Weyl chamber is determined by its signs on the $N$ reflecting hyperplanes), and $2N\le d$, as $\Lie H$ contains the nonzero root spaces of $2N$ distinct roots $\pm a$, one pair for each reflecting hyperplane. For $w\in\widetilde W_y$ write $w=r_1\cdots r_j\omega$ with $\omega C=C$ and $r_1\cdots r_j$ reduced, as in \cite[3.3.1]{TitsCorvallis}, and let $v_i$ be the vertex of the local Dynkin diagram representing $r_i$, with the integer $d(v_i)$ of \cite[1.8]{TitsCorvallis}; then $q_w=l^{d(v_1)+\dots+d(v_j)}$, and $j$ is the number of walls separating $C$ from $wC$. Each of these walls contains $y$, which lies in the closures of $C$ and of $wC$, and distinct walls through $y$ have distinct directions, which are kernels of roots; so $j\le N$. Each $d(v_i)$ is the dimension of a homogeneous variety of the special fiber of a smooth model of $H$ \cite[3.5.4 and the paragraph after it]{TitsCorvallis}, so $d(v_i)\le d$. Hence $[H(\Q_l)^y:B]\le2^Nl^{Nd}\le l^{N(d+1)}\le l^{d(d+1)/2}$. (c) By \cite[3.2]{TitsCorvallis}, $K^1_l=P(\Q_l)^y$ for a point $y$. A nonzero weight of $T_V$ on $\Lie P\subset\mathfrak{gl}_{n_\rho}$ is $\chi-\chi'$ for weights $\chi,\chi'$ of $T_V$ in $\rho$, and does not lie in $(l-1)X^*(T_V)$: otherwise the group of components of $\ker(\chi-\chi')$, which is the stabilizer in $T_V$ of the line through $v_\chi+v_{\chi'}$ for weight vectors $v_\chi$, $v_{\chi'}$ \cite[proof of Lemma~4.4.1]{EY}, would have order divisible by $l-1$, over $\Qbar$ as over $\overline{\F}_l$, whereas these orders are at most $C_\Phi$ (\cref{sec:constants} and \cref{rem:converse}) and $l-1>2C_\Phi-1\ge C_\Phi$ by (2), as $c_U=1/(2C_\Phi)$ and $C_\Phi\ge1$. The torus $T_{V,\Q_l}$ is split, as $l$ splits completely in $L_V$, and its elements of order dividing $l-1$ lie in $K^m_{T_V,l}=K_{T_V,l}=T_V(\Q_l)\cap K_l\subset K_{P,l}\subset K^1_l$, by (2) and \cref{sec:special}; so they fix $y$, and (a), with $H=P_{\Q_l}$ and $T=T_{V,\Q_l}$, gives $S$. The maximal compact subgroup of $S(\Q_l)$ fixes the apartment of $S$, so it lies in $I^1_l$ and $I^2_l$; it contains that of $T_V(\Q_l)$, which also lies in $K_{P,l}$. As $y$ and $x_0$ lie in the closure of $C^1$, and $x_0$ in that of $C^2$, we have $I^1_l\subset K^1_l$ and $I^1_l,I^2_l\subset P(\Q_l)^{x_0}$; so (b), applied to $(y,C^1)$ and $(x_0,C^2)$ with $d=\dim P\le\dim G$, gives \[ [K_{P,l}:I_l]\le[K^1_l:I^1_l\cap I^2_l]\le[K^1_l:I^1_l]\,[P(\Q_l)^{x_0}:I^2_l]\le l^{d(d+1)}