diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzziceq" "b/data_all_eng_slimpj/shuffled/split2/finalzziceq" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzziceq" @@ -0,0 +1,5 @@ +{"text":"\\section{Introduction}\n\nSuppose we have $n$ keys, $n$ access probabilities for the keys, and $n+1$\naccess probabilities for the gaps between the keys.\nThe problem to construct a binary search tree for these $n$ keys\nthat minimizes\nthe expected access time is known as the\n\\emph{optimal binary search tree problem}.\nKnuth presented in \\cite{knu71} a well-known dynamic programming algorithm\nthat solves this problem in $O(n^2)$ time.\n\nApart from the original problem,\nthe construction of optimal binary search trees whose heights are restricted \nhas been considered in the literature.\nBy the height restriction the maximum number of comparisons during a search can\nbe bounded. Thus, an optimal height restricted binary search tree\nperforms well in both the worst and the average case.\nItai \\cite{itai76} and Wessner \\cite{wess76} independently discovered \nconstruction algorithms for height restricted binary search trees.\nTheir algorithms have running time $O(L n^2)$, where $L$ is the maximal permitted\nheight.\n\nLet $h_{\\min}(n) = \\lceil \\log_2 (n+1)\\rceil$\nbe the \\emph{minimal height of a binary search tree for $n$ keys}.\nIn this paper, we show that for any fixed $\\Delta$ an optimal\nbinary search tree with height $h \\leq h_{\\min}(n) + \\Delta$\ncan be constructed in time $O(n^2)$.\nThis improves the results from Itai and Wessner \\cite{itai76,wess76}.\nBecause $L \\geq \\lceil \\log_2 (n+1) \\rceil$, the algorithms of Itai and Wessner\nhave running time $O(n^2 \\log n)$ if we use them to construct optimal search\ntrees with height $h \\leq h_{\\min}(n) + \\Delta$.\n\nGagie \\cite{gag03, gag05} presents a $O(n)$ time algorithm\nfor the restructuring of optimal binary search trees.\nHis algorithm restructures an existing optimal binary search\nin such a way that the resulting tree\nhas nearly optimal height and cost.\nIn contrast to Gagie's algorithm our algorithm always selects\nthe best binary search tree from the set of all trees with restricted height.\n\nOther interesting facts about optimal binary search trees can be found in the\narticle of Nagaraj \\cite{nag97}. This article gives a\ncomprehensive survey about optimal binary search trees.\n\nAll algorithms for the construction of optimal binary search trees, whether height\nrestricted or not, are based on dynamic programming.\nThey all use step by step construction of larger trees from smaller subtrees.\nInstead of step by step construction from smaller subtrees we use a\ndecision model where the keys are placed by a sequential decision process in such a way\ninto the tree, that the costs become optimal. This approach is adopted from\nthe construction algorithm for optimal B-trees \\cite{bec94}.\n\nThe rest of the paper is structured in the following way: in\nSection 2 a formal description of the problem is given.\nIn Section 3 we present our approach:\nthe decision model is explained and\nthe attached dynamic program is formulated.\nSection 4 states the solution algorithm\nand gives the complexity results.\nSection 5 summarizes the results.\n\n\\section{The Problem}\n\nNow we give the problem formulation.\nWe have $n$ keys $k_1 < k_2 \\ldots < k_n$\nand $2n+1$ probabilities\n$\\alpha_0 , \\beta_1 , \\alpha_1 , \\beta_2 , \\ldots , \\beta_n , \\alpha_n $.\n\n$\\beta_i$ are the \\emph{key weights} and $\\alpha_j$ are the\n\\emph{gap weights}.\n$\\beta_i$ is the probability that key $k_i$ is requested, and\n$\\alpha_j$ is the\nprobability, that a search is made for a key $d$ with\n$k_j < d < k_{j+1}$.\nWe assume that we have artificial keys $k_0 = - \\infty$ and $k_{n+1} = \\infty$.\n\nLet $b_i$ be the level resp.\\ the depth of the $i$-th internal node where key\n$k_i$ is stored, and\nlet $a_j$ be the level of the external node for the gap between $k_j$ and $k_{j+1}$.\nThe root is on level $0$. \nFor a binary search tree $T$ we define the\n\\emph{weighted path length} $\\textnormal{wpl}(T)$ by\n\\[\n\\textnormal{wpl}(T) := \\sum_{i=1}^n \\beta_i (b_i+1) + \\sum_{j=0}^n \\alpha_j a_j\n\\]\nThe weighted path length is the expected number\nof node visits resp.\\ comparisons in a search.\n\nThe height $h(T)$ of a tree $T$ is defined as the level of the deepest external node.\nThe \\emph{minimal height} $h_{\\min}(n)$ of a binary search tree for $n$ keys\nis then given by\n\\[\n h_{\\min}(n) = \\lceil \\log_2(n+1) \\rceil\n\\]\n\nWe want to construct search trees whose heights are nearly minimal.\nLet $\\Delta \\geq 0$ be some fixed value.\nThe problem is to find a binary search tree $T$\nthat minimizes the weighted path length\n$\\textnormal{wpl}(T)$ subject to the constraint\n$h(T) \\leq h_{\\min}(n) + \\Delta$. \nSuch a tree is denoted as an\n\\emph{optimal binary search tree with near minimal height}.\n\n\\section{Dynamic Programming Model}\n\nWe model the process of constructing an optimal binary search tree\nwith near minimal height\nas a decision problem with $n$ stages. For every key $k_i$\nwe have to decide, on which level this key should be placed.\nWhether placing on some level is feasible,\ndepends on the former decisions for the keys $k_1$ to $k_{i-1}$,\nwhich define a certain state in the decision process.\nThen placing the key $k_i$ on any level results in an increasing\nweighted path length and a new state. The amount of increasing\nas well as the new state depend on our decision.\n\nUsing this approach, the\noptimal tree is the result of a sequence of optimal\ndecisions starting in a unique initial state. This leads to\na dynamic program $DP$ of the form $DP = (S_\\nu ,A_\\nu ,D_\\nu ,\nT_\\nu , c_\\nu , C_{n+1})$, where $n$ is the number of the\nstages of $DP$, $S_\\nu$ is the \\emph{state set} of stage\n$\\nu , 1 \\leq \\nu \\leq n+1$, and $A_\\nu$ is the \\emph{decision set}\nof stage $\\nu , 1 \\leq \\nu \\leq n$. The sets\n$D_\\nu \\subseteq S_\\nu \\times A_\\nu$\ndefine the \\emph{feasible decisions} for the states of stage $\\nu$.\nIt holds: $(s,a) \\in D_\\nu$, if and only if $a$\nis feasible in state $s$ on stage $\\nu$.\nThe set $D_\\nu (s) := \\{ a \\in A_\\nu | (s,a) \\in D_\\nu \\}$\ncontains all feasible decisions for state $s$ on stage $\\nu$.\n$T_\\nu : D_\\nu \\rightarrow S_{\\nu +1}$ is\nthe \\emph{transition function}.\nMaking decision $a$ in state $s$ at stage $\\nu$ results in state\n$T_\\nu(s,a)$ at stage $\\nu + 1$.\n$c_\\nu : D_\\nu \\rightarrow \\mbox{I}\\!\\mbox{R}$ is the \\emph{cost function} of\nstage $\\nu$. $c_\\nu(s,a)$ gives the costs that arise if we\ndecide to make decision $a$ in state $s$ on stage $\\nu$.\n$C_{n+1} : S_{n+1} \\rightarrow \\mbox{I}\\!\\mbox{R}$ is the\n\\emph{terminal cost} function.\n$C_{n+1}(s)$ gives the costs that arise if our final state\nis $s$.\n\n\\begin{figure}[htb]\n\\postscript{states.eps}{0.8}\n\\caption{Tree states in the construction process}\n\\label{figstates}\n\\end{figure}\n\nNow we have to define the components of the dynamic program\nin such a way that the decision process models the\nconstruction of a binary search tree with restricted height.\nFirst we give the definition of the states.\nFor motivation take a look at Figure~\\ref{figstates}.\nSuppose we have $h_{\\max} := h_{\\min}(n) + \\Delta = 3$, \nthat means we can place the keys on levels from $0$ to $2$.\n\nFor a correct placing\nof a key in the partial tree only the\nrightmost path fragments from the actual root to the node that contains the largest key\nis relevant. Due\nto this fact we can represent a state $s \\in S_\\nu$\nby a binary vector with $h_{\\max}$ components.\nWe number the vector components from $0$ to $h_{\\max} -1$.\nVector component $s_i$ is related to level $i$.\n\\[\n s = \\svec{s_0}{\\vdots}{s_{h_{\\max}-1}} \\textnormal{ with } s_i \\in \\{0,1\\}.\n\\]\nEach vector component $s_i$ determines, whether the level $i$ \nin the rightmost path is occupied.\nMore formally, vector component $s_i$ is $1$ if and only if the largest\nkey on level $i$ is greater than any key on the levels from $0$ to $i-1$.\nFor instance the state $s$ resulting from tree (a)\nin Figure~\\ref{figstates} is represented\nby\n\\[\n s = \\svec{1}{1}{0}\n\\]\nand the state $s'$ resulting from tree (c) by \n\\[\n s' = \\svec{1}{0}{1}\n\\]\nObserve, that different trees may have the same associated states.\nFor instance the trees (a) and (b) of Figure \\ref{figstates} are both\nrepresented by the same state.\n\nThe set $S_\\nu$ is defined to be the set of all vectors\nthat are possible after the assignment of $\\nu - 1$ keys.\nThe initial state set $S_1$ consists of a single state:\n\\[\n S_1 := \\left\\{ \\svec{0}{\\vdots}{0} \\right\\}\n\\]\n\nA decision is characterized by the level on which a key is placed.\nSo we define $A = A_\\nu = \\{0 ,\\ldots, h_{\\max}-1 \\}$.\nMaking decision $a$ means that the corresponding key is placed on level $a$.\nFor instance, the tree (a) in Figure~\\ref{figstates} is constructed by the\ndecision sequence $DS = (1,0,2,1)$.\n\n\\begin{figure}[hbt]\n\\postscript{infeasible.eps}{0.8}\n\\caption{Feasible and infeasible decision}\n\\label{infeasible}\n\\end{figure}\n\nLet $s = (s_0 ,\\ldots, s_{h_{\\max}-1})$ be a state.\nA feasible decision $a$ for state $s$\nhas to fulfill the following conditions:\n\\begin{itemize}\n\\item[(i)]\n We can place keys only on unoccupied levels:\n \\[\n s_a = 0\n \\]\n\\item[(ii)]\n If a key is placed above some path fragment, this path fragment\n has to be the deepest path\n fragment and the key has to be placed directly above this path fragment:\n \\[\n \\not\\exists i,j : a < i < j \\textnormal{ and } s_i = 0 \\textnormal{ and } s_j = 1\n \\]\n\\end{itemize}\nCondition (i) is obvious. Figure~\\ref{infeasible} demonstrates condition (ii).\nThe next key $k_4$ has to be placed on level $2$, because $k_3$ becomes the left son\nof $k_4$. If we place $k_4$ on level $1$, the left son would not be on the next\ndeeper level.\n\nSo we can define\n\\[\n D_\\nu := \\{ (s,a) | s \\in S_\\nu, a\\;\\textnormal{fulfills (i) and (ii)} \\}\n\\]\nObserve that the feasible decisions of a state $s$ are independent\nof the stage $\\nu$. So we define\n\\[\n D(s) := \\{ a \\in A | a\\;\\mbox{fulfills (i) to (ii)} \\}\n\\]\nas the \\emph{set of feasible decisions for state $s$}.\nFor every binary search tree (with near minimal height) there exists a unique\nfeasible decision sequence that constructs the tree. As an\nexample see the decision sequence to construct tree (a) of Figure~1 (see\nabove). Using this definition each feasible decision sequence\nleads to trees that are valid binary search trees with the exception of\nthe rightmost path.\nTrees with invalid rightmost path on stage $n+1$\nare filtered by the terminal cost function $C_{n+1}$ (see below).\n\n\\begin{figure}[htb]\n\\postscript{transition.eps}{0.8}\n\\caption{Example for a transition}\n\\label{transition}\n\\end{figure}\n\nMaking a decision $a$ has two effects. First, the\nlevel $a$ of the rightmost path becomes occupied and\nsecond, the levels from $a+1$ to $h_{\\max}-1$ become unoccupied.\nSo the definition for the transition function is:\n\\[\n T(s,a) := T_\\nu(s,a) = \\left(\\begin{array}{c} \n s_0 \\\\ \n \\vdots \\\\\n s_{a-1} \\\\\n 1 \\\\\n 0 \\\\\n \\vdots\\\\\n 0 \\end{array}\\right)\n\\]\nFigure~\\ref{transition} shows an example for a single transition. \nThe following state and decision sequence shows the transitions from the\ninitial state to the right tree of Figure~\\ref{transition}.\n\\[\n\\svec{0}{0}{0} \\stackrel{a=1}{\\longrightarrow}\n\\svec{0}{1}{0} \\stackrel{a=0}{\\longrightarrow}\n\\svec{1}{0}{0} \\stackrel{a=2}{\\longrightarrow}\n\\svec{1}{0}{1} \\stackrel{a=1}{\\longrightarrow}\n\\svec{1}{1}{0}\n\\]\n\nIf we have a state $s \\in S_\\nu$, we can deduce from $s$ the preceding decision, \ni.e.\\ the decision on stage $\\nu -1$ that induced $s$.\nTake a look at the transition function $T(s,a)$:\nthe largest $i$ with $s_i = 1$ defines this preceding decision.\n\\[\n \\textnormal{precdec}(s) := \\left\\{\n \\begin{array}{ll}\n 0 & \\textnormal{ if } s_0 = \\cdots = s_{h_{\\max}-1} = 0 \\\\\n \\max \\{ 0\\leq i \\leq h_{\\max}-1 | s_i = 1 \\} & \\textnormal{ otherwise}\n \\end{array}\n \\right.\n\\]\n\nOur cost function $c_\\nu(s,a)$\nhas to consider two aspects: the level of key $k_\\nu$ and\nthe level of the gap $(k_{\\nu-1},k_\\nu)$. The first is simple: the\nlevel of key $k_\\nu$ is determined by the decision $a$.\nWith the following Lemma, we are able the determine the level of the gap $(k_{\\nu-1},k_\\nu)$.\n\\begin{lemma}\n\\label{gaplevel}\nLet $\\textnormal{klevel}(k_\\nu)$ denote the level of key $k_\\nu$ and\nlet $\\textnormal{glevel}(k_{\\nu-1},k_\\nu)$\ndenote the level of the gap $(k_{\\nu-1},k_\\nu)$. Then we have\n\\[\n \\textnormal{glevel}(k_{\\nu-1},k_\\nu)= 1 + \\max\\{\\textnormal{klevel}(k_{\\nu-1}),\n \\textnormal{klevel}(k_\\nu)\\}\n\\]\n\\end{lemma}\n\n\\begin{proof}\nAdjacent keys cannot be on the same level. So we have either\n$\\textnormal{klevel}(k_{\\nu-1}) < \\textnormal{klevel}(k_\\nu)$\nor\n$\\textnormal{klevel}(k_{\\nu-1}) > \\textnormal{klevel}(k_\\nu)$.\n\nIn the case of $\\textnormal{klevel}(k_{\\nu-1}) < \\textnormal{klevel}(k_\\nu)$,\nthe key $k_\\nu$ is in the right subtree of key $k_{\\nu-1}$ and the\ngap $(k_{\\nu-1},k_\\nu)$ is the left son of the node that contains $k_\\nu$.\nIn the other case\nthe key $k_{\\nu-1}$ is in the left subtree of key $k_\\nu$ and the\ngap $(k_{\\nu-1},k_\\nu)$ is the right son of the node that contains $k_{\\nu-1}$.\nIn both cases the equation of Lemma~\\ref{gaplevel} is valid.\n\\end{proof}\n\nThe cost functions $c_\\nu(s,a)$ are defined by:\n\\[\n c_\\nu(s,a) := \n (1+\\max\\{\\textnormal{precdec}(s),a\\})\\cdot\\alpha_{\\nu -1} + \n (a+1)\\cdot\\beta_\\nu\n\\]\nThis definition utilizes Lemma~\\ref{gaplevel}: $\\textnormal{klevel}(k_{\\nu-1})$\nis equivalent to $\\textnormal{precdec}(s)$ and $\\textnormal{klevel}(k_\\nu)$ to\nthe decision $a$.\n\nThe terminal costs $C_{n+1}$ model whether our final\nstate fulfills the tree conditions.\nIn particular, we have to check whether the right most path contains\nunoccupied levels above occupied levels.\nFor instance, tree (c) of Figure~\\ref{figstates} is not a valid search tree\nbecause level~$1$ is not occupied but level~$2$ is.\nWe have:\n\\[\n C_{n+1}(s) = \\left\\{\n \\begin{array}{ll}\n (1 + \\textnormal{precdec}(s))\\cdot\\alpha_n & \\textnormal{ if } \n s_0 = 1 \\textnormal{ and } \n\t \\not\\exists i < j: s_i = 0 \\wedge s_j = 1 \\\\\n \\infty & \\textnormal{ otherwise}\n \\end{array}\n \\right.\n\\]\nTo check whether there exists an unoccupied level we use an adaption of\ncondition (ii) of the feasible decision set $D(s)$. If the root level\nis occupied and there exists no unoccupied level\nabove an occupied level\nthe terminal costs consist of the access probability $\\alpha_n$\nof the last gap multiplied\nby the level of key $k_n$ plus $1$.\n\nNow the definition of the dynamic program $DP$ is\ncomplete. Using this definition the optimization problem is\n\\[\nF :=\n\\sum_{\\nu = 1}^n c_\\nu (s_\\nu , a_\\nu ) + C_{n+1} (s_{n+1})\n\\rightarrow \\min\n\\]\nsubject to:\n\\[\n\\begin{array}{ll}\n& s_1 = (0 \\cdots 0) \\\\\n& a_\\nu \\in D (s_\\nu ), 1 \\leq \\nu \\leq n \\\\\n& s_{\\nu + 1} = T(s_\\nu , a_\\nu ), 1 \\leq \\nu \\leq n\n\\end{array}\n\\]\nThe value $F$ of the objective function yields the\nminimum weighted path length and the tree is given by\nthe optimal sequence $(a_1,\\ldots,a_n)$ of feasible decisions.\n\n\\section{Algorithm and Complexity}\n\nFor the solution of this optimization problem we use a common\ndynamic programming algorithm, cf.\\ \\cite{nm02}.\n\n\\begin{algorithm}\n\\label{dpalgo}\\mbox{}\\\\\n\\begin{tabular}{rl}\n(0) & \/* Initialization *\/ \\\\\n(1) & {\\bf forall} $s \\in S_{n+1}$ \\\\\n(2) & \\hspace*{0.5cm} $V_\\nu(s) \\leftarrow C_{n+1}(s)$ \\\\\n(3) & \/* Backward Computation *\/ \\\\\n(4) & {\\bf for} $\\nu \\leftarrow n$ {\\bf downto} $1$ {\\bf do} \\\\\n(5) & \\hspace*{0.5cm} {\\bf forall} $s \\in S_\\nu$ {\\bf do} \\\\\n(6) & \\hspace*{1.0cm} $V_\\nu(s) \\leftarrow \\infty$ \\\\\n(7) & \\hspace*{1.0cm} $\\pi_\\nu(s) \\leftarrow \\textnormal{undefined}$ \\\\\n(8) & \\hspace*{1.0cm} {\\bf forall} $a \\in D(s)$ {\\bf do} \\\\\n(9) & \\hspace*{1.5cm} {\\bf if} $c_\\nu(s,a) + V_{\\nu+1}(T(s,a)) < V_\\nu(s)$ {\\bf then} \\\\\n(10) & \\hspace*{2.0cm} $V_\\nu(s) \\leftarrow c_\\nu(s,a) + V_{\\nu+1}(T(s,a))$ \\\\\n(11) & \\hspace*{2.0cm} $\\pi_\\nu(s) \\leftarrow a$ \\\\\n(12) & \/* Forward Computation *\/ \\\\\n(13) & $s \\leftarrow (0 \\cdots 0) $ \\\\\n(14) & $F \\leftarrow V_1(s)$ \\\\\n(15) & {\\bf for} $\\nu \\leftarrow 1$ {\\bf to} $n$ {\\bf do} \\\\\n(16) & \\hspace*{0.5cm} $a_\\nu \\leftarrow \\pi_\\nu(s)$ \\\\\n(17) & \\hspace*{0.5cm} $s \\leftarrow T(s, a_\\nu)$ \\\\\n\\end{tabular}\n\\end{algorithm}\n\n$V_\\nu(s)$ is the \\emph{value function} which represents the minimal costs to reach a terminal state\nfrom state $s$ on stage $\\nu$. In line (1) and (2) we initialize the value function with\nthe terminal costs.\n$\\pi_\\nu(s)$ represents the optimal decision for state $s$ on stage $\\nu$. \nThe value function $V_\\nu(s)$ and the optimal decision\n$\\pi_\\nu(s)$ is\ndetermined by the \\emph{Bellman equation}\n\\[\n V_\\nu(s) = \\min_{a \\in D(s)} \\{c_\\nu(s,a) + V_{\\nu+1}(T(s,a)) \\}\n\\]\nwhich is solved for all states on\nall stages in lines (4) to (11).\n\nAfter the backward computation terminates, the $\\pi_\\nu$ define an\n\\emph{optimal policy}. To get the\noptimal decision sequence\nwe apply the $\\pi_\\nu$ in a forward computation (line (13) to (17))\nbeginning with our initial state. As a result\nthe $a_\\nu$ represent the decision sequence to build an optimal tree and the value of $F$ is the weighted\npath length of the optimal tree.\n\nWith the decision sequence\n$DS = (a_1 ,\\ldots, a_n)$ that defines the optimal binary search tree\nwe are able to build the corresponding tree in linear time,\nas for each key $k_\\nu$ the level where $k_\\nu$ has to be placed\nis given by the decision $a_\\nu$.\n\n\\begin{example}\nSuppose we have keys $k_1,\\ldots,k_4$ with access probabilities $\\beta_1 = \\frac{3}{16},\n\\beta_2 = \\frac{1}{16}, \\beta_3 = \\frac{1}{2}, \\beta_4 = \\frac{1}{4}$ and\n$\\alpha_0 = \\cdots = \\alpha_4 = 0$. Let $\\Delta=0$, that means we have\nto construct a tree of height $\\lceil \\log_2(5)\\rceil = 3$.\n\n\\begin{figure}[htb]\n\\begin{center}\n\\include{exproblem}\n\\end{center}\n\\caption{State space for the example problem}\n\\label{ssexample}\n\\end{figure}\n\n\\begin{figure}[htb]\n\\postscript{opttree.eps}{0.3}\n\\caption{Optimal binary search tree for the example problem}\n\\label{ssexampletree}\n\\end{figure}\n\n\nFigure~\\ref{ssexample} shows the search graph for this problem.\nThe number adjacent to an arc represents the cost $c_\\nu(s,a)$ of the corresponding transition.\nThe terminal costs $C_5(s)$ are shown below the states of state set $S_5$ and the value function $V_\\nu(s)$\nis shown\nright beside the states for the state sets $S_1$ to $S_4$. Observe, that the the value function\nof state $(1,1 1) \\in S_4$ yields $\\infty$ because of an empty decision set.\n\nThe best decision sequence $DS=(1,2,0,1)$ is given by the bold arcs. Its overall cost is\n$\\frac{25}{16}$, that means the corresponding\noptimal binary search tree has a weighted path\nlength of $\\frac{25}{16}$. Figure~\\ref{ssexampletree}\nshows the corresponding tree.\n\\end{example}\n\n\n\nOur complexity results are based on bounds for the cardinality of the state sets $S_\\nu$ and the\ndecision sets $D_\\nu$.\n\n\\begin{theorem}\nFor all state sets $S_\\nu\\,(\\nu=1,\\ldots,n+1)$ we have:\n\\[\n|S_\\nu | \\leq 2^{\\Delta+1} (n+1)\n\\]\n\\end{theorem}\n\n\\begin{proof}\nLet $h_{\\max}(n) := h_{\\min}(n)+\\Delta$ and\n$S:=\\{0,1\\}^{h_{\\max}(n)}$. With these definitions we get\n\\[\n |S_\\nu | \\leq |S| = 2^{h_{\\max}(n)} = 2^{h_{\\min}(n)+\\Delta}\n\\]\nUsing $h_{\\min}(n) = \\lceil \\log_2(n+1) \\rceil$ we get\n\\begin{eqnarray*}\n |S| & \\leq & 2^{\\lceil \\log_2(n+1) \\rceil + \\Delta} \\\\\n & \\leq & 2^{\\Delta+1}\\cdot 2^{\\log_2(n+1)} \\\\\n & = & 2^{\\Delta+1}\\cdot(n+1)\n\\end{eqnarray*}\n\\end{proof}\n\n\\begin{corollary}\nFor any fixed $\\Delta$ the cardinality of the state sets $S_\\nu$\nis bounded by $O(n)$.\n\\end{corollary}\n\n\\begin{theorem}\nFor all feasible decision sets $D_\\nu\\,(\\nu=1,\\ldots,n+1)$ we have:\n\\[\n |D_\\nu| \\leq 2^{\\Delta+2} (n+1) \n\\]\n\\end{theorem}\n\n\\begin{proof}\nLet $h_{\\max}(n) := h_{\\min}(n)+\\Delta$,\n$S:=\\{0,1\\}^{h_{\\max}(n)}$ and $D := \\{(s,a)| s \\in S, a \\textnormal{ is feasible for } s\\}$.\nWith these definitions we get $|D_{\\nu}| \\leq |D|$ for all $\\nu=1,\\ldots,n$.\n\nHow many feasible decisions exists for a state $s \\in S$? Take a look at condition (ii) in the\ndefinition of $D(s)$ (see Section~3).\nIf $s_{h_{\\max}-1} = 1$ there is at most one feasible decision $a$, which is\ndetermined by the highest index $a$ with $s_a = 0$. That means, that half of all the states in $S$ have only\none feasible decision. States with $s_{h_{\\max}-1} = 0$ and $s_{h_{\\max}-2} = 1$, which comprise a quarter\nof all states in $S$, have at most two decisions. Generalized, $\\frac{1}{2^k}|S|$ states \nof all the states in $S$ have $k$ feasible\ndecisions. We get:\n\\begin{eqnarray*}\n |D_{\\nu}| & \\leq & |D| \\\\\n & \\leq & 1\\cdot\\frac{1}{2}|S| + 2\\cdot\\frac{1}{4}|S| +\n\t 3\\cdot\\frac{1}{8}|S| + \\cdots \\\\\n\t & \\leq & \\sum_{k=0}^{\\infty} \\frac{k}{2^k} \\cdot |S| \\\\\n & = & \\left(\\sum_{k=0}^{\\infty} \\frac{k+1}{2^k} -\n\t \\sum_{k=0}^{\\infty} \\frac{1}{2^k}\\right) \\cdot |S| \\\\\n\t & = & \\left(\\frac{1}{(1-\\frac{1}{2})^2} - \n\t \\frac{1}{1-\\frac{1}{2}}\\right) \\cdot |S| \\\\\n\t & = & 2\\cdot |S| \\\\\n\t & \\leq & 2^{\\Delta+2} (n+1)\n\\end{eqnarray*}\n\\end{proof}\n\n\\begin{corollary}\nFor any fixed $\\Delta$ \nAlgorithm~\\ref{dpalgo} constructs an optimal binary search with\nheight $h \\leq h_{\\min}(n)+\\Delta$ in time $O(n^2)$.\n\\end{corollary}\n\n\\begin{proof}\nWe have to iterate over the $n$ stages from $n$ down to $1$.\nIn doing so, the cardinality of \neach state set $S_\\nu$ and each feasible decision set $D_\\nu$\nis bounded by $O(n)$ for fixed $\\Delta$. All operations can be executed in\nconstant time. It follows, that the overall running time is $O(n^2)$.\n\\end{proof}\n\n\\section{Summary}\n\nWe have presented a quadratic time algorithm to compute optimal binary search trees with near\nminimal height, i.e.\\ with height $h \\leq h_{\\min}(n) + \\Delta$ and fixed $\\Delta$.\nThe algorithm was adopted \nfrom the construction algorithm for optimal B-tress. The construction process was modeled by a\ndecision oriented dynamic program: In the model we have to decide key by key, on which level the\nkey should be placed. The tree conditions are represented by additional constraints and a\nterminal cost function.\n\nIt seems to be easy to apply this approach to other kinds of trees.\nBy applying the construction algorithm of \\cite{bec94},\nit should be possible to construct\noptimal B-trees with near minimal height and fixed order in quadratic time, too.\nThe construction of unrestricted optimal B-trees needs time $O(n^{2+\\frac{\\log 2}{\\log k+1}})$.\nA generalization of the binary tree model to multiway trees of a fixed order\nshould also lead to a quadratic time algorithm in constrast to the cubic time\nalgorithms for the unrestricted case \\cite{got81, vkw80}. This means for both cases, that\noptimal trees with near minimal height can be constructed faster than unrestricted trees. \nIf we consider that optimal trees have typically a low height, the approach of height restriction may lead to\nfast construction algorithms, which generate optimal trees with high probability.\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section*{Introduction}\n\nThe \\textsc{Fortran} file \\T{ARWV\\_v1.7.f} contains an updated and modified version of the algorithmic regularization code originally written by Seppo Mikkola. It is an open source program intended to integrate a few-body problem ($\\T{N} \\lesssim 500$) with high precision via the use of `chained variables' for the coordinates and velocities of the stellar bodies. The set of equations of motions is that corresponding to the pair gravitational interaction (see \\cite{RCDbook} for reference). In addition to its high computational accuracy, this program includes a number of interesting features among which Post-Newtonian (PN) terms in the computation of the acceleration (see \\cite{Memmesheimer2004,Mikkola2008}). \n\nThis program has been extended by other people. For example, an inclusion of the treatment of external regular potential and dynamical friction is due to M. Arca-Sedda \\cite{ASCD19}.\n\nLater, P. Chassonnery and R. Capuzzo-Dolcetta, in particular, have added a relativistic recoil velocity to the merger routine, and modified and improved the treatment of external, analytic, potentials and dynamical friction. \n\nThe zipped package containing all the necessary files is downloadable\nhere:\n\\url{https:\/\/sites.google.com\/uniroma1.it\/}\\\\\n\\url{astrogroup\/hpc-html}\n\n\nEveryone is free to use it, upon proper citation of Mikkola's original papers and of this user manual.\n\n\\medskip\n\nThe \\textsc{Fortran} file should be compiled with the command:\n\\begin{verbatim}\n\t> gfortran -o arwv.exe ARWV_v1.7.f\n\\end{verbatim}\n\nTo work, \\T{arwv.exe} needs three files:\n\\begin{itemize}[leftmargin=3em]\n\t\\item \\T{ARCCOM2e2.CH}, which lists the \\textit{common} variables and may not be modified except in a special case, as mentioned below;\n\t\\item \\T{PARAMETERS.TXT}, a set of working parameters;\n\t\\item the data file \\T{INPUT.TXT}, which contains the initial conditions (mass, position and velocity) for the set of \\T{N} bodies.\n\\end{itemize} \n\n\nAt a chosen frequency, the code produces an output file called \\T{100000n.dat}, where $n$ is an integer incrementing from $0$ (thus, you will have \\T{1000000.dat}, \\T{1000001.dat}, etc.). These files are formatted as the original input file, with the mass, coordinates and velocity components of all the stellar bodies belonging to the system. The integration time corresponding to each data snapshot is written at the end of the file.\n\n\n\n\n\n\\begin{table*}[ht]\n\\begin{center}\n\\begin{tabular}{ccp{9cm}}\n\tParameter & Type and range & Meaning \\\\ \\hline\n\t\\T{N} & $1 < \\T{N} \\leqslant \\T{NMX}$ & Number\n of stellar bodies in the system \\\\\n\t\\T{Nbh} & $0 \\leqslant \\T{Nbh} \\leqslant \\T{N}$ & Number of black-holes in the system \\\\\n\t\\T{TypeOfUnits} & $0\/1$ & Indicates if the input data are given in \\textit{autonomous} ($0$) or astrophysical units ($1$) \\\\\n\t\\T{TMAX} & real $> 0.0$ & Time over which the integration is conducted \\\\\n\t\\T{DeltaT} & real $> 0.0$ & Output interval ($\\T{DeltaT} = 0.2$ recommanded) \\\\\n\t\\T{cmet} & real(3) $\\geqslant 0.0$ & Indicates the regularization method to use, must be different from $(0,0,0)$ ($\\T{cmet} = (1,0,0)$ or $(1,10^{-16},0)$ recommanded). \\\\\n\t\\T{Clight} & real $\\geqslant 0.0$ & Value of the speed of light in the autonomous units (relevant only if \\T{TypeOfUnits} is set to $0$) \\\\\n\t\\T{Ixc} & $0\/1\/2$ & Indicates if exact output times are required ($\\T{Ixc} = 1$ recommanded) \\\\\n \\T{ComputeOrbitalElements} & yes\/no & If yes, the code compute the keplerian orbital elements of the trajectory of each body with respect to the first body \\\\\n\t\\T{tolerance} & real $\\geqslant 10^{-14}$ & Tolerance in the accuracy of the integration ($\\T{tolerance} = 10^{-12}$ recommanded) \\\\\n\t\\T{soft} & real $\\geqslant 0.0$ & Softening of the potential ($\\T{soft} = 0$ recommanded) \\\\\n\t\\T{DehnenYes}, \\T{DehnenDF} & yes\/no ; yes\/no & Activate Dehnen external potential and dynamical friction \\\\\n\t$\\gamma_{\\subD}$, $\\T{r}_{\\subt{D}}$, $\\T{M}_{\\subt{D}}$ & reals $\\geqslant 0.0$ & Slope, scale radius and total mass of the Dehnen profile (ignored for \\T{DehnenYes} = no) \\\\\n\t\\T{PlummerYes}, \\T{PlummerDF} & yes\/no ; yes\/no & Activate Plummer external potential and dynamical friction \\\\\n\t$\\T{r}_{\\subt{P}}$, $\\T{M}_{\\subt{P}}$ & reals $\\geqslant 0.0$ & Scale radius and total mass of the Plummer profile (ignored for \\T{PlummerYes} = no) \\\\\n\t\\T{VirialYes}, \\T{Q} & yes\/no ; real $> 0.0$ & If yes the system is rescaled to the indicated virial ratio \\T{Q} (rescaling to $\\T{Q} = 1$ recommanded)\n\\end{tabular}\n\\end{center}\n\\caption{Overview of the user-defined parameters required by the code, as they are organized in the file \\T{PARAMETERS.TXT}. For details on the available choices see the corresponding section.}\n\\label{Table_param}\n\\end{table*}\n\n\n\\section*{Input data}\n\nThe file \\T{INPUT.TXT} is an ASCII file which must be provided by the user. It is composed of \\T{N} rows, each giving the mass $m_i$, the cartesian coordinates $x_i,y_i,z_i$, and the cartesian velocity components $v_x^i, v_y^i, v_z^i$, of every body ($i=1, 2, \\dots, N$) in the system. The order in which the data are given is arbitrary, except that the first \\T{Nbh} rows refer to \\textit{black-holes}. \n\nAt the beginning of the code execution, the coordinates and velocities of the bodies are rescaled so that the center of mass of the system is in the origin of the coordinate frame and has a zero velocity. It is worth noticing that the external gravitational field is always centered in the center of mass of the \\T{N}-body system. \\\\\n\nThe input data units can be chosen by the user. One possibility is by setting in the last line of \\T{PARAMETERS.TXT} (see Table \\ref{Table_param}) the parameter \\T{TypeOfUnits} to $0$, so that the units of the entries in the file \\T{INPUT.TXT} are ``free'' as long as the universal constant of gravitation, $G$, is set to $1$. We call these units \\textit{autonomous}. The major constraint is that the parameters \\T{TMAX}, \\T{DeltaT}, \\T{Clight} and, if relevant, $\\T{r}_{\\subt{D}}$, $\\T{M}_{\\subt{D}}$, $\\T{r}_{\\subt{P}}$ and $\\T{M}_{\\subt{P}}$ (see Table \\ref{Table_param}) must be given in the same user-defined units.\n\nIf the user chooses \\textit{astrophysical} units, the parameter \\T{TypeOfUnits} must be set to $1$, and the various input data and physical parameters have to be given in solar masses (\\mbox{$\\mbox{M}_{\\odot}$}), parsecs (pc) and km\/s. The value of \\T{Clight} is consequently $\\sim 299,792$ and any value written for it inside \\T{PARAMETERS.TXT} is not considered (the user must still write a dummy argument, to preserve the file format). To avoid both too large and too small numbers (with associated round-up error issues), the code will automatically converts all input data and parameters to the standard \\T{N}-body units (for more details, see \\cite{HeggieHut} p.$7$), defined as follow~:\n\\begin{itemize}\n\t\\item the length unit is the initial size of the stellar system, i.e. $U_{\\subt{l}} = \\max\\limits_{1\\leqslant i \\leqslant \\T{N}}\\sqrt{x_i^2 + y_i^2 + z_i^2}$;\n\t\\item the mass unit is the total mass (\\T{N} bodies + diffuse matter) inside the sphere of radius $U_{\\subt{l}}$, that is \n\t\\begin{equation*}\n\t\tU_{\\subt{m}} = \\sum\\limits_{i=1}^N m_i +\n\t\t\\int_{V} \\rho(\\mathbf{r})\\,d^3\\mathbf{r},\n\t\\end{equation*}\n\twhere $\\rho(\\mathbf{r})$ is the density distribution generating, via solution of the Poisson's equation, the external potential;\n\t\\item to ensure $G = 1. U_{\\subt{l}}^3 U_{\\subt{m}}^{-1} U_{\\subt{t}}^{-2}$, the time scale must be $U_{\\subt{t}} = \\sqrt{U_{\\subt{l}}^3\/(G U_{\\subt{m}})}$;\n\t\\item accordingly, the unit of velocity is $\\displaystyle U_{\\subt{v}} = \\frac{U_{\\subt{l}} }{ U_{\\subt{t}} } = \\sqrt{\\frac{ G U_{\\subt{m}} }{ U_{\\subt{l}} }}$.\n\\end{itemize} \n\nNote that \\T{N}-body units are a peculiar case of autonomous units.\n\t\nThe output data will \\textit{always} be provided in the same units than the input data.\n\n\n\n\n\n\\section*{Number and type of gravitating bodies}\n\n\\subsection*{Number of stellar bodies}\n\nThe number \\T{N} of stellar bodies must be $\\geqslant 2$. It is also capped at $\\T{NMX} = 400$ (see file ARCCOM2e2.CH).\n\nAlthough this is not recommended, the upper limit \\T{NMX} can be changed. To do so, one has first to modify the variable \\T{NMX} to the wanted value in the file \\T{ARCCOM2e2.ch} and the routine \\T{NotAtAllNeeded} of the main file. \n\nThen, the variable with same name \\T{NMX} present in the routines \\T{ARC}, \\T{Iterate2ExactTime} and \\T{DIFSYAB} of the main code must be modified accordingly : if the common variable \\T{NMX} is (for example) multiplied by $2$, then the user must also multiply the homonimous variable by $2$ in the three routines indicated above.\n\n\n\n\n\\subsection*{Number of black-holes}\n\nThe code discriminates the \\T{N} stellar bodies into two populations~: the ``classic'' stars and the ``black-holes'', these latter being the \\T{Nbh} first bodies entered into the file \\T{INPUT.TXT}. The motion of a classic star is governed by the standard Newtonian equations, while for black-holes a PN approximation up to $2.5$ order is adopted (see \\cite{Memmesheimer2004} for details of the equations and \\cite{Mikkola2008} for their implementation).\n\nThe number \\T{Nbh} of black-holes may range from $0$ (no PN effect at all) to \\T{N} (all stellar bodies are black-holes). However, \\T{Nbh} greater than \\T{N} will be accepted by the code and interpreted as $\\T{Nbh} = \\T{N}$.\n\nTo compute the PN terms, the code needs the value of the speed of light in the units used for the simulation. If the input data are entered in physical units ($\\T{TypeOfUnits} = 1$), then this value is computed simultaneously at the conversion into \\T{N}-body units, with:\n$$\\T{Clight} = \\frac{2.99792\\times 10^5 \\mbox{ km\/s}}{U_{\\subt{v}}}.$$\n\n\nIf input data are given in autonomous units ($\\T{TypeOfUnits} = 0$), the user must indicate in the file \\T{PARAMETERS.TXT} the correct value of \\T{Clight} in these units. It has to be noted that setting $\\T{Clight} = 0$ will switch off all PN terms and effects (including the merger process, see related section), even if $\\T{Nbh} \\neq 0$. Doing things this way can prove a little tricky for the user~: it is more straight-forward to set $\\T{Nbh} = 0$. Note, also, that setting \\T{Clight} at a very large value makes the role of PN terms negligible at a useless comptutational cost. \n\n\nWhen removing the PN part by setting $\\T{Nbh} = 0$, the integration proceeds much faster. On the other hand, the simulation as a whole can get utterly slow if there is any close two-body encounter, because the code cannot proceed to a merger; then, to ensure sufficient accuracy in the modelization of the binary motion, the time-steps reduce enormously and the simulation process get stuck.\n\n\n\n\n\\section*{Time-related parameters}\n\n\\subsection*{Total time of integration}\n\nThe input variable \\T{TMAX} represents the total time over which the evolution of the system will be simulated. If $\\T{TypeOfUnits} = 0$, its value is assumed to be in the autonomous time unit of the system. If $\\T{TypeOfUnits} = 1$, it is considered to be given in million years ($10^6$ yrs). \n\n\n\n\\subsection*{Output interval} \n\nWhile computing the evolution of the system, the code uses an adaptative time-step chosen so as to ensure enough accuracy in the treatment of tight binaries (see the section about time-transformation). This time-step can be very small, so that writing down the state of the system at each step would both slow down the computation and produce an enormous amount of output files which could overflow the memory storage.\n\nTo avoid this, the user may define the output time interval, hereafter called \\T{DeltaT}. If $\\T{TypeOfUnits} = 0$, its value is assumed to be in the autonomous time unit of the system. If $\\T{TypeOfUnits} = 1$, it is considered to be given in million years, like \\T{TMAX}. It is worth noticing that \\T{DeltaT} is also used for initializing the computation of the adaptative time-step. \n\n\nThe parameter \\T{Ixc} allows the user to select the way the output is triggered. Indeed, since the optimal integration time-step is computed independently by the code, the actual integration time $t$ is \\textit{not} a priori a multiple of \\T{DeltaT}.\n\nLet $t_0$ be the integration time at which the last output file has been produced, and $t_{\\subt{next}} = t_0 + \\T{DeltaT}$ the time for the, possible, next output.\nIf $\\T{Ixc} = 0$, then a new output file is written as soon as the integration has gone far enough -- that is when $t>t_{\\subt{next}}$. This is the most straightforward method but, depending on the system, the actual global time interval can be much longer than the one the user asked for.\n\n\nIf $\\T{Ixc} = 2$ on the other hand, the code will respect the exact output times required by integrating to $t = t_{\\subt{next}}$. This can be slow if many outputs are required, that is if $\\T{DeltaT} \\ll \\T{TMAX}$. \n\nA compromise between these two methods is provided by the choice $\\T{Ixc} = 1$. In such case the code tries to keep the time interval close to the wanted \\T{DeltaT} by approximating the exact output time $t_{\\subt{next}}$ with the Stumpff-Weiss method \\cite{stu67}. \nThis option is often the fastest and most suitable one. \\\\\n\n\nIt must be noted that the setting $\\T{Ixc} = 0$, and to a lesser extent $\\T{Ixc} = 1$, works well only when \\T{DeltaT} is reasonably small. If \\T{DeltaT} is large, one may prefer the use of the slower $\\T{Ixc}=2$ choice. However, the notion of what ``small'' is depends on the specific case.\n\n\n\n\n\\subsection*{Time-transformation or regularization}\n\nIn few-body systems, close approaches happen frequently. Consequently, to ensure accuracy in numerical simulations, one must {\\it regularize} the strong interaction by a proper computation of coordinates and velocities (which is done by the leapfrog algorithm). Several methods exist for that purpose, which can efficiently be used, not only for the purely Newtonian few-body problem but also for other problems with external perturbations, including velocity dependent ones (in our case, external gravitational field with dynamical friction, this latter depending on the object speed).\n\\par\\noindent\nThe \\T{ARWV} code proposes a combination of three of them~: \n\\begin{itemize}\n\t\\item the {\\it logarithmic-Hamiltonian} (logH) method, proposed by Mikkola and Tanikawa (see \\cite{Mikkola99a} and \\cite{Mikkola99b}) as well as Preto and Tremaine \\cite{PretoTremaine}, gives accurate trajectories for the two-body problem and also satisfactory results for perturbed two-body encounters; \n\t\\item the Time-Transformed-Leapfrog (Mikkola and Aarseth \\cite{Mikkola2002}), which turned out to be close to the logH-method, but, in some respects, more general;\n\t\\item the auxiliary velocity algorithm, presented by Hellstr\\\"{o}m and Mikkola in \\cite{Mikkola2010}, which is not a real regularization method, but rather a trick which allows to apply the ``normal'' leapfrog algorithm to a velocity-dependent acceleration.\n\\end{itemize}\n\n\nThe parameter \\T{cmet} is a three-dimensional vector that determines the way these methods will be combined. $\\T{cmet} = (1,0,0)$ is the logarithmic-Hamiltonian, $(0,1,0)$ is the Time-Transformed-Leapfrog and $(0,0,1)$ corresponds to no time-transformation.\n\nSetting $\\T{cmet} = (1,0,0)$ is usually the best choice, but a small value for \\T{cmet}(2) may be advisable in case of star-star close encounter. If the system contains big and small bodies, one may use $\\T{cmet} = (1,10^{-16},0)$ instead of $(1,0,0)$ : this causes smaller stepsizes when two very small bodies come close to each other. Please note that, in this case, the computational speed depends heavily on the formation of binaries !\n\n \n\n\n\n\n\n\\section*{Merging and recoil velocity}\n\nThe code includes a \\textit{merging} procedure intended for the fusion of a black-hole binary or for the swallowing of a classic star by a black-hole (but not for collisions between two stars; this means that collisions are handled out only if at least one of the two objects is in the list of the \\T{Nbh} black-holes).\n\nThe classic recipe for the merging of two bodies is that the remnant of the merger will be located at the center of mass of the previous pair (considered as the location where the collision actually happens, though the code stops the integration of the separate trajectories just before that point).\n\nFor the velocity of the remnant (or ``recoil'' velocity) however, there is no general consensus. For a purely Newtonian simulation, possible alternatives are giving to the remnant a null velocity or the velocity of the center of mass of the two progenitors. In the original version of \\T{ARWV}, the latter choice has been done. \\\\\n\n\nThe code was later modified by Roberto Capuzzo-Dolcetta and Pauline Chassonnery to follow the prescription given by Lousto and Healy in \\cite{LoustoHealy}. \n\nLet $m_{\\sub{1}}$ and $m_{\\sub{2}}$ be the masses of two merging black-holes. We use the convention $m_{\\sub{1}} \\leqslant m_{\\sub{2}}$ and introduce the auxiliary variables:\n\\begin{align*} \n\t&m = m_{\\sub{1}} + m_{\\sub{2}}, \\hspace{1em} \\eta = \\frac{m_{\\sub{1}} m_{\\sub{2}}}{m^2}, \\hspace{1em} 0< q = \\frac{m_{\\sub{1}}}{m_{\\sub{2}}} \\leqslant 1, \\\\\n\t&\\delta_m = \\frac{m_{\\sub{1}} - m_{\\sub{2}}}{m} \\leqslant 0.\n\\end{align*}\n\n\nEach stellar body is assumed to be auto-rotating, with a dimensionless spin $\\bm{\\alpha}_i$ such that $|\\bm{\\alpha}_i| \\leqslant 1$. Two spin-related variables are~: \n\\begin{align*}\n\t\\bm{S} &= \\frac{ \\bm{\\alpha}_{\\sub{1}} m_1^2 + \\bm{\\alpha}_{\\sub{2}} m_2^2 }{m^2} = \\frac{ \\bm{\\alpha}_{\\sub{2}} + q^2 \\bm{\\alpha}_{\\sub{1}}}{(1 + q)^2}, \\\\\n\t\\bm{\\Delta} &= \\frac{ \\bm{\\alpha}_{\\sub{2}} m_{\\sub{2}} - \\bm{\\alpha}_{\\sub{1}} m_{\\sub{1}} }{m} = \\frac{ \\bm{\\alpha}_{\\sub{2}} - q \\bm{\\alpha}_{\\sub{1}}}{1 + q}.\n\\end{align*}\n$ $\n\nThe dimensionless spin of each of the \\T{N} bodies can be generated randomly at the beginning of the simulation, or read from a separated file. The latter is best for reproductibility purpose, but need the user to provide a file named \\T{SPIN.TXT}, formatted as \\T{N} rows containing each the three coordinates of the spin of one body. The user must also uncomment, in the main routine of the code, the part from line 157 to 182 included, i.e. the section \"SET INITIAL SPINS\". \\\\\n\n\nThe recoil velocity is finally given by:\n$$\\textbf{v}_{\\subt{recoil}} = v_{\\subt{m}} \\textbf{e}_{\\sub{1}} + v_{\\sub{\\perp}} \\left( \\cos \\xi\\textbf{e}_{\\sub{1}} + \\sin \\xi\\textbf{e}_{\\sub{2}} \\right),$$\nwhere $\\textbf{e}_{\\sub{1}}$ is the unit vector pointing from $m_{\\sub{1}}$ to $m_{\\sub{2}}$ and $\\textbf{e}_{\\sub{2}}$ an orthogonal unit vector in the two-body orbital plane, such that the basis formed by $\\textbf{e}_{\\sub{1}}$, $\\textbf{e}_{\\sub{2}}$ and the orbital angular momentum of the pair is direct.\n\nThe values of $\\xi$, $v_{\\subt{m}}$ and $v_{\\sub{\\perp}}$ are given by the following fitting formulas to numerical data:\n\\begin{align*}\n\t&\\xi = a + b S_{||} + c \\delta_m \\Delta_{||}, \\\\\n\t&v_{\\subt{m}} = \\eta^2 \\delta_m \\left(A + B \\delta_m^2 + C \\delta_m^4 \\right), \\\\\n\t&v_{\\sub{\\perp}} = H \\eta^2 \\left( \\Delta_{||} + H_{\\subt{2a}} S_{||} \\delta_m + H_{\\subt{2b}} \\Delta_{||} S_{||} \\right. \\\\\n\t &\\hspace{2em} + H_{\\subt{3a}} \\Delta_{||}^2 \\delta_m + H_{\\subt{3b}} S_{||}^2 \\delta_m + H_{\\subt{3c}} \\Delta_{||} S_{||}^2 \\\\\n\t &\\hspace{2em} + H_{\\subt{3d}} \\Delta_{||}^3 + H_{\\subt{3e}} \\Delta_{||} \\delta_m^2 + H_{\\subt{4a}} \\Delta_{||}^2 S_{||} \\delta_m \\\\\n\t &\\hspace{2em} + H_{\\subt{4b}} S_{||}^3 \\delta_m + H_{\\subt{4c}} S_{||} \\delta_m^3 + H_{\\subt{4d}} \\Delta_{||} S_{||} \\delta_m^2 \\\\\n\t &\\hspace{2em} \\left. + H_{\\subt{4e}} \\Delta_{||} S_{||}^3 + H_{\\subt{4f}} \\Delta_{||}^3 S_{||} \\right).\n\\end{align*}\nwhere the subscript $||$ denotes the projection of vectors along the direction of the orbital angular momentum of the pair. The numerical values of the different constants above are given in \\cite{LoustoHealy}. Note that $A$, $B$, $C$ and $H$ are given in km\/s and must be converted into the units used for the simulation. This is done automatically by the code, no matter the value of \\T{TypeOfUnits} (unless $\\T{Nbh} = 0$ and\/or $\\T{Clight} = 0$, in which cases PN terms are switched off and mergers are not permitted).\n\n\n\n\\section*{External gravitational fields}\n\nThis code allows the user to add to the simulated stellar system an external regular and spherical distribution of matter, accounting for its gravitation field and dynamical friction over the \\T{N} bodies.\n\nThe code allows two possible density profiles for the external field : a {\\it Dehnen} profile \\cite{Dehnen93} and\/or a {\\it Plummer} profile \\cite{Plummer}. The user may activate either of these by setting to ``yes'' the corresponding option \\T{DehnenYes} and\/or \\T{PlummerYes} (the two options can be activated at once, to get a superposition of the two density profiles).\n\nThe matter distribution is defined by its total mass (parameter $\\T{M}_{\\subt{D}}$ or $\\T{M}_{\\subt{P}}$) and its scale radius (parameter $\\T{r}_{\\subt{D}}$ or $\\T{r}_{\\subt{P}}$). These two values may be given either in $\\mbox{$\\mbox{M}_{\\odot}$}$ and parsec (option $\\T{TypeOfUnits} = 1$) or in the same autonomous units than the other input data (option $\\T{TypeOfUnits} = 0$). For the Dehnen profile, the user also needs to define a central slope (parameter $\\gamma_{\\subD}$), whose value must be $0\\leqslant \\gamma_{\\subD}< 5\/2$. \\\\\n\nThe spherical matter distribution acts over the \\T{N} objects by mean of its gravitational field and dynamical friction braking. \n\nThe dynamical friction (df) effect is taken into account via a deceleration term in the classical Chandrasekhar's form in local approximation \\cite{Chandrasekhar}: its magnitude depends upon a proper average of the velocity dispersion of the particles composing the regular matter distribution. For a Plummer profile, the average velocity dispersion is :\n$$\\sigma^2_{\\subt{P}} = 3 \\pi G M_{\\subt{P}}\/(32 r_{\\subt{P}}).$$\n\n\nFor a Dehnen profile, the formula for the gravitational energy converges only if $\\gamma_{\\subD} < 5\/2$, to give the following expression :\n$$\\sigma^2_{\\subt{D}} = \\frac{G M_{\\subt{D}}}{2 r_{\\subt{D}}} \\frac{1}{5-2\\gamma_{\\subD}}.$$\n\n\nThen, for the superposition of a Dehnen and a Plummer profile, the global mass-averaged velocity dispersion is:\n$$\\sigma^2 = \\frac{M_{\\subt{D}} \\sigma^2_{\\subt{D}} + M_{\\subt{P}} \\sigma^2_{\\subt{P}}}{M_{\\subt{D}} + M_{\\subt{P}}}.$$\n\n\n\n\n\n\n\\section*{Initial virial ratio}\n\nA physical system is said to be in virial equilibrium if the second derivative $\\ddot{I}$ of its polar moment of inertia is null, at least on average. \n\nLet $K$ denote the kinetic energy of a system and $\\Omega$ its potential energy. We can show that $\\ddot{I}\/2 = 2K +\\Omega$ (see \\cite{HeggieHut}, chapter $9$ for proof).\nCalling ``virial ratio'' the quantity $Q = 2K\/|\\Omega|$, the condition $\\langle\\ddot{I}\\rangle = 0$ is equivalent to $\\langle Q \\rangle = 1$. \\\\\n\n\nWhen studying systems embedded in a regular mass distribution, the gravitational attraction exerted by the regular field is, generally, non negligible and deserves to be included in the computation of the total potential energy $\\Omega$ of the system.\n\nLet $Q_{\\sub{0}}$ denote the virial ratio corresponding to the input data given by the user (file \\T{INPUT.TXT}). If the parameter \\T{VirialYes} (in the file \\T{PARAMETERS.TXT}) is set to ``yes'', then the code rescales the system's velocities so that the virial ratio gets the value \\T{Q} assigned by the user in the \\T{PARAMETERS.TXT} file. This is, simply, done by multiplying the velocities of all the stellar bodies by $\\sqrt{\\T{Q}\/Q_{\\sub{0}}}$. \\\\\n\n\n\n\n\n\n\n\n\n\\section*{Keplerian orbital elements}\n\nAn interesting case of \\T{N}-body system are systems where small bodies (stars as well as black-holes) are moving around a massive rotating black-hole. Most of the small bodies can then be considered as orbiting around the central one in a binary relationship (like the planets around the Sun). In this case, the user may be more interested in the characteristics of these binary-orbits (semi-major axis, eccentricity, period...) than by the raw coordinates and velocities of each body.\n\nThe user may thus place the data of the massive black-hole in the first line of the file \\T{INPUT.TXT} and activate the binary motion analysis by setting to ``yes'' the option \\T{ComputeOrbitalElements} in the parameters file.\n\n\n\n\nIn PN theory, the characteristic variables of a binary motion, or orbital elements, depend on the spin of the two members of the binary. If we assume a large unbalance between the masses, the spin of the small body can be neglected and the code only require the spin of the massive black-hole. \n\nThis (dimensionless) spin $\\bm{\\alpha}_{\\sub{1}}$ has already been defined, since it is necessary to compute the recoil velocity (see related section). We recall here that this spin can be defined via a file \\T{SPIN.TXT} provided by the user, or randomly generated by the code at its initialization. It must have a norm less than $1$ and, unless the spin of the other bodies which are constant, it will evolve along the computation.\n\n\n\nAt each output time, the code will compute the value of the orbital elements for all pairs $(m_{\\sub{1}},m_{\\sub{j}})_{10}$ (see~\\hyperref[moments]{Corollary~\\ref*{moments}}).\n\n\nThe work in this paper is based on my 2012 PhD dissertation~\\cite{GD}.\nThe matrix distributions were computed independently in the 2014 PhD dissertation of M. Adam~\\cite{AdamD} as well as in his 2014 paper~\\cite{AdamP}.\nThey are also used in a recent paper of Adam and Malle~\\cite{AM}.\n\n\n\\subsection{The function field case} \\label{FFC}\n\nComplementing the work described in \\hyperref[CLMM]{Section~\\ref{CLMM}}, investigators have been studying analogous phenomena in function fields defined over finite fields.\nIn 1989, Friedman and Washington (in~\\cite{FW}) addressed the case of quadratic extensions of the field $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ for a prime $p\\neq2$ and $n\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$.\nMore precisely, if $f(t)\\in\\ensuremath{{\\mathbb{F}}}_{p^n}[t]$ is monic with distinct roots of degree $2g+1$, let $C_f$ be the hyperelliptic curve (defined over $\\ensuremath{{\\mathbb{F}}}_{p^n}$) of genus $g$ given by $y^2=f(t)$.\nNote that the curve $C_f$ has exactly one point at infinity, just as imaginary quadratic extensions of $\\ensuremath{{\\mathbb{Q}}}$ have exactly one place at infinity.\nThus, $\\Pic^0_{\\ensuremath{{\\mathbb{F}}}_{p^n}}{\\ensuremath{\\left(} C_f\\ensuremath{\\right)}}$ is isomorphic to the ideal class group of the field extension $\\mathbb{F}_{p^n}(t)[\\sqrt{f(t)}]\/\\mathbb{F}_{p^n}(t)$.\n\nTo study these groups, Friedman and Washington introduced a new heuristic principle, one that comes from the geometry of hyperelliptic curves over finite fields.\nSpecifically, for $f(t)\\in\\ensuremath{{\\mathbb{F}}}_{p^n}[t]$ monic with distinct roots of degree $2g+1$, let $T_{\\ell}\\ensuremath{\\left(} C_f\\ensuremath{\\right)}$ be the $\\ell$-adic Tate module of $C_f$, which is a free $2g$-dimensional $\\ensuremath{{\\mathbb{Z}}}_\\ell$-module.\nIn addition, let $\\Frob_{p^n}$ be the $p^n$-power Frobenius map acting on $T_\\ell\\ensuremath{\\left(} C_f\\ensuremath{\\right)}$.\nThinking of $\\Frob_{p^n}$ as a matrix over $\\ensuremath{{\\mathbb{Z}}}_\\ell$, it is well-known that $\\coker{\\ensuremath{\\left(}\\Id-\\Frob_{p^n}\\ensuremath{\\right)}}$ is isomorphic to the $\\ell$-Sylow subgroup of $\\Pic^0_{\\ensuremath{{\\mathbb{F}}}_{p^n}}{\\ensuremath{\\left(} C_f\\ensuremath{\\right)}}$ (see the appendix of~\\cite{FW} for a proof of this fact).\nFriedman and Washington conjectured that the statistics of $\\ell$-Sylow subgroups of ideal class groups of quadratic extensions of $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ match the statistics of $\\ell$-adic matrices.\nSpecifically, if we let\n\\[\nF(g,p^n,\\ell,A)\n:=\\frac{\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{} f(t)\\in\\ensuremath{{\\mathbb{F}}}_{p^n}[t]\n\\,\\Big\\vert\\,\\substack{f\\text{ monic with distinct roots}\\\\\n\\deg{f}=2g+1,\n\\,\\Pic^0_{\\ensuremath{{\\mathbb{F}}}_{p^n}}{\\ensuremath{\\left(} C_f\\ensuremath{\\right)}}[\\ell^{\\infty}]\\simeq A}\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert}}\n{\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{} f(t)\\in\\ensuremath{{\\mathbb{F}}}_{p^n}[t]\n\\,\\Big\\vert\\,\\substack{f\\text{ monic with distinct roots}\\\\\n\\deg{f}=2g+1}\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert}},\n\\]\nthen they proposed the following:\n\\begin{FWheur}[Friedman and Washington, 1989] \\label{FWheur}\nIf $A\\in\\mathcal{G}$, then\n\\[\n\\lim_{g\\to\\infty}\n{F(g,p^n,\\ell,A)}\n=\\lim_{g\\to\\infty}\n{\\alpha_{2g}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\phi\\in\\Mat_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\phi)}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right)}},\n\\]\nwhere $\\alpha_{2g}$ is the normalized Haar measure on $\\Mat_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}$.\n\\end{FWheur}\n\\noindent (See Sections~\\ref{notdef} and~\\ref{THM} for more details on Haar measures.)\nA few years later, Katz and Sarnak~\\cite{KS} vastly extended the philosophy of considering the action of Frobenius as a random matrix, especially when the size of the base field is large.\nFriedman and Washington show that the limit on the right hand side of~\\hyperref[FWheur]{Heuristic~\\ref*{FWheur}} exists, and that it defines exactly the same distribution on $\\mathcal{G}$ as Cohen-Lenstra's original heuristic for imaginary quadratic extensions of \\ensuremath{{\\mathbb{Q}}}.\nHowever, just as the work of Malle calls into question the appropriateness of certain Cohen-Lenstra-Martinet distributions, it also calls into question the appropriateness of Friedman-Washington's proposed distribution.\nIndeed, note the Friedman-Washington heuristic does not depend at all on the presence of $\\ell$th roots of unity in the base field $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$, while Malle's work suggests that distributions modeling $\\ell$-Sylow subgroups of class groups ought to change in the presence presence of $\\ell$th roots of unity.\nThus, the new data of Malle suggests that \\hyperref[FWheur]{Heuristic~\\ref*{FWheur}} might be flawed when $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ has $\\ell$th roots of unity.\n\n\n\n\n\n\n\nA possible explanation for this flaw is that $\\Frob_{p^n}$ is a symplectic similitude with respect to the Weil pairing on $T_\\ell(C_f)$.\nIndeed, it scales the Weil pairing by $p^n$, so when considered as a matrix, $\\Frob_{p^n}\\in\\GSp_{2g}^{(p^n)}{(\\ensuremath{{\\mathbb{Z}}}_\\ell)}$.\n(See \\hyperref[notdef]{Section~\\ref*{notdef}} for more details on this notation.)\nSince the presence of $\\ell$th roots of unity in $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ depends on the congruence class of $p^n\\pmod{\\ell}$, the set of symplectic similitudes that scale the Weil pairing by $p^n$ does indeed change change when $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ has $\\ell$th roots of unity.\nThese facts led Friedman and Washington (and Achter~\\cite{A2}) to suggest\n\\begin{Aheur} \\label{Aheur}\nIf $A\\in\\mathcal{G}$, then\n\\[\n\\lim_{g\\to\\infty}\n{F(g,p^n,\\ell,A)}\n=\\lim_{g\\to\\infty}\n{\\mu_{2g}^{(p^n)}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\phi\\in\\GSp^{(p^n)}_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\phi)}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right)}},\n\\]\nwhere $\\mu_{2g}^{(p^n)}$ is the unique normalized multiplicative Haar measure on $\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}$ translated to $\\GSp_{2g}^{(p^n)}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}$.\n\\end{Aheur}\n\\noindent(Again, see Sections~\\ref{notdef} and~\\ref{THM} for more details on Haar measures.)\nFriedman and Washington hoped that this new heuristic would turn out to describe the same distribution as \\hyperref[FWheur]{Heuristic~\\ref*{FWheur}}, but Achter~\\cite{A1} proved that\n\\begin{align*}\n\\lim_{g\\to\\infty}\n&{\\mu_{2g}^{(p^n)}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\phi\\in\\GSp^{(1)}_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\phi)}\\simeq\\{0\\}\\ensuremath{\\right\\}}\\ensuremath{\\right)}}\\\\\n&\\hspace{110px}\\neq\\lim_{g\\to\\infty}\n{\\alpha_{2g}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\phi\\in\\Mat_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\phi)}\\simeq\\{0\\}\\ensuremath{\\right\\}}\\ensuremath{\\right)}},\n\\end{align*}\nrevealing that this was not the case, providing an early indication of the importance of the presence of $\\ell$th roots of unity in the base field.\nIn~\\cite{A2}, Achter uses work of Katz-Sarnak~\\cite{KS} to prove a revised version of~\\hyperref[FWheur]{Heuristic~\\ref*{FWheur}}:\n\\begin{Athm}[Achter, 2008] \\label{Athm}\nIf $A\\in\\mathcal{G}$, then\n\\[\n\\lim_{p^n\\to\\infty}\n{\\ensuremath{\\left\\vert} F(g,p^n,\\ell,A)\n-\\mu_{2g}^{(p^n)}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\phi\\in\\GSp^{(p^n)}_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\phi)}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right)}\\ensuremath{\\right\\vert}}\n=0.\n\\]\n\\end{Athm}\n\\noindent We remark that this limit in \\hyperref[Athm]{Theorem~\\ref*{Athm}} leaves $g$ fixed while letting $p^n$ increase, whereas the limit in \\hyperref[Aheur]{Heuristic~\\ref*{Aheur}} does the opposite.\n\nThe work of Ellenberg, Venkatesh, and Westerland~\\cite{EVW} uses the topology of Hurwitz spaces to study \\hyperref[Aheur]{Heuristic~\\ref*{Aheur}}.\nOne consequence of their work is that\n\\[\n\\lim_{g\\to\\infty}\n{\\lim_{\\substack{p^n\\to\\infty\\\\\np^n\\nequiv1\\imod{\\ell}}}\n{F(g,p^n,\\ell,A)}}\n=\\frac{1}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}\\prod_{i=1}^{\\infty}{\\lp1-\\ell^{-i}\\ensuremath{\\right)}}.\n\\]\nSince $p^n\\equiv1\\pmod{\\ell}$ exactly when $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ has $\\ell$th roots of unity, this result only addresses the case when the base field does not have $\\ell$th roots of unity (and only when $p^n\\to\\infty$).\nThe remaining case is when $p^n\\equiv1\\pmod{\\ell}$; that is, the case where there are $\\ell$th roots of unity in the base field.\n\\hyperref[mallec]{Conjecture~\\ref*{mallec}} suggests that a different distribution is needed to describe this case.\nIn fact, \\hyperref[finalc]{Corollary~\\ref*{finalc}} gives such a distribution.\nUsing Achter's result, \\hyperref[Athm]{Theorem~\\ref*{Athm}}, \\hyperref[finalc]{Corollary~\\ref*{finalc}} implies the following theorem:\n\n\\begin{prettyfinal} \\label{prettyfinal}\nIf $A$ is a finite abelian $\\ell$-group with $\\ell$-rank $r$ and $\\ell^2$-rank $s$, then\n\\begin{align*}\n\\lim_{g\\to\\infty}&{\n\\lim_{\\substack{p^n\\to\\infty\\\\\np\\nequiv1\\imod{\\ell^\\xi},\\\\\np\\nequiv1\\imod{\\ell^{\\xi+1}}}}\n{F(g,p^n,\\ell,A)}}\\\\\n&\\phantom{======}=\\begin{cases}\n\\ell^{\\frac{r(r-1)}{2}}\\cdot\\ensuremath{\\left(}\\ell^{-1};\\ell^{-1}\\ensuremath{\\right)}_r\n\\cdot\\frac{\\prod_{i=1}^{\\infty}{(1+\\ell^{-i})^{-1}}}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}^{-1}},\n&\\text{if }\\xi=1\\\\\n\\ell^{\\frac{r(r-1)}{2}+\\frac{s(s-1)}{2}}\n\\cdot\\ensuremath{\\left(}\\ell^{-1};\\ell^{-1}\\ensuremath{\\right)}_s\n\\cdot\\ensuremath{\\left(}\\ell^{-1};\\ell^{-2}\\ensuremath{\\right)}_{\\lceil \\frac{r-s}{2}\\rceil}\n\\cdot\\frac{\\prod_{i=1}^{\\infty}{(1+\\ell^{-i})^{-1}}}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}^{-1}},\n&\\text{if }\\xi=2,\n\\end{cases}\n\\end{align*}\nwhere $\\ensuremath{\\left(}\\ell^{-1};\\ell^{-j}\\ensuremath{\\right)}_k$ is the $\\ell^{-j}$-Pochhammer symbol, defined for any $j\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ and $k\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$ (see \\hyperref[Not6]{Notation~\\ref*{Not6}}).\n\\end{prettyfinal}\n\n\\noindent \\hyperref[prettyfinal]{Theorem~\\ref*{prettyfinal}} extends \\hyperref[mallec]{Conjecture~\\ref*{mallec}} by including the case where $\\ensuremath{{\\mathbb{F}}}_{p^n}(t)$ has $\\ell^2$th roots of unity but not $\\ell^3$th roots of unity.\nWe remark that since imaginary hyperelliptic curves have only one place at infinity, the function field version of \\hyperref[mallec]{Conjecture~\\ref*{mallec}} should set $u=0$; making this substitution in \\hyperref[mallec]{Conjecture~\\ref*{mallec}} yields the $\\xi=1$ case of \\hyperref[prettyfinal]{Theorem~\\ref*{prettyfinal}}.\n\n\n\\section{Prelinimaries}\n\n\\subsection{Notation and definitions} \\label{notdef}\n\nAs above, let $\\ell$ be an odd prime and let $\\mathcal{G}$ be the poset of isomorphism classes of finite abelian $\\ell$-groups, with the relation $\\left[A\\right]\\leq\\left[B\\right]$ if and only if there exists an injection $A\\hookrightarrow B$.\n(For notational simplicity, we will conflate finite abelian $\\ell$-groups and the equivalence classes containing them.)\nFor any $A\\in\\mathcal{G}$, we denote the exponent of $A$ by $\\exp{A}$.\nIf $i\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, let\n\\[\n\\rank_{\\ell^i}{A}:=\\dim_{\\ensuremath{{\\mathbb{F}}}_\\ell}{\\ensuremath{\\left(}\\ell^{i-1}A\/\\ell^iA\\ensuremath{\\right)}}.\n\\]\nWe will abbreviate $\\rank_\\ell{A}$ by $\\rank{A}$.\nIf $r_1,\\ldots,r_{i-1}\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ and $r_i\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, let $\\mathcal{G}(r_1,\\ldots,r_i)$ be the following subposet of $\\mathcal{G}$:\n\\[\n\\mathcal{G}(r_1,\\ldots,r_i)\n:=\\ensuremath{\\left\\{} A\\in\\mathcal{G}\\mid\\rank_{\\ell^j}{A}=r_j\\text{ for all }j\\in\\lb1,\\ldots,i\\ensuremath{\\right\\}}\\rb.\n\\]\nNext, for any $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, set $R_\\rho=\\ensuremath{{\\mathbb{Z}}}_\\ell\/\\ell^\\rho\\ensuremath{{\\mathbb{Z}}}_\\ell\\simeq\\ensuremath{{\\mathbb{Z}}}\/\\ell^\\rho\\ensuremath{{\\mathbb{Z}}}$.\nFor any $g,\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, let $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}_{2g,\\rho}$ be a fixed choice of symplectic form on $(R_\\rho)^{2g}$; that is, $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}_{2g,a}:(R_\\rho)^{2g}\\times(R_\\rho)^{2g}\\to(R_\\rho)$ is $R_\\rho$-bilinear, alternating, and nondegenerate.\nBy nondegenerate, we mean that the matrix associated to $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}_{2g,\\rho}$ is invertible; see Theorem~III.2 of~\\cite{McD} for more details on symplectic spaces.\nSimilarly, let $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}_{2g}$ be a choice of symplectic form on $\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}^{2g}$.\nFor any ring $R$ and any $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, if $R^{2g}$ has a symplectic form $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}$, then the \\emph{symplectic group of $R$} is\n\\[\n\\Sp_{2g}{(R)}\n\\simeq\\Sp{\\ensuremath{\\left(} R^{2g},\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}\\ensuremath{\\right)}}\\\\\n=\\ensuremath{\\left\\{}\\phi\\in\\GL{\\ensuremath{\\left(} R^{2g}\\ensuremath{\\right)}}\n\\mid\\ensuremath{\\left\\langle} \\phi(x),\\phi(y)\\ensuremath{\\right\\rangle}=\\ensuremath{\\left\\langle} x,y\\ensuremath{\\right\\rangle}\\text{ for all }x,y\\in R^{2g}\\ensuremath{\\right\\}}.\n\\]\nNote that a different choice of symplectic form on $R^{2g}$ yields an isotropic space, so the choice is immaterial (see page 188 of~\\cite{McD} for more details).\nSimilarly, the \\emph{group of symplectic similitudes of $R$} is\n\\[\n\\GSp_{2g}{(R)}\n\\simeq\\GSp{\\ensuremath{\\left(} R^{2g},\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}\\ensuremath{\\right)}}\n=\\ensuremath{\\left\\{}\\phi\\in\\GL{\\ensuremath{\\left(} R^{2g}\\ensuremath{\\right)}}\n\\,\\Big\\vert\\,\\substack{\\text{there exists }m(\\phi)\\in R^{\\times}\\text{ such that}\\\\\n\\ensuremath{\\left\\langle}\\phi(x),\\phi(y)\\ensuremath{\\right\\rangle}=m(\\phi)\\cdot\\ensuremath{\\left\\langle} x,y\\ensuremath{\\right\\rangle}\n\\text{ for all }x,y\\in R^{2g}}\\ensuremath{\\right\\}}.\n\\]\nFor concreteness, we will always assume that the rings $(R_\\rho)^{2g}$ and $(\\ensuremath{{\\mathbb{Z}}}_\\ell)^{2g}$ are equipped with the forms $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}_{2g,\\rho}$ and $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}_{2g}$ fixed above.\nThe map $m:\\GSp_{2g}{\\ensuremath{\\left(} R\\ensuremath{\\right)}}\\to R^{\\times}:\\phi\\mapsto m(\\phi)$ given above is a homomorphism called the \\emph{multiplier map}, and the element $m(\\phi)\\in R^{\\times}$ is called the \\emph{multiplier} of~$\\phi$.\nFor any $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, let $\\mu_{2g}$ be the unique normalized Haar measure on $\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$, noting that this measure is invariant under both left and right multiplication since $\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$ is a unimodular group.\nFinally, for any $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ and any unit $x$ in a ring $R$, let $\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R\\ensuremath{\\right)}}=m^{-1}(x)$.\n\nNow, for any $x\\in\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}^{\\times}$ and $\\phi\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} \\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$ we define a measure $\\mu_{2g}^{(x)}$ on $\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} \\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$ as follows: for any $\\mu_{2g}$-measurable subset $S\\subseteq\\Sp_{2g}{\\ensuremath{\\left(} \\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$, define\n\\[\n\\mu_{2g}^{(x)}\\ensuremath{\\left(} S\\phi\\ensuremath{\\right)}:=\\mu_{2g}\\ensuremath{\\left(} S\\ensuremath{\\right)}.\n\\]\nWe remark that this measure is independent of the choice $\\phi\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$.\nIndeed, given some other $\\psi\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} \\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$ there exists a unique $\\phi_\\psi\\in\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$ such that $\\phi_\\psi\\phi=\\psi$; ie, $S\\psi=S\\phi_\\psi\\phi$.\nSince $\\mu_{2g}$ is translation invariant, we know that\n\\[\n\\mu_{2g}\\ensuremath{\\left(} S\\ensuremath{\\right)}=\\mu_{2g}\\ensuremath{\\left(} S\\phi_\\psi\\ensuremath{\\right)},\n\\]\nas desired.\nMoreover, since $\\mu_{2g}$ is translation invariant (by $\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$) and normalized, so is $\\mu_{2g}^{(x)}$.\nSimilarly, for any $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, let $\\nu_{2g,\\rho}$ be the unique normalized Haar measure on $\\Sp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$, and for any $x\\in R_\\rho^{\\times}$, define $\\nu_{2g,\\rho}^{(x)}$ on $\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$ as above.\nFor any $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, $x\\in R_\\rho^{\\times}$, and $S\\subseteq\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$, we know $\\nu_{2g,\\rho}^{(x)}(S)=\\ensuremath{\\left\\vert} S\\ensuremath{\\right\\vert}\\cdot\\ensuremath{\\left\\vert}\\Sp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}^{-1}$, since $\\Sp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$ is a finite group.\nTo ease notation, for any $A\\in\\mathcal{G}$, $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and $x\\in\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}^{\\times}$, we set\n\\[\n\\mu_{2g}^{(x)}\\ensuremath{\\left(} A\\ensuremath{\\right)}\n:=\\mu_{2g}^{(x)}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\phi\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}\n\\,\\,\\big\\vert\\,\\,\\coker{\\ensuremath{\\left(}\\Id-\\phi\\ensuremath{\\right)}}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right)}.\n\\]\nFurthermore, if $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ and $x\\in R_\\rho^{\\times}$, set\n\\[\n\\nu_{2g,\\rho}^{(x)}\\ensuremath{\\left(} A\\ensuremath{\\right)}\n:=\\nu_{2g,\\rho}^{(x)}\\ensuremath{\\left(}\\ensuremath{\\left\\{}\\gamma\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}\n\\,\\,\\Big\\vert\\,\\,\\coker{\\ensuremath{\\left(}\\Id-\\gamma\\ensuremath{\\right)}}\\simeq A}\\ensuremath{\\right\\}}\\ensuremath{\\right)}.\n\\]\n\n\\subsection{The Haar measures} \\label{THM}\n\nThe measures defined in \\hyperref[notdef]{Section~\\ref*{notdef}} have an important relationship, given in the following lemma.\n\n\\begin{haar} \\label{haar}\nSuppose $A\\in\\mathcal{G}$, $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, $x\\in\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_\\ell\\ensuremath{\\right)}^{\\times}$, and $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$.\nLet $\\overline{\\phantom{\\vert}\\cdot\\phantom{\\vert}}:\\ensuremath{{\\mathbb{Z}}}_\\ell\\to R_\\rho$ denote reduction mod $\\ell^\\rho$.\nIf $\\ell^\\rho>\\exp{A}$, then\n\\[\n\\mu_{2g}^{(x)}\\ensuremath{\\left(} A\\ensuremath{\\right)}=\\nu_{2g,\\rho}^{(\\overline{x})}\\ensuremath{\\left(} A\\ensuremath{\\right)}.\n\\]\n\\end{haar}\n\\begin{proof}\nChoose any $\\phi\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$.\nThen for any measurable $S\\subseteq\\GSp_{2g}^{(x)}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$, we know that $\\mu_{2g}^{(x)}\\ensuremath{\\left(} S\\ensuremath{\\right)}=\\mu_{2g}^{(x)}\\ensuremath{\\left(} S\\phi^{-1}\\phi\\ensuremath{\\right)}=\\mu_{2g}\\ensuremath{\\left(} S\\phi^{-1}\\ensuremath{\\right)}$ by the definition of $\\mu_{2g}^{(x)}$.\nSince $\\mu_{2g}$ is invariant under translation, every coset of the kernel of the reduction map $\\overline{\\phantom{\\vert}\\cdot\\phantom{\\vert}}:\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}\\to R_\\rho$ has the same measure; namely,\n\\[\n\\left[\\Sp_{2g}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}:\\ker{\\ensuremath{\\left(}\\overline{\\phantom{i}\\cdot\\phantom{i}}\\ensuremath{\\right)}}\\right]^{-1}=\\ensuremath{\\left\\vert}\\Sp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}^{-1}.\n\\]\nMoreover, note that if $\\psi\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}}$, then $m\\ensuremath{\\left(}\\overline{\\psi}\\ensuremath{\\right)}=\\overline{m(\\psi)}$ and $\\coker{\\ensuremath{\\left(}\\Id-\\psi\\ensuremath{\\right)}}\\simeq A$ if and only if $\\coker{\\ensuremath{\\left(}\\Id-\\overline{\\psi}\\ensuremath{\\right)}}\\simeq A$, since $\\ell^\\rho>\\exp{A}$.\nThe result follows.\n\\end{proof}\n\n\\begin{Not} \\label{Not}\nSuppose that $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$.\nFor $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ satisfying $\\rho\\geq\\xi$, we define an important subgroup of $\\GSp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$:\n\\[\n\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n:=\\ensuremath{\\left\\{}\\gamma\\in\\GSp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\mid m(\\gamma)\\in\\ell^\\xi R_\\rho+1\\ensuremath{\\right\\}}.\n\\]\nNote that $\\GSp^{\\ensuremath{\\left\\langle}\\rho\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}=\\Sp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$ and $\\GSp^{\\la0\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}=\\GSp_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}$.\nFor any $A\\in\\mathcal{G}$, we adopt the suggestive notation:\n\\[\nN_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)}\n:=\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{}\\gamma\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\gamma)}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert}\n\\]\nand, if $\\rho>\\xi$,\n\\[\n\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)}\n:=\\frac{N_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)}\n-N_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)}}\n{\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}\n-\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}.\n\\]\n\\end{Not}\n\n\\begin{goa} \\label{goa}\nWe can now state the matrix-theoretic analog of the situation about which Malle made Conjecture~2.1.\nFollowing \\hyperref[Aheur]{Conjecture~\\ref*{Aheur}}, for $A\\in\\mathcal{G}$, $x\\in\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}_{\\ell}\\ensuremath{\\right)}^{\\times}$ and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, with $x\\equiv1\\pmod{\\ell^\\xi}$ but $x\\nequiv1\\pmod{\\ell^{\\xi+1}}$, we must evaluate\n\\[\n\\mu_x(A):=\\lim_{g\\to\\infty}\n{\\mu_{2g}^{(x)}\\ensuremath{\\left(} A\\ensuremath{\\right)}}.\n\\]\nIf we let $\\overline{\\phantom{\\vert}\\cdot\\phantom{\\vert}}:\\ensuremath{{\\mathbb{Z}}}_\\ell\\to R_\\rho$ denote reduction mod $\\ell^\\rho$, then we know by \\hyperref[haar]{Lemma~\\ref*{haar}} that this amounts to calculating\n\\[\n\\lim_{g\\to\\infty}\n{\\nu_{2g,\\rho}^{(\\overline{x})}\\ensuremath{\\left(} A\\ensuremath{\\right)}}\n\\]\nfor any $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ satisfying both $\\ell^\\rho>\\exp{A}$ and $\\rho>\\xi$.\nIn \\hyperref[subcos]{Note~\\ref*{subcos}} we will see that for all such $\\rho$:\n\\[\n\\nu_{2g,\\rho}^{(\\overline{x})}\\ensuremath{\\left(} A\\ensuremath{\\right)}=\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)},\n\\]\nso we will turn our attention to computing\n\\[\n\\lim_{g\\to\\infty}\n{\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)}},\n\\]\nwhich we compute explicitly for $\\xi=1,2$ in \\hyperref[finalc]{Corollary~\\ref*{finalc}}.\nUsing Achter's result, \\hyperref[Athm]{Theorem~\\ref*{Athm}}, we then obtain \\hyperref[prettyfinal]{Theorem~\\ref*{prettyfinal}} as a corollary.\n\\end{goa}\n\n\\begin{momentsn} \\label{momentsn}\nSuppose that $x\\in\\ensuremath{{\\mathbb{Z}}}_\\ell$.\nIn addition to explicitly computing the distribution $\\mu_x:\\mathcal{G}\\to\\ensuremath{{\\mathbb{R}}}$ if $x\\equiv1\\pmod{\\ell^\\xi}$ but $x\\nequiv1\\pmod{\\ell^{\\xi+1}}$ for $\\xi=1,2$, we also compute the moments of this distribution for any $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$.\nSpecifically, in \\hyperref[moments]{Corollary~\\ref*{moments}} we find that if $A\\in\\mathcal{G}$, then\n\\[\n\\sum_{B\\in\\mathcal{G}}{\\ensuremath{\\left\\vert}\\Surj{(B,A)}\\ensuremath{\\right\\vert}\\mu_x(B)}\n=\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} A\/\\ell^\\xi\\ensuremath{\\right)}\\ensuremath{\\right\\vert}.\n\\]\n(See \\hyperref[Not22]{Notation~\\ref*{Not22}} for the definition of $\\Lambda:\\mathcal{G}\\to\\ensuremath{{\\mathbb{Z}}}^{>0}$.)\n\\end{momentsn}\n\n\\section{The symplectic action} \\label{TSA}\n\n\\subsection{Basic properties} \\label{bp}\n\n\\begin{Not2} \\label{Not2}\nFor any $A,B\\in\\mathcal{G}$, let $\\Inj{\\ensuremath{\\left(} A,B\\ensuremath{\\right)}}$ and $\\Surj{\\ensuremath{\\left(} A,B\\ensuremath{\\right)}}$ be the set of injective homomorphisms and surjective homomorphisms from $A$ to $B$.\n\\end{Not2}\n\nIn what follows, we will consider either injections or surjections (as well as either kernels or cokernels) depending on which is more convenient at the time.\nThe next two lemmas justify this shifting point of view.\n\n\\begin{dual} \\label{dual}\nSuppose that $A\\in\\mathcal{G}$, $g,\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$.\nIf $\\rho\\geq\\xi$, then $\\GSp^{\\ensuremath{\\left\\langle} \\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}$ acts on $\\Inj{(A,(R_\\rho)^{2g})}$ and $\\Surj{((R_\\rho)^{2g},A)}$ by post- and pre-composition, respectively.\nThe number of orbits of these actions are the same.\n\\end{dual}\n\\begin{proof}\nIf $\\ell^\\rho<\\exp{A}$, the result is trivial, so suppose $\\ell^\\rho\\geq\\exp{A}$.\nIn this case, we can think of $A$ as an $R_\\rho$-module.\nMoreover, we know that $R_\\rho$ is an injective $R_\\rho$-module by Baer's criterion, so the functor\n\\[\n\\ensuremath{\\left(}\\cdot\\ensuremath{\\right)}^\\vee\n:=\\Hom(\\,\\cdot\\,,R_\\rho):R_\\rho\\mathtt{-mod}\\to R_\\rho\\mathtt{-mod}\n\\]\nis exact.\nThus, for any $\\gamma\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}$:\n\\begin{gather*}\nf,h\\in\\Inj{(A,(R_\\rho)^{2g})}\n\\text{ with }\\gamma\\circ f=h\\\\\n\\text{ if and only if }\\\\\nf^{\\vee},h^{\\vee}\\in\\Surj{(((R_\\rho)^{2g})^\\vee,A^\\vee)}\n\\text{ with }f^\\vee\\circ\\gamma^{\\vee}=h^{\\vee}.\n\\end{gather*}\nAfter choosing $R_\\rho$-bases for $(R_\\rho)^{2g}$ and $A$, it is easy to see that $((R_\\rho)^{2g})^\\vee\\simeq(R_\\rho)^{2g}$, $A^\\vee\\simeq A$, and $\\gamma^\\vee=\\gamma^\\top\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}$, giving the result.\n\\end{proof}\n\nThe number orbits of the action described above turn out to be very important, so we bestow a name upon them:\n\n\\begin{Not21} \\label{Not21}\nSuppose that $A\\in\\mathcal{G}$, $g,\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$.\nIf $\\rho\\geq\\xi$, let $o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}$ be the number of orbits of $\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}$ acting on $\\Inj{\\ensuremath{\\left(} A,(R_\\rho)^{2g}\\ensuremath{\\right)}}$ or $\\Surj{\\ensuremath{\\left(} (R_\\rho)^{2g},A\\ensuremath{\\right)}}$.\n\\end{Not21}\n\n\\begin{dual2} \\label{dual2}\nFor $A,g,\\rho,\\xi$ as above:\n\\[\nN_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}\\ensuremath{\\left(} A\\ensuremath{\\right)}\n=\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{}\\gamma\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\mid\\ker{(\\Id-\\gamma)}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert}.\n\\]\n\\end{dual2}\n\\begin{proof}\nAs in \\hyperref[dual]{Lemma~\\ref*{dual}}, this follows from the exactness of $\\ensuremath{\\left(}\\cdot\\ensuremath{\\right)}^\\vee$.\nNote that for any $\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}$:\n\\[\n\\ensuremath{\\left(}\\coker{\\ensuremath{\\left(}\\Id-\\gamma\\ensuremath{\\right)}}\\ensuremath{\\right)}^{\\vee}\n=\\ker{\\ensuremath{\\left(}\\lp\\Id-\\gamma\\ensuremath{\\right)}^{\\vee}\\ensuremath{\\right)}}\n=\\ker{\\ensuremath{\\left(}\\Id-\\gamma^{\\top}\\ensuremath{\\right)}},\n\\]\ngiving the result.\n\\end{proof}\n\nIn \\hyperref[goa]{Goal~\\ref*{goa}}, we turned our attention from the measures of cosets of the symplectic group to subgroups of the group of symplectic similitudes.\nThe following note justifies this turn.\n\n\\begin{subcos} \\label{subcos}\nSuppose that $A\\in\\mathcal{G}$, $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, $x\\in\\ensuremath{{\\mathbb{Z}}}_{\\ell}$ and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, with $x\\equiv1\\pmod{\\ell^\\xi}$ but $x\\nequiv1\\pmod{\\ell^{\\xi+1}}$.\nIf $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ satisfies $\\rho>\\xi$, then\n\\[\n\\nu_{2g,\\rho}^{(\\overline{x})}(A)=\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)\n\\]\n\\end{subcos}\n\\begin{proof}\nThis amounts to showing that if $x,y\\in R_\\rho$ such that $x\\equiv y\\equiv1\\pmod{\\ell^\\xi}$ but neither $x$ nor $y$ is equivalent to $1\\pmod{\\ell^{\\xi+1}}$, then\n\\[\n\\nu_{2g,\\rho}^{\\ensuremath{\\left(}\\overline{x}\\ensuremath{\\right)}}(A)=\\nu_{2g,\\rho}^{\\ensuremath{\\left(}\\overline{y}\\ensuremath{\\right)}}(A).\n\\]\nBy our assumptions on $x$ and $y$, there exists some $m_0$ such that that $\\ell\\nmid m_0$ and $\\overline{x}^{\\hspace{1px}m_0}=\\overline{y}$.\nChoose some $m$ in the arithmetic progression $\\ensuremath{\\left\\{} m_0+\\ell^{\\rho-\\xi}j\\ensuremath{\\right\\}}_{j=0}^\\infty$ such that\n\\[\n\\gcd{\\ensuremath{\\left(} m,\\ensuremath{\\left\\vert}\\GSp_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}\\ensuremath{\\right)}}=1,\n\\]\nand choose $k$ such that $mk\\equiv1\\pmod{\\ensuremath{\\left\\vert}\\GSp_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}}$.\nNow, the map\n\\begin{align*}\n\\ensuremath{\\left(}\\cdot\\ensuremath{\\right)}^m:\\GSp_{2g}^{\\ensuremath{\\left(}\\overline{x}\\ensuremath{\\right)}}{(R_\\rho)}&\\to\\GSp_{2g}^{\\ensuremath{\\left(}\\overline{y}\\ensuremath{\\right)}}{(R_\\rho)}\\\\\n\\gamma&\\mapsto\\gamma^m\n\\end{align*}\nis bijective with inverse $\\ensuremath{\\left(}\\cdot\\ensuremath{\\right)}^k$.\nMoreover, for any $z\\in(R_\\rho)^{2g}$ and any $\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left(}\\overline{x}\\ensuremath{\\right)}}{(R_\\rho)}$, it is clear that $\\gamma z=z$ if and only if $\\gamma^mz=z$.\nThus, we obtain\n\\[\n\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{}\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left(}\\overline{x}\\ensuremath{\\right)}}{(R_\\rho)}\n\\mid\\ker{\\ensuremath{\\left(}\\Id-\\gamma\\ensuremath{\\right)}}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert}\n=\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{}\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left(}\\overline{y}\\ensuremath{\\right)}}{(R_\\rho)}\n\\mid\\ker{\\ensuremath{\\left(}\\Id-\\gamma\\ensuremath{\\right)}}\\simeq A\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert},\n\\]\nand we conclude by \\hyperref[dual2]{Lemma~\\ref*{dual2}}.\n\\end{proof}\n\n\\subsection{Orbit counting} \\label{oc}\n\n\\begin{Not22} \\label{Not22}\nFor any $A\\in\\mathcal{G}$, let $\\Lambda\\ensuremath{\\left(} A\\ensuremath{\\right)}$ be the set of alternating bilinear forms on $A$ thought of as a $\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}\/\\exp{(A)}\\ensuremath{\\right)}$-module.\n\\end{Not22}\n\n\\begin{forms} \\label{forms}\nSuppose that $A=\\ensuremath{{\\mathbb{Z}}}\/\\ell^{\\alpha_1}\\oplus\\cdots\\oplus\\ensuremath{{\\mathbb{Z}}}\/\\ell^{\\alpha_r}$ with $\\alpha_1\\geq\\cdots\\geq\\alpha_r>0$.\nThen\n\\[\n\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} A\\ensuremath{\\right)}\\ensuremath{\\right\\vert}=\\ell^{\\sum_{i=2}^r{(i-1)\\alpha_i}}\n\\]\n\\end{forms}\n\\begin{proof}\nLet $\\ensuremath{\\left\\{}\\mathbf{e}_i\\ensuremath{\\right\\}}_{i=1}^r$ be an $\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}\/\\exp{(A)}\\ensuremath{\\right)}$-basis for $A$ such that $\\mathbf{e}_i$ has order $\\ell^{\\alpha_i}$ for all $i\\in\\lb1,\\ldots,r\\ensuremath{\\right\\}}$.\nEvery alternating bilinear form $\\ensuremath{\\left\\langle}\\cdot,\\cdot\\ensuremath{\\right\\rangle}$ on $A$ corresponds to an antisymmetric matrix $\\ensuremath{\\left(}\\ensuremath{\\left\\langle}\\mathbf{e}_i,\\mathbf{e}_j\\ensuremath{\\right\\rangle}\\ensuremath{\\right)}\\in\\Mat_{r\\times r}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}\/\\exp{(A)}\\ensuremath{\\right)}}$.\nMoreover, any antisymmetric matrix $\\ensuremath{\\left(} a_{ij}\\ensuremath{\\right)}\\in\\Mat_{r\\times r}{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}\/\\exp{(A)}\\ensuremath{\\right)}}$ corresponds to an alternating bilinear form on $A$, as long it has 0's along its main diagonal and $\\ell^{\\alpha_j}a_{ij}=0$ whenever $ij$ case follows from the the fact that $\\ensuremath{\\left(} a_{ij}\\ensuremath{\\right)}$ is antisymmetric).\nThere are $\\ell^{\\alpha_j}$ such elements of $\\ensuremath{{\\mathbb{Z}}}\/\\exp{(A)}$, so the result follows.\n\\end{proof}\n\n\\begin{orb} \\label{orb}\nSuppose that $r\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, $A\\in\\mathcal{G}(r)$, $g,\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$.\nIf $\\ell^\\rho\\geq\\exp{A}$, $\\rho\\geq\\xi$, and $2g\\geq r$, then\n\\[\no^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n\\leq\\ell^{-(\\rho-\\xi)}\\ensuremath{\\left\\vert}\\Lambda(A)\\ensuremath{\\right\\vert}+\n(\\ell-1)\\sum_{i=0}^{\\rho-\\xi-1}{\\ell^{-(i+1)}}{\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} A\/\\ell^{\\xi+i}\\ensuremath{\\right)}\\ensuremath{\\right\\vert}}.\n\\]\nFurthermore, when $g\\geq r$, the upper bound above is an equality.\n(In particular, $o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}$ is independent of $g$ for large enough $g$.)\n\\end{orb}\nAs pointed out in \\hyperref[goa]{Goal~\\ref*{goa}}, we need only calculate\n\\[\n\\lim_{g\\to\\infty}{\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)}.\n\\]\nDespite this fact, the inequality for small $g$ in \\hyperref[orb]{Lemma~\\ref*{orb}} does indeed turn out to be useful.\nThis is due to the fact that $\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)$ can be expressed as a sum of orbit data for finite abelian groups of rank up to $2g$. \n(See \\hyperref[infi]{Corollary~\\ref*{infi}}.)\n\n\\begin{proof}[Proof of the Lemma]\nThe result is obviously true when $r=0$, so suppose that $r>0$.\nTheorem~2.14 of~\\cite{Mic} shows that the set of orbit representatives of $\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}=\\Sp_{2g}{(R_\\rho)}$ acting on $\\Surj{\\ensuremath{\\left(} (R_\\rho)^{2g},A\\ensuremath{\\right)}}$ injects into $\\Lambda(A)$.\nIn fact, when $g\\geq r$, this injection is a bijection.\nFurthermore, this injection is equivariant with respect to the natural actions of $(R_\\rho)^{\\times}=\\GSp_{2g}{(R_\\rho)}\/\\Sp_{2g}{(R_\\rho)}$ on these two sets.\nThus, computing the number of orbits of $\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}$ acting on $\\Surj{\\ensuremath{\\left(}(R_\\rho)^{2g},A\\ensuremath{\\right)}}$ is a straightforward application of Burnside's counting theorem.\nIndeed, suppose that $A=\\ensuremath{{\\mathbb{Z}}}\/\\ell^{\\alpha_1}\\oplus\\cdots\\oplus\\ensuremath{{\\mathbb{Z}}}\/\\ell^{\\alpha_r}$ with $\\alpha_1\\geq\\cdots\\geq\\alpha_r>0$, then use \\hyperref[forms]{Note~\\ref*{forms}} to note that\n\\begin{align*}\no^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n&\\leq\\frac{1}{\\ensuremath{\\left\\vert}\\ell^\\xi R_\\rho+1\\ensuremath{\\right\\vert}}\n\\cdot\\sum_{\\upsilon\\in\\ell^\\xi R_\\rho+1}{\\ensuremath{\\left\\vert}\\Fix{(\\upsilon)}\\ensuremath{\\right\\vert}}\\\\\n&=\\frac{1}{\\ensuremath{\\left\\vert}\\ell^\\xi R_\\rho+1\\ensuremath{\\right\\vert}}\\ensuremath{\\left(}\\lp\\sum_{i=0}^{\\rho-\\xi-1}{\n\\sum_{\\upsilon\\in(\\ell^{\\xi+i}R_\\rho+1)\\setminus(\\ell^{\\xi+i+1}R_\\rho+1)}\n{\\ensuremath{\\left\\vert}\\Fix{(\\upsilon)}\\ensuremath{\\right\\vert}}}\\ensuremath{\\right)}+\n\\sum_{\\upsilon\\in\\ell^\\rho R_\\rho+1=\\{1\\}}\n{\\ensuremath{\\left\\vert}\\Fix{(\\upsilon)}\\ensuremath{\\right\\vert}}\\ensuremath{\\right)}\\\\\n&=\\frac{1}{\\ell^{\\rho-\\xi}}\n\\ensuremath{\\left(}\\sum_{i=0}^{\\rho-\\xi-1}\n{(\\ell^{\\rho-\\xi-i}-\\ell^{\\rho-\\xi-i-1})\\ensuremath{\\left(}\n\\ell^{\\sum_{j=2}^{r}\n{(j-1)\\min{\\ensuremath{\\left\\{}\\xi+i,\\alpha_j\\ensuremath{\\right\\}}}}}\\ensuremath{\\right)}}\n+\\ell^{\\alpha_2+2\\alpha_3+\\cdots+(r-1)\\alpha_r}\\ensuremath{\\right)}\\\\\n&=\\frac{1}{\\ell^{\\rho-\\xi}}\n\\ensuremath{\\left\\vert}\\Lambda(A)\\ensuremath{\\right\\vert}\n+(\\ell-1)\\sum_{i=0}^{\\rho-\\xi-1}\n{\\ell^{-(i+1)}}{\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} A\/\\ell^{\\xi+i}\\ensuremath{\\right)}\\ensuremath{\\right\\vert}},\n\\end{align*}\nwith equality when $g\\geq r$.\n\\end{proof}\n\n\\begin{Not3} \\label{Not3}\nSuppose that $A\\in\\mathcal{G}$, $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$.\nIf $\\ell^\\rho\\geq\\exp{A}$ and $\\rho\\geq\\xi$, use \\hyperref[orb]{Lemma~\\ref*{orb}} to define $o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_\\rho:=o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}$ for any $g\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ such that $g\\geq\\rank{A}$.\n\\end{Not3}\n\nWe now mention an identity which will be useful later.\n(See \\hyperref[moments]{Corollary~\\ref*{moments}} and \\hyperref[nutime]{Note~\\ref*{nutime}}.)\n\n\\begin{subt} \\label{subt}\nSuppose $A\\in\\mathcal{G}$ and $\\rho,\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$.\nIf $\\ell^\\rho\\geq\\exp{A}$ and $\\rho>\\xi$, then by \\hyperref[orb]{Lemma~\\ref*{orb}} and \\hyperref[forms]{Note~\\ref*{forms}}, we see that\n\\[\n\\ell o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_\\rho-o^{A,\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_\\rho\n=(\\ell-1)\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} A\/\\ell^\\xi\\ensuremath{\\right)}\\ensuremath{\\right\\vert}.\n\\]\n\\end{subt}\n\n\nBelow is a simple observation, which has the important consequence \\hyperref[moments]{Corollary~\\ref*{moments}}.\nThis corollary gives the moments of the probability distributions $\\mu_x:\\mathcal{G}\\to\\ensuremath{{\\mathbb{R}}}$ for any $x\\in\\ensuremath{{\\mathbb{Z}}}_\\ell$, as promised in \\hyperref[THM]{Section~\\ref*{THM}}.\n\n\\begin{bij} \\label{bij}\nSuppose that $A\\in\\mathcal{G}$, $g,\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$.\nFurthermore, suppose $\\rho\\geq\\xi$, let $\\gamma\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}$, and consider $\\Inj{\\ensuremath{\\left(} A,\\ker{(\\Id-\\gamma)}\\ensuremath{\\right)}}\\subseteq\\Inj{(A,(R_\\rho)^{2g})}$.\nThere is a 1-1 correspondence between $\\Inj{\\ensuremath{\\left(} A,\\ker{(\\Id-\\gamma)}\\ensuremath{\\right)}}$ and $\\Fix{(\\gamma)}$.\nDually, $\\Surj{\\ensuremath{\\left(}\\coker{(\\Id-\\gamma)},A\\ensuremath{\\right)}}\\leftrightarrow\\Fix{(\\gamma)}$.\n\\end{bij}\n\\begin{proof}\nSuppose that $f\\in\\Inj{(A,(R_\\rho)^{2g})}$.\nNote that $f\\in\\Inj{\\ensuremath{\\left(} A,\\ker{(\\Id-\\gamma)}\\ensuremath{\\right)}}$ if and only if $(\\Id-\\gamma)f=0$ if and only if $f=\\gamma f$.\nThe dual proof is similar.\n\\end{proof}\n\n\\begin{moments} \\label{moments}\nLet $x\\in\\ensuremath{{\\mathbb{Z}}}_\\ell$ and suppose that $x\\equiv1\\pmod{\\ell^\\xi}$ but $x\\nequiv1\\pmod{\\ell^{\\xi+1}}$ for some $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$.\nIf $A\\in\\mathcal{G}$, then\n\\[\n\\sum_{B\\in\\mathcal{G}}{\\ensuremath{\\left\\vert}\\Surj{(B,A)}\\ensuremath{\\right\\vert}\\mu_x(B)}\n=\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} A\/\\ell^\\xi\\ensuremath{\\right)}\\ensuremath{\\right\\vert}.\n\\]\n\\end{moments}\n\\begin{proof}\nChoose any $g,\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ such that $g\\geq\\rank{A}$, $\\ell^\\rho\\geq\\exp{A}$, and $\\rho>\\xi$.\nTo begin with, note that\n\\begin{align*}\n\\sum_{B\\in\\mathcal{G}}\n{\\ensuremath{\\left\\vert}\\Surj{\\ensuremath{\\left(} B,A\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}\\nu_{2g,\\rho}^{(x)}(B)}\n&=\\ensuremath{\\left\\vert}\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}^{-1}\n\\cdot\\sum_{B\\in\\mathcal{G}}\n{\\ensuremath{\\left\\vert}\\Surj{\\ensuremath{\\left(} B,A\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}\n\\cdot\\ensuremath{\\left\\vert}\\ensuremath{\\left\\{}\\gamma\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\mid\\coker{(\\Id-\\gamma)}\\simeq B\\ensuremath{\\right\\}}\\ensuremath{\\right\\vert}}\\\\\n&=\\ensuremath{\\left\\vert}\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}^{-1}\n\\cdot\\sum_{\\gamma\\in\\GSp_{2g}^{(x)}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\ensuremath{\\left\\vert}\\Surj{\\ensuremath{\\left(}\\coker{(\\Id-\\gamma),A}\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}.\n\\end{align*}\nNow, thanks to \\hyperref[subcos]{Lemma~\\ref*{subcos}}, we can turn our attention to the following quantity:\n\\[\n\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\setminus\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}^{-1}\n\\cdot\\sum_{\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\setminus\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\ensuremath{\\left\\vert}\\Surj{\\ensuremath{\\left(}\\coker{\\ensuremath{\\left(}\\Id-\\gamma\\ensuremath{\\right)}},A\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}.\n\\]\nUsing the fact that $\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}=\\ell\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}$ and applying \\hyperref[bij]{Lemma~\\ref*{bij}} to $\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}$ acting on $\\Surj{((R_\\rho)^{2g},A)}$, then using Burnside's counting theorem and \\hyperref[Not3]{Notation~\\ref*{Not3}}, we see that\n\\begin{align*}\n&\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\setminus\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}^{-1}\n\\cdot\\sum_{\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\n\\setminus\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\ensuremath{\\left\\vert}\\Surj{\\ensuremath{\\left(}\\coker{\\ensuremath{\\left(}\\Id-\\gamma\\ensuremath{\\right)}},A\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}\\\\\n&\\qquad=\\frac{\\ell}\n{(\\ell-1)\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}\n\\ensuremath{\\left(}\\sum_{\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\ensuremath{\\left\\vert}\\Fix{\\gamma}\\ensuremath{\\right\\vert}}\n-\\sum_{\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\ensuremath{\\left\\vert}\\Fix{\\gamma}\\ensuremath{\\right\\vert}}\\ensuremath{\\right)}\\\\\n&\\qquad=\\frac{\\ell}{(\\ell-1)}\n\\ensuremath{\\left(}\\sum_{\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\frac{\\ensuremath{\\left\\vert}\\Fix{\\gamma}\\ensuremath{\\right\\vert}}{\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}}\n-\\sum_{\\gamma\\in\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}}\n{\\frac{\\ensuremath{\\left\\vert}\\Fix{\\gamma}\\ensuremath{\\right\\vert}}{\\ell\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{\\ensuremath{\\left(} R_\\rho\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}}\\ensuremath{\\right)}\\\\\n&\\qquad=\\frac{\\ell}{(\\ell-1)}\n\\ensuremath{\\left(} o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}-\\frac{1}{\\ell}o^{A,\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g,\\rho}\\ensuremath{\\right)}\\\\\n&\\qquad=\\frac{1}{(\\ell-1)}\n\\ensuremath{\\left(}\\ell o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_\\rho-o^{A,\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_\\rho\\ensuremath{\\right)},\n\\end{align*}\nso we can conclude by applying \\hyperref[subt]{Note~\\ref*{subt}} and \\hyperref[haar]{Lemma~\\ref*{haar}}.\n\\end{proof}\n\n\\section{A weighted M\\\"{o}bius function} \\label{AWMF}\n\n\\subsection{First observations}\n\nLet $\\mathcal{P}$ be a locally finite poset.\nThe \\emph{M\\\"{o}bius function} on $\\mathcal{P}$, denoted by $\\mu_\\mathcal{P}$, is defined by the following criteria: for any $x,z\\in\\mathcal{P}$,\n\\begin{align*}\n\\hspace{73px}&\\mu_\\mathcal{P}\\ensuremath{\\left(} x,z\\ensuremath{\\right)}&&\\hspace{-83px}=0&&\n\\hspace{-73px}\\text{ if }x\\nleq z,\\\\\n\\hspace{73px}&\\mu_\\mathcal{P}\\ensuremath{\\left(} x,z\\ensuremath{\\right)}&&\\hspace{-83px}=1&&\n\\hspace{-73px}\\text{ if }x=z,\\\\\n\\hspace{73px}\\sum_{x\\leq y\\leq z}\n&{\\mu_\\mathcal{P}\\ensuremath{\\left(} x,y\\ensuremath{\\right)}}&&\\hspace{-83px}=0&&\n\\hspace{-73px}\\text{ if }xA\\ensuremath{\\right\\}}$.\nNow, given an $A$-chain $\\mathfrak{C}=\\ensuremath{\\left\\{} A_j\\ensuremath{\\right\\}}_{j=1}^i$, with $A_j0}$, and $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, with $\\rho\\geq\\xi$ and $\\ell^\\rho\\geq\\exp{A}$.\nThen\n\\[\no^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}\n=\\sum_{\\substack{B\\in\\mathcal{G}\\\\B\\leq(R_\\rho)^{2g}}}\n{N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(B)\\ensuremath{\\left\\vert}\\Inj{(A,B)}\\ensuremath{\\right\\vert}}.\n\\]\n\\end{burn}\n\\begin{proof}\nApplying \\hyperref[bij]{Lemma~\\ref*{bij}} and Burnside's counting theorem, we see that\n\\[\no^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}\n=\\sum_{\\gamma\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}}{\\ensuremath{\\left\\vert}\\Fix{(\\gamma)}\\ensuremath{\\right\\vert}}\n=\\sum_{\\gamma\\in\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}}\n{\\ensuremath{\\left\\vert}\\Inj{\\ensuremath{\\left(} A,\\ker{(\\Id-\\gamma)}\\ensuremath{\\right)}}\\ensuremath{\\right\\vert}}\n=\\sum_{\\substack{B\\in\\mathcal{G}\\\\B\\leq(R_\\rho)^{2g}}}{N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(B)\\ensuremath{\\left\\vert}\\Inj{(A,B)}\\ensuremath{\\right\\vert}},\n\\]\nwhere the last step follows from \\hyperref[dual2]{Lemma~\\ref*{dual2}}.\n\\end{proof}\n\nFor $A,g,\\rho,\\xi$ as above, \\hyperref[burn]{Lemma~\\ref*{burn}} gives us an ``upper triangular\" system of equations, which we will solve for $N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(A)$.\n(The quotes indicate that the system is indexed by the poset $\\mathcal{P}_{(r_\\rho)^{2g}}$.)\n\\hyperref[deter]{Proposition~\\ref{deter}} is the first step along this path.\n\n\\begin{deter} \\label{deter}\nSuppose $A,g,\\rho,\\xi$ are as above.\nThen\n\\[\n\\frac{N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(A)}{\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}}\n=\\sum_{\\substack{B\\in\\mathcal{G}\\\\B\\leq(R_\\rho)^{2g}}}\n{o^{B,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\\cdot \\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}.\n\\]\n\\end{deter}\n\\begin{proof}\nWe use strong induction on $\\ensuremath{\\left\\vert}(R_\\rho)^{2g}\\ensuremath{\\right\\vert}\/\\ensuremath{\\left\\vert} A\\ensuremath{\\right\\vert}$.\nIn light of \\hyperref[burn]{Lemma~\\ref*{burn}}, the base case $A=(R_\\rho)^{2g}$ is trivial.\nNow suppose the result is true for all $B\\in\\mathcal{G}$ with $B\\leq(R_\\rho)^{2g}$ and $\\ensuremath{\\left\\vert}(R_\\rho)^{2g}\\ensuremath{\\right\\vert}\/\\ensuremath{\\left\\vert} B\\ensuremath{\\right\\vert}<\\ensuremath{\\left\\vert}(R_\\rho)^{2g}\\ensuremath{\\right\\vert}\/\\ensuremath{\\left\\vert} A\\ensuremath{\\right\\vert}$.\nUsing \\hyperref[burn]{Lemma~\\ref*{burn}}, we see that\n\\begin{align*}\n\\frac{N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(A)}{\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}}\n&=\\frac{1}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}\\cdot\\ensuremath{\\left(} o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n-\\frac{1}{\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}}\n\\cdot\\sum_{\\substack{B\\in\\mathcal{G}\\\\B\\leq(R_\\rho)^{2g}\\\\B\\neq A}}\n{N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(B)\\ensuremath{\\left\\vert}\\Inj{(A,B)}\\ensuremath{\\right\\vert}}\\ensuremath{\\right)}\\\\\n&=\\frac{o^{A,\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}\n-\\sum_{\\substack{B\\in\\mathcal{G}\\\\B\\leq(R_\\rho)^{2g}\\\\B\\neq A}}\n{\\frac{N^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}(B)}{\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}}\\cdot\\sub{(A,B)}},\n\\end{align*}\nso the result follows by the induction hypothesis.\n\\end{proof}\n\n\\subsection{Vanishing of the M\\\"{o}bius function}\n\nBefore proceeding, we need a bit more notation, and a result from~\\cite{GMob}.\n\n\\begin{Not23} \\label{Not23}\nFor any $A\\in\\mathcal{G}$ and any $i\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, let\n\\[\nA_{\\oplus i}\n:=A\\oplus\\overbrace{\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}\/\\ell\\ensuremath{\\right)}\\oplus\\cdots\\oplus\\ensuremath{\\left(}\\ensuremath{{\\mathbb{Z}}}\/\\ell\\ensuremath{\\right)}}^{i\\text{ times}}.\n\\]\n\\end{Not23}\n\nIn 1934, Hall~\\cite{Hall2} proved that if $G$ is an $\\ell$-group of order $\\ell^n$, then $\\mu_G(1,G)=0$ unless $G$ is elementary abelian, in which case $\\mu_G(1,G)=(-1)^n\\ell^{\\binom{n}{2}}$.\nThe paper~\\cite{GMob} proves an analogous property of the function $S$:\n\n\\begin{finalm}[\\cite{GMob}] \\label{finalm}\nIf $A,B\\in\\mathcal{G}$, then $S(A,B)=0$ unless there exists an injection $\\iota:A\\hookrightarrow B$ with $\\coker{(\\iota)}$ elementary abelian.\n\\end{finalm}\n\\noindent \\hyperref[finalm]{Theorem~\\ref*{finalm}} has the following corollary:\n\n\\begin{infi} \\label{infi}\nSuppose $A,g,\\rho,\\xi$ are as above, and let $r=\\rank{A}$.\nIf in addition we know $\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ and $\\rho$ satisfies $\\rho>\\xi$ and $\\ell^\\rho>\\exp{A}$, then\n\\[\n\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)\n=\\sum_{B\\in\\mathcal{G}(r)}\n{S(A,B)\\cdot\\sum_{i=0}^{2g-r}\n{\\frac{\\ell o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n-o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g,\\rho}}\n{\\ell-1}\n\\cdot \\frac{S(B,B_{\\oplus i})}{\\ensuremath{\\left\\vert}\\Aut{B_{\\oplus i}}\\ensuremath{\\right\\vert}}}}.\n\\]\n\\end{infi}\n\\begin{proof}\nUsing the fact that $\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}=\\ell\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}$ along with \\hyperref[deter]{Proposition~\\ref*{deter}} and \\hyperref[finalm]{Theorem~\\ref*{finalm}}, we see that\n\\begin{align*}\n\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)\n&=\\frac{N_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)\n-N_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}(A)}\n{\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}\n-\\ensuremath{\\left\\vert}\\GSp^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g}{(R_\\rho)}\\ensuremath{\\right\\vert}}\\\\\n&=\\frac{\\ell N_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)}\n{(\\ell-1)\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}}\n-\\frac{N_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}(A)}\n{(\\ell-1)\\ensuremath{\\left\\vert}\\GSp_{2g}^{\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}{(R_\\rho)}\\ensuremath{\\right\\vert}}\\\\\n&=\\sum_{B\\in\\mathcal{G}(r)}\n{S(A,B)\\cdot\\sum_{i=0}^{2g-r}\n{\\frac{\\ell o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n-o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g,\\rho}}\n{\\ell-1}\n\\cdot\\frac{S(B,B_{\\oplus i})}{\\ensuremath{\\left\\vert}\\Aut{B_{\\oplus i}}\\ensuremath{\\right\\vert}}}}.\n\\end{align*}\n\\end{proof}\n\n\\begin{nutime} \\label{nutime}\nSuppose $A,g,\\rho,\\xi,r$ are as in \\hyperref[infi]{Corollary~\\ref*{infi}}, and suppose that $g\\geq r$.\nThen for any $B\\in\\mathcal{G}(r)$ and $i\\in\\lb0\\ldots,g-r\\ensuremath{\\right\\}}$, we know by \\hyperref[subt]{Note~\\ref*{subt}} and \\hyperref[forms]{Lemma~\\ref*{forms}} that\n\\[\n\\frac{\\ell o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n-o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g,\\rho}}\n{\\ell-1}\n=\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B_{\\oplus i}\/\\ell^\\xi\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\n=\\ell^{ir+\\frac{i(i-1)}{2}}\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\/\\ell^\\xi B\\ensuremath{\\right)}\\ensuremath{\\right\\vert},\n\\]\nand for any $i\\in\\ensuremath{\\left\\{} g-r+1\\ldots,2g-r\\ensuremath{\\right\\}}$, we can use the proof of \\hyperref[orb]{Lemma~\\ref*{orb}} to note that\n\\[\n\\frac{\\ell o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n-o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g,\\rho}}\n{\\ell-1}\n\\leq\\ell o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n\\leq\\ell\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B_{\\oplus i}\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\n=\\ell^{ir+\\frac{i(i-1)}{2}+1}\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\\ensuremath{\\right)}\\ensuremath{\\right\\vert}.\n\\]\nThus, if\n\\[\n\\sum_{i=0}^\\infty\n{\\ell^{ir+\\frac{i(i-1)}{2}}\\frac{S(B,B_{\\oplus i})}{\\ensuremath{\\left\\vert}\\Aut{B_{\\oplus i}}\\ensuremath{\\right\\vert}}}\n\\]\nconverges absolutely (and it does, see \\hyperref[product]{Lemma~\\ref*{product}}, \\hyperref[converge]{Lemma~\\ref*{converge}}, and \\hyperref[final]{Theorem~\\ref*{final}}), then so does \n\\[\n\\sum_{i=0}^\\infty\n{\\frac{\\ell o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}_{2g,\\rho}\n-o^{B_{\\oplus i},\\ensuremath{\\left\\langle}\\xi+1\\ensuremath{\\right\\rangle}}_{2g,\\rho}}\n{\\ell-1}\n\\cdot \\frac{S(B,B_{\\oplus i})}{\\ensuremath{\\left\\vert}\\Aut{B_{\\oplus i}}\\ensuremath{\\right\\vert}}},\n\\]\nand\n\\[\n\\lim_{g\\to\\infty}\n{\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)}\n=\\sum_{B\\in\\mathcal{G}(r)}\n{S(A,B)\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\/\\ell^\\xi B\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\\cdot\\sum_{i=0}^\\infty\n{\\ell^{ir+\\frac{i(i-1)}{2}}\\frac{S(B,B_{\\oplus i})}{\\ensuremath{\\left\\vert}\\Aut{B_{\\oplus i}}\\ensuremath{\\right\\vert}}}}.\n\\]\nAnalyzing the inner series is the subject of the next section.\n(Note that the above limit does not depend on $\\rho$, once $\\rho$ is large enough; this is consistent with \\hyperref[haar]{Lemma~\\ref*{haar}}.)\n\\end{nutime}\n\n\\section{$q$-series and convergence} \\label{QSAC}\n\n\\subsection{$q$-series} \\label{QS}\n\nBefore continuing, we make a small foray into some $q$-series notations and calculations.\n\n\\begin{Not6} \\label{Not6}\nFor $z,q\\in\\ensuremath{{\\mathbb{C}}}$ with $\\ensuremath{\\left\\vert} q\\ensuremath{\\right\\vert}<1$ and $i\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, let\n\\[\n\\ensuremath{\\left(} z;q\\ensuremath{\\right)}_i:=\\prod_{j=0}^{i-1}{\\lp1-q^jz\\ensuremath{\\right)}}.\n\\]\nTo ease notation, set $(q)_i:=(q;q)_i$.\nRecall the definition of the $q$-binomial coefficients: for any $k,m\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, let\n\\[\n\\binom{k}{m}_q:=\\frac{(q)_k}{(q)_m(q)_{k-m}},\n\\]\nwith $\\binom{k}{m}_q:=0$ if $k\\max{S}$.\nIf $S\\cup\\{0\\}=\\{s_0,\\ldots,s_j\\}$, where $0=s_01$, let\n\\[\nt_i=\\sum_{S\\subseteq\\{1,\\ldots i-1\\}}{r^i_S}.\n\\]\n\\end{Not6}\n\n\\begin{product} \\label{product}\n\\[\n\\sum_{i=0}^{\\infty}{t_i}=\\prod_{i=1}^{\\infty}{\\lp1+\\ell^{-i}\\ensuremath{\\right)}^{-1}}.\n\\]\n\\end{product}\n\\begin{proof}\nLet $R=r_1+r_2+\\cdots$ and, to get into the spirit of a $q$-series calculation, let $q=\\ell^{-1}$.\nUsing a product formula of Euler (see~\\cite{And}, p~19), we note that\n\\[\nR\n=-\\sum_{i=1}^{\\infty}{\\frac{q^{\\frac{i(i+1)}{2}}}{(1-q^i)\\cdots(1-q)}}\n=-\\sum_{i=1}^{\\infty}{\\frac{q^iq^{\\frac{i(i-1)}{2}}}{(1-q^i)\\cdots(1-q)}}\n=1-\\prod_{i=1}^{\\infty}{(1+q^i)}.\n\\]\nNow, by the definition of $t_i$ (and by using \\hyperref[converge]{Lemma~\\ref*{converge}} to rearrange the terms of the sum), we know\n\\[\n\\sum_{i=0}^{\\infty}{t_i}\n=1+R+R^2+R^3+\\cdots\n=\\frac{1}{1-R}\n=\\prod_{i=1}^{\\infty}{\\lp1+\\ell^{-i}\\ensuremath{\\right)}^{-1}},\n\\]\nas desired.\n\\end{proof}\n\nNext, we justify the reordering of the summands in \\hyperref[product]{Lemma~\\ref*{product}}:\n\n\\begin{converge} \\label{converge}\nFor any finite set of nonnegative integers $S$ and $i\\in\\ensuremath{{\\mathbb{Z}}}$ satisfying $i>\\max{S}$, let $\\rho^i_S:=\\ensuremath{\\left\\vert} r^i_S\\ensuremath{\\right\\vert}$.\nNext, let $\\tau_0=1$, let $\\tau_1=\\rho^1_{\\varnothing}$, and for any $i>1$, let\n\\[\n\\tau_i:=\\sum_{S\\subseteq\\{1,\\ldots i-1\\}}{\\rho^i_S}.\n\\]\nThen $\\sum_{i=0}^{\\infty}{\\tau_i}$ converges.\n\\end{converge}\n\\begin{proof}\nFor fun, we will give two proofs: a simple proof that holds for any $\\ell>3$, and a more complicated one that holds for $\\ell\\geq3$.\nNote that the sum clearly diverges for $\\ell=2$ since it includes infinitely many 1's.\n\nFor the simple proof, note that for any finite set $S$ of nonnegative integers and any $i>\\max{S}$, we know $\\rho^i_S\\leq(\\ell-1)^{-i}$.\nIt follows that for any $i\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, we have that $\\tau_i\\leq2^{i-1}(\\ell-1)^{-i}$, so $\\sum_{i=0}^{\\infty}{\\tau_i}$ converges for $\\ell>3$.\n\nOf course, the above argument fails for $\\ell=3$.\nIn this case, for a finite set $S$ of nonnegative integers and an $i>\\max{S}$, we must use a (slightly) better bound than $\\rho^i_S\\leq(\\ell-1)^{-i}$.\nLet $\\lambda=(\\ell-1)^{-1}$.\nSince $(\\ell^m-1)^{-1}\\leq(\\ell-1)^{-m}$ for any $m\\in\\ensuremath{{\\mathbb{Z}}}^{\\geq0}$, if we let $S\\cup\\{0\\}=\\{s_0,\\ldots,s_j\\}$, where $0=s_0\\frac{1}{2}+\\ensuremath{\\left(}\\frac{1}{2}\\ensuremath{\\right)}^3+\\ensuremath{\\left(}\\frac{1}{2}\\ensuremath{\\right)}^6+\\ensuremath{\\left(}\\frac{1}{2}\\ensuremath{\\right)}^{10}+\\cdots,\n\\]\nso the lemma is true.\n\\end{proof}\n\nWe can now finish proving the result mentioned in \\hyperref[nutime]{Note~\\ref*{nutime}}.\n\n\\begin{final} \\label{final}\nSuppose $A\\in\\mathcal{G}$, $\\rho,\\xi\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$, and let $r=\\rank{A}$.\nIf $\\rho>\\xi$ and $\\ell^\\rho>\\exp{A}$, then\n\\[\n\\lim_{g\\to\\infty}\n{\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A)}\n=\\prod_{i=1}^{\\infty}{\\lp1+\\ell^{-i}\\ensuremath{\\right)}^{-1}}\\cdot\\sum_{B\\in\\mathcal{G}(r)}\n{\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\/\\ell^\\xi B\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\\cdot\\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}.\n\\]\n\\end{final}\n\\begin{proof}\nLet $B\\in\\mathcal{G}(r,s)$, let $S$ be a finite set of nonnegative integers, and let $i$ a positive integer with $i>\\max{S}$.\nSuppose $S\\cup\\lb0\\ensuremath{\\right\\}}=\\ensuremath{\\left\\{} s_0,\\ldots,s_j\\ensuremath{\\right\\}}$, where $0=s_0<\\cdots0}$ with $x\\equiv1\\pmod{\\ell^\\xi}$ but $x\\nequiv1\\pmod{\\ell^{\\xi+1}}$.\nIf $A\\in\\mathcal{G}(r,s)$, then\n\\[\n\\lim_{g\\to\\infty}\n{\\mu_{2g}^{(x)}(A)}\n=\\begin{cases}\n\\ell^{\\frac{r(r-1)}{2}}\\cdot\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_r\n\\cdot\\frac{\\prod_{i=1}^{\\infty}{(1+\\ell^{-i})^{-1}}}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}},\n&\\text{if }\\xi=1\\\\\n\\ell^{\\frac{r(r-1)}{2}+\\frac{s(s-1)}{2}}\n\\cdot\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_s\\ensuremath{\\left(}\\ell^{-1};\\ell^{-2}\\ensuremath{\\right)}_{\\lceil \\frac{r-s}{2}\\rceil}\n\\cdot\\frac{\\prod_{i=1}^{\\infty}{(1+\\ell^{-i})^{-1}}}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}},\n&\\text{if }\\xi=2.\n\\end{cases}\n\\]\n\\end{finalc}\n\\begin{proof}\nChoose any $\\rho\\in\\ensuremath{{\\mathbb{Z}}}^{>0}$ with $\\rho>\\xi$ and $\\ell^\\rho>\\exp{A}$.\nThen by \\hyperref[haar]{Lemma~\\ref*{haar}} we know\n\\[\n\\mu_{2g}^{(x)}(A)=\\nu_{2g,\\rho}^{\\ensuremath{\\left\\langle}\\xi\\ensuremath{\\right\\rangle}}(A).\n\\]\nNow, we know from~\\cite{GAb} that\n\\[\n\\sum_{B\\in\\mathcal{G}(r)}\n{\\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}\n=\\frac{\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_r}{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}},\n\\]\nand for any $i\\in\\ensuremath{\\left\\{} s,\\ldots,r\\ensuremath{\\right\\}}$:\n\\[\n\\sum_{B\\in\\mathcal{G}(r,i)}\n{\\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}\n=(-1)^{i-s}\\cdot\\ell^{\\frac{s(s+1)}{2}-\\frac{i(i+1)}{2}}\\cdot\n\\binom{r-s}{r-i}_{\\ell^{-1}}\n\\cdot\\frac{\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_s}\n{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}.\n\\]\nThe $\\xi=1$ case follows from \\hyperref[forms]{Note~\\ref*{forms}}.\nFor $\\xi=2$, use \\hyperref[forms]{Note~\\ref*{forms}} again to see that\n\\begin{align*}\n\\sum_{B\\in\\mathcal{G}(r)}\n{\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\/\\ell^2B\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\n\\cdot\\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}\n&=\\sum_{i=s}^r\n{\\sum_{B\\in\\mathcal{G}(r,i)}\n{\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\/\\ell^2B\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\n\\cdot\\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}}\\\\\n&=\\sum_{i=s}^r\n{(-1)^{i-s}\\cdot\\ell^{\\frac{r(r-1)}{2}+\\frac{s(s+1)}{2}-i}\n\\cdot\\binom{r-s}{r-i}_{\\ell^{-1}}\n\\cdot\\frac{\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_s}\n{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}}\\\\\n&=\\frac{\\ell^{\\frac{r(r-1)}{2}+\\frac{s(s+1)}{2}}\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_s}\n{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}\n\\cdot\\sum_{i=s}^r\n{(-1)^{i-s}\\cdot\\binom{r-s}{r-i}_{\\ell^{-1}}\\cdot\\ell^{-i}}.\n\\end{align*}\nLetting $k=r-s$ and $q=1\/\\ell$, we apply formula (1.10) from~\\cite{Kup}, which is a corollary of formula (1.12), to obtain\n\\begin{align*}\n\\sum_{B\\in\\mathcal{G}(r)}\n{\\ensuremath{\\left\\vert}\\Lambda\\ensuremath{\\left(} B\/\\ell^2B\\ensuremath{\\right)}\\ensuremath{\\right\\vert}\\cdot\\frac{S(A,B)}{\\ensuremath{\\left\\vert}\\Aut{B}\\ensuremath{\\right\\vert}}}\n&=\\frac{\\ell^{\\frac{r(r-1)}{2}+\\frac{s(s-1)}{2}}\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_s}\n{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}\n\\cdot\\sum_{i=0}^k{(-1)^i\\binom{k}{i}_qq^i}\\\\\n&=\\frac{\\ell^{\\frac{r(r-1)}{2}+\\frac{s(s-1)}{2}}\\ensuremath{\\left(}\\ell^{-1}\\ensuremath{\\right)}_s}\n{\\ensuremath{\\left\\vert}\\Aut{A}\\ensuremath{\\right\\vert}}\n\\cdot\\ensuremath{\\left(} q;q^2\\ensuremath{\\right)}_{\\lceil \\frac{k}{2}\\rceil},\n\\end{align*}\nas desired.\n\\end{proof}\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}