sends $I(\underline{g})$ to $\varphi(g_1\cdots g_m)$. We will show in the next paragraph that this composite map extends to   a group homomorphism $\hat{\Z}(1)_{(p)'} \to \ker (S' \to G)$, although $\frakz$ is only a $\hat{\Z}_{(p)'}^{\times}$-equivariant map of sets.
Then the proposition follows by composing the map (<ref>) with the inverse of the differential map $H_2(G,\Z)_{(p|\Gamma|)'} \overset{\sim}{\to} \ker (S' \to G)$.

For each $x\in c$, we let $\widetilde{x}$ denote the unique preimage of $x$ in $S'$ such that $\ord(\widetilde{x})=\ord(x)$. Recall that  the lift $\widehat{x}$ of $x$ in $S_c$ that we've picked has image $\widetilde{x}$ in $S'$. So for each $\alpha \in \hat{\Z}^{\times}_{(p|\Gamma|)'}$, we have $\widetilde{x^{\alpha}}=\widetilde{x}^{\alpha}$, and hence $\widehat{x}^{-\alpha} \widehat{x^{\alpha}}$ is contained in $\ker(S_c \to S')$ for any $x \in c$. So for any element $(g, \underline{m}) \in K(G,c)$ (using notation in (<ref>)), the image of $\alpha \ast (g, \underline{m})$ under the map $K(G,c) \to \ker (S' \to G)$ equals the $\alpha$th power of the image of $(g,\underline{m})$. So we proved that (<ref>) can extend to a group homomorphism $\hat{\Z}(1)_{(p)'} \to \ker (S' \to G)$.

§.§ Proof of Theorem <ref>

Throughout this subsection, we assume that $\Gamma$ is a finite group and $H$ is a finite admissible $\Gamma$-group. We define $G:=H \rtimes \Gamma$, let $c_2$ denote the set $\Gamma \backslash \{1\}$, and $c_1$ the set of elements of $G \backslash \{1\}$ that have the same order as their image in $\Gamma$. Let $q$ be a power of a prime number $p$ such that $p \nmid |G|$.

By Lemma <ref>, there exists a commutative diagram of surjections

\begin{equation}\label{eq:diag-Schur}
\begin{tikzcd}
&  S' \arrow["\pi'", two heads]{dr}& \\
\overline{S}^1 \arrow["\phi", two heads]{ur}\arrow["\pi^1", swap, two heads]{rr} \arrow["\widetilde{\rho}",  two heads]{d} & & G \arrow["\rho", two heads]{d} \\
\overline{S}^2 \arrow["\pi^2", swap, two heads]{rr} && \Gamma
\end{tikzcd}
\end{equation}

where $\pi^1$ is a reduced Schur covering of $G$ and $c_1$, $\pi^2$ is a reduced Schur covering of $\Gamma$ and $c_2$, and $\pi'$ is a $(q|\Gamma|)'$-Schur covering of $G$.
Moreover, since $\gcd \left( |\ker \rho \circ \pi'|, |\ker \pi^2| \right)=1$, $\overline{S}^1$ is the fiber product $S' \times_{\Gamma} \overline{S}^2$.

For a positive integer $n$ and a group homomorphism $\delta: \hat{\Z}(1)_{(q|\Gamma|)'} \to \ker\pi'$, we let $\pi_{G,c_1}^{\delta}(q,n)$ denote the number of $\Frob_{(\HHur_{G,c_1}^n)_{\F_q}}$-fixed components of $(\HHur_{G,c_1}^n)_{\overline{\F}_q}$ whose corresponding $\omega$-invariant is the composite of $\delta$ with the inverse of the differential map of  $\pi'$. We pick a $\zeta \in \hat{\Z}(1)_{(q|\Gamma|)'}^{\times}$ and let $\eta:=\delta(\zeta)$. Define the quantity $b(G,c_1,q,n; \delta)$ as follows, which is independent of the choice of $\zeta$.

\[
b(G,c_1,q,n; \delta):= \sum_{\substack{h \in \ker \pi^1 \\ \text{s.t. }\phi(h)=\eta}} \# \left\{ \underline{m} \in \ker \left( \Z^{c_1/G}_{\equiv q, n, \geq 0} \to G^{ab}\right) \, \biggr\rvert \, W_{q^{-1}}(\underline{m})^q=h^{q-1}\right\}
\]

Given an element $a \in (\Z/|G|^2\Z)^{\times}$, there is a positive integer $M_a$ and a non-empty set $E_a$ of residues modulo $M_a$, and positive numbers $r'_{a,b}$ for $b\in E_a$, such that for a prime power $q\equiv a \, (\operatorname{mod } |G|^2)$ and a non-negative integer $n$ the following holds.

*  If $\ord(\eta) \mid q-1$ and $n \,(\operatorname{mod } M_a) =b \in E_a$, then

\[
\pi^{\delta}_{G,c_1}(q,n)=b(G,c_1,q,n; \delta)+O_G(n^{d_{G,c_1}(q)-2})=r'_{a,b}n^{d_{G,c_1}(q)-1} +O_G(n^{d_{G,c_1}(q)-2}).
\]

*  If $\ord(\eta)\nmid q-1$ or $n \,(\operatorname{mod } M_a)\not\in E_a$, then $\pi^{\delta}_{G,c_1}(q,n)=b(G,c_1, q, n ;\delta)=0$.

By Proposition <ref> and <cit.>, $\pi^{\delta}_{G,c_1}(q,n)$ can be approximated by the number of $\hat{\Z}^{\times}_{(p)'}$-equivariant maps of sets $\frakz:\hat{\Z}(1)^{\times}_{(p)'} \to K(G,c_1)$ such that $\frakz$ reduces to $\delta$ and all coordinates of the image of $\frakz$ composited with the projection $K(G,c_1)\to \Z^{c_1/G}$ is at least $M$ for a sufficiently large $M$. Then the lemma follows from the proof of Proposition 12.6 and Corollary 12.8 of <cit.>.

For any group homomorphism $\delta: \hat{\Z}(1)_{(p|\Gamma|)'} \to \ker  \pi'$, we have

\[
b(G, c_1, q, n; \delta)=b(\Gamma, c_2, q, n).
\]

By definition of $c_1$ and $c_2$, the quotient map $\rho:G \to \Gamma$ sends each element $c_1$ to an element in $c_2$. Moreover, as $\gcd(|H|, |\Gamma|)=1$, by the Schur–Zassenhaus theorem, for each element of $c_2$, all of its lifts in $c_1$ are conjugate to each other, thus there is a natural bijective correspondence $\Z^{c_1/G} \to \Z^{c_2/\Gamma}$ induced by $\rho$. Since $H$ is an admissible $\Gamma$-group, we have $G^{ab}=\Gamma^{ab}$, so the restriction of this bijection gives a natural isomorphism $\ker(\Z^{c_1/G} \to G^{ab}) \simeq \ker(\Z^{c_2/\Gamma} \to \Gamma^{ab})$.

We write the group homomorphisms $W^1_{\alpha}: \Z^{c_1/G} \to K(G, c_1)$ and $W^2_{\alpha}: \Z^{c_2/\Gamma} \to K(\Gamma, c_2)$ for $W_{\alpha}$ (defined above the equation (<ref>)) associated to $(G, c_1)$ and $(\Gamma, c_2)$ respectively. For each $g \in c_1/G$ and its image $\gamma \in c_2/\Gamma$, we can pick $x_g$ in $g$ and $x_{\gamma}$ in $\gamma$ such that $\rho(x_g)=x_{\gamma}$, and then pick their lifts $\widehat{x_{g}} \in \overline{S}^1$ and $\widehat{x_{\gamma}} \in \overline{S}^2$ such that $\widetilde{\rho}(\widehat{x_g})=\widehat{x_{\gamma}}$. Then by definition of $W^1_{\alpha}$ and $W^2_{\alpha}$, we have the following commutative diagram.

\[\begin{tikzcd}
\Z^{c_1/G} \arrow["\sim"]{d}\arrow["W^1_{q^{-1}}"]{r} & \ker(\overline{S}^1 \overset{\pi^1}{\to} G) \arrow[two heads, "\widetilde{\rho}"]{d} \\
\Z^{c_2/\Gamma} \arrow["W^2_{q^{-1}}"]{r} & \ker(\overline{S}^2 \overset{\pi^2}{\to} \Gamma)
\end{tikzcd}\]

Pick a $\zeta \in \hat{\Z}(1)^{\times}_{(p|\Gamma|)'}$ and let $\eta:= \delta(\zeta)$. Considering the diagram (<ref>) and the isomorphism $\overline{S}^1\simeq S' \times_{\Gamma} \overline{S}^2$, we obtain the following identity of sets

\begin{eqnarray*}
\left\{h \in \ker(\overline{S}^1 \overset{\pi^1}{\to} G) \, \bigr\rvert \, \phi(h)=\eta \right\} &\overset{1-1}{\longleftrightarrow}&  \ker (\overline{S}^2 \overset{\pi^2}{\to} \Gamma)  \\
h & \longmapsto& \widetilde{\rho}(h).
\end{eqnarray*}

Therefore, combining everything, we have

\begin{eqnarray*}
b(G, c_1, q, n; \delta) &=& \sum_{\substack{h \in \ker(\overline{S}^1 \to G) \\ \text{s.t. } \phi(h) = \eta}} \# \left\{ \underline{m} \in \ker \left( \Z^{c_1/G}_{\equiv q, n, \geq 0 } \to G^{ab} \right) \, \biggr\rvert \, W^1_{q^{-1}}(\underline{m})^q=h^{q-1}\right\} \\
&=& \sum_{\bar{h} \in \ker(\overline{S}^2 \to \Gamma)} \# \left\{ \underline{m} \in \ker \left( \Z^{c_2/\Gamma}_{\equiv q, n, \geq 0 } \to \Gamma^{ab} \right) \, \biggr\rvert \, W^2_{q^{-1}}(\underline{m})^q=\bar{h}^{q-1}\right\} \\
&=& b(\Gamma, c_2, q, n).
\end{eqnarray*}

Note that, by the correspondence between smooth projective curves and their function fields, $\HHur^n_{G,c_1}(\F_q)$ parametrizes the pairs $(L, \iota)$, where $L$ is an extension of $\F_q(t)$ that is split completely at $\infty$ and has $\rDisc L=q^n$, and $\iota$ is an isomorphism $\Gal(L/\F_q(t)) \overset{\sim}{\to} G$ such that each inertia subgroup of $L/\F_q(t)$ is generated by an element in $c_1$. We fix a surjection $\rho: G \to \Gamma$ as defined in the diagram (<ref>). Then for each pair $(L, \iota)$, consider the subfield $K:=L^{\ker(\rho \circ \iota)}$ of $L$. The surjection $\rho \circ \iota$ defines an isomorphism $\Gal(K/\F_q(t)) \to \Gamma$, and moreover $L/K$ is unramified and  $\rDisc(K)=q^n$.
Then the restriction of $\iota$ to $\Gal(L/K)$ gives an isomorphism $\Gal(L/K) \to H$.

There is a surjective map of sets

\begin{eqnarray}
\HHur_{G,c_1}^n(\F_q) &\longrightarrow& \coprod_{K \in E_{\Gamma}(q^n, \F_q(t))} \Sur_{\Gamma}(\Gs(K), H) \label{eq:Hur-Sur}\\
(L, \iota) & \longmapsto& \{ \Gs(K) \to \Gal(L/K) \}. \nonumber
\end{eqnarray}

Each element in the set on the right has $[H:H^{\Gamma}]$ preimages.

The lemma follows by the proofs of Lemmas 9.3 and 10.2 in <cit.>.

Let $q$ be a prime power such that $\gcd(q, |G|)=1$ and $\ord(\im \delta) \mid q-1$. Then taking $q$th power on $\im \delta$ is the identity map. So by the Frobenius action on lifting invariants in (<ref>) and Proposition <ref>, if there is a $\overline{\F}_q$-point of a connected component of $(\HHur_{G,c_1}^n)_{\F_q}$ has $\omega$-invariant $\delta$, then all the $\overline{\F}_q$-point of this component have $\omega$-invariant $\delta$.
So we let $Z^{\delta}_{q,n}$ be the union of components of $(\HHur^n_{G,c_1})_{\F_q}$ whose $\overline{\F}_q$-points has $\omega$-invariant $\delta$.
By Lemma <ref>, we have

\[
\frac{\#Z^{\delta}_{q,n}(\F_q)}{[H:H^{\Gamma}]}=  \sum_{K \in E_{\Gamma}(q^n, \F_q(t))} \#\left\{ \pi\in \Sur_{\Gamma}\left(\Gs(K), H \right) \, \bigl\rvert\, \pi^{*} \circ \omega^{\#}_K=\delta \right\}.
\]

By the Grothendieck–Lefschetz trace formula, since $(Z^{\delta}_{q,n})_{\overline{\F}_q}$ is $n$-dimensional (<cit.>), we have

\[
\#Z^{\delta}_{q,n}(\F_q) = \sum_{j=0}^{2n} (-1)^j \Tr(\Frob_{\F_q} |H^j_{c, \et}((Z^{\delta}_{q,n})_{\overline{\F}_q}, \Q_\ell))
\]

where $H^j_{c,\et}$ is the $j$th étale fundamental group with compact support.
Here $\Tr(\Frob_{\F_q} |H^{j}_{c, \et}((Z^{\delta}_{q,n})_{\overline{\F}_q}, \Q_\ell))$ is $\pi^{\delta}_{G,c_1}(q,n)q^n$ when $j=2n$, and is at most $q^{j/2}C(n)$ when $0\leq j < 2n$ by the comparison of étale and analytic cohomology of components of the Hurwitz scheme <cit.>. Here

\[
C(n)=\max_{0\leq j < 2n} \dim H^{2n-j} (Z^{\delta}_{\C,n}, \Q),
\]

where $Z^{\delta}_{\C,n}$ is the union of components of $(\HHur^n_{G,c_1})_{\C}$ whose prime-to-$|\Gamma|$-torsion part of the EVW-W's lifting invariant

\[
\hZ(1)^{\times} \overset{\frakz}{\longrightarrow} K(G,c_1) \longrightarrow H_2(G, \Z)_{(|\Gamma|)'}
\]

is given by $\delta$.
So we have

\[
\sum_{n\leq N} \# Z^{\delta}_{q,n}(\F_q) = \pi^{\delta}_{G, c_1}(q, N) q^N + O_{N,G}(q^{N-1/2}).
\]

Similarly, $E_{\Gamma}(q^n, \F_q(t))=\#\HHur_{\Gamma, c_2}^n(\F_q)$, and

\[
\sum_{n \leq N} \#\HHur^n_{G,c_1}(\F_q) = \pi_{\Gamma, c_2}(q, N)q^N+O_{N,\Gamma}(q^{N-1/2}).
\]

Therefore, the fraction in the limits of the left-hand side of the equality in Theorem <ref> equals

\begin{eqnarray*}
\frac{1}{[H:H^{\Gamma}]}\frac{\sum_{n \leq N} \#Z^{\delta}_{q,n}(\F_q)}{\sum_{n \leq N} \#\HHur^n_{\Gamma, c_2}(\F_q)} &=&\frac{1}{[H:H^{\Gamma}]} \frac{\pi^{\delta}_{G,c_1}(q,N) q^N + O_{N,G}(q^{N-1/2})}{\pi_{\Gamma, c_2}(q, N) q^N+O_{N,\Gamma}(q^{N-1/2})}\\
&=& \frac{1}{[H:H^{\Gamma}]}\left(1+ \frac{O_G(N^{d_{\Gamma}(q)-2}) + O_{N,G}(q^{-1/2})}{\pi_{\Gamma,c_2}(q,N)+O_{N,\Gamma}(q^{-1/2})} \right),
\end{eqnarray*}

where the last equality follows by Lemmas <ref>, <ref> and <cit.>. Then the equality in Theorem <ref> follows after taking limits.

§ A RANDOM PRO-$\ELL$ $\GAMMA$-GROUP FOR $\GAMMA=\Z/2\Z$

In this section, we assume that $\Gamma=\Z/2\Z$, and $\ell$ is an odd prime that is not $\Char(k)$. We construct a random group to model the distribution of $\Gs(K)(\ell)$ as $K$ varies among all the quadratic extensions of $k(t)$ that is split completely at $\infty$.

Recall that $G_{\O}(K\overline{k})(\ell)$ is a pro-$\ell$ Demuškin group whose abelianization is free of rank $2g$, where $g$ is the genus of the curve over $\overline{k}$ corresponding to $K\overline{k}$. We've shown that $G_{\O}(K\overline{k})(\ell)$ has a $\Gamma$ action and a $\Frob_k$ action, and it admits a $\Gamma$-equivariant and $\Frob_k$-equivariant stem extension (<ref>) whose kernel is isomorphic to $\Z_\ell(1)$. Moreover, $\Gs(K)(\ell)$ is the maximal $\Gamma$-equivariant and $\Frob_k$-equivariant quotient of $G_{\O}(K\overline{k})(\ell)$ whose induced $\Frob_k$-action is trivial. So our strategy is to treat the $\Frob_k$ action as a random automorphism of the stem extension. We start with a Demuškin group with desired properties, pick a random automorphism that acts on the kernel of the stem extension as taking the $|k|$-th powers. Then define the random group to be the maximal quotient fixed by this random automorphism, as the generating rank of the Demuškin group goes to infinity.

§.§ Construction of the random group

By the classification of Demuškin groups <cit.>, if a Demuškin group has abelianization isomorphic to $\Z_\ell^{2n}$ , then it is isomorphic to $\langle x_1, \ldots, x_{2n} \mid [x_1, x_2][x_3, x_4]\cdots [x_{2n-1},x_{2n}]\rangle$. In the following lemma, we show that there is a unique (up to isomorphism) $\Z/2\Z$-action on this type of Demuškin group such that the Demuškin group is an admissible $\Z/2\Z$-group.

Let $G$ be a pro-$\ell$ group and $\sigma_1, \sigma_2\in \Aut(G)$ have the same order which is prime to $\ell$. Assume that $\pi: G \to H$ is a surjection such that $\ker \pi \subset [G,G]$, and that $\sigma_1, \sigma_2$ preserve $\ker \pi$ and induce the same automorphism on $H$. Then there exists $\tau \in \Aut(G)$ such that $\sigma_1=\tau^{-1}\circ \sigma_2 \circ \tau$ and $\tau$ preserves $\ker \pi$ and induces the trivial action on $H$.

Consider the subgroup $\Aut(G, \pi)$ of $\Aut(G)$ consisting of all the automorphisms of $G$ preserving $\ker \pi$. There is a natural map $\alpha: \Aut(G, \pi) \to \Aut(H)$. Since $\ker \pi \subset [G,G]$, by <cit.>, the kernel of $\alpha$ is a pro-$\ell$ group. The assumptions in the lemma imply that $\alpha(\sigma_1)$ equals $\alpha(\sigma_2)$ and has order prime to $\ell$. Then by the Schur–Zassenhaus theorem, $\sigma_1$ and $\sigma_2$ are conjugate in $\Aut(G, \pi)$ (and hence in $\Aut(G)$) by an element in $\ker \alpha$.

Let $n$ be a positive integer and $\calG_n$ a Demuškin group whose abelianization is isomorphic to $\Z_{\ell}^{2n}$. Then $\calG_n$ admits a Schur covering (unique up to isomorphism)

\[
1 \longrightarrow \Z_{\ell} \longrightarrow \widetilde{\calG}_n \overset{\pi_n}{\longrightarrow} \calG_n \longrightarrow 1.
\]

There exists a $\Z/2\Z$ action on $\widetilde{\calG}_n$ such that the action preserves and acts trivially on $\ker \pi_n$ and its induced action on $\calG_n^{ab}$ is taking inversion. Moreover, if $\sigma_1$ and $\sigma_2$ are two such $\Z/2\Z$ actions on $\widetilde{\calG}_n$, then there exists an automorphism $\tau$ of $\widetilde{\calG}_n$ such that $\sigma_1= \tau^{-1} \circ \sigma_2 \circ \tau$, and $\tau$ preserves $[\widetilde{\calG}_n, \widetilde{\calG}_n]$ and induces the trivial action on $\calG_{n}^{ab}$.

Consider the pro-$\ell$ group defined by the following presentation

\begin{equation}\label{eq:pres-Demu-Gamma}
G:=\langle x_1, \cdots, x_{2n} \mid x_1^{-1} x_2^{-1}\cdots x_{2n}^{-1} x_1 x_2 \cdots x_{2n} \rangle.
\end{equation}

Let $F$ denote the free pro-$\ell$ generated by $x_1, \cdots, x_{2n}$, and let $R$ denote the closed normal subgroup of $F$ generated by $x_1^{-1}\cdots x_{2n}^{-1}x_1 \cdots x_{2n}$.
Note that the relation $x_1^{-1}\cdots x_{2n}^{-1} x_1 \cdots x_{2n} = [x_1, x_2][x_1x_2, x_{2n}\cdots x_3] x_3^{-1}\cdots x_{2n}^{-1} x_3 \cdots x_{2n}$, and $[x_1x_2, x_{2n}\cdots x_3] \equiv [x_1, x_3] \cdots [x_1, x_{2n}] [x_2, x_3] \cdots [x_2, x_{2n}] \mod F^{(3)}$. By repeating this process, we have $x_1^{-1}\cdots x_{2n}^{-1} x_1 \cdots x_{2n} \equiv \prod_{1\leq i < j \leq 2n} [x_i, x_j] \mod F^{(3)}$. So by <cit.>, the cup product $H^1(G, \Z_\ell) \times H^1(G, \Z_\ell) \to H^2(G, \Z_\ell)$ is non-degenerate. Moreover, $G^{ab}$ is free of rank $2n$. So $G$ is a Demuškin group whose abelianization is isomorphic to $\Z_{\ell}^{2n}$ and hence is isomorphic to $\calG_n$, and we will use this presentation (<ref>) of $\calG_n$ in the rest of the proof.

The existence and uniqueness of the Schur covering $\pi_n$ follow immediately from $H_2(G, \Z)\simeq \Z_\ell$ and $\Ext_{\Z}^1(G^{ab}, \Z_{\ell})=0$. We define $\sigma \in \Aut(F)$ by $\sigma(x_i)=x_i^{-1}$. We will show next that $\sigma$ induces a $\Z/2\Z$ action on $\widetilde{\calG}_n$ as described in the lemma. First, because

\begin{equation}\label{eq:sigma-rel}
\sigma(x_1^{-1} \cdots x_{2n}^{-1} x_1 \cdots x_{2n})=x_1\cdots x_{2n} x_1^{-1} \cdots x_{2n}^{-1}=(x_1^{-1}\cdots x_{2n}^{-1} x_1\cdots x_{2n})^{x_{2n}^{-1} \cdots x_{1}^{-1}},
\end{equation}

the automorphism $\sigma$ stabilizes $R$. So $\sigma$ induces an automorphism $\overline{\sigma}$ of $G$, and $\overline{\sigma}$ acts on $G^{ab}$ by inversion. The presentation of $G$ defines a stem extension of $G$ with kernel isomorphic to $\Z_{\ell}$

\[
1 \longrightarrow R/[F,R] \longrightarrow F/[F,R] \longrightarrow G \longrightarrow 1,
\]

where the image of $x_1^{-1}\cdots x_{2n}^{-1}x_1\cdots x_{2n}$ generates the kernel $R/[F,R]$.
So (<ref>) shows that $\sigma$ preserves $[F,R]$, and hence it induces an automorphism of $F/[F,R]$, and moreover this automorphism acts trivially on $R/[F,R]$. So we proved the existence of the $\Z/2\Z$ action on $\widetilde{\calG}_n$ as described in the lemma.

Suppose that $\sigma_1$ and $\sigma_2$ are two $\Z/2\Z$ actions on $\widetilde{\calG}_n$ as described in the lemma.
Then since they induce the same automorphism on $\calG_n^{ab}$, the last statement of the lemma follows by Lemma <ref>.

Let $n$ be a positive integer, $\calG_n$, $\widetilde{\calG}_n$, $\pi_n$ and the $\Gamma=\Z/2\Z$ action on them be as defined in Lemma <ref>, and $q$ be a positive integer such that $\ell \nmid q$. We fix a generator $\xi_n$ of $\ker \pi_n$.
Let $\Aut(\widetilde{\calG}_n\rtimes \Gamma, \pi_n; q)$ denote the set of automorphisms of $\widetilde{\calG}_n\rtimes \Gamma$ that preserves and acts as multiplication by $q$ on $\ker \pi_n$.
Let $\phi$ be a random element of $\Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n ; q)$ with respect to the “Haar” measure. We let $1-\phi$ denote the quotient map from $\widetilde{\calG}_n \rtimes \Gamma$ to its maximal $\Gamma$-equivariant quotient on which the induced $\phi$ action is trivial.
Then we define the random group $X_{q,n}$ as

\begin{equation}
X_{q, n} := (1-\phi)(\widetilde{\calG}_n \rtimes \Gamma) / (1-\phi)(\ker \pi_n).
\end{equation}

Moreover, we fix a splitting of $\widetilde{\calG}_n \rtimes \Gamma \to \Gamma$ and hence an action of $\Gamma$ (by conjugation) on $\widetilde{\calG}_n$. Then $\ker (X_{q,n} \to \Gamma)$ naturally obtains an action of $\Gamma$. We define the following random $\Gamma$-group

\[
Y_{q,n} := \ker (X_{q,n} \to \Gamma).
\]

* We need to explain what the “Haar” measure is in the definition. Note that $\widetilde{\calG}_n\rtimes \Gamma$ is a finitely generated profinite group, so $\Aut(\widetilde{\calG}_n\rtimes \Gamma)$ is profinite by <cit.>. The subgroup $\Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n; 1)$ consisting of all automorphisms that stabilizes and acts trivially on $\ker \pi_n$ is a closed subgroup of $\Aut(\widetilde{\calG}_n \rtimes \Gamma)$, so it is a profinite group, and hence has a Haar measure. Then since $\Aut(\widetilde{\calG}_n\rtimes \Gamma, \pi_n; q)$ is a coset of $\Aut(\widetilde{\calG}_n\rtimes \Gamma, \pi_n; 1)$ in $\Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n)$, it obtains a measure from the measure on $\Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n; 1)$, which is the “Haar” measure in the definition.

* Since $\ell$ is odd, $\widetilde{\calG}_n$ is a characteristic subgroup of $\widetilde{\calG}_n \rtimes \Gamma$ and then $\phi$ preserves $\widetilde{\calG}_n$. Any action on $\Z/2\Z$ is trivial, so $\ker (1-\phi)$ is contained in $\widetilde{\calG}_n$ for any $\phi$.

§.§ Computing the moment of the random group

Consider the Schur covering $1 \to \Z_{\ell} \to \widetilde{\calG}_n \overset{\pi_n}{\longrightarrow} \calG_n \to 1$. Let $\xi_n$ be a generator of $\ker \pi_n$. Let $H$ be a pro-$\ell$ group, $\varpi: \widetilde{H} \to H$ a Schur covering of $H$, and $\rho: \calG_n \to H$ a group surjection.

*  Then $\rho$ can be lifted to a surjection $\widetilde{\rho}: \widetilde{\calG}_n \to \widetilde{H}$ such that $\varpi\circ \widetilde{\rho}=\rho \circ \pi_n$. Moreover, the image $\widetilde{\rho}(\xi_n)$ in $\widetilde{H}$ does not depend on the choice of the lift $\widetilde{\rho}$.

*  Given $\rho_1, \rho_2 \in \Sur(\calG_n, H)$, let $\widetilde{\rho}_1, \widetilde{\rho}_2 \in \Sur(\widetilde{\calG}_n, \widetilde{H})$ be their lifts respectively. Assume that $\widetilde{\rho}_1(\xi_n)=\widetilde{\rho}_2(\xi_n)$. Then for any $q\in \Z_{\ell}^{\times}$ with $\ord(\widetilde{\rho}_1(\xi_n))\mid q-1$, there exists $\widetilde{\varphi} \in \Aut(\widetilde{\calG}_n)$ such that

*  $\widetilde{\varphi}$ preserves $\ker \pi_n$ and induces $\varphi \in \Aut(\calG_n)$ such that $\rho_1=\rho_2 \circ \varphi$, and

*  $\widetilde{\varphi}(\xi_n)=\xi_n^q$.

We will give the proof of this lemma in <ref>, which heavily uses the method in <cit.> of successive approximation on the filtration of lower $\ell$-central series of pro-$\ell$ groups.

Let $H$ be a finite $\ell$-group with an action of $\Gamma$, and let $\pi \in\Sur(X_{q,n}, H \rtimes \Gamma)$ (or $\pi \in \Sur_{\Gamma}(Y_{q,n}, H)$ when we fix the action of $\Gamma$ on $\calG_n$). Consider the composite map $\calG_n \rtimes \Gamma \overset{1-\phi}{\longrightarrow} X_{q,n} \overset{\pi}{\longrightarrow} H \rtimes \Gamma$ and let $\varpi: \widetilde{H} \rtimes \Gamma \to H \rtimes \Gamma$ be an $\ell$-Schur covering. By Lemma <ref>, there is a surjection $\widetilde{\calG}_n\rtimes \Gamma \to \widetilde{H} \rtimes \Gamma$ satisfing the following commutative diagram

\begin{equation*}
\begin{tikzcd}
1 \arrow{r} & \Z_{\ell} \arrow{r} \arrow{d} & \widetilde{\calG}_n \rtimes \Gamma \arrow["\pi_n"]{r} \arrow{d} & \calG_n \rtimes \Gamma \arrow[two heads, "\pi \circ (1-\phi)"]{d} \arrow{r} & 1 \\
1 \arrow {r} & \ker \varpi \arrow{r} & \widetilde{H} \rtimes \Gamma \arrow["\varpi"]{r} & H \rtimes \Gamma \arrow{r} & 1,
\end{tikzcd}
\end{equation*}

such that the first vertical arrow in the diagram is the composite of

\[\begin{tikzcd}
\Z_{\ell} \arrow["d_{\pi_n}^{-1}", "\sim"']{r} & H_2(\calG_n \rtimes \Gamma, \Z)(\ell) \arrow["\coinf"]{r} & H_2(H \rtimes \Gamma, \Z)(\ell) \arrow["d_{\varpi}", "\sim"']{r} & \ker \varpi,
\end{tikzcd}\]

where the middle map $\coinf$ is induced by the quotient map $\pi \circ(1-\phi)$. We denote the composite of the first two maps by $\pi_\dagger: \Z_{\ell} \to H_2(H \rtimes \Gamma, \Z)(\ell)$. Because the sequence is $\phi$-equivariant, $\pi_{\dagger}$ factors through $\Z_{\ell} \twoheadrightarrow \Z_{\ell}/(q-1)\Z_{\ell}$.

Let $H$ be a finite $\ell$-group with an action of $\Gamma=\Z/2\Z$ that acts on $H^{ab}$ as inversion.
Let $n$ be a sufficiently large integer such that there exists a $\Gamma$-equivariant surjection from $\calG_n$ to $H$.
Let $\delta$ be a group homomorphism $\Z_{\ell} \to H_2(H \rtimes \Gamma, \Z)(\ell)[q-1]$.

\[
\EE\left( \#\left\{ \pi \in \Sur(X_{q,n}, H \rtimes \Gamma) \mid \pi_{\dagger}=\delta  \right\} \right) =1
\]

Also, if we fix a splitting of $\widetilde{\calG}_n \rtimes \Gamma \to \Gamma$ (that is, we fix the action of $\Gamma$ on $\widetilde{\calG}_n$), then

\[
\EE \left( \# \left\{ \pi \in \Sur_{\Gamma}(Y_{q, n}, H) \mid \pi_\dagger = \delta \right\} \right) = \frac{1}{[H : H^{\Gamma}]}.
\]

For any $\pi \in \Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma)$, by Lemma <ref>, there exists $\widetilde{\pi} \in \Sur(\widetilde{\calG}_{n} \rtimes \Gamma, \widetilde{H} \rtimes \Gamma)$ such that $\pi \circ \pi_n = \varpi \circ \widetilde{\pi}$.
Let's prove that there is a unique such $\widetilde{\pi}$.
Let $S$ be the closed subgroup of $\widetilde{\calG}_{n} \rtimes \Gamma$ generated by all elements of order $2$. Then $S$ is normal because the set of all the order-$2$ elements are closed under conjugation. The quotient $\widetilde{\calG}_{n} \rtimes \Gamma/S$ is a $\Gamma$-equivariant  pro-$\ell$ quotient of $\widetilde{\calG}_{n} \rtimes \Gamma$ with trivial induced $\Gamma$ action. However, $\Gamma$ acts on $\widetilde{\calG}_n^{ab}$ as inversion and any non-trivial pro-$\ell$ group has non-trivial abelianization, so $\widetilde{\calG}_n$ does not have any non-trivial quotient on which the induced $\Gamma$-action is trivial. So we have $S=\widetilde{\calG}_{n} \rtimes \Gamma$, which implies that $\widetilde{\calG}_{n} \rtimes \Gamma$ is generated by order-2 elements.
Also, for each order-2 element $x$ of $\widetilde{\calG}_{n} \rtimes \Gamma$, we have that $\widetilde{\calG}_{n} \rtimes \Gamma$ is the product of $\widetilde{\calG}_n$ and $\langle x\rangle$, so $\pi \circ \pi_n(x)$ is non-trivial and hence has order 2.
Note that each order-2 element of $H\rtimes \Gamma$ lifts to a unique order-2 element of $\widetilde{H} \rtimes \Gamma$ because $\widetilde{H}\to H$ is an $\ell$-Schur covering. Therefore, $\widetilde{\pi}$ must map each order-2 element $x$ of $\widetilde{\calG}_{n} \rtimes \Gamma$ to the unique lift of $\pi \circ \pi_n(x)$, which finishes the proof of the uniqueness of $\widetilde{\pi}$. So for each $\pi \in \Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma)$, we let $\widetilde{\pi}$ denote its unique lift $\Sur(\widetilde{\calG}_n \rtimes \Gamma, \widetilde{H} \rtimes \Gamma)$.

Next, we prove the first equality in the theorem. Let $h=d_{\varpi} \circ \delta(\xi_n)$.
Note that

\begin{eqnarray}
&& \EE \left(\# \left\{ \pi \in \Sur(X_{q,n}, H\rtimes \Gamma) \mid \pi_{\dagger} = \delta \right\} \right) \nonumber\\
&=& \sum_{\substack{\pi \in \Sur(\calG_n \rtimes \Gamma, H\rtimes \Gamma) \\ \text{s.t. } \widetilde{\pi}(\xi_n)=h}} \Prob ( \phi \in \Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n ; q) \mid  \ker (1-\phi) \subseteq \ker \widetilde{\pi} ). \label{eq:EE}
\end{eqnarray}

The condition $\ker (1-\phi) \subseteq \ker \widetilde{\pi}$ is equivalent to $\widetilde{\pi} \circ \phi =\widetilde{\pi}$.
We let $\Sur(\calG_n\rtimes \Gamma, H\rtimes \Gamma; \xi_n\mapsto h)$ denote the set of $\pi$ as described under the sum in (<ref>), and let $\pi \in \Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma; \xi_n\mapsto h)$. Each $\phi \in \Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n ; q)$ passes $\widetilde{\pi}$ to another surjection $\widetilde{\pi}\circ \phi \in \Sur(\widetilde{\calG}_n \rtimes \Gamma, \widetilde{H}\rtimes \Gamma)$, and the assumption $\ord(h)\mid q-1$ implies that $\widetilde{\pi}\circ \phi(\xi_n)=h$, so $\widetilde{\pi} \circ \phi$ induces a surjection in $\Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma; \xi_n\mapsto h)$. In other words, $\Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n ; q)$ acts on the set $\Sur(\calG_n\rtimes \Gamma, H \rtimes \Gamma; \xi_n \mapsto h)$, and in particular, the stabilizer of $\pi$ by this action is exactly the set of $\phi\in \Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n;q)$ such that $\ker(1-\phi)\subseteq \ker \widetilde{\pi}$. Thus, the probability in (<ref>) is the inverse of the size of the orbit containing $\pi$. In the rest of the proof, we will prove that the set $\Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma; \xi_n \mapsto h)$ contains only one orbit. After proving that, it immediately follows that (<ref>) equals 1, and hence we finish the proof of the theorem.

Let $\pi_1, \pi_2 \in \Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma; \xi_n \mapsto h)$, and let $\widetilde{\pi}_1$ and $\widetilde{\pi}_2$ denote the lifts of $\pi_1$ and $\pi_2$ respectively.
Let $\rho_i$ (resp. $\widetilde{\rho}_i$) be the restriction of $\pi_i$ (resp. $\widetilde{\pi}_i$) onto $\calG_n$ (resp. $\widetilde{\calG}_n$) for $i=1, 2$. Then $\widetilde{\rho}_i(\xi_n) = \widetilde{\pi}_i(\xi_n)=h$, so by Lemma <ref>(<ref>), there exists $\widetilde{\varphi} \in \Aut(\widetilde{\calG}_n)$ satisfying (<ref>) and (<ref>). This automorphism $\widetilde{\varphi}$ is not necessarily $\Gamma$-equivariant, however, we will show below that we can modify $\widetilde{\varphi}$ to make it $\Gamma$-equivariant. Let $\varphi\in\Aut(\calG_n)$ be as described in Lemma <ref>(<ref>). Note that $\varphi$ passes the action of $\gamma$ (the non-trivial element of $\Gamma$) on $\calG_n$ to an action of $^{\varphi}\gamma$ which is defined by

\[
^{\varphi} \gamma(g) = \varphi\circ \gamma \circ \varphi^{-1}(g) \quad \text{ for $g \in \calG_n$}.
\]

Because of $\rho_2 \circ \varphi= \rho_1$ and that $\rho_1, \rho_2$ extend to $\pi_1, \pi_2$, it follows that $\gamma$ and $^{\varphi}\gamma$ both preserve $\ker \rho_2$ and they induce the same action on $H$ via the quotient map $\rho_2$, where the latter is because for any $g\in \calG_n$

\[
\rho_2 \circ \varphi \circ \gamma \circ \varphi^{-1}(g)= \rho_1\circ \gamma \circ \varphi^{-1}(g)=\gamma \circ \rho_1 \circ \varphi^{-1}(x) = \gamma \circ \rho_2(x) = \rho_2 \circ \gamma(x).
\]

Also, the actions of $\gamma$ and $^{\varphi}\gamma$ induce the same action on $\calG_n^{ab}$ (which is taking inversion). So, we let $M:=[\calG_n, \calG_n] \cap  \ker \rho_2$, and we see that the actions of $\gamma$ and $^{\varphi}\gamma$ induce the same action on $\calG_n/M$. By Lemma <ref>, there exists $\tau \in \Aut(\calG_n)$ such that $^{\varphi} \gamma = \tau^{-1} \circ \gamma \circ \tau$ and $\tau$ preserves $M$ and induces the trivial action on $\calG_n/M$. Thus, $\tau \circ \varphi$ is a $\Gamma$-equivariant automorphism of $\calG_n$ such that $\rho_2 \circ \tau \circ \varphi = \rho_1$. Because $\pi_n: \widetilde{\calG}_n \to \calG_n$ is a Schur covering, by Lemma <ref>(<ref>), there exists $\widetilde{\tau} \in \Aut(\widetilde{\calG}_n)$ such that $\pi_n \circ \widetilde{\tau} = \tau \circ \pi_n$. Next, we consider the actions on $\widetilde{\calG}_n$, and similarly to above arguments, $\widetilde{\varphi}$ passes the action of $\gamma$ on $\widetilde{\calG}_n$ to an action of $^{\widetilde{\varphi}}\gamma$. Then because $^{\varphi}\gamma=\tau^{-1}\circ \gamma \circ \tau$ as actions on $\calG_n$, we have that $^{\widetilde{\varphi}} \gamma$ and $\widetilde{\tau}^{-1} \circ \gamma \circ \widetilde{\tau}$ are two order-2 automorphisms of $\widetilde{\calG}_n$ that preserve $\ker \pi_n$ and induce the same automorphism on $\calG_n$. So, by Lemma <ref>, there exists $\sigma \in \Aut(\widetilde{\calG}_n)$ such that $^{\widetilde{\varphi}}\gamma = \sigma^{-1} \circ \widetilde{\tau}^{-1} \circ \gamma \circ \widetilde{\tau} \circ \sigma$ and $\sigma$ preserves $\ker \pi_n$ and induces the trivial action on $\calG_n$. Therefore, we obtain an automorphism $\widetilde{\varphi}' :=\widetilde{\tau}\circ \sigma \circ \widetilde{\varphi} \in \widetilde{\calG}_n$ that respects the $\Gamma$ action on $\widetilde{\calG}_n$, so $\widetilde{\varphi}'$ extends to an automorphism of $\widetilde{\calG}_n \rtimes \Gamma$ sending $\gamma \mapsto \gamma$. It's only left to show that $\widetilde{\varphi}' \in \Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n ; q)$. Indeed, $\widetilde{\varphi}'$ perserves $\ker \pi_n$ because all of $\widetilde{\tau}, \sigma$ and $\widetilde{\varphi}$ preserve $\ker \pi_n$; and $\widetilde{\varphi}'$ mapping $\xi_n$ to $\xi_n^q$ follows by applying the following claim to $\kappa:=\widetilde{\tau} \circ \sigma$ and by the fact that $\widetilde{\varphi}(\xi_n)=\xi_n^q$.

Claim: Suppose that $\kappa$ is an automorphism of $\widetilde{\calG}_n$ that perserves $\ker \pi_n$ and induces the trivial automorphism on $\widetilde{\calG}_n^{ab}$. Then $\kappa(\xi_n)=\xi_n$.

We use the usual presentation $\calG_n=\langle x_1, \ldots, x_{2n} \mid [x_1,x_2]\cdots [x_{2n-1},x_{2n}] \rangle$, and consider the short exact sequence defined by this presentation

\[
1 \longrightarrow R \longrightarrow F_{2n} \longrightarrow \calG_n \longrightarrow 1,
\]

where $F_{2n}$ is the free pro-$\ell$ group on $x_1,\ldots, x_{2n}$ and $R$ is the closed normal subgroup generated by $\lambda:=[x_1,x_2]\cdots [x_{2n-1}, x_{2n}]$. Then it gives the map $\pi_n$ via

\begin{equation}\label{eq:ses-claim}
1 \longrightarrow R/[R,F_{2n}] \longrightarrow F_{2n}/[R, F_{2n}]\simeq \widetilde{\calG}_n \overset{\pi_n}{\longrightarrow} \calG_n \longrightarrow 1.
\end{equation}

The automorphism $\kappa$ of $\widetilde{\calG}_n$ lifts to an automorphism $\widehat{\kappa}$ of $F_{2n}$. Since $\widetilde{\calG}_n^{ab}=\calG_n^{ab}=F_{2n}^{ab}$, $\widehat{\kappa}$ induces the trivial automorphism on $F_{2n}^{ab}$. So the element $y_i:=x_i^{-1}\widehat{\kappa}(x_i)$ is contained in $F_{2n}^{(2)}$ for each $i$. Then $\widehat{\kappa}(\lambda)=[x_1y_1, x_2y_2]\cdots [x_{2n-1}y_{2n-1}, x_{2n}y_{2n}] \equiv [x_1, x_2]\cdots [x_{2n-1}, x_{2n}] \mod F_{2n}^{(3)}$. As $R \subset F_{2n}^{(2)}$, we have that $[R, F_{2n}]\subset F_{2n}^{(3)}$; and then the quotient map $R/[R, F_{2n}] \to R/(R\cap F_{2n}^{(3)})$ is an isomorphism since both of them are isomorphic to $\Z_\ell$. So $\widehat{\kappa}(\lambda)\equiv \lambda \mod F_{2n}^{(3)}$ implies $\kappa$ acts trivially on $\ker \pi_n$, which proves the claim and hence proves the first equality in the theorem.

To prove the second equality, we consider the following expression of the moment that is similar to (<ref>)

\begin{eqnarray}
&& \EE \left(\# \left\{ \pi \in \Sur_{\Gamma}( Y_{q,n}, H) \mid \pi_{\dagger}=\delta\right\} \right) \nonumber \\
&=& \sum_{\substack{\pi \in \Sur(\calG_n\rtimes \Gamma, H \rtimes \Gamma) \\ \text{s.t. } \widetilde{\pi}(\xi_n)=h \\ \text{and } \pi|_{\calG_n} \text{ is $\Gamma$-equivariant}}} \Prob ( \phi \in \Aut(\widetilde{\calG}_n \rtimes \Gamma, \pi_n ; q) \mid  \ker (1-\phi) \subseteq \ker \widetilde{\pi} ). \label{eq:EE'}
\end{eqnarray}

By the Schur–Zassenhaus theorem, any two splittings of $H \times \Gamma \to \Gamma$ are conjugate by an element of $H$, and therefore, the conjugation gives an automorphism of $H \rtimes \Gamma$ that maps one splitting to the other. Also, because the conjugations of $H \rtimes \Gamma$ acts transitively on the set of all splittings, the number of splittings is exactly $[H: H^{\Gamma}]$. So we have

\begin{eqnarray*}
&& \# \{ \pi \in \Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma) \mid \widetilde{\pi}(\xi_n) = h \} \\
&=& [H: H^{\Gamma}]  \# \{ \pi \in \Sur(\calG_n \rtimes \Gamma, H \rtimes \Gamma) \mid \widetilde{\pi}(\xi_n) = h  \text{ and  $\pi|_{\calG_n}$ is $\Gamma$-equivariant} \} .
\end{eqnarray*}

Thus, the second equality in the theorem follows by the first equality, (<ref>) and (<ref>).

§.§ Proof of Lemma <ref>

Let $F_{2n}$ denote the free pro-$\ell$ group on $2n$ generators $x_1, \ldots, x_{2n}$. Then there is a presentation of $\calG_n$

\begin{equation}\label{eq:pres-Gn}
1 \longrightarrow R \longrightarrow F_{2n} \overset{\pi}{\longrightarrow} \calG_n \longrightarrow 1,
\end{equation}

and it induces a Schur covering of $\calG_n$

\begin{equation}\label{eq:ind-ses-stem}
1 \longrightarrow R/[R,F_{2n}] \longrightarrow F_{2n}/[R, F_{2n}] \longrightarrow \calG_n \longrightarrow 1.
\end{equation}

It follows by <cit.> that $F_{2n}/[R,F_{2n}]$ can be identified with $\widetilde{\calG}_n$.
We denote the composite of the quotient map $\pi$ in (<ref>) and $\rho$ by $\kappa: F_{2n} \to H$, and denote $N:=\ker \kappa$. For each $i=1, \ldots, 2n$, we denote $h_i:=\kappa(x_i)$ and we pick an element $\widetilde{h}_i \in \varpi^{-1}(h_i)$. Then the map $\widetilde{\kappa}: F_{2n} \to \widetilde{H}$ defined by $x_i \mapsto \widetilde{h}_i$ is a homomorphism since $F_{2n}$ is free, and moreover it is surjective by Lemma <ref>. By <cit.>, $\ker \widetilde{\kappa}$ contains $[N, F_{2n}]$, so $\widetilde{\kappa}$ factors through $\widetilde{\calG}_n$ since $R \subseteq N$ and $[R,F_{2n}]\subseteq [N, F_{2n}]$. Because $\varpi \circ \widetilde{\kappa}= \rho \circ \pi$, $\widetilde{\kappa}$ induces a surjection $\widetilde{\rho}: \widetilde{\calG}_n \to \widetilde{H}$ such that $\varpi \circ \widetilde{\rho} = \rho \circ \pi_n$,  which proves the existence of $\widetilde{\rho}$ in the statement (<ref>).

\[\begin{tikzcd}
F_{2n} \arrow["\pi"]{rr} \arrow{drr} \arrow[bend left=30, "\kappa"]{rrr} \arrow[bend right=70, "\widetilde{\kappa}"']{rrrd} && \calG_n \arrow["\rho"]{r} & H \\
&& \widetilde{\calG}_n \arrow["\pi_n"']{u} \arrow["\widetilde{\rho}"]{r} & \widetilde{H} \arrow["\phi"]{u}
\end{tikzcd}\]

Without loss of generality, we assume $\xi_n$ is the image of $[x_1, x_2]\cdots [x_{2n-1}, x_{2n}]$ in $\widetilde{\calG}_n$. Then for any $\widetilde{\rho}$ satisfying the desired requirments, we have that $\widetilde{\rho}$ maps the image of $x_i$ to $\widetilde{h}_i \delta_i$ for some $\delta_i \in \ker \varpi$. However, $\ker \varpi$ is in the center of $\widetilde{H}$, so $[\widetilde{h}_1,  \widetilde{h}_2]\cdots [\widetilde{h}_{2n-1}, \widetilde{h}_{2n}]=[\widetilde{h}_1 \delta_1,  \widetilde{h}_2 \delta_2]\cdots [\widetilde{h}_{2n-1} \delta_{2n-1}, \widetilde{h}_{2n} \delta_{2n}]$. Thus, $\widetilde{\rho}(\xi_n)$ does not depend on the choice of $\widetilde{\rho}$, which finishes the proof of (<ref>).

Let $\rho_i$ and $\widetilde{\rho}_i$, $i=1,2$, be as defined in the statement (<ref>). We use the surjections from $F_{2n}$ to $\calG_n$ and $\widetilde{\calG}_n$ defined in (<ref>) and (<ref>). Taking composites with $\rho_i$ and $\widetilde{\rho}_i$, we obtain surjections $\kappa_i: F_{2n} \to H$ and $\widetilde{\kappa}_i: F_{2n} \to \widetilde{H}$ such that $\varpi \circ \widetilde{\kappa}_i = \kappa_i$ for each $i$. For an ordered $2n$-tuple $\mathbf{z}=(z_1, \ldots, z_{2n}) \in F_{2n}^{2n}$, we denote $\lambda(\mathbf{z}):=[z_1, z_2]\cdots [z_{2n-1}, z_{2n}]$. We write $\mathbf{x}$ for the tuple of generators $(x_1, \ldots, x_{2n})$. We will prove the statement (<ref>) in the lemma by proving the following claim.

Claim: There exists $\theta \in \Aut(F_{2n})$ such that $\kappa_1 = \kappa_2 \circ \theta$ and $\lambda(\theta(\mathbf{x}))=\lambda(\mathbf{x})^q$. Here $\theta(\mathbf{x})$ denotes the tuple $(\theta(x_1), \ldots, \theta(x_{2n}))$.

We now explain how the claim implies the statement (<ref>). Note that in the presentation (<ref>) of $\calG_n$, the kernel $R$ is the closed normal subgroup generated by $\lambda(\mathbf{x})$. So if $\lambda(\theta(\mathbf{x}))=\lambda(\mathbf{x})^q$, then $R$ is also generated by $\lambda(\theta(\mathbf{x}))$ as $q\in \Z_{\ell}^{\times}$. It follows that $\theta(R)=R$, and hence $\theta$ induces $\varphi \in \Aut(\calG_n)$, and also $\widetilde{\varphi} \in \Aut(\widetilde{\calG}_n)$ by the description of $\widetilde{\calG}_n$ in (<ref>). The automorphisms $\varphi$ and $\widetilde{\varphi}$ satisfy the condition (<ref>) because $\kappa_1 = \kappa_2 \circ \theta$ and $\kappa_i$ factors through $\widetilde{\rho}_i$ and $\rho_i$ for each $i=1,2$. And the condition (<ref>) is satisfied, because $\xi_n$ is assumed to be the image of $\lambda(\mathbf{x})$ and then $\widetilde{\varphi}(\xi_n)$ is the image of $\lambda(\theta(\mathbf{x}))$.

In the remainder of the proof, we will prove the claim by induction on the lower $\ell$-central series $\{F_{2n}^{\{j\}}\}$ of $F_{2n}$, which is defined as

\[
F_{2n}^{\{1\}}=F_{2n} \quad \text{and} \quad F_{2n}^{\{n+1\}}:=[F_{2n},  F_{2n}^{\{n\}}](F_{2n}^{\{n\}})^{\ell}.
\]

Explicitly, we will show the following.

($\ast$) For each $j \in \Z_{>1}$, there exists a tuple $\mathbf{y}^{\{j\}}=(y_1^{\{j\}}, \ldots, y_{2n}^{\{j\}})$ formed by a set of generators $\{y_i^{\{j\}}\}_{i=1}^{2n}$ of $F_{2n}$ such that $\lambda(\mathbf{y}^{\{j\}})\equiv \lambda(\mathbf{x})^q \mod F_{2n}^{\{j+1\}}$ and $\kappa_1(x_i) = \kappa_2(y_i^{\{j\}})$ for each $i=1, \ldots, 2n$. Moreover, $y_i^{\{j+1\}} \equiv y_i^{\{j\}} \mod F_{2n}^{\{j\}}$.

Then the map sending $x_i$ to the inverse limit of $\{y_i^{\{j\}} \mod F_{2n}^{\{j\}}\}$ as $j \to \infty$ defines an automorphism $\theta$ satisfying all conditions in the claim.

For $j=2$, the tuple $\mathbf{y}^{\{2\}}$ as in ($\ast$) exists.

Note that $F_{2n}/F_{2n}^{\{2\}}$ is the Frattini quotient of $F_{2n}$, so it is the dual of $H^1(F_{2n}, \F_{\ell})$. The element $\lambda(\mathbf{x})$ defines a symplectic pairing on $H^1(F_{2n}, \F_{\ell})\simeq H^1(\calG_n, \F_{\ell})$

\[\begin{tikzcd}
(\, ,\, ) : H^1(F_{2n}, \F_{\ell}) \times H^1(F_{2n}, \F_{\ell}) \arrow["\cup"]{r} & H^2(\calG_n, \F_{\ell}) \arrow["\tr_{\lambda(\mathbf{x})}"]{r} &\F_{\ell},
\end{tikzcd}\]

where $\tr_{\lambda(\mathbf{x})}$ is the trace map induced by $\lambda(\mathbf{x})$. For each $r=1,2$, the surjection $\kappa_r$ induces inflation map $\kappa_r^{*}: H^1(H, \F_{\ell}) \hookrightarrow H^1(F_{2n}, \F_{\ell})$, and then we obtain a bilinear and alternating pairing on $H^1(H, \F_{\ell})$.
By the assumption that $\widetilde{\kappa}_1(\lambda(\mathbf{x}))= \widetilde{\kappa}_2(\lambda(\mathbf{x}))$ has order dividing $q-1$ and the argument similar to Proposition <ref>, the two pairings defined by $\kappa_1^{*}$ and $\kappa_2^{*}$ are the same and $(\alpha, \alpha')=q(\alpha, \alpha')$ for any $\alpha, \alpha' \in H^1(H, \F_\ell)$.
So we can choose a basis $e_1, \ldots, e_{a+b}, f_1, \ldots, f_{a}$ of $H^1(H, \F_{\ell})$ for some $a, b \geq 0$, such that $(e_i, e_j)=(f_i, f_j)=0$ for all $i,j$ and $(e_i, f_j)=1$ if $i=j$ and $0$ otherwise. By the theory of symplectic space, we can extend this basis to a symplectic basis $e_{1,1}, \ldots, e_{n,1}, f_{1,1}, \ldots, f_{n,1}$ of $H^1(F_{2n}, \F_{\ell})$ via the embedding $\kappa_1^{*}$: that is, a basis such that $(e_{i,1}, f_{i,1})=1$ and all the other pairings of elements in the basis are zero, and moreover
$e_{i,1}=\kappa_1^*(e_{i})$ and $f_{j,1}=\kappa_1^*(f_j)$ for $1 \leq i \leq a+b$ and $1\leq j \leq a$. Similarly, we extend this basis to a $q$-symplectic basis $e_{1,2}, \ldots, e_{n,2}, f_{1,2}, \ldots, f_{n,2}$ of $H^1(F_{2n}, \F_{\ell})$ via the embedding $\kappa_2^{*}$ such that $(e_{i,1}, f_{i,1})=q$ for all $i$, and $e_{i,2}=\kappa_2^*(e_{i})$ and $f_{j,2}=\kappa_2^*(f_j)$ for $1 \leq i \leq a+b$ and $1\leq j \leq a$.

Then the automorphism $\beta \in \Aut(H^1(F_{2n}, \F_\ell))$ sending $e_{i,1}\mapsto e_{i,2}$ and $f_{i,1} \mapsto f_{i,2}$ satisfies $\beta \circ \kappa_1^* = \kappa_2^*$ and $(\alpha, \alpha')=q(\beta(\alpha), \beta(\alpha'))$ for any $\alpha, \alpha' \in H^1(F_{2n}, \F_{\ell})$. So by taking the dual, we obtain $\beta^{\vee} \in \Aut( F_{2n}/F_{2n}^{\{2\}})$ making the following diagram commute, where $\kappa_r^{\{2\}}$ is the quotient map of the Frattini quotients induced by $\kappa_r$.

\[\begin{tikzcd}
F_{2n}/F_{2n}^{\{2\}} \arrow["\kappa_2^{\{2\}}"]{r} \arrow["\beta^{\vee}", "\sim"', swap]{d} & H/H^{\{2\}} \\
F_{2n}/F_{2n}^{\{2\}} \arrow["\kappa_1^{\{2\}}", swap]{ru} &
\end{tikzcd}\]

Consider the fiber product $P:=H \times_{H/H^{\{2\}}} F_{2n}/F_{2n}^{\{2\}}$ defined by the natural surjection $H \to H/H^{\{2\}}$ and $\kappa_2^{\{2\}}$. For each $i=1, \ldots, 2n$, we let $z_i$ denote the element in $P$ whose first coordinate is $\kappa_1(x_i)$ and the second coordinate is the preimage under $\beta^{\vee}$ of the image of $x_i$ in $F_{2n}/F_{2n}^{\{2\}}$ (these two coordinates have the same image in $H/H^{\{2\}}$ because of the diagram above, so $z_i$ is a well-defined element in $P$). Since $\kappa_2$ factors through a surjection $\kappa_2^{\wedge} : F_{2n} \to P$ obtained by quotienting $F_{2n}$ by $\ker \kappa_2 \cap F_{2n}^{\{2\}}$, by <cit.>, there exist elements $y_1, \ldots, y_{2n}$ in $F_{2n}$ that generate $F_{2n}$ and $\kappa_2^{\wedge}(y_i)=z_i$. It follows that $\kappa_1(x_i)=\kappa_2(y_i)$ and $\beta^{\vee}$ sends the image of $y_i$ to the image of $x_i$. Moreover, letting $\chi_i$ and $\chi'_i$ denote the dual of $x_i$ and $y_i$ respectively in $H^1(F_{2n}, \F_{\ell})$, we have $\beta(\chi_i)=\chi'_i$, and hence $(\chi_i, \chi_j)=q(\chi'_i, \chi'_j)$. Therefore, by <cit.>, we have $\lambda(\mathbf{x})^q\equiv [y_1, y_2]\cdots [y_{2n-1}, y_{2n}] \mod F_{2n}^{\{3\}}$, so the tuple $\mathbf{y}^{\{2\}}:=(y_1, \ldots, y_{2n})$ satisfies ($\ast$) for $j=2$.

Suppose that there exists $\mathbf{y}^{\{j\}}$ in ($\ast$) for some $j>1$. Then $\mathbf{y}^{\{j+1\}}$ exists.

We will prove that there exist $t_1, \ldots, t_{2n} \in F_{2n}^{\{j\}} \cap \ker \kappa_2$ such that the tuple $\mathbf{y}^{\{j+1\}}$ obtained by setting $y_i^{\{j+1\}}$ to be $y_i^{\{j\}}t_i$ satisfies ($\ast$) . First, it is automatic that $y_i^{\{j+1\}} \equiv y_i^{\{j\}}$ mod $F_{2n}^{\{j\}}$ and $\kappa_1(x_i)=\kappa_2(y_i^{\{j+1\}})$ as $t_i \in F_{2n}^{\{j\}} \cap \ker \kappa_2$. So it suffices to consider the requirement $\lambda(\mathbf{y}^{\{j+1\}}) \equiv \lambda(\mathbf{x})^q \mod F_{2n}^{\{j+2\}}$. Let's denote $D:=\lambda(\mathbf{x})^{-q} \lambda(\mathbf{y}^{\{j\}})$. Since $\lambda(\mathbf{x})$ and $\lambda(\mathbf{y}^{\{j\}})$ are both contained in $[F_{2n}, F_{2n}]$, we have $D \in F_{2n}^{\{j+1\}} \cap [F_{2n}, F_{2n}]$.
Also, assuming that $\xi_n$ is the image of $\lambda(\mathbf{x})$, we have

\[
\widetilde{\kappa}_2(\lambda(\mathbf{x})^q)= \widetilde{\rho}_2(\xi_n)^q = \widetilde{\rho}_1(\xi_n) = \widetilde{\kappa}_1(\lambda(\mathbf{x}))=\widetilde{\kappa}_2(\lambda(\mathbf{y}^{\{j\}})),
\]

where the first and the third equalities follow by definition of $\widetilde{\kappa}_1$ and $\widetilde{\kappa}_2$, the second one follows by the assumption in the proposition that $\widetilde{\rho}_1(\xi_n)=\widetilde{\rho}_2(\xi_n)$ has order dividing $q-1$, and the last one is because of the statement (<ref>) in the proposition and the induction hypothesis $\kappa_1(x_i)=\kappa_2(y_i^{\{j\}})$. So we have that $D$ is contained in $F_{2n}^{\{j+1\}} \cap [F_{2n}, F_{2n}] \cap \ker \widetilde{\kappa}_2$.

The lower $\ell$-central series $\{F_{2n}^{\{j\}}\}$ induces a Lie algebra $\gr(F_{2n}):= \sum_i \gr_i(F_{2n})$ over $\F_\ell$, where $\gr_i(F_{2n}):= F_{2n}^{\{j\}} / F_{2n}^{\{j+1\}}$ and the Lie bracket for homogenous elements of $\gr(F_{2n})$ is induced by the commutator: if $a=\overline{x}\in \gr_r(F_{2n})$ and $b=\overline{y} \in \gr_s(F_{2n})$, then $[a,b]$ is the image of the commutator $[x,y]$ in $\gr_{r+s}(F_{2n})$. So

\begin{eqnarray*}
\lambda(\mathbf{y}^{\{j+1\}})&=& [y_1^{\{j+1\}}, y_2^{\{j+1\}}]\cdots [y_{2n-1}^{\{j+1\}}, y_{2n}^{\{j+1\}}] \\
&=& [y_1^{\{j\}}t_1, y_2^{\{j\}}t_2]\cdots [y_{2n-1}^{\{j\}} t_{2n-1}, y_{2n}^{\{j\}} t_{2n}] \\
&\equiv& \lambda(\mathbf{y}^{\{j\}}) [t_1, y_2^{\{j\}}][y_1^{\{j\}}, t_2] \cdots  [t_{2n-1}, y_{2n}^{\{j\}}] [y_{2n-1}^{\{j\}}, t_{2n}] \mod F_{2n}^{\{j+2\}}.
\end{eqnarray*}

We write the group action of $\gr_i(F_{2n})$ additively, and define

\[
d_j(t_1, \ldots, t_{2n}):= [\tau_1, \sigma_2] + [\tau_2, \sigma_1] + \cdots + [\tau_{2n-1}, \sigma_{2n}] + [\tau_{2n}, \sigma_{2n-1}] \in \gr_{j+1}(F_{2n}),
\]

where $\tau_i$ is the image of $t_i$ in $\gr_{j}(F_{2n})$ and $\sigma_i$ is the image of $y_i^{\{j\}}$ in $\gr_{1}(F_{2n})$.

Considering the short exact sequence $1 \longrightarrow N \longrightarrow F_{2n} \overset{\kappa_2}{\longrightarrow} H \longrightarrow 1$ defined by $\kappa_2$, by <cit.>, $[N, F_{2n}]$ is $[F_{2n}, F_{2n}] \cap \ker \widetilde{\kappa}_2$. So, the image of $F_{2n}^{\{j+1\}} \cap [F_{2n}, F_{2n}] \cap \ker \widetilde{\kappa}_2=F_{2n}^{\{j+1\}} \cap [N, F_{2n}]$ in $\gr_{j+1}(F_{2n})$ is generated by $[a,b]$ for some $a\in \gr_r(F_{2n})$ and $b \in \gr_{j+1-r}(F_{2n})$ such that $a$ is the image of some element of $N$. If $b=c^{\ell}$ for some $c \in \gr_{j-r}(F_{2n})$, then $[a,b]=[a^\ell,c]$ and $a^{\ell}$ is the image in $\gr_{r+1}(F_{2n})$ of some element of $N$. If $b=[c,d]$, then $[a,b]=[[d,a], c]+[[a,c],d]$ and each of $[d,a]$ and $[a,c]$ is the image of some element of $N$ and of degree strictly larger than $r$. It follows that the image of $F_{2n}^{\{j+1\}} \cap [N, F_{2n}]$ in $\gr_{j+1}(F_{2n})$ is generated by $[a,b]$ where $a \in \gr_j(F_{2n})$, $b\in \gr_1(F_{2n})$, and $a$ is the image of some element of $N$. Because $y_1^{\{j\}}, \ldots, y_{2n}^{\{j\}}$ form a generating set of $F_{2n}$, we have that $\sigma_1, \ldots, \sigma_{2n}$ generate $\gr_1(F_{2n})$, and hence the argument above shows that there exist $t_1, \ldots, t_{2n} \in F_{2n}^{\{j\}} \cap \ker \kappa_2$ such that $d_j(t_1, \ldots, t_{2n})$ equals the image of $D$ in $\gr_{j+1}(F_{2n})$. Then for such a choice of $t_1, \ldots, t_{2n}$, we have the tuple $\mathbf{y}^{\{j+1\}}$ satisfying $\lambda(\mathbf{y}^{\{j+1\}}) \equiv \lambda(\mathbf{x})^q$, and hence we finish the proof.

§ CONJECTURES AND EVIDENCES

In <ref>, we give the statements of all of the conjectures made in this paper, which include the moment conjectures in both the function field case and the number field case, and also the conjectures regarding the existence and uniqueness of the probability measure with desired moments. Then in <ref> and <ref>, we discuss the presentation of $G_{\O}(K)$ and positively ramifications, and how they support the moment conjecture in the number field case.

§.§ Statements of the conjectures

We first recall the notion of pro-$\calC$ completion of a $\Gamma$-group defined in <cit.>.
Let $\calC$ be a set of isomorphism classes of finite $\Gamma$-groups, and define $\overline{\calC}$ to be the smallest set of isomorphism classes of $\Gamma$-groups containing $\calC$ that is closed under taking finite direct product, $\Gamma$-quotient and $\Gamma$-subgroup. Then for a given profinite $\Gamma$-group $G$, the pro-$\calC$ completion of $G$ is defined to be

\[
G^{\calC} = \varprojlim_{M} G/M,
\]

where the inverse limit runs over all closed normal $\Gamma$-subgroup $M$ of $G$ such that $G/M \in \overline{\calC}$. We say that a group $G$ is pro-$\calC$ if $G=G^{\calC}$.

Let $q$ be a positive integer such that $\gcd(q, |\Gamma|)=1$.
We consider pairs $(H, h)$ for a profinite admissible $q'$-$\Gamma$-group $H$ and an element $h \in H_2(H \rtimes \Gamma, \Z)_{(|\Gamma|)'}[q-1]$. We say that two such pairs $(G, g)$ and $(H, h)$ are isomorphic if there exists an $\Gamma$-equivariant isomorphism $G \simeq H$ such that its induced coinflation map $H_2(G\rtimes \Gamma, \Z)_{(|\Gamma|)'} \to H_2(H \rtimes \Gamma, \Z)_{(|\Gamma|)'}$ sends $g \mapsto h$.
We define a topological space $\calP_{\Gamma, q}$, whose underlying space is the set of isomorphism classes of pairs $(H, h)$ as described above and basic opens are the sets

\[
U_{\calC, H, h}:= \left\{(G,g) \in \calP_{\Gamma,q} \,\Bigg| \,\begin{aligned} & \text{there is a $\Gamma$-equivariant surjection $e: G \to H $ s.t. } \\ & \text{$e$ induces an isom.  $G^{\calC} \simeq H$ and the coinf map sending $g \mapsto h$}\end{aligned}\right\},
\]

for each finite set $\calC$ of finite $(q|\Gamma|)'$-$\Gamma$-groups and each pair $(H, h)\in \calP_{\Gamma,q}$ such that $H$ is finite pro-$\calC$.
For a measure $\mu$ on $\calP_{\Gamma,q}$, we use the following notation to denote the average number of surjections to a pair $(H,h)$

\[
\EE_{\mu} \# \Sur_{\Gamma}(*, (H, h)):= \sum_{(G,g) \in \calP_{\Gamma,q}}  \# \left\{ \pi \in \Sur_{\Gamma}(G, H) \, \bigg| \, \begin{aligned} &\text{the $\coinf$ map induced } \\ & \text{by $\pi$ sends $g \mapsto h$} \end{aligned} \right\} {\mu}(G,g).
\]

For a finite group $\Gamma$ and a positive integer $q$ satisfying $\gcd(q, |\Gamma|)=1$, there exists a unique probability measure $\mu_{\Gamma, q}$ on the topological space $\calP_{\Gamma,q}$, such that for each $(H,h) \in \calP_{\Gamma,q}$, the following equality holds

\[
\EE_{\mu_{\Gamma,q}} \# \Sur_{\Gamma}(*, (H, h)) = \frac{1}{[H: H^{\Gamma}]}.
\]

When $\Gamma=\Z/2\Z$, we've discussed in Section <ref> that there is a random pro-$\ell$ group model $Y_{q,n}$ giving the desired moments. Next, we define a coarser topological space $\calP_{\Gamma,q, \ell}$ on which our pro-$\ell$ version of the probability measure is defined, and then we conjecture that the limit of the random group model $Y_{q,n}$ as $n \to \infty$ gives the desired probability measure.

Let $\Gamma=\Z/2\Z$ and $\ell$ an odd prime.
We define a coarser topology $\calP_{\Gamma, q, \ell}$ on the underlying space of $\calP_{\Gamma, q}$: where the basic opens are all $U_{\calC, H, h}$ with an additional condition that $H$ is an $\ell$-group.
For fixed $q, n$ satisfying $\gcd(2\ell, q)=1$, we use the notation in Theorem <ref>, fix a generator $\xi_n$ of $H_2(\calG_n, \Z)(\ell)$, and define a probability measure $\nu_{q, \ell, n}$ on the space $\calP_{\Gamma,q, \ell}$ by

\[
\nu_{q, \ell, n}(U_{\calC,H, h}):= \Prob \left( \begin{aligned} &\text{there exists $\pi \in \Sur_{\Gamma}(Y_{q,n}, H)$ s.t. }\\ & \text{$\pi$ induces an isom. $Y^{\calC}_{q,n} \simeq H$ and $\pi_\dagger(\xi_n)=h$} \end{aligned} \right),
\]

for each finite set $\calC$ of $\ell$-$\Gamma$-groups and pair $(H, h) \in \calP_{\Gamma,q, \ell}$ such that $H$ is finite pro-$\calC$.

When $\Gamma=\Z/2\Z$, on the topological space $\calP_{\Gamma, q, \ell}$,
the probability measures $\nu_{q, \ell, n}$ have weak convergence to the measure $\mu_{\Gamma, q}$ in Conjecture <ref>, as $n  \to \infty$.

Next, we give the probability and moment conjecture in the function field case.

Let $\Gamma$ be a finite group and $q$ a prime power such that $\gcd(q, |\Gamma|)=1$. Let $\calC$ be a finite set of finite $(q|\Gamma|)'$-$\Gamma$-groups, and $(H,h)$ a pair in $\calP_{\Gamma, q}$ such that $H$ is finite pro-$\calC$. Fix a generator $\zeta$ of $\hZ(1)_{(q|\Gamma|)'}$, and we let $\delta$ denote the homomorphism $\hZ(1)_{(q|\Gamma|)'} \to H_2(H \rtimes \Gamma, \Z)_{(|\Gamma|)'}$ sending $\zeta \mapsto h$. Then

\[
\lim_{N \to \infty} \frac{\sum\limits_{n \leq N} \#\left\{ K \in E_{\Gamma}(q^n, \F_q(t))\, \bigg|\, \begin{aligned} & \text{ there exists $\pi  \in \Sur_{\Gamma}(\Gs(K),H)$ s.t.} \\& \text{ $\pi$ induces an isom. $\Gs(K)^{\calC} \simeq H$ and $\pi_* \circ \omega_K^{\#}=\delta$} \end{aligned} \right\}}{ \sum\limits_{n\leq N} \# E_{\Gamma}(q^n, \F_q(t))} = \mu_{\Gamma,q}(U_{\calC, H, h}).
\]

\[
\lim_{N \to \infty} \frac{\sum\limits_{n \leq N} \sum\limits_{K \in E_{\Gamma}(q^n, \F_q(t))} \#\left\{ \pi \in \Sur_{\Gamma}\left(\Gs(K), H\right) \,\bigg|\, \pi_{*} \circ \omega_K^{\#} = \delta \right\}}{\sum\limits_{n \leq N} \# E_{\Gamma}(q^n, \F_q(t))} = \frac{1}{[H: H^{\Gamma}]}.
\]

To give the moment conjecture in the number field case, we need to first study how the action of taking quotient modulo $u$ random elements changes the moments. This idea comes from <cit.>, and Lemma <ref> below is the analogue of <cit.> for our notion of the probability space.

Let $\mu$ be a measure on $\calP_{\Gamma, q}$. For a positive integer $t$, define the measure $\calQ^t\mu$ on $\calP_{\Gamma,q}$ as obtained by taking the $\Gamma$-equivariant quotient of the random pair $(H,h)\in \calP_{\Gamma,q}$ according to $\mu$ modulo $t$ random elements. That is, for any $(H,h)$, define

\[
\calQ^t\mu(H, h) := \sum_{(G,g)\in \calP_{\Gamma,q}}  \Prob\left( G/[x_1, \ldots, x_t]  \simeq H \text{ such that } g \mapsto h\right) \mu(G,g),
\]

where $x_1, \ldots, x_t$ are $t$ random elements of $G$ with respect to Haar measure, and the notation $[x_1, \ldots, x_t]$ represents the closed normal $\Gamma$-subgroup of $G$ generated by $x_1, \ldots, x_t$.

Let $\mu$ be a measure on $\calP_{\Gamma, q}$. Then for any $(H,h)\in \calP_{\Gamma,q}$, we have

\[
\EE_{\calQ^t\mu} \# \Sur_{\Gamma}(*, (H,h)) = \frac{\EE_{\mu} \# \Sur_{\Gamma}(*, (H,h))}{|H|^t}.
\]

It suffices to prove the lemma for $t=1$. For two pairs $(G_1, g_1), (G_2, g_2) \in \calP_{\Gamma, q}$, we write $\pi: (G_1, g_1) \to (G_2, g_2)$ if $\pi$ is a $\Gamma$-equivariant group homomorphism $G_1 \to G_2$ whose induced coinflation maps $g_1$ to $g_2$, and we write $\Sur_{\Gamma}((G_1, g_1), (G_2, g_2))$ for the set of surjections $(G_1, g_1) \to (G_2, g_2)$. Then we have

\begin{eqnarray*}
&& \EE_{\calQ\mu} \# \Sur_{\Gamma}(*, (H, h)) \\
&=& \sum_{(G,g) \in \calP_{\Gamma,q}} \# \Sur_{\Gamma}\left((G,g), (H, h)\right) \cdot \calQ\mu(G,g) \\
&=& \sum_{(G,g) \in \calP_{\Gamma,q}} \sum_{(E,e) \in \calP_{\Gamma,q}} \#\Sur_{\Gamma}\left((G,g), (H,h)\right) \cdot \Prob\left(E/[x] \simeq G \text{ s.t. } e\mapsto g\right) \cdot \mu(E,e) \\
&=& \sum_{(E,e) \in \calP_{\Gamma, q}} \sum_{\pi \in \Sur_{\Gamma}\left( (E,e), (H,h)\right)} \Prob\left(\text{the random $x\in E$ is contained in $\ker \pi$}\right) \cdot \mu(E,e) \\
&=& \sum_{(E,e) \in \calP_{\Gamma,q}} \# \Sur_{\Gamma}\left((E,e), (H,h) \right)\cdot \frac{1}{|H|} \cdot \mu(E,e) \\
&=& \frac{\EE_{\mu} \#\Sur_{\Gamma}(*, (H,h))}{|H|}.
\end{eqnarray*}

Let $\Gamma$ be a finite group, $Q$ a number field, and $m$ the maximal integer such that the $m$-th roots of unity $\mu_m$ is contained in $Q$. Let $H$ be a finite admissible $\Gamma$-group. For any extension $K/Q$, we let $G^{\#}_{\O}(K):=\Gal(K_{\O}/KQ_{\O})_{(|\Gamma|)'}$ be the Galois group of the $Q$-relative maximal unramified pro-$|\Gamma|'$ extension of $K$. Then

\[
\lim_{B \to \infty} \frac{\sum_{D \leq B} \sum_{K \in E_{\Gamma}(D,Q)} \# \Sur_{\Gamma}(G^{\#}_{\O}(K), H)}{ \sum_{D \leq B} \# E_{\Gamma}(D,Q)}=\frac{\#H_2(H \rtimes\Gamma, \Z)_{(|\Gamma|)'}[m]}{[H:H^{\Gamma}] \cdot |H|^u},
\]

where $u$ is the rank of the group of units in the ring $\calO_Q$ of algebraic integers of $Q$.

* Although we will see in <ref> that, for some number field $K$, we can define a lifting invariant that is analogous to the invariant $\omega_K^{\#}$ in the function field case, in general, we don't know how to define such an invariant, so in Conjecture <ref>, we do not specify the “lifting invariant” and study only the distribution of $G_{\O}^{\#}(K)$.

* We only make the conjecture in the moment version because in the number field case the characteristic is zero and then the distribution of $G^{\#}_{\O}(K)$ is not a measure on $\calP_{\Gamma, q}$ for any $q$. However, one can similarly define a topology on the set of pairs $(H,h)$ where $H$ is an admissible $\Gamma$-group and $h \in H_2(H \rtimes \Gamma, \Z)_{(|\Gamma|)'}[m]$, and conjecture that there exists a unique probability measure on this topological space that gives the desired moments.

§.§ Evidence I: Presentations of $G_{\O}(K)$

In this section, we fix a finite group $\Gamma$ and let $Q$ denote a global field that is either $\F_q(t)$ or a number field such that $Q_{\O}=Q$ (i.e. $Q$ does not have any non-trivial unramified extension). Here, we assume $Q_{\O}=Q$ because the results in <cit.> study the presentation of $G_{\O}(K)$ but not of a proper subgroup of $G_{\O}(K)$. Also, even when $Q\neq Q_{\O}$, the fields $K \in E_{\Gamma}(D, Q)$ such that $K \cap Q_{\O} \supsetneq Q$ are sparse, so one can study Conjecture <ref> for $Q$ by replacing $Q$ with $Q_{\O}$, and hence understanding the case $Q=Q_{\O}$ is to some extent sufficient.

We let $F_n(\Gamma)$ denote the free $|\Gamma|'$-$\Gamma$-group on $n$ generators <cit.>, that is: $F_n(\Gamma)$ is the free pro-$|\Gamma|'$ group on $\{x_{i,\gamma} \mid i =1 , \ldots n \text{ and } \gamma \in \Gamma\}$ where $\sigma \in \Gamma$ acts on $F_n(\Gamma)$ by $\sigma(x_{i, \gamma})=x_{i,\sigma \gamma}$. Let $G$ be a finitely generated $|\Gamma|'$-$\Gamma$-group. For a sufficiently large $n$, there exists a $\Gamma$-equivariant short exact sequence of $\Gamma$-groups

\[
1 \longrightarrow N \longrightarrow F_n(\Gamma) \overset{\pi}{\longrightarrow} G \longrightarrow 1,
\]

and we call such a short exact sequence a $\Gamma$-presentation of $G$. For a set $\calC$ of isomorphism classes of $|\Gamma|'$-$\Gamma$-groups, if $G$ is pro-$\calC$, then the map $\pi$ factors through the pro-$\calC$ completion map $F_n(\Gamma) \to F_n(\Gamma)^{\calC}$. We call the induced short exact sequence

\[
1 \longrightarrow M \longrightarrow F_n(\Gamma)^{\calC} \overset{\pi^{\calC}}{\longrightarrow} G \longrightarrow 1
\]

a pro-$\calC$ $\Gamma$-presentation of $G$.

For the rest of this section, we assume $\calC$ is finite. For any $\Gamma$-extension $K$ of $Q$ that is split completely at $\infty$ or at all archimedean primes, by <cit.>, the pro-$\calC$ completion of $G_{\O}(K)$ is finite, so $\Gs(K)^{\calC}$ is finite because $\Gs(K)$ is a quotient of $G_{\O}(K)$ in both the number field case and the function field case. Then we can study a pro-$\calC$ $\Gamma$-presentation

\begin{equation}\label{eq:C-Gur}
1 \longrightarrow M \longrightarrow F_n(\Gamma)^{\calC} \overset{\pi^{\calC}}{\longrightarrow} \Gs(K)^{\calC} \longrightarrow 1.
\end{equation}

The work <cit.> studies the minimal number of elements that generates $M$ as a $\Gamma$-closed normal subgroup of $F_n(\Gamma)^{\calC}$ in such a presentation, and gives an upper bound for this minimal number using Galois cohomology groups $H^i(G_{\O}(K), A)$ for $i=1,2$ and $A$ a finite simple $\Gal(K_{\O}/Q)$-module. We will apply that result to number field case and function field case respectively, and show that the number field case needs $u$ more elements than the function field case to generate $M$, where $u$ is the rank of $\calO_Q^{\times}$ as defined in Conjecture <ref>.

We first recall the definition of multiplicities in <cit.>. Given a short exact sequence $1 \to N \to F \overset{\omega}{\longrightarrow} H \to 1$ of $\Gamma$-groups, we let $N_0$ be the intersection of all maximal proper $F \rtimes \Gamma$-normal subgroups of $N$, and denote $\overline{N}=N/N_0$ and $\overline{F}=F/N_0$. Then $\overline{N}$ is a direct sum of finite irreducible $\overline{F} \rtimes \Gamma$-groups. For any finite irreducible $\overline{F} \rtimes \Gamma$-group $A$, we define the multiplicity $m(\omega, \Gamma, H, A)$ to be the multiplicity of $A$ appearing in $\overline{N}$.

Let $Q$ be $\F_q(t)$ with $\gcd(q, |\Gamma|)=1$ or a number field such that $Q=Q_{\O}$. Let $K$ be a $\Gamma$-extension of $Q$ such that each archimedean prime is unramified when $Q$ is a number field, and $\infty$ splits completely when $Q=\F_q(t)$. For a finite set $\calC$ of $|\Gamma|'$-$\Gamma$-groups, consider a pro-$\calC$ $\Gamma$-presentation (<ref>) of $\Gs(K)^{\calC}$. Then for a prime $\ell$ such that $\ell \neq \Char(Q)$ and $\ell \nmid |\Gamma|$, and a finite simple $\F_{\ell}[ \Gs(K)^{\calC}\rtimes \Gamma ]$-module $A$, we have

\[
m(\pi^{\calC}, \Gamma, \Gs(K)^{\calC}, A)
\leq \begin{cases}
\dfrac{(n+1)\dim_{\F_\ell} A - \xi(A)-{\bf{1}}_{\F_\ell}(A)}{\dim_{\F_\ell} \Hom_{ \Gs(K)^{\calC}\rtimes \Gamma}(A)} & \text{ if $Q$ is a function field} \\
\dfrac{(n+u+1)\dim_{\F_\ell} A - \xi(A)-{\bf{1}}_{\F_\ell}(A)}{\dim_{\F_\ell} \Hom_{ \Gs(K)^{\calC}\rtimes \Gamma}(A)} & \text{ if $Q$ is a number field}.
\end{cases}
\]

Here $\xi(A):=\dim_{\F_\ell} A^{\Gamma}/A^{ \Gs(K)^{\calC}\rtimes \Gamma}$; ${\bf{1}}_{\F_\ell}(A)$ is 1 if $A=\F_\ell$ and $\mu_{\ell}\not\subset Q$, and 0 otherwise; and $u$ is the rank of $\calO_{Q}^{\times}$.

We take the pro-$\calC$ completions for a finite $\calC$ only because we want to work with a presentation with finitely many generators. If $\Gs(K)$ is finitely generated, then the pro-$\calC$ completions in the inequality can be removed. Also, we can take an ascending series of finite sets $\{\calC_i\}$ such that $\cup\, \calC_i$ contains all isomorphism classes of $|\Gamma|'$-$\Gamma$-groups, then $\varprojlim \Gs(K)^{\calC_i}=\Gs(K)$. We will see in the discussion after the proof of this lemma that only the difference between the upper bounds in the number field case and the function field case is important, which does not depend on the choice of $\calC$.

We denote $G:=G_{\O}(K)$ and $G^{\#}:=\Gs(K)$.
By <cit.>,

\begin{equation}\label{eq:mult}
m(\pi^{\calC}, \Gamma, (G^{\#})^{\calC}, A) \leq \frac{n \dim_{\F_\ell} A - \xi(A) + \dim_{\F_\ell} H^2(G^{\#}, A)^{\Gamma} - \dim_{\F_\ell} H^1(G^{\#}, A)^{\Gamma}}{\dim_{\F_\ell} \Hom_{ (G^{\#})^{\calC}\rtimes \Gamma}(A)}
\end{equation}

where the $\Gamma$ actions on the cohomology groups are induced by the conjugation action of $\Gamma$ on $G^{\#}$.

We first prove the function field case. Note that $G^{\#}$ is the quotient of $G$ modulo the decomposition subgroup at $\infty$. So we can assume that $n$ is sufficiently large such that $\pi^{\calC}$ is the composite map $F_n(\Gamma)^{\calC} \overset{\hat{\pi}^{\calC}}{\longrightarrow} G^{\calC} \to (G^{\#})^{\calC}$. Then we have a formula for $m(\hat\pi^{\calC}, \Gamma, G^{\calC}, A)$ similar to (<ref>). Because $K/Q$ is split completely above $\infty$, the genus of $K$ is positive. By <cit.>,

\begin{eqnarray}
&& \dim_{\F_\ell} H^2(G, A)^{\Gamma} - \dim_{\F_\ell} H^1(G, A)^{\Gamma} \nonumber\\
&=& \dim_{\F_{\ell}} \Hom_{\Gal(K_{\O}/Q)} (A, \mu_{\ell}) - \dim_{\F_\ell} A^{\Gal(K_{\O}/Q)}. \label{eq:delta}
\end{eqnarray}

Here $A$ is a $(G^{\#})^{\calC} \rtimes \Gamma$-module, and hence is a $\Gal(\Ks/Q)$-module. Because $\Ks/Q$ is split completely over $\infty$, if $A=\mu_{\ell}$, then $\mu_{\ell}$ must be contained in $Q$, so $A$ is a trivial module and (<ref>) is $1-1=0$. If $A=\F_{\ell}$, then (<ref>) is $-1$ when $\mu_\ell\not \subset Q$ and is 0 otherwise. If $A$ is neither $\F_{\ell}$ or $\mu_{\ell}$, then both terms in (<ref>) are 0. So we have an upper bound: $m(\hat\pi^{\calC}, \Gamma, G^{\calC}, A)\leq (n \dim A - \xi(A)-{\bf1}_{\F_\ell}(A)) \cdot (\dim \Hom_{G^{\calC}\rtimes \Gamma}(A))^{-1}$. Recall that $G^{\#}$ is the $\Gamma$-equivariant quotient of $G$ modulo one element (a generator of the decomposition at $\infty$). By following the proof of <cit.>, we have $m(\pi^{\calC}, \Gamma, (G^{\#})^{\calC}, A) = m(\hat{\pi}^{\calC}, \Gamma, G^{\calC}, A)+ \dim A \cdot (\dim \Hom_{G^{\calC}\rtimes \Gamma}(A))^{-1}$, and hence we prove the lemma in the function field case.

When $Q$ is a number field, $G=G^{\#}$ because of the assumption $Q_{\O}=Q$. Let $T$ denote the set of all archimedean primes and all primes of $K$ above $\ell$. Let $S_\infty(Q)$ denote the set of all archimedean primes of $Q$. By <cit.>,

\begin{eqnarray*}
\log_{\ell} \chi_{K/Q, T}(A)&:=&\sum_{i=0}^2 (-1)^i \dim_{\F_\ell} H^i(G_T(K), A)^{\Gamma}\\
&=& \sum_{v \in S_{\infty}(Q)}  \left( \dim_{\F_\ell} \hH^0(Q_v, \Hom(A, \mu_{\ell})) - \dim_{\F_\ell} H^0 (Q_v, \Hom(A, \mu_{\ell}))\right),
\end{eqnarray*}

where $\hH^0$ is the 0-th Tate cohomology of the group $G_{Q_v}$.
We let $r_1$ and $r_2$ denote the number of real embeddings and complex embeddings of $Q$ respectively.
If $v$ is imaginary, then $\dim H^0(Q_v, \Hom(A, \mu_{\ell}))=\dim \Hom(A, \mu_{\ell}) = \dim A$.
When $\ell$ is odd, $G_{Q_v}$ is either trivial or $\Gal(\C/\R)=\Z/2\Z$, so the Tate cohomology terms above are always 0 <cit.>.
Since $K_{\O}/Q$ is unramified at every archimedean prime, if $v$ is real, then $A$ as a $G_{Q_v}$-module is trivial but $\mu_{\ell}$ is not trivial, so $H^0(Q_v, \Hom(A, \mu_{\ell}))=\Hom_{G_{Q_v}}(A, \mu_{\ell})=0$.
When $\ell=2$, for each real place $v$ of $Q$, $G_{Q_v}$ acts trivially on $A$ and so on $\Hom(A, \mu_2)$. Since $\Hom(A, \mu_2)$ has exponent 2, its $G_{Q_v}$-norm map is zero, which implies that $\hH^0(Q_v, \Hom(A, \mu_2))=H^0(Q_v, \Hom(A, \mu_2))$. When $\ell=2$ and $v$ is imaginary, $G_{Q_v}=1$, so the Tate cohomology term is trivial. Therefore, in every case, we have $\log_{\ell}\chi_{K/Q, T}(A) = -r_2 \dim_{\F_\ell} A$.

Then by <cit.>,

\begin{eqnarray}
&& \dim_{\F_{\ell}} H^2(G, A)^{\Gamma} - \dim_{\F_\ell} H^1(G, A)^{\Gamma} \nonumber \\
&\leq& -r_2\dim_{\F_\ell} A+ \dim_{\F_{\ell}} \Hom_{\Gal(K_T/Q)}(A, \mu_{\ell}) - \dim_{\F_{\ell}}A^{\Gal(K_{\O}/Q)} + [K:\Q] \dim_{\F_\ell} A. \label{eq:delta-nf}
\end{eqnarray}

Similarly to the function field case, if $A=\mu_\ell$, then $\mu_{\ell} \subset Q$ and $\Delta:=\dim \Hom_{\Gal(K_T/Q)}(A, \mu_{\ell})-\dim A^{\Gal(K_{\O}/Q)} =0$. If $A$ is neither $\F_{\ell}$ or $\mu_{\ell}$, then $\Delta=0$. When $A=\F_{\ell}$, $\Delta$ is $0$ if $\mu_{\ell}\subset Q$ and is $-1$ when $\mu_{\ell} \not\subset Q$. Finally, because $[K:\Q]=r_1+2r_2$ and $u=r_1+r_2-1$, the lemma in the number field case follows by (<ref>).

The multiplicities computed in Lemma <ref> are closely related to the minimal number of relators in the presentation <ref> (which is the minimal number of elements that generate $M$ as a $\Gamma$-closed normal subgroup of $F_n(\Gamma)^{\calC}$). Let $R$ and $F$ be the quotients of $M$ and $F_n(\Gamma)^{\calC}$ respectively modulo the intersection of all maximal proper $F_n(\Gamma)^{\calC} \rtimes \Gamma$-normal subgroups of $M$. Then

\[
R\simeq \bigoplus_{A} A^{m(\pi^{\calC}, \Gamma, \Gs(K)^{\calC}, A)},
\]

where the direct sum runs over all finite simple $F\rtimes \Gamma$-groups $A$. Then a set of elements generates $M$ as a $\Gamma$-closed normal subgroup of $F_n(\Gamma)^{\calC}$ if and only if the image of the set in $R$ generates $R$ as a $\Gamma$-closed normal subgroup of $F$. By <cit.>, for a non-abelian $A$, the direct product of arbitrarily many copies of $A$ can always be generated by 1 element; and for an abelian $A$, the maximal $m$ such that $A^m$ can be generated by 1 element is $\dim_{\F_\ell} A \cdot (\dim_{\F_\ell} \Hom_{\Gs(K)^{\calC} \rtimes \Gamma}(A))^{-1}$. Thus, the upper bounds for the multiplicities given in Lemma <ref> show that in the pro-$\calC$ $\Gamma$-presentation (<ref>), the number field case needs $u$ more relators than the function field case. If these $u$ extra relators are randomly distributed, then Conjecture <ref> follows by Conjecture <ref> and Lemma <ref> (regardless of the “prime-to-$q$” condition in the function field case).

Of course, in Lemma <ref>, we give only upper bounds of the multiplicities, and if there exist better upper bounds, then one may wonder whether Conjecture <ref> is still reasonable. <cit.> shows that the equality in Lemma <ref> holds if and only if the following cohomological conditions are satisfied:

* $H^2(\ker (G_{\O}(K) \to G_{\O}(K)_{(|\Gamma|)'}), \F_{\ell})=0$ (see <cit.>), and

* in the number field case, $\Sha^2_{\O}(K, A)$ and $\B_{\O}(K,A)$ are in the same class of the Grothendieck group of $\F_\ell[\Gal(K/Q)]$-modules (see <cit.>). Here $\Sha^2_{\O}(K,A)$ is the second Shafarevich group and $\B_{\O}(K,A)$ is defined in <cit.>.

We don't know to what extent these two conditions hold, so it's unclear whether there are upper bounds that are generically better than the ones given in Lemma <ref>.

§.§ Evidence II: Positively ramified extensions of number fields

If Conjectures <ref> and <ref> are true, then one may expect that, for a number field $K$, there exists some group associated to $K$ such that: 1) it has group structure similar to the prime-to-$\Char(k)$ part of the étale fundamental group of a smooth projective curve $X$ over a finite field $k$; and 2) $G^{\#}_{\O}(K)$ is a $\Gamma$-equivariant quotient of that group modulo $u$ elements. In the function field case, for $K$ satisfying Notation <ref>, we have seen that $G^{\#}_{\O}(K)$ is naturally a quotient of $\pi_1^{\et}(X_{\overline{k}})=G_{\O}(K\overline{k})$. When we focus on the pro-$\ell$ completions of Galois groups in the number field case, then the passage to the algebraic closure of constant field is analogous to taking the composition of $K$ with the cyclotomic $\Z_\ell$-extension $Q_{\infty}$ of $Q$. However, the étale fundamental group $G_{\O}(K)$ is too small to be an analogue of $\pi_1^{\et}(X)$ because $Q_\infty$ is already ramified. Let $S$ be a set of primes of $K$ that contains all the archimedean primes and primes above $\ell$, and let $G_S(K)(\ell)$ denote the Galois group of the maximal pro-$\ell$ extension of $K$ that is unramified outside primes above $S$. It is well known that there exists a strong analogy between $G_S(K)(\ell)$ and $\pi_1^{\et}(X - \{P_1, \ldots, P_m\})(\ell)$ when $\ell\neq \Char(k)$: both of them are Poincaré group at $\ell$ of dimension 2 and have the Poitou–Tate duality. Because the Riemann existence theorem shows that there is a natural surjection

\[\begin{tikzcd}
\pi_1^{\et}(X-\{P_1, \ldots, P_m\})(\ell) \arrow[two heads]{r} &\pi_1^{\et}(X)(\ell)
\end{tikzcd}\]

whose kernel is the free product of the inertia subgroups at $P_1, \ldots, P_m$. So if the analogue of $\pi_1^{\et}(X)(\ell)$ exists, then it should be some group between $G_S(K)(\ell) \twoheadrightarrow G_{\O}(K)(\ell)$.

In the sequence of works by Wingberg and Schmidt <cit.>, they introduced the notion of positively ramified extensions of number fields, and in some nice cases, they prove that there is a good analogy between the Galois group of the maximal positively ramified extension and $\pi_1^{\et}(X)$. We briefly explain their ideas below.
Let $\ell$ be an odd prime number, and $\Q_\ell^{pre}:= \Q_\ell^{nr}(\zeta_\ell+\zeta_\ell^{-1})(odd)(\zeta_\ell)$, where $\Q_\ell^{nr}$ is the maximal unramified extension of $\Q_\ell$ and the notation $\Q_\ell^{nr}(\zeta_\ell+\zeta_\ell^{-1})(odd)$ means the maximal pro-odd extension of $\Q_\ell^{nr}(\zeta_\ell+\zeta_\ell^{-1})$. So $\Q_\ell^{pre}$ is a $\Z/2\Z$-extension of $\Q_\ell^{nr}(\zeta_\ell+\zeta_\ell^{-1})(odd)$, and we let $\rho$ denote the non-trivial element of its Galois group, which can be viewed as the $\ell$-adic version of the complex conjugation. A local field $k/\Q_\ell$ is orientable if $k \subset \Q_\ell^{pre}$ and if either $k=k^{+}:=k^{\langle{\rho}\rangle}$ or $\zeta_\ell \in k^{nr}$. In other words, at each local place, Wingberg and Schmidt construct the structure that is similar to a CM-field. So the positively ramified extension is the analogue of the totally real field: a local extension $l/k$ is positively ramified (p.r.) if $l \subset \Q_\ell^{pre}k$ (in $\Q_2$ if $p=2$) and the Galois closure of $l/k$ has at most pure wild ramification (i.e. the ramification index is a power of $\ell$). Then a number field extension $L/K$ is called positively ramified (p.r.) if its local completion is p.r. at each prime.

For an odd prime number $\ell$, a number field $K$ is called $\ell$-CM if, at every prime $\frakp$ of $K$ lying above $\ell$, $K_{\frakp}$ is orientable, $[K_{\frakp}:K_{\frakp}^+]=2$ and $K_{\frakp}$ contains an index-2 subfield $k$ such that $k=k^{+}$. We let $K_{\pos}$ denote the maximal p.r. extension of $K$. Then by <cit.>, if $K$ is $\ell$-CM and contains $\mu_{\ell}$, then the followings hold (for analogous statements for $\pi_1^{\et}(X)$, see <cit.>):

* If $g_{\ell}(K)>0$, then $\Gal(K_{\pos}/K)(\ell)$ is a Poincaré group of dimension 3 with dualizing module $\mu_{\ell^\infty}$.

* If $g_{\ell}(K)=0$, then $\Gal(K_{\pos}/K)(\ell)$ is a free pro-$\ell$ group.

Here $g_{\ell}(K)$ is the $\ell$-genus which can be computed by the rank of the positive ramified Picard group <cit.>. Moreover, Schmidt <cit.> proved the analogue of the Riemann existence theorem: kernel of $G_S(K)(\ell) \twoheadrightarrow \Gal(K_{\pos}/K)(\ell)$ is the free product of inertia subgroups.

Assume that $\ell$ is an odd prime number, $Q=\Q(\mu_{\ell})$ such that $Q_{\O}(\ell)=Q$ (equivalently, the $\ell$-part of the class group of $Q$ is trivial), and $\Gamma$ is a finite group with $\ell\nmid |\Gamma|$. Then $Q$ is $\ell$-CM. Assume that $K$ is a $\Gamma$-extension of $Q$ that is $\ell$-CM (for example, this holds when $K/Q$ is unramified at all primes lying above $\ell$). We let $K_{\pos}(\ell)$ denote the maximal pro-$\ell$ p.r. extension of $K$. Then $KQ_{\infty}$ is a p.r. extension of $K$, and we have the following short exact sequence that is the analogue of (<ref>)

\begin{equation}\label{eq:positive-es}
1 \longrightarrow \Gal(K_{\pos}(\ell) / KQ_{\infty}) \longrightarrow \Gal(K_{\pos}(\ell)/K) \longrightarrow \Gal(KQ_{\infty}/K) \longrightarrow 1,
\end{equation}

where every term naturally has an action of $\Gamma$ (when we fix a splitting of $\Gal(K_{\pos}(\ell)/Q) \to \Gal(K/Q)$).
Note that $\Gal(KQ_{\infty}/K)\simeq \Z_{\ell}$, which is a Poincaré group of dimension 1 with dualizing module $\Q_{\ell}/\Z_{\ell}$. So by <cit.>, from the exact sequence above, we see that $\Gal(K_{\pos}(\ell)/KQ_{\infty})$ is a pro-$\ell$ Poincaré group of dimension 2 with dualizing module $\mu_{\ell^{\infty}}$, and hence we have the analogue of Poincaré duality.
Moreover, since $\mu_{\ell^{\infty}} \subset K Q_{\infty}$, by Kummer theory, the abelianization of $\Gal(K_{\pos}(\ell)/KQ_{\infty})$ is free over $\Z_{\ell}$, so $\Gal(K_{\pos}(\ell)/KQ_{\infty})$ is a pro-$\ell$ Demuškin group in the form of $\langle x_1, \ldots, x_{2n} \mid [x_1, x_2]\cdots [x_{2n-1}, x_{2n}] \rangle$.
So one can repeat the argument in the proof of Lemma <ref> to show that there is a $\Gal(Q_{\infty}/Q)$-equivariant isomorphism

\begin{equation}\label{eq:pos-H2-mu}
H_2(\Gal(K_{\pos}(\ell)/Q_{\infty}), \Z)(\ell)\simeq \Z_{\ell}(1).
\end{equation}

We let $v$ denote the unique prime of $Q$ lying above $\ell$, let $\frakp$ be a prime of $K$ lying above $v$, and pick a prime $\frakP$ of $K_{\pos}(\ell)$ above $\frakp$. By <cit.> and the assumption $\ell \nmid |\Gamma|$, the group of principal units of $K_{\frakp}$ is isomorphic to

\[
U^1_{K_{\frakp}} \simeq \Z_\ell[\Gal(K_{\frakp}/Q_v)]^{\ell-1}
\]

as $\Gal(K_{\frakp}/Q_v)$-modules. Let $a$ denote a generator of $\Gal(KQ_{\infty}/K)$. Note that $KQ_{\infty}/K$ is completely widely ramified at $\frakp$. Then by local class field theory, we can pick an element $a_{\frakp}$ of the inertia subgroup $\Gal(K_{\pos}(\ell)/K)$ at $\frakP$, such that it maps to $a$ under the quotient map in (<ref>) and the $\Gal(K_{\frakp}/Q_v)$-closed subgroup of the abelianization of $\Gal(K_{\pos}(\ell)_{\frakP}/K_{\frakp})$ generated by the image of $a_{\frakp}$ is isomorphic to $\Z_\ell[\Gal(K_{\frakp}/Q_v)]$. Then
for other prime $\frakp'$ of $K$ above $v$, we choose an element $\gamma\in \Gal(K/Q)$ such that $\gamma(\frakp)=\frakp'$, and define $a_{\frakp'}$ to be $\gamma(a_{\frakp})$.
We define $G_{\pos}^{\#}(K)$ to be the quotient of $\Gal(K_{\pos}(\ell)/KQ_{\infty})$ modulo the $\Gamma$-closed normal subgroup generated by these elements $a_{\frakp}$'s for all $\frakp \mid v$, and we denote the field extension corresponding to $G_{\pos}^{\#}(K)$ by $K^{\#}_{\pos}/KQ_{\infty}$. The group $G_{\pos}^{\#}(K)$ is designed in the way such that it is a reasonable analogue of $\Gs(K)$ in Notation <ref>. Indeed, we have to take the above approach to quotient out all the relevant lifts of $\Gal(KQ_{\infty}/K)$ (which is the analogue of the Frobenius), because in the function field case the place $\infty$ of $X_{\overline{k}}$ cannot further ramify or be further inert.
For example, if $v$ splits completely in $K/Q$, then the elements $a_{\frakp}$'s are lifts of $a$ that are compatible with the $\Gal(K/Q)$ action on all the primes above $v$, which is exactly the same situation as the function field case.
So the quotient map $\Gal(K_{\pos}(\ell)/Q_{\infty}) \twoheadrightarrow \Gal(K_{\pos}^{\#}/Q_{\infty})$ induces a coinflation map, which gives the analogue of the invariant $\omega_K^{\#}$ in Definition <ref>:

\[
\Z_{\ell}(1) \simeq H_2(\Gal(K_{\pos}(\ell)/Q_{\infty}), \Z)(\ell) \longrightarrow H_2(\Gal(K_{\pos}^{\#}/Q_{\infty}), \Z)(\ell)
\]

and it's clear by our construction that this map factors through $\mu_{\ell}$.
We cannot recover the group theoretical description of the invariant as described in Proposition <ref> and Corollary <ref> because we don't have the analogue of the system of inertia generators for $\Gamma$-extensions of $Q_{\infty}$. However, we can generalize the cohomological definition of the invariant in <ref>: we can define a trace map $H^2(\Gal(K_{\pos}(\ell)/KQ_{\infty}), \Z_{\ell}(1) )\to \Z_{\ell}$ and choose the isomorphism (<ref>) such that it corresponds to the class of trace $-|\Gamma|$.

By the discussion above, it's reasonable to consider $G_{\pos}^{\#}(K)$ for a number field $K$ satisfying our assumptions as a good analogue of $\Gs(K)$ for a function field $K$. Then, for the number field case, we consider the natural quotient map

\begin{equation}\label{eq:Pos-Nr}
G^{\#}_{\pos}(K) \longrightarrow G_{\O}(K)(\ell),
\end{equation}

whose kernel is the normal subgroup generated by the inertia subgroups of $K_{\pos}^{\#}/K$ at primes above $v$. Let $\frakp$ be a prime of $K$ above $v$, and $\frakP$ a prime of $K_{\pos}^{\#}$ above $\frakp$. By definition of p.r., the local completion $(K_{\pos}^{\#})_{\frakP}/K_{\frakp}$ is a sub-$\ell$-extension of $\Q_{\ell}^{pre}/K_{\frakp}$. As we assumed that $K$ is $\ell$-CM,  $K_{\frakp}^{+}$ has index 2 in $K_{\frakp}$ and $\Gal(K_{\frakp}^+/Q_v^+) \cong \Gal(K_{\frakp}/Q_v)$. Recall that $\rho$ is the $\ell$-complex conjucation, we let $(U_{K_{\frakp}}^1)^+$ denote the $\rho$-invariant subgroup of the principal unit group $U_{K_{\frakp}}^1$. Then since $U_{K_{\frakp}}^1 \simeq \Z_\ell[\Gal(K_{\frakp}/\Q_{\ell})]$ as $\Gal(K_{\frakp}/\Q_{\ell})$-modules, we have the following isomorphism of $\Gal(K_{\frakp}/Q_v)$-modules

\[
(U_{K_{\frakp}}^1)^+ \simeq \Z_\ell[\Gal(K_{\frakp}^+/\Q_{\ell})] \simeq \Z_\ell[\Gal(K_{\frakp}^+/Q_v^+)]^{\frac{\ell-1}{2}}.
\]

So by local class field theory, the maximal pro-$\ell$ abelian subextension of $K_{\frakp}$ inside $\Q_{\ell}^{pre}$ has Galois group isomorphic to $\Z_{\ell}[\Gal(K_{\frakp}/Q_v)]^{\frac{\ell-1}{2}}\oplus \Z_{\ell}$, where the extra term $\Z_{\ell}$ comes from the unramified part. Recall that when we define $G_{\pos}^{\#}(K)$, we quotient out a copy of $\Z_\ell[\Gal(K_{\frakp}/Q_v)]$ that is generated by $a_{\frakp}$. So we conclude that the Galois group of the maximal abelian subextension of $(K_{\pos}^{\#})_{\frakP}/K_{\frakp}$ is a quotient of $\Z_{\ell}[\Gal(K_{\frakp}/Q_v)]^{\frac{\ell-3}{2}} \oplus \Z_{\ell}$. By the Burnside basis theorem for pro-$\ell$ groups, the inertia subgroup of $(K_{\pos}^{\#})_{\frakP}/K_{\frakp}$ is the $\Gal(K_{\frakp}/Q_v)$-closed normal subgroup generated by $\frac{\ell-3}{2}$ well-chosen elements.
Finally, we look at all the primes above $v$, and obtain that the kernel of the quotient map (<ref>) is the $\Gal(K/Q)$-closed normal subgroup generated by $\frac{\ell-3}{2}$ elements. The rank of $\calO_Q^{\times}$ is exactly $\frac{\ell-3}{2}$.

The construction above can be applied to other cases, for example, to the case that $Q=\Q(\mu_{\ell^m})$ and $K$ is $\ell$-CM. However, the situations that can be covered are rare because of the $\ell$-CM condition. It would be interesting to understand how to generalize the definition of $\ell$-CM to cover more cases.

§ A RANDOM GROUP MODEL FOR RANDOM 3-MANIFOLDS

In the work <cit.>, Dunfield and Thurston studied random orientable 3-manifolds constructed by a random Heegaard splitting, which means gluing two handlebodies by a random walk in the mapping class group of a surface. They compared the probabilities that the random 3-manifolds have finite covers of particular kinds to the analogous probabilities coming from random balanced presentations, and concluded that the fundamental groups of random 3-manifolds have many more finite quotients than the random group model defined by random balanced presentations. In this section, we use the results from Section <ref> to construct a random group model to simulate the fundamental groups of 3-manifolds.

Let $\Sigma_g$ be a closed surface of genus $g$, and let $\calM_g$ be its mapping class group. Then the fundamental group $\pi_1(\Sigma_g)$ of $\Sigma_g$ has a presentation $\langle a_1, \ldots, a_g, b_1, \ldots, b_g \mid [a_1,b_1]\cdots[a_g, b_g] \rangle$, and $\calM_g$ is naturally isomorphic to an index-2 subgroup of $\Out(\pi_1(\Sigma_g))$. For an element $\varphi \in \calM_g$, then the 3-manifold $M$ obtained by gluing two copies of $\Sigma_g$ by $\varphi$ has fundamental group

\[
\pi_1(M)=\faktor{\pi_1(\Sigma_g)}{[a_1, \ldots, a_g, \phi(a_1), \ldots, \phi(a_g)]},
\]

where $\phi \in \Aut( \pi_1(\Sigma_g))$ is a lift of $\varphi$, and $[a_1, \ldots, a_g, \phi(a_1), \ldots, \phi(a_g)]$ means the normal subgroup of $\pi_1(\Sigma_g)$ generated by those elements. Also, the map from $\Sigma_g$ to the classifying space $B\pi_1(\Sigma_g)$ defines a homology class in $H_2(\pi_1(\Sigma_g), \Z)$, which is invariant under the action of $\calM_g$.
For a finite group $H$, Dunfield and Thurston showed that, as $g\to \infty$, the expected number of covers with covering group $H$ of the random 3-manifold $M$ goes to $|[H,H]| \cdot |H_2(H,\Z)| / |\Aut(H)|$ (<cit.>). Therefore, when we compute the number of surjections from $\pi_1(H)$ to $H$, we have

\[
\lim_{g\to \infty}\EE(\# \Sur(\pi_1(M), H)) = |[H,H]| \cdot |H_2(H,\Z)|.
\]

Recall that, $H_2(\pi_1(\Sigma_g), \Z)$ can be identified with the kernel of a Schur covering of $\pi_1(\Sigma_g)$. Next, we will explicitly give a pro-$\ell$ random group model that have the above moments for all $\ell$-group $H$.

Let $\ell$ be a prime number. We use the notation in Section <ref> to let $\calG_n$ denote the pro-$\ell$ Demuškin group whose abelianization is $\Z_{\ell}^{2n}$ and let

\[
1 \longrightarrow \Z_{\ell} \longrightarrow \widetilde{\calG}_n  \overset{\pi_n}{\longrightarrow} \calG_n \longrightarrow 1
\]

denote the Schur covering of $\calG_n$.
We use the presentation $\calG_n=\langle a_1, \ldots, a_{n}, b_1, \ldots, b_n \mid [a_1, b_1]\cdots [a_{n}, b_{n}]\rangle$, and let $\xi_n \in H_2(\calG_n, \Z) \simeq \ker \pi_n$ denote the image of $[a_1,b_1]\cdots [a_n, b_n]$.

Consider the random group

\[
Z_{n}:= \faktor{\widetilde{\calG}_n}{[a_1, \ldots, a_n, \phi(a_1), \ldots, \phi(a_n)]}
\]

where $\phi$ is a random automorphism of $\widetilde{\calG}_n$ that preserves and acts trivially on $\ker \pi_n$. Then for any finite $\ell$-group $H$, we have

\[
\lim_{n \to \infty} \EE \left( \# \Sur(Z_n, H)\right) = |[H,H]|\cdot |H_2(H, \Z)|.
\]

For an automorphism $\phi$ of $\widetilde{\calG}_n$, a surjection from $Z_n \to H$ defines a surjection $\widetilde{\calG}_n \to Z_n \to H$ whose kernel contains $a_i$ and $\phi(a_i)$ for all $i$. So we have

\[
\EE \left( \# \Sur(Z_n, H)\right)
= \sum_{\substack{\pi \in \Sur(\widetilde{\calG}_n, H) \\ \text{s.t. } \pi(a_i)=1 \, \forall i}} \Prob \left( \phi \in \Aut(\widetilde{\calG}_n, \pi_n ; 1) \,\Big| \, \phi(a_i) \in \ker \pi, \,  \forall i \right),
\]

where $\Aut(\widetilde{\calG}_n, \pi_n; 1)$ denote the closed subgroup of $\Aut(\widetilde{\calG}_n)$ consisting of all automorphisms that preserve and act trivially on $\ker \pi_n$.
Each $\pi$ as described in the sum factors through a surjection $\varpi \in \Sur(\calG_n, H)$ because $\pi([a_1, b_1]\cdots[a_n,b_n])=1$.
By Lemma <ref>, $\Aut(\widetilde{\calG}_n, \pi_n; 1)$ acts transitively on the set $\left\{ \varpi \in \Sur(\calG_n, H) \mid \varpi_*(\xi_n)=1 \right\}$.
Since $\phi(a_i)\in \ker \pi$ if and only if $\pi \circ \phi (a_i)=1$, we have

\[
\Prob  \left( \phi \in \Aut(\widetilde{\calG}_n, \pi_n ; 1) \,\Big| \, \phi(a_i) \in \ker \pi, \,  \forall i \right)
= \frac{\#\{ \rho \in \Sur(\widetilde{\calG}_n ,H) \mid \rho(a_i)=1, \, \forall i\}}{ \# \{ \rho \in \Sur(\calG_n, H) \mid \rho_{*} (\xi_n)=1 \}}.
\]

The numerator equals the number of surjections from a free group on generators $b_i$'s to $H$, so it is approximately $|H|^n$ for large $n$. Let $F_{2n}$ denote the free pro-$\ell$ on the generators $a_1, \cdots b_n$, and $\widetilde{H} \to H$ is a Schur covering of $H$. Homomorphisms from $F_{2n}$ to $H$ lift to homomorphisms from $F_{2n}$ to $\widetilde{H}$. As $n \to \infty$, considering all homomorphisms from $F_{2n}$ to $H$, the image of $[a_1,b_1] \cdots [a_n, b_n]$ is nearly uniformly distributed in $[\widetilde{H}, \widetilde{H}]$. So the denominator above is approximately $|H|^{2n}/ |[\widetilde{H}, \widetilde{H}]| = |H|^{2n} / \left( |[H,H]| \cdot |H_2(H, \Z)|\right)$. Therefore, we obtain

\[
\EE(\#\Sur(Z_n, H)) \sim |H|^n \cdot  \frac{|H|^n}{|H|^{2n} / (|[H,H]| \cdot |H_2(H,Z)|) },
\]

and the proposition follows after taking $n \to \infty$.

author=Achter, Jeffrey D.,
title=The distribution of class groups of function fields,
journal=J. Pure Appl. Algebra,

author=Achter, Jeffrey D.,
title=Results of Cohen-Lenstra type for quadratic function fields,
booktitle=Computational arithmetic geometry,
series=Contemp. Math.,
publisher=Amer. Math. Soc., Providence, RI,

author=Adam, Michael,
author=Malle, Gunter,
title=A class group heuristic based on the distribution of
1-eigenspaces in matrix groups,
journal=J. Number Theory,

author=Boston, Nigel,
author=Bush, Michael R.,
title=Heuristics for 2-class towers of cyclic cubic fields,
journal=Experimental Mathematics,

author=Boston, Nigel,
author=Bush, Michael R.,
author=Hajir, Farshid,
title=Heuristics for $p$-class towers of imaginary quadratic fields,
journal=Math. Ann.,

author=Boston, Nigel,
author=Bush, Michael R.,
author=Hajir, Farshid,
title=Heuristics for $p$-class towers of real quadratic fields,
journal=J. Inst. Math. Jussieu,

author=Boston, Nigel,
author=Wood, Melanie Matchett,
title=Non-abelian Cohen-Lenstra heuristics over function fields,
journal=Compos. Math.,

author=Cohen, H.,
author=Lenstra, H. W., Jr.,
title=Heuristics on class groups of number fields,
booktitle=Number theory, Noordwijkerhout 1983 (Noordwijkerhout, 1983),
series=Lecture Notes in Math.,
publisher=Springer, Berlin,

author=Cohen, H.,
author=Martinet, J.,
title=Class groups of number fields: numerical heuristics,
ISSN=0025-5718, 1088-6842,
journal=Mathematics of Computation,

author=Deligne, P.,
title=Cohomologie étale,
series=Lecture Notes in Mathematics,
publisher=Springer-Verlag, Berlin,
ISBN=3-540-08066-X; 0-387-08066-X,
note=Séminaire de géométrie algébrique du Bois-Marie
SGA $4\frac{1}{2}$,

author=Dunfield, Nathan M.,
author=Thurston, William P.,
title=Finite covers of random 3-manifolds,
journal=Invent. Math.,

author=Ellenberg, Jordan S.,
author=Venkatesh, Akshay,
author=Westerland, Craig,
title=Homological stability for Hurwitz spaces and the
Cohen-Lenstra conjecture over function fields,
journal=Ann. of Math. (2),

author=Friedman, Eduardo,
author=Washington, Lawrence C.,
title=On the distribution of divisor class groups of curves over a
finite field,
booktitle=Théorie des nombres (Quebec, PQ, 1987),
publisher=de Gruyter, Berlin,

author=Garton, Derek,
title=Random matrices, the Cohen-Lenstra heuristics, and roots of
journal=Algebra Number Theory,

author=Gorenstein, Daniel,
title=Finite groups,
publisher=Chelsea Publishing Co., New York,

author=Karpilovsky, Gregory,
title=Group representations. Vol. 2,
series=North-Holland Mathematics Studies,
publisher=North-Holland Publishing Co., Amsterdam,

author=Katz, Nicholas M.,
author=Sarnak, Peter,
title=Random matrices, Frobenius eigenvalues, and monodromy,
series=American Mathematical Society Colloquium Publications,
publisher=American Mathematical Society, Providence, RI,

author=Labute, John P.,
title=Classification of Demushkin groups,
journal=Canadian J. Math.,

author=Liu, Yuan,
title=Presentations of Galois groups of maximal extensions with
restricted ramification,
note=preprint, arXiv:2005.07329,

author=Lipnowski, Michael,
author=Sawin, Will,
author=Tsimerman, Jacob,
title=Cohen–Lenstra heuristics and bilinear pairings in the
presence of roots of unity,
note=preprint, arXiv:2007.12533,

author=Lipnowski, Michael,
author=Tsimerman, Jacob,
title=Cohen-Lenstra heuristics for étale group schemes and
symplectic pairings,
journal=Compos. Math.,

author=Lubotzky, Alexander,
title=Pro-finite presentations,
journal=J. Algebra,

author=Liu, Yuan,
author=Wood, Melanie Matchett,
title=The free group on $n$ generators modulo $n+u$ random
relations as $n$ goes to infinity,
journal=J. Reine Angew. Math.,

author=Liu, Yuan,
author=Wood, Melanie Matchett,
author=Zureick-Brown, David,
title=A predicted distribution for Galois groups of maximal
unramified extensions,
note=preprint, arXiv:1907.05002,

author=Malle, Gunter,
title=Cohen-Lenstra heuristic and roots of unity,
journal=J. Number Theory,

author=Malle, Gunter,
title=On the distribution of class groups of number fields,
journal=Experiment. Math.,

author=Milne, James S.,
title=Étale cohomology,
series=Princeton Mathematical Series, No. 33,
publisher=Princeton University Press, Princeton, N.J.,

author=Neukirch, Jürgen,
author=Schmidt, Alexander,
author=Wingberg, Kay,
title=Cohomology of number fields,
series=Grundlehren der mathematischen Wissenschaften [Fundamental
Principles of Mathematical Sciences],
publisher=Springer-Verlag, Berlin,

author=Ribes, Luis,
author=Zalesskii, Pavel,
title=Profinite groups,
series=Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A
Series of Modern Surveys in Mathematics [Results in Mathematics and Related
Areas. 3rd Series. A Series of Modern Surveys in Mathematics],
publisher=Springer-Verlag, Berlin,

author=Schmidt, Alexander,
title=Positively ramified extensions of algebraic number fields,
journal=J. Reine Angew. Math.,

author=Schmidt, Alexander,
title=An arithmetic site for the rings of integers of algebraic number
journal=Invent. Math.,

author=Wingberg, Kay,
title=Ein Analogon zur Fundamentalgruppe einer Riemannschen
Fläche im Zahlkörperfall,
journal=Invent. Math.,

author=Wingberg, Kay,
title=Positiv-zerlegte $p$-Erweiterungen algebraischer
journal=J. Reine Angew. Math.,

author=Wood, Melanie Matchett,
title=Nonabelian Cohen-Lenstra moments,
journal=Duke Math. J.,
note=With an appendix by the author and Philip Matchett Wood,

author=Wood, Melanie Matchett,
title=An algebraic lifting invariant of Ellenberg, Venkatesh, and
journal=Res. Math. Sci.,
pages=Paper No. 21, 13,