A^{\vee}[\nu]\simeq R^{1}p_{*}\mu_{\nu}$, since the polarization has degree
prime to $\nu$. Then the Weil pairing gives $A[\nu]$ the structure of a
symplectically self-dual sheaf on $U$. Further, with notation as in 5.1.4,
$A[\nu]^{n}_{B}$ defines a sheaf on $\mathscr{U}^{n}_{B}$. An important
example of a Selmer sheaf for us will be
${\mathcal{S}e\ell}_{A[\nu]^{n}_{B}}=R^{1}\lambda_{*}\left(j_{*}A[\nu]^{n}_{B}\right)$.

######  Example 5.1.9.

A slightly more general setup than 5.1.8 is the following. Suppose we are in
the setting of 5.1.4, and $b\in B$ is a closed point. Suppose we are given
$\mathscr{F}$ a symplectically self-dual sheaf over $C$ so that the fiber
$\mathscr{F}_{b}$ over $U_{b}$ defines a sheaf which is of the form
$A_{b}[\nu]$ for $p:A\to U_{b}$ a polarized abelian scheme with polarization
degree prime to $\nu$. Then we obtain a Selmer sheaf $\mathscr{F}^{n}_{B}$
over $\mathscr{U}^{n}_{B}$ so that
$\mathscr{F}^{n}_{b}\simeq{\mathcal{S}e\ell}_{A[\nu]^{n}}$. The difference
between this and 5.1.8 is that we may not have any abelian scheme over $U$
restricting to $A$ over $U_{b}$.

######  Remark 5.1.10.

In fact, the 5.1.8 will be the setting we work in to prove our main result
Theorem 1.1.2 because it is relatively easy to lift symplectically self-dual
sheaves from the closed point of a DVR to the whole DVR, as we explain in
10.2.2, but we are unsure whether it is possible to lift abelian schemes in
our setting.

We conclude with some notation recording data associated to a quadratic twist,
which we will use throughout the paper.

######  Notation 5.1.11.

With notation as in 5.1.4, for $x\in\operatorname{QTwist}^{n}_{U/B}$ a point
or geometric point, let $y$ denote the image of $x$ under the map
$\operatorname{QTwist}^{n}_{U/B}\to\operatorname{Conf}^{n}_{U/B}$. We use
$C_{x}$ to denote the fiber of
$\xi:\mathscr{C}^{n}_{B}\to\operatorname{Conf}^{n}_{U/B}$ over $y$, $U_{x}$ to
denote the fiber of $\xi\circ j$ over $y$, and we use $\mathscr{F}_{x}$ to
denote the fiber of $\mathscr{F}^{n}_{B}$ over the point $x$.

In the case we are further in the setup of 5.1.8 or else we are in the setup
of 5.1.9 and $x\in\operatorname{QTwist}^{n}_{U_{b}/b}$. We use $A_{x}$ to
denote the fiber of the abelian scheme $t_{*}t^{*}h^{*}A/h^{*}A$ over $x$,
where $t^{*}$ and $h^{*}$ denote the pullback along $t$ and $h$, and $t_{*}$
denotes the Weil restriction along $t$. Note that $A_{x}$ is an abelian scheme
over $U_{x}$. We use $\mathscr{A}_{x}$ to denote the Néron model over $C_{x}$
of $A_{x}\to U_{x}$. We let $D_{x}\subset C_{x}-U_{x}$ denote the divisor
associated to $y$, the image of $x$ under the projection
$\operatorname{QTwist}^{n}_{U/B}\to\operatorname{Conf}^{n}_{U/B}$.

###  5.2. Basic properties of the Selmer stack

We next develop some basic properties of the Selmer stack. The next lemma
shows the Selmer sheaf commutes with base change. The proof is similar to
[FLR23, Lemma 2.6], though some additional technical difficulties come up
related to working over the space of quadratic twists, instead of the
universal family.

######  Lemma 5.2.1.

With notation as in 5.1.4. In particular, $\mathscr{F}$ is a tame
symplectically self-dual sheaf. Suppose $2\nu$ invertible on $B$. Then, the
sheaf ${\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}$ is locally constant
constructible and its formation commutes with base change on
$\operatorname{QTwist}^{n}_{U/B}$. Further, for
$\overline{\lambda}:=\lambda\circ j$, both
$R^{i}\overline{\lambda}_{*}\left(\mathscr{F}^{n}_{B}\right)$ and
$R^{i}\overline{\lambda}_{!}\left(\mathscr{F}^{n}_{B}\right)$ are locally
constant constructible for all $i\geq 0$ and their formation commutes with
base change on $\operatorname{QTwist}^{n}_{U/B}$.

###### Proof.

In order to prove the result, we first set some notation. We have a natural
map
$\phi:R^{1}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}\to{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}$
obtained from the map $j_{!}\mathscr{F}^{n}_{B}\to j_{*}\mathscr{F}^{n}_{B}$
and the identification
$R^{1}\overline{\lambda}_{!}(\mathscr{F}^{n}_{B})=R^{1}\lambda_{*}\left(j_{!}\mathscr{F}^{n}_{B}\right)$.
Similarly, we have a map $\psi:{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}\to
R^{1}\overline{\lambda}_{*}\mathscr{F}^{n}_{B}$ obtained from the composition
of functors spectral sequence for $\lambda\circ j$.

Our first goal is to show ${\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}$ is the
image of $\psi\circ\phi$. Note that $\psi$ is injective by the Leray spectral
sequence. Therefore, to show ${\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}$ is the
image of $\psi\circ\phi$, it only remains to show $\phi$ is surjective.
Because $\chi:j_{!}\mathscr{F}^{n}_{B}\to j_{*}\mathscr{F}^{n}_{B}$ is an
isomorphism over $\mathscr{U}^{n}_{B}$, $\operatorname{coker}\chi$ is
supported on $\mathscr{D}^{n}_{B}$, which is finite over
$\operatorname{Conf}^{n}_{U/B}$, we find
$R^{1}\lambda_{*}(\operatorname{coker}\chi)=0.$ This implies $\phi$ is
surjective and so ${\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}$ is a
constructible sheaf.

We conclude by showing $R^{1}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}$ and
$R^{1}\overline{\lambda}_{*}\left(\mathscr{F}^{n}_{B}\right)$ are both locally
constant constructible, and their formation commutes with base change. This
will imply $\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ is locally constant
constructible and its formation commutes with base change, as it is the image
of the map $R^{1}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}\to
R^{1}\overline{\lambda}_{*}\left(\mathscr{F}^{n}_{B}\right)$.

We first show $R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}$ is locally
constant constructible in the case that $\nu$ is prime. Note that its
formation commutes with base change by proper base change for any $\nu$. To
this end, we next verify $R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}$ is
locally constant constructible for all $i\geq 0$. Using [Lau81, Corollaire
2.1.2 and Remarque 2.1.3], we see it is enough to show the Swan conductor of
$\mathscr{F}^{n}_{B}$ is constant. As in [Lau81, Remarque 2.1.3], the Swan
conductor over a point $[D]\in\operatorname{Conf}^{n}_{U/B}$ is a sum of local
contributions, one for each geometric point of $D$ and one for each geometric
point of $Z$ over the image of $D$ in $B$. At each geometric point of $D$,
because we are taking a quadratic twist along $D$, the ramification index is
$2$, and hence the ramification is tame, since $2$ is invertible on $B$. We
are also assuming the ramification along points of $Z$ is tame for
$\mathscr{F}$. This is identified with the corresponding ramification for
$\mathscr{F}^{n}_{B}$ along points of $Z$, and hence this is tame as well.
Therefore, the Swan conductor vanishes identically.

Next, we show $R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}$ is locally
constant constructible for every positive integer $\nu$ as in the statement of
the lemma, using the case that $\nu$ is prime, as settled above. As an initial
step, we may reduce to the case $\nu=\ell^{t}$ is a prime power by observing
that if $\nu$ has prime factorization $\nu=\prod\ell^{t_{\ell}}$ then
$\mu_{\nu}\simeq\oplus\mu_{\ell}^{t_{\ell}}$. Now, suppose $\nu=\ell^{t}$ is a
prime power, and inductively assume we have proven
$R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}[\ell^{t-1}]$ is locally
constant constructible for all $i$. Since $\nu=\ell^{t}$, we have an exact
sequence

${0}$${\mathscr{F}^{n}_{B}[\ell^{t-1}]}$${\mathscr{F}^{n}_{B}}$${\mathscr{F}^{n}_{B}[\ell]}$${0.}$

Applying $R\overline{\lambda}_{!}$ to the above sequence, we get a long exact
sequence on cohomology

${R^{i-1}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}[\ell]}$${R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}[\ell^{t-1}]}$${R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}}$${R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}[\ell]}$${R^{i+1}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}[\ell^{t-1}].}$

Since all but the middle term are locally constant constructible by our
inductive assumption, it follows that
$R^{i}\overline{\lambda}_{!}(\mathscr{F}^{n}_{B}[\ell^{t}])$ is also locally
constant constructible by [Sta, Tag 093U].

We conclude by showing
$R^{1}\overline{\lambda}_{*}\left(\mathscr{F}^{n}_{B}\right)$ is locally
constant constructible and its formation commutes with base change. Since
$R^{i}\overline{\lambda}_{!}\mathscr{F}^{n}_{B}$ is locally constant
constructible, it follows from Poincaré duality [Ver67, Theorem 4.8] and the
isomorphism coming from the polarization of degree prime to $\nu$ that

$\displaystyle\mathscr{H}\kern-0.5ptom\left(R^{-i}\overline{\lambda}_{!}\left(\mathscr{F}^{n}_{B}\right),\mu_{\nu}\right)\xleftarrow{\simeq}R^{i+2}\overline{\lambda}_{*}R\mathscr{H}\kern-0.5ptom(\mathscr{F}^{n}_{B},\mu_{\nu})\simeq
R^{i+2}\overline{\lambda}_{*}(\mathscr{F}^{n}_{B}).$

Taking $i=-2+s$ gives
$(R^{2-s}\overline{\lambda}_{!}(\mathscr{F}^{n}_{B}))^{\vee}(1)\simeq
R^{s}\overline{\lambda}_{*}\left(\mathscr{F}^{n}_{B}\right)$. Since we have
seen $(R^{2-s}\overline{\lambda}_{!}(\mathscr{F}^{n}_{B}))^{\vee}$ is locally
constant constructible and its formation commutes with base change, the same
holds for $R^{s}\overline{\lambda}_{*}\left(\mathscr{F}^{n}_{B}\right)$. ∎

######  Notation 5.2.2.

Let $k$ be a field and let $C$ be a smooth proper geometrically connected
curve over $k$ of genus $g$, with $U\subset C$ an open subscheme. Let
$A^{\prime}$ an abelian scheme over $U^{\prime}$ with Néron model
$\mathscr{A}^{\prime}\to C$. Let
$\Phi_{A^{\prime}}:=\left(\mathscr{A}^{\prime}/\mathscr{A}^{\prime
0}\right)(k)$ denote the component group of the Néron model of $A^{\prime}$.
We use
$\Phi_{A^{\prime}_{\overline{k}}}=\left(\mathscr{A}^{\prime}_{\overline{k}}/\mathscr{A}^{\prime
0}_{\overline{k}}\right)(\overline{k})\left(\mathscr{A}^{\prime}/\mathscr{A}^{\prime
0}\right)(\overline{k})$ to denote the geometric component group.

The following proof is quite similar to [Lan21, Lemma 3.21]. We thank Tony
Feng for suggesting the idea that appeared there for bootstrap from the prime
case to the general case, which we reuse here. In the next lemma, note that
since we are working over an algebraically closed field, the component group
is the same as the geometric component group.

######  Lemma 5.2.3.

Let $k$ be an algebraically closed field, let $C$ be a smooth proper
geometrically connected curve over $k$ of genus $g$. Let
$\mathscr{F}^{\prime}$ be a symplectically self-dual sheaf on an open
$j:U^{\prime}\subset C$. Suppose that

  1. (1)

for each prime $\ell\mid\nu$, $\ell^{w}\mid\nu$, and $t\leq w$, the
multiplication by $\ell^{t}$ map $j_{*}\mathscr{F}^{\prime}[\ell^{w}]\to
j_{*}\mathscr{F}^{\prime}[\ell^{w-t}]$ is surjective.

  2. (2)

$j_{*}\mathscr{F}^{\prime}(C)=0$.

Then $H^{1}(C,j_{*}\mathscr{F}^{\prime}[\nu])$ is a free
$\mathbb{Z}/\nu\mathbb{Z}$ module. In the case $j_{*}\mathscr{F}^{\prime}$ is
of the form of $A^{\prime}[\nu]$, for $A^{\prime}\to U^{\prime}$ an abelian
scheme, hypothesis $(1)$ above is satisfied if the geometric component group
$\Phi_{A^{\prime}}$ has order prime to $\nu$.

###### Proof.

Using the Chinese remainder theorem, we can reduce to the case that
$\nu=\ell^{w}$ is a prime power. Suppose
$H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell])\simeq(\mathbb{Z}/\ell\mathbb{Z})^{r}.$
We will show by induction on $w$ that
$H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])\simeq(\mathbb{Z}/\ell^{w}\mathbb{Z})^{r}.$

For $0\leq t\leq w$ we claim there is an exact sequence

(5.1)
${0}$${j_{*}\mathscr{F}^{\prime}[\ell^{t}]}$${j_{*}\mathscr{F}^{\prime}[\ell^{w}]}$${j_{*}\mathscr{F}^{\prime}[\ell^{w-t}]}$${0.}$

This is left exact because the analogous sequence for $\mathscr{F}^{\prime}$
in place of $j_{*}\mathscr{F}^{\prime}$ is left exact. This sequence is right
exact by assumption (1) from the statement of the lemma.

We now prove the final clause of the statement of the lemma: In the case
$\mathscr{F}^{\prime}\simeq A^{\prime}[\nu]$, the cokernel of the map
$j_{*}\mathscr{F}^{\prime}[\ell^{w}]\to j_{*}\mathscr{F}^{\prime}[\ell^{w-t}]$
is identified with $\Phi_{A^{\prime}}/\ell^{t}\Phi_{A^{\prime}}$. This is
trivial by assumption as $\ell^{t}\mid\nu$. Therefore, in this case, $(1)$
holds.

We next claim
$H^{0}(C,j_{*}\mathscr{F}^{\prime}[\ell^{t}])=H^{2}(C,j_{*}\mathscr{F}^{\prime}[\ell^{t}])=0$.
The former holds by assumption $(2)$. By [Mil80, V Proposition 2.2(b)] and the
polarization
$(\mathscr{F}^{\prime}[\ell^{t}])^{\vee}(1)\simeq\mathscr{F}^{\prime}[\ell^{t}]$,
we find

$\displaystyle H^{2}(C,j_{*}\mathscr{F}^{\prime}[\ell^{t}])\simeq
H^{0}\left(C,j_{*}\left(\left(\mathscr{F}^{\prime}[\ell^{t}]\right)^{\vee}(1)\right)\right)^{\vee}\simeq
H^{0}(C,j_{*}\mathscr{F}^{\prime}[\ell^{t}])^{\vee}\simeq
H^{0}(C,\mathscr{F}^{\prime}[\ell^{t}])^{\vee}=0.$

The long exact sequence associated to (5.1) and the vanishing of the $0$th and
$2$nd cohomology above implies we obtain an exact sequence

(5.2)
${0}$${H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{t}])}$${H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])}$${H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w-t}])}$${0.}$$\scriptstyle{\alpha^{t}}$$\scriptstyle{\beta^{t}}$

Induction on $w$ implies
$\\#H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])=\ell^{wr}$ and we wish to
show $H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])$ is free of rank $r$. By
the structure theorem for finite abelian groups, it suffices to show the
kernel of multiplication by $\ell^{w-1}$ on
$H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])$ has order $\ell^{(w-1)r}$. The
multiplication by $\ell^{w-1}$ map factors as
$H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])\xrightarrow{\beta^{w-1}}H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell])\xrightarrow{\alpha^{1}}H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w}])$.
We know from (5.1) that $\alpha^{1}$ is injective so

$\displaystyle\ker(\times\ell^{w-1})=\ker(\beta^{w-1}\circ\alpha^{1})=\ker\beta^{w-1}=H^{1}(C,j_{*}\mathscr{F}^{\prime}[\ell^{w-1}]),$

which has size $\ell^{(w-1)r}$, as we wished to show. ∎

We next aim to compute a formula for the rank of the Selmer sheaf, in
favorable situations, in 5.2.6. First, we introduce notation needed to state
that formula.

######  Definition 5.2.4.

Suppose $\nu$ is a prime number. Given a locally constant constructible sheaf
$\mathscr{F}$ of free $\mathbb{Z}/\nu\mathbb{Z}$ modules on an open
$U^{\prime}\subset C$ of a curve $C$, for any point $x\in C-U^{\prime}$, there
is an associated action of the inertia group $I_{x}$ at $x$ on the geometric
generic fiber of $\mathscr{F}_{\overline{\eta}}$, which is well defined up to
conjugacy. We use $\mathrm{Drop}_{x}(\mathscr{F})$ to denote the corank of the
invariants of $I_{x}$, i.e.,
$\mathrm{Drop}_{x}(\mathscr{F}):=\operatorname{rk}\mathscr{F}-\operatorname{rk}\mathscr{F}_{x}^{I_{x}}$.
In general, if $\nu$ is not necessarily a prime number, for each prime
$\ell\mid\nu$ we use
$\mathrm{Drop}_{x,\ell}(\mathscr{F}):=\mathrm{Drop}_{x}(\mathscr{F}[\ell])$,
and if $\mathrm{Drop}_{x,\ell}(\mathscr{F})$ is independent of $\ell$, we
denote this common value simply by $\mathrm{Drop}_{x}(\mathscr{F})$. Whenever
we use the notation $\mathrm{Drop}_{x}(\mathscr{F})$ in the case $\nu$ has
multiple prime divisors, we are implicitly claiming it is independent of the
prime divisor.

######  Example 5.2.5.

If $\nu$ is prime, and $\mathscr{F}\simeq A[\nu]$, then for any $x\in C-U$,
$\mathrm{Drop}_{x}(\mathscr{F})=0$ if and only if inertia acts trivially at
$x$, i.e., $A[\nu]$ extends over the point $x$. If $A$ is a relative elliptic
curve and the order of the geometric component group of the Néron model of $A$
at $x$ is prime to $\nu$, then $\mathrm{Drop}_{x}(\mathscr{F})=1$ whenever $A$
has multiplicative reduction at $x$ and $\mathrm{Drop}_{x}(\mathscr{F})=2$
whenever $A$ has additive reduction at $x$.

######  Proposition 5.2.6.

Maintain notation as in 5.1.4, so, in particular, $\mathscr{F}$ is a tame
symplectically self-dual sheaf. Suppose $\nu$ is odd and $n>0$. Let
${\overline{b}}$ be a geometric point of $B$. Assume that

  1. (1)

for each prime $\ell\mid\nu$, $\ell^{w}\mid\nu$, and $t\leq w$, the
multiplication by $\ell^{t}$ map $j_{*}\mathscr{F}_{\overline{b}}[\ell^{w}]\to
j_{*}\mathscr{F}_{\overline{b}}[\ell^{w-t}]$ is surjective

  2. (3)

the sheaf $\mathscr{F}[\ell]$ is irreducible for each prime $\ell\mid p$.

Assume $2\nu$ is invertible on $B$. For each
$x\in\operatorname{QTwist}^{n}_{U/B}$, consider the following three
properties.

  1. (1’)

for each prime $\ell\mid\nu$, $\ell^{w}\mid\nu$, and $t\leq w$, the
multiplication by $\ell^{t}$ map $j_{*}\mathscr{F}_{x}[\ell^{w}]\to
j_{*}\mathscr{F}_{x}[\ell^{w-t}]$ is surjective

  2. (2’)

$j_{*}\mathscr{F}_{x}(C_{x})=0$

  3. (3’)

the sheaf $\mathscr{F}_{x}[\ell]$ is irreducible for each prime $\ell\mid\nu$.

Then, $(2^{\prime})$ always holds, $(1^{\prime})$ holds if $(1)$ holds, and
$(3^{\prime})$ holds if $(3)$ holds.

Moreover, assuming $(1)$ and $(3)$, the map
$\pi:\operatorname{Sel}_{\mathscr{F}^{n}_{B}}\to\operatorname{QTwist}^{n}_{U/B}$
is finite étale, representing a locally construct constructible sheaf of rank
$(2g-2+n)\cdot 2r+\sum_{x\in Z({\overline{b}})}\mathrm{Drop}_{x}(\mathscr{F})$
free $\mathbb{Z}/\nu\mathbb{Z}$ modules, whose formation commutes with base
change.

###### Proof.

First, observe that by 5.2.1,
$\pi:\operatorname{Sel}_{\mathscr{F}^{n}_{B}}\to\operatorname{QTwist}^{n}_{U/B}$
is finite étale, corresponding to a locally constant sheaf of
$\mathbb{Z}/\nu\mathbb{Z}$ modules, and its formation commutes with base
change on $\operatorname{QTwist}^{n}_{U/B}$.

We now verify that condition $(1^{\prime})$ hold for quadratic twists
$\mathscr{F}_{x}$ of $\mathscr{F}_{\overline{b}}$, ramified over a divisor
$D_{x}$ disjoint from $Z_{x}$, using condition $(1)$. If
$\mathscr{F}_{\overline{b}}$ corresponds to a representation of
$\pi_{1}(U_{x}-D_{x})$, the quadratic twist corresponds to tensoring this
representation with an order $2$ character, whose local inertia at any point
outside of $D_{x}$ is trivial. Surjectivity of the map from $(1^{\prime})$ can
only fail at points $p\in D_{x}\cup Z_{x}$. If $p\in Z_{x}$, since
surjectivity can be verified locally, surjectivity for $j_{*}\mathscr{F}_{x}$
at $p$ follows from the corresponding surjectivity for
$j_{*}\mathscr{F}_{\overline{b}}$ at $p$. If $p\in D_{x}$, the stalk of
$j_{*}\mathscr{F}_{x}[\ell^{w-t}]$ is trivial, as it is identified with the
invariants of multiplication by $-1$, which is trivial, and so surjectivity at
such points is automatic.

Next, we check $(2^{\prime})$ holds, just using $n>0$. We wish to show
$H^{0}(C_{x},\mathscr{F}_{x})=0$. Thinking of $\mathscr{F}_{x}$ as a
representation of $\pi_{1}(U_{x}-D_{x})$, a section corresponds to an
invariant vector. However, since $n>0$, local inertia at a point of $D_{x}$
acts by $-1$, and so there are no invariant vectors.

Third, we show $(3^{\prime})$ holds for $\mathscr{F}_{x}$, assuming $(3)$
holds for $\mathscr{F}_{\overline{b}}$. Note that the quadratic twist of the
sheaf $\mathscr{F}_{\overline{b}}$ is obtained by tensoring the corresponding
representation of $\pi_{1}(U_{\overline{b}})$ with a character. This preserves
irreducibility.

We next show this $\pi$ corresponds to a sheaf of free
$\mathbb{Z}/\nu\mathbb{Z}$ modules. We may check this at any point of
$\operatorname{QTwist}^{n}_{U/B}$ since the formation of
$\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ commutes with base change on
$\operatorname{QTwist}^{n}_{U/B}$ by 5.2.1. It follows that over a geometric
point of $\operatorname{QTwist}^{n}_{U/B}$, the hypotheses $(1)$ and $(2)$ of
5.2.3, which follow from $(1^{\prime})$ and $(2^{\prime})$ in the statement of
this proposition, are satisfied for any quadratic twist of $\mathscr{F}$.
Therefore, $\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ corresponds to a sheaf
of free $\mathbb{Z}/\nu\mathbb{Z}$ modules by 5.2.3.

Finally, we compute the rank of this sheaf. Since we have shown $\mathscr{F}$
is an irreducible $\mathbb{Z}/\nu\mathbb{Z}$ locally constant constructible
sheaf on $\mathscr{U}^{n}_{B}$, we can compute the formula for its rank after
reduction modulo any prime $\ell\mid\nu$, and hence assume that $\nu$ is
prime.

The formula for the rank is given in [Kat02, Lemma 5.1.3]. Technically, the
argument is given there for lisse $\overline{\mathbb{Q}}_{\ell}$ sheaves, but
the same computation applies to $\mathbb{Z}/\ell\mathbb{Z}$ sheaves. In
particular, with the above assumptions, if $B=\operatorname{Spec}k$, for $k$
an algebraically closed field, ${\mathcal{S}e\ell}_{\mathscr{F}^{n}_{B}}$ has
rank $(2g-2+n)\cdot 2r+\sum_{x\in Z}\mathrm{Drop}_{x}(\mathscr{F})$. ∎

###  5.3. Connecting points of the Selmer stack and Selmer groups

The next two lemmas connect the Selmer stack to the sizes of Selmer groups and
their proofs are quite similar to [Lan21, Proposition 3.23] and [Lan21,
Corollary 3.24] respectively.

######  Lemma 5.3.1.

Retaining notation from 5.1.4 and 5.1.11, suppose $n>0$, $2\nu$ is invertible
on $B$, and let
$\pi:\operatorname{Sel}_{\mathscr{F}^{n}_{B}}\to\operatorname{QTwist}^{n}_{U/B}$
denote the structure map. Suppose $\mathscr{F}[\ell]$ is irreducible for each
prime $\ell\mid\nu$. Then for
$x\in\operatorname{QTwist}^{n}_{U/B}(\mathbb{F}_{q})$,

$\displaystyle
H^{1}(C_{x},\mathscr{F}_{x})\simeq\left(\pi^{-1}(x)\right)(\mathbb{F}_{q}).$

Note that the right hand $\left(\pi^{-1}(x)\right)(\mathbb{F}_{q})$ acquires
the structure of an abelian group as the points of a locally constant
constructible sheaf.

###### Proof.

Using 5.2.1, we know the formation of the Selmer sheaf commutes with base
change, and hence for $\overline{x}$ a geometric point over $x$, the geometric
fiber of $\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ over $\overline{x}$ is
identified with

$\displaystyle R^{1}\lambda_{*}(j_{*}\mathscr{F}_{\overline{x}})$
$\displaystyle\simeq H^{1}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}}).$

To distinguish between étale and group cohomology, we use
$H^{i}_{\operatorname{grp}}$ denote group cohomology and
$H^{i}_{\operatorname{\acute{e}t}}$ to denote étale cohomology. Let
$G_{x}:=\operatorname{Aut}(C_{\overline{x}}/C_{x})$. The $\mathbb{F}_{q}$
points of $\pi^{-1}(x)$ are the $G_{x}$ invariants of
$H^{1}_{\operatorname{\acute{e}t}}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}})$.
That is,
$\pi^{-1}(x)(\mathbb{F}_{q})=H_{\operatorname{grp}}^{0}(G_{x},H^{1}_{\operatorname{\acute{e}t}}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}}))$.

We relate this group to $H^{1}(C_{x},j_{*}\mathscr{F}_{x})$ using the Leray
spectral sequence

(5.3)
${0}$${H^{1}_{\operatorname{grp}}(G_{x},H^{0}_{\operatorname{\acute{e}t}}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}}))}$${H^{1}_{\operatorname{\acute{e}t}}(C_{x},j_{*}\mathscr{F}_{x})}$${H^{0}_{\operatorname{grp}}(G_{x},H^{1}_{\operatorname{\acute{e}t}}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}}))}$${H^{2}_{\operatorname{grp}}(G_{x},H^{0}_{\operatorname{\acute{e}t}}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}})).}$$\scriptstyle{\theta}$

When $n>0$, we want to show $\theta$ is an isomorphism, so it suffices to show
$H^{0}_{\operatorname{\acute{e}t}}(C_{\overline{x}},j_{*}\mathscr{F}_{\overline{x}})=0$.
This holds using 5.2.6(3’). ∎

######  Lemma 5.3.2.

With the same assumptions as in 5.3.1, let
$x\in\operatorname{QTwist}^{n}_{C/B}(\mathbb{F}_{q})$, and use
$\operatorname{Sel}_{\nu}(A_{x})$ to denote the $\nu$ Selmer group of the
generic fiber of $A_{x}$ over $U_{x}$. We have

$\displaystyle\operatorname{Sel}_{\nu}(A_{x})\simeq\pi^{-1}(x)(\mathbb{F}_{q}).$

###### Proof.

Using 5.2.1, we know the geometric component group $\Phi_{A_{\overline{x}}}$
has order prime to $\nu$. As we are also assuming $q$ is prime to $\nu$, it
follows from [Ces16, Proposition 5.4(c)],
$\operatorname{Sel}_{\nu}(A_{x})\simeq
H^{1}_{\operatorname{fppf}}(C_{x},\mathscr{A}_{x}[\nu])$. Upon identifying
fppf cohomology with étale cohomology [Gro68, Théorème 11.7 $1^{\circ}$] and
combining this with 5.3.1, we obtain the result. ∎

##  6\. Identifying Selmer elements via Hurwitz stacks

Throughout this section, we’ll work over the complex numbers
$B=\operatorname{Spec}\mathbb{C}$. One of the main new ideas in this article
is that Selmer elements can actually be parameterized by a Hurwitz stack. The
reason for doing this is that the topological methods of the first part of the
paper can, as in [EVW16], be used to control the number of
$\mathbb{F}_{q}$-points on certain Hurwitz stacks. Using the identification
between Selmer stacks and Hurwitz stacks, we will thus be able to count
$\mathbb{F}_{q}$-points on Selmer stacks. These counts underlie our main
theorems.

We produce an isomorphism from the Selmer stack and a certain Hurwitz stack
over the complex numbers parameterizing
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ covers of our
base curve $C$ over $\mathbb{C}$. This is shown in 6.4.5. Before jumping into
the details, we describe the idea of this isomorphism in § 6.1. Continuing to
the proof, we give a monodromy theoretic description of torsion sheaves in §
6.2, and give a monodromy theoretic description of torsors for torsion sheaves
in § 6.3. Finally, we identify the Selmer stack to certain Hurwitz stacks in §
6.4.

###  6.1. Idea of the isomorphism

We will now describe the idea of the proof in the context of torsion in
abelian varieties, though below the proof is carried out in the more general
context of symplectically self-dual sheaves. The basic idea is that $\nu$
Selmer elements for an abelian variety $A^{\prime}$ over $U^{\prime}$ of
relative dimension $r$ with Néron model $j_{*}A^{\prime}$ over $C$ correspond
to torsors for $j_{*}A^{\prime}[\nu]$. We can identify $j_{*}A^{\prime}[\nu]$
with a $\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ Galois cover of $C$
via its Galois representation. We can then identify torsors for
$j_{*}A^{\prime}[\nu]$ as
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ covers of $C$,
see 6.3.2. This roughly corresponds to the fact that a torsor for
$j_{*}A^{\prime}[\nu]$ can translate the monodromy of $j_{*}A^{\prime}[\nu]$
by an element of a geometric fiber of $j_{*}A^{\prime}[\nu]$, which can be
identified with
$(\mathbb{Z}/\nu\mathbb{Z})^{2r}=\ker\left(\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\to\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\right)$.
The bulk of this section amounts to working out the precise conditions on the
monodromy of these Hurwitz stacks.

###  6.2. Symplectically self-dual sheaves in terms of monodromy

Recall that throughout this section, we are working over
$B=\operatorname{Spec}\mathbb{C}$. As in 2.4.1, we begin with a smooth
projective connected $C$ curve over $\operatorname{Spec}\mathbb{C}$, and a
nonempty open subscheme $U\subset C$. For $D\subset U$ a divisor, we work with
a sympletically self-dual sheaf $\mathscr{F}^{\prime}$ over $U-D$ of rank
$2r$. A useful example to keep in mind will be when we are in the setting of
5.1.9 and there is an abelian scheme $A^{\prime}\to U-D$ and
$\mathscr{F}=A^{\prime}[\nu]$. The main application will occur when
$\mathscr{F}^{\prime}$ is a quadratic twist of a sheaf $\mathscr{F}$, ramified
over $D$.

We now describe $\mathscr{F}^{\prime}$ in terms of its monodromy. Fix a
basepoint $p\in U-D$ and choose an identification
$\mathscr{F}^{\prime}[\nu]|_{p}\simeq\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}$.
Because the fundamental group $\pi_{1}^{\mathrm{top}}(U-D,p)$ acts linearly on
$\mathscr{F}^{\prime}|_{p}$, we obtain a map
$\pi_{1}^{\mathrm{top}}(U-D,p)\rightarrow\operatorname{GL}(\mathscr{F}^{\prime}|_{p})$.
Because the sheaf is symplectically self-dual, and we are working over
$\mathbb{C}$ where the cyclotomic character acts trivially, this
representation factors through $\operatorname{Sp}(\mathscr{F}^{\prime}|_{p})$.
In other words, we obtain a monodromy representation

(6.1) $\displaystyle\rho_{\mathscr{F}^{\prime}}$
$\displaystyle:\pi_{1}^{\mathrm{top}}(U-D,p)\rightarrow\operatorname{Sp}(\mathscr{F}^{\prime}|_{p})\simeq\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z}).$

For convenience of notation, label the points of $Z$ by
$s_{1},\ldots,s_{f+1}$. As in Figure 5, we can draw oriented loops
$\alpha_{1},\ldots,\alpha_{g},\beta_{1},\ldots,\beta_{g},\gamma_{1},\ldots,\gamma_{n},\delta_{1},\ldots,\delta_{f+1}$
based at $p$ which pairwise intersect only at $p$ so that

  1. (1)

$\alpha_{1},\ldots,\alpha_{g},\beta_{1},\ldots,\beta_{g}$ forms a basis for
$H_{1}(C,\mathbb{Z})$,

  2. (2)

$\gamma_{i}$ is a loop winding once around $p_{i}$ corresponding to the local
inertia at $p_{i}$, where $p_{1},\ldots,p_{n}$ are the $n$ points in $D$, and

  3. (3)

$\delta_{i}$ is a loop winding once around $s_{i}$ corresponding to the local
inertia at $s_{i}$.

The above loops form generators of $\pi_{1}^{\mathrm{top}}(U-D,p)$ and satisfy
the single relation

$\displaystyle(\alpha_{1}\beta_{1}\alpha_{1}^{-1}\beta_{1}^{-1})\cdots(\alpha_{g}\beta_{g}\alpha_{g}^{-1}\beta_{g}^{-1})\gamma_{1}\cdots\gamma_{n}\delta_{1}\cdots\delta_{f+1}=\operatorname{\mathrm{id}}.$

Since $\mathscr{F}^{\prime}$ is a $\mathbb{Z}/\nu\mathbb{Z}$ local system on
$U-D$, the monodromy representation $\rho^{\mathscr{F}^{\prime}}$ determines
$\mathscr{F}^{\prime}$.

Figure 5. This picture depicts a genus $2$ surface $X$ with $3$ punctures and
a $2$-point configuration. That is it corresponds to a point in
$\operatorname{Conf}^{2}_{X}$. It includes the moving points $p_{1},p_{2}$,
surrounded by loops $\gamma_{1}$ and $\gamma_{2}$, the fixed punctures
$s_{1},s_{2},s_{3}$ surrounded by loops $\delta_{1},\delta_{2}$, and
$\delta_{2}$. It also includes the standard generators for homology of the
compact surface $\sigma_{1},\frac{\alpha_{1}}{\alpha_{2}}$.

###  6.3. Torsors for symplectically self-dual sheaves in terms of monodromy

We next set out to give a monodromy theoretic description of torsors in terms
of monodromy. The main result we are aiming toward is 6.3.7, which gives a
monodromy theoretic description of $j_{*}\mathscr{F}^{\prime}$ torsors.

We retain notation from § 6.2. For $D\subset U$ a divisor, we use $j:U-D\to C$
to denote the inclusion. As a first observation, we show that any torsor for
$j_{*}\mathscr{F}^{\prime}$ over $C$ is determined by its restriction to
$U-D$.

######  Lemma 6.3.1.

The restriction map $H^{1}(C,j_{*}\mathscr{F}^{\prime})\to
H^{1}(U-D,\mathscr{F}^{\prime})$ is injective. Its image consists of those
torsors $[\mathscr{S}]\in H^{1}(U-D,\mathscr{F}^{\prime})$ such that for each
$q\in D\cup Z$, there is some sufficiently small complex analytic open
neighborhood $C\supset W\ni q$ such that $\mathscr{S}|_{W-q}$ is the
restriction of a $j_{*}\mathscr{F}^{\prime}|_{W}$ torsor to $W-q$.

###### Proof.

In the étale topology, the spectral sequence associated to the composition
$U-D\to C\to\operatorname{Spec}\mathbb{C}$ yields the injection
$H^{1}(C,j_{*}\mathscr{F}^{\prime})\hookrightarrow
H^{1}(U-D,\mathscr{F}^{\prime})$. Using the comparison between étale and
complex analytic sheaf cohomology [SGA72, Exposé XI, Théoréme 4.4(iii)] we may
describe elements of $H^{1}(U-D,\mathscr{F}^{\prime})$ as torsors in the
complex analytic topology for $\mathscr{F}^{\prime}$. The condition that a
torsor $[\mathscr{S}]\in H^{1}(U-D,\mathscr{F}^{\prime})$ lies in the image of
$H^{1}(C,j_{*}\mathscr{F}^{\prime})\to H^{1}(U-D,\mathscr{F}^{\prime})$ is
precisely the condition that it extends to an $j_{*}\mathscr{F}^{\prime}$
torsor over a sufficiently small neighborhood of each point $q\in D\cup Z$. ∎

Recall our goal is to give a monodromy theoretic description of
$j_{*}\mathscr{F}^{\prime}$ torsors. Using 6.3.1, we can describe
$j_{*}\mathscr{F}^{\prime}$ torsors as $\mathscr{F}^{\prime}$ torsors which
extend over a small neighborhood of each $p_{i}$. We next describe
$\mathscr{F}^{\prime}$ torsors, and then, in 6.3.6, give the condition that
such a torsor extends over $D$. First, we introduce notation used to describe
the monodromy representation parameterizing $\mathscr{F}^{\prime}$ torsors.

######  Definition 6.3.2.

The affine symplectic group is
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z}):=\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}\rtimes\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z}),$
where the action of $\mathrm{Sp}_{2}(\mathbb{Z}/\nu\mathbb{Z})$ on
$\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}$ is via the standard action of
matrices on their underlying free rank $\mathbb{Z}/\nu\mathbb{Z}$ module of
rank $2r$.

######  Remark 6.3.3.

By definition, $\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$
sits in an exact sequence

(6.2)
${0}$${\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}}$${\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})}$${\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})}$${0}$$\scriptstyle{\iota}$$\scriptstyle{\Pi}$

with inclusion map $\iota$ and quotient map $\Pi$. With this presentation,
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ can be explicitly
described as those matrices of the form

(6.3)
$\displaystyle\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\simeq\left\\{\begin{pmatrix}M&v\\\
0&1\end{pmatrix}\in\operatorname{GL}_{2r+1}(\mathbb{Z}/\nu\mathbb{Z}):M\in\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z}),v\in\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}\right\\}.$

######  Notation 6.3.4.

More generally, for $\mu\mid\nu$, define

(6.5)
$\displaystyle\operatorname{A}^{\mu}\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\simeq\left\\{(M,v):M\in\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z}),v\in\left(\mathbb{Z}/\mu\mathbb{Z}\right)^{2r}\right\\}.$

which has a group structure obtained from
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ via reducing the
vector $v$ in (6.3) $\bmod\mu$. Even more generally, in order to understand
moments of the $\nu$ Selmer group, suppose $H$ is a finite
$\mathbb{Z}/\nu\mathbb{Z}$ module of the form
$H\simeq\prod_{i=1}^{m}\mathbb{Z}/\nu_{i}\mathbb{Z}$. we will be interested in
the group

$\displaystyle\operatorname{\mathrm{A}^{\operatorname{H}}\mathrm{Sp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z}):=\operatorname{A}^{\nu_{1}}\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\times_{\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})}\cdots\times_{\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})}\operatorname{A}^{\nu_{m}}\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z}),$

which sits in an exact sequence

(6.7)
${0}$${\prod_{i=1}^{m}\left(\mathbb{Z}/\nu_{i}\mathbb{Z}\right)^{2r}}$${\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})}$${\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})}$${0}$$\scriptstyle{\iota}$$\scriptstyle{\Pi}$

We next describe the condition for a torsor for $\mathscr{F}^{\prime}$ to
extend over a puncture, in terms of monodromy. By § 6.2,
$\mathscr{F}^{\prime}$ can be described in terms of
$\rho_{\mathscr{F}^{\prime}}$, which has target
$\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$. A torsor $\mathscr{S}$ for
$\mathscr{F}^{\prime}$ can be described in terms of $\mathscr{F}^{\prime}$
together with the additional data of transition functions lying in
$\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}$. In total, $\mathscr{S}$ can be
described in terms of a monodromy representation

$\displaystyle\rho_{\mathscr{S}}:\pi_{1}^{\mathrm{top}}(U-D,p)\to\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z}).$

A composition of loops in $\pi_{1}^{\mathrm{top}}(U-D,p)$ maps under
$\rho_{\mathscr{S}}$ to the product of their corresponding matrices, viewed as
elements of $\operatorname{GL}_{2r+1}(\mathbb{Z}/\nu\mathbb{Z})$ via (6.3).

######  Remark 6.3.5.

By construction, for $\Pi$ as defined in (6.2),
$\Pi\circ\rho_{\mathscr{S}}=\rho_{\mathscr{F}^{\prime}}$.

We now describe the condition that a $\mathscr{F}^{\prime}$ torsor extends to
a $j_{*}\mathscr{F}^{\prime}$ torsor. We note, first of all, that by 6.3.1, we
know that this condition only depends on the restriction of
$\rho_{\mathscr{S}}$ to local inertia groups. Since these inertia groups are
procyclic, this amounts to specifying some subset of
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$, necessarily
closed under conjugacy, in which the local monodromy groups are constrained to
lie. In the following proposition, we work out what these constraints look
like in explicit matrix form.

######  Lemma 6.3.6.

With notation as in § 6.2, let $j:U-D\to C$ denote the inclusion. Suppose
$q\in Z\cup D$ with $\eta$ a small loop around $q$ whose image under
$\rho_{\mathscr{F}^{\prime}}$ corresponds to the local inertia at $q$. Let
$d:=\mathrm{Drop}_{q}(\mathscr{F}^{\prime})$ so that, after choosing a
suitable basis
$\mathscr{F}^{\prime}_{p}\simeq(\mathbb{Z}/\nu\mathbb{Z})^{2r}$, we may write
$\rho_{\mathscr{F}^{\prime}}(\eta)$ in the form

$\displaystyle\begin{pmatrix}M_{1}&M_{2}\\\
0&\operatorname{\mathrm{id}}_{2r-d}.\end{pmatrix}$

Under the identification of
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ as in (6.3), we
can extend a $\mathscr{F}^{\prime}$ torsor $\mathscr{S}$ to an
$j_{*}\mathscr{F}^{\prime}$ torsor in some complex analytic neighborhood $W$
of $q$ if and only if

(6.8) $\displaystyle\rho_{\mathscr{S}}(\eta)=\begin{pmatrix}M_{1}&M_{2}&*\\\
0&\operatorname{\mathrm{id}}_{2r-d}&0\\\ 0&0&1\end{pmatrix}$

for some vector $*\in(\mathbb{Z}/\nu\mathbb{Z})^{d}$. Stated more
intrinsically, we can extend $\mathscr{S}$ to a $\mathscr{F}^{\prime}$ torsor
if and only if the vector $v$ in (6.3) lies in
$\operatorname{im}(1-\rho_{\mathscr{F}^{\prime}}(\eta))$

###### Proof.

First, 6.3.5 shows all entries of the matrix in (6.8) are necessary and
sufficient for $\mathscr{S}$ to extend to a $j_{*}\mathscr{F}^{\prime}$ torsor
except the first $2r$ entries of the last column, accounting for the $*$ and
the $0$.

Choose a simply connected neighborhood $W$ of $q$ and fix a basepoint $p\in
W$. To conclude the proof, we will show the claimed entries in the last column
of (6.8) from rows $d+1$ to $2r$ are $0$ if and only if $\mathscr{S}|_{W-q}$
extends to a $j_{*}\mathscr{F}^{\prime}$ torsor over $W$. Note that we can
identify $(\mathbb{Z}/\nu\mathbb{Z})^{2r-d}|_{W}\subset
j_{*}\mathscr{F}^{\prime}|_{W}$ as a $\mathbb{Z}/\nu\mathbb{Z}$ subsheaf which
restricts to
$\operatorname{Span}(e_{d+1},\ldots,e_{2r})\subset\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}\simeq\mathscr{F}^{\prime}|_{q}$
as the inertia invariants. Therefore, any $j_{*}\mathscr{F}^{\prime}|_{W}$
torsor $\mathscr{T}$ has a distinguished $(\mathbb{Z}/\nu\mathbb{Z})^{d}$
subtorsor, which is given as $\ker(1-\rho_{\mathscr{F}^{\prime}}(\eta))$.
Since $W$ is simply connected, this $(\mathbb{Z}/\nu\mathbb{Z})^{2r-d}$ torsor
is trivial, which implies that the local inertia at $q$ acts trivially on
$\operatorname{Span}(e_{d+1},\ldots,e_{2r})\subset\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}\simeq
j_{*}\mathscr{F}^{\prime}|_{q}$, and hence there is a $0$ in (6.8) as claimed.

Conversely, if there is a $0$ in the second row of the third column of (6.8),
we obtain a section of $\mathscr{S}$ over $W-q$ corresponding to each element
of $(\mathbb{Z}/\nu\mathbb{Z})^{2d-r}$ and hence a subsheaf
$(\mathbb{Z}/\nu\mathbb{Z})^{2r-d}|_{W-q}\subset\mathscr{S}|_{W-q}$. By gluing
$(\mathbb{Z}/\nu\mathbb{Z})^{2r-d}|_{W}$ to $\mathscr{S}|_{W-q}$ along
$(\mathbb{Z}/\nu\mathbb{Z})^{2r-d}|_{W-q}$, we obtain an
$j_{*}\mathscr{F}^{\prime}$ torsor $\mathscr{T}$ which is the desired
extension of $\mathscr{S}$. ∎

We can now describe $j_{*}\mathscr{F}^{\prime}$ torsors in terms of monodromy
data.

######  Lemma 6.3.7.

With notation as in § 6.2, let $\mathscr{F}$ be an irreducible symplectically
self-dual local system on $U$. Suppose $n>0$. Fix some quadratic twist
$\mathscr{F}^{\prime}$ of $\mathscr{F}$, ramified along a degree $n$ divisor
$D$, in the sense that $\mathscr{F}^{\prime}$ is some fiber of
$\mathscr{F}^{n}_{B}$, so that we obtain a corresponding monodromy
representation $\rho_{\mathscr{F}^{\prime}}$. Suppose
$\rho_{\mathscr{F}^{\prime}}$ satisfies the hypotheses $(1)$ and $(3)$ of
5.2.6. There are precisely $\nu^{(2g-2+n)\cdot 2r+\sum_{x\in
Z}\mathrm{Drop}_{x}(\mathscr{F})}$ isomorphism classes of torsors for
$j_{*}\mathscr{F}^{\prime}$, which can be described in terms of monodromy data
by specifying a representation
$\rho_{\mathscr{S}}:\pi_{1}(U-D,p)\to\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$
up to $\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ conjugacy,
satisfying the following conditions:

  1. (1)

The image of $\gamma_{i}$ under $\rho_{\mathscr{S}}$ is of the form (6.3) with
$M=-\operatorname{\mathrm{id}}$

  2. (2)

If $\mathrm{Drop}_{s_{i}}(\mathscr{F}^{\prime})=d_{i}$, the image of
$\delta_{i}$ under $\rho_{\mathscr{S}}$ is conjugate to a matrix of the form
(6.8), where we take $(q,d)$ there to be $(s_{i},d_{i})$ here,

  3. (3)

We have $\Pi\circ\rho_{\mathscr{S}}=\rho_{\mathscr{F}^{\prime}}$.

Let $j:U-D\to C$ denote the inclusion. As mentioned above, we consider two
torsors $\mathscr{T}$ and $\mathscr{T}^{\prime}$ equivalent if there is some
$v\in\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}$ so that
$\rho_{j^{*}\mathscr{T}}(\nabla)=\iota(v)\left(\rho_{j^{*}\mathscr{T}^{\prime}}(\nabla)\right)\iota(v)^{-1}$
for every
$\nabla\in\\{\alpha_{1},\ldots,\alpha_{g},\beta_{1},\ldots,\beta_{g},\gamma_{1},\ldots,\gamma_{n},\delta_{1},\ldots,\delta_{f+1}\\}$,
with $\iota$ as in (6.2).

###### Proof.

Using 6.3.1, we can describe torsors for $j_{*}\mathscr{F}^{\prime}$ as
torsors for $\mathscr{F}^{\prime}$ which extend over a neighborhood of each
$p_{i}\in D$. By 6.3.5, condition $(3)$ precisely corresponds to the condition
that the associated $\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ local
system associated to $\mathscr{S}$ on $U-D$ is that associated to
$\mathscr{F}^{\prime}$, and hence $\mathscr{S}|_{U}$ is a
$\mathscr{F}^{\prime}$ torsor. By 6.3.6, an $\mathscr{F}^{\prime}$ torsor
extend to a $j_{*}\mathscr{F}^{\prime}$ torsor over $p_{1},\ldots,p_{n}$, if
and only condition $(1)$ holds, and extends over $s_{1},\ldots,s_{f+1}$ if and
only if condition $(2)$ holds. We consider the representations up to
conjugacy, as this corresponds to a change of basepoint of
$\mathscr{F}^{\prime}|_{p}\simeq\left(\mathbb{Z}/\nu\mathbb{Z}\right)^{2r}$,
and expresses the usual condition for two torsors to be equivalent.

To conclude, we wish to see that there are $\nu^{(2g-2+n)\cdot 2r+\sum_{x\in
Z}\mathrm{Drop}_{x}(\mathscr{F})}$ isomorphism classes of torsors specified by
the above data. Indeed, we see there are $\nu^{2r}$ possible values
$\rho_{\mathscr{S}}$ can take on the loops
$\alpha_{1},\ldots,\alpha_{g},\beta_{1},\ldots,\beta_{g}$ in order to satisfy
$(3)$. For each $\gamma_{i}$, there are
$\nu^{\mathrm{Drop}_{p_{i}}(\mathscr{F}^{\prime})}=\nu^{2r}$ possible values
of $\rho_{\mathscr{S}}$, because
$\Pi(\rho_{\mathscr{S}}(\gamma_{i}))=-\operatorname{\mathrm{id}}_{2r}$. For
each $\delta_{i}$, there are
$\nu^{\mathrm{Drop}_{s_{i}}(\mathscr{F}^{\prime})}=\nu^{\mathrm{Drop}_{s_{i}}(\mathscr{F})}$
possible values of $\rho_{\mathscr{S}}$. We additionally must impose the
condition that
$\prod_{i=1}^{g}[\alpha_{i},\beta_{i}]\prod_{i=1}^{r+f+1}\gamma_{i}=\operatorname{\mathrm{id}}$,
from the relation defining the fundamental group, and that we consider these
torsors up to conjugacy. Before imposing these two conditions, there are
$\nu^{(2g+n)\cdot 2r+\sum_{x\in Z}\mathrm{Drop}_{x}(\mathscr{F})}$ possible
tuples of matrices. The first condition imposes $\nu^{2r}$ independent
constraints on the matrices. Further, the conjugation action always identifies
$\nu^{2r}$ elements since the representation is center free using that it is
irreducible and that
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\subset\operatorname{GL}_{2r+1}(\mathbb{Z}/\nu\mathbb{Z})$
contains no scalars, other than $\operatorname{\mathrm{id}}$. Altogether, this
yields $\nu^{(2g-2+n)\cdot 2r+\sum_{x\in Z}\mathrm{Drop}_{x}(\mathscr{F})}$
such torsors. ∎

###  6.4. Identifying Selmer stacks with Hurwitz stacks

We will use the above description of torsors to identify the Selmer stack with
a certain Hurwitz stack in 6.4.5. We next define that Hurwitz stack.

######  Notation 6.4.1.

Let $B=\operatorname{Spec}\mathbb{C}$. Given an symplectically self-dual sheaf
$\mathscr{F}$ over $U$ as in 5.1.4, and fixing values of $\nu$ and $n$, we now
use the notation $\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}$ to indicate
the stack $\operatorname{Hur}^{G,n,Z,\mathcal{S}}_{C/B}$ as in 2.4.2, for
$n,Z,C,B$ as in 5.1.4 and $G,\mathcal{S}$ are as we define next. Let
$\nu_{1},\ldots,\nu_{m}\mid\nu$ and write
$H\simeq\prod_{i=1}^{m}\mathbb{Z}/\nu_{i}\mathbb{Z}$. Take
$G:=\operatorname{\mathrm{A}^{\operatorname{H}}\mathrm{Sp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$.
Take $\mathcal{S}$ to be the orbit under the conjugation action of $G$ of the
following subset of $\phi\in\mathrm{Hom}(\pi_{1}(\Sigma_{g,f+1}),G)$. Any such
$\phi$ sends a half-twist (moving point $i$ counterclockwise toward point
$i+1$ and point $i+1$ counterclockwise toward point $i$) to an element $g\in
G$ so that $\Pi(g)=-\operatorname{\mathrm{id}}$, for $\Pi$ as defined in
(6.7). If
$\alpha_{1},\ldots,\alpha_{g},\beta_{1},\ldots,\beta_{g}\subset\Sigma_{g,f+1}\subset\Sigma_{g}$
are a fixed set of simple closed curves forming a standard generating set for
the first homology of $\Sigma_{g}$, we require that
$\Pi(\phi(\alpha_{i}))\in\pm a_{i}$, $\Pi(\phi(\beta_{j}))\in\pm b_{j}$, where
$a_{i}=\rho_{\mathscr{F}}(\alpha_{i})$ and
$b_{j}=\rho_{\mathscr{F}}(\beta_{j})$. The local inertia around $s_{i}$, the
$i$th puncture among the $f+1$ punctures, maps to $(M_{i},v_{i})$ where
$M_{i}$ is the given local inertia for $\mathscr{F}$ and
$v_{i}\in\operatorname{im}(M_{i}-\operatorname{\mathrm{id}})$.

######  Remark 6.4.2.

The condition in 6.4.1 that the $\alpha_{i}$ and $\beta_{j}$ map to $\pm
a_{i}$ and $\pm b_{j}$ under $\Pi\circ\phi$ may seem to depend on choices of
the $\alpha_{i}$ and $\beta_{j}$, but it can be expressed independently of
these choices as follows: if
$\zeta:\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})\to\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})/\\{\pm
1\\}$ is the quotient map,
$\zeta\circ\Pi\circ\phi=\zeta\circ\rho_{\mathscr{F}}$.

In order to show the construction in 6.4.1 gives a Hurwitz stack as in 2.4.2,
we need to show the set $\mathcal{S}$ is invariant under the action of
$\pi_{1}(\operatorname{Conf}^{n}_{U/B})$. We now verify this.

######  Lemma 6.4.3.

The set $\mathcal{S}$ from 6.4.1 is a subset of
$\mathrm{Hom}(\pi_{1}(\Sigma_{g,f+1}),G)$ which is invariant under the action
of $\pi_{1}(\operatorname{Conf}^{n}_{U/B})$.

###### Proof.

Recall we use $\gamma_{i}$ for the loop giving inertia around $p_{i}$ for
$1\leq i\leq n$ and $\delta_{i}$ for the loop giving inertia around $s_{i}$,
$1\leq i\leq f+1$. First, to show the image of $\gamma_{i}$ are preserved by
the $\pi_{1}(\operatorname{Conf}^{n}_{U/B})$ action, note that
$-\operatorname{\mathrm{id}}$ preserved by this action. Therefore, the
condition that $\Pi(g)=-\operatorname{\mathrm{id}}$ is preserved by the action
as well. Hence, the condition that $\gamma_{i}$ has monodromy $g$ with
$\Pi(g)=-\operatorname{\mathrm{id}}$ is preserved by the action of
$\pi_{1}(\operatorname{Conf}^{n}_{U/B})$. The condition on the $\alpha_{i}$
and $\beta_{j}$ is invariant as passing one of the $n$ points across
$\alpha_{i}$ or $\beta_{j}$ has the effect of negating $\Pi(\phi(\alpha_{i}))$
or $\Pi(\phi(\alpha_{i}))$, since
$\Pi(\gamma_{t})=-\operatorname{\mathrm{id}}$. As for the loops $\delta_{i}$,
since the loops $\gamma_{i}$ have inertia $g$ with
$\Pi(g)=-\operatorname{\mathrm{id}}$, which lies in the center of $G$, the
matrices $M_{i}$ defined in 6.4.1 are preserved by conjugation under
$-\operatorname{\mathrm{id}}$. Therefore, the $1$-eigenspace $\ker(1-M_{i})$
is preserved by conjugation under $-\operatorname{\mathrm{id}}$, and so the
same holds for $\operatorname{im}(1-M_{i})$. Thus, the set of such
homomorphisms to $G$ is indeed preserved by the action of
$\pi_{1}(\operatorname{Conf}^{n}_{U/B})$. ∎

######  Hypotheses 6.4.4.

Suppose $n>0$, $B=\operatorname{Spec}\mathbb{C}$, and $\mathscr{F}$ is an
irreducible symplectically self-dual local system which satisfies the
hypotheses $(1)$ and $(3)$ of 5.2.6. There is a map

$\displaystyle\theta:\operatorname{Sel}_{\mathscr{F}^{n}_{B}}\to\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}}$

obtained via the bijection of 6.4.5 which sends a torsor to the corresponding
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ cover for some
quadratic twist $\mathscr{F}^{\prime}$ of $\mathscr{F}$.

######  Proposition 6.4.5.

With hypotheses as in 6.4.4, for $n>0$, the map $\theta$, defined over
$B=\operatorname{Spec}\mathbb{C}$, is an isomorphism.

###### Proof.

Note that the projection
$\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}}\to\operatorname{QTwist}^{n}_{U/B}$
sends a point of
$\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}}$, thought
of as an $\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ cover,
to the corresponding $\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ cover. The
projection
$\operatorname{Sel}_{\mathscr{F}^{n}_{B}}\to\operatorname{QTwist}^{n}_{U/B}$
sends a torsor $\mathscr{T}$ for some quadratic twist $\mathscr{F}^{\prime}$
to the corresponding $\mathscr{F}^{\prime}$. Both
$\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}}$ and
$\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ are finite étale covers of
$\operatorname{QTwist}^{n}_{U/B}$, and by 6.3.7, $\theta$ defines a bijection
between geometric points over points of $\operatorname{QTwist}^{n}_{U/B}$,
corresponding to a chosen degree $n$ quadratic twist $\mathscr{F}^{\prime}$ of
$\mathscr{\mathscr{missing}}F$. In order to show $\theta$ is an isomorphism,
it is enough to show the bijection between two finite étale covers of
$\operatorname{QTwist}^{n}_{U/B}$ defines a homeomorphism. Indeed, we may
verify this claim locally on $\operatorname{QTwist}^{n}_{U/B}$, in which case
is enough to verify it on sufficiently small open covers of
$\operatorname{QTwist}^{n}_{U/B}$. We can choose a small open neighborhood of
some geometric point
$[\mathscr{F}^{\prime}]\in\operatorname{QTwist}^{n}_{U/B}$, corresponding to
varying the points $p_{i}$, along with the corresponding double cover, in a
small, pairwise disjoint open analytic discs of $C$. Since the bijection of
6.3.7 is compatible with such variation in the points $p_{i}$, we obtain the
desired isomorphism. ∎

######  Warning 6.4.6.

The Selmer stack
$\operatorname{Sel}_{\mathscr{F}^{n}_{\operatorname{Spec}\mathbb{F}_{q}}}$
over $\mathbb{F}_{q}$ will not in general be isomorphic to the Hurwitz stack
of $\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ covers we are
considering. Rather, they will be twists of each other, and the Hurwitz stack
only becomes isomorphic over $\overline{\mathbb{F}}_{q}$. The reason for this
is that the monodromy representation associated to $\mathscr{F}$ may fail to
be contained in $\operatorname{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$, and in
general will it will only be contained in
$\operatorname{GSp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$, the general symplectic
group. However, once one ensures all roots of unity lie in the base field,
this issue goes away.

######  Remark 6.4.7.

The issue brought up in 6.4.6 is not a concern for the main results of the
present paper, for the following reason. Our plan is to estimate the number of
$\mathbb{F}_{q}$-points on a Selmer stack, which we compute using the
Grothendieck-Lefschetz trace formula applied to the action of Frobenius on the
Selmer stack. We need two inputs: $(1)$ a precise description of the action of
Frobenius on the top degree cohomology of the Selmer stack and $(2)$ a bound
on the dimensions of low codimension cohomology groups. For $(2)$, the
dimensions of these low codimension cohomology groups are invariant under base
change, and hence can be computed over $\overline{\mathbb{F}}_{q}$. Then, via
a comparison theorem, these dimensions can be computed over $\mathbb{C}$.
Hence, for the bound in $(2)$, we only need to compare Selmer stacks to
Hurwitz stacks over $\mathbb{C}$, and hence 6.4.6 does not play a role. Input
$(1)$, which is about the term coming from the top degree cohomology, by
contrast, is sensitive to which $\mathbb{F}_{q}$-rational form we have in
mind. We compute this trace directly for the Selmer stack, using a monodromy
computation in § 7.

Computing the average size of a Selmer group in a quadratic twist family will
come down to counting $\mathbb{F}_{q}$-rational points on a Selmer stack. But
we will want to compute not only averages, but higher moments. This will
require counting points on fiber products of Selmer stacks. But, as the
following corollary shows, these stacks are isomorphic, making them amenable
to the methods of this paper.

######  Corollary 6.4.8.

With hypotheses as in 6.4.4, let
$H\simeq\prod_{i=1}^{m}\mathbb{Z}/\nu_{i}\mathbb{Z}$. The map $\theta$,
defined over $B=\operatorname{Spec}\mathbb{C}$, induces an isomorphism

$\displaystyle\theta^{m}:\operatorname{Sel}_{\mathscr{F}^{n}_{B}[\nu_{1}]}\times_{\operatorname{QTwist}^{n}_{U/B}}\cdots\times_{\operatorname{QTwist}^{n}_{U/B}}\operatorname{Sel}_{\mathscr{F}^{n}_{B}[\nu_{m}]}\to\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}.$

###### Proof.

It follows from the definition of
$\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}$ as in 6.4.1 that

$\displaystyle\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}\simeq\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}[\nu_{1}]}\times_{\operatorname{QTwist}^{n}_{U/B}}\cdots\times_{\operatorname{QTwist}^{n}_{U/B}}\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}[\nu_{m}]}.$

The map $\theta$ from 6.4.5 also induces isomorphisms
$\operatorname{Hur}^{\mathbb{Z}/\nu_{i}\mathbb{Z}}_{\mathscr{F}^{n}_{B}[\nu_{i}]}\to\operatorname{Sel}_{\mathscr{F}^{n}_{B}[\nu_{i}]}$.
For $\nu_{i}\mid\nu$, we also have
$\operatorname{Hur}^{\mathbb{Z}/\nu_{i}\mathbb{Z}}_{\mathscr{F}^{n}_{B}[\nu_{i}]}\simeq\operatorname{Hur}^{\mathbb{Z}/\nu\mathbb{Z}}_{\mathscr{F}^{n}_{B}[\nu_{i}]}$
from the definition. The result follows from 6.4.5 by taking appropriate fiber
products of isomorphisms over $\operatorname{QTwist}^{n}_{U/B}$. ∎

##  7\. Computing the monodromy of Hurwitz stacks

In this section, we compute the image of the monodromy representation related
to Selmer stacks. This will be used later to determine their connected
components. We first control the monodromy when $\nu$ is prime in § 7.1. We
then control the monodromy for prime power $\nu$ in § 7.2 and for composite
$\nu$ in § 7.3. The above shows that the monodromy is sufficiently large, but
does not determine it exactly. We will, however, precisely describe the image
of the Dickson invariant map in § 7.4.

###  7.1. Computing the monodromy when $\nu$ is a prime

We first consider the case $\nu=\ell$ is prime. The main result in this case
is Theorem 7.1.1, which is a generalization of [Hal08, Theorem 6.3] from the
case that we have an elliptic curve over a genus $0$ base to the case of a
general symplectically self-dual sheaf over a base curve of genus $g$. We
begin with a definition of the monodromy representation for general odd $\nu$.

######  Definition 7.1.1.

With notation as in 5.1.4, suppose $B$ is integral $\nu$ is odd, and $2\nu$ is
invertible on $B$. Choose a basepoint $x\in\operatorname{QTwist}^{n}_{U/B}$.
Let
$V_{\mathscr{F}^{n}_{B}}:=R^{1}\lambda_{*}\left(j_{*}\mathscr{F}^{n}_{B}\right)_{x}$.
The Selmer sheaf is a finite étale cover of $\operatorname{QTwist}^{n}_{U/B}$
by 5.2.1 and so induces a monodromy representation
$\rho_{\mathscr{F}^{n}_{B}}:\pi_{1}(\operatorname{QTwist}^{n}_{U/B})\to\operatorname{Aut}(V_{\mathscr{F}^{n}_{B}})$.
For any geometric point ${\overline{b}}\to B$, we also obtain a geometric
monodromy representation
$\rho_{\mathscr{F}_{\overline{b}}^{n}}:\pi_{1}(\operatorname{QTwist}^{n}_{U_{\overline{b}}/\overline{b}})\to\operatorname{Aut}(V_{\mathscr{F}^{n}_{\overline{b}}})$.

######  Warning 7.1.2.

Note that $\rho_{\mathscr{F}^{n}_{B}}$ is a representation of the fundamental
group of configuration space, while we use $\rho_{\mathscr{F}^{\prime}}$ very
differently in (6.1) for a representation of the fundamental group of the
curve $U-D$ itself.

######  Remark 7.1.3.

Using that $\gcd(\nu,2)=1$, there is a nondegenerate pairing on
$V_{\mathscr{F}^{n}_{B}}$ The pairing is obtained as the composition

$\displaystyle H^{1}(C,j_{*}(\mathscr{F}^{n}_{B})_{x})\times
H^{1}(C,j_{*}(\mathscr{F}^{n}_{B})_{x})$ $\displaystyle\to
H^{2}(C,\wedge^{2}(j_{*}\mathscr{F}^{n}_{B})_{x})$ $\displaystyle\to
H^{2}(C,j_{*}(\wedge^{2}\mathscr{F}^{n}_{B})_{x})$ $\displaystyle\to
H^{2}(C,j_{*}\mu_{\nu})$ $\displaystyle\to\mathbb{Z}/\nu\mathbb{Z}$

using Poincaré duality [Mil80, V Proposition 2.2(b)], which is preserved by
this monodromy representation. The pairing above is symmetric because Poincaré
duality on curves is antisymmetric and the pairing on
$j_{*}(\mathscr{F}^{n}_{B})_{x}$ is antisymmetric, coming from the assumption
that $\mathscr{F}$ is symplectically self-dual. Let $Q_{\mathscr{F}^{n}_{B}}$
denote the associated quadratic form. Hence, $\rho_{\mathscr{F}_{B}^{n}}$
factors through the orthogonal group
$\operatorname{O}(Q_{\mathscr{F}^{n}_{B}})$ associated to the above symmetric
bilinear pairing.

We now set some assumptions, which will serve as our hypotheses going forward.

######  Hypotheses 7.1.4.

Suppose $\nu$ is an odd integer and $r\in\mathbb{Z}_{>0}$ so that every prime
$\ell\mid\nu$ satisfies $\ell>2r+1$. Suppose we have a rank $2r$, tame,
symplectically self-dual sheaf of free $\mathbb{Z}/\nu\mathbb{Z}$ modules,
$\mathscr{F}$ over $U\subset C$, a nonempty proper open in a smooth proper
curve $C$ with geometrically connected fibers over an integral affine base
$B$. Suppose $Z:=C-U$ is nonempty and finite étale over $B$. Assume further
$2\nu$ is invertible on $B$. Fix a geometric point ${\overline{b}}\to B$. We
assume there is some point $x\in C_{\overline{b}}$ at which
$\mathrm{Drop}_{x}(\mathscr{F}_{\overline{b}}[\ell])=1$ for every prime
$\ell\mid\nu$. Also suppose $\mathscr{F}_{\overline{b}}[\ell]$ is irreducible
for each $\ell\mid\nu$, and that the map
$j_{*}\mathscr{F}_{\overline{b}}[\ell^{w}]\to
j_{*}\mathscr{F}_{\overline{b}}[\ell^{w-t}]$ is surjective for each prime
$\ell\mid\nu$ such that $\ell^{w}\mid\nu$, and $w\geq t$, as in hypotheses
$(1)$ and $(3)$ of 5.2.6. Let $f+1:=\deg(C-U)$ and let $n$ be a positive even
integer.

Note that if we are in the situation of 5.1.9, hypothesis 5.2.6(1) in the case
$\mathscr{F}_{\overline{b}}=A[\nu]$ is satisfied whenever the geometric
component group $\Phi_{A_{\overline{b}}}$ has order prime to $\nu$, by 5.2.3.
If we additionally assume $A_{\overline{b}}$ has multiplicative reduction at
some point of $U_{\overline{b}}$, with toric part of dimension $1$, then
$\mathrm{Drop}_{x}(\mathscr{F}_{\overline{b}}[\ell])=1$ for every prime
$\ell\mid\nu$.

######  Theorem 7.1.1 (Generalization of [Hal08, Theorem 6.3]).

Suppose $\nu=\ell>2r+1$ is prime. Choose a geometric basepoint
$x\in\operatorname{QTwist}^{n}_{U/B}$ over a geometric point
${\overline{b}}\to B$. We next recall our assumptions from 7.1.4: we assume
$2\nu$ is invertible on the integral affine base $B$ and
$\mathscr{F}_{\overline{b}}$ is a rank $2r$ irreducible symplectically self-
dual sheaf. We assume there is some point $y\in C_{\overline{b}}$ at which
$\mathrm{Drop}_{y}(\mathscr{F}_{\overline{b}})=1$, and
$\mathscr{F}_{\overline{b}}$ satisfies hypotheses 5.2.6(1) and (3).

For $n$ an even integer satisfying

$\displaystyle n>\max\left(2g,\frac{2(2r+1)(f+1)-\sum_{y\in
D_{x}({\overline{b}})}\mathrm{Drop}_{y}(\mathscr{F})}{2r}-(2g-2)\right),$

the geometric monodromy representation
$\rho_{\mathscr{F}_{\overline{b}}^{n}}:\pi_{1}(\operatorname{QTwist}^{n}_{U_{\overline{b}}/\overline{b}})\to\operatorname{Aut}(V_{\mathscr{F}^{n}_{\overline{b}}})$
has $\operatorname{im}(\rho_{\mathscr{F}^{n}_{\overline{b}}})$ of index at
most $2$ in $\operatorname{O}(Q_{\mathscr{F}^{n}_{\overline{b}}})$, for
$Q_{\mathscr{F}^{n}_{\overline{b}}}$ as in 7.1.3, and, moreover,
$\operatorname{im}(\rho_{\mathscr{F}^{n}_{\overline{b}}})\neq\operatorname{SO}(Q_{\mathscr{F}^{n}_{\overline{b}}})$.

###### Proof Sketch.

A fair portion of this proof is essentially explained in [Hal08, Theorem 6.3],
see also [Zyw14, Theorem 3.4] for an explicit version and [Hal08, §6.6] for
the generalization to $r>1$. We now briefly outline the details needed in the
generalization. For the purposes of the proof, we may assume that
$B={\overline{b}}$. Since $n>2g$, by [Kat02, Theorem 2.2.6], there is a map
$h:C_{x}\to\mathbb{P}^{1}$ of degree $n$ which is simply branched, the branch
locus of $h$ is disjoint from $h((Z\cup D)_{x})$, $h$ separates points of
$(Z\cup D)_{x}$, and precisely one point $\delta\in D_{x}$ maps to
$\infty\in\mathbb{P}^{1}$. Let $\operatorname{br}(h)$ denote the branch locus
of $h$. Take $W\subset\mathbb{P}^{1}$ to be the complement of
$\operatorname{br}(h)\cup h(Z\cup D)$. Note that $\infty\notin W$ by
assumption. Then, one can show as in [Kat02, Theorem 5.4.1] that there is a
map $\phi:W\to\operatorname{QTwist}^{n}_{U/\overline{b}}$ which we now
describe.

In order to specify a double cover of $C\times_{\overline{b}}W$, it is
equivalent to specify a rank $1$ locally constant constructible
$\mathbb{Z}/\ell\mathbb{Z}$ sheaf on an open whose monodromy is trivialized by
that double cover. Let $\mathscr{F}^{\prime}$ denote the quadratic twist of
$\mathscr{F}$ corresponding to our chosen geometric basepoint
$x\in\operatorname{QTwist}^{n}_{U/B}$. Then,
$\mathscr{F}^{\prime}=\mathscr{F}\otimes\mathbb{V}$, for $\mathbb{V}$ a rank
$1$ locally constant constructible sheaf on $U-D$ given by
$t_{*}(\mathbb{Z}/\ell\mathbb{Z})/(\mathbb{Z}/\ell\mathbb{Z})$, for $t:X\to U$
the finite étale double cover associated to $x$. We will now find a family of
locally constant constructible sheaves (corresponding to quadratic twists)
over $W$ whose fiber over $0\in W$ is $\mathbb{V}$. To this end, let $\chi$
denote the rank $1$ locally constant constructible sheaf on
$\mathbb{G}_{m}:=\mathbb{A}^{1}-\\{0\\}$ corresponding to the double cover
$\mathbb{G}_{m}\to\mathbb{G}_{m}$ via multiplication by $2$. There is a map
$\alpha^{\prime}:\mathbb{A}^{1}\times\mathbb{A}^{1}-\Delta\to\mathbb{G}_{m}$
given by $(x,y)\mapsto x-y$. Consider the map
$(h,\operatorname{\mathrm{id}}):C\times\mathbb{P}^{1}\to\mathbb{P}^{1}\times\mathbb{P}^{1}$
and let $Y:=(h,\operatorname{\mathrm{id}})^{-1}(W\times W-\Delta)$. Let
$\alpha$ denote the composition
$Y\xrightarrow{(h,\operatorname{\mathrm{id}})}\mathbb{A}^{1}\times\mathbb{A}^{1}-\Delta\xrightarrow{\alpha^{\prime}}\mathbb{G}_{m}$
and let $\mathbb{W}:=\alpha^{*}\chi$. Let $\pi_{2}:Y\to\mathbb{A}^{1}$ denote
the second projection. Take
$\mathbb{V}^{\prime}:=\mathbb{W}|_{h^{-1}(W-0)\times
0}\otimes\mathbb{V}|_{h^{-1}(W-0)}$, viewed as a sheaf on $h^{-1}(W-0)\subset
C$. Then $(\mathbb{V}^{\prime}\otimes\mathbb{W}^{\vee})|_{h^{-1}(W-0)}$
recovers $\mathbb{V}|_{h^{-1}(W-0)}$. Now, the locally constant constructible
sheaf $\pi_{2}^{*}\mathbb{V}^{\prime}\otimes\mathbb{W}^{\vee}$ determines a
locally constant constructible sheaf on $Y$. The above identifies the fiber of
this over the point $0$ with a restriction of $\mathbb{V}$. Since both
$\mathbb{V}^{\prime}$ and $\mathbb{W}$ correspond to representations with
image $\mathbb{Z}/2\mathbb{Z}$, the same is true of
$\pi_{2}^{*}\mathbb{V}^{\prime}\otimes\mathbb{W}^{\vee}$, and hence this sheaf
corresponds to a finite étale double cover of $Y$. Overall, this gives a
double cover of $C\times\mathbb{A}^{1}$, ramified along a degree $n$ divisor.
This divisor is étale and disjoint from $Z$ over $C\times W$, and hence yields
a map $\phi:W\to\operatorname{QTwist}^{n}_{U/\overline{b}}$, by the universal
property of $\operatorname{QTwist}^{n}_{U/\overline{b}}$ as a moduli stack of
double covers branched over a divisor disjoint from $Z$. The sheaf
$\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}}$ may also be
viewed as the middle convolution
$\operatorname{MC}_{\chi}((h_{*}\mathscr{F}^{\prime})|_{W})$. (See [Kat02,
Proposition 5.3.7] for an analogous statement in the $\ell$-adic setting.)

Since $\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}}$ is the
middle convolution
$\operatorname{MC}_{\chi}((h_{*}\mathscr{F}^{\prime})|_{W})$ of the
irreducible sheaf $(h_{*}\mathscr{F}^{\prime})|_{W}$, we obtain that
$\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}}$ is irreducible.
Here we are using that the middle convolution of an irreducible sheaf is
irreducible. This holds because middle convolution is invertible, and hence
sends irreducible objects to irreducible objects. A proof is given in [Kat96,
Theorem 3.3.3(2d)] for $\overline{\mathbb{Q}}_{\ell}$ sheaves, but the same
proof works for sheaves of $\mathbb{Z}/\ell\mathbb{Z}$ modules. (See also
[Det08, Corollary 1.6.4] for a proof in the characteristic $0$ setting.)

We may moreover compute the monodromy of
$\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}}$ at the geometric
points of $\mathbb{A}^{1}-W$. At branch points of $h$, the monodromy is
unipotent via the calculation done in [Kat02, Proposition 5.3.6]. At the other
geometric points of $\mathbb{A}^{1}-W$ the calculation is the same as in the
proof of [Hal08, Theorem 6.3 and Lemma 6.5]. In particular, at each of the
geometric points of $h(D)$, the monodromy is also unipotent. This is also
explained in [Kat02, Proposition 5.3.6], where it is also shown that
$\mathrm{Drop}_{y}(\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}})\leq
2r$ at all such geometric points $y\in\mathbb{A}^{1}-W$.

We conclude by verifying the three hypotheses of [Hal08, Theorem 3.1], whose
conclusion implies the statement of the theorem we are proving. In particular,
the sheaf $\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}}$ is
generated by the inertia around $\operatorname{br}(h),h(Z_{x}),$ and
$h(D_{x}-\delta)$.

We need to verify hypotheses $(i),(ii),$ and $(iii)$ [Hal08, Theorem 3.1], as
well as show the image of monodromy contains a reflection and an isotropic
shear, in the language of [Hal08, p. 185]. We claim the local monodromy around
a point of $h(Z_{x})\subset W$ over which $A_{x}$ has toric part of
codimension $1$ acts as a reflection, while the local monodromy around a point
of $h(D_{x})$ acts as an isotropic shear. These claims are proven in the case
of elliptic curves in [Hal08, Lemma 6.5] and the proof for higher dimensional
abelian varieties is analogous.

In order to verify $(i)$, take the value labeled $r$ in [Hal08, Theorem 3.1]
to be what we are calling $2r=2(\dim A-\dim U_{\overline{b}})$. Maintaining
our notation, we have seen above that the images of inertia around the above
mentioned geometric points $y\in S:=\mathbb{A}^{1}-W$ generate an irreducible
representation, and satisfy
$\mathrm{Drop}_{y}(\phi^{*}{\mathcal{S}e\ell}_{\mathscr{F}^{n}_{\overline{b}}})\leq
2(\dim A-\dim U_{\overline{b}})$. This verifies [Hal08, Theorem 3.1(i)].

Taking $S_{0}\subset S$ to be the subset of the $f+1$ geometric points over
$h(Z)$, we find $2(2r+1)(\\#S_{0}({\overline{b}}))\leq\dim V$ by rearranging
the assumption that

$\displaystyle n>\frac{2(2r+1)(f+1)-\sum_{y\in
Z({\overline{b}})}\mathrm{Drop}_{y}(\mathscr{F})}{2r}-(2g-2),$

using our computation for the dimension of $V$ from 5.2.6. This verifies
[Hal08, Theorem 3.1(ii)].

Finally, every $\gamma\in S-S_{0}$ has unipotent monodromy, as we showed
above. Hence, every $\gamma\in S-S_{0}$ has order a power of $\ell$, so has
order prime to $(2r+1)!$ whenever $\ell>2r+1$. This verifies [Hal08, Theorem
3.1(iii)]. Applying [Hal08, Theorem 3.1] gives result. ∎

###  7.2. Computing the monodromy for prime-power $\nu$

Our next goal is to generalize Theorem 7.1.1 to prime power $\nu$, and then to
general composite $\nu$. Our short-term aim is to prove 7.2.2, which will
imply that if we have big monodromy $\bmod\ell$, we also have big monodromy
$\bmod\ell^{j}$ for any integer $j>0$.

######  Definition 7.2.1.

Suppose $Q$ is a quadratic form over $\mathbb{Z}/\ell^{k}\mathbb{Z}$. The lie
algebra $\mathfrak{so}(Q)(\mathbb{F}_{\ell})$ is by definition
$\ker(\operatorname{SO}(Q)(\mathbb{Z}/\ell^{2}\mathbb{Z})\to\operatorname{SO}(Q)(\mathbb{Z}/\ell\mathbb{Z}))$.

We thank Eric Rains for help with the following proof.

######  Proposition 7.2.2.

Let $s\geq 3$ and $\ell\geq 5$ a prime. Let $(V,Q)$ be a non-degenerate
quadratic space of rank $s$ over $\mathbb{Z}/\ell\mathbb{Z}$. Suppose
$G\subset\Omega(Q)(\mathbb{Z}/\ell^{j}\mathbb{Z})$ is a subgroup so that the
composition
$G\to\Omega(Q)(\mathbb{Z}/\ell^{j}\mathbb{Z})\to\Omega(Q)(\mathbb{Z}/\ell\mathbb{Z})$
is surjective. Then, $G=\Omega(Q)(\mathbb{Z}/\ell^{j}\mathbb{Z})$.

###### Proof.

This is a special case of [Vas03, Theorem 1.3(a)]. Since there are a few
mistakes in other parts of that theorem statement (though not in the part
relevant to the proposition we’re proving) we spell out a few more details
here. The argument proceeds as indicated in the second to last paragraph of
[Vas03, p. 327]. First, as in [Vas03, Lemma 4.1.2] we can reduce to the case
$j=2$. To deal with the case $j=2$, it is enough to show $G$ meets the Lie
algebra $\mathfrak{so}(Q)(\mathbb{F}_{\ell})$ nontrivially, as argued in
[Vas03, 4.4.1]. Finally, in [Vas03, Theorem 4.5] it is shown that $G$ meets
the Lie algebra nontrivially. ∎

###  7.3. Bootstrapping to general composite $\nu$

We next collect a few lemmas to bootstrap from showing there is big monodromy
modulo prime powers, to showing there is big monodromy modulo composite
integers. The main result is 7.3.3. The general strategy will be to apply
Goursat’s lemma. A key input in Goursat’s lemma is to understand which simple
groups appear as subquotients of orthogonal groups. As a first step, using
7.2.2, we can prove $\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$ is perfect.

######  Lemma 7.3.1.

For $s\geq 3$, $\nu$ a positive integer, and $(V,Q)$ a non-degenerate
quadratic space of rank $s$ over $\mathbb{Z}/\nu\mathbb{Z}$,
$\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$ is perfect. That is,
$\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$ is its own commutator.

###### Proof.

Write $\nu=\prod_{i=1}^{t}\ell_{i}^{a_{i}}$ for $\ell_{i}$ pairwise distinct
primes. Note $\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z})$ is perfect as shown in
[Wil09, p. 73, lines 2-7]. Then, since the commutator subgroup

$\displaystyle\left[\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z}),\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})\right]\subset\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$

is a subgroup of $\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$ surjecting
onto $\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z})$, it must be all of
$\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$ by 7.2.2. Finally, as
commutators commute with products, and
$\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})=\prod_{i=1}^{t}\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$,
it follows that $\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$ is its own commutator. ∎

The next result lets us relate monodromy for prime power $\nu$ to the
monodromy for general composite $\nu$.

######  Proposition 7.3.2.

Let $s\geq 5$. Let $(V,Q)$ be a non-degenerate quadratic space of rank $s$
over $\mathbb{Z}/\nu\mathbb{Z}$. Suppose
$G\subset\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$ is a subgroup so that for each
prime $\ell\mid\nu$, the composition
$G\to\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})\to\Omega(Q)(\mathbb{Z}/\ell\mathbb{Z})$
is surjective. Then, $G=\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$.

###### Proof.

We have already proven this in the case $\nu$ is a prime power in 7.2.2. It
now remains to deal with general composite $\nu$.

To this end, write $\nu=\prod_{i=1}^{t}\ell_{i}^{a_{i}}$, for $\ell_{i}$
pairwise distinct primes. The proposition follows from an application of
Goursat’s lemma, as we now explain. We will show that the groups
$\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$ for $1\leq i\leq t$ satisfy
the following two properties: $(1)$ they have trivial abelianization and $(2)$
they have no finite non-abelian simple quotients in common. These two facts
verify the hypotheses of Goursat’s lemma as stated in [Gre10, Proposition
2.5], which implies that
$G=\prod_{i=1}^{t}\Omega(Q)\left(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z}\right)=\Omega(Q)(\mathbb{Z}/\nu\mathbb{Z})$.

It remains to verify $(1)$ and $(2)$. Observe that $(1)$ follows from 7.3.1.
To conclude our proof, we only need to check $(2)$: that the groups
$\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$ for $1\leq i\leq t$ have no
finite non-abelian simple quotients in common. For $G^{\prime}$ a group, let
$\operatorname{Quo}(G^{\prime})$ denote the set of finite simple non-abelian
quotients of $G^{\prime}$. To prove $(2)$, it suffices to show
$\operatorname{Quo}(\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z}))=\left\\{\mathbb{P}\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z})\right\\}.$
Note that the latter group is indeed simple by [Wil09, 3.7.3 and 3.8.2], using
that $s\geq 5$.

So, we now check
$\operatorname{Quo}(\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z}))=\left\\{\mathbb{P}\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z})\right\\}.$
Since every finite simple quotient appears as some Jordan Holder factor, it
suffices to check the all simple Jordan Holder factors of
$\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})$ are contained in
$\\{\mathbb{P}\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z}),\mathbb{Z}/\ell_{i}\mathbb{Z},\mathbb{Z}/2\mathbb{Z}\\}.$
To see this, consider the surjections
$\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}}\mathbb{Z})\to\Omega(Q)(\mathbb{Z}/\ell_{i}^{a_{i}-1}\mathbb{Z})\to\cdots\to\Omega(Q)(\mathbb{Z}/\ell_{i}^{2}\mathbb{Z})\to\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z})\to\left\\{\operatorname{\mathrm{id}}\right\\}$.
From these surjections, we obtain an associated filtration. The Jordan Holder
factors associated to any refinement of this filtration will all lie in
$\\{\mathbb{P}\Omega(Q)(\mathbb{Z}/\ell_{i}\mathbb{Z}),\mathbb{Z}/\ell_{i}\mathbb{Z},\mathbb{Z}/2\mathbb{Z}\\}$
since the kernels of all maps but the last are products of
$\mathbb{Z}/\ell_{i}\mathbb{Z}$. ∎

######  Proposition 7.3.3.

Keep assumptions as in 7.1.4. Suppose ${\overline{b}}\to B$ is a geometric
point. If

(7.1) $\displaystyle n>\max\left(2,2g,\frac{2(2r+1)(f+1)-\sum_{y\in
D_{x}({\overline{b}})}\mathrm{Drop}_{y}(\mathscr{F})}{2r}-(2g-2)\right),$

then the geometric monodromy representation
$\rho_{\mathscr{F}_{\overline{b}}^{n}}:\pi_{1}(\operatorname{QTwist}^{n}_{U_{\overline{b}}/\overline{b}})\to\operatorname{Aut}(V_{\mathscr{F}_{\overline{b}}^{n}})$
satisfies
$\Omega(Q_{\mathscr{F}_{\overline{b}}^{n}})\subset\operatorname{im}(\rho_{\mathscr{F}_{\overline{b}}^{n}})\subset\operatorname{O}(Q_{\mathscr{F}_{\overline{b}}^{n}})$
and
$\operatorname{im}(\rho_{\mathscr{F}^{n}_{\overline{b}}})\not\subset\operatorname{SO}(Q_{\mathscr{F}^{n}_{\overline{b}}})$.

###### Proof.

We have seen in 7.1.3 that
$\operatorname{im}(\rho_{\mathscr{F}_{\overline{b}}^{n}})\subset\operatorname{O}(Q_{\mathscr{F}_{\overline{b}}^{n}})$
holds. By Theorem 7.1.1, we know
$\Omega(Q_{\mathscr{F}[\ell]^{n}})\subset\operatorname{im}(\rho_{\mathscr{F}_{\overline{b}}[\ell]^{n}})$
for each prime $\ell\mid\nu$. It follows from 7.3.2 that
$\Omega(Q_{\mathscr{F}^{n}_{\overline{b}}})\subset\operatorname{im}(\rho_{\mathscr{F}_{\overline{b}}^{n}})$.
Note that since $n>2$, the formula for the rank of
$V_{\mathscr{F}^{n}_{\overline{b}}}$ from 5.2.6 shows it is at least $5$, so
the hypotheses of 7.3.2 are satisfied. From Theorem 7.1.1, we also find that
$\operatorname{im}(\rho_{\mathscr{F}^{n}_{\overline{b}}})\not\subset\operatorname{SO}(Q_{\mathscr{F}^{n}_{\overline{b}}})$.
∎

###  7.4. Understanding the image of the Dickson invariant map

Having shown that the image of monodromy is close to the orthogonal group, so
in particular contains $\Omega(Q_{\mathscr{F}^{n}_{B}})$, its failure to equal
the orthogonal group can be understood in terms of the spinor norm and Dickson
invariant. The spinor norm will not have much effect on the distribution of
Selmer elements, but the Dickson invariant will have a huge effect, and is
closely connected to the parity of the rank of $A$ in the case
$\mathscr{F}_{b}\simeq A[\nu],$ for $A\to U$ an abelian scheme as in 5.1.9. In
the remainder of this section, specifically 7.4.6, we precisely determine the
image of the Dickson invariant, under the arithmetic monodromy representation
$\rho_{\mathscr{F}^{n}_{b}}$.

Our strategy for determining the arithmetic monodromy will be to use
equidistribution of Frobenius elements, and compute images of Frobenius
elements by relating them to Selmer groups. The following notation for the
distribution of Selmer groups will make it convenient to express the types of
Selmer groups which appear.

######  Definition 7.4.1.

Keep assumptions as in as in 5.1.4 and 5.1.9, and assume that $B$ is a local
scheme so that $b\in B$ is the unique closed point and has residue field
contained in $\mathbb{F}_{q}$. In particular, $\mathscr{F}_{b}\simeq A[\nu]$
for $A\to U_{b}$ a polarized abelian scheme with polarization degree prime to
$\nu$.

Let $\mathcal{N}$ denote the set of isomorphism classes of finite
$\mathbb{Z}/\nu\mathbb{Z}$ modules. Let $X_{A[\nu]^{n}_{\mathbb{F}_{q}}}$
denote the probability distribution on $\mathcal{N}$ defined by

$\displaystyle\operatorname{Prob}\left(X_{A[\nu]^{n}_{\mathbb{F}_{q}}}=H\right)=\frac{\\#\\{x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q}):\operatorname{Sel}_{\nu}(A_{x})\simeq
H\\}}{\\#\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})}.$

Here, as usual, point counts of stacks are weighted inversely proportional to
the isotropy group at that point. For $i\in\\{0,1\\}$, let
$\mathcal{N}^{i}\subset\mathcal{N}$ denote the subset of $\mathscr{N}$ of
those $H$ so that there exists some $\mathbb{Z}/\nu\mathbb{Z}$ module $G$ such
that $H\simeq(\mathbb{Z}/\nu\mathbb{Z})^{i}\times G^{2}$. Given
$H\in\mathcal{N}^{i}$, define

$\displaystyle\operatorname{Prob}\left(X^{i}_{A[\nu]^{n}_{\mathbb{F}_{q}}}=H\right)=\frac{\\#\\{x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q}):\operatorname{Sel}_{\nu}(A_{x})\simeq
H\\}}{\\#\\{\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q}):\operatorname{Sel}_{\nu}(A_{x})\in\mathcal{N}^{i}\\}}.$

The next two lemmas gives the key constraint on Tate-Shafarevich groups and
Selmer groups we will use to determine the image of the Dickson invariant. It
is one of the few places in this paper that the arithmetic of abelian
varieties comes crucially into play.

######  Lemma 7.4.2.

Let $\nu$ be an odd positive integer. Let $K$ be the function field of a curve
over a finite field, and let $A$ be an abelian variety over $K$ with a
polarization of degree prime to $\nu$. Then, there is a finite
$\mathbb{Z}/\nu\mathbb{Z}$ module $G$ so that either $\Sha(A)[\nu]\simeq
G^{2}$ or $\Sha(A)[\nu]\simeq G^{2}\oplus\mathbb{Z}/\nu\mathbb{Z}$.

######  Remark 7.4.3.

If we assume the BSD conjecture, $\Sha(A)$ will be finite and then the
assumptions that the polarization has degree prime to $\nu$ and $\nu$ is odd
will imply $\Sha(A)[\nu]$ has square order.

######  Remark 7.4.4.

The condition that the polarization has degree prime to $\nu$ is important
here: In general, even when the Tate-Shafarevich group is known to be finite,
it can fail to be a square or twice a square, see [CLQR04, p. 278, Theorem
1.4].

###### Proof.

To approach this, we first review some general facts about the structure of
the Tate-Shafarevich group. We can write
$\Sha(A)[\ell^{\infty}]\simeq(\mathbb{Q}_{\ell}/\mathbb{Z}_{\ell})^{r_{\ell}}\oplus
K_{\ell}$, where $K_{\ell}$ is a finite group and $r_{\ell}$ is the rank of
$\Sha(A)[\ell^{\infty}]$. Note that the BSD conjecture would imply
$r_{\ell}=0$, but we will not use this.

We next claim that $\oplus_{\ell\mid\nu}K_{\ell}\simeq
G_{\operatorname{nd}}^{2}$, for some finite $\mathbb{Z}/\nu\mathbb{Z}$ module
$G_{\operatorname{nd}}$. Indeed, let $\Sha(A)[\nu]_{\operatorname{nd}}$ denote
the non-divisible part of $\Sha(A)[\nu]$. Then,
$\Sha(A)[\nu]_{\operatorname{nd}}$ has a nondegenerate pairing, by [Tat63,
Theorem 3.2], which is antisymmetric by [Fla90, Theorem 1]. Since $\nu$ is
odd, any finite $\mathbb{Z}/\nu\mathbb{Z}$ module with an nondegenerate
antisymmetric pairing is a square, so there is some $\mathbb{Z}/\nu\mathbb{Z}$
module $G_{\operatorname{nd}}$ with $\Sha(A)[\nu]_{\operatorname{nd}}\simeq
G_{\operatorname{nd}}^{2}$.

We now conclude the proof. By [TY14, Corollary 1.0.3], $r_{\ell}$ has parity
independent of $\ell$. Write $\nu=\prod_{\ell\mid\nu}\ell^{a_{\ell}}$, and
take
$G=G_{\operatorname{nd}}\oplus(\mathbb{Z}/\ell^{a_{\ell}}\mathbb{Z})^{\lfloor\frac{r_{\ell}}{2}\rfloor}$.
We get $\Sha(A)[\nu]\simeq G^{2}$ if $r_{\ell}$ is even for all $\ell\mid\nu$.
Similarly, we get $\Sha(A)[\nu]\simeq G^{2}\oplus\mathbb{Z}/\nu\mathbb{Z}$ if
$r_{\ell}$ is odd for all $\ell\mid\nu$. ∎

######  Lemma 7.4.5.

Maintain hypotheses from 5.1.4 and notation from 7.4.1. Assume $\nu$ is odd,
$n>0$, and $B$ is an integral affine scheme with $2\nu$ invertible on $B$. Let
$b\in B$ be a closed point over which $\mathscr{F}_{b}\simeq A[\nu]$, for
$A\to U_{b}$ an abelian scheme, as in 5.1.9. The distributions
$X_{A[\nu]^{n}_{\mathbb{F}_{q}}}$ are supported on
$\mathcal{N}^{0}\coprod\mathcal{N}^{1}$. Hence,

(7.2)
$X_{A[\nu]^{n}_{\mathbb{F}_{q}}}=\operatorname{Prob}(X_{A[\nu]^{n}_{\mathbb{F}_{q}}}\in\mathcal{N}^{0})\cdot
X^{0}_{A[\nu]^{n}_{\mathbb{F}_{q}}}+\operatorname{Prob}(X_{A[\nu]^{n}_{\mathbb{F}_{q}}}\in\mathcal{N}^{1})\cdot
X^{1}_{A[\nu]^{n}_{\mathbb{F}_{q}}}.$

###### Proof.

The claim (7.2) follows from the first claim about the support of
$X_{A[\nu]^{n}_{\mathbb{F}_{q}}}$ by the law of total expectation. We now
verify $X_{A[\nu]^{n}_{\mathbb{F}_{q}}}$ are supported on
$\mathcal{N}^{0}\coprod\mathcal{N}^{1}$.

Using notation as in 5.1.11, it is enough to show the Selmer group of any
quadratic twist $A_{x}$ of $A$ lies in $\mathcal{N}^{0}$ or $\mathcal{N}^{1}$.
In general, there is an exact sequence

(7.3) ${0}$${A_{x}(U_{x})/\nu
A_{x}(U_{x})}$${\operatorname{Sel}_{\nu}(A_{x})}$${\Sha(A_{x})[\nu]}$${0.}$

By 7.4.2, $\Sha(A_{x})[\nu]$ lies in $\mathcal{N}^{0}\coprod\mathcal{N}^{1}$.
By 5.2.6(2’), $A_{x}[\nu]=0$, which implies that $A_{x}(U_{x})/\nu
A_{x}(U_{x})$ is a free $\mathbb{Z}/\nu\mathbb{Z}$ module. Hence, since
$\mathbb{Z}/\nu\mathbb{Z}$ is injective as a $\mathbb{Z}/\nu\mathbb{Z}$
module, the exact sequence (7.3) splits and we obtain
$\operatorname{Sel}_{\nu}(A_{x})\simeq A_{x}(U_{x})/\nu
A_{x}(U_{x})\oplus\Sha(A_{x})[\nu]$. Now, we see that since
$\Sha(A)[\nu]\in\mathcal{N}^{0}\coprod\mathcal{N}^{1}$ and $A_{x}(U_{x})/\nu
A_{x}(U_{x})$ is a free $\mathbb{Z}/\nu\mathbb{Z}$ module,
$\operatorname{Sel}_{\nu}(A_{x})\in\mathcal{N}^{0}\coprod\mathcal{N}^{1}$. ∎

Finally, we are prepared to compute the image of the Dickson invariant map.

######  Lemma 7.4.6.

Assume $\nu$ is odd, $n>0$, and $B$ is an integral affine base scheme $B$ with
$2\nu$ invertible on $B$. Suppose $b\in B$ is a closed point with finite
residue field, and keep hypotheses as in 5.1.4, 7.1.4. Assume there is an
abelian scheme $A\to U_{b}$ so that $\mathscr{F}_{b}\simeq A[\nu]$, as in
5.1.9. The Dickson invariant map
$D_{Q_{\mathscr{F}^{n}_{b}}}:\operatorname{O}(Q_{\mathscr{F}^{n}_{b}})\to\prod_{\ell\mid\nu}\mathbb{Z}/2\mathbb{Z}$
sends the arithmetic monodromy group
$\operatorname{im}(\rho_{\mathscr{F}^{n}_{b}})$ surjectively to the diagonal
copy of
$\Delta_{\mathbb{Z}/2\mathbb{Z}}:\mathbb{Z}/2\mathbb{Z}\subset\prod_{\ell\mid\nu}\mathbb{Z}/2\mathbb{Z}$.
The same holds for the geometric monodromy group at a geometric point
$\overline{b}$ over $b$.

###### Proof.

First, we argue it suffices to show the Dickson invariant of the arithmetic
monodromy group satisfies
$\operatorname{im}(D_{Q_{\mathscr{F}^{n}_{b}}}\circ\rho_{\mathscr{F}^{n}_{b}})\subset\operatorname{im}\Delta_{\mathbb{Z}/2\mathbb{Z}}.$
Indeed, for $\overline{b}$ a geometric point over $b$, the image of the
arithmetic monodromy group $D_{Q_{\mathscr{F}^{n}_{b}}}$ contains the image of
the geometric monodromy group $D_{Q_{\mathscr{F}^{n}_{\overline{b}}}}$.
Assuming we have shown the arithmetic monodromy has image the diagonal
$\mathbb{Z}/2\mathbb{Z}$ under the Dickson invariant map, to show they are
equal, it is enough to show the geometric monodromy has nontrivial image under
the Dickson invariant map. Equivalently, we wish to show the geometric
monodromy is not contained in the special orthogonal group, which follows from
Theorem 7.1.1.

We now verify the arithmetic monodromy group has Dickson invariant contained
in $\operatorname{im}\Delta_{\mathbb{Z}/2\mathbb{Z}}.$ The strategy will be to
use 7.4.5 to determine the arithmetic monodromy by relating the Dickson
invariant map to the parity of the rank of Selmer groups modulo different
primes, using equidistribution of Frobenius.

Choose $x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$. As a first
step, we identify $\operatorname{Sel}_{\nu}(A_{x})$ with the $1$-eigenspace of
$\rho_{\mathscr{F}^{n}_{b}}(\operatorname{Frob}_{x})$, for
$\operatorname{Frob}_{x}$ the geometric Frobenius at $x$. With notation as in
5.3.2, we can identify
$\pi^{-1}(x)(\mathbb{F}_{q})\simeq\operatorname{Sel}_{\nu}(A_{x})$. Since
$\pi^{-1}(x)(\mathbb{F}_{q})$ can be identified with the
$\operatorname{Frob}_{x}$ invariants of
$\pi^{-1}(x)(\overline{\mathbb{F}}_{q})$, if
$g_{x}:=\rho_{\mathscr{F}^{n}_{b}}(\operatorname{Frob}_{x})$, we also have
$\pi^{-1}(x)(\mathbb{F}_{q})\simeq\ker(g_{x}-\operatorname{\mathrm{id}})$.
Combining these two isomorphisms, we obtain
$\ker(g_{x}-\operatorname{\mathrm{id}})\simeq\operatorname{Sel}_{\nu}(A_{x})$.
For $\ell\mid\nu$, we use $g_{x,\ell}$ to denote the image of $g_{x}$ under
the map
${\rm{O}}(Q_{\mathscr{F}^{n}_{b}})\to{\rm{O}}(Q_{\mathscr{F}^{n}_{b}[\ell]})$.
We similarly obtain
$\ker(g_{x,\ell}-\operatorname{\mathrm{id}})\simeq\operatorname{Sel}_{\ell}(A_{x})$.

We next constrain the image of the Dickson invariant map applied to
$\rho_{\mathscr{F}^{n}_{b}}(\operatorname{Frob}_{x})$. From 7.4.5, we have
seen that
$\ker(g_{x}-\operatorname{\mathrm{id}})\simeq\operatorname{Sel}_{\nu}(A_{x})\in\mathcal{N}^{0}\coprod\mathcal{N}^{1}$,
for $\mathcal{N}^{i}$ defined in 7.4.1. Since the parity of the rank of
$H/\ell H$ of any group $H$ in $\mathcal{N}^{0}\coprod\mathcal{N}^{1}$ is
independent of the prime $\ell\mid\nu$, it follows that
$\dim\ker(g_{x,\ell}-\operatorname{\mathrm{id}})$ has parity of rank
independent of $\ell$, for $\ell\mid\nu$. By 2.1.3, we find

$\displaystyle\dim\ker(g_{x,\ell}-\operatorname{\mathrm{id}})\bmod
2\equiv\operatorname{rk}V_{\mathscr{F}^{n}_{b}[\ell]}-D_{Q_{\mathscr{F}^{n}_{b}}}(g_{x,\ell}).$

Since $\operatorname{rk}V_{\mathscr{F}^{n}_{b}[\ell]}$ is independent of
$\ell\mid\nu$, as $V_{\mathscr{F}^{n}_{b}}$ is a free
$\mathbb{Z}/\nu\mathbb{Z}$ module, we also obtain
$D_{Q_{\mathscr{F}^{n}_{b}}}(g_{x,\ell})$ is independent of $\ell\mid\nu$. In
other words, the Dickson invariant map factors through the diagonal copy
$\mathbb{Z}/2\mathbb{Z}$ for each Frobenius element associated to
$x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$.

The lemma will now follow from equidistribution of Frobenius elements in the
arithmetic fundamental group, as we next explain. At this point, we employ a
result on equidistribution of Frobenius, whose precise form we could not find
directly in the literature. The result is essentially [Cha97, Theorem 4.1]
(see also [Kow06, Theorem 1] and [FLR23, Theorem 3.9]) except that we need a
slightly more general statement which also applies to Deligne-Mumford stacks
in place of only schemes. The only part of the proof of [Cha97, Theorem 4.1]
which does not directly apply to stacks is its use of the Grothendieck-
Lefschetz trace formula, but this has been generalized to hold in the context
of stacks, see [Sun12, Theorem 4.2]. Using this, we can find a sufficiently
large $q$ and $x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$ with
the following property: the generator $\operatorname{Frob}_{x}$ of
$\pi_{1}(x)$ is sent to any particular element of
$\operatorname{im}(D_{Q_{\mathscr{F}^{n}_{b}}}\circ\rho_{\mathscr{F}^{n}_{b}})$
under the composition
$\pi_{1}(x)\to\pi_{1}(\operatorname{QTwist}^{n}_{U_{b}/b})\xrightarrow{D_{Q_{\mathscr{F}^{n}_{b}}}\circ\rho_{\mathscr{F}^{n}_{b}}}\prod_{\ell\mid\nu}\mathbb{Z}/2\mathbb{Z}$.
For our choice of $q$ above, note that we may need to take $q$ to be suitably
large, and also if $q=p^{j}$ for
$p=\operatorname{\operatorname{char}}\mathbb{F}_{q}$ we may need to impose a
congruence condition on $j$. Therefore, since every $\operatorname{Frob}_{x}$
has image contained in the diagonal $\mathbb{Z}/2\mathbb{Z}$, the same must be
true of
$\operatorname{im}(D_{Q_{\mathscr{F}^{n}_{b}}}\circ\rho_{\mathscr{F}^{n}_{b}})$.
∎

##  8\. The rank double cover

Perhaps surprisingly, the distribution of Selmer groups of abelian varieties
is not determined by its moments. As mentioned in the introduction, if one
fixes the parity of the rank of $\operatorname{Sel}_{\ell}$, this does not
change the distribution of Selmer groups. Even more surprisingly, once one
does condition on the parity of the rank of $\operatorname{Sel}_{\ell}$, the
BKLPR distribution is determined by its moments. In this section, we
investigate the geometry associated to a certain double cover of
$\operatorname{QTwist}^{n}_{U/B}$, which we define in § 8.1. In § 8.2, we will
use our homological stability machinery to bound the dimensions of the
cohomology of this double cover. In § 8.3, we relate this double cover to the
parity of the dimension of $\operatorname{Sel}_{\ell}$ of an abelian variety.
Specifically, suppose we are given a symplectically self-dual sheaf
$\mathscr{F}$ on $U$, and a point $b\in B$ with $\mathscr{F}\simeq A[\nu]$,
for $A\to U_{b}$ an abelian scheme. We will define a particular double cover
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$ of
$\operatorname{QTwist}^{n}_{U/B}$ so that the images
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}(\mathbb{F}_{q})\to\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$
corresponds precisely to abelian varieties whose rank has parity equal to
$\operatorname{rk}V_{\mathscr{F}^{n}_{B}}\bmod 2$.

###  8.1. The rank double cover and its coefficient system

We now define the rank double cover, and subsequently proceed to show the
sequence of rank double covers form a coefficient system.

######  Definition 8.1.1.

With notation as in 7.1.1, let
$\operatorname{pr}_{1}:\prod_{\ell\mid\nu}\mathbb{Z}/2\mathbb{Z}\to\mathbb{Z}/2\mathbb{Z}$
denote the projection onto the first factor. We define
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}\to\operatorname{QTwist}^{n}_{U/B}$
as the finite étale double cover corresponding to the map
$\operatorname{pr}_{1}\circ
D_{Q_{\mathscr{F}^{n}_{B}}}\circ\rho_{\mathscr{F}^{n}_{B}}:\pi_{1}(\operatorname{QTwist}^{n}_{C/B})\to\mathbb{Z}/2\mathbb{Z}$.

In order to describe the coefficient system associated to the rank double
cover, we first describe the coefficient system associated to Selmer spaces,
and their $H$-moments.

######  Example 8.1.2.

Let $B=\operatorname{Spec}\mathbb{C}$ and let $\mathscr{F}$ be a
symplectically self-dual sheaf over $U$ as in 5.1.4. Fix a nontrivial finite
$\mathbb{Z}/\nu\mathbb{Z}$ module $H$. With notation as in 3.1.9, consider the
coefficient system $H_{S_{\mathscr{F},H,g,f}}$ whose $n$th part is the free
vector space generated by $S_{\mathscr{F}^{n}_{B},H,g,f}$ as we now define.
Take
$G_{H}:=\operatorname{\mathrm{A}^{\operatorname{H}}\mathrm{Sp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$,
as in (6.7), and, with notation as in (6.7), take
$c_{H}:=\Pi^{-1}(-\operatorname{\mathrm{id}})$. Take
$S_{\mathscr{F}^{n}_{B},H,g,f}\subset\mathrm{Hom}(\pi_{1}(X^{\oplus n}\oplus
A_{g,f}-x^{\oplus n},p_{g,f}),G_{H})$ to the same subset $\mathcal{S}$
described in 6.4.1. (So, in the notation of 3.1.9, we are calling
$S_{\mathscr{F}^{n}_{B},H,g,f}$ what we called $T^{n}_{G_{H},c_{H},g,f}$ in
3.1.9.) More precisely,
$S_{\mathscr{F}^{n}_{B},H,g,f}\subset\mathrm{Hom}(\pi_{1}(X^{\oplus n}\oplus
A_{g,f}-x^{\oplus n},p_{g,f}),G_{H})$ is the subset where the loops around the
$n$ punctures lie in $c_{H}$, the image of the local inertia around the $f+1$
punctures is fixed under composition with
$G_{H}\to\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ and the
image of any $\phi\in S_{\mathscr{F}^{n}_{B},H,g,f}$ under composition with
$G_{H}\to\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})/\\{\pm 1\\}$ is
independent of $\phi$. So long as we choose the basepoint $p_{g,f}$ to lie on
the boundary of $A_{g,f}$, We can also restrict any homomorphism
$\mathrm{Hom}(\pi_{1}(X^{\oplus n}\oplus A_{g,f}-x^{\oplus n},p_{g,f}),G_{H})$
to a homomorphism $\mathrm{Hom}(\pi_{1}(X^{\oplus n}-x^{\oplus
n},p_{g,f}),G_{H})$. We denote by
$S_{\mathscr{F}^{n}_{B},H,0,0}\subset\mathrm{Hom}(\pi_{1}(X^{\oplus
n}-x^{\oplus n},p_{g,f}),G_{H})$ the restriction of
$S_{\mathscr{F}^{n}_{B},H,g,f}$ to $\mathrm{Hom}(\pi_{1}(X^{\oplus
n}-x^{\oplus n},p_{g,f}),G_{H})$. Define $H_{S_{\mathscr{F},H,0,0}}$ to be the
associated coefficient system, whose $n$th piece is
$H_{S_{\mathscr{F}^{n}_{B},H,0,0}}$, the free vector space generated by
$S_{\mathscr{F}^{n}_{B},H,0,0}$.

Take $V:=H_{S_{\mathscr{F},H,0,0}}$ and take $F:=H_{S_{\mathscr{F},H,g,f}}$.
We claim that $V$ forms a coefficient system for $\Sigma^{1}_{0,0}$ and $F$
forms a coefficient system for $\Sigma^{1}_{g,f}$ over $V$. Indeed, these sets
$S_{\mathscr{F}^{n}_{B},H,g,f}$ are fixed under the action of $B^{n}_{g,f}$ by
6.4.3. Hence, they form coefficient systems by 3.1.9.

We use the notation $\operatorname{Hur}_{S_{\mathscr{F}^{n}_{B},H,g,f}}$ to
denote the finite unramified covering space over
$\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}}$ corresponding to the
kernel of the finite image representation
$\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}},x^{\oplus
n})\to\operatorname{Aut}(F_{n})$.

We next aim to define the coefficient system associated to the rank double
cover. In order to define it and show the rank double cover is indeed a
coefficient system, we will need some different ways of thinking about the
rank double cover. As a first step to describing it explicitly, the rank
double cover is a $\mathbb{Z}/2\mathbb{Z}$ gerbe over its coarse space, and
the next two lemmas allow us to give some description of what this gerbe looks
like.

######  Lemma 8.1.3.

Let $X$ be a finite type connected scheme over a finite type base $B$ on which
$2$ is invertible. Let $\mathscr{X}$ denote a $\mu_{2}$ gerbe over $X$.
Suppose we are given a finite étale double cover $\mathscr{Y}\to\mathscr{X}$.
Then there is some $Y\to X$ so that $\mathscr{Y}\simeq Y\times_{X}\mathscr{X}$
if and only if $\mathscr{Y}\not\simeq X$. Moreover, if $\mathscr{Y}\simeq X$,
the fiber of $\mathscr{Y}$ over the residual $B\mu_{2}$ gerbe at a geometric
point of $\mathscr{X}$ is the residue field, while otherwise, the fiber over a
residual gerbe at a geometric point is two copies of $B\mu_{2}$. In the case
that $\mathscr{Y}$ is pulled back from $X$, $Y$ is the coarse space of
$\mathscr{Y}$.

######  Remark 8.1.4.

In the statement of 8.1.3 that $\mathscr{Y}\simeq Y\times_{X}\mathscr{X}$, the
implicit map $\mathscr{X}\to X$ is the map realizing $X$ as the coarse space
of $\mathscr{X}$.

###### Proof.

First, suppose $\mathscr{Y}\simeq X$. Suppose, for sake of contradiction some
$Y$ exists so that $\mathscr{Y}$ is the pullback of $Y$. Since the composition
$X\to\mathscr{X}\to X$ is the identity, we obtain a map $X\to Y$, which would
force $Y=X\coprod X$. But the pullback $\mathscr{X}\times_{X}(X\coprod X)$ is
not $X$, but rather $\mathscr{X}\coprod\mathscr{X}$. In this case,
$X\to\mathscr{X}$ is the trivial gerbe, so $\mathscr{X}\simeq
X\times_{B}B(\mu_{2})$.

For the other case, suppose $\mathscr{Y}\to\mathscr{X}$ is a finite étale
double cover, not isomorphic to $X$. Let $Y$ be the coarse space of
$\mathscr{Y}$. If $\mathscr{Y}$ were a scheme, since it has a degree $2$ map
to $\mathscr{X}$, it would have a degree $1$ map to $X$, forcing $Y\simeq X$.
Since $Y$ is not isomorphic to $X$, it cannot be a scheme, and so must be a
$\mu_{2}$ gerbe over its coarse space $Y$. This implies $Y\to X$ is a finite
étale double cover. Then, $\mathscr{Y}=Y\times_{X}{\mathscr{X}}$, as may be
verified on an étale cover of $X$ trivializing the gerbe $\mathscr{X}$. In
this case, the fiber over the residual gerbe at a geometric point is
identified with a gerbe over the fiber of $Y\to X$, and so is two geometric
points. ∎

######  Lemma 8.1.5.

In the setting of 8.1.1, suppose $B=\operatorname{Spec}k,$ for $k$ a field of
characteristic not $2$. If $\dim V_{\mathscr{F}^{n}_{B}}$ is odd,
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$ is the coarse
space of $\operatorname{QTwist}^{n}_{U/B}$. If $\dim V_{\mathscr{F}^{n}_{B}}$
is even this cover is pulled back from the coarse space of
$\operatorname{QTwist}^{n}_{U/B}$. That is, letting
$\operatorname{QTwist}^{\operatorname{coarse},n}_{U/B}$ denote the coarse
space of $\operatorname{QTwist}^{n}_{U/B}$ and
$\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}}$
denote the coarse space of
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$, there exists a
finite étale double cover
$\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}}\to\operatorname{QTwist}^{\operatorname{coarse},n}_{\mathscr{F}}$
so that

(8.1)
${\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}}$${\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}}}$${\operatorname{QTwist}^{n}_{U/B}}$${\operatorname{QTwist}^{\operatorname{coarse},n}_{U/B}}$

is a fiber square.

###### Proof.

First, to understand the relevance of the parity of the dimension of
$V_{\mathscr{F}^{n}_{B}}$, we consider the action of the the nontrivial
element of the isotropy group group at a geometric point
$x\in\operatorname{QTwist}^{n}_{U/B}$. If this element of the isotropy group
acts nontrivially on the double cover, the fiber of the double cover is a copy
of the field, while if it acts trivially, the fiber is two copies of
$B\mu_{2}$. The point $x$ corresponds to a double cover $X_{x}\to C_{x}$. The
element of the isotropy group corresponds to the nontrivial automorphism of
$X_{x}$ over $C_{x}$, which acts by $-1$ on $A_{x}$ from its definition as a
quadratic twist 5.1.4. Hence, this automorphism also acts by $-1$ on
$(V_{\mathscr{F}^{n}_{B}})_{x}=H^{1}(C_{x},(j_{x})_{*}A_{x})$, which is the
fiber of $\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ over $x$. The induced
action on the double cover corresponding to the Dickson invariant is therefore
obtained from the determinant of multiplication by $-1$, which $(-1)^{\dim
V}$. Hence, the Dickson invariant is trivial if $\dim V_{\mathscr{F}^{n}_{B}}$
is even, and nontrivial if $\dim V_{\mathscr{F}^{n}_{B}}$ is odd.

By 8.1.3, when $\dim V_{\mathscr{F}^{n}_{B}}$ is odd,
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$ is
$\operatorname{QTwist}^{\operatorname{coarse},n}_{U/B}$. If instead $\dim
V_{\mathscr{F}^{n}_{B}}$ is even, it follows from 8.1.3 that

$\displaystyle\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}\simeq\operatorname{QTwist}^{n}_{U/B}\times_{\operatorname{QTwist}^{\operatorname{coarse},n}_{U/B}}\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}},$

as we wished to show. ∎

Next, it will be useful to have a description of how certain generators act on
the rank double cover, in order to show it is a coefficient system over the
trivial coefficient system for $\Sigma^{1}_{0,0}$. Using 8.1.5, when
$\operatorname{rk}V_{\mathscr{F}^{n}_{B}}$ is odd, it is not too difficult to
see that the rank double cover will correspond to a coefficient system. The
trickier case to analyze is that when
$\operatorname{rk}V_{\mathscr{F}^{n}_{B}}$ is even, and the following lemma
will help us with this.

######  Lemma 8.1.6.

We use notation for $s_{i}$ and $\gamma_{i}$ as in § 6.2. For $n$ even, and
$B=\operatorname{Spec}\mathbb{C}$, and
$\operatorname{rk}V_{\mathscr{F}^{n}_{B}}$ is even, generators of
$\pi_{1}(\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}})$
mapping to the following generators of
$\pi_{1}(\operatorname{Conf}^{n}_{\Sigma^{1}_{g,f}})$ act on
$V_{\mathscr{F}^{n}_{B}}$ with the Dickson invariants as claimed:

  1. (1)

There is a partition $\Delta_{0}\coprod\Delta_{1}=\\{s_{1},\ldots,s_{f+1}\\}$
not depending on $n$ or $j$ such that moving any of the $p_{j}$, for $1\leq
j\leq n$, around any $s\in\Delta_{0}$ acts with trivial Dickson invariant and
moving it around any $s\in\Delta_{1}$ acts with nontrivial Dickson invariant.

  2. (2)

Moving $\gamma_{i}$ in a half-twist about $\gamma_{i+1}$ acts with trivial
Dickson invariant.

We note that 8.1.6 can also be deduced directly from the explicit formula for
the action of $\pi_{1}(\operatorname{Conf}^{n}_{\Sigma^{1}_{g,f}})$ on
$\pi_{1}(\Sigma^{1}_{g,f})$. This action can be obtained from the presentation
for $\pi_{1}(\operatorname{Conf}^{n}_{\Sigma^{1}_{g,f}})$ [Bel04, Theorem
1.1]. One can use this in conjunction with the description of
$V_{\mathscr{F}^{n}_{B}}$ in 6.3.7 to verify 8.1.6 computationally. However,
it seems the argument we give here is a bit simpler.

###### Proof.

First, we verify $(1)$. First, we fix $n$, and explain independence of $j$.
The double cover is described in terms of a surjection from a finite index
subgroup of $B^{n}_{g,f}$ to $\mathbb{Z}/2\mathbb{Z}$. Whether the monodromy
is trivial or nontrivial is only a function of the conjugacy class of the
element. Since the loops sending $p_{j}$ around a fixed $s_{i}$ are all
conjugate in $B^{n}_{g,f}$, as well as in the finite index subgroup
$\pi_{1}(\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}})$,
we obtain independence of $j$. We can further obtain that this description is
independent of $n$ by using that the coarse spaces of the covers
$\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ correspond to the coefficient
system as in 8.1.2, and hence restrict compatibly to subsurfaces for smaller
values of $n$.

We now turn to part $(2)$. Fixing a point
$[\mathscr{F}^{\prime}]\in\operatorname{QTwist}^{n}_{U/B}$, we use the
description of torsors for $\mathscr{F}^{\prime}$ given in 6.3.7. Without
resorting to the formulas present in [Bel04, Theorem 1.1], we know there must
be some formula expressing the result of passing $\gamma_{i}$ in a half twist
about $\gamma_{i+1}$ as a product of matrix entries appearing in 6.3.7.
Viewing each monodromy matrix associated to $\gamma_{i}$ as lying in
$\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ and reducing to
$\pm\operatorname{\mathrm{id}}$ in
$\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$, we find that there is no
interaction between the different basis vectors for the vector $v$ in the
presentation (6.3). Therefore, the action can be viewed as a block diagonal
matrix with $2r$ blocks, corresponding to the $2r$ entries of $v$. Since all
of these blocks are the same, the determinant of the resulting matrix is the
$2r$th power of another matrix, and therefore its determinant must be a
square. Hence the Dickson invariant is trivial, as claimed. ∎

Building on 8.1.2, we next describe the coefficient system corresponding to
the rank double cover.

######  Example 8.1.7.

For simplicity, we work over the complex numbers in this example. With
notation as in 3.1.9, and 8.1.2, define the coefficient system
$H^{\operatorname{rk}}_{g,f}$ for $\Sigma_{g,f}^{1}$ over the trivial
coefficient system $V$ from 3.1.11 as follows: Let
$H^{\operatorname{rk}}_{g,f}$ denote the coefficient system corresponding to
the coarse space of the cover
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}\to\operatorname{Conf}^{n}_{U/B}$.
In particular, $(H^{\operatorname{rk}}_{g,f})_{0}$ is either dimension
$2^{2g}$ or $2^{2g+1}$ depending on whether
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$ is the coarse
space of $\operatorname{QTwist}^{n}_{U/B}$ or not, as in 8.1.5.

We next check this is indeed a coefficient system. Note that the coarse space
of $\operatorname{Sel}_{\mathscr{F}^{n}_{B}}$ is identified with the finite
étale cover of $\operatorname{Conf}^{n}_{U/B}$ corresponding to the
coefficient system $H_{S_{\mathscr{F},H,g,f}}$ (after quotienting by the
$G_{H}$ conjugation action, and taking the cover associated to the kernel of
the $B^{n}_{g,f}$ representation) by 6.4.5. Moreover, depending on the parity
of the rank of $V_{\mathscr{F}^{n}_{B}}$, (which is independent of $n$,) it
follows from 8.1.5 that
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$ is either the
coarse space of $\operatorname{QTwist}^{n}_{U/B}$ when $\dim
V_{\mathscr{F}^{n}_{B}}$ is odd or is a double cover of the coarse space of
$\operatorname{QTwist}^{n}_{U/B}$ when $\dim V_{\mathscr{F}^{n}_{B}}$ is even.
The coarse space itself is expressible as a coefficient system for
$\Sigma^{1}_{g,f}$ over the trivial coefficient system for $\Sigma^{1}_{0,0}$,
so we now focus on the other case that $\dim V_{\mathscr{F}^{n}_{B}}$ is even.

In the case that $\dim V_{\mathscr{F}^{n}_{B}}$ is even, so the coarse space
of $\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$ is a double
cover of the coarse space of $\operatorname{QTwist}^{n}_{U/B}$, we claim this
is also a sequence of covers associated to a coefficient system for
$\Sigma^{1}_{g,f}$ over the trivial coefficient system for $\Sigma^{1}_{0,0}$.
Indeed, this holds because $H_{S_{\mathscr{F},H,g,f}}$ forms a coefficient
system for $\Sigma^{1}_{g,f}$ and taking determinants is compatible with
restricting to subsurfaces. Note that the Dickson invariant is trivial upon
the restriction of $H_{S_{\mathscr{F},H,g,f}}$ along $X^{\oplus n}\to
X^{\oplus n}\oplus A_{g,f}$, by 8.1.6, and so $H^{\operatorname{rk}}_{g,f}$
defines a coefficient system for $\Sigma^{1}_{g,f}$ over the trivial
coefficient system for $\Sigma^{1}_{0,0}$.

Taking the tensor product of covers associated to $H$ moments and the rank
double cover, we finally obtain coefficient systems associated to their fiber
product.

######  Example 8.1.8.

Continuing with notation as in 8.1.7, define the tensor product of coefficient
systems
$H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}:=H^{\operatorname{rk}}_{g,f}\otimes
H_{S_{\mathscr{F},H,g,f}}$, as in 3.1.12. Take $V:=H_{S_{\mathscr{F},H,0,0}}$
and $F:=H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$. Then, $F$ is a
coefficient system over $V$ by 3.1.12, since $H^{\operatorname{rk}}_{g,f}$ is
a coefficient system over the trivial coefficient system, as in 3.1.11. Let
$\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$ denote the
finite covering space of $\operatorname{Conf}^{n}_{U/B}$ corresponding to the
finite monodromy local system $H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$,
see 8.2.1. When $n$ is even, since tensor products of coefficient systems
correspond to fiber products of covers, after taking the topological space
quotient of $\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$
by the conjugation action of $G_{H}$, we obtain the analytification of the
finite étale cover over $\operatorname{Conf}^{n}_{U/B}$ given by
$\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}\times_{\operatorname{Conf}^{n}_{U/B}}\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}}$.
Therefore, $\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$ is
a finite covering space of
$\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}\times_{\operatorname{QTwist}^{n}_{U/B}}\operatorname{QTwist}^{\operatorname{coarse},\operatorname{rk},n}_{\mathscr{F}}$.

###  8.2. Homological stability of the rank double cover

We next set out to prove the main homological stability properties for the
spaces related to Selmer groups we are interested in. Namely, in 8.2.3 we will
prove these results for the Selmer stacks, the rank double cover, and moments
associated to both of these.

######  Notation 8.2.1.

Let $H$ be a finite $\mathbb{Z}/\nu\mathbb{Z}$ module of the form
$H\simeq\prod_{i=1}^{m}\mathbb{Z}/\nu_{i}\mathbb{Z}$. For $\mathscr{F}$ a
symplectically self-dual sheaf of $\mathbb{Z}/\nu\mathbb{Z}$ modules, and
hypotheses as in 5.1.4 and 5.1.6, define

$\displaystyle\operatorname{Sel}_{\mathscr{F}^{n}_{B}}^{H}:=\operatorname{Sel}_{\mathscr{F}[\nu_{1}]^{n}_{B}}\times_{\operatorname{QTwist}^{n}_{U/B}}\operatorname{Sel}_{\mathscr{F}[\nu_{2}]^{n}_{B}}\times_{\operatorname{QTwist}^{n}_{U/B}}\cdots\operatorname{Sel}_{\mathscr{F}[\nu_{m}]^{n}_{B}}.$

Also define
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{B}}:=\operatorname{Sel}_{\mathscr{F}^{n}_{B}}^{H}\times_{\operatorname{QTwist}^{n}_{U/B}}\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$
an define
$\operatorname{Hur}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{B}}:=\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{B}}\times_{\operatorname{QTwist}^{n}_{U/B}}\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}$.

We use the notation
$\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}$ to
denote the finite unramified covering space over
$\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}}$ corresponding to the
kernel of the finite image representation
$\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}},x^{\oplus
n})\to\operatorname{Aut}(H^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}).$

######  Lemma 8.2.2.

The hypotheses of 4.3.4 are satisfied if $V=H_{S_{\mathscr{F},H,0,0}}$ and $F$
is either $H_{S_{\mathscr{F},H,g,f}}$ or
$F=H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$.

###### Proof.

We consider two cases:

  1. (1)

$V=H_{S_{\mathscr{F},H,0,0}}$ and $F=H_{S_{\mathscr{F},H,g,f}}$,

  2. (2)

$V=H_{S_{\mathscr{F},H,0,0}}$ and
$F=H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$,

Note that by 8.1.2 and 8.1.7, $V$ and $F$ are indeed coefficient systems. We
will first consider case $(1)$ and show the existence of a homogeneous central
$U$ in $R^{V}$ of positive degree finite kernel and cokernel of finite degree.
Note that $c_{H}$ typically does not generate
$G_{H}=\operatorname{\mathrm{A}^{\operatorname{H}}\mathrm{Sp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$
but instead generates the preimage of $\\{\pm
1\\}\subset\mathrm{Sp}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$ in $G_{H}$. Let
$S_{H}\subset G_{H}$ denote the subgroup generated by $c_{H}$. Note that
$S_{H}$ has order $2\bmod 4$ because $\nu$ is odd. Then, $(S_{H},C_{H})$ is
non-splitting in the sense of [EVW16, Definition 3.1] by [EVW16, Lemma 3.2].
It then follows from [EVW16, Lemma 3.5] that there is a homogeneous central
$U$ of positive degree with finite degree kernel and cokernel.

We can deduce case (2) from case (1). Namely, taking the same operator $U$ as
in part $(1)$ we can view $F=H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$ as
a finitely many copies of $F=H_{S_{\mathscr{F},H,g,f}}$ (either $2^{2g}$ or
$2^{2g+1}$ depending on whether $\operatorname{rk}V_{\mathscr{F}^{n}_{B}}$ is
odd or even by 8.1.5). Since we have already shown in the first case that the
action of $U$ on $H_{S_{\mathscr{F},H,g,f}}$ has kernel and cokernel of finite
degree, the same holds for the action of $U$ on
$F=H^{\operatorname{rk}}_{S_{\mathscr{F},H,g,f}}$. ∎

######  Lemma 8.2.3.

Let $H$ be a finite $\mathbb{Z}/\nu\mathbb{Z}$ module and
$B=\operatorname{Spec}\mathbb{C}$. Working over the field
$\mathbb{Z}/\ell^{\prime}\mathbb{Z}$, with $\ell^{\prime}$ relatively prime to
$2,q$, and $\\#\operatorname{\mathrm{ASp}}_{2r}(\mathbb{Z}/\nu\mathbb{Z})$,
there is a constant $K$ depending on $H$ but not on $n$, for $n$ even, so that

(8.2) $\displaystyle\dim H^{i}(\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus
n}\oplus A_{g,f}},x^{\oplus n}),H_{S_{\mathscr{F}^{n}_{B},H,g,f}})$
$\displaystyle<K^{i+1}\text{ and}$ $\displaystyle\dim
H^{i}(\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}},x^{\oplus
n}),H^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}n)$
$\displaystyle<K^{i+1}.$

Suppose $\mathscr{F}$ is as in 6.4.4. Then,

(8.3) $\displaystyle\dim
H^{i}(\operatorname{Sel}_{\mathscr{F}^{n}_{\mathbb{C}}}^{H},\mathbb{Z}/\ell^{\prime}\mathbb{Z})$
$\displaystyle<K^{i+1}\text{ and }$ $\displaystyle\dim
H^{i}(\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}},\mathbb{Z}/\ell^{\prime}\mathbb{Z})$
$\displaystyle<K^{i+1}.$

###### Proof.

First, the bound (8.2) follows from 4.3.4 whose hypotheses are verified by
8.2.2.

For (8.3), note that in order to bound the homology of
$\operatorname{Sel}_{\mathscr{F}^{n}_{\mathbb{C}}}^{H}$, by transfer and the
assumption that $\ell^{\prime}\neq 2$, it suffices to bound the homology of
its finite étale double cover
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}$.
(This uses that components of
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}$ are
either a scheme or a $\mathbb{Z}/2\mathbb{Z}$ gerbe over a scheme, and the
cohomology of such a gerbe is isomorphic to the cohomology of its coarse
space.)

We use the notation $\operatorname{Hur}_{S_{\mathscr{F}^{n}_{B},H,g,f}}$ and
$\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}$ for
the finite unramified covering space over $\operatorname{Conf}^{n}_{X^{\oplus
n}\oplus A_{g,f}}$ corresponding to the kernel of the finite image
representations $\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus n}\oplus
A_{g,f}},x^{\oplus
n})\to\operatorname{Aut}(\operatorname{H}_{S_{\mathscr{F}^{n}_{B},H,g,f}})$
and $\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}},x^{\oplus
n})\to\operatorname{Aut}(H^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}).$
From the definition, we have

$\displaystyle
H^{i}(\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}},\mathbb{Z}/\ell^{\prime}\mathbb{Z})\simeq
H^{i}(\pi_{1}(\operatorname{Conf}^{n}_{X^{\oplus n}\oplus A_{g,f}},x^{\oplus
n}),H_{S_{\mathscr{F}^{n}_{B},H,g,f}}).$

To conclude the final statement for bounding the homology of
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}$, by
transfer, it suffices to show
$\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}$
defines a finite étale cover of the coarse space of
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}$. We
next use the isomorphism
$\operatorname{Sel}_{\mathscr{F}^{n}_{\mathbb{C}}}^{H}\to\operatorname{Hur}^{H}_{\mathscr{F}^{n}_{\mathbb{C}}}$
from 6.4.8 over $\operatorname{QTwist}^{n}_{U/B}$, which also yields the
identification
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}\simeq\operatorname{Hur}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}$.
It therefore suffices to show
$\operatorname{Hur}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{\mathbb{C}}}$ has
the same homology as a space which has a a finite covering space by
$\operatorname{Hur}^{\operatorname{rk}}_{S_{\mathscr{F}^{n}_{B},H,g,f}}$. This
was shown in 8.1.8. ∎

######  Remark 8.2.4.

The Hurwitz stacks and Selmer stacks, whose cohomology we analyze in 8.2.3
have (up to finite index issues) an action of $\operatorname{Mod}_{g,f}$ the
mapping class group of a genus $g$, $f$-punctured surface. Hence, their stable
cohomology groups are $\operatorname{Mod}_{g,f}$ representations. It would be
extremely interesting to determine which representations these are. A
precursor to doing so would be to compute the dimension of these
representations. We also cannot rule out the possibility these dimensions are
$0$, and so the representations are not particularly interesting. See also
9.2.5

###  8.3. Relation between the rank double cover and parity of rank

Our main reason for introducing the rank double cover is that it tells us
about the parity of the rank of $\operatorname{Sel}_{\ell}$, as we next
explain. For the next statement, recall the definition of $\mathcal{N}^{i}$
from 7.4.1.

######  Lemma 8.3.1.

Assume $\nu$ is odd, $n>0$ is even, and $B$ is an integral affine scheme with
$2\nu$ invertible on $B$. Let $b\in B$ a closed point with residue field
$\mathbb{F}_{q_{0}}$. Let $\mathbb{F}_{q}$ be a finite extension of
$\mathbb{F}_{q_{0}}$. Use hypotheses as in 5.1.4, 7.1.4, and 5.1.9, so
$\mathscr{F}_{b}\simeq A[\nu]$. Let $\ell\mid\nu$ and
$i:=\operatorname{rk}V_{\mathscr{F}^{n}_{b}}\bmod 2\in\\{0,1\\}$. Then, for
$x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$,
$\operatorname{Sel}_{\nu}(A_{x})\in\mathcal{N}^{i}$ if and only if $x$ lies in
the image of
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}(\mathbb{F}_{q})\to\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$.

###### Proof.

Let $g_{x}:=\rho_{\mathscr{F}^{n}_{b}}(\operatorname{Frob}_{x})$, and for
$\ell\mid\nu$, we use $g_{x,\ell}$ to denote the image of $g_{x}$ under the
map
${\rm{O}}(Q_{\mathscr{F}^{n}_{b}})\to{\rm{O}}(Q_{\mathscr{F}^{n}_{b}[\ell]})$.
First, (2.1) yields

$\displaystyle\dim\ker(g_{x,\ell}-\operatorname{\mathrm{id}})\bmod
2\equiv\operatorname{rk}V_{\mathscr{F}^{n}_{b}[\ell]}-D_{Q_{\mathscr{F}^{n}_{b}}}(g_{x,\ell})\bmod
2.$

Next, 5.3.2 gives
$\ker(g_{x}-\operatorname{\mathrm{id}})\simeq\operatorname{Sel}_{\nu}(A_{x})$.
Combining these, we find

$\displaystyle
D_{Q_{\mathscr{F}^{n}_{b}}}(g_{x,\ell})\equiv\operatorname{rk}V_{\mathscr{F}^{n}_{b}[\ell]}-\dim\ker(g_{x,\ell}-\operatorname{\mathrm{id}})\equiv
V_{\mathscr{F}^{n}_{b}}-\dim\operatorname{Sel}_{\ell}(A_{x})\bmod 2.$

Since this holds for every $\ell\mid\nu$, we find that
$D_{Q_{\mathscr{F}^{n}_{b}}}(g_{x,\ell})$ takes the value $0$ if and only if
$\operatorname{rk}V_{\mathscr{F}^{n}_{b}[\ell]}\equiv\dim\operatorname{Sel}_{\ell}(A_{x})\bmod
2$. Since the finite étale double cover
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}\to\operatorname{QTwist}^{n}_{U_{b}/b}$
is trivial over each $\mathbb{F}_{q}$ point with trivial Dickson invariant,
$D_{Q_{\mathscr{F}^{n}_{b}}}(g_{x,\ell})$ takes the value $0$ if and only if
$x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$ is in the image of
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}}(\mathbb{F}_{q})$.
We conclude the result because
$\operatorname{rk}V_{\mathscr{F}^{n}_{b}[\ell]}\equiv\dim\operatorname{Sel}_{\ell}(A_{x})$
can be restated as $\operatorname{Sel}_{\nu}(A_{x})\in\mathcal{N}^{i}$, with
$i=\operatorname{rk}V_{\mathscr{F}^{n}_{b}}\bmod 2$. ∎

We now use the previous lemma to show that the distribution of Selmer elements
on the double cover controlling the parity of the rank agrees with the locus
of points on the base where the rank of $\operatorname{Sel}_{\ell}$ has a
specified parity. This is a fairly trivial observation, but allows us to
connect moments of the rank double cover to moments of the space of quadratic
twists with specified parity of rank of $\operatorname{Sel}_{\ell}$. This
plays a key role in proving our main theorem, Theorem 1.1.2. For this, recall
the definition of $X^{i}_{A[\nu]^{n}_{\mathbb{F}_{q}}}$ from 7.4.1.

######  Lemma 8.3.2.

With assumptions and notation as in 8.3.1, so in particular,
$i:=\operatorname{rk}V_{\mathscr{F}^{n}_{b}}\bmod 2\in\\{0,1\\}$, we have

(8.4)
$\displaystyle\frac{\\#\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{b}}(\mathbb{F}_{q})}{\\#\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}(\mathbb{F}_{q})}=\mathbb{E}(\\#\mathrm{Hom}(X^{i}_{A[\nu]^{n}_{\mathbb{F}_{q}}},H)).$

###### Proof.

Using 8.3.1, the distribution $X^{i}_{A[\nu]^{n}_{\mathbb{F}_{q}}}$ agrees
with the distribution of Selmer groups at points
$x\in\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$ in the image of
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}(\mathbb{F}_{q})\to\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q})$.
Since
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}\to\operatorname{QTwist}^{n}_{U_{b}/b}$
is a finite étale double cover, each $\mathbb{F}_{q}$ point of
$\operatorname{QTwist}^{n}_{U_{b}/b}$ in the image of a $\mathbb{F}_{q}$ point
of $\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}$ has exactly
two $\mathbb{F}_{q}$ points in its preimage. This means that, for $y$ varying
over points of
$\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}(\mathbb{F}_{q})$
and $K\in\mathcal{N}$ a finite $\mathbb{Z}/\nu\mathbb{Z}$ module,

$\displaystyle\operatorname{Prob}(X^{i}_{A[\nu]^{n}_{\mathbb{F}_{q}}}\simeq
K)$
$\displaystyle=\operatorname{Prob}\left(\operatorname{Sel}_{\nu}(A_{x})\simeq
K|x\in\operatorname{im}(\operatorname{QTwist}^{\operatorname{rk},n}_{\mathscr{F}_{b}}(\mathbb{F}_{q})\to\operatorname{QTwist}^{n}_{U_{b}/b}(\mathbb{F}_{q}))\right)$
$\displaystyle=\operatorname{Prob}(\operatorname{Sel}_{\nu}(A_{y})\simeq K).$

Taking the expectation of the number of maps to $H$, which is the same as the
number of maps from $H$, it is enough to show the left hand side of (8.4) is
the expected number of maps from $H$ to $\operatorname{Sel}_{\nu}(A_{y})$.
This follows from 5.3.2 and the definition of
$\operatorname{Sel}^{H,\operatorname{rk}}_{\mathscr{F}^{n}_{b}}$ as a fiber
product. ∎

##  9\. Computing the moments

The purpose of this section is to combine our homological stability results
with our big monodromy results to determine the moments of Selmer groups in
quadratic twist families. The analogous problem of determining the moments in
the context of Cohen-Lenstra was approached in [EVW16], where the problem was
much easier as the relevant big monodromy result was already available in the
literature. In § 9.1, we compute various statistics associated to kernels of
random elements of orthogonal groups. Via equidistribution of Frobenius
elements we then relate this to components of Selmer stacks in § 9.2.

###  9.1. Moments related to random elements of orthogonal groups

We next compute statistics associated to random elements of orthogonal groups.
In 9.1.5, we compute the distributions of $1$-eigenspaces of random elements
of orthogonal group, and show that these limit to the BKLPR distribution as
the size of the matrix grows. Moreover, we show this in a strong enough sense
so that the limit of the moments is the moment of the limit.

Our next computation is quite analogous to that of [FLR23, Proposition 4.13],
except that here we work over $\mathbb{Z}/\nu\mathbb{Z}$ for general $\nu$,
instead of the case that $\nu$ is prime covered in [FLR23].

For what follows, we use the notation of [FLR23, §4.2.1]. In the case $\nu$ is
prime, we let $A,B,C$ be the three nontrivial cosets of $\Omega(Q)$ in
${\rm{O}}(Q)$ so that $\operatorname{sp}^{-}_{Q}$ is nontrivial on $A$ and
$C$, while $D_{Q}$ is nontrivial on $B$ and $C$. For $Z$ a nonnegative
integer-valued random variable, we let
$G_{Z}(t)=\sum_{i\in\mathbb{N}}\operatorname{Prob}(\dim Z=i)t^{i}$. As in
[FLR23, §4.2.1], for $\bullet\in\\{\Omega,A,B,C\\}$, we use
$\operatorname{RSel}_{V}^{\bullet}$ to denote the random variable given as
$\ker(g-\operatorname{\mathrm{id}})$ for $g$ a uniform random element of the
coset $\bullet$.

######  Lemma 9.1.1.

Let $(Q,V)$ be a quadratic space over $\mathbb{Z}/\ell\mathbb{Z}$, with $\ell$
an odd prime. When $\dim V=2s$ is even,

$\displaystyle G_{\operatorname{RSel}^{B}_{V}}$
$\displaystyle=G_{\operatorname{RSel}^{C}_{V}},$ $\displaystyle
G_{\operatorname{RSel}^{\Omega}_{V}}$
$\displaystyle=G_{\operatorname{RSel}^{A}_{V}}+\frac{1}{\\#\Omega(Q)}\prod_{i=0}^{s-1}(t^{2}-\ell^{2i}).$

For $a\in\mathbb{F}_{\ell}^{\times}$, let $\operatorname{sgn}(a)$ denote $1$
if $a$ is a square $\bmod\ell$ and $-1$ otherwise. When $\dim V=2s+1$ is odd,

$\displaystyle G_{\operatorname{RSel}^{B}_{V}}$
$\displaystyle=G_{\operatorname{RSel}^{C}_{V}}+\frac{2\operatorname{sgn}(-1)\ell^{s}}{\\#\Omega(Q)}\prod_{i=1}^{s-1}(t^{2}-\ell^{2i})$
$\displaystyle G_{\operatorname{RSel}^{\Omega}_{V}}$
$\displaystyle=G_{\operatorname{RSel}^{A}_{V}}+\frac{t}{\\#\Omega(Q)}\prod_{i=0}^{s-1}(t^{2}-\ell^{2i}).$

###### Proof.

For the proof when $\dim V=2s$, note that [FLR23, Lemma 4.7] easily
generalizes to show that for any coset $H$ of $\Omega(Q)$ in ${\rm{O}}(Q)$,
$G_{\operatorname{RSel}^{H}_{V}}(\ell^{i})=G_{\operatorname{RSel}^{\Omega}_{V}}(\ell^{i})$
whenever $2i+2\leq\dim V$. When $\dim V$ is even, the proof proceeds mutatis
mutandis as in [FLR23, Theorem 4.4].

Therefore, it remains to prove the case that $\dim V=2s+1$ is odd. We again
proceed following the proof strategy of [FLR23, Theorem 4.4]. By 2.1.3, only
even powers of $t$ can appear in $G_{\operatorname{RSel}^{B}_{V}}(t)$ and
$G_{\operatorname{RSel}^{C}_{V}}(t)$. These are therefore even polynomials of
degree at most $\dim V$ and agree at the $\dim V-1$ values $\pm
1,\pm\ell,\ldots,\pm\ell^{\frac{\dim V-3}{2}}$ by [FLR23, Lemma 4.5]. Since
$\dim V$ is odd and the polynomials are even, the polynomials in fact have
degree at most $\dim V-1$, and hence are determined up to a scalar. That is,
$G_{\operatorname{RSel}^{B}_{V}}(t)-G_{\operatorname{RSel}^{C}_{V}}(t)$ is a
scalar multiple of $\prod_{i=1}^{\frac{\dim V-3}{2}}(t^{2}-\ell^{2i})$. To pin
that scalar multiple down, we can examine the coefficient of $t^{\dim V-1}$ in
$G_{\operatorname{RSel}^{\bullet}_{V}}(t)$, for $\bullet\in\\{B,C\\}$. This
coefficient is $\frac{\\#R_{\bullet}(Q)}{\\#\Omega(Q)}$, where
$R_{\bullet}(Q)$ is the set of reflections in $\bullet$, since any non-
identity element of the orthogonal group fixing a codimension $1$ plane is a
reflection. Since there are $\ell^{2s}+q^{s}$ reflections with value $\alpha$
for any square $\alpha\in\mathbb{F}_{\ell}^{\times}$, and $\ell^{2s}-\ell^{s}$
reflections with value $\beta$ for any for any nonsquare
$\beta\in\mathbb{F}_{\ell}^{\times}$, the definition of
$\operatorname{sp}^{-}_{Q}$ yields that

$\displaystyle
G_{\operatorname{RSel}^{B}_{V}}-G_{\operatorname{RSel}^{C}_{V}}=\frac{2\operatorname{sgn}(-1)\ell^{s}}{\\#\Omega(Q)}\prod_{i=1}^{\frac{\dim
V-3}{2}}(t^{2}-\ell^{2i})=\frac{2\operatorname{sgn}(-1)\ell^{s}}{\\#\Omega(Q)}\prod_{i=1}^{s-1}(t^{2}-\ell^{2i}).$

Finally, the remaining two cosets satisfy the relation
$G_{\operatorname{RSel}^{\Omega}_{V}}=G_{\operatorname{RSel}^{A}_{V}}+\frac{1}{\\#\Omega(Q)}\prod_{i=0}^{s-1}(t^{2}-\ell^{2i})$
by an argument analogous to the last paragraph of the proof of [FLR23, Theorem
4.4]. Indeed, $G_{\operatorname{RSel}^{B}_{V}}(t)$ and
$G_{\operatorname{RSel}^{C}_{V}}(t)$ are two odd degree $\dim V$ polynomials
agreeing on the $\dim V$ values $0,\pm 1,\pm\ell,\ldots,\pm\ell^{\frac{\dim
V-3}{2}}$, so their difference is divisible by $t\prod_{i=1}^{\frac{\dim
V-3}{2}}(t^{2}-\ell^{2i})$, and the constant of proportionality can be
determined using that the identity is the only element with a $\dim V$
dimensional fixed space. ∎

We next define a notion of $m$-total variation distance, which will be useful
for proving moments of two distributions converge, see 9.1.4.

######  Definition 9.1.2.

Let $\mathcal{N}$ denote the set of isomorphism classes of finite
$\mathbb{Z}/\nu\mathbb{Z}$ modules. Let $X,Y$ be two $\mathcal{N}$ valued
random variables. For $m\in\mathbb{Z}_{\geq 0}$, we define the $m$-total
variation distance or $d^{m}_{\operatorname{TV}}(X,Y)$

$\displaystyle
d^{m}_{\operatorname{TV}}(X,Y):=\sum_{H\in\mathcal{N}}(\\#H)^{m}\left|\operatorname{Prob}(X=H)-\operatorname{Prob}(Y=H)\right|.$

######  Remark 9.1.3.

When $m=0$, and the random variable is real valued instead of valued in
$\mathcal{N}$, this is twice the usual notion of total variation distance, see
[LPW09, §4.1 and Proposition 4.2]. We claim that a sequence of random