\section{Introduction}\label{section:introduction}

Subgroup counting in finitely generated groups was initiated in~\cite{GrSeSm88}. The philosophy is to encode information about the lattice of subgroups of a given group $\Gamma$ in an analytic function (the zeta function of $\Gamma$), with the hope that features of the latter will shed light on the structure of the original group. The process is especially fruitful when $\Gamma$ is also torsion-free and nilpotent. In this case, rationality results are available as well as a local to global principle~\cite{GrSeSm88}. Indeed, this enables (in some cases) the rate of growth of the subgroups to be inferred from analytic properties of the zeta function \cite{dSGr00}. There are three variants of the zeta function which are of special interest. One defines Dirichlet generating functions
\begin{equation*}
  \zeta_\Gamma^\leq(s)  = \sum_{n=1}^\infty
  \frac{a_n^\leq(\Gamma)}{n^s}, \quad \zeta_\Gamma^\trianglelefteq(s) =
  \sum_{n=1}^\infty
  \frac{a_n^\trianglelefteq(\Gamma)}{n^s},\quad
\zeta_\Gamma^\wedge(s) =
  \sum_{n=1}^\infty \frac{a_n^\wedge(\Gamma)}{n^s},
\end{equation*}
where $a_n^\leq(\Gamma)$, $a_n^\trianglelefteq(\Gamma)$ and $a_n^\wedge(\Gamma)$ denote the number
of subgroups $\Delta$ of index $n$ in $\Gamma$ satisfying $\Delta \leq
\Gamma$, $\Delta \trianglelefteq \Gamma$ and
$\widehat{\Delta} \cong \widehat{\Gamma}$ respectively.  Here
$\widehat{H}$ denotes the profinite completion of a group~$H$.  These
Dirichlet series are commonly referred to as the
\emph{subgroup zeta function}, the \emph{normal zeta function} and the \emph{pro-isomorphic zeta
  function}.

Since $\Gamma$ is nilpotent, Euler product decompositions \cite{GrSeSm88} are readily obtained:
\begin{equation*} \zeta_\Gamma^\leq(s) =
  \prod_p \zeta_{\Gamma,p}^\leq(s), \quad
  \zeta_\Gamma^\trianglelefteq(s) = \prod_p
  \zeta_{\Gamma,p}^\trianglelefteq(s), \quad \zeta_\Gamma^\wedge(s) =
  \prod_p \zeta_{\Gamma,p}^\wedge(s),
\end{equation*}
where each product extends over all rational primes $p$ and
\begin{equation} \label{equ:local-factor} \zeta_{\Gamma,p}^*(s) =
  \sum_{k=0}^\infty a_{p^k}^*(\Gamma) p^{-ks}, \qquad \text{for $*$
    one of $\leq$, $\trianglelefteq$, $\wedge$},
\end{equation}
is the \emph{local zeta function} at a prime~$p$. A further advantage of working with nilpotent, torsion free groups is that each of the local factors defined
in~\eqref{equ:local-factor} is in fact a rational function over $\mathbb{Q}$
in $p^{-s}$ ~\cite{GrSeSm88}. One can also define a zeta function counting all subgroups which are isomorphic to the original group, but this unfortunately does not necessarily render an Euler product decomposition.

A further phenomenon, related to the arithmetic of subgroup growth, emerged from a study of many examples for which the local zeta functions displayed a striking property:
\[
\zeta_{\Gamma,p}^*(s) \vert_{p \rightarrow p^{-1}} = (-1)^a p^{b-cs}
\zeta_{\Gamma,p}^*(s) \qquad \text{for almost all $p$},
\]
where $a,b,c$ are certain integer parameters depending on $\Gamma$ and $*$ one of $\leq$, $\trianglelefteq$, $\wedge$.

This ``functional equation'' in fact does not hold in general. However, Voll defined a more refined version of local functional equations. He used the fact, established by du Sautoy and Grunewald \cite{dSGr00}, that the local zeta functions counting all subgroups or counting normal subgroups could be expressed as rational functions in $p^{-s}$ whose coefficients involve the numbers $b_V(p)$ of $\mathbb{F}_p$-rational points of certain smooth projective
varieties~$V$.  The number $b_V(p^{-1})$ is obtained by writing
$b_V(p)$ as an alternating sum of Frobenius eigenvalues and
subsequently inverting these eigenvalues. Interpreting the inversion of $p$ in this way, Voll was able to prove that for subgroup counting in general, and normal subgroup counting in class two, the local zeta functions generically satisfy functional equations. His proof involves an array of techniques including enumeration of lattices over homothety classes, principalization of ideals and reciprocity for generating functions over polyhedral cones~\cite{Vo10} in the spirit of work of Stanley.

On the other hand, Woodward showed that local normal zeta functions of nilpotent groups of class $3$ do not in general satisfy functional equations; see ~\cite[Section~2.11]{dSWo08} for concrete examples and \cite[Section~4.4 and Corollary~4.63]{dSWo08} for a conjectural
explanation. The coefficients $b_V(p)$ can fluctuate wildly with the prime - see for instance \cite{dS01} - to the extent that the local zeta functions are non-uniform; that is, they cannot be described by a finite collection of rational functions in $p$ and $p^{-s}$.

Functional equations (of the first `ordinary' type) are extremely common amongst the local pro-isomorphic zeta functions of groups that have been successfully calculated \cite{GrSeSm88, dSLu96, Be05}. These calculations all depend on a well-established methodology, as follows: To each finitely generated torsion-free nilpotent group $\Gamma$, there corresponds a Lie ring $L$ defined over $\mathbb{Z}$ such that for almost all primes, the local pro-isomorphic zeta function of $\Gamma$ is equal to the zeta function enumerating those $p$-power index Lie subrings of $L_p:=\mathbb{Z}_p\otimes_{\mathbb{Z}} L$ which are isomorphic to $L_p$ (via an full rank endomorphism of $L_p$) \cite{GrSeSm88}. It follows easily that the local pro-isomorphic zeta function of $\Gamma$ is equal to an integral $\int_{G^+_p} \lvert \mathrm{det} g \rvert_p^s \, d\mu_p(g)$ where $G_p$ is the group of $\mathbb{Q}_p$-points of the algebraic automorphism group of $\mathbb{Q}_p\otimes_{\mathbb{Z}} L$, $G_p^+$ consists of those elements $g$ of $G_p$ for which $L_pg\subseteq L_p$ and the Haar measure $\mu_p$ is normalized on $G_p(\mathbb{Z}_p)=\{g\in G_p\ |\ L_pg=L_p\}$.

Integrals of this type have an independent history, and have been studied, amongst others, by Hey ~\cite{He29}, Weil ~\cite{We61}, Satake \cite{Sa63}, Tamagawa \cite{Ta63} and Macdonald \cite{Ma79}. In particular, classical groups of various types were studied. Of particular relevance to the current paper is work of Igusa~\cite{Ig89}, in which he considered an arbitrary irreducible reductive group and analyzed the integral using the notion of a $p$-adic Bruhat decomposition due to Iwahori and Matsumoto~\cite{IwMa65}. Assuming that this group splits over the local field defining the integral, he was able to show that the local zeta functions satisfy functional equations by utilizing symmetries in the associated Weyl group. 

Igusa's work was extended by du Sautoy and Lubotzky \cite{dSLu96} who considered an arbitrary non-reductive group. They were able to reduce the integral to an integral over a reductive subgroup; this involved introducing a contribution $\theta(h)$ to the integrand (described in detail in Section~\ref{section:background} below) coming from an action of the reductive part on the unipotent radical. By assuming that the function $\theta$ is a character on the reductive subgroup, and under certain assumptions on the reductive subgroup, they were still able to show the existence of local functional equations. Their work was extended by the first author in \cite{Be11} where the condition on $\theta$ was weakened, and a larger class of reductive groups was considered. However, examples were provided in \cite{Be11} of integrals over algebraic groups not satisfying functional equations. One such example was used by the second and third authors in \cite{BeKl15} to construct a class four nilpotent group whose local pro-isomorphic zeta functions do not satisfy functional equations. Thus the situation for pro-isomorphic zeta functions is somewhat similar to that of normal subgroup zeta functions: in both cases, the phenomenon of local functional equations is restricted. It remains an interesting problem to try to characterize those groups whose local pro-isomorphic zeta functions satisfy functional equations. 

The motivation for the current paper is isolate examples of finitely generated nilpotent groups which lead to a function $\theta$ that does not fit into the ambit of the state-of-the-art theory - that is, for which $\theta$ is not a piecewise character on the maximal torus of the reductive part of the automorphism group. The hope is that by studying such examples, we will begin to develop a general picture of the effect of $\theta$ on the general theory of pro-isomorphic zeta functions of groups. In the course of studying representatives of the $\mathcal{D}^*$-groups classified by Grunewald and Segal we stumbled across, quite by accident, a group whose pro-isomorphic zeta function displays precisely this type of behaviour\footnote{In fact, the group of upper-unitriangular $5\times 5$ matrices over $\mathbb{Z}$ also seems to fit into this mould, as noted by the first author in \cite{Be05}, but its pro-isomorphic zeta function has not yet been fully studied.}. 

In \cite{GrSe84}, Grunewald and Segal considered $\mathcal{D}^*$-groups which they define as torsion free radicable nilpotent groups of class $2$ and of finite rank with centres of rank $2$. They classified the indecomposable constituents of such groups according to two infinite families of class two nilpotent groups of rank-two centre. Each $\mathcal{D}^*$ group represents a commensurability class of finitely generated torsion-free nilpotent groups; from hereon we refer to the latter as `$D^*$-groups'. In the current paper we consider `indecomposable' $D^*$ groups of even Hirsch length, whose members are given by the following presentations:

\begin{definition}\label{def:D star groups}

 The indecomposable $D^*$-groups of even Hirsch length $2m+2$ with centre generated by $e, f$ are represented by a matrix of commutator relations of the form 
 $$\left(\begin{array}{cc}
 0&\mathbf{B}\\-\mathbf{B}^\text{t}&0
  \end{array}\right),$$
  where 
  $$\mathbf{B}=\left(\begin{array}{cccccc}
  e&f&0&&\cdots&0\\
  0&e&f&0&\cdots&0\\
  \vdots  & & & &\ddots&\\
   0 & \cdots& & 0 &     e & f\\
   a_m f & a_{m-1}f&\cdots & &    a_2f & e+a_1f
  \end{array}\right),$$
  and $x^m-a_1x^{m-1}-\cdots-a_{m-1}x-a_m$ is a primary polynomial, i.e. a power of an irreducible polynomial over $\mathbb{Q}$.
\end{definition}

In Section~\ref{section:structure-of-Aut} we compute the automorphism groups of the Lie algebra of $D^*$-groups associated to the primary polynomials $f(x)=x^m$. We then are able to prove the following two theorems.


\begin{theorem}
Let $\Gamma=D^*_{x^2}$ be the Hirsch length $6$ indecomposable $D^*$-group with associated primary polynomial $x^2$. Then for all primes $p$

$$
\zeta^{\wedge}_{\Gamma_p}(s)
=\frac{1+p^{10-4s}}{(1-p^{8-3s})(1-p^{11-4s})(1-p^{12-5s})}.
$$

In particular, $\zeta^{\wedge}_{\Gamma_p}(s)$ satisfies a functional equation. 

\end{theorem}

\begin{theorem}
Let $\Gamma=D^*_{x^3}$ be the Hirsch length $6$ indecomposable $D^*$-group with associated primary polynomial $x^3$. Then, for all primes $p>2$, 


$$\zeta^{\wedge}_{\Gamma_p}(s)=\frac{(1-p^{29-10s})(-p^{104-36s}-p^{90-31s}-p^{75-26s}-p^{59-21s}+p^{45-15s}+p^{29-10s}+p^{14-5s}+1)}{(1-p^{15-5s})(1-p^{29-9s})(1-p^{30-11s})(1-p^{30-10s})(1-p^{61-21s})}.$$

In particular, $\zeta^{\wedge}_{\Gamma_p}(s)$ satisfies a functional equation. 

\end{theorem}

This last theorem is of particular interest. We will see later that the automorphism group of the graded Lie ring associated to $\Gamma=D^*_{x^3}$ does not satisfy a certain lifting condition that is known to play an important role in the reduction of an integral over an algebraic group to an integral over a reductive subgroup (see \cite[Assumption 2.3]{dSLu96} and \cite[Condition 3.5]{Be11}). Furthermore, the function $\theta$ defined in \cite[Eq. (1.3)]{Be11} is not a piecewise character in the sense of \cite[Lemma 3.12]{Be11} and there is no hope of directly applying any known theoretical results to confirm the functional equation by a method other than direct computation. Curiously, $\theta$ is related to counting solutions in $\mathbb{Z}/p^t\mathbb{Z}$ of the equations of the form $p^ax^2+p^byz=0$ ($a, b\in\mathbb{N}$). To the best of our knowledge, the need to count points on varieties reduced modulo $p$ is a new feature in the theory of pro-isomorphic zeta functions of groups. Inspired by this example, our grand hope is to eventually produce a theory in the spirit of Voll's work - where local pro-isomorphic zeta functions will be expressible as sums of rational functions in $p^{-s}$ weighted by functions counting points on the reductions of smooth projective varieties modulo $p$, and such that functional equations in quite general settings can be proved using the Weil conjectures.

\subsection{Layout of the paper}

In Section~\ref{section:background} we provide some technical background regarding conditions on the algebraic automorphism group of a Lie ring needed for calculating pro-isomorphic zeta functions of groups; in particular, we describe a certain `lifting condition' which plays a central role in the current paper. In Section~\ref{section:structure-of-Aut} we analyze and describe algebraic automorphism groups associated to graded Lie rings of indecomposable $D^*$-groups of even Hirsch length. In Sections~\ref{section:x^2} and \ref{section:x^3} we present calculations of the local pro-isomorphic zeta functions of the groups $D^*_{x^2}$ and $D^*_{x^3}$.

\begin{ackno}
The first author would like to thank the University of Cape Town and Ort Braude College for travel grants.
\end{ackno}



\section{Machinery for computing integrals over algebraic groups} \label{section:background}

\subsection{Local pro-isomorphic zeta functions as integrals over reductive groups}\label{section:reduction-integral}

As remarked in \cite{GrSeSm88}, one can associate to any finitely generated torsion-free class two nilpotent group the naturally associated graded class two nilpotent Lie ring and then the local pro-isomorphic zeta functions of the two objects are equal for all primes $p$.

We now cite various facts and notation that we will need in order to use the technology developed in \cite{Ig89, dSLu96, Be11}. This appears in similar form in \cite{BeKl15} but we repeat it here to keep the current exposition reasonably self-contained and because it is essential to understanding one of the key points of the current paper.

We first recall the notion of the \emph{algebraic automorphism group}
$\mathbf{Aut}(\Lambda)$ of a $\mathbb{Z}$-Lie lattice~$\Lambda$.  This is realised via a $\mathbb{Z}$-basis of $\Lambda$ as a
$\mathbb{Q}$-algebraic subgroup $\mathbf{G}$ of $\text{GL}_d$, where $d$ is the
$\mathbb{Z}$-rank of $\Lambda$, so that
\[
\mathbf{G}(k) = \Aut_k(k \otimes_\mathbb{Z} L) \leq \text{GL}_{d}(k)
\]
for every extension field $k$ of $\mathbb{Q}$.  It admits a natural arithmetic
structure so that
\[
\mathbf{G}(\mathbb{Z}) = \Aut(\Lambda) \quad \text{and} \quad \mathbf{G}(\mathbb{Z}_p)
= \Aut(\mathbb{Z}_p \otimes_\mathbb{Z} \Lambda) \text{ for each prime $p$.}
\]
We cite~\cite[Proposition~3.4]{GrSeSm88}.

\begin{proposition}[Grunewald, Segal,
  Smith] \label{pro:integral-formula} Let $\Lambda$ be a nilpotent
  $\mathbb{Z}$-Lie lattice, with $\mathbb{Z}$-basis $\mathcal{E} = (e_1,\ldots,e_d)$
  say, and let $\mathbf{G} = \mathbf{Aut}(\Lambda) \subseteq \text{GL}_d$
  denote the algebraic automorphism group of $\Lambda$, realised with
  respect to $\mathcal{E}$.  For each prime $p$, let
  \[
  G^+_p = \mathbf{G}(\mathbb{Q}_p) \cap \Mat_d(\mathbb{Z}_p) = \Aut(\mathbb{Q}_p \otimes_\mathbb{Z}
  \Lambda) \cap \End(\mathbb{Z}_p \otimes_\mathbb{Z} \Lambda)
  \]
  and let $\mu_p$ denote the right Haar measure on the locally compact
  group $\mathbf{G}(\mathbb{Q}_p)$ such that $\mu_p(\mathbf{G}(\mathbb{Z}_p)) =1$.
  Then for all primes $p$,
  \[
  \zeta_{\mathbb{Z}_p \otimes_\mathbb{Z} \Lambda}^{\wedge}(s) = \int_{G^+_p}
  \lvert \mathrm{det} g \rvert_p^s \, d\mu_p(g).
  \]
  where $\zeta_{\mathbb{Z}_p \otimes_\mathbb{Z} \Lambda}^{\wedge}(s)$ enumerates Lie subrings which are the images of $\mathbb{Z}_p \otimes_\mathbb{Z} \Lambda$ under some full rank endomorphism.
\end{proposition}

In~\cite[Section~2]{dSLu96} can be found a treatment of $p$-adic integrals
as in Proposition~\ref{pro:integral-formula}, subject to a several of
simplifying assumptions.  Most of those assumptions, for our purposes, are not restrictive, in the sense that they can be
realised by an appropriate equivalent representation of the
automorphism group corresponding to a different choice of
basis~$\mathcal{E}$; this is shown in~\cite[Section 4]{dSLu96}.  Furthermore, the
integral of Proposition~\ref{pro:integral-formula} is unaffected by
this change of representation for almost all primes.  As was also the case in \cite{BeKl15}, it will turn out that for our applications
that the assumptions required are automatically satisfied without the
need for an equivalent representation, the only exception being Assumption~2.3 with regard to our example in Section~\ref{section:x^3} below.  

We now give an outline of the assumptions. Let $\mathbf{G} \subseteq \text{GL}_d$ be an
affine group scheme over~$\mathbb{Z}$.  Decompose the connected component of
the identity as a semidirect product $\mathbf{G}^\circ = \mathbf{N}
\rtimes \mathbf{H}$ of the unipotent radical $\mathbf{N}$ and a
reductive group~$\mathbf{H}$.  Fix a prime $p$.  The first assumption
is that
\[
\mathbf{G}(\mathbb{Q}_p) = \mathbf{G}(\mathbb{Z}_p) \mathbf{G}^\circ(\mathbb{Q}_p);
\]
which allows us to work with the connected group
$\mathbf{G}^\circ$ rather than~$\mathbf{G}$.  We
write $G = \mathbf{G}^\circ(\mathbb{Q}_p)$, $N = \mathbf{N}(\mathbb{Q}_p)$, $H =
\mathbf{H}(\mathbb{Q}_p)$.  Assume further that $G \subseteq \text{GL}_d(\mathbb{Q}_p)$ is
in block form, where $H$ is block diagonal and $N$ is block upper
unitriangular in the following sense.  There is a partition $d = r_1 +
\ldots + r_c$ such that, setting $s_i = r_1 + \ldots + r_{i-1}$ for $i
\in \{1,\ldots,c\}$,
\begin{enumerate}
\item[$\circ$] the vector space $V = \mathbb{Q}_p^d$ on which $G$ acts from
  the right decomposes into a direct sum of $H$-stable subspaces $U_i
  = \{ (0,\ldots,0) \} \times \mathbb{Q}_p^{r_i} \times \{ (0,\ldots,0) \}$,
  where the vectors $(0,\ldots,0)$ have $s_i$, respectively
  $d-s_{i+1}$, entries;
\item[$\circ$] setting $V_i = U_i \oplus \ldots \oplus U_c$, each
  $V_i$ is $N$-stable and $N$ acts trivially on $V_i/V_{i+1}$.
\end{enumerate}
For each $i \in \{2,\ldots,c+1\}$ let $N_{i-1} = N \cap
\ker(\psi'_i)$, where $\psi'_i \colon G \rightarrow \Aut(V/V_i)$
denotes the natural action.  Let $\psi_i \colon G/N_{i-1} \rightarrow
\Aut(V/V_i)$ denote the induced map, and define
\[
(G/N_{i-1})^+ = \psi_i^{-1} \big(\psi_i(G/N_{i-1}) \cap
\Mat_{s_i}(\mathbb{Z}_p) \big).
\]
We can now state the following:
\begin{condition}\label{lifting-condition}
For every $g_0 N_{i-1} \in (G/N_{i-1})^+$ there exists $g
\in G^+$ such that $g_0 N_{i-1} = g N_{i-1}$.
\end{condition}
We refer to this as the `lifting condition'~\cite[Assumption~2.3]{dSLu96}.  As explained in
\cite[p.~6]{Be11}, Condition~\ref{lifting-condition} cannot in general be
satisfied by moving to an equivalent representation (and we will see this phenomenon in Section~\ref{section:x^3} below). For $i \in
\{2,\ldots,c\}$ there is a natural embedding of $N_{i-1}/N_i
\hookrightarrow (V_i/V_{i+1})^{s_i}$ via the action of $N_{i-1}/N_i$
on $V/V_{i+1}$, recorded on the natural basis.  The action of $H$ on
$V_i/V_{i+1}$ induces, for each $h \in H$, a map
\[
\tau_i(h) \colon N_{i-1}/N_i \hookrightarrow (V_i/V_{i+1})^{s_i}.
\]
Define $\theta_{i-1} \colon H \rightarrow [0,1]$ by setting
\[
\theta_{i-1}(h) = \mu_{N_{i-1}/N_i} \big( \{n N_i \in N_{i-1}/N_i \mid (n
N_i) \tau_i(h) \in \Mat_{s_i,r_i}(\mathbb{Z}_p)\} \big),
\]  
where $\mu_{N_{i-1}/N_i}$ denotes the right Haar measure on
$N_{i-1}/N_i$, normalised such that the set $\psi_{i+1}^{-1}
(\psi_{i+1}(N_{i-1}/N_i) \cap \Mat_{s_{i+1}}(\mathbb{Z}_p))$ has measure~$1$.
Write $\mu_G$, respectively $\mu_H$, for the right Haar measure
on~$G$, respectively $H$, normalised such that
$\mu_G(\mathbf{G}(\mathbb{Z}_p)) = 1$ and $\mu_H( \mathbf{H}(\mathbb{Z}_p)) = 1$.
From $G = N \rtimes H$ one deduces that $\mu_G = \prod_{i=2}^c
\mu_{N_{i-1}/N_i} \cdot \mu_H$.  Setting $G^+ = G \cap \Mat_d(\mathbb{Z}_p)$
and $H^+ = H \cap \Mat_d(\mathbb{Z}_p)$, we can now
state~\cite[Theorem~2.2]{dSLu96}.

\begin{theorem}[du Sautoy and Lubotzky] \label{thm:dS-Lu} In the
  set-up described above, subject to the various assumptions including Condition~\ref{lifting-condition},
  \[
  \int_{G^+} \lvert \mathrm{det} g \rvert_p^s \, d\mu_G (g) = \int_{H^+}
  \lvert \mathrm{det} h \rvert_p^s \, \prod_{i=1}^{c-1} \theta_i(h) \, d\mu_H(h).
  \]
\end{theorem}

In our example in Section~\ref{section:x^3} below, since Condition~\ref{lifting-condition} will not hold, we will require the following weaker version of the theorem which follows easily via the exposition in \cite{dSLu96}:

\begin{theorem} \label{thm:dS-Lu-weak-version} In the
  set-up described above, subject to the various assumptions but without assuming \cite[Assumption 2.3]{dSLu96},
  \[
  \int_{G^+} \lvert \mathrm{det} g \rvert_p^s \, d\mu_G (g) = \int_{H^+}
  \lvert \mathrm{det} h \rvert_p^s \, \theta(h) \, d\mu_H(h).
  \]
\end{theorem}

\subsection{Utilizing a $p$-adic Bruhat decomposition}\label{section:p-adic}
Here we recall the machinery developed by Igusa \cite{Ig89}, du Sautoy and Lubotzky \cite{dSLu96} and the first author \cite{Be11} for utilizing a $p$-adic Bruhat decomposition in order to compute integrals over reductive groups. The most recent reference \cite{Be11} is useful for practical purposes, where the notation (and some further choices) are well-suited to the current paper.


We fix a maximal torus $T$ in $G$ and assume that $T$ splits over $\mathbb{Q}$ (this will be the case in our later applications). Elements of $T$ act by conjugation on minimal closed unipotent subgroups of $G$ which correspond to roots of the root system associated to $G$. Under this action, the (finite) Weyl group corresponds to $N(T)/T$ where $N(T)$ is the normalizer of $T$ in $G$. We suppress here some necessary requirements of good reduction for an identification of $T$ with $\mathbb{G}_m^c$ and an identification of each root subgroup with $\mathbb{G}_a$, since these will all trivially hold in our later applications. (These technical requirements are detailed in \cite{Be11}.) Roots of $G$ relative to $T$ are identified with elements of $\text{Hom}(T, \mathbb{G}_m)$ via the conjugation action of $N(T)/T$ on root subgroups. We choose a set of fundamental roots $\alpha_1,\ldots, \alpha_l$ which define the positive roots. Let $\Xi:=\text{Hom}(\mathbb{G}_m, T)$; this is the set of cocharacters of $T$. We refer to \cite{dSLu96} for a description of Iwahori subgroups $\mathcal{B}\subseteq G(\mathbb{Z}_p)$. We write $\pi$ for a fixed uniformizing parameter for $\mathbb{Z}_p$. We are now ready to state a $p$-adic Bruhat Decomposition due to Iwahori and Matsumoto \cite{IwMa65}:

$$
G(\mathbb{Q}_p)=\coprod_{\substack{w\in W\\ \xi\in \Xi}}\mathcal{B}w\xi(\pi)\mathcal{B}
$$ 
where elements of $W$ act on $T$ by conjugation and also
$$
G(\mathbb{Z}_p)=\coprod_{w\in W}\mathcal{B}w\mathcal{B}.
$$ 
One defines $\Xi^+=\{\xi\in \Xi | \xi(\pi)\in G(\mathbb{Z}_p)\}$ and 
$$w\Xi_w^+=\{\xi\in \Xi^+ | \alpha(\xi(\pi))\in \mathbb{Z}_p (i=1,\ldots, l), \alpha_i(\xi(\pi))\in p\mathbb{Z}_p\ \text{whenever}\ \alpha_i\in w(\Phi^-)\}$$
where $\Phi^-$ denotes the set of negative roots. 
Utilizing symmetries in the affine Weyl group and the fact that $|\mathrm{det}|$, $\theta$ are constant on double cosets of $\mathcal{B}\subseteq G(\mathbb{Z}_p)$, du Sautoy and Lubotzky showed that 

\begin{proposition}\label{proposition:formula-integral} \protect{\cite[Proposition~4.2]{Be11}}
When $T$ splits over $\mathbb{Q}$ and under good reduction assumptions,
$$Z_{G,\rho, \theta}(s)=\sum_{w\in W}p^{-\lambda(w)}\sum_{\xi\in w\Xi_w^+}|(\prod_{\beta\in \Phi^+}\beta)(\xi(\pi))|^{-1}|\mathrm{det}(\rho(\xi(\pi)))|\theta(\rho(\xi(\pi)))$$
where $\lambda$ is the standard length function on $W$.
\end{proposition}
This is a generalization of [cf. \cite[Eq. 5.4]{dSLu96}] which holds without some of the assumptions needed there. 


Finally we recall natural pairing, used in \cite{dSLu96, Be11}, between $\Xi=\text{Hom}(\mathbb{G}_m, T)$ and $\text{Hom}(T, \mathbb{G}_m)$: this is the map $(\beta, \xi)\mapsto \langle \beta, \xi\rangle$ where $\beta(\xi(\tau))=\tau^{\langle \beta, \xi\rangle}$ for all $\tau\in \mathbb{G}_m$. As in \cite[Section 5.2]{Be11}, it will turn out to be convenient to judiciously choose a basis for $\text{Hom}(T, \mathbb{G}_m)$ consisting of fundamental roots and dominant weights for the contragredient representation and then determine a dual basis for $\text{Hom}(\mathbb{G}_m,T)$. This will enable an explicit description of the set $w\Xi_w^+$.


\section{Structure of the Automorphism group of certain graded $D^*$-Lie rings}\label{section:structure-of-Aut}

In order to evaluate pro-isomorphic zeta functions of indecomposable $D^*$-groups of even Hirsch length, we need first to pass to their associated Lie rings. Here we are fortunate in that the groups have nilpotency class two, so we are able to directly work with Lie rings having corresponding presentations and the pro-isomorphic zeta functions will be identical for all primes $p$.

Thus we are interested to describe the automorphism groups of class-two Lie rings over $\mathbb{Z}$ with two-dimensional centre with presentations given in \cite[Section 6]{GrSe84}. Let $L$ be the $\mathbb{Q}$-Lie algebra whose underlying vector space is the $\mathbb{Q}$-span of the ordered basis
\[
\mathcal{S}=(x_1,...,x_m,y_1,...,y_m,e,f).
\]
To define the Lie brackets, let $K$ be the companion matrix
\begin{equation*}
  K=K(a_1,\ldots,a_{m})=\left(
    \begin{array}{ccccc}
      0 & 1 & 0 & \cdots & 0\\
      0 & 0 & 1 & \cdots & 0\\
      \vdots & \vdots & \vdots & \ddots & \vdots\\
      0 & 0 & 0 & \cdots & 1\\
      a_m & a_{m-1} & a_2 & \cdots & a_{1}
    \end{array}
  \right), \qquad \qquad \qquad \qquad \qquad
\end{equation*}
and let $\mathbf{B}$ be the $m$-by-$m$ matrix whose entries are formally $\mathbf{B}_{ij}=\delta_{ij} e + K_{ij}f$. The Lie structure on $L$ is defined by
\begin{equation}\label{eq:structure.of.L} 
\begin{split}
[x_i,y_j]&=\mathbf{B}_{ij}, \\
[x_i,x_j]&=[y_i,y_j]=0,
\end{split}
\end{equation}
for $1 \le i,j \le m$, and the additional requirement that $e$ and $f$ form a basis of the centre $Z(L)$ of $L$. Recall (cf. \cite[Section 6]{GrSe84}) that the standing assumption is that the characteristic polynomial of $K$, $$f_K(x)=x^m-a_{1}x^{m-1}-\cdots-a_{m-1}x -a_m \in \mathbb{Q}[x],$$ is primary, that is, $f_K(x)=p(x)^e$ with $p(x) \in \mathbb{Q}[x]$ irreducible of degree $\ell=m/e$. Let
$$ \mathcal{R}:=\mathbb{Q}[x]/\left(f_K(x)\right)=\mathbb{Q}[x]/\left(p(x)^e\right) \simeq F[t]/\left(t^e\right),$$
with $F=\mathbb{Q}[x]/\left(p(x)\right)$.



Let $G=\Aut_\mathbb{Q}(L)$ and let $\mathfrak{g}=\mathrm{Lie}(G)$ denote its Lie algebra. We identify $G$ and $\mathfrak{g}$ with their matrix realisation with respect to the basis ${\mathcal{S}}$ in $\text{GL}_{2m+2}(\mathbb{Q})$ and $M_{2m+2}(\mathbb{Q})$, respectively. Under this realisation $\mathcal{S}$ is identified with the standard basis of $\mathbb{Q}^{2m+2}$ written as row vectors and acted upon from the right.

\subsection{The structure of $\mathfrak{g}=\mathrm{Lie(G)}$}


An element $\xi \in \mathfrak{g} \subset M_{2m+2}(\mathbb{Q})$ can be written as block matrix
\[
\xi=\left(\begin{matrix} X & * \\ 0 & Y\end{matrix}\right),
\]
with $X \in M_{2m}(\mathbb{Q})$, which corresponds to the well-defined map it induces on $L/Z(L)$, and $Y \in M_2(\mathbb{Q})$, which corresponds to its restriction to $Z(L)$. 
The lower-left block consists of zeros since the centre of $L$ is a characteristic Lie subalgebra. The upper-right block can be arbitrary since its action does not affect Lie brackets in $L$. 

We observe that the action of $\xi$, which by definition satisfies 
\begin{equation}\label{eq:form.of.Lie.action}
[u,v]\xi=[u\xi,v] + [u,v\xi], \quad \forall u,v \in L, 
\end{equation}
takes the form
\begin{equation}\label{eq:form.of.Lie.action.concrete}
[u,v]Y=[uX,v]+[u,vX], \quad \forall u,v \in L. 
\end{equation}



The structure of $\mathfrak{g}$ is tightly related to the symmetries of two bilinear forms on $\mathbb{Q}^{2m}$. For a matrix $U \in M_m(\mathbb{Q})$, let
\[
\mathcal{J}_U:=\left(\begin{matrix} 0 & U \\ -U^\text{t} & 0 \end{matrix}\right) \in M_{2m}(\mathbb{Q}).
\]

$\mathcal{J}_U$ defines an anti-symmetric bilinear form on $\mathbb{Q}^{2m}$ which we denote by $\langle \cdot,\cdot \rangle_{\mathcal{J}_U}$. Let $O({\mathcal{J}_U})$ be the subgroup of $\text{GL}_{2m}(\mathbb{Q})$ that consists of all elements which preserve the form and let $\mathfrak{o}({\mathcal{J}_U})$ be its Lie algebra. Specifically,  
\[
\begin{split}
O({\mathcal{J}_U})&=\{g \in \text{GL}_{2m}(\mathbb{Q}) \mid g \mathcal{J}_U g^\text{t}=\mathcal{J}_U\},\\
\mathfrak{o}({\mathcal{J}_U})&=\{X \in \mathfrak{gl}_{2m}(\mathbb{Q}) \mid X \mathcal{J}_U  + \mathcal{J}_U X^\text{t}=0\}.
\end{split}
\]







Using the special cases $U=I$ and $U=K$, the relations \eqref{eq:structure.of.L} take the form
\[
[u,v] = (u \mathcal{J}_I v^\text{t}) e+ (u \mathcal{J}_K v^\text{t}) f, \quad \forall u,v \in L,
\]
and equation \eqref{eq:form.of.Lie.action.concrete} becomes 
\begin{equation}\label{eq:action.in.terms.of.J}
\begin{split}
a \mathcal{J}_I + c \mathcal{J}_K&=X\mathcal{J}_I+\mathcal{J}_IX^\text{t} \\
b \mathcal{J}_I + d \mathcal{J}_K&=X\mathcal{J}_K+\mathcal{J}_KX^\text{t}, 
\end{split}
\end{equation}
for $Y=\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)$.

  Let $\mathfrak{g}_0 \subset \mathfrak{g}$  denote the Lie subalgebra that consists of elements that annihilate $Z(L)$. 


\begin{proposition}\label{prop:characterisation.of.g.and.g0}  Let $\xi \in M_{2m+2}(\mathbb{Q})$ be a block matrix of the form
\[
\xi = \left(\begin{matrix} X & * \\ 0 & Y\end{matrix}\right),
\]
with $X = \left(\begin{smallmatrix} A & B \\ C & D \end{smallmatrix}\right)\in M_{2}(M_m(\mathbb{Q}))$ and $Y=\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)\in M_2(\mathbb{Q})$. Then

\begin{enumerate}
\item $\xi \in \mathfrak{g}$ if and only if $B=B^\text{t}$, $C=C^\text{t}$, $D^\text{t}=aI+cK-A$, and 
\[
KA-AK=cK^2+(a-d)K-bI.
\]

\item $\xi \in \mathfrak{g}_0$ if and only if $Y=0$ and $X \in \mathfrak{o}({\mathcal{J}_I}) \cap \mathfrak{o}({\mathcal{J}_K})$.

\end{enumerate}



\end{proposition}



\begin{proof} Both parts follow directly from \eqref{eq:action.in.terms.of.J}.


\end{proof}



\begin{proposition} With the above notation we have 
\[
\mathfrak{g}_0 \simeq \mathfrak{sl}_2\left(\mathcal{R}\right) \ltimes S(\mathcal{R})^{\oplus 2},
\]
with $S(\mathcal{R})=\mathcal{R}^2 $ the standard left representation of $\mathfrak{sl}_2(\mathcal{R})$. 
\end{proposition}

\begin{proof} We first observe that for any $U \in M_m(\mathbb{Q})$ one has that  $X \in \mathfrak{o}({\mathcal{J}_U})$ if and only if $X$ is of the form
\[
X=\left(\begin{matrix} A & B \\ C & D \end{matrix}\right),
\]
with $A,B,C,D \in M_m(\mathbb{Q})$ such that $AU=-UD^\text{t}$, $BU^\text{t}=U B^\text{t}$ and $CU=U^\text{t} C^\text{t}$.

By the second part of Proposition~\ref{prop:characterisation.of.g.and.g0} 
we have that $X \in \mathfrak{o}({\mathcal{J}_I}) \cap \mathfrak{o}({\mathcal{J}_K})$ if and only if $X$ is of the form
\begin{equation}\label{eqn:general.X}
X=\left(\begin{matrix} A & B \\ C & -A^\text{t} \end{matrix}\right),
\end{equation}
with $A,B,C \in M_m(\mathbb{Q})$ such that
\begin{enumerate}
\item $AK=KA$,
\item $BK^\text{t}=K B$,
\item $CK=K^\text{t} C$,
\item $B=B^\text{t}$,
\item $C=C^\text{t}$.
\end{enumerate}

Recall that every matrix is similar to its transpose, and the conjugating matrix may be taken to be symmetric (in fact, for regular matrices it is always symmetric, see~\cite{TaZa59}). 
Therefore, there exists a symmetric matrix $\sigma \in \text{GL}_m(\mathbb{Q})$ such that $K^\text{t}=\sigma K\sigma^{-1}$. Let $R=\mathbb{Q}[K]$ be the $\mathbb{Q}$-algebra generated by $K$ (in particular $R\simeq \mathcal{R}$). We claim that  
\[
\mathfrak{o}({\mathcal{J}_I}) \cap \mathfrak{o}({\mathcal{J}_K})=\left\{\left( \begin{matrix} A & B\sigma^{-1} \\ \sigma C & -\sigma A\sigma^{-1} \end{matrix} \right) \mid A,B,C \in R \right\}.    
\]
Indeed, the containment '$\supset$' is a direct verification and the other direction follow from the regularity of $K$. Clearly, the map 
\[
\mathfrak{sl}_2(R) \to \mathfrak{o}({\mathcal{J}_I}) \cap \mathfrak{o}({\mathcal{J}_K}), \quad \left(\begin{matrix} A & B \\ C & -A \end{matrix}\right) \mapsto \left( \begin{matrix} I & 0 \\ 0 & \sigma \end{matrix} \right) \left( \begin{matrix} A & B \\ C & -A \end{matrix} \right)\left( \begin{matrix} I & 0 \\ 0 & \sigma \end{matrix} \right)^{-1},
\]
is a $\mathbb{Q}$-isomorphism of $\mathbb{Q}$-Lie algebras.
Let $\eta:R \to \mathbb{Q}^m$ denote the isomorphism identifying $\mathbb{Q}^m$ as an $R$-module.  
The isomorphism $\mathfrak{sl}_2\left({R}\right) \ltimes S({R})^{\oplus 2} \to \mathfrak{g}_0 $ is given by 
\[
\left(\begin{matrix} A & B \\ C & -A  \end{matrix}  \right) \ltimes \left[\begin{matrix} v_1 \mid  v_2 \\ w_1 \mid w_2  \end{matrix}  \right] \mapsto \left( \begin{matrix} A & B\sigma^{-1} & \eta(v_1)~\eta(v_2) \\ \sigma C & -\sigma A\sigma^{-1} &\sigma\eta(w_1)~\sigma\eta(w_2) \\ 0_{2,m} & 0_{2,m} & 0_{2,2}\end{matrix} \right) \in M_{2m+2}(\mathbb{Q}).
\]
\end{proof}







\begin{theorem} Let $\mathfrak{g}$ and $\mathfrak{g}_0$ be as above. There is a short exact sequence  
\[ 
0 \to \mathfrak{g}_0 \to \mathfrak{g} \to \mathfrak{b} \to 0,
\]

where $\mathfrak{b}$ is the image of the restriction map to the centre $Z(L)$, and is isomorphic to    
\begin{equation}
\mathfrak{b}\simeq\begin{cases}
 \mathfrak{b}_2(\mathbb{Q}) = \left(\begin{smallmatrix} * & * \\  & * \end{smallmatrix}\right) \subset M_2(\mathbb{Q}) & \text{if $m = 1$}, \\
    \mathbb{Q}^2 & \text{if $m = 2$}, \\
   \mathbb{Q} & \text{if $m>2$}.
  \end{cases}
\end{equation}
\end{theorem}

\begin{proof} 

By the first part of Proposition~\ref{prop:characterisation.of.g.and.g0} a matrix $Y=\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)\in M_2(\mathbb{Q})$ is a restriction of an element of $\mathfrak{g}$ to $Z(L)$ if and only if there exists a solution $A \in M_m(\mathbb{Q})$ to the equation 
\begin{equation}\label{eq:adK}
\mathrm{ad}_K(A)=KA-AK=cK^2+(a-d)K-bI_m.
\end{equation}


\noindent{\em The irreducible case:} Assume first that $K$ is an irreducible matrix, namely, that $R=\mathbb{Q}[K]$ is a field.  In particular $\ell=m \ge 2$. In such case $M_m(\mathbb{Q})= \mathrm{Im}(\mathrm{ad}_K) \oplus \mathrm{Ker}(\mathrm{ad}_K)$. This follows from the fact that the image and kernel of $\mathrm{ad}_K$ have complimentary dimensions, the fact that they are orthogonal with respect to the (non-degenerate) trace form on $M_m(\mathbb{Q})$ and finally that the restriction of the trace form to $R$ is non-degenerate.

It follows that both sides of equation \eqref{eq:adK} are zero. If $\ell>2$, this implies that $b=c=a-d=0$, otherwise $K$ would satisfy a non-trivial quadratic equation, while its minimal polynomial is of degree $\ell$. It follows that a necessary condition for the existence of a solution to \eqref{eq:adK} is that $Y \in \mathbb{Q} I_2$, and it is also sufficient as $A$ can be chosen to be the zero matrix. If $\ell=2$, as the quadratic function  $cx^2+(a-d)x-b$ obtained from \eqref{eq:adK} vanishes on $K$, it must be either identically zero, or proportional to $x^2-a_1x-a_2$, the characteristic and minimal polynomial  of $K$. Thus $Y$ is a linear combination of $\left(\begin{smallmatrix} 1 & 0 \\ 0 & 1 \end{smallmatrix}\right)$ and $\left(\begin{smallmatrix} 0 & a_2 \\ 1 & a_1 \end{smallmatrix}\right)$. It follows that we must have $Y \in \mathbb{Q}[K^\text{t}]$, and indeed for every such $Y$, one may take $A=0$.     

\smallskip

\noindent{\em The general primary case:} Equation \eqref{eq:adK} is linear in $A$, therefore, the dimension of the solution space is invariant under conjugation.  We may therefore replace $K$ by a conjugate matrix of the form 
\begin{equation*}
H=  \left(
    \begin{array}{ccccc}
      \lambda & \mathrm{I}_\ell      &    &     0\\
      0      & \lambda & \ddots &   \\
      \vdots & \ddots & \ddots & \mathrm{I}_\ell\\
      0 & \cdots & 0 &  \lambda\\
        \end{array}
  \right) 
  \in M_e(M_{\ell}(\mathbb{Q})), 
  \end{equation*}
with $\lambda \in M_\ell(\mathbb{Q})$ irreducible. Let $A=(A_{ij})$ with $A_{ij} \in M_\ell(\mathbb{Q})$. The blocks of $HA-AH$ are given by 

\begin{equation}\label{eq:adH}
(HA-AH)_{ij}= \lambda A_{ij}-A_{ij}\lambda+\begin{cases}
A_{i+1,1} & \text{if $1 \le i<e$ and $j= 1$}, \\
0 & \text{if $i=e$ and $j=1$}, \\
 -A_{i,j-1}  & \text{if $i=e$ and $1 < j \le e$}, \\
A_{i+1,1}  -A_{i,j-1}  & \text{if $1 \le i < e$ and $1 < j \le e$}. 
\end{cases}
\end{equation}





If $A$ is a solution to \eqref{eq:adK} we may take the sum of diagonal blocks on both sides, and obtain 
\[
[\lambda, \sum_{i=1}^e A_{ii}] =e(c\lambda^2+(a-d)\lambda-bI_\ell).
\] 
It follows from the irreducible case that if $\ell>2$ there exists a solution to \eqref{eq:adK} only if $Y \in \mathbb{Q} I_2$ and in such case $A=0$ is indeed a solution. If $\ell=2$ we get the same necessary condition as in the irreducible case, namely, that $Y \in \mathbb{Q}[K^\text{t}]$. If $\ell=1$, we get that a necessary condition for the existence of solution to \eqref{eq:adK} is that $a,b,c$ and $d$ satisfy $c\lambda^2+(a-d)\lambda-b=0$, where $\lambda\in \mathbb{Q}$ in this case is the unique eigenvalue of $K$.  This means that for $\ell=1$ 
\[ 
Y \in \mathfrak{b}=\mathbb{Q} \left(\begin{smallmatrix} 1 & 0 \\ 0 & 1 \end{smallmatrix}\right)+\mathbb{Q} \left(\begin{smallmatrix} 1 & \lambda\\ 0 & 0 \end{smallmatrix}\right)+\mathbb{Q} \left(\begin{smallmatrix} 0 & \lambda^2 \\ 1 & 0 \end{smallmatrix}\right),
\]
which is isomorphic to the subalgebra of upper triangular matrices in $M_2(\mathbb{Q})$. 

 We now show that the necessary conditions for the cases $\ell=1,2$ are also sufficient. It is enough to show that in both cases the image of $\mathrm{ad}_H$ contains $cH^2+(a-d)H-bI_\ell$. Indeed, this matrix lies in $M_{e}(\mathbb{Q}[\lambda])$, and subject to the necessary conditions it is strictly upper triangular. But the latter space is contained in the image of $\mathrm{ad}_H$, as can be seen, for example, from \eqref{eq:adH}.    
 
\end{proof}

\subsection{The structure of the automorphism group $G$ for the case $f(x)=x^m$}

For the special case $f(x)=x^m$ we have that $\mathfrak{b}$ is the subalgebra of triangular matrices in $M_2(\mathbb{Q})$. We choose a Lie section $\mathfrak{b} \to \mathfrak{g}$ as follows. Let 
\[
\alpha_1=\left(\begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix}\right), \alpha_2=\left(\begin{matrix} 1 & 0 \\ 0 & -1 \end{matrix}\right), \alpha_3=\left(\begin{matrix} 0 & 1 \\ 0 & 0 \end{matrix}\right).
\]
We choose lifts of the form $\xi_i=\mathrm{diag}(A_i,D_i^\text{t},\alpha_i) \in \mathfrak{g}$, where $D^\text{t}$ is determined by part (1) of Proposition~\ref{prop:characterisation.of.g.and.g0}. Note that for the polynomial $x^m$, we have $H=K$. It is possible, and as we'll shortly see also convenient, to make the additional requirement that $D^\text{t}=wAw^{-1}$, where $w$ is the matrix in $M_m(\mathbb{Q})$ corresponding to the longest Weyl element in $S_m$:

\begin{enumerate}

\item For $\alpha_1$, we take $A_1=\tfrac{1}{2} I_m$.


\item For $\alpha_2$, we take $A_2=\mathrm{diag}(\frac{3-2m}{2},\frac{5-2m}{2}, \ldots, \frac{1-2m+2i}{2}, \ldots, \frac{2m-1}{2})$.


\item For $\alpha_3$, we take 
\begin{equation}
A_3=
\left(
    \begin{array}{ccccc}
    0 & c_1 & 0  & & 0\\
      0&    0 & c_2      &    &     0\\
       0&    0      & 0 & \ddots &   \\
        \vdots  &    \vdots & \ddots & \ddots & c_{m-1}\\
        0&    0 & \cdots & 0 &  0\\
        \end{array}
  \right), \text{with~} c_i=\tfrac{2i+1-m}{2}. 
\end{equation}


\end{enumerate}



Finally, with a view towards the computation of the pro-isomorphic zeta function, we make a global change of basis 
\[
\mathcal{S}=(x_1,x_2,...,x_m,y_1,y_2,...,y_m, e,f) \mapsto \mathcal{C}=(x_1,y_m,x_2,y_{m-1},..., x_m,y_1,f,e).
\]
This change of basis can be written as a composition of $V=\mathrm{diag}\left(I_m,w,\left(\begin{smallmatrix} 0 & 1 \\ 1 & 0 \end{smallmatrix}\right)\right)$, which reverses the order of the $y_i$'s and of $e$ and $f$ while fixing the $x_i$'s, and the matrix $U=(u_{ij})$, where 
\[
u_{ij}=\begin{cases}
 \delta_{j,2i-1}& \text{if $1 \le i \le m$}, \\
 \delta_{j,2(i-m)} & \text{if $m < i \le 2m$}, \\
  \delta_{ij} & \text{if $2m < i \le 2m+2$}.
  \end{cases}
\]

\begin{proposition}  With respect to the basis $\mathcal{C}$ the Lie algebra $\mathfrak{g}=\mathfrak{g}_0 \rtimes \mathfrak{b} \subset M_{m+1}(M_2(\mathbb{Q}))$ of $\mathrm{Aut}(L)$ is given by
\[
\begin{split}
\mathfrak{g}_0&=
\left\{ \left(
 \begin{array}{ccccc|cc}
X_1 & X_2 & X_3& \cdots & X_m& *& *\\
& X_1 &\ddots &\ddots&\vdots &* & *\\
&& \ddots &\ddots &X_3 &*& *\\
&&& X_1 &X_2 &* & *\\
&&&& X_1 &*&*\\
 \hline
&&&&& 0& 0\\
&&&&& & 0
 \end{array}
 \right) ~\mid~  X_i \in \mathfrak{sl}_2(\mathbb{Q}) \right\}, \\
\mathfrak{b}&=\mathrm{Span}_\mathbb{Q}\{\xi_1,\xi_2,\xi_3\},
 \end{split}
\]

where
\[
\begin{split}
\xi_1&=\mathrm{diag}(\tfrac{1}{2}I_{2m},I_2), \\
\xi_2&=\mathrm{diag}\left(\tfrac{3-2m}{2}I_2,\tfrac{7-2m}{2}I_2, \ldots, \tfrac{-1-2m+4i}{2}I_2, \ldots, \tfrac{2m-1}{2}I_2,\left(\begin{smallmatrix} -1 & 0 \\ 0 & 1 \end{smallmatrix}\right)\right)),\\
\xi_3&=\left(
 \begin{array}{ccccc|cc}
0_2 & \tfrac{3-m}{2}I_2& 0_2& \cdots & 0_2& & \\
& 0_2 &\tfrac{5-m}{2}I_2 &\ddots&\vdots & & \\
&& \ddots &\ddots &0_2 && \\
&&& 0_2 &\tfrac{m-1}{2}I_2 & & \\
&&&& 0_2 & &\\
 \hline
&&&&& 0& 1\\
&&&&& & 0
 \end{array}
 \right).
\end{split}
\]

\end{proposition}

\begin{proof} Straightforward conjugation by the change of basis matrix $UV$.


\end{proof} 



\begin{corollary}\label{corollary-reductive-part} Let $L$ be the Lie algebra which corresponds to the polynomial $f(x)=x^m$ and let $\mathbf{G} \subset \mathbf{GL_{2m+2}}$ be its algebraic automorphism group with respect to  the basis $$\mathcal{C}=(x_1,y_m,x_2,y_{m-1},...,x_m,y_1,f,e).$$ Then $\mathbf{G}^\circ=\mathbf{N} \rtimes \mathbf{H}$, where the reductive part $\mathbf{H}$ is isomorphic to $\mathbf{GL_2} \times \mathbf{GL_1}$, and for every field extension $k/\mathbb{Q}$, the $k$-rational points of $\mathbf{H}$  are given by   



 \begin{displaymath}
 \left(
 \begin{array}{ccccc|cc}
\mu^{m-1}A&&&&0&&\\
& \mu^{m-2}A&&&&&\\
&& \ddots &&& &\\
&&& \mu A &&&\\
0&&&& A &&\\
 \hline
&&&&& \mu^m \mathrm{det} A& 0\\
&&&&& 0& \mu^{m-1}\mathrm{det} A
 \end{array}
 \right), A \in \text{GL}_2(k), \mu \in \text{GL}_1(k),
 \end{displaymath}


and the $k$-rational points of the unipotent radical $\mathbf{N}$ are generates by  $\exp(\mathfrak{n}_0(k))$ and $\exp(k\xi_3)$, where



\[
\mathfrak{n}_0(k)=
\left\{ \left(
 \begin{array}{ccccc|cc}
0 & X_2 & X_3& \cdots & X_m& *& *\\
& 0 &\ddots &\ddots&\vdots &* & *\\
&& \ddots &\ddots &X_3 &*& *\\
&&& 0 &X_2 &* & *\\
&&&& 0 &*&*\\
 \hline
&&&&& 0& 0\\
&&&&& & 0
 \end{array}
 \right) ~\mid~  X_i \in \mathfrak{sl}_2(k) \right\}.
 \]
 

\end{corollary}


\begin{proof} There is a unique connected $\mathbb{Q}$-algebraic subgroup of $\mathbf{GL}_{2m+2}$ that corresponds to $\mathfrak{g}$. We may use the birational map defined by the exponent to get the unipotent part $\mathbf{N}$ from $\mathfrak{n}=\mathfrak{n}_0+\mathbb{Q}\xi_3$. The reductive part $\mathbf{H}$ corresponds to the subalgebra $\mathfrak{h} \simeq \mathfrak{gl}_2 \oplus \mathfrak{gl}_1$, explicitly given by 
\[
\langle \mathrm{diag}(X,X,...,X,0), \nu\xi_1 \mid X \in \mathfrak{sl}_2(\mathbb{Q}), \nu \in \mathbb{Q} \rangle \oplus \mathbb{Q}\xi_2, 
\]  
clearly, corresponding to $\mathbf{H}(\mathbb{Q})$. The specific choice of $$\mathrm{diag}(\mu^{m-1}I_2,\mu^{m-2}I_2,...,I_2,\mu^{m},\mu^{m-1})$$   
to parametrise the component $\mathbf{GL}_1$ is a convenient choice for our application.
\end{proof}

\subsection{The unipotent radical of automorphism group for $m=2,3$}\label{section-unipotent-radical} For the explicit computation of the pro-isomorphic zeta function we record that for $m\in \{2,3\}$  and any field extension $k/\mathbb{Q}$,
\[
\begin{split}
\text{for}\ m=2: \mathbf{N}(k)&=\left\{\left(
\begin{array}{cc|cc}
I & X + \frac{\lambda}{2}I_2& *&*\\
0 & I&*&*\\
\hline
  & &1&\lambda\\
  && &1
\end{array}
\right) \mid X \in \mathfrak{sl}_2(k), \lambda \in k \right\}, \\
\text{for}\ m=3: \mathbf{N}(k)&=\left\{\left(
\begin{array}{ccc|cc}
I&X_1&X_2+\frac{1}{2}\left(\lambda X_1+X_1^2\right)&*&*\\
0&I&X_1+\lambda I&*&*\\
0&0&I&*&*\\
\hline
 & & &1&\lambda\\
 & && &1
\end{array}
\right) \mid X_i \in \mathfrak{sl}_2(k), \lambda \in k \right\}.
\end{split}
\]


\section{The local pro-isomorphic zeta functions of $D^*_{x^2}$}\label{section:x^2}

In this section we consider the pro-isomorphic zeta function of $D^*_{x^2}$. We make use of the fact that the latter is identical to the pro-isomorphic zeta function of $\mathbb{Z}$-Lie ring $L$ having the same presentation as $D^*_{x^2}$, to which 
Proposition~\ref{pro:integral-formula} applies. We take $k=\mathbb{Q}$ and we consider the algebraic automorphism group $\mathbf{G}$ of $L$ defined in Section~\ref{section:reduction-integral}. Let $p$ be a prime; we will set about 
calculating the local pro-isomorphic zeta function $\zeta^\wedge_{L,p}(s)$. For ease of notation we write $G=\mathbf{G}(\mathbb{Q}_p)$, $H=\mathbf{H}(\mathbb{Q}_p)$, $N=\mathbf{N}(\mathbb{Q}_p)$. By Corollary~\ref{corollary-reductive-part}, the reductive subgroup has elements of the form

$$
\left(
\begin{array}{cc|cc}
\mu A&0&0&0\\
0&A&0&0\\
\hline
0&0&\mu^2\mathrm{det} A&0\\
0&0&0&\mu \mathrm{det} A
\end{array}
\right)
$$
with respect to the ordered basis $x_1, y_2, x_2, y_1, f, e$, where $\mu\in \mathbb{Q}_p, A\in \text{GL}_2(\mathbb{Q}_p)$. As described in Section~\ref{section-unipotent-radical}, the unipotent radical has elements of the form
$$
\left(
\begin{array}{cc|cc}
I&B&*&*\\
0&I&*&*\\
\hline
0&0&1&\text{tr} B\\
0&0&0&1
\end{array}
\right)
$$
where $B$ is an arbitrary $2\times 2$ matrix and the starred entries are also arbitrary.

We set about calculating the function $\theta$ defined in Section~\ref{section:background}. We check whether Condition \ref{lifting-condition} is satisfied. We have four blocks for our block diagonal form, with $N_1/N_2\cong \mathbb{Q}_p^4$, $N_2/N_3\cong \mathbb{Q}_p^2$, $N_3/N_4\cong \mathbb{Q}_p^2$. We focus on the first four rows 
$$
\left(
\begin{array}{cccc|cccc}
1&0&b_{11}&b_{12}&\delta_{15}&\delta_{16}\\
0&1&b_{21}&b_{22}&\delta_{25}&\delta_{26}\\
0&0&1&0&\delta_{35}&\delta_{36}\\
0&0&0&1&\delta_{45}&\delta_{46}\\
\end{array}
\right)
$$
of a typical element of~$N$, seeing that, for each $i$, if $nhN_{i-1}$ lies in $(G/N_{i-1})^+$ (with $n\in N, h\in H$) then we may replace all the entries $\delta_{ij}$
effecting contributions from $V_i$ to be zero; this will not affect the value of $nhN_{i-1}$ and it will ensure that the lift $nh$ has all its entries in the first $4$ rows integral. It follows from \cite[Lemma~2.4]{BeKl15} that $nh$ is integral, since the first four rows correspond to $x_1, x_2, y_1, y_2$ which are generators for the Lie ring. 

It now follows easily that for an element 

$$h=
\left(
\begin{array}{cc|cc}
\mu A&0&0&0\\
0&A&0&0\\
\hline
0&0&\mu^2\mathrm{det} A&0\\
0&0&0&\mu \mathrm{det} A
\end{array}
\right)
$$
of $H$, $\theta_1(h)=|\mathrm{det} A|^{-2}$, $\theta_2(h)=|\mu^2\mathrm{det} A|^{-4}$, $\theta_3(h)=|\mu \mathrm{det} A|^{-4}$, hence $\theta(h)=\theta_1(h)\theta_2(h)\theta_3(h)=|\mathrm{det} A|^{-10}|\mu|^{-12}$.


Note that the map $\text{GL}_2\times \text{GL}_1\to H$,
$(A,\mu)\mapsto \mathrm{diag}(\mu A, A, \mu^2 \mathrm{det} A, \mu \mathrm{det} A)$ is faithful and measure-preserving. Thus we obtain 

\begin{align*}
\zeta^\wedge_{L, p}(s)&=\int_{\substack{(A,\mu)\in \text{GL}_2\times \text{GL}_1\\ v(\mu)+v(A)\geq 0}}|\mathrm{det} A|^{4s-10}|\mu|^{5s-12}d\mu.
\end{align*}

For convenience, we write $H=\text{GL}_2\times \text{GL}_1$ and we consider this group naturally embedded in $\text{GL}_3$; thus 
$T=\{\mathrm{diag}(\lambda_1,\lambda_2,\mu) \Big\vert \lambda_1,\lambda_2, \mu\in \mathbb{Q}_p \}$ is a maximal torus in $G$ which we now fix. 

We can apply Proposition~\ref{proposition:formula-integral} to obtain

$$\zeta^\wedge_{L, p}(s)=\sum_{w\in W}p^{-\lambda(w)}\sum_{\xi\in w\Xi_w^+}|\alpha(\xi(\pi))|^{-1}|\mathrm{det}(\rho(\xi(\pi)))|\theta(\rho(\pi))$$

where we choose  $\alpha\in \text{Hom}(T,\mathbb{G}_m), \alpha(\text{diag}(\lambda_1, \lambda_2, \mu))=\lambda_1\lambda_2^{-1}$ as the single positive root and, in our situation, 

$$w\Xi_w^+=\{\xi\in \Xi^+ | \alpha(\xi(\pi))\in \mathbb{Z}_p, \alpha(\xi(\pi))\in p\mathbb{Z}_p\ \text{if}\ w=w_0\}$$

where the Weyl group $W=\{1, w_0\}$.

As mentioned in Section~\ref{section:p-adic}, it will turn out to be convenient to judiciously choose a basis for $\text{Hom}(T, \mathbb{G}_m)$ consisting of fundamental roots and dominant weights for the contragredient representation. Furthermore, in order to describe the set $w\Xi_w^+$ we will need to consider dominant weights for the contragredient representation, following \cite{dSLu96}. These are given by $\omega_1^{-1}(t)=\lambda_2 \mu$, $\omega_2^{-1}(t)=\lambda_2$, $\omega_3^{-1}(t)=\lambda_1\lambda_2\mu^2$, $\omega_4^{-1}(t)=\lambda_1\lambda_2\mu$ for $t=\text{diag}(\lambda_1,\lambda_2,\mu)$. It follows that $\alpha, \omega_1^{-1}, \omega_2^{-1}$ form a  $\mathbb{Z}$-basis for $\text{Hom}(T, \mathbb{G}_m)$ whose $\mathbb{Z}_{\geq 0}$-span contains all the weights of $\rho$. Thus to detect whether an element $t\in T$ is integral it is sufficient to check whether $\alpha(t), \omega_1^{-1}(t), \omega_2^{-1}(t)$ all lie in $\mathbb{Z}_p$. We re-write $\alpha_1=\alpha, \alpha_2=\omega_1^{-1}, \alpha_3=\omega_2^{-1}$. 
We seek a dual basis for $\alpha_i$, namely elements $\xi_1, \xi_2, \xi_3\in\Xi$ such that 

$$\langle \alpha_i, \xi_j\rangle=\left\{
\begin{array}{cc}
1& i=j\\
0&i\neq j.
\end{array}
\right.
$$

It is straightforward to check that the following elements suffice: \\ $\xi_1:\tau\mapsto(\tau,1,1), \xi_2:\tau\mapsto(1,1,\tau), \xi_3:\tau\mapsto(\tau,\tau, \tau^{-1})$. 



A general element of $\Xi$ has the form $\xi=\xi_1^{e_1}\xi_2^{e_2}\xi^{e_3}$ and then 
$\xi(\pi)=\text{diag}(\pi^{e_1+e_3}, \pi^{e_3},\pi^{e_2-e_3})$ so 
$
\rho(\xi(\pi))=
\text{diag}(
\pi^{e_1+e_2},        
 \pi^{e_2},      
  \pi^{e_1+e_3},     
   \pi^{e_3},    
    \pi^{e_1+2e_2},   
      \pi^{e_1+e_2+e_3}
)
$
and we read off \\$\mathrm{det} \rho(\xi(\pi))=\pi^{4e_1+5e_2+3e_3}, |\mathrm{det} \rho(\xi(\pi))|^s=p^{-(4e_1+5e_2+3e_3)s}, \theta(\rho(\xi(\pi)))=p^{10e_1+12e_2+8e_3}$. Note that 
$$
p^{-\lambda(w)}=\left\{ \begin{array}{ll}p^{-1}&w\neq 1\\ 1&w=1
\end{array}
\right.
$$
and $|\alpha(\xi(\pi))|^{-1}=p^{\langle \alpha, \xi\rangle}=p^{\langle \alpha_1, \xi\rangle}=p^{e_1}$ and we can re-write\\
$w\Xi^+_w=\{\xi_1^{e_1}\xi_2^{e_2}\xi_3^{e_3}\ |\ \langle \alpha_i, \xi \rangle\geq 0\ \ i=1,2,3; \langle \alpha_1, \xi\rangle>0\ \text{if}\ w=w_0\}$. Finally, $\alpha_1\in w(\Phi^-)$ if and only if $w\neq 1$. Thus we have
\begin{align*}
Z_{G, \rho, p}(s)=&\sum_{w\in W}p^{-\lambda(w)}\sum_{\xi\in w\Xi^+_w}p^{\langle \alpha, \xi \rangle}|\mathrm{det} \rho(\xi(\pi))|^s\theta(\rho(\xi(\pi)))\\
=&\sum_{w\in W}p^{-\lambda(w)}\sum_{\stackrel{\textbf{e}\in\mathbb{Z}_{\geq 0}^3,}{e_1>0\ \text{if}\ w\neq 1}} p^{(11-4s)e_1+(12-5s)e_2+(8-3s)e_3}\\
=&\frac{1}{(1-p^{12-5s})(1-p^{8-3s})}\left[ p^0\cdot\frac{1}{1-p^{11-4s}}+p^{-1}\cdot\frac{p^{11-4s}}{1-p^{11-4s}}  \right]\\
=&\frac{1+p^{10-4s}}{(1-p^{8-3s})(1-p^{11-4s})(1-p^{12-5s})}.
\end{align*}


\section{The local pro-isomorphic zeta functions of $D^*_{x^3}$}\label{section:x^3}

We now consider the pro-isomorphic zeta function of $D^*_{x^3}$. We make use of the fact that the latter is identical to the pro-isomorphic zeta function of $\mathbb{Z}$-Lie ring $L$ having the same presentation as $D^*_{x^3}$, to which 
Proposition~\ref{pro:integral-formula} applies. As before we take $k=\mathbb{Q}$, $\mathbf{G}$ the algebraic automorphism group $L$ and $p$ be a prime. We set about 
calculating the local pro-isomorphic zeta function $\zeta^\wedge_{L,p}(s)$. Again we write $G=\mathbf{G}(\mathbb{Q}_p)$, $H=\mathbf{H}(\mathbb{Q}_p)$, $N=\mathbf{N}(\mathbb{Q}_p)$. By Corollary~\ref{corollary-reductive-part}, the reductive subgroup has elements of the form

$$
h=\left(
\begin{array}{ccc|cc}
\mu^{-1} A&0&0&0&0\\
0&A&0&0&0\\
0&0&\mu A&0&0\\
\hline
0&0&0&\mu^{-1}\mathrm{det} A&0\\
0&0&0&0&\mathrm{det} A
\end{array}
\right)
$$

with respect to the ordered basis $x_1, y_3, x_2, y_2, x_2, y_1, f, e$, where $\mu\in \mathbb{Q}_p, A\in \text{GL}_2(\mathbb{Q}_p)$. As described in Section~\ref{section-unipotent-radical}, the unipotent radical has elements of the form

$$
n=\left(
\begin{array}{ccc|cc}
I&B&C+\frac{1}{2}\left(\beta B+B^2\right)&*&*\\
0&I&B+\beta I&*&*\\
0&0&I&*&*\\
\hline
0&0&0&1&\beta\\
0&0&0&0&1
\end{array}
\right)
$$

where $B, C$ are $2\times 2$ traceless matrices. 

By abuse of notation, we will write $\theta(p^k,p^m,p^n)$ for $\theta(h)$ where\\ $h=\text{diag}(p^{n-k},p^{m-k},p^n, p^m, p^{n+k}, p^{m+k},p^{m+n-k}, p^{m+n})$. We assume throughout that ${m\leq n}$ and we write $l=n-m$. (In fact, one can show that 
$\theta(p^k,p^m,p^n)=\theta(p^k,p^n,p^m)$ but we will not need this fact later on.) We will need to assume $p>2$ since later on we need to be able to divide by $2$.

We do not have the lifting condition here, but we have something weaker, namely that we can lift from $G/N_3$ to $G$. Thus $\theta(h)=\theta_{0}(h)\theta_3(h)$ where\\ $\theta_0(h)=\mu_{N/N_3}(\{nN_3\in N/N_3\ |\ nhN_3\in (G/N_3)^+\})$ and $\theta_3(h)=\mu_{N_3}(\{n\in N_3\ |\ nh\in G^+\})$. Now $\theta_3(h)=p^{6(2m+2n-k)}$. In order to express $\theta_0$, we will need some further notation.

\begin{definition}
We define $f(\alpha, \beta, n)=\#\{(\xi, \eta, \zeta)\ |\ p^\alpha\xi^2+p^\beta\eta\zeta\equiv 0\bmod p^n\}$.
\end{definition}
In order to express $\theta_0$ we need to break things down into four cases:

\textbf{Case 1}: $k\geq 0$.

\textbf{Case 2a}: $\max \{-m, -l\}\leq k<0$, $2k+l\geq 0$.

\textbf{Case 2b}: $\max \{-m, -l\}\leq k<0$, $2k+l< 0$.

\textbf{Case 3}: $-m\leq k<-l$.

\begin{lemma}

We have $\theta_0(p^k,p^m,p^n)=p^{4k+3m+n}\tilde{\theta}(p^k,p^m,p^n)$ where $\tilde{\theta}(p^k,p^m,p^n)$ depends on which case we are in, as follows:

\textbf{Case 1}: $\tilde{\theta}(p^k,p^m,p^n)=p^{3k+l}f(l,0,m-k)$

\textbf{Case 2a}: 
$\tilde{\theta}(p^k,p^m,p^n)=p^{-k+l}f(2k+l,0,m+k)$

\textbf{Case 2b}: 
$\tilde{\theta}(p^k,p^m,p^n)=p^{5k+4l}f(0,-2k-l,m-k-l)$

\textbf{Case 3}: 
$\tilde{\theta}(p^k,p^m,p^n)=p^{-l}f(0,l,m+k+l)$.
\end{lemma}

\begin{proof}
We will assume throughout the proof that $p\neq 2$. We consider the action of a diagonal element $h=\text{diag}(p^{n-k},p^{m-k},p^n, p^m, p^{n+k}, p^{m+k},p^{m+n-k}, p^{m+n})$ on an element 

$$
n=\left(
\begin{array}{ccc|cc}
I&B&C+\frac{1}{2}\left(\beta B+B^2\right)&*&*\\
0&I&B+\beta I&*&*\\
0&0&I&*&*\\
\hline
0&0&0&1&\beta\\
0&0&0&0&1
\end{array}
\right)
$$
of the unipotent radical, where $\beta$ is arbitrary and $B, C$ are traceless $2\times 2$ matrices. Writing 
$B=\left(
\begin{array}{cc}
b_{11}&b_{12}\\ b_{21}&-b_{11}
\end{array}
\right)$,
$C=\left(
\begin{array}{cc}
c_{11}&c_{12}\\ c_{21}&-c_{11}
\end{array}
\right)$, we obtain the following conditions for $nh$ to be integral (recall that we are assuming $n\geq m$, which allows some redundant conditions to be omitted from the outset):
\begin{itemize}
\item $v(b_{11})\geq -m$
\item $v(b_{21})\geq -n$
\item $v(b_{12})\geq -m$
\item $v(\beta)\geq -m-n$
\item $v(\beta+b_{11})\geq -k-n$
\item $v(\beta-b_{11})\geq -k-m$
\item $v(b_{12})\geq -k-m$
\item $v(b_{21})\geq -k-n$
\item $v(2c_{12}+\beta b_{12})\geq -k-m$
\item $v(2c_{21}+\beta b_{21})\geq -k-n$
\item $v((2c_{11}+\beta b_{11})-\mathrm{det} B)\geq -k-n$
\item $v(-(2c_{11}+\beta b_{11})-\mathrm{det} B)\geq -k-m$
\end{itemize}
We only need to consider the case that $h$ is integral, so we need to bear in mind that $n\geq m\geq 0$, $|k|\leq m$.

In our calculation we will use the fact that the measure we are calculating, namely $\theta_{N_1/N_3}(\{n\in N_1/N_3\ |\ nh \ \text{is integral}\})$, may be treated as an additive measure on the parameter space $\mathbb{Q}_p^7$ with $N_1/N_3(\mathbb{Z}_p)$ corresponding to $\mathbb{Z}_p^7$. Indeed, it is easy to check that, when translated to the parameter space formed by the corresponding  Lie algebra, the action of $n \in N_1/N_3$ on $N_1/N_3$ may be represented by an affine transformation whose linear part has determinant one. With this in mind, as we are analysing $\theta_0(h)$ we will from time to time set aside some parts of the measure which are easy to calculate, and thereby reduce the number of parameters.

We start by ignoring the parameters $c_{ij}$ and trimming down the conditions not involving these. We can re-write them, first of all, as follows:
\begin{itemize}
\item $v(b_{11})\geq -m$
\item $v(b_{21})\geq -n+\max\{0,-k\}$
\item $v(b_{12})\geq -m+\max\{0,-k\}$
\item $v(\beta)\geq -m-n$
\item $v(\beta+b_{11})\geq -k-n$
\item $v(\beta-b_{11})\geq -k-m$
\end{itemize}
The last two conditions imply that $v(2\beta)\geq -k-n$ (since $-k-m\geq -k-n$). However, $-k-n\geq -m-n$. Thus, the condition $v(\beta)\geq -m-n$ is implied by the last two and may be omitted. (Here and also below, we are using the assumption that $p\neq 2$.) Morever, it is readily seen that the last two conditions are equivalent to the two conditions $v(b_{11})\geq -k-n$ and $v(\beta-b_{11})\geq -k-m$. We thus obtain a new, equivalent, list of conditions:
\begin{itemize}
\item $v(b_{11})\geq \max\{-m, -k-n\}$
\item $v(b_{21})\geq -n+\max\{0,-k\}$
\item $v(b_{12})\geq -m+\max\{0,-k\}$
\item $v(\beta-b_{11})\geq -k-m$
\end{itemize}

We return now to the conditions involving the $c_{ij}$:

\begin{itemize}
\item $v(2c_{12}+\beta b_{12})\geq -k-m$
\item $v(2c_{21}+\beta b_{21})\geq -k-n$
\item $v((2c_{11}+\beta b_{11})-\mathrm{det} B)\geq -k-n$
\item $v(-(2c_{11}+\beta b_{11})-\mathrm{det} B)\geq -k-m$
\end{itemize}

Following a similar line as above, the last two conditions are easily seen to be equivalent to the two conditions 

$v((2c_{11}+\beta b_{11})+\mathrm{det} B)\geq -k-m$, 

$v(\mathrm{det} B)\geq -k-n$

so our full list is now 

\begin{itemize}
\item $v(b_{11})\geq \max\{-m, -k-n\}$
\item $v(b_{21})\geq -n+\max\{0,-k\}$
\item $v(b_{12})\geq -m+\max\{0,-k\}$
\item $v(\beta-b_{11})\geq -k-m$
\item $v(2c_{12}+\beta b_{12})\geq -k-m$
\item $v(2c_{21}+\beta b_{21})\geq -k-n$
\item $v((2c_{11}+\beta b_{11})+\mathrm{det} B)\geq -k-m$
\item $v(\mathrm{det} B)\geq -k-n$.
\end{itemize}
Observe that the parameters $c_{11}, c_{12}, c_{21}$ each appear as a linear term and in only one condition, therefore their contributions to the measure can be calculated immediately (and the corresponding conditions deleted from the list). We obtain a contribution of $p^{k+m}$ from each of $c_{11}$ and $c_{12}$, a contribution of $p^{k+n}$ from $c_{21}$. Subsequently, $\beta$ appears as a linear term and in only one of the remaining conditions, thus giving a contribution of $p^{k+m}$. Altogether, we get a contribution of $p^{4k+3m+n}$ from these parameters, so we may write $\theta_0(p^k, p^m, p^n)=p^{4k+3m+n}\tilde{\theta}(p^k, p^m, p^n)$ where $\tilde{\theta}(p^k, p^m, p^n)$ is the measure of the subset of $\mathbb{Q}_p^3$ defined by the conditions 

\begin{itemize}
\item $v(b_{11})\geq \max\{-m, -k-n\}$
\item $v(b_{21})\geq -n+\max\{0,-k\}$
\item $v(b_{12})\geq -m+\max\{0,-k\}$
\item $v(\mathrm{det} B)\geq -k-n$.
\end{itemize}

The maxima appearing in these conditions are resolved by splitting into three cases:

\textbf{Case 1}: $k\geq 0$.
\begin{itemize}
\item $v(b_{11})\geq -m$
\item $v(b_{21})\geq -n$
\item $v(b_{12})\geq -m$
\item $v(\mathrm{det} B)\geq -n-k$.
\end{itemize}
We perform a change of variables $\mathbb{Q}_p^3\to \mathbb{Q}_p^3$, $(b_{11},b_{12},b_{21})\mapsto (\xi, \eta, \zeta)=(p^m b_{11}, p^m b_{12}, p^n b_{21})$. The new variables now all lie in $\mathbb{Z}_p$ and the change of variables introduces a Jacobian equal to $p^{2m+n}$. Thus 
\begin{align*}
&\tilde{\theta}(p^k,p^m,p^n)\\
&=\mu(\{(b_{11},b_{12},b_{21})\in \mathbb{Q}_p^3\ |\ b_{11}^2+b_{12}b_{21}\equiv 0 \bmod p^{-n-k}, v(b_{11})\geq -m, v(b_{21})\geq -n, v(b_{12})\geq -m\})\\
&=p^{2m+n}\mu(\{(\xi,\eta,\zeta)\in\mathbb{Z}_p^3\ |\ p^l\xi^2+\eta\zeta\equiv 0\bmod p^{m-k}\})\\
&=p^{2m+n}p^{-3(m-k)}f(l,0,m-k)\\
&=p^{3k+l}f(l,0,m-k).
\end{align*}
\textbf{Case 2}: $\max\{-m, -l\}\leq k< 0$ (recall that $l=n-m$).
\begin{itemize}
\item $v(b_{11})\geq -m$
\item $v(b_{21})\geq -n-k$
\item $v(b_{12})\geq -m-k$
\item $v(\mathrm{det} B)\geq -n-k$.
\end{itemize}
We perform a change of variables $\mathbb{Q}_p^3\to \mathbb{Q}_p^3$, $(b_{11},b_{12},b_{21})\mapsto (\xi, \eta, \zeta)=(p^m b_{11}, p^{m+k} b_{12}, p^{n+k}b_{21})$. The new variables all lie in $\mathbb{Z}_p$ and the change of variables introduces a Jacobian equal to $p^{2m+n+2k}$. Thus 
\begin{align*}
&\tilde{\theta}(p^k,p^m,p^n)\\
&=\mu(\{(b_{11},b_{12},b_{21})\in \mathbb{Q}_p^3\ |\ b_{11}^2+b_{12}b_{21}\equiv 0 \bmod p^{-n-k}, v(b_{11})\geq -m, v(b_{21})\geq -n-k, v(b_{12})\geq -m-k\})\\
&=p^{2m+n+2k}\mu(\{(\xi,\eta,\zeta)\in\mathbb{Z}_p^3\ |\ p^{-2m}\xi^2+p^{-m-n-2k}\eta\zeta\equiv 0\bmod p^{-n-k}\}).
\end{align*}
We now split into two subcases:\\
\textbf{Case 2a}: $l+2k\geq 0$.
Then we get 
\begin{align*}
&\tilde{\theta}(p^k,p^m,p^n)\\
&=p^{2m+n+2k}\mu(\{(\xi,\eta,\zeta)\in\mathbb{Z}_p^3\ |\ p^{l+2k}\xi^2+\eta\zeta\equiv 0\bmod p^{m+k}\})\\
&=p^{2m+n+2k}p^{-3(m+k)}f(l+2k,0,m+k)\\
&=p^{l-k}f(l+2k,0,m+k).
\end{align*}
\textbf{Case 2b}: $l+2k< 0$.
In this case 
\begin{align*}
&\tilde{\theta}(p^k,p^m,p^n)\\
&=p^{2m+n+2k}\mu(\{(\xi,\eta,\zeta)\in\mathbb{Z}_p^3\ |\ \xi^2+p^{m-n-2k}\eta\zeta\equiv 0\bmod p^{m-l-k}\})\\
&=p^{2m+n+2k}p^{-3(m-l-k)}f(0,-l-2k,m-k-l)\\
&=p^{4l+5k}f(0,-l-2k,m-k-l).
\end{align*}
\textbf{Case 3}: $-m\leq k<-l$.
\begin{itemize}
\item $v(b_{11})\geq -n-k$
\item $v(b_{21})\geq -n-k$
\item $v(b_{12})\geq -m-k$
\item $v(\mathrm{det} B)\geq -n-k$.
\end{itemize}
Of course Case 3 is only relevant if $m>l$, i.e. $2m>n$.

We perform a change of variables $\mathbb{Q}_p^3\to \mathbb{Q}_p^3$, $(b_{11},b_{12},b_{21})\mapsto (\xi, \eta, \zeta)=(p^{n+k} b_{11}, p^{m+k} b_{12}, p^{n+k}b_{21})$. The new variables all lie in $\mathbb{Z}_p$ and the change of variables introduces a Jacobian equal to $p^{m+2n+3k}$. Thus 
\begin{align*}
&\tilde{\theta}(p^k,p^m,p^n)\\
&=\mu(\{(b_{11},b_{12},b_{21})\in \mathbb{Q}_p^3\ |\ b_{11}^2+b_{12}b_{21}\equiv 0 \bmod p^{-n-k}, v(b_{11}), v(b_{21})\geq -n-k, v(b_{12})\geq -m-k\})\\
&=p^{m+2n+3k}\mu(\{(\xi,\eta,\zeta)\in\mathbb{Z}_p^3\ |\ \xi^2+p^l\eta\zeta\equiv 0\bmod p^{n+k}\})\\
&=p^{m+2n+3k}p^{-3(n+k)}f(0,l,n+k)\\
&=p^{-l}f(0,l,n+k).
\end{align*}

\end{proof}

We now define generating functions as follows:

\begin{definition}\quad 

$F_{\alpha,0}(T)=\sum_{n=0}^\infty f(\alpha,0,n)T^n$

$F_{0,\alpha}(T)=\sum_{n=0}^\infty f(0,\alpha,n)T^n$

$F_{0,0}(T)=\sum_{n=0}^\infty f(0,0,n)T^n$

$F^*_{0,\alpha}(T)=\sum_{n=\alpha}^\infty f(0,\alpha,n)T^n$

\end{definition}
We then have the following results, which provide indirect formulae for $f$:

\begin{lemma}\label{lemma:F-fns}
For all $\alpha\geq 0$, 
\begin{displaymath}
F_{\alpha,0}(T)=\frac{1-pT}{(1-p^2T)^2}+\frac{p^{2\alpha+1}T^{\alpha+1}(1-p)(1-pT)}{(1-p^2T)^2(1-p^3T^2)},
\end{displaymath}
\begin{displaymath}
F_{0,\alpha}(T)=
\left\{
\begin{array}{ll}
\vspace{0.3cm}
\frac{1+p^2T}{1-p^5T^2}-\frac{p^{\frac{5\alpha+1}{2}}T^{\alpha+1}(p-1)^2(1+p^4T^2)}
{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}&\alpha \ \text{odd}, \alpha\geq 1\\
\frac{1+p^2T}{1-p^5T^2}-\frac{p^{\frac{5\alpha+4}{2}}T^{\alpha+2}(p-1)^2(1+p)}
{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}&\alpha \ \text{even}, \alpha\geq 0
\end{array}
\right.
\end{displaymath}
In particular,
\begin{displaymath}
F_{0,0}(T)=\frac{1-p^2T^2}{(1-p^2T)(1-p^3T^2)}.
\end{displaymath}
\end{lemma}
\begin{proof}
We note in passing that these formulae can be proved entirely by a recursive method using $p$-adic integration. We prefer to avoid this since there is a direct approach available, which we now outline.\\

We start by deriving the formula for $F_{0,0}(T)$. For each $m\geq 1$, let $f^*(0,0,m)$ denote the number of solutions modulo $p^m$ to the equation $x^2+yz$ where at least one of $x,y,z$ is a unit. We claim that for all $m\geq 1$, $f^*(0,0,m)=(p^2-1)p^{2(m-1)}$. If $x$ is a unit then both $y,z$ have to be units, and $z$ is determined by $x$ and $y$. This provides $(p^m-p^{m-1})^2$ solutions. When $x$ is not a unit, then precisely one of $y,z$ is not a unit and it is determined by the other one together with $x$. Thus we find a further $2p^{m-1}(p^m-p^{m-1})$ solutions. The sum checks with the claimed formula. We can now produce a recursive formula for $f(0,0,m)$. Suppose that we wish to count $f(0,0,m+2)$, the number of solutions of $x^2+yz$ modulo $p^{m+2}$. If one of $x,y,z$ is a unit, there are $f^*(0,0,m+2)=(p^2-1)p^{2(m+1)}$ possibilities. Alternatively, if they are all non-units, we can make the substitution $x=p\tilde{x}, y=p\tilde{y}, z=p\tilde{z}$ and we obtain a new equation $\tilde{x}^2+\tilde{y}\tilde{z}=0$ modulo $p^{m}$. Now each of the variables $\tilde{x}, \tilde{y}, \tilde{z}$ are determined only modulo $p^{m+1}$. Thus there are $p^3$ solutions to the original equation which reduce to the same solution modulo $p^m$. We thus obtain the recurrence relation $f(0,0,m+2)=f^*(0,0,m+2)+p^3f(0,0,m)=(p^2-1)p^{2(m+1)}+p^3f(0,0,m)$. We multiply through by $T^{m+2}$ and sum over $m$ to obtain

\begin{align*}
\sum_{m=0}^\infty f(0,0,m+2)T^{m+2}&=\sum_{m=0}^{\infty}(p^2-1)p^{2(m+1)}T^{m+2}+p^{3}T^2\sum_{m=0}^{\infty} f(0,0,m)T^m\\
\end{align*}

hence

\begin{align*}
(1-p^3T^2)F_{0,0}(T)&=f(0,0,0)+f(0,0,1)T+(1-p^{-2})\left[\frac{1}{1-p^{2-s}}-p^{2-s}-1\right]\\
&=1+p^2T+\frac{p^4T^2-p^2T^2}{1-p^2T}\\
&=\frac{1-p^2T^2}{1-p^2T}
\end{align*}

and the stated formula for $F_{0,0}(T)$ follows.\\

We next use this formula for $F_{0,0}(T)$ as the base for a recursive formula for the functions $F_{l,0}(T)$. We first establish the following relation: $f(l+1,0,m+1)=p^2f(l,0,m)+(p-1)p^{2m+1}$ for all $l,m\geq 0$. Given a solution $(x,y,z)\in (\mathbb{Z}/p^{m+1}\mathbb{Z})^3$ to the equation $p^{l+1}x^2+yz=0$, there are two possibilities. Either $z$ is a unit, in which case $y$ is determined by $x$ and $z$. This gives $p^{m+1}$ possibilities for $x$ and $(p-1)p^{m}$ possibilities for $z$, giving a total of $(p-1)p^{2m+1}$ possibilities in all. The alternative is that $z$ is not a unit. In this case, replacing $z$ by $p\tilde{z}$, the equation becomes $p^lx^2+y\tilde{z}=0$, now read modulo $p^m$. Note that each solution to this equation correspond to $p^2$ solutions to the original equation, since $x, y$ are determined only modulo $p^{m+1}$ (while $\tilde{z}$, is determined modulo $p^m$, hence so is $z$). Altogether, then, we find another $p^2 f(l,0, m)$ solutions, and this renders the claimed recursion formula. We can now compute a recurrence relation for $F_{l,0}(T)$:

\begin{align*}
F_{l+1, 0}(T)&=1+\sum_{m=0}^\infty f(l+1,0,m+1)T^{m+1}\\
&=1+\sum_{m=0}^\infty p^2T f(l,0,m)T^{m}+\sum_{m=0}^{\infty}(p-1)p^{2m+1}T^{m+1}\\
&=1+(p-1)\frac{pT}{1-p^2T}+p^2TF_{l,0}(T)\\
&=\frac{1-pT}{1-p^2T}+p^2TF_{l,0}(T).
\end{align*}
We now establish the formula for $F_{\alpha, 0}(T)$ given in the lemma. As a base case, taking $\alpha=0$, a short computation reproduces the formula we showed above for $F_{0,0}(T)$. To establish the formula for $F_{\alpha,0}(T)$ in general, it is sufficient to verify that it satisfies the recurrence relation that we have derived. Indeed, substituting in the claimed expression for $F_{l,0}(T)$ we obtain 

\begin{align*}
F_{l+1,0}(T)-p^2TF_{l,0}(T)&=\frac{1-pT}{(1-p^2T)^2} (1-p^2T)=\frac{1-pT}{1-p^2T}.
\end{align*}

It remains to derive the expressions for $F_{0,l}(T)$. We claim firstly that for all $l,m\geq 0$, $f(0,l+2,m+2)=p^5 f(0,l,m)$. Given a solution $(x,y,z)\in (\mathbb{Z}/p^{m+2}\mathbb{Z})^3$ to the equation $x^2+p^{l+2}yz=0$, $x$ cannot be a unit, and so we may write $x=p\tilde{x}$ and then simplify the equation to $\tilde{x}^2+p^l y z=0$ modulo $p^m$. Note that $\tilde{x}$ is only determined modulo $p^{m+1}$ while $y$ and $z$ are only determined modulo $p^{m+2}$. Thus, to each solution to $\tilde{x}^2+p^l y z=0$ modulo $p^m$ there correspond $p^5$ solutions to $x^2+p^{l+2}yz=0$ modulo $p^{m+2}$, as claimed. We now calculate:

\begin{align*}
F_{0,l+2}(T)&=\sum_{m=0}^{\infty}f(0,l+2,m)T^m\\
&=1+f(0,l+2,1)T+\sum_{m=0}^\infty f(0,l+2,m+2)T^{m+2}\\
&=1+p^2T+p^5T^2F_{0,l}(T).
\end{align*}
To verify the formulae given in the Lemma, we consider separately the even and odd cases. For the even case, one easily verifies that substituting $\alpha=0$ produces the formula for $F_{0,0}$. Thus to verify the given formula for the even case it is sufficient to check that the formula satisfies the recurrence relation that we have derived. Indeed,

\begin{align*}
F_{0,l+2}(T)-p^5T^2F_{0,l}(T)&=(1-p^5T^2)\frac{1+p^2T}{1-p^5T^2}\\
&=1+p^2T
\end{align*}
as required. In fact, the identical calculation as above shows that the recurrence relation is also satisfied in the odd case. It remains to verify that the given formula is correct when $\alpha=1$. We now derive this formula independently. For all $m\geq 0$, it is readily seen that for $x^2+pyz=0$ to have a solution modulo $p^{m+2}$, $x$ and at least one of $y$ and $z$ must be non-units. We deal with two cases: 

\textbf{Case 1:} all three of $x,y,z$ are non-units. Then we can write $x=p\tilde{x}, y=p\tilde{y}, z=p\tilde{z}$ and we obtain the equation $\tilde{x}^2+p\tilde{y}\tilde{z}=0$ modulo $p^m$. Since $\tilde{x}, \tilde{y}, \tilde{z}$ are determined modulo $p^{m+1}$, there are $p^3$ solutions to the equation modulo $p^{m+2}$ that correspond to a single solution to the equation modulo $p^m$. 

\textbf{Case 2:} One of $y,z$ is a unit. Since this is symmetrical in $y,z$ we assume that $z$ is a unit and $y$ is not a unit. At the end we will multiply by $2$ to account for the reverse possibility. We write $x=p\tilde{x}, y=p\tilde{y}$. The equation becomes $\tilde{x}^2+\tilde{y}z=0$ modulo $p^{m}$. Note that for every solution to this new equation, there correspond $p\cdot p\cdot p^2=p^4$ solutions to the original equation since $\tilde{x}$ and $\tilde{y}$ are determined modulo $p^{m+1}$ while $z$ is determined modulo $p^{m+2}$. To count solutions to the new equation, remembering that $z$ is a unit, we note that $y$ is uniquely determined by $x, z$. This gives $p^m\cdot (p^m-p^{m-1})$ possibilities ($z$ being a unit). Thus the total number of solutions for this case is $2p^4\cdot p^{2m-1}(p-1)=2(p-1)p^{2m+3}$. \\

From cases 1 and 2 we obtain the recurrence relation $f(0,1,m+2)=2p^{2m+3}(p-1)+p^3f(0,1,m)$. Multiplying through by $T^{m+2}$ and taking the sum over all $m$, we obtain

\begin{align*}
\sum_{m=0}^{\infty}f(0,1,m+2)T^{m+2}&=\sum_{m=0}^{\infty} 2(p-1)p^{2m+3}T^{m+2}+p^3T^2\sum_{m=0}^{\infty} f(0,1,m)T^m
\end{align*}
and hence
\begin{align*}
(1-p^3T^2)F_{0,1}(T)&=f(0,1,0)+f(0,1,1)T+2(1-p^{-1})\sum_{m=0}^{\infty} (p^{2}T)^{m+2}\\
&=1+p^2T+2(1-p^{-1})\left[\frac{1}{1-p^2T}-1-p^2T\right]\\
&=1+p^2T+2(1-p^{-1})\frac{p^4T^2}{1-p^2T}\\
&=\frac{1+(-2p^3+p^4)T^2}{1-p^T}.
\end{align*}
It is readily checked that this agrees with the formula given in the lemma for $F_{0,\alpha}(T)|_{\alpha=1}$.



\end{proof}



For later use, we record a corollary of the above lemma. 
\begin{lemma}\label{lemma:Fstar-fns}
For each $\alpha\geq 0$, define 
$F_{0,\alpha}^*(T)=\sum_{n=\alpha}^\infty f(0,\alpha,n)T^n$. Then 
\begin{displaymath}
F^*_{0,\alpha}(T)=
\left\{
\begin{array}{ll}
\vspace{0.3cm}
p^{\frac{5\alpha-1}{2}}T^\alpha \left[\frac{1+p^3T}{1-p^5T^2}-\frac{pT(p-1)^2(1+p^4T^2)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}\right]
&\alpha \ \text{odd}, \alpha\geq 1\\
p^{\frac{5\alpha}{2}}T^\alpha \left[\frac{1+p^2T}{1-p^5T^2}-\frac{p^2T^2(p-1)^2(1+p)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}\right]
&\alpha \ \text{even}, \alpha\geq 0
\end{array}
\right.
\end{displaymath}
and for $Y$ an indeterminate,
\begin{displaymath}
\begin{array}{l}
\sum_{\alpha=0}^\infty Y^\alpha F_{0,\alpha}^*(T)\\
=\frac{1}{1-p^5Y^2T^2}\left[p^2YT\left[
\frac{1+p^3T}{1-p^5T^2}-\frac{pT(p-1)^2(1+p^4T^2)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}
\right]
+\frac{1+p^2T}{1-p^5T^2}-\frac{p^2T^2(p-1)^2(1+p)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}\right].
\end{array}
\end{displaymath}
\end{lemma}
\begin{proof}
In calculating $F_{0,\alpha}^*(T)=\sum_{n=\alpha}^\infty f(0,\alpha,n)T^n$, we note that in reference to the formulae appearing in Lemma~\ref{lemma:F-fns}, the contribution to powers $T^i$ of $T$ for $i<\alpha$ come entirely from the first term 
$\frac{1-pT}{(1-p^2T)^2}$. This is due to the fact that the second term can be re-written, expanding the denominators into power series in $T$, and then is readily seen to have a power of (at least) $T^{\alpha+1}$ as a common factor of all its terms. We thus can obtain $F^*_{0,\alpha}(T)$ from $F_{0,\alpha}(T)$ by removing the terms $T^i, i<\alpha$ from the expanded form of $\frac{1-pT}{(1-p^2T)^2}$. Write
$\frac{1-pT}{(1-p^2T)^2}=\sum_{n=0}^\infty f^\diamond(0,\alpha,n)T^n$. If $\alpha$ is even, then writing $\alpha=2k$ we have 
\begin{displaymath}
\begin{array}{lll}
\sum_{n=2k}^\infty f^\diamond(0,\alpha,n)T^n&=&(1+p^2T)(p^{5k}T^{2k}+p^{5(k+1)T^{2(k+1)}}+\cdots)\\
&=&\frac{p^{5k}T^{2k}(1+p^2T)}{1-p^5T^2}\\
&=&\frac{p^{5\alpha/2}T^{\alpha}(1+p^2T)}{1-p^5T^2}
\end{array}
\end{displaymath}
and the corresponding formula for $F_{0,\alpha}^*(T)$ is obtained. If $\alpha$ is odd, then writing $\alpha=2k+1$ we have
\begin{displaymath}
\begin{array}{lll}
\sum_{n=2k+1}^\infty f^\diamond(0,\alpha,n)T^n&=&
-p^{5k}T^{2k}+\frac{p^{5k}T^{2k}(1+p^2T)}{1-p^5T^2}\\
&=& p^{5k+2}T^{2k+1}\frac{1+p^3T}{1-p^5T^2}\\
&=& p^{\frac{5\alpha-1}{2}}T^{\alpha}\frac{1+p^3T}{1-p^5T^2}
\end{array}
\end{displaymath}
and once again the corresponding formula for $F_{0,\alpha}^*(T)$ is obtained. Now for an indeterminate $Y$, we have 
\begin{align*}
\vspace{0.3cm}
\sum_{\alpha=0}^\infty Y^\alpha F_{0,\alpha}^*(T)=&\sum_{k=0}^\infty Y^{2k+1} F_{0,2k+1}^*(T)+\sum_{k=0}^\infty Y^{2k} F_{0,2k}^*(T)\\
\vspace{0.3cm}
=&Y\sum_{k=0}^\infty Y^{2k}p^{5k+2}T^{2k+1}\left[\frac{1+p^3T}{1-p^5T^2}-\frac{pT(p-1)^2(1+p^4T^2)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}\right]\\
\vspace{0.3cm}
&+\sum_{k=0}^\infty Y^{2k}p^{5k}T^{2k} \left[\frac{1+p^2T}{1-p^5T^2}-\frac{p^2T^2(p-1)^2(1+p)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}\right]\\
=&
\frac{1}{1-p^5Y^2T^2}\left[p^2YT\left[
\frac{1+p^3T}{1-p^5T^2}-\frac{pT(p-1)^2(1+p^4T^2)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}
\right]\right.\\
&\left. +\frac{1+p^2T}{1-p^5T^2}-\frac{p^2T^2(p-1)^2(1+p)}{(1-p^2T)(1-p^5T^2)(1-p^3T^2)}\right].
\end{align*}
\end{proof}

\subsection{Completion of the calculation using $p$-adic Bruhat decomposition}

We now begin the calculation of the zeta function. As far as possible, we will follow the line already described in  Section~\ref{section:x^2}. We start by noting that the map $\text{GL}_2\times \text{GL}_1\to H$,
$(A,\mu)\mapsto \mathrm{diag}(\mu^{-1} A, A, \mu A, \mu^{-1} \mathrm{det} A, \mathrm{det} A)$ is faithful and measure-preserving. Thus from hereon we may identify $H$ with $\text{GL}_2\times \text{GL}_1$ and by abuse of notation write our faithful representation as $\rho: (A,\mu)\mapsto \mathrm{diag}(\mu^{-1} A, A, \mu A, \mu^{-1} \mathrm{det} A, \mathrm{det} A)$.

We fix a maximal torus
$T=\{\mathrm{diag}(\lambda_1,\lambda_2,\mu) \Big\vert \lambda_1,\lambda_2, \mu\in \mathbb{Q}_p \}$ of $H$. As before we apply Proposition~\ref{proposition:formula-integral} to obtain

$$\zeta^\wedge_{L, p}(s)=\sum_{w\in W}p^{-\lambda(w1)}\sum_{\xi\in w\Xi_w^+}|\alpha(\xi(\pi))|^{-1}|\mathrm{det}(\rho(\xi(\pi)))|\theta(\rho(\pi))$$

where we choose  $\alpha\in \text{Hom}(T,\mathbb{G}_m), \alpha(\text{diag}(\lambda_1, \lambda_2, \mu))=\lambda_1\lambda_2^{-1}$ as the single positive root and, in our situation, 

$$w\Xi_w^+=\{\xi\in \Xi^+ | \alpha(\xi(\pi))\in \mathbb{Z}_p, \alpha(\xi(\pi))\in p\mathbb{Z}_p\ \text{if}\ w=w_0\}$$

where the Weyl group $W$ consists of the identity $1$ and one other element $w_0$ permuting the positive and negative roots.

We next provide a description of the dominant weights, a choice of basis for $\text{Hom}(T,\mathbb{G}_m)$ and a dual basis for $\text{Hom}(\mathbb{G}_m, T)$. The form of a diagonal element of the automorphism group is:

$$t=\text{diag}(\mu^{-1}\lambda_1,\mu^{-1}\lambda_2,\lambda_1,\lambda_2,\mu\lambda_1,\mu\lambda_2,\mu^{-1}\lambda_1\lambda_2,\lambda_1\lambda_2).$$ 

Thus the dominant weights are
\begin{align*}
&\omega^{-1}_1:(\lambda_1,\lambda_2,\mu)\mapsto \mu^{-1}\lambda_2\\
&\omega^{-1}_2:(\lambda_1,\lambda_2,\mu)\mapsto \lambda_2\\
&\omega^{-1}_3:(\lambda_1,\lambda_2,\mu)\mapsto \mu\lambda_2\\
&\omega^{-1}_4:(\lambda_1,\lambda_2,\mu)\mapsto \mu^{-1}\lambda_1\lambda_2\\
&\omega^{-1}_5:(\lambda_1,\lambda_2,\mu)\mapsto \lambda_1\lambda_2.
\end{align*}

One easily sees that $\alpha, \omega^{-1}_1, \omega^{-1}_2$ is a $\mathbb{Z}$-basis for $\text{Hom}(T, \mathbb{G}_m)$ and we write $\alpha_1=\alpha, \alpha_2=\omega^{-1}_1, \alpha_3=\omega^{-1}_2$. Significantly, we do not have that $\alpha_i(\tau)\in \mathbb{Z}_p$ for $i=1,2,3$ guarantees $\tau\in H^+$. The reason is that the remaining dominant weights do not all lie in the positive $\mathbb{Z}$ span of $\alpha_1, \alpha_2, \alpha_3$. However, adding the stipulation that $\omega_3^{-1}(\tau)\in \mathbb{Z}_p$ does ensure that $\tau\in H^+$. We will need to keep this condition in mind and apply it towards the end of the calculation. We mention, for later use, that $\omega_3^{-1}=\alpha_2^{-1}\alpha_3^2$.

It may readily be checked that 

\begin{align*}
&\xi_1:\tau \mapsto (\tau,1,1)\\
&\xi_2:\tau \mapsto (1,1, \tau^{-1})\\
&\xi_3:\tau \mapsto (\tau,\tau,\tau)
\end{align*}

is a dual basis to $\alpha_1:(\lambda_1,\lambda_2,\mu)\mapsto\lambda_1\lambda_2^{-1}, \alpha_2:(\lambda_1,\lambda_2,\mu)\mapsto\mu^{-1}\lambda_2, \alpha_3:(\lambda_1,\lambda_2,\mu)\mapsto\lambda_2$. Writing $\xi=\underline{\xi}^\mathbf{e}=\xi_1^{e_1}\xi_2^{e_2}\xi_3^{e_3}$ we find that $\xi(\pi)=(\pi^{e_1+e_3},\pi^{e_3},\pi^{e_3-e_2})$ hence
$\rho(\xi(\pi))=\text{diag}(\pi^{e_1+e_2},\pi^{e_2},\pi^{e_1+e_3},\pi^{e_3},\pi^{e_1-e_2+2e_3},\pi^{-e_2+2e_3},\pi^{e_1+e_2+e_3},\pi^{e_1+2e_3})$ and so
$|\mathrm{det} \rho(\xi(\pi))|^s=p^{-(5e_1+e_2+9e_3)s}$. Writing $(\pi^n,\pi^m,\pi^k)=\xi(\pi)=(\pi^{e_1+e_3},\pi^{e_3},\pi^{e_3-e_2})$ we have $m=e_3, n=e_1+e_3, k=e_3-e_2$, or equivalently, $e_1=n-m, e_2=m-k, e_3=m$. Recall that $l=n-m$ so that $l=e_1$.



We find that\\
\begin{align*}
x\Xi^+_w&=\{\xi\ |\ \langle \alpha_i, \xi\rangle\geq 0 \ i=1,2,3; \langle \omega_j^{-1}, \xi\rangle \geq 0\ j=3,4,5; \langle \alpha_1,\xi\rangle>0\ \text{if}\ \alpha_1\in w\Phi^-\}\\
&=\{\xi\ |\ \langle \alpha_i, \xi\rangle\geq 0 \ i=1,2,3; \langle \omega_3^{-1}, \xi\rangle \geq 0;\ \langle \alpha_1,\xi\rangle>0\ \text{if}\ w\neq 1\}\\
&=\{\underline{\xi}^\textbf{e}\ |\ e_i\geq 0 \ i=1,2,3; 2e_3\geq e_2; e_1>0\ \text{if}\ w\neq 1\}.\\
\end{align*}

Putting $t=p^{-s}$ and writing $\mathcal{C}_w=\{\mathbf{e}\in\mathbb{R}^3\ |\ e_i\geq 0, 2e_3\geq e_2, e_1>0\ \text{if}\ w\neq 1 \}$, we have

\begin{align*}
\int_{H^+}|\mathrm{det} h|^{s}\theta(h)d\mu&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\xi\in w\Xi^+_w}p^{\langle \alpha_1, \xi\rangle}|\mathrm{det}\rho(\xi(\pi))|^s\theta(\rho(\xi(\pi))) d\mu\\
&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\textbf{e}\in \mathcal{C}_w\cap \mathbb{Z}^3}p^{\langle \alpha_1, \underline{\xi}^{\textbf{e}}\rangle}|\mathrm{det}\rho(\underline{\xi}^{\textbf{e}}(\pi))|^s\theta(\rho(\xi(\pi))) \\
&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\textbf{e}\in \mathcal{C}_w\cap \mathbb{Z}^3}p^{(1-5s)e_1-e_2s-9e_3s}\theta(\textbf{e}),
\end{align*}

slightly abusing notation for the function $\theta$. Note that the first equality follows from \cite[Lemma~3.10]{Be11} We now re-write the function $\theta(\textbf{e})$. As noted earlier, 

$\theta(h)=\theta_0(h)\theta_3(h)$ where 
$\theta_3(h)=p^{6(2m+2n-k)}$,
$\theta_0(h)=p^{4k+3m+n}\tilde{\theta} (p^k, p^m, p^n)$
and the function $\tilde{\theta}(p^k, p^m, p^n)$ is given by the following case distintions:


\textbf{Case 1}: $\tilde{\theta}(p^k,p^m,p^n)=p^{3k+l}f(l,0,m-k)$

\textbf{Case 2a}: 
$\tilde{\theta}(p^k,p^m,p^n)=p^{-k+l}f(2k+l,0,m+k)$

\textbf{Case 2b}: 
$\tilde{\theta}(p^k,p^m,p^n)=p^{5k+4l}f(0,-2k-l,m-k-l)$

\textbf{Case 3}: 
$\tilde{\theta}(p^k,p^m,p^n)=p^{-l}f(0,l,m+k+l)$.


Note that for $h=\xi^\textbf{e}$ we have $\theta(\textbf{e})=p^{6(2m+2n-k)}p^{4k+3m+n}\tilde{\theta}(\textbf{e})=p^{15m+13n-2k}\tilde{\theta}(\textbf{e})=p^{13e_1+2e_2+26e_3}\tilde{\theta}(\textbf{e})$. We now re-write the case distinctions for $\tilde{\theta}(\textbf{e})$:

\textbf{Case 1}: $e_3-e_2\geq 0$.

\textbf{Case 2a}: $\max \{-e_1, -e_3\}\leq e_3-e_2<0$, $e_1-2e_2+2e_3\geq 0$.

\textbf{Case 2b}: $\max \{-e_1, -e_3\}\leq e_3-e_2<0$, $e_1-2e_2+2e_3< 0$.

\textbf{Case 3}: $-e_3\leq e_3-e_2<-e_1$.

We have


\textbf{Case 1}: $\tilde{\theta}(\textbf{e})=p^{e_1-3e_2+3e_3}f(e_1,0,e_2)$

\textbf{Case 2a}: 
$\tilde{\theta}(\textbf{e})=p^{e_1+e_2-e_3}f(e_1-2e_2+2e_3,0,-e_2+2e_3)$

\textbf{Case 2b}: 
$\tilde{\theta}(\textbf{e})=p^{4e_1-5e_2+5e_3}f(0,-e_1+2e_2-2e_3,-e_1+e_2)$

\textbf{Case 3}: 
$\tilde{\theta}(\textbf{e})=p^{-e_1}f(0,e_1,e_1-e_2+2e_3)$.

Note that the conditions defining the four different cases can each be expressed as an intersection of linear inequalities in the coordinates of $\textbf{e}$. It follows that the lattice points belonging to any one case are closed under addition and positive-integer multiplication. 

Before analyzing in further detail the polyhedral cone we are dealing with, we summarise the form we have obtained thus far for the zeta function:

\begin{align*}
\int_{H^+}|\mathrm{det} h|^{s}\theta(h)d\mu&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\textbf{e}\in \mathcal{C}_w\cap \mathbb{Z}^3}p^{(1-5s)e_1-e_2s-9e_3s}\theta(\textbf{e})\\
&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\textbf{e}\in \mathcal{C}_w\cap \mathbb{Z}^3}p^{(1-5s)e_1-e_2s-9e_3s}p^{13e_1+2e_2+26e_3}\tilde{\theta}(\textbf{e})\\
&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\textbf{e}\in \mathcal{C}_w\cap \mathbb{Z}^3}p^{(14-5s)e_1+(2-s)e_2+(26-9s)e_3}\tilde{\theta}(\textbf{e})\\
&=\sum_{w\in W}p^{-\lambda(w)}\sum_{\textbf{e}\in \mathcal{C}_w\cap \mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\tilde{\theta}(\textbf{e})
\end{align*}

where $X_1=p^{14-5s}$, $X_2=p^{2-s}$, $X_3=p^{26-9s}$.




We now set about understanding sets $\mathcal{C}_w$ ($w\in \{1,\sigma\}$) geometrically. It is not hard to see that the cone $\mathcal{C}_1$ is in fact simplicial (but not simple), generated over $\mathbb{R}$ by the vectors $\mathbf{v}_1=(1,0,0)$, $\mathbf{v}_2=(0,2,1)$ and $\mathbf{v}_3=(0,0,1)$. Moreover, the fundamental domain $[0,1)\mathbf{v}_1+[0,1)\mathbf{v}_2+[0,1)\mathbf{v}_3$ contains precisely two lattice points, namely $(0,0,0)$ and $(0,1,1)$. Thus $\mathcal{C}_1\cap \mathbb{Z}^3=\text{sp}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\}\cupdot[(0,1,1)+\text{sp}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\}]$
and $\mathcal{C}_\sigma\cap \mathbb{Z}^3=(\mathbf{v}_1+\text{sp}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\})\cupdot(\mathbf{v}_1+[(0,1,1)+\text{sp}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\}])$. We will sometimes make use of the notation $\mathcal{C}_{123}=\mathcal{C}_1$. 

We now define subcones corresponding to the cases of interest:
\begin{align*}
\mathcal{C}_{1}&=\{(e_1,e_2,e_3)\in\mathbb{R}^3\ |\ e_3-e_2\geq 0; e_1,e_2,e_3\geq 0 \}\\
\mathcal{C}_{2a}&=\{(e_1,e_2,e_3)\in\mathbb{R}^3\ |\ \max \{-e_1, -e_3\}\leq e_3-e_2<0, e_1-2e_2+2e_3\geq 0; e_1,e_2,e_3\geq 0 \}\\
\mathcal{C}_{2b}&=\{(e_1,e_2,e_3)\in\mathbb{R}^3\ |\ \max \{-e_1, -e_3\}\leq e_3-e_2<0, e_1-2e_2+2e_3< 0; e_1,e_2,e_3\geq 0 \}\\
\mathcal{C}_{3}&=\{(e_1,e_2,e_3)\in\mathbb{R}^3\ |\ -e_3\leq e_3-e_2<-e_1; e_1,e_2,e_3\geq 0 \}.\\
\end{align*}

We now define three additional vectors $\mathbf{v}_4, \mathbf{v}_5,\mathbf{v}_6$. For convenience, we recall also the definitions of  $\mathbf{v}_1, \mathbf{v}_2,\mathbf{v}_3$.

\begin{align*}
\mathbf{v}_1&=(1,0,0)&\mathbf{v}_4&=(0,1,1)\\
\mathbf{v}_2&=(0,2,1)&\mathbf{v}_5&=(2,2,1)\\
\mathbf{v}_3&=(0,0,1)&\mathbf{v}_6&=(1,2,1).
\end{align*}


\begin{lemma}

The lattice points belonging to the various cases correspond to the lattice points in the following cones in $\mathbb{R}^3$:

\begin{align*}
\mathcal{C}_{1}&=\mathbb{R}^\geq \mathbf{v}_1+\mathbb{R}^\geq \mathbf{v}_3+\mathbb{R}^\geq \mathbf{v}_4\\
\mathcal{C}_{2a}&=\mathbb{R}^\geq \mathbf{v}_1+\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^> \mathbf{v}_5\\
\mathcal{C}_{2b}&=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^\geq \mathbf{v}_5+\mathbb{R}^> \mathbf{v}_6\\
\mathcal{C}_{3}&=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^\geq \mathbf{v}_6+\mathbb{R}^> \mathbf{v}_2.
\end{align*}

\end{lemma}
\begin{proof}
We start with $\mathcal{C}_1$. This case is defined by the conditions $e_3\geq e_2, e_1\geq 0, e_2\geq 0, e_3\geq 0$, the last of which may be omitted as it is implied by the others. The planes $e_3=e_2, e_1=0, e_2=0$ intersect pairwise on lines spanned by the vectors $\mathbf{v}_1,\mathbf{v}_3,\mathbf{v}_4$. Furthermore, the set $\{(e_1,e_2,e_3)\ |\ e_3\geq e_2, e_1\geq 0, e_2\geq 0\}$
contains these vectors. It follows that this set is the non-negative linear span of the three vectors. Thus $\mathcal{C}_{1}=\mathbb{R}^\geq \mathbf{v}_1+\mathbb{R}^\geq\mathbf{v}_3+\mathbb{R}^\geq \mathbf{v}_4$.

We consider next $\mathcal{C}_{2a}$. This case is defined by the conditions $e_3< e_2, 2e_3\geq e_2, e_1+e_3\geq e_2, e_1+2e_3\geq 2e_2; e_1, e_2, e_3\geq 0$. We claim that the three conditions $e_3< e_2, 2e_3\geq e_2, e_1+2e_3\geq 2e_2$ imply all the remaining ones. Indeed, assume that the three stated conditions hold. Then $e_1\geq 2(e_2-e_3)>0$ and also $2e_3\geq e_2>e_3$ hence $e_3>0$. From the latter it follows that $e_2>e_3>0$. Finally, $e_1+e_3\geq (2e_3-2e_2)+e_3=2e_2-e_3>e_2$. The planes $e_3=e_2, 2e_3=e_2, e_1+2e_3=2e_2$ intersect pairwise on lines spanned by the vectors $\mathbf{v}_1,\mathbf{v}_4,\mathbf{v}_5$. Furthermore, the set $\{(e_1,e_2,e_3)\ |\ e_3\leq  e_2, 2e_3\geq e_2, e_1+2e_3\geq 2e_2\}$
contains these vectors. It follows that this set is the non-negative linear span of the three vectors. Finally, the strict condition $e_3<e_2$ implies that $\mathcal{C}_{2a}=\mathbb{R}^\geq \mathbf{v}_1+\mathbb{R}^\geq\mathbf{v}_2+\mathbb{R}^> \mathbf{v}_3$.

We now consider $\mathcal{C}_{2b}$. This case is defined by the conditions $e_3< e_2, 2e_3\geq e_2, e_1+e_3\geq e_2, e_1+2e_3< 2e_2; e_1, e_2, e_3\geq 0$. We claim that the three conditions $2e_3\geq e_2, e_1+e_3\geq e_2, e_1+2e_3<2e_2$ imply all the remaining ones. Indeed, assume that the three stated conditions hold. Then $2(e_1+e_3)\geq 2e_2>e_1+2e_3$ thus $e_1>0$. Next, $4e_3\geq 2e_2>e_1+2e_3$ hence $e_3>\frac{1}{2}e_1>0$ and we obtain also $e_2>\frac{1}{2}(e_1+2e_3)>0$. Finally, we have $2e_2>e_1+2e_3=(e_1+e_3)+e_3\geq e_2+e_3$ hence $e_2>e_3$. The planes $2e_3=e_2, e_1+e_3=e_2, e_1+2e_3=2e_2$ intersect pairwise on lines spanned by the vectors $\mathbf{v}_4,\mathbf{v}_5,\mathbf{v}_6$. Furthermore, the set $\{(e_1,e_2,e_3)\ |\ 2e_3\geq e_2, e_1+e_3\geq e_2, e_1+2e_3\leq 2e_2\}$
contains these vectors. It follows that this set is the non-negative linear span of the three vectors. Finally, the strict condition $e_1+2e_3<2e_2$ implies that $\mathcal{C}_{2b}=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^\geq \mathbf{v}_5+\mathbb{R}^> \mathbf{v}_6$.

Finally we come to $\mathcal{C}_{3}$. This case is defined by the conditions $2e_3\geq e_2,e_1+e_3<e_2; e_1,e_2,e_3\geq 0$. We claim that the three conditions $e_1\geq 0, 2e_3\geq e_2, e_1+e_3<e_2$ imply all the remaining ones. Indeed, assume that the three stated conditions hold. Then $2e_3\geq e_2>e_1+e_3$ hence $e_3>e_1\geq 0$. We then have $e_2>e_1+e_3>0$. The planes $e_1=0, 2e_3=e_2, e_1+e_3=e_2$ intersect pairwise on lines spanned by the vectors $\mathbf{v}_4,\mathbf{v}_6,\mathbf{v}_2$. Furthermore, the set $\{(e_1,e_2,e_3)\ |\ e_1\geq 0, 2e_3\geq e_2, e_1+e_3\leq e_2\}$
contains these vectors. It follows that this set is the non-negative linear span of the three vectors. Finally, the strict condition $e_1+e_3<e_2$ implies that $\mathcal{C}_{3}=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^\geq \mathbf{v}_6+\mathbb{R}^> \mathbf{v}_2$.
\end{proof}

From here on we will write

\textbf{Case 1}: 
$\mathcal{C}_{134}:=\mathcal{C}_1=\mathbb{R}^\geq \mathbf{v}_1+\mathbb{R}^\geq \mathbf{v}_3+\mathbb{R}^\geq \mathbf{v}_4$

\textbf{Case 2a}: 
$\mathcal{C}_{145^+}:=\mathcal{C}_{2a}=\mathbb{R}^\geq \mathbf{v}_1+\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^> \mathbf{v}_5$

\textbf{Case 2b}: 
$\mathcal{C}_{456^+}:=\mathcal{C}_{2b}=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^\geq \mathbf{v}_5+\mathbb{R}^> \mathbf{v}_6$

\textbf{Case 3}: 
$\mathcal{C}_{462^+}:=\mathcal{C}_{3}=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^\geq \mathbf{v}_6+\mathbb{R}^> \mathbf{v}_2$.

It is easy to check that $\mathcal{C}_\sigma\subseteq \mathcal{C}_1= \mathcal{C}_{123}=\mathcal{C}_{134}\cupdot\mathcal{C}_{145^+}\cupdot\mathcal{C}_{456^+}\cupdot\mathcal{C}_{462^+}$. Thus, by summing over the lattice points of the four cones $\mathcal{C}_{135}, \mathcal{C}_{145^+}, \mathcal{C}_{456^+}, \mathcal{C}_{462^+}$ we will be able to deal separately with the different cases governing the form of $\tilde{\theta}$. It is readily checked that the fundamental domain of each of these four cones contains no non-trivial lattice points; that is, 

\begin{lemma}
We have\\

$([0,1)\mathbf{v}_1+[0,1)\mathbf{v}_3+[0,1)\mathbf{v}_4)\cap\mathbb{Z}^3=\{(0,0,0)\}$,

$([0,1)\mathbf{v}_1+[0,1)\mathbf{v}_4+[0,1)\mathbf{v}_5)\cap\mathbb{Z}^3=\{(0,0,0)\}$,

$([0,1)\mathbf{v}_4+[0,1)\mathbf{v}_5+[0,1)\mathbf{v}_6)\cap\mathbb{Z}^3=\{(0,0,0)\}$,

$([0,1)\mathbf{v}_4+[0,1)\mathbf{v}_6+[0,1)\mathbf{v}_2)\cap\mathbb{Z}^3=\{(0,0,0)\}$.\\
\end{lemma}


Thus the cones are each simple. In particular, 

$\mathcal{C}_{134}\cap\mathbb{Z}^3=\mathbb{Z}^\geq \mathbf{v}_1+\mathbb{Z}^\geq \mathbf{v}_3+\mathbb{Z}^\geq \mathbf{v}_4$,

$\mathcal{C}_{145^+}\cap\mathbb{Z}^3=\mathbb{Z}^\geq \mathbf{v}_1+\mathbb{Z}^\geq \mathbf{v}_4+\mathbb{Z}^> \mathbf{v}_5$,

$\mathcal{C}_{456^+}\cap\mathbb{Z}^3=\mathbb{Z}^\geq \mathbf{v}_4+\mathbb{Z}^\geq \mathbf{v}_5+\mathbb{Z}^> \mathbf{v}_6$,

$\mathcal{C}_{462^+}\cap\mathbb{Z}^3=\mathbb{Z}^\geq \mathbf{v}_4+\mathbb{Z}^\geq \mathbf{v}_6+\mathbb{Z}^> \mathbf{v}_2$.

Writing 

$Z(s)=\int_{H^+}|\mathrm{det} h|^{s}\theta(h)d\mu$, we have

\begin{align*}
Z(s)&=p^0 \sum_{\textbf{e}\in \mathcal{C}_{123}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})+p^{-1} \sum_{\textbf{e}\in \mathcal{C}_{\sigma}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=(1+p^{-1}) \sum_{\textbf{e}\in \mathcal{C}_{123}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})-p^{-1} \sum_{\textbf{e}\in \mathcal{C}_{23}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})
\end{align*}
where
$\mathcal{C}_{23}=\mathbb{R}^\geq \mathbf{v}_2+\mathbb{R}^\geq \mathbf{v}_3$. Observe that 
$\mathcal{C}_{\sigma}=\mathcal{C}_{123}\backslash \mathcal{C}_{23}$.

For ease of reference, we write 

$Z_{123}(s)=\sum_{\textbf{e}\in \mathcal{C}_{123}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})$
and $Z_{23}(s)=\sum_{\textbf{e}\in \mathcal{C}_{23}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})$, so that 
$Z(s)=(1+p^{-1})Z_{123}(s)-p^{-1}Z_{23}(s)$. We also write $Z_{134}=\sum_{\textbf{e}\in \mathcal{C}_{134}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})$ and similarly for the other cones. 

We now set about calculating $Z_{123}(s)=Z_{134}(s)+Z_{145^+}(s)+Z_{456^+}(s)+Z_{462^+}(s)$. We have (Case 1):

\begin{align*}
Z_{134}(s)&=\sum_{\textbf{e}\in \mathcal{C}_{134}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=\sum_{\mathcal{C}_{134}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}p^{e_1-3e_2+3e_3}f(e_1,0,e_2)\\
&=\sum_{\mathcal{C}_{134}\cap\mathbb{Z}^3}(pX_1)^{e_1}(p^{-3}X_2)^{e_2}(p^3X_3)^{e_3}f(e_1,0,e_2)\\
&=\sum_{r_1,r_3,r_4\geq 0}(pX_1)^{r_1}(p^{3}X_3)^{r_3}(X_2X_3)^{r_4}f(r_1,0,r_4)\\
&(\text{where}\ (e_1,e_2,e_3)=r_1\mathbf{v}_1+r_3\mathbf{v}_3+r_4\mathbf{v}_4=(r_1,r_4,r_3+r_4) )\\
&=\frac{1}{1-p^3X_3}\sum_{r_1=0}^\infty (pX_1)^{r_1}F_{r_1,0}(X_2X_3).
\end{align*}
The penultimate equality follows by expressing the lattice points of the cone as non-negative integer linear combinations of the vectors $\mathbf{v}_1, \mathbf{v}_3, \mathbf{v}_4$. Next we consider Case 2a. We have

\begin{align*}
Z_{145^+}(s)&=\sum_{\textbf{e}\in \mathcal{C}_{145^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=\sum_{\mathcal{C}_{145^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}p^{e_1+e_2-e_3}f(e_1-2e_2+2e_3,0,-e_2+2e_3)\\
&=\sum_{\mathcal{C}_{145^+}\cap\mathbb{Z}^3}(pX_1)^{e_1}(pX_2)^{e_2}(p^{-1}X_3)^{e_3}f(e_1-2e_2+2e_3,0,-e_2+2e_3)\\
&=\sum_{r_1,r_4\geq 0, r_5>0}(pX_1)^{r_1}(X_2X_3)^{r_4}(p^3X_1^2X_2^2X_3)^{r_5}f(r_1,0,r_4)\\
&(\text{where}\ (e_1,e_2,e_3)=r_1\mathbf{v}_1+r_4\mathbf{v}_4+r_5\mathbf{v}_5=(r_1+2r_5,r_4+2r_5,r_4+r_5)) \\
&=\frac{p^3X_1^2X_2^2X_3}{1-p^3X_1^2X_2^2X_3}\sum_{r_1=0}^\infty (pX_1)^{r_1}F_{r_1,0}(X_2X_3).
\end{align*}
The penultimate equality follows by expressing the lattice points of the cone as appropriate integer linear combinations of the vectors $\mathbf{v}_1, \mathbf{v}_4, \mathbf{v}_5$.

We now consider Case 2b. We have

\begin{align*}
Z_{456^+}(s)&=\sum_{\textbf{e}\in \mathcal{C}_{456^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=\sum_{\mathcal{C}_{456^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}p^{4e_1-5e_2+5e_3}f(0,-e_1+2e_2-2e_3,-e_1+e_2)\\
&=\sum_{\mathcal{C}_{456^+}\cap\mathbb{Z}^3}(p^4X_1)^{e_1}(p^{-5}X_2)^{e_2}(p^5X_3)^{e_3}f(0,-e_1+2e_2-2e_3,-e_1+e_2)\\
&=\sum_{r_4,r_5\geq 0, r_6>0}(X_2X_3)^{r_4}(p^3X_1^2X_2^2X_3)^{r_5}(p^{-1}X_1X_2^2X_3)^{r_6}f(0,r_6,r_4+r_6)\\
&(\text{where}\ (e_1,e_2,e_3)=r_4\mathbf{v}_4+r_5\mathbf{v}_5+r_6\mathbf{v}_6=(2r_5+r_6,r_4+2r_5+2r_6,r_4+r_5+r_6))  \\ 
&=\frac{1}{1-p^3X_1^2X_2^2X_3}\sum_{r_4\geq 0, r_6>0} (p^{-1}X_1X_2^2X_3)^{r_6}(X_2X_3)^{r_4}f(0,r_6,r_4+r_6)\\
&=\frac{1}{1-p^3X_1^2X_2^2X_3}\sum_{r_6=1}^\infty (p^{-1}X_1X_2)^{r_6}F_{0,r_6}^*(X_2X_3)
\end{align*}
where $F_{0,a}^*(T)=\sum_{n=a}^\infty f(0,a,n)T^n$ as defined above. The fourth equality follows by expressing the lattice points of the cone as appropriate integer linear combinations of the vectors $\mathbf{v}_4, \mathbf{v}_6, \mathbf{v}_2$.

We finally consider Case 3. We have

\begin{align*}
Z_{462^+}(s)&=\sum_{\textbf{e}\in \mathcal{C}_{462^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=\sum_{\mathcal{C}_{462^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}p^{-e_1}f(0,e_1,e_1-e_2+2e_3)\\
&=\sum_{\mathcal{C}_{462^+}\cap\mathbb{Z}^3}(p^{-1}X_1)^{e_1}X_2^{e_2}X_3^{e_3}f(0,e_1,e_1-e_2+2e_3)\\
&=\sum_{r_4,r_6\geq 0, r_2>0}(X_2X_3)^{r_4}(p^{-1}X_1X_2^2X_3)^{r_6}(X_2^2X_3)^{r_2}f(0,r_6,r_4+r_6)\\
&(\text{where}\ (r_4,r_6,r_2)=r_4\mathbf{v}_4+r_6\mathbf{v}_6+r_2\mathbf{v}_2=(r_6,r_4+2r_6+2r_2,r_4+r_6+r_2)) \\
&=\frac{X_2^2X_3}{1-X_2^2X_3}\sum_{r_4, r_6\geq 0} (p^{-1}X_1X_2^2X_3)^{r_6}(X_2X_3)^{r_4}f(0,r_6,r_4+r_6)\\
&=\frac{X_2^2X_3}{1-X_2^2X_3}\sum_{r_4, r_6\geq 0} (p^{-1}X_1X_2)^{r_6}(X_2X_3)^{r_4+r_6}f(0,r_6,r_4+r_6)\\
&=\frac{X_2^2X_3}{1-X_2^2X_3}\sum_{a=0}^\infty (p^{-1}X_1X_2)^aF_{0,a}^*(X_2X_3).
\end{align*}
The fourth equality follows by expressing the lattice points of the cone as appropriate integer linear combinations of the vectors $\mathbf{v}_4, \mathbf{v}_6, \mathbf{v}_2$.

We can now put these four expressions together to obtain:

\begin{align*}
Z_{123}(s)&=\left[\frac{1}{1-p^3X_3}+\frac{p^3X_1^2X_2^2X_3}{1-p^3X_1^2X_2^2X_3}\right]\sum_{r=0}^\infty (pX_1)^rF_{r,0}(X_2X_3)\\
&+\left[\frac{1}{1-p^3X_1^2X_2^2X_3}+\frac{X_2^2X_3}{1-X_2^2X_3}\right]\sum_{r=0}^\infty (p^{-1}X_1X_2)^r F_{0,r}^*(X_2X_3)\\
&-\frac{1}{1-p^3X_1^2X_2^2X_3}F_{0,0}^*(X_2X_3).
\end{align*}
Observe that 
$F_{0,0}^*(T)=\sum_{n=0}^\infty f(0,0,n) T^n=F_{0,0}(T)$.

We now embark on the calculation of $Z_{23}(s)$. Note firstly that $\mathcal{C}_{23}=\mathcal{C}_{34}\cupdot \mathcal{C}_{42^+}$ where, as usual, we are writing $\mathcal{C}_{34}=\mathbb{R}^\geq \mathbf{v}_3+\mathbb{R}^\geq \mathbf{v}_4$ and $\mathcal{C}_{42^+}=\mathbb{R}^\geq \mathbf{v}_4+\mathbb{R}^> \mathbf{v}_2$. Also, $\mathcal{C}_{34}$ and $\mathcal{C}_{42}$ are simple since $[0,1)\mathbf{v}_3+[0,1)\mathbf{v}_4\cap \mathbb{Z}^2=\{(0,0)\}$ and $[0,1)\mathbf{v}_4+[0,1)\mathbf{v}_2\cap \mathbb{Z}^2=\{(0,0)\}$.

It follows that $Z_{23}(s)=Z_{34}(s)+Z_{42^+}$ with, again, the obvious notation for $Z_{ij}(s)$.

Now, for $Z_{34}(s)$ we are in Case 1 and so

\begin{align*}
Z_{34}(s)&=\sum_{\textbf{e}\in \mathcal{C}_{34}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=\sum_{\mathcal{C}_{34}\cap\mathbb{Z}^3}(pX_1)^{e_1}(p^{-3}X_2)^{e_2}(p^3X_3)^{e_3}f(e_1,0,e_2)\\
&=\sum_{r_3,r_4\geq 0}(p^3X_3)^{r_3}(X_2X_3)^{r_4}f(0,0,r_4)\\
&(\text{where}\ (e_1,e_2,e_3)=r_3\mathbf{v}_3+r_4\mathbf{v}_4=(0,r_4,r_3+r_4))\\ 
&=\frac{1}{1-p^3X_3}\sum_{r_4\geq 0} (X_2X_3)^{r_4}f(0,0,r_4)=\frac{1}{1-p^3X_3}F_{0,0}(X_2X_3).
\end{align*}
The third equality follows by expressing the lattice points of the cone as appropriate integer linear combinations of the vectors $\mathbf{v}_3, \mathbf{v}_4$.

For $Z_{42^+}(s)$ we are in Case 3 so

\begin{align*}
Z_{42^+}(s)&=\sum_{\textbf{e}\in \mathcal{C}_{42^+}\cap\mathbb{Z}^3}X_1^{e_1}X_2^{e_2}X_3^{e_3}\theta(\textbf{e})\\
&=\sum_{\mathcal{C}_{42^+}\cap\mathbb{Z}^3}(p^{-1}X_1)^{e_1}(X_2)^{e_2}(X_3)^{e_3}f(0,e_1,e_1-e_2+2e_3)\\
&(\text{where}\ (e_1,e_2,e_3)=r_4\mathbf{v}_4+r_2\mathbf{v}_2=(0,r_4+2r_2,r_4+r_2)) \\ 
&=\sum_{r_2>0,r_4\geq 0}(X_2^2X_3)^{r_2}(X_2X_3)^{r_4}f(0,0,r_4)=\frac{X_2^2X_3}{1-X_2^2X_3}F_{0,0}(X_2X_3).
\end{align*}
The third equality follows by expressing the lattice points of the cone as appropriate integer linear combinations of the vectors $\mathbf{v}_2, \mathbf{v}_4$.

Putting these together, we obtain

$Z_{23}=\left[\frac{1}{1-p^3X_3}+\frac{X_2^2X_3}{1-X^2X_3}\right]F_{0,0}(X_2X_3)$. We can now finally write down an expression for our full zeta function:

\begin{align*}
Z(s)&=(1+p^{-1})Z_{123}(s)-p^{-1}Z_{23}(s)\\
&=(1+p^{-1})\left[\frac{1}{1-p^3X_3}+\frac{p^3X_1^2X_2^2X_3}{1-p^3X_1^2X_2^2X_3}\right]\sum_{r=0}^\infty (pX_1)^r F_{r,0}(X_2X_3)\\
&+(1+p^{-1})\left[\frac{1}{1-p^3X_1^2X_2^2X_3}+\frac{X_2^2X_3}{1-X_2^2X_3}\right]\sum_{r=0}^\infty (p^{-1}X_1X_2)^r F_{0,r}^*(X_2X_3)\\
&-
\left[
\frac{1+p^{-1}}{1-p^3X_1^2X_2^2X_3}+\frac{p^{-1}}{1-p^3X_3}+\frac{p^{-1}X_2^2X_3}{1-X_2^2X_3}
\right]
F_{0,0}^*(X_2X_3)\\
&=
\frac{(1+p^{-1})(1-p^6X_1^2X_2^2X_3^2)}{(1-p^3X_3)(1-p^3X_1^2X_2^2X_3)}
\sum_{r=0}^\infty (pX_1)^r F_{r,0}(X_2X_3)\\
&+
\frac{(1+p^{-1})(1-p^3X_1^2X_2^4X_3^2)}{(1-X_2^2X_3)(1-p^3X_1^2X_2^2X_3)}
\sum_{r=0}^\infty (p^{-1}X_1X_2)^r F_{0,r}^*(X_2X_3)\\
&-
\left[
\frac{1+p^{-1}}{1-p^3X_1^2X_2^2X_3}+\frac{p^{-1}}{1-p^3X_3}+\frac{p^{-1}X_2^2X_3}{1-X_2^2X_3}
\right]
F_{0,0}^*(X_2X_3).
\end{align*}
We can now plug in the formulae in Lemmas~\ref{lemma:F-fns} and \ref{lemma:Fstar-fns} to obtain 
\begin{align*}
Z(s)&=(1+p^{-1})Z_{123}(s)-p^{-1}Z_{23}(s)\\
&=\frac{(1+p^{-1})(1-p^6X_1^2X_2^2X_3^2)}{(1-p^3X_3)(1-p^3X_1^2X_2^2X_3)}\cdot \\
&\left[\sum_{r=0}^\infty \left[ (pX_1)^r 
\frac{1-pX_2X_3}{(1-p^2X_2X_3)^2}\right]+
\sum_{r=0}^\infty\left[ (p^3X_1X_2X_3)^r \frac{p(1-p)X_2X_3(1-pX_2X_3)}{(1-p^2X_2X_3)^2(1-p^3X_2^2X_3^2)}\right]\right]\\
&+\frac{(1+p^{-1})(1-p^3X_1^2X_2^4X_3^2)}{(1-X_2^2X_3)(1-p^3X_1^2X_2^2X_3)}\cdot \\
&\frac{1}{1-p^3X_1^2X_2^4X_3^2}\left[pX_1X_2^2X_3\left[
\frac{1+p^3X_2X_3}{1-p^5X_2^2X_3^2}-\frac{p(p-1)^2X_2X_3(1+p^4X_2^2X_3^2)}{(1-p^2X_2X_3)(1-p^5X_2^2X_3^2)(1-p^3X_2^2X_3^2)}
\right]\right.\\
&\left.+\frac{1+p^2X_2X_3}{1-p^5X_2^2X_3^2}-\frac{p^2(p-1)^2(1+p)X_2^2X_3^2}{(1-p^2X_2X_3)(1-p^5X_2^2X_3^2)(1-p^3X_2^2X_3^2)}\right]\\
&-
\left[
\frac{1+p^{-1}}{1-p^3X_1^2X_2^2X_3}+\frac{p^{-1}}{1-p^3X_3}+\frac{p^{-1}X_2^2X_3}{1-X_2^2X_3}
\right]
\frac{1-p^2X_2^2X_3^2}{(1-p^2X_2X_3)(1-p^3X_2^2X_3^2)}\\
&=\frac{(1+p^{-1})(1-p^6X_1^2X_2^2X_3^2)(1-pX_2X_3)}{(1-p^3X_3)(1-p^3X_1^2X_2^2X_3)(1-p^2X_2X_3)^2} \left[ \frac{1}{1-pX_1}+
 \frac{p(1-p)X_2X_3}{(1-p^3X_1X_2X_3)(1-p^3X_2^2X_3^2)}\right]\\
&+\frac{(1+p^{-1})}{(1-X_2^2X_3)(1-p^3X_1^2X_2^2X_3)(1-p^5X_2^2X_3^2)}\cdot \\
&\left[pX_1X_2^2X_3\left[
1+p^3X_2X_3-\frac{p(p-1)^2X_2X_3(1+p^4X_2^2X_3^2)}{(1-p^2X_2X_3)(1-p^3X_2^2X_3^2)}
\right]+1+p^2X_2X_3-\frac{p^2(p-1)^2(1+p)X_2^2X_3^2}{(1-p^2X_2X_3)(1-p^3X_2^2X_3^2)}\right]\\
&-
\left[
\frac{1+p^{-1}}{1-p^3X_1^2X_2^2X_3}+\frac{p^{-1}}{1-p^3X_3}+\frac{p^{-1}X_2^2X_3}{1-X_2^2X_3}
\right]
\frac{1-p^2X_2^2X_3^2}{(1-p^2X_2X_3)(1-p^3X_2^2X_3^2)}\\
\end{align*}
\begin{align*}
&=\frac{(1+p^{-1})(1-p^6X_1^2X_2^2X_3^2)(1-pX_2X_3)}{(1-p^3X_3)(1-p^3X_1^2X_2^2X_3)(1-p^2X_2X_3)^2} \left[ \frac{1}{1-pX_1}+
 \frac{p(1-p)X_2X_3}{(1-p^3X_1X_2X_3)(1-p^3X_2^2X_3^2)}\right]\\
&+\frac{(1+p^{-1})}{(1-X_2^2X_3)(1-p^3X_1^2X_2^2X_3)(1-p^5X_2^2X_3^2)}\cdot \\
&\left[1+p^2X_2X_3+pX_1X_2^2X_3+p^4X_1X_2^3X_3^2-
\frac
{p^2(p-1)^2X_2^2X_3^2(1+p+X_1X_2+p^4X_1X_2^3X_3^2)}
{(1-p^2X_2X_3)(1-p^3X_2^2X_3^2)}\right] \\
&-
\left[
\frac{1+p^{-1}}{1-p^3X_1^2X_2^2X_3}+\frac{p^{-1}}{1-p^3X_3}+\frac{p^{-1}X_2^2X_3}{1-X_2^2X_3}
\right]
\frac{1-p^2X_2^2X_3^2}{(1-p^2X_2X_3)(1-p^3X_2^2X_3^2)}
\end{align*}
  
where we recall that 
$X_1=p^{14-5s}, X_2=p^{2-s}, X_3=p^{26-9s}$.

Entering this data into Magma, we obtain the expression

$$\frac{(1-pX_2X_3)(-p^4X_1^3X_2^3X_3^2-p^3X_1^3X_2^2X_3-p^4X_1^2X_2^3X_3^2-pX_1^2X_2^2X_3+p^3X_1X_2X_3+X_1+pX_2X_3+1)}{(1-pX_1)(1-p^3X_3)(1-X_2^2X_3)(1-p^2X_2X_3)(1-p^3X_1^2X_2^2X_3)}.$$

This clearly satisfies a functional equation at the level of the formal variables $X_1,X_2,X_3$ with symmetry factor $-p^4X_2X_3=-p^{32-10s}$.
Recalling that $X_1=p^{14-5s}, X_2=p^{2-s}$, $X_3=p^{26-9s}$ and $Z(s)=\int_{H^+}|\mathrm{det} h|^{s}\theta(h)d\mu=\zeta^\wedge_{D^*_{x^3},p}(s)$

we obtain 

$$\zeta^\wedge_{D^*_{x^3},p}(s)=\frac{(1-p^{29-10s})(-p^{104-36s}-p^{90-31s}-p^{75-26s}-p^{59-21s}+p^{45-15s}+p^{29-10s}+p^{14-5s}+1)}{(1-p^{15-5s})(1-p^{29-9s})(1-p^{30-11s})(1-p^{30-10s})(1-p^{61-21s})}.$$


