%V4 revised version
%V3 submition version
\documentclass[12pt]{amsart}
\usepackage{amssymb,amsmath,amsthm,mathrsfs}
\usepackage[usenames]{color}
\usepackage{hyperref}
\usepackage[all]{xy}
\usepackage{xypic}
\usepackage{graphicx}
\usepackage{amscd}
\usepackage{xcolor}
%\usepackage{tikz-cd}
\usepackage{enumerate}

\oddsidemargin=0cm
\evensidemargin=0cm

\baselineskip 18pt \textwidth 16cm \sloppy \theoremstyle{plain}


\newtheorem{theorem}{Theorem}[subsection]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{question}[theorem]{Question}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{thmdef}[theorem]{Theorem-Definition}

\newtheorem{theoremABC}{Theorem}
\renewcommand{\thetheoremABC}{\Alph{theoremABC}}
\newtheorem{propositionABC}[theoremABC]{Proposition}


\newcommand{\g}{\mathfrak g}
\newcommand{\Z}{\mathbb Z}
\newcommand{\F}{\mathbb F}


%\newcommand{\nir}[1]{{\color{red}{Nir: #1}}}
\newcommand{\nir}[1]{{{#1}}}
\newcommand{\Rami}[1]{{{#1}}}
\newcommand{\RamiQ}[1]{{\color{magenta}{Rami: #1}}}
\newcommand{\RamiAlt}[1]{}
\newcommand{\RamiAbout}[1]{}


%\newcommand{\lbl}[1]{\label{#1}{\color{blue}{#1}}}
\newcommand{\lbl}[1]{\label{#1}}


\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\PGL}{PGL}
\DeclareMathOperator{\Sp}{Sp}
\DeclareMathOperator{\val}{val}
\DeclareMathOperator{\ac}{ac}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\End}{End}
\DeclareMathOperator{\Ad}{Ad}
\DeclareMathOperator{\ad}{ad}
\DeclareMathOperator{\Mat}{Mat}
\DeclareMathOperator{\Res}{Res}
\DeclareMathOperator{\Lie}{Lie}
\DeclareMathOperator{\trace}{trace}
\DeclareMathOperator{\rk}{rk}
\DeclareMathOperator{\Ind}{Ind}
\DeclareMathOperator{\red}{red}
\DeclareMathOperator{\Spec}{Spec}
\DeclareMathOperator{\Jac}{Jac}
\DeclareMathOperator{\characteristic}{char}
\DeclareMathOperator{\vol}{vol}
\DeclareMathOperator{\st}{st}
\DeclareMathOperator{\gr}{gr}
\DeclareMathOperator{\Rees}{Rees}
\DeclareMathOperator{\wt}{wt}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\linspan}{span}
\DeclareMathOperator{\Def}{Def}
\DeclareMathOperator{\Rep}{Rep}
\DeclareMathOperator{\Real}{Re}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\Gal}{Gal}
\DeclareMathOperator{\Frob}{Frob}
\DeclareMathOperator{\Fr}{Fr}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\VF}{{VF}}
\DeclareMathOperator{\VG}{{VG}}
\DeclareMathOperator{\RV}{{RV}}
\DeclareMathOperator{\RF}{{RF}}
\DeclareMathOperator{\ACVF}{ACVF}
\DeclareMathOperator{\Witt}{Witt}
\DeclareMathOperator{\Jet}{Jet}
\DeclareMathOperator{\Sch}{Sch}
\DeclareMathOperator{\Set}{Set}
\DeclareMathOperator{\rank}{rank}

\newcommand{\Q}{\mathbb Q}
\newcommand{\bQ}{\mathbb Q}

\newcommand{\alg}{{\textrm{alg}}}

% Local definitions
\DeclareMathOperator{\Irr}{Irr}
\newcommand{\FRS}{(FRS)}
\newcommand{\A}{\mathbb A}
%\newcommand{\pg}{multygraph}
\newcommand{\Pg}{Polygraph}
\newcommand{\pg}{polygraph}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Rami added
%\usepackage[usenames,dvipsnames]{xcolor}
%\usepackage{showkeys}



%A blue link (color #0645AD = rgb(6,69,173) =       ) is a link to a page that currently exists within Wikipedia.
%A dark blue link (#0B0080 = rgb(11,0,128) =       ) is a link to a page that has been visited already.
\definecolor{dblue}{RGB}{6,69,173}
\definecolor{lblue}{RGB}{11,0,128}

\newcommand{\colorlinks}{true}

\newcommand{\linkcolor}{lblue}
\newcommand{\citecolor}{green}
\newcommand{\urlcolor}{dblue}

\newcommand{\linkbordercolor}{red}
\newcommand{\citebordercolor}{green}
\newcommand{\urlbordercolor}{cyan}

%\usepackage[colorlinks=\colorlinks,linkbordercolor=\linkbordercolor, linkcolor=\linkcolor, citecolor=\citecolor, urlcolor=\urlcolor,urlbordercolor=\urlbordercolor,citebordercolor=\citebordercolor]{hyperref}
\usepackage{hyperref}
\hypersetup{colorlinks=\colorlinks,linkbordercolor=\linkbordercolor, linkcolor=\linkcolor, citecolor=\citecolor, urlcolor=\urlcolor,urlbordercolor=\urlbordercolor,citebordercolor=\citebordercolor}%





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%hyper Makros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\newcommand{\hrefHid}[2]{
\hypersetup{urlbordercolor={1 1 1}}%
\hypersetup{urlcolor=black}%
\href{#1}{#2}%
\hypersetup{urlbordercolor=\urlbordercolor}%
\hypersetup{urlcolor=\urlcolor}%
}

\newcommand{\inhref}[2]{\hyperref[#1]{#2}}

\newcommand{\inhrefHid}[2]{%
\hypersetup{linkbordercolor={1 1 1}}%
\hypersetup{linkcolor=black}%
\inhref{#1}{#2}%
\hypersetup{linkbordercolor=\linkbordercolor}%
\hypersetup{linkcolor=\linkcolor}%
}

\newcommand{\defHref}[3]{\newcommand{#1}[1][#3]{\href{#2}{##1}}}
\newcommand{\defInhref}[3]{\newcommand{#1}[1][#3]{\inhref{#2}{##1}}}
\newcommand{\defHrefHid}[3]{\newcommand{#1}[1][#3]{\hrefHid{#2}{##1}}}
\newcommand{\defInhrefHid}[3]{\newcommand{#1}[1][#3]{\inhrefHid{#2}{##1}}}

\newcommand{\defHrefBoth}[3]{%
\expandafter\defHrefHid \csname #3Hid\endcsname {#1}{#2}%
\expandafter\defHref \csname #3Vis\endcsname {#1}{#2}%
}
\newcommand{\defInhrefBoth}[3]{%
  \expandafter\defInhrefHid \csname #3Hid\endcsname {#1}{#2}%
  \expandafter\defInhref \csname #3Vis\endcsname {#1}{#2}%
}


\newcommand{\defHrefBothVis}[3]{%
\defHrefBoth{#1}{#2}{#3}%
\expandafter\defHref \csname #3\endcsname {#1}{#2}%
}
\newcommand{\defInhrefBothVis}[3]{%
  \defInhrefBoth{#1}{#2}{#3}%
  \expandafter\defInhref \csname #3\endcsname {#1}{#2}%
}

\newcommand{\defHrefBothHid}[3]{%
\defHrefBoth{#1}{#2}{#3}%
\expandafter\defHrefHid \csname #3\endcsname {#1}{#2}%
}
\newcommand{\defInhrefBothHid}[3]{%
  \defInhrefBoth{#1}{#2}{#3}%
  \expandafter\defInhrefHid \csname #3\endcsname {#1}{#2}%
}


%\newcommand{\defInhrefBoth}[4][Vis]{%
%\expandafter\defInhrefHid \csname #4Hid\endcsname {#2}{#3}%
%\expandafter\defInhref \csname #4Vis\endcsname {#2}{#3}%
%\expandafter \let  \csname #4 \endcsname \expandafter \csname #4#1 \endcsname
%\expandafter\newcommand \csname #4\endcsname%[1]%[#3]%
%\expandafter \csname #4#1 \endcsname%
%}


\newcommand{\Href}[3]{%
\href{#1}{#2}%
\defHrefBothVis{#1}{#2}{#3}
%\expandafter\defHref \csname #3\endcsname {#1}{#2}%
}


\newcommand{\Inhref}[3]{%
\inhref{#1}{#2}%
\defInhrefBothVis{#1}{#2}{#3}
%\expandafter\defInhref \csname #3\endcsname {#1}{#2}%
}


\newcommand{\HrefHid}[3]{%
\href{#1}{#2}%
\defHrefBothHid{#1}{#2}{#3}
%\expandafter\defHrefHid \csname #3\endcsname {#1}{#2}%
}


\newcommand{\InhrefHid}[3]{%
\inhref{#1}{#2}%
\defInhrefBothHid{#1}{#2}{#3}
%\expandafter\defInhrefHid \csname #3\endcsname {#1}{#2}%
}


\newcommand{\wref}[2]{%
\href{http://en.wikipedia.org/wiki/#1}{#2}%
 }
\newcommand{\wiki}[1]{%
\wref{#1}{#1}%
 }

\newcommand{\Wref}[3]{%
\Href{http://en.wikipedia.org/wiki/#1}{#2}{#3}%
 }
\newcommand{\Wiki}[2]{%
\Wref{#1}{#1}{#2}%
 }

\newcommand{\hbibit}[3]{\bibitem[\href{#2}{#1}]{#3}}

\newcommand{\term}[2]{%
\label{#2}%
\emph{#1}%
 \globaldefs =1%
%\defInhrefBothVis{#2}{#1}{#2}%
\defInhrefBothHid{#2}{#1}{#2}%
%\expandafter\defInhref \csname #2\endcsname{#2}{#1}%
 \globaldefs =0%
}







\oddsidemargin=0cm
%
\evensidemargin=0cm
%\textheight=22cm
\baselineskip 18pt \textwidth 16cm \sloppy \theoremstyle{plain}


\newtheorem*{theorem*}{Theorem}
\newtheorem*{notation*}{Notation}
\newtheorem*{definition*}{Definition}
\newtheorem*{remark*}{Remark}
%\newtheorem{lemma}[thm]{Lemma}
%\newtheorem{proposition}[thm]{Proposition}
%\newtheorem{remark}[thm]{Remark}
%\newtheorem{rmk}[thm]{Remark}
%\newtheorem{example}[thm]{Example}
%\newtheorem{theorem}[thm]{Theorem}
%\newtheorem{definition}[thm]{Definition}
%\newtheorem{notation}[thm]{Notation}
%\newtheorem{result}{Result}[section]
%\newtheorem{property}[thm]{Property}
%\newtheorem{corollary}[thm]{Corollary}
%\newtheorem{construction}[thm]{Construction}
%\newtheorem{case}{Case}
%\newtheorem{conjecture}{Conjecture}
\newtheorem*{conjecture*}{Conjecture}

\newtheorem{introtheorem}{Theorem}
\renewcommand{\theintrotheorem}{\Alph{introtheorem}}
\newtheorem{introcorollary}[introtheorem]{Corollary}
\newtheorem{introremark}[introtheorem]{Remark}

\newtheorem{romantheorem}{Theorem}
\renewcommand{\theromantheorem}{\Roman{romantheorem}}
\newtheorem{romancorollary}[romantheorem]{Corollary}


\newcommand{\C}{\mathbb C}



\newcommand{\gci}{GCI}
\newcommand{\lgci}{LGCI}



\DeclareMathOperator{\M}{Mat}
\DeclareMathOperator{\Stab}{Stab}
\DeclareMathOperator{\Frac}{Frac}
\DeclareMathOperator{\spec}{Spec}
\DeclareMathOperator{\Img}{Im}
\DeclareMathOperator{\IC}{IC}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\RDef}{RDef}
\DeclareMathOperator{\SK}{SK}
\DeclareMathOperator{\Syl}{Syl}
\DeclareMathOperator{\CH}{CH}

\newcommand{\R}{\mathbb{R}}

\newcommand{\bs}{\backslash}
\newcommand{\Sc}{{\mathcal S}}
\newcommand{\Span}{{\operatorname{Span}}}
\renewcommand{\dim}{{\operatorname{dim}}}
%\newcommand{\gr}{{\operatorname{gr}}}
%\newcommand{\Ind}{\operatorname{Ind}}
\newcommand{\Supp}{{\operatorname{Supp}}}
\renewcommand{\Hom}{{\operatorname{Hom}}}
\newcommand{\oH}{\operatorname{H}}
\newcommand{\charac}{\operatorname{char}}
\newcommand{\et}{{\'{e}tale }}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Rami added end



\title[Counting points and representations]{Counting points of schemes over finite rings and counting representations of arithmetic lattices}
\author{Avraham Aizenbud}
\address{Avraham Aizenbud,
Faculty of Mathematics and Computer Science, Weizmann Institute of Science, Israel. }
\email{aizenr@gmail.com}
\urladdr{\url{http://www.wisdom.weizmann.ac.il/\~aizenr}}


\author{Nir Avni}
\address{Department of Mathematics, Northwestern University, Evanston, IL, USA.}
\email{avni.nir@gmail.com}
\urladdr{\url{http://math.northwestern.edu/\~nir}}
\keywords{Representation Growth, Igusa zeta function.}
\subjclass[2010]{
Primary 14G05, 14G10, 20G05, 20G30, Secondary:  14B05, 20F69.
%
%14G05  	Rational points
%14G10  	Zeta-functions and related questions [See also 11G40] (Birch-Swinnerton-Dyer conjecture)
%20G05  	Representation theory
% 20G30  	Linear algebraic groups over global fields and their integers
%
%14B05  	Singularities [See also 14E15, 14H20, 14J17, 32Sxx, 58Kxx]
%20F69  	Asymptotic properties of groups
}

%20G05  	Representation theory
% 20G25  	Linear algebraic groups over local fields and their integers
% 20G30  	Linear algebraic groups over global fields and their integers
%14B05  	Singularities [See also 14E15, 14H20, 14J17, 32Sxx, 58Kxx]
%14B07  	Deformations of singularities [See also 14D15, 32S30]
%14G05  	Rational points
%14G10  	Zeta-functions and related questions [See also 11G40] (Birch-Swinnerton-Dyer conjecture)
%53D30  	Symplectic structures of moduli spaces
%20F69  	Asymptotic properties of groups


\usepackage{varioref}

\begin{document}

\maketitle

\begin{abstract}
We relate the singularities of a scheme $X$ to the asymptotics of the number of points of $X$ over finite rings. This gives a partial answer to a question of Mustata. We use this result to count representations of arithmetic lattices. More precisely, if $\Gamma$ is an arithmetic lattice whose $\mathbb{Q}$-rank is greater than one, let $r_n(\Gamma)$ be the number of irreducible $n$-dimensional representations of $\Gamma$ up to isomorphism. We prove that there is a constant $C$ (in fact, any $C>40$ suffices) such that $r_n(\Gamma)=O(n^C)$ for every such $\Gamma$. This answers a question of Larsen and Lubotzky.
\end{abstract}


\setcounter{tocdepth}{1}
\tableofcontents

\section{Introduction}
\subsection{Main results}

This paper has two main results. The first is about counting points of schemes over finite rings. In the formulation of this result, we use the notions of local complete intersection and rational singularities, which we recall in \S\ref{subsec:sing}.

\begin{introtheorem} \label{thm:intro.count} Let $X$ be a scheme of finite type over $\mathbb{Z}$. Assume that the generic fiber $X_\mathbb{Q}:=X\times_{\Spec \mathbb{Z}}\Spec \mathbb{Q}$ of $X$ is reduced, absolutely irreducible, and a local complete intersection. The following conditions are equivalent:
\begin{enumerate}
\item For any $m$,
\[
\lim_{p \rightarrow \infty} \frac{|X(\mathbb{Z}/p^m)|}{p^{m\cdot \dim X_\mathbb{Q}}} =1.
\]
\item There is a finite set $S$ of prime numbers {and a constant C} such that
\[
\left| \frac{|X(\mathbb{Z}/p^m)|}{p^{m\cdot \dim X_\mathbb{Q}}}-1\right|<C p^{-1/2},
\]
for any prime $p\notin S$ and any $m \in \mathbb{N}$.
\item \label{item:intro.count.3} There is a finite set $S$ of prime numbers {and a constant C} such that
\[
\left|\frac{|X(\mathbb{Z}/p^m)|}{p^{m\cdot \dim X_\mathbb{Q}}}-\frac{|X(\mathbb{Z}/p)|}{p^{\dim X_\mathbb{Q}}}\right|<C p^{-1},
\]
for any prime $p\notin S$ and any $m \in \mathbb{N}$.
\item \label{item:intro.count.4} $X_{{\mathbb{Q}}}$ has rational singularities.
\end{enumerate}
\end{introtheorem}
In fact, we prove this theorem also for other rings, see Theorem \ref{thm:size.X}.

We use Theorem \ref{thm:intro.count} to prove our second main result, counting representations of arithmetic groups of high rank (for example $SL_d(\Z)$ for $d \geq 3$):

\begin{introtheorem} \label{thm:intro.bnd} (see Theorem \ref{thm:introduction.bound}) For any algebraic group scheme $G$ whose generic fiber $G_\mathbb{Q}$ is simple, connected, simply connected, and of $\mathbb{Q}$-rank at least two, and every $C>40$,
\[
\left| \left\{ \parbox{2.5in}{Irreducible representations of $G(\mathbb{Z})$ of dimension $n$} \right\} \right| = o \left( n^C \right).
\]
\end{introtheorem}

Theorem \ref{thm:intro.bnd} (and its generalization Theorem \ref{thm:introduction.bound} below) give an affirmative answer to a question of Larsen and Lubotzky (see \cite[\S11]{LL}).

\subsection{Counting points}

\subsubsection{Background and results}
Let $X$ be a scheme of finite type over $\mathbb{Z}$. We will be interested in the number of $\mathbb{Z} / N$-points of $X$, as a function of $N$. If $s\in \mathbb{C}$ has sufficiently large real part, then the series
\begin{equation} \label{eq:P.defn}
\Rami{\mathfrak{P}}_X(s)=\sum_{N=1} ^{\infty} |X(\mathbb{Z} / N)| \cdot N^{-s}
\end{equation}
(where $|X(\mathbb{Z} /1)|=1$) converges absolutely and defines a holomorphic function. The domain of absolute convergence of the series \eqref{eq:P.defn} has the form $\left\{ s \mid \Re(s)> \alpha_X \right\}$. We call $\alpha_X$ the abscissa of convergence of $\Rami{\mathfrak{P}}_X$. We have $$
\alpha_{X}=\limsup_{n \rightarrow \infty} \frac{\log \left(|X(\mathbb{Z} / 1)|+\cdots+|X(\mathbb{Z} / n)|\right)}{\log n}.$$

The Chinese Remainder Theorem implies a decomposition $\Rami{\mathfrak{P}}_X(s)=\prod_p \Rami{\mathfrak{P}}_{X,p}(s)$, where the product is over the set of prime numbers, and each local component is defined as
\[
\Rami{\mathfrak{P}}_{X,p}(s)=\sum_{n=0}^{\infty} |X(\mathbb{Z} / p^n)| \cdot p^{-ns}.
\]

The functions $\Rami{\mathfrak{P}}_{X,p}(s)$ were introduced by Borevich and Shafarevich, who conjectured that they are rational functions of $p^{-s}$. This conjecture was proved by Igusa and Meuser. For hypersurfaces, the function $\Rami{\mathfrak{P}}_{X,p}$ is studied via the following variant of it, called the Igusa zeta function:
\[
\mathcal{Z}_{X,p}(s):=(1-p^s)\Rami{\mathfrak{P}}_{X,p}(s+\dim X_\mathbb{Q} +1)+p^s.
\]
See \cite[\S1.3]{Mus_zeta} for a definition of $\mathcal{Z}_{X,p}(s)$ as a $p$-adic integral.

du Sautoy and Grunewald studied more general $p$-adic integrals and defined the following Euler product:
\[
\mathcal{Z}_X(s)=\prod_p \frac{\mathcal{Z}_{X,p}(s)}{\mathcal{Z}_{X,p}(\infty)}.
\]
In \cite{Mus_zeta}, Mustata asks for relations between the analytic properties of $\mathcal Z_X(s)$ and algebro-geometric properties of $X$. A partial answer is given by the following corollary of Theorem \ref{thm:intro.count}:

\begin{romantheorem}\label{thm:igu} (see \S\ref{ssec:pf.thm.igu}) Let $X$ be a scheme of finite type over $\mathbb{Z}$, whose generic fiber $X_\mathbb{Q}$ is reduced, absolutely irreducible, a local complete intersection, and has rational singularities. Then there is a finite set $S$ of primes such that \begin{enumerate}
\item \label{item:P.p.pole} For every $p\notin S$, either $\Rami{\mathfrak{P}}_{X,p}(s)=1$, or the abscissa of convergence of $\Rami{\mathfrak{P}}_{X,p}(s)$ is $\dim X_\mathbb{Q}$ and $\Rami{\mathfrak{P}}_{X,p}(s)$ has a simple pole at $\dim X_\mathbb{Q}$.
\item \label{item:P.zeta} Let $Y=X \times_{\Spec \mathbb{Z}} \Spec S ^{-1} \mathbb{Z}$. The abscissa of convergence of $\Rami{\mathfrak{P}}_{Y}(s)$ is $\dim X_\mathbb{Q}+1$. Moreover, if $\zeta(s)$ denotes the Riemann zeta function, then the function $\Rami{\mathfrak{P}}_{Y}(s)/ \zeta(s-\dim X_\mathbb{Q})$ can be analytically continued to $\left\{ s \mid \Re(s)>\dim X_\mathbb{Q} +1/2 \right\}$. In particular, $\Rami{\mathfrak{P}}_Y(s)$ has meromorphic continuation to $\Re(s)>\dim X_\mathbb{Q} +1/2$, and the only pole of the continued function on the line $\Re(s)=\dim X_\mathbb{Q} +1$ is a simple pole at $\dim X_\mathbb{Q} +1$.
\item\label{it:3} Denote $H_Y(n):=n^{-\dim Y_Q}|Y(\mathbb{Z} / n)|$. The Ces\`aro mean
\[
\lim_{N \rightarrow \infty} \frac{H_{Y}(1)+\cdots +H_{Y}(N)}{N}
\]
exists and is a positive real number.
\item \label{item:Z.zeta} If $X$ is a hypersurface, then the abscissa of convergence of $\mathcal{Z}_{Y}(s)$ is $0$ and the function $\mathcal{Z}_Y(s)/ \zeta(s+1)$ can be analytically continued to $\left\{ s \mid \Re(s)>-1/2 \right\}$. In particular, $\mathcal{Z}_Y(s)$ has meromorphic continuation to $\Re(s)>-1/2$ with a simple pole at $0$.
\end{enumerate}
\end{romantheorem}

\begin{remark} \label{rem:lci.implies.S.empty}
$ $
 \begin{itemize}
\item If $X$ itself is a local complete intersection, then we can take $S$ to be empty (so $Y=X$); see \S\ref{ssec:pf.thm.igu}.
\item Contrary to \eqref{it:3}, the sequence $H_{Y}(N)$ might not converge. This happens even for elliptic curves.
\end{itemize}
\end{remark}

\subsubsection{Sketch of the proof of Theorem \ref{thm:intro.count}}

%The implication $? \implies ?$ is trivial, and the implication $? \implies ?$ follows from the Lang--Weil estimates. For the implication $? \implies ?$, we first show that $|X(\mathbb{Z} / p^m)|=|X(\mathbb{F}_p[t]/t^m)|$, assuming $p$ is large enough. Using the Lang--Weil estimates and Chebotarev's theorem, we then show that the jet schemes of $X$ are irreducible, so, by a theorem of Mustata (\cite{Mus}), $X$ has rational singularities.

We sketch the proof of the implication $\eqref{item:intro.count.4} \implies \eqref{item:intro.count.3}$, since it contains most of the ideas in the proof. We first show that $|X(\mathbb{Z} / p^m)|=|X(\mathbb{F}_p[t]/t^m)|$, for all but finitely many primes $p$. Next, we consider the function $F(p,m):=H_{X}(p^{m})=\frac{|X(\mathbb{Z} / p^m)|}{p^{m \cdot \dim X}}$. We show the following: \begin{enumerate}[(a)]
\item \label{item:F.bdd} For every $p$, the function $m \mapsto F(p,m)$ is bounded. This follows from \cite{AA}.
\item \label{item:estimate.bdd.m} Condition \eqref{item:intro.count.3} holds for bounded $m$. To show this, we analyze the jet schemes $\Jet_nX$, which are schemes that satisfy $\Jet_nX(\mathbb{F}_p)\cong X(\mathbb{F}_p[t]/t^n)$. We apply the Lang--Weil bounds, and a theorem of Mustata claiming that, under our assumption, $\Jet_nX$ are irreducible.
\item \label{item:F.formula} There is a formula for $F(p,m)$ involving simple expressions in $m$ and $p$, as well as the number of $\mathbb{F}_p$-points on finitely many varieties. This is a consequence of motivic integration.
\end{enumerate}
We deduce from \eqref{item:F.formula} and \eqref{item:F.bdd} (and the Lang--Weil bounds) that there are finitely many $m_1,\ldots,m_k$ such that, for all $m$, there is $i$ such that $|F(m,p)-F(m_i,p)|=O(p ^{-1})$. Applying \eqref{item:estimate.bdd.m}, we get the result.


\subsection{Counting representations}

For a topological group $\Gamma$, let $r_n(\Gamma)$ be the number of {isomorphism classes of irreducible, $n$-dimensional, complex, continuous representations of $\Gamma$}. The sequence $r_n(\Gamma)$ is called the representation growth sequence of $\Gamma$. In general, $r_n(\Gamma)$ can be infinite, but we will only consider groups for which $r_n(\Gamma)$ is finite for any $n$.

The study of the representation growth sequence was introduced at \cite{Jai} and \cite{LM}. For more recent results, we refer the reader to \cite{AA}, \cite{A}, \cite{AKOV}, \cite{LL}, \cite{LS}, and the references therein. %In this paper, we study the asymptotics of the representation growth sequences of arithmetic groups.

Throughout the paper, fix an affine group scheme $G$ over $\mathbb{Z}$ whose generic fiber $G_\mathbb{Q}$ is $\mathbb{Q}$-simple, connected, and simply connected. If $k$ is a global field and $T$ is a finite set of places of $k$ containing all archimedean ones, we denote by $O_{k,T}$ the ring $T$-integers:
\[
O_{k,T}= \left\{ x\in k \mid \forall v\notin T \text{ we have } \| x\|_v \leq 1\right\} .
\]

%{In addition, fix an embedding $G \hookrightarrow \GL_N$.}
We will study the representation growth of the group  $\Gamma=G(O_{k,T})$.  The main theorem of \cite{LM} implies that, if $\Gamma$ satisfies the congruence subgroup property (See Definition \ref{defn:CSP} below), then the sequence $r_n(\Gamma)$ is bounded by some polynomial in $n$. Examples of groups with the  congruence subgroup property are $G(O_{k,T})$ assuming the $\mathbb{Q}$-rank of $G_\mathbb{Q}$ is greater than one. In order to capture the rate of polynomial growth of $r_n(\Gamma)$, we use the following definition:

\begin{definition*} Let $\Gamma$ be a topological group, and assume that the sequence $r_n(\Gamma)$ is bounded by a polynomial. The {\em representation zeta function} of $\Gamma$ is the Dirichlet series
\begin{equation} \label{eq:defn.zeta}
\zeta_\Gamma(s)=\sum_{n=1}^ \infty r_n(\Gamma)n^{-s}.
\end{equation}
Denote the abscissa of convergence of $\zeta_\Gamma$ by $\alpha(\Gamma)$.
\end{definition*}

As before, we have:
\begin{equation} \label{eq:alpha.limsup}
\alpha(\Gamma)=\limsup_{n \rightarrow \infty} \frac{\log \left( r_1(\Gamma)+\cdots+r_n(\Gamma)\right)}{\log n}.
\end{equation}
If $\Gamma=G(O_{k,T})$ as above, the $\limsup$ in \eqref{eq:alpha.limsup} is actually a limit and is a rational number (see \cite{A}).

The abscissa $\alpha(\Gamma)$ is related to the singularities of the varieties parameterizing homomorphisms from surface groups to $G$:
\begin{definition*} Let $n \in \mathbb{Z}_{\geq 1}$ and let $\Sigma_n$ be the closed surface of genus $n$. The {\em deformation variety} of $\Sigma_n$ in $G$ is the variety
\[
\Def_{G,n}=\Hom(\pi_1(\Sigma_n),G)=\left\{ (g_1,h_1,\ldots,g_n,h_n)\in G \mid [g_1,h_1]\cdots[g_n,h_n]=1\right\}.
\]
\end{definition*}
\nir{
We remark that $\Def_{G_\mathbb{Q},n}$ has rational singularities if $n \geq \mathcal{C}(G)$, where 
\[
\mathcal{C}(G)=\left\{\begin{matrix} 12 & G \textrm{ is of type } A,B,D \\ 21 & G \textrm{ is of type } C  \\ \lceil \frac{\dim(\mathfrak{g}) \rank(\mathfrak{g})}{2(\dim(\mathfrak{g})-2\rank(\mathfrak{g}))} \rceil +1 &\quad \textrm{$G$ is exceptional and  $\mathfrak{g}$  is a simple factor  of $\Lie(G_{\overline{\mathbb{Q}}})$} \end{matrix} \right. .
\]
For the classical groups, this is proved in \cite[Theorem VIII]{AA}. For the exceptional groups, this follows from \cite[Corollary 2.3]{AKOV3} and \cite[Theorem IV]{AA}.
}
Note that ${\mathcal{C}}(G)$ is bounded by $21$ for any $G$.

% In order to formulate a stronger version of Theorem \ref{thm:intro.bnd} we use the following:
%
% % \Rami{We would like to fomulate a generalization of theorem \ref{thm:intro.bnd} concerning  }
% % Larsen and Lubozky \cite[\S11]{LL} ask whether there is a number $B$ such that, for every arithmetic group $\Gamma=G(O)$ as above, either $\alpha(\Gamma)=\infty$ or $\alpha(\Gamma)<B$. Theorem \ref{thm:intro.bnd} and its generalizations  below give an affirmative answer to this question. In order to formulate these generalizations we need the following notation:
% \begin{notation*} $ $
% Let $\mathfrak{g}$ be a simple factor of the Lie algebra of $G_{\overline{\mathbb{Q}}}$ (note that they are all isomorphic). Denote
% \[
% \mathcal{B}(G)=\left\{\begin{matrix} 22 & \mathfrak{g}=\mathfrak{sl}_d \textrm{ or } \mathfrak{so}_d \\ 40 & \mathfrak{g}=\mathfrak{sp}_{2d} \\ 3\dim(\mathfrak{g})+1 &\textrm{$\mathfrak{g}$ is exceptional} \end{matrix} \right. .
% \]
% Denote the smallest even integer greater than or equal to $\mathcal{B}(G)$ by $\widetilde{\mathcal{B}}(G)$, and let $\mathcal{C}(G)=\frac{\widetilde{\mathcal{B}}(G)+2}{2}$.
%
% \end{notation*}
%Note that $\widetilde{\mathcal{B}}(G)$ is bounded by $746$ for any $G$.\\
%
% \begin{notation*} Let $k$ be a global field and $T$ be a finite set of places containing all archimedean ones. We denote by $O_{k,T}$ the ring $T$-integers
% \[
% O_{k,T}= \left\{ x\in k \mid \forall v\notin T \text{ we have } \| x\|_v \leq 1\right\} .
% \]
% \end{notation*}

%Our first result is the following:
The following is a generalization of Theorem \ref{thm:intro.bnd}:

\begin{romantheorem}[See \S\ref{ssec:pf.bound}] \label{thm:introduction.bound}  There is a finite set $S$ of prime numbers such that, for every global field  $k$ of characteristic not in $S$ and every finite set $T$  of places of $k$ containing all archimedean ones, if $G(O_{k,T})$ satisfies the congruence subgroup property and $\Def_{G_\mathbb{Q},n}$ has rational singularities, then $\alpha(G(O_{k,T})) \leq 2n-2$.
\end{romantheorem}

% In fact, we prove Theorem \ref{thm:introduction.bound} for the larger collection of arithmetic groups satisfying the Congruence Subgroup Property, see Theorem \ref{thm:bound.strong}.

 As a result, we get the following dichotomy for the representation growth of an arithmetic group $\Gamma$ in characteristic zero: either $r_n(\Gamma)=o(n^{747})$, or $r_n(\Gamma)$ is either infinite or grows super-polynomially in $n$ (this happens if $\Gamma$ does not satisfy the Congruence Subgroup Property---see \cite{LM}).

We will deduce Theorem \ref{thm:introduction.bound} from the following adelic version, which is applicable also for low rank groups. In the following, if $A$ is a ring, we denote its pro-finite completion by $\widehat{A}$.

\begin{romantheorem}[See \S\ref{ssec:pf.main}] \label{thm:introduction.main} There is a finite set $S$ such that, for any global field $k$ of characteristic not in $S$, any finite set $T$ of places of $k$ containing all archimedean places, and any natural number $n$, if $\Def_{G_\mathbb{Q},n}$ has rational singularities, then $\alpha \left( G(\widehat{O_{k,T}})\right) \leq 2n-2$.
\end{romantheorem}

From Theorem \ref{thm:introduction.main} and Theorem \ref{thm:Frobenius} below, we deduce the following statement about finite groups like $G(\mathbb{Z}/N \mathbb{Z})$, generalizing \cite[Corollary XI]{AA}:

\begin{romancorollary} \label{cor:prob.fin} There is a finite set $S$ of primes such that, for any ring of integers $O_{k,T}$ of any global field $k$ of characteristic not in $S$, there is a constant $C$ such that the following holds. For any non-trivial ideal $I$ of $O_{k,T}$, any natural number $n \geq 3$ such that $\Def_{G_\mathbb{Q},n-1}$ has rational singularities, and any $g\in G(O_{k,T}/I)$,
\[
\mathrm{Prob}\left( [g_1,h_1] \cdots [g_{n},h_{n}]=g\right) < \frac{C}{|G(O_{k,T}/I)|},
\]
where $g_1,h_1,\ldots,g_n,h_n$ are uniformly distributed random elements of $G(O_{k,T}/I)$.
\end{romancorollary}





We deduce Theorem \ref{thm:introduction.main} from the  following one:
\begin{romantheorem}[See \S\ref{ssec:pf.zeta.minus.1}] \label{thm:zeta.minus.1} For every $n\geq 2$ such that $\Def_{G_\mathbb{Q},n}$ has rational singularities, there is a finite set $S$ of prime numbers and an integer $C$ such that, for any $p\notin S$ and any unramified extension $F$ of either $\Q_p$ or $\F_p((t))$, we have
$$\zeta_{G(O_F)}(2n-2)-1 \leq C |O_F/I_F|^{-1},$$
where $O_F$ is the ring of integers of $F$ and $I_F$ is its maximal ideal.

 %power $q$ of a prime otsid $S$},
%\[
%\zeta_{G(\mathbb{Z}_q)}(2n)-1=\zeta_{G(\mathbb{F}_q[[t]])}(2n)-1 \leq C q^{-1}.
%\]
\end{romantheorem}

In order to prove Theorem  \ref{thm:zeta.minus.1}, we use the Frobenius formula (Theorem \ref{thm:Frobenius} below) that relates $\zeta_{G(O_F/I_F^m)}(2n)$ to the sizes of  $\Def_{G,n}(O_F/I_F^{m})$. These sizes, in turn, are related to the singularities of  $\Def_{G,n}$ by Theorem \ref{thm:intro.count} (or, more precisely, by Theorem \ref{thm:size.X}).

\begin{remark*} Consider the following statements: \begin{enumerate}
\item \label{cond:introduction.main.1} $\alpha({G(O)})<2n-2$.
\item \label{cond:introduction.main.2} $\alpha({G(O_v)})<2n-2$ for any valuation $v$ of $O$.
\item \label{cond:introduction.main.3} $\Def_{G,n}$ has rational singularities.
\item \label{cond:introduction.main.4} $\alpha({G(O)})\leq 2n-2$.
\end{enumerate}
Then $\eqref{cond:introduction.main.1} \implies \eqref{cond:introduction.main.2} \iff \eqref{cond:introduction.main.3} \implies \eqref{cond:introduction.main.4}$.

The implication $\eqref{cond:introduction.main.1} \implies \eqref{cond:introduction.main.2}$ follows easily from the observation that, using the map $G(O) \rightarrow G(O_v)$, we get that $r_n(G(O_v)) \leq r_n(G(O))$. The equivalence $\eqref{cond:introduction.main.2} \iff \eqref{cond:introduction.main.3}$ is proved in \cite{AA}. In this paper, we prove $\eqref{cond:introduction.main.3} \implies \eqref{cond:introduction.main.4}$.

\end{remark*}

%\begin{remark*} The theorems above hold in a greater generality. See \S??
%\end{remark*}
\begin{remark*} The assumption that $G$ is defined over $\mathbb{Z}$ can be weakened to assuming that $G$ is defined over the ring of $T$-integers in a number field. Indeed, if $G \subset \GL_{O_{k,T}}$ is defined over $O_{k,T}$, let $\mathcal{G}$ be the Zariski closure of $G$ in $\GL_{O_{k}}$. The theorems above applied to the restriction of scalars $\Res_{O_k/ \mathbb{Z}} \mathcal{G}$ imply the theorems for $G$.
\end{remark*}



%\subsection{Ideas of the proof of Theorem \ref{thm:introduction.main}}

%Suppose, for simplicity, that $k=\mathbb{Q}$ and $T=\emptyset$. In this case, $G(\widehat{O_{k,T}})=\prod_{p} G(\mathbb{Z}_p)$, so we need to estimate the abscissa of convergence of $\prod_p \zeta_{G(\mathbb{Z}_p)}(s)$. Our main estimate, Theorem \ref{thm:zeta.minus.1}, states that, if $\Def_{G,n}$ has rational singularities, then
%\begin{equation} \label{eq:int.zeta.est}
%\zeta_{G(\mathbb{Z}_p)}(2n-2)-1 < \frac{C}{p}.
%\end{equation}
%There is $\delta >0$ such that the minimal dimension of a non-trivial representation of $G(\mathbb{Z}_p)$ is at least $p^ \delta$ (see, e.g. \cite[Proposition 4.6]{LM}). We get that $\zeta_{G(\mathbb{Z}_p)}(2n-2+\epsilon)-1<Cp^{-1-\epsilon \delta}$, so the infinite product $\prod \zeta_{G(\mathbb{Z}_p)}(2n-2+\epsilon)$ converges.

%In order to prove \eqref{eq:int.zeta.est}, we consider the representation zeta functions of the finite groups $\zeta_{G(\mathbb{Z} / p^m)}$, where $p$ is a prime and $m$ is an integer. Let $F(m,p)=\zeta_{G(\mathbb{Z} / p^m)}(2n-2)$. Since $\lim_{m \rightarrow \infty} F(m,p)=\zeta_{G(\mathbb{Z}_p)}(2n-2)$, our earlier results imply that $F(m,p)$ are bounded in $m$ for every $p$. Using a theorem of Mustata and the fact that $F(m,p)=\zeta_{G(\mathbb{F}_p[t]/t^m)}(2n-2)$ for almost all $p$, we show that, for any $m$, the sequence $F(m,p)$ tends to one as $p$ goes to infinity. Roughly speaking, we use the orbit method to show that $F(m,p)$ is described by a motivic integral (with parameters $m$ and $p$), and, therefore, has a formula involving simple expressions in $m$ and $p$ as well as the number of $\mathbb{F}_p$-points on $\mathbb{Z}$-schemes. Using Chebotarev's theorem and the Lang--Weil estimates, we show that the limits over each parameter suffice to prove the estimate \eqref{eq:int.zeta.est}.

\subsection{Structure of the paper}

In \S \ref{sec:prel} we give the necessary preliminaries for the paper. In \S\ref{subsec:sing}-\S\ref{subsec:jet} we review the relevant algebraic geometry. In \S\ref{subsec:FRS} we review the results of \cite{AA}. In \S\ref{sebsec:FF} we recall a theorem of Frobenius on representations of finite groups. In \S\ref{subsec:def.int} we review relevant parts from the theory of motivic integration.

In \S\ref{sec:count} we prove (a generalization of) Theorem \ref{thm:intro.count}. In \S\ref{ssec:count.integral},\S\ref{ssec:LW}, and \S\ref{ssec:Irr.comp}, we review the tools we use for the proof. The proof itself is given in \S\ref{ssec:DL}, \S\ref{ssec:deprecise}, \S\ref{ssec:horz.to.RS}, and \S\ref{ssec:RS.to.rate.precise}.

In \S\ref{sec:global} we prove Theorems \ref{thm:igu}, \ref{thm:introduction.bound}, \ref{thm:introduction.main}, and \ref{thm:zeta.minus.1}. As mentioned above, these imply Theorem \ref{thm:intro.bnd} and Corollary \ref{cor:prob.fin}.

\subsection{Acknowledgements}
{
We thank Vladimir Hinich for useful discussions. Part of this paper was written during the program `Multiplicity Problems in Harmonic Analysis' held at the Hausdorff Institute (2012-2014). A.A. was partially supported by ISF grant 687/13, NSF grant DMS-1100943, and a Minerva foundation grant. N.A. was partially supported by NSF grants DMS-0901638 and DMS-1303205. Both of us were partially supported by BSF grant 2012247.
}

\section{Preliminaries} \label{sec:prel}

\subsection{Conventions} Throughout this article we use the following conventions:
\begin{itemize}
\item Let $X \rightarrow S$ and $Y \rightarrow S$ be $S$-schemes. We denote $X \times_{S} Y$ by $X_Y$. If $Y=\Spec R$ is affine, we write $X_R$ instead of $X_{\Spec R}$.
\item If $p$ is a prime number and $q=p^n$ is a power of $p$, we denote the unique degree-$n$ unramified extension of $\mathbb{Q}_p$ by $\mathbb{Q}_q$, its ring of integers by $\mathbb{Z}_q$, and the maximal ideal of $\mathbb{Z}_q$ by $\mathfrak{m}_q$.
\item For a set $S$ of prime numbers, let $$\mathcal{P}_S=\left\{ p^n \mid \textrm{$p$ is a prime number not in $S$ and $n\in \mathbb{Z}_{\geq 1}$} \right\}$$
be the set of sizes of finite fields of characteristics not in $S$.
\item If $X \rightarrow S$ is a smooth map of relative dimension $d$, let $\Omega_{X / S}^d$ denote the line bundle of relative top differential forms.
\end{itemize}

\subsection{Singularities} \label{subsec:sing}
In this section, we review the notions of resolution of singularities, rational singularities, and complete intersections. For more detailed overview, we refer the reader to \cite[Appendix B]{AA}.
\begin{definition} Let $X$ be an algebraic variety defined over a field $k$. A \emph{resolution of singularities} of $X$ is a proper map $p:\tilde X \to X$ such that $\tilde X$ is smooth, $p$ is birational, and the restriction of $p$ to $p ^{-1} (X^{sm})$ is an isomorphism.

\end{definition}
\begin{definition}[{cf. \cite[I \S 3, page 50-51]{KKMS}}] \label{defn:rational.singularities} Let $X$ be an algebraic variety defined over a field $k$ of characteristic $0$.
\begin{enumerate}
\item We say that $X$ has {\em rational singularities} if, for any (equivalently, for some) resolution of singularities $p:\tilde X \to X$, the natural morphism  $\mathcal{O}_X \rightarrow Rp_*(\mathcal{O}_{\tilde X})$ is an isomorphism.
\item A (usually singular) point $x \in X(k)$ is a {\em rational singularity} if there is a Zariski neighborhood $U\subset X$ of $x$ that has rational singularities.
\end{enumerate}
\end{definition}

\begin{definition}[] \label{defn:lci} Let $X$ be a scheme of finite type over a ring $R$. \begin{enumerate}
\item $X$ is called a {\em complete intersection} if there is an affine and smooth map $Y \rightarrow \Spec R$, a closed embedding $X \rightarrow Y$, commuting with the structure maps, and regular functions $f_1,\ldots,f_c\in O_Y(Y)$ such that the ideal of $X$ in $Y$ is generated by the $f_i$ and each $f_i$ is not a zero divisor in $O_Y(Y) / (f_1,\ldots,f_{i-1})$.
\item $X$ is called a {\em local complete intersection} if there is an open cover $U_i$ of $X$ such that each $U_i$ is a complete intersection.
\end{enumerate}
\end{definition}

\subsection{Jet schemes and Mustata's theorem}\label{subsec:jet}
In this section we recall the definition of jet schemes and quote one of our main tools, Mustata's theorem (see \cite{Mus}), which relates rational singularities and irreducibility of jet schemes. We will use repeatedly the following simple lemma:

\begin{lemma} Suppose that $Z \rightarrow T \rightarrow S$ and $X \rightarrow S$ are morphisms of schemes. Then $\Hom_T(Z,X_T) \cong \Hom_S(Z,X)$.
\end{lemma}

We move on to define jet schemes.

\begin{notation} For a scheme $Y$, denote $Y^{[m]}=Y \times_{\Spec \mathbb{Z}} \Spec \mathbb{Z}[t]/t^{m+1}$.
\end{notation}
The projection $Y^{[m]} \rightarrow Y$ is finite and (locally) free. For every scheme $S$, the assignment $Y \mapsto Y^{[m]}$ gives rise to a functor between $(\Sch_S)$ and $(\Sch_{S^{[m]}})$.

\begin{notation} Let $X \rightarrow S$ be an affine morphism of finite type. Let $\mathscr{J}_m(X/S)$ be the restriction of scalars of $X^{[m]}$ along the map $S^{[m]} \rightarrow S$, i.e., the functor $\mathscr{J}_m(X/S):(\Sch_S) \rightarrow (\Set)$ given by
\[
\mathscr{J}_m(X/S)(Z)=\Hom_{S^{[m]}}(Z^{[m]},X^{[m]})\cong \Hom_S(Z^{[m]},X).
\]
\end{notation}

From \cite[\S 7.6]{NeronModels}, we get
\begin{thmdef} The functor $\mathscr{J}_m(X/S)$ is representable by a scheme of finite type over $S$. We call the representing scheme the $m$-th relative jet scheme of $X \rightarrow S$ and denote it by $\Jet_m(X/S)$.
\end{thmdef}

Let $X\rightarrow S$ be a morphism as above. For any morphisms $Z \rightarrow T \rightarrow S$ of schemes, we have a canonical bijections
\[
\Hom_T(Z,\Jet_m(X_T/T))\cong\Hom_T(Z^{[m]},X_T)\cong\Hom_S(Z^{[m]},X)\cong
\]
\[
\cong\Hom_S(Z,\Jet_m(X/S))\cong\Hom_T(Z,\Jet_m(X/S)_T),
\]
which is functorial in $Z$, and, therefore, defines an isomorphism $\Jet_m(X_T/T)\cong\Jet_m(X/S)_T$.

The following is Mustata's theorem:

\begin{theorem}[\cite{Mus}] Let $X$ be an irreducible local complete intersection variety defined over a field $k$ of characteristic $0$. Then the following are equivalent: \begin{enumerate}
\item $X$ has rational singularities.
\item All the jet schemes $\Jet_m(X/k)$ are irreducible.
\end{enumerate}

\end{theorem}
\subsection{Rational singularities and integration}\label{subsec:FRS}

In this section we review a result of \cite{AA}. Recall that a measure $m$ on a $p$-adic analytic manifold\footnote{A $p$-adic manifold is a Hausdorff space $X$ with a sheaf of functions that is locally isomorphic to the space $\mathbb{Z}_p^N$ together with the sheaf of functions that are locally given by convergent power series; see \cite{Se}.} is Schwartz if it is compactly supported and every point has a neighborhood $U$ and a diffeomorphism $\varphi :U \rightarrow \mathbb{Z}_p^n$ such that $\varphi_* m$ is a scalar multiple of the Haar measure.

\begin{theorem} \lbl{thm:push.forward.detailed} Let $\varphi : X \rightarrow Y$ be a map between smooth algebraic varieties defined over a non-archimedean local field $F$ of characteristic zero, and let $x \in X(F)$. Assume that $\varphi$ is flat at $x$, and $x$ is a rational singularity of $\varphi ^{-1} (\varphi(x))$. Then, there is a neighborhood $U \subset X(F)$ of $x$ such that, for any Schwartz measure $m$ on $U$, the measure $\varphi_*(m) $ has continuous density, i.e., can be written as a product of a Schwartz measure and a continuous function.
\end{theorem}

%\nir{maybe say that we're only interested in the boundedness of the RN derivative}
%\begin{theorem} \label{thm:Phi.FRS} Let $G$ be a semisimple algebraic group over a field $k$ of characteristic 0 and let $n \geq \mathcal{C}(G)$. The map $\Phi : G^{2n} \rightarrow G$ defined by $\Phi(g_1,h_1,\ldots,g_n,h_n)=[g_1,h_1]\cdots[g_n,h_n]$ is flat, and all of its fibers have rational singularities.
%\end{theorem}

\subsection{Frobenius formula} \label{sebsec:FF}

We will use the following theorem of Frobenius:
\begin{theorem}[Frobenius] \lbl{thm:Frobenius}  Let $\Gamma$ be a finite group, and let $n \geq 1$ be an integer. Then
\[
\left| \left\{ (x_1,y_1,\ldots,x_n,y_n)\in \Gamma ^{2n} \mid [x_1,y_1] \cdots [x_n,y_n]=1 \right\} \right| = | \Gamma |^{2n-1}\sum_{\pi \in \Irr(\Gamma)} \frac{1}{(\dim\, \pi)^{2n-2}},
\]
where $\Irr(\Gamma)$ denotes the set of isomorphism classes of irreducible representations of $\Gamma$.
\end{theorem}
% This theorem imply:
% \RamiQ{Do we need the corolry}
% \begin{corollary}[{ \cite[Proposition I]{AA}}]
% Let $\Gamma$ be a finitely generated pro-finite group, and let $\Gamma(i)_{i\in \mathbb{N}}$ be a decreasing chain of open normal subgroups with trivial intersection. Let $n \geq 2$ be an integer. Denote the Haar measure on $\Gamma$ by $\lambda_\Gamma$ and the Haar measure on $\Gamma ^{2n}$ by $\lambda_{\Gamma ^{2n}}$. The following are equivalent: \begin{enumerate}
% \item The measure $(\Phi_{\Gamma,n})_* \lambda_{\Gamma ^{2n}}$ has a continuous density with respect to $\lambda_\Gamma$.
% \item There is a constant $C$ such that $\lambda_{\Gamma^{2n}} \left( \Phi_{\Gamma,n} ^{-1} (\Gamma(i))\right)\leq C \cdot \lambda_\Gamma (\Gamma(i))$ for all $i$.
% \item \label{cond:Frob.Formula.3} The series $\sum_{\chi \in \Irr \Gamma} \chi(1)^{2-2n}$ converges.
% \end{enumerate}
% If these conditions hold, then the density of $(\Phi_{\Gamma,n})_* \lambda_{\Gamma ^{2n}}$ with respect to $\lambda_\Gamma$ is given by the function
% \[
% g \mapsto \sum_{\chi \in \Irr \Gamma} \frac{\chi(g)}{\chi(1)^{2n-1}}.
% \]\end{corollary}
%In order to formulate the main result, we introduced the following notion:

%\begin{definition}[{cf. \cite[Definition II]{AA}}] Let $X$ and $Y$ be smooth irreducible varieties over a field $k$ of characteristic 0, and let $\phi : X \rightarrow Y$ be a morphism. We say that $\phi$ is \FRS\ %\footnote{In Hebrew, \< Syr: S_tw_h `m y_hwdywt r.sywnlyt>}
%if it is flat and, for any $y\in Y(\overline{k})$, the fiber $X \times_Y y$ is reduced and has rational singularities.
%\end{definition}

%We will use the following
%
%\begin{theorem}[{\cite[Theorem IV]{AA}}] \label{thm:AA.equivalence}
% Let $H$ be a semi-simple algebraic group defined over a finitely generated field $k$ of characteristic 0 and let $n\in \mathbb{Z}_{\geq 2}$. The following are equivalent: \begin{enumerate}
%\item The point $(1,\ldots,1)$ is a rational singularity of the deformation variety $\Def_{H,n}$.
%\item For every non-archimedian local field $F$ containing $k$ and every compact open subgroup $\Gamma \subset H(F)$,
%% we have $\alpha(\Gamma)<2n-2$, Here, $$\alpha(\Gamma)=??$$
%the series $$\zeta_{\Gamma}(2n-2)=\sum_{\pi\in \Irr(\Gamma)} (\dim \, \pi)^{2-2n}$$
%converges.
%
%\item For every finite extension $k'/k$, there is a local field $F'$ containing $k'$ and a compact open subgroup $\Gamma \subset H(F)$ such that
%the series $$\zeta_{\Gamma}(2n-2)=\sum_{\pi\in \Irr(\Gamma)} (\dim \, \pi)^{2-2n}$$
%converges.
%%$\alpha(\Gamma)<2n-2$.
%\end{enumerate}
%\end{theorem}
%
%Using this theorem we established the following relation between representation growths in different characteristics:
%\begin{theorem}[{\cite[Theorem V]{AA}}] \lbl{thm:pos.zero.local.zeta}  Let $H$ be an affine group scheme over a localization of $\mathbb{Z}$ by finitely many primes. Assume that the generic fiber of $H$ is semi-simple, and let $n \geq 1$ be an integer.
%
%There is a constant $p_0$ such that, if $F_1,F_2$ are local fields with isomorphic residue fields of characteristic greater than $p_0$, and if $O_1,O_2$ denote the rings of integers of $F_1$ and $F_2$, then the series  $$\zeta_{{H(O_1)}}(2n)=\sum_{\pi\in \Irr(H(O_1))} (\dim\, \pi) ^{-2n}$$ converges if and only if the series $$\zeta_{{H(O_2)}}(2n)=\sum_{\pi\in \Irr(H(O_2))} (\dim\, \pi)^{-2n}$$ converges. Moreover, in this case, $\zeta_{H(O_1)}(2n)=\zeta_{H(O_2)}(2n)$.
%\end{theorem}
\subsection{Definable Integrals}\label{subsec:def.int}

In this section, we recall the setting of definable $p$-adic integrals and state a uniformity result about $p$-adic integrals, which is a special case of \cite[Theorem 1.3]{HK}.

\subsubsection{The Denef--Pas language} Let $L_\emptyset$ be the first-order language with:

\begin{itemize}
\item Three sorts, denoted by $\VF$, $\RF$, and $\VG$, and called the valued field sort, the residue field sort, and the valuation group sort, respectively.
\item Five constants, $0_{\VF},1_{\VF} \in \VF$, $0_{\RF},1_{\RF}\in \RF$, and $0_{\VG},\infty_{\VG} \in \VG$.
\item Seven functions, $+_{\VF}:\VF \times \VF \rightarrow \VF$, $\cdot_{\VF} :\VF \times \VF \rightarrow \VF$, $+_{\RF}:\RF \times \RF \rightarrow \RF$, $\cdot_{\RF}:\RF \times \RF \rightarrow \RF$, $+_{\VG} :\VG \times \VG \rightarrow \VG$, $\val: \VF \rightarrow \VG$, and $\ac: \VF \smallsetminus \left\{ 0_{\VF} \right\} \rightarrow \RF$.
\item One binary relation, $<$, on $\VG$.
\end{itemize}
%Denote the definable set $\left( \RF \smallsetminus \left\{ 0_{\RF} \right\} \right) \times \VG$ by $\RV$. \nir{Move to appendix}

\subsubsection{Structures} Suppose that $F$ is a field with a non-archimedean valuation $v$. Denote $O=\left\{ x \in F \mid v(x) \geq 0 \right\}$ and $\mathfrak{m}=\left\{ x\in F \mid v(x)>0 \right\}$. Assume that the short exact sequence
\begin{equation} \label{eq:ses.valued.field}
1 \rightarrow O^\times / (1+ \mathfrak{m}) \rightarrow F^ \times / (1+\mathfrak{m}) \rightarrow F^ \times / O^ \times \rightarrow 1
\end{equation}
splits, and let $\sigma : F^\times / (1+ \mathfrak{m}) \rightarrow O^\times /(1+ \mathfrak{m})$ be such a splitting. An important example is the case where $F$ is a non-archimedean local field. In this case, any uniformizer gives a splitting of \eqref{eq:ses.valued.field}.

From this data, we construct a structure for $L_\emptyset$ as follows: the sort $\VF$ is interpreted as $F$, the sort $\RF$ is interpreted as the residue field of $F$, and the sort $\VG$ is interpreted as {$\mathbb{Z}\cup \left\{ \infty \right\}$}. The function $\val$ is interpreted as the valuation $v$ and the function $\ac$ is interpreted as the composition
\[
F ^ \times \rightarrow F ^\times / (1+ \mathfrak{m}) \stackrel{\sigma}{\rightarrow} O^ \times / (1+ \mathfrak{m}) =\RF(F) \smallsetminus \left\{ 0 \right\}.
\]
The interpretation of the constants, relation, and the rest of the functions is clear. From this point on, when we write a valued field, we mean a valued field together with a splitting as above, and we consider it as a structure of the Denef--Pas language.


%Note that $\RV(F)= F ^ \times / (1+ \mathfrak{m})$.

%\nir{should this be moved to the appendix? it is used only there} Other structures that will be important for us arise as ultraproducts of local fields. Suppose $F_i$, $i=1,2,\ldots$ is a sequence of local fields. Choose a non-principal ultrafilter $\mathcal{U}$ on the set $\mathbb{N}$ and let $F=\prod_\mathcal{U} F_i$. If the valuation of $F_i$ is denoted by $\val_i$, then the function $\prod_\mathcal{U} \val_i$ is a valuation of $F$ with value group $\prod_\mathcal{U} \mathbb{Z}$. If, in addition, we are given $\ac_i:F_i ^ \times \rightarrow \RF(F_i)$, the ultraproduct $\prod_\mathcal{U} \ac_i$ is a function from $F^ \times$ to the residue field of $F$. A theorem of ?? claims that a first-order sentence $\phi$ holds in $F$ if and only if the set of indices $i$ such that $\phi$ holds in $F_i$ belongs to $\mathcal{U}$. In particular, the following hold: \begin{enumerate}
%\item $F$ is Henselian.
%\item If the residue characteristic of $F_i$ tends to infinity, then the residue characteristic of $F$ is 0.
%\end{enumerate}

\subsubsection{Quantifier-free definable functions}
Suppose that $\mathfrak{S}$ is a structure for $L$. If $\varphi=\varphi(x_1,\ldots,x_n,y_1,\ldots,y_m,z_1,\ldots,z_k)$ is a formula in $L$, where the variables $x_i$ are of $\VF$ sort, the variables $y_i$ are of $\RF$ sort, and the variables $z_i$ are of $\VG$ sort, we denote
\[
\varphi(\mathfrak{S})= \left\{ (a_i,b_i,c_i) \in \VF(\mathfrak{S})^n \times \RF(\mathfrak{S})^m \times \VG(\mathfrak{S})^k \mid \textrm{$\varphi(a_i,b_i,c_i)$ holds in $\mathfrak{S}$} \right\}.
\]

\begin{definition}
$ $
\begin{enumerate}
\item We say that two formulas $\phi(x)$ and $\psi(x)$ are {\em equivalent} if, for every Henselian valued field $F$, we have $\phi(F)=\psi(F)$. An equivalence class of formulas is called a {\em definable set}. If $X$ is a definable set and $F$ is a Henselian valued field, we write $X(F)=\phi(F)$, for any $\phi \in X$.
\item We say that a formula in $L$ is {\em quantifier-free} if there are no quantifiers in it. A definable set is called quantifier-free, if there is a quantifier-free formula representing it.
\item Suppose that $X,Y$ are definable sets on variables $x,y$ respectively ($x$ and $y$ are tuples of variables of the three sorts of $L$). A quantifier-free definable set $\Gamma$ on the tuple of variables $(x,y)$ is called a {\em quantifier-free definable function} if, for any Henselian valued field $F$, the set $\Gamma(F)$ is the graph of a function between $X(F)$ and $Y(F)$, which we also denote by $\Gamma(F)$.
\end{enumerate}
\end{definition}

\begin{example}
$ $


\begin{enumerate}
\item Let $X \subset \mathbb{A}_{\mathbb{Z}}^N$ be an affine scheme over $\Spec \mathbb{Z}$. Choose a generating set $\left\{ p_1,\ldots,p_M \right\} \subset \mathbb{Z}[x_1,\ldots,x_N]$ for the ideal of polynomials vanishing on $X$, and let $X_{\VF}$ be the equivalence class of the formula
\[
\left( p_1(x_1,\ldots,x_N)=0 \right) \wedge \cdots \left( p_M(x_1,\ldots,x_N)=0 \right),
\]
where $x_1,\ldots,x_N$ are of the $\VF$ sort. For any valued field $F$, we have $X_{\VF}(F)=X(F)$. Similarly, there is also a quantifier-free definable set, denoted by $X_{\RF}$, such that $X_{RF}(F)=X(k)$, for all Henselian valued fields $F$ with residue field $k$.
\item Let $f: X \rightarrow Y \rightarrow \Spec \mathbb{Z}$ be morphisms of schemes. Then there is a quantifier-free definable function $f_{\VF}:X_{\VF} \rightarrow Y_{\VF}$ such that, for every Henselian valued field $F$, the function $f_{\VF}(F): X_{\VF}(F) \rightarrow Y_{\VF}(F)$ coincides with the restriction of $f$ to $F$ points.
\item If $X$ is an algebraic variety and $p$ is a regular function on $X$, the formula $y=\val(p(x))$ gives rise to a quantifier-free definable function from $X_{\VF}$ to $\VG$.
\end{enumerate}
\end{example}


The following theorem follows from \cite[Theorem 1.3]{HK}:

\begin{theorem} \label{thm:integration.q.f.} Let $X \rightarrow \Spec \mathbb{Z}$ be an affine and smooth morphism of relative dimension $d$, let $\omega \in \Gamma(X,\Omega_{X/\Spec \mathbb{Z}}^d)$, and let $f_1,f_2: X_{\VF} \rightarrow \VG$ be quantifier-free definable functions. Then there are \begin{enumerate}
\item A constant $M$.
\item A finite set $S$ of prime numbers.
\item (Finite or infinite) arithmetic progressions $I_1,\ldots,I_M \subset \mathbb{Z}$.
\item Polynomials $g_1,\ldots,g_M\in \mathbb{Q}[x,y]$ such that $g_j(x,y)$ is positive on $I_j \times \mathbb{R}_{>1}$.
\item Reduced affine schemes $V_1,\ldots,V_M$ of finite type over $\mathbb{Z}$ which are smooth over $\Spec \mathbb{Z}[S ^{-1}]$ such that $(V_i)_\mathbb{Q}$ are non-empty and irreducible.
\item Rational numbers $\alpha_1,\ldots,\alpha_M,\beta_1,\ldots,\beta_M$.
\item Positive integers $a_{j,k}$ for $j=1,\ldots,M$ and $k=1,\ldots,M_j$.
\end{enumerate}
such that, if $F$ is a local field with residue field $\mathbb{F}_q$ of characteristic not in $S$, $m\in \mathbb{Z}$, and $| \omega |_F$ denotes the measure on $X(F)$ corresponding to $\omega$, then
\begin{equation} \label{eq:motivic.integration}
\int_{\left\{ x\in X(O_F) \mid f_1(x)=m\right\}} q^{-f_2(x)}| \omega |_F = \sum_{j=1}^M 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod_{k=1}^{M_j} \left( 1-q^{-a_{jk}} \right)},
\end{equation}
assuming the integral converges.
\end{theorem}


%\subsection{Representation zeta functions as quantifier-free definable integrals}
%{We will use the following notation
%
%\begin{notation}$ $\begin{enumerate}
%\item If $p$ is a prime number and $q=p^n$ is a power of $p$, we denote the unique degree-$n$ unramified extension of $\mathbb{Q}_p$ by $\mathbb{Q}_q$, and its ring of integers by $\mathbb{Z}_q$.
%\item For a set $S$ of prime numbers, let $$\mathcal{P}_S=\left\{ p^n \mid \textrm{$p$ is a prime number not in $S$ and $n\in \mathbb{N}_{\geq 1}$} \right\}.$$
%\end{enumerate}
%\end{notation}
%
%\begin{notation} Let $A$ be a set, and let $(x_a)_{a\in A}$ and $(y_a)_{a\in A}$ be sequences of real numbers indexed by a set $A$. We write `$x_a \sim y_a$ over $a\in A$' if there is a constant $C$ such that $\frac{1}{C}x_a \leq y_a \leq C x_a$ for all $a\in A$.
%\end{notation}
%In Appendix \ref{app:kir} we prove the following:
%\begin{theorem}\label{thm:zeta.minus.one} Let $G$ be an algebraic group over $\mathbb{Z}$ whose generic fiber is semi-simple, and let $n\in \mathbb{Z}$ be such that the series defining $\zeta_{G(\mathbb{Z}_q)}(n)$ converges for every prime power $q$. There is a quantifier-free definable function $f:\VF^{\dim \, G+1} \rightarrow \VG$ and a finite set $S$ of prime numbers such that,
%\[
%\zeta_{G(\mathbb{Z}_q)}(n)-\zeta_{G(\mathbb{F}_q)}(n) \sim \int_{\mathbb{Z}_q^N}q^{f(x)}dx \quad \textrm{ over $q\in \mathcal{P}_S$.}
%\]
%\end{theorem}
%}

%\begin{theorem} \label{thm:AKOV.5.1} There is a quantifier-free definable set $Z \subset \mathcal{O}^{\dim\, G+1}$, and quantifier-free definable functions $f_1,f_2:Z \rightarrow \Gamma$ such that, for any number field $L$ with ring of integers $O_L$ and any prime $\mathfrak{q}$ of $O_L$ such that $(G,L,\mathfrak{q})$ is good,
%\[
%\zeta_{G(O_{L,\mathfrak{q}})}(s)-\zeta_{G(O_L/\mathfrak{q})}(s) \sim_C \int_{Z(L_\mathfrak{q})}|O_L / \mathfrak{q} |^{f_1(z)-sf_2(z)}d \lambda (z),
%\]
%where $\lambda$ is the Haar measure on $L_{\mathfrak{q}}^{\dim G+1}$ normalized so that the measure of $O_{L,\mathfrak{q}}^{\dim G}$ is equal to one.
%\end{theorem}

\section{Rational singularities and points over finite local rings} \label{sec:count}
\setcounter{theorem}{0}

In this section, we study the number of points of schemes over finite rings. For this, we introduce the following notation:
\begin{definition} Let $X$ be a scheme of finite type over $\mathbb{Z}$ and let $A$ be a finite ring. If $X_\mathbb{Q}$ is nonempty, define $h_X(A)=\frac{|X(A)|}{|A|^{\dim X_{\mathbb{Q}}}}$. If $X_\mathbb{Q}$ is empty, let $h_X(A)=0$.
\end{definition}
We will mostly consider the finite rings $\mathbb{Z}_q / \mathfrak{m}_q^m$ and $\mathbb{F}_q[t]/t^m$. The following proposition relates the counting functions for these rings.

\begin{proposition} \label{prop:Denef.Loeser} (see \S\ref{ssec:DL}) Let $X$ be a scheme of finite type over $\mathbb{Z}$. There is a finite set $S$ of prime numbers such that $h_X(\mathbb{Z}_q / \mathfrak{m}_q^m)=h_X(\mathbb{F}_q[t]/t^m)$, for any $q\in \mathcal{P}_S$ and any $m\in \mathbb{N}$.
\end{proposition}

The main result of this section is the following theorem that generalizes Theorem \ref{thm:intro.count}:

\begin{theorem} \label{thm:size.X} Let $X$ be a scheme of finite type over $\mathbb{Z}$ such that $X_{\mathbb{Q}}$ is equi-dimensional and a local complete intersection. The following are equivalent:
 \begin{enumerate}[(i)]
%\item \label{item:bdd.vert} There is a finite set $S$ of prime numbers such that, for any prime $p$ not in $S$, the sequence $n \mapsto h_X(\mathbb{Z} / p^n)$ is bounded.
%\item \label{item:bdd.vert} For any prime power $q$, the sequence $n \mapsto h_X(\mathbb{Z}_q / \nir{\mathfrak{m}_q}^n)$ is bounded.
%\item \label{item:bdd.vert.weak.p} There is a finite set $S$ of prime numbers such that, for any prime $p$ not in $S$, the sequence $n \mapsto h_X(\mathbb{F}_p[t] / t^n)$ is bounded.
\item \label{item:lim.1.horz} For any $m$, $\lim_{p \rightarrow \infty} h_X(\mathbb{Z} / p ^m) = \lim_{p \rightarrow \infty} h_X(\mathbb{F}_p[t] / t^m) = 1$.
\item \label{item:rate} There is a finite set $S$ of prime numbers {and a constant C} such that $|h_X(\mathbb{Z}_q / \mathfrak{m}_q ^m)-1|=|h_X(\mathbb{F}_q[t] / t ^m)-1|<C q^{-1/2}$, for any $q\in \mathcal{P}_S$ and $m \in \mathbb{N}$.
\item \label{item:rate.precise} $X_{\overline{\mathbb{Q}}}$ is irreducible and there is a finite set $S$ of prime numbers {and a constant C} such that $|h_X(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_X(\mathbb{F}_q)|=|h_X(\mathbb{F}_q[t] / t ^m)-h_X(\mathbb{F}_q)|<C q^{-1}$, for any $q\in \mathcal{P}_S$ and $m \in \mathbb{N}$.
\item \label{item:RS} $X_{\overline{\mathbb{Q}}}$ is reduced, irreducible, and has rational singularities.
\end{enumerate}
\end{theorem}

%\nir{removed Remark:}
%\begin{remark} \label{rem:l.c.i.h.bdd}
The proof of the Theorem \ref{thm:size.X} proves also that, if $X$ itself is local complete intersection, then \eqref{item:RS} implies:
\begin{enumerate}[(i)]
\setcounter{enumi}{4}
\item \label{item:bdd.vert} $X_{\overline{\mathbb{Q}}}$ is irreducible and for any prime power $q$, the sequence $n \mapsto h_X(\mathbb{Z}_q / \mathfrak{m}_q^n)$ is bounded.
\end{enumerate}
We conjecture that this implication is true without this additional assumption. Moreover, we conjecture that \eqref{item:lim.1.horz}-\eqref{item:bdd.vert} are also equivalent to
%We conjecture that we can add the following conditions to the list in Theorem \ref{thm:size.X}:
\begin{enumerate}[(i)]
\setcounter{enumi}{5}
\item \label{item:bdd.vert.weak} $X_{\overline{\mathbb{Q}}}$ is irreducible and there is a finite set $S$ of prime numbers such that, for any prime $p$ not in $S$, the sequence $n \mapsto h_X(\mathbb{Z} / p^n)$ is bounded.
%\item \label{item:bdd.vert} $X_{\overline{\mathbb{Q}}}$ is irreducible and for any prime power $q$, the sequence $n \mapsto h_X(\mathbb{Z}_q / \nir{\mathfrak{m}_q}^n)$ is bounded.
\end{enumerate}
%\end{remark}

%\begin{remark} It follows from Proposition \ref{prop:Denef.Loeser} that one can add the following conditions to the list of the equivalent conditions in Theorem \ref{thm:size.X}: \begin{enumerate}
%\item[(\ref{item:bdd.vert}')] There is a finite set $S$ of prime numbers such that, for any prime $p$ not in $S$, the sequence $n \mapsto h_X(\mathbb{F}_p[t] / t^n)$ is bounded.
%\item[(\ref{item:lim.1.horz}')] For any $m$, $\lim_{p \rightarrow \infty} h_X(\mathbb{F}_p[t] / t^m) = 1$.
%\end{enumerate}
%\end{remark}

\begin{remark} One can weaken Condition \eqref{item:rate} by replacing the set $\mathcal{P}_S$ by any sequence $p_n^{m_n}$ of prime powers such that the $p_n$ are distinct and any integral polynomial splits over some finite field of size $p_n^{m_m}$. For example, one can take the sequence of primes that are congruent to 1 modulo $n$.
\end{remark}

%\nir{
%\begin{remark} Theorem \ref{thm:size.X} generalizes, replacing $\mathbb{Z}$ by the ring of integers of an arbitrary number field (and $p$ by primes of $O$). The proof is identical.
%\end{remark} 
%}

\subsection{Counting points and integrals} \label{ssec:count.integral}



\begin{proposition}\label{cor:mu} Let $F$ be a local field, $O$ its ring of integers, and $\mathfrak{m}$ its maximal ideal. Suppose that $Y \rightarrow \Spec O$ is a smooth map of schemes of (pure) relative dimension $d$. For any $m$, denote the map $Y(O) \rightarrow Y(O / \mathfrak{m} ^m)$ by $r_m$. There is a unique Schwartz measure $\mu$ on $Y(O)$ such that, for every $m$ and $y_0\in Y(O / \mathfrak{m} ^m)$,
\[
\mu(r_m ^{-1}(y_0))=|O / \mathfrak{m} |^{-dm}%\frac{1}{|Y(O / \mathfrak{m} ^m)|}.
\]
\end{proposition}

The Proposition follows from the following standard lemma:

\begin{lemma} \label{lem:Weil.measure} Let $F,O,\mathfrak{m},Y,d$, and $r_m$ be as in Proposition \ref{cor:mu}. Assume that there is an invertible section $\omega$ of $\Omega_{Y/\Spec O}^d$. Then, for every $y_0\in Y(O / \mathfrak{m} ^m)$,
\[
\int_{r_m ^{-1}(y_0)} | \omega |=|O/ \mathfrak{m} |^{-dm}
\]
\end{lemma}

\nir{
\begin{proof} If $U \subset Y$ is open and $y_0\in U(O / \mathfrak{m} ^m)$, then $r_m ^{-1} (y_0) \subset U$. Hence, we can assume that $Y$ is affine and there is an \'etale map $\pi :U \rightarrow \mathbb{A}_O^d$. Since $\pi$ is \'etale, we get that $\pi$ induces a bijection between $r_m ^{-1} (y_0)$ and some ball $B$ of radius $|O/ \mathfrak{m}^m| ^{-1}$ in $O^d$. Let $\eta=d x_1\wedge \cdots \wedge d x_d \in \Omega^d(\mathbb{A}_O^d/\Spec O)$. Then $\pi ^* \eta = J \omega$, for some regular function $J$. Since the map is \'etale, $J$ is invertible. Hence, for every $p\in Y(O)$, we have $|J(p)|=1$. Hence, $\int_{r_m ^{-1} (y_0)} | \omega | = \int_{B} | \eta |=|O/ \mathfrak{m} |^{-dm}$.
\end{proof} 
}

\begin{corollary} \label{cor:motivic.affine} Let $Z$ be a scheme of finite type over $\mathbb{Z}$ and assume that $Z_\mathbb{Q}$ is affine. Then there are $M,S,I_j,g_j,V_j,\alpha_j,\beta_j,M_j,a_{j,k}$ as in Theorem \ref{thm:integration.q.f.} such that, for any $q\in \mathcal{P}_{S}$ and any $m \geq 0$,
\begin{equation} \label{eq:h.motivic}
h_Z(\mathbb{Z}_q / \mathfrak{m}_q^m)=h_Z(\mathbb{F}_q[t]/t^m)=\sum_{j=1}^M 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod_{k=1}^{M_j} \left( 1-q^{-a_{jk}} \right)}.
\end{equation}
\end{corollary}

\begin{proof} If $Z_\mathbb{Q}$ is empty, the claim is clear. Otherwise, let $S_0$ be a finite set of primes and let $f_1\dots f_l \in S_0^{-1}\Z[x_1,\dots,x_N]$ be polynomials such that  $Z_{S_0^{-1}\Z}$ is the scheme defined by $f_1=\dots=f_l=0$ in $\A^N_{S_0^{-1}\Z}.$ Let $F$ be a local field of characteristic not in $S$, $O$ be its ring of integers and $\mathfrak m$ be its maximal ideal. By Lemma \ref{lem:Weil.measure} we have:
\begin{multline*}
|Z(O/\mathfrak m^m)|=|O/\mathfrak m|^{Nm}\int_{\{x\in O^N \mid \min_j(\val(f_j(x))) \geq m\}}|d{x_1} \wedge \dots \wedge d{x_N}|=\\=|O/\mathfrak m|^{Nm} \sum_{n\geq m}\int_{\{x\in O^N \mid \min_j(\val(f_j(x)))=n\}}|d{x_1} \wedge \dots \wedge d{x_N}|.
\end{multline*}
The claim now follows from Theorem \ref{thm:integration.q.f.}.
\end{proof}


\subsection{Proof of Proposition \ref{prop:Denef.Loeser}} \label{ssec:DL}

We will use the following simple lemma.
\begin{lemma} \label{lem:simple.h}
Let $X=U_1\cup U_2$ be an open cover of a scheme. Then, for any finite \nir{local} ring $A$, we have
\begin{itemize}
\item $|X(A)|=|U_1(A)|+|U_2(A)|- |U_1\cap U_2(A)|.$
\item $|X(A)| \geq |U_1(A)|.$
\end{itemize}
\end{lemma}

We also need the following well known fact:
\begin{lemma} (cf. \cite[Ex. II.4.3]{Har}) \label{lem:affine.intersection}
Let $X$ be a separated scheme, and let $U_1,U_2 \subset X$ be open affine subschemes. Then $U_1\cap U_2$ is affine.
\end{lemma}

\begin{proof}[Proof of Proposition \ref{prop:Denef.Loeser}] We will show that there is a set $S$ of prime numbers such that $|X(\mathbb{Z}_q/ \mathfrak{m}_q^m)|=|X(\mathbb{F}_q[t]/t^m)|$, for all $q\in \mathcal{P}_S$ and all $m$. We prove this claim in the following cases: \begin{enumerate}[{Case} 1]
\item $X$ is affine. \\
The claim follows from Corollary \ref{cor:motivic.affine}.


\item $X$ is separated.\\
The proof is by induction on the minimal size of an affine cover of $X$. The base is the affine case dicussed above. For the transition, let $X=\bigcup_1^n U_i$ be an affine cover and assume that we proved the claim for schemes that can be covered by less then $n$ affine open subschemes. Let $U= \bigcup_2^n U_i$. By induction and Lemma \ref{lem:affine.intersection}, we know the statement for $U_1, U, U\cap U_1$. Thus Lemma \ref{lem:simple.h} implies the assertion.
\item The general case.\\
The proof is by induction on the minimal size of an affine cover of $X$ by separated schemes. The base is the previous case. The transition is analogous to the proof in the previous case.
\end{enumerate}

\end{proof}

%\subsection{Counting points on varieties over finite fields and the implication $\eqref{item:rate.precise} \implies \eqref{item:rate}$}

\subsection{Lang--Weil estimates} \label{ssec:LW}

We start with the following notation.

\begin{notation} Suppose that $X$ is a scheme of finite type over $\Spec \mathbb{Z}$ and that $k$ is a field. We denote the number of irreducible components of $X _{\overline{k}}$ that are defined over $k$ and have dimension $\dim X_k$ by $c_X(k)$. If $q$ is a prime power, we also write $c_X(q)$ instead of $c_X(\mathbb{F}_q)$.
\end{notation}

\begin{theorem}[Lang--Weil (cf. \cite{LW})] Let $X$ be a scheme of finite type over $\Spec \mathbb{Z}$. Let $d=\dim X_\mathbb{Q}$. There is a finite set $S$ of prime numbers and a constant $C$ such that, for any $q\in \mathcal{P}_S$,
\[
\left| \frac{|X(\mathbb{F}_q)|}{q^d}-c_X(q)\right| < C q^{-\frac{1}{2}}.
\]
%If, in addition, $X_\mathbb{Q}$ is irreducible and smooth {and $q\in \mathcal{P}_S$}, then $c_X(q)=0 \implies X(\mathbb{F}_q)=\emptyset$.
\end{theorem}

\subsection{Irreducible components modulo $p$} \label{ssec:Irr.comp}

In this subsection, we prove the following

\begin{proposition} \label{prop:Che} Suppose that $X$ is a scheme of finite type over $\Spec \mathbb{Z}$. Assume that $X_{\mathbb{Q}}$ is irreducible. Then \begin{enumerate}
\item\label{prop:Che:1} For almost all prime numbers $p$, we have $c_X(\overline{\mathbb{F}_p})=c_X(\overline{\mathbb{Q}})$.
\item\label{prop:Che:2} There are infinitely many prime numbers $p$ such that $c_X(p)=c_X(\overline{\mathbb{Q}})$.
%\item\label{prop:Che:3} If $c_X(\overline{\mathbb{Q}})>1$, then there are infinitely many prime numbers $p$ such that $c_X(p)<c_X(\overline{\mathbb{Q}})$.
\end{enumerate}
\end{proposition}

In order to prove the proposition, we recall the following notions and facts:

\begin{definition} Let $S$ be an irreducible scheme with generic point $\eta$, let $s$ be a closed point of $S$, and let $ \varphi :X \rightarrow S$ be a morphism of finite type. Define a relation $\mathfrak{R}_{S,s}$ between the set of irreducible components of $X_\eta :=\varphi ^{-1} (\eta)$ and the set of irreducible components of $X_s:=\varphi ^{-1} (s)$ by $(Y_1,Y_2)\in \mathfrak{R}_{S,s}$ if $Y_2 \subset \overline{Y_1}$.
\end{definition}

\begin{theorem} \label{thm:EGA.9.7.8} (cf. \cite[Proposition 9.7.8]{EGA4}) Let $S$ be an irreducible scheme with generic point $\eta$ and let $ \varphi :X \rightarrow S$ be a morphism of finite type. Assume that all irreducible components of $X_\eta$ are absolutely irreducible. There is an open set $U \subset S$ such that, for any closed point $s\in U$, \begin{enumerate}
\item All irreducible components of $X_s$ are absolutely irreducible.
\item The relation $\mathfrak{R}_{\eta,s}$ is the graph of a bijection.
\end{enumerate}
\end{theorem}

Let $X \rightarrow \Spec \mathbb{Z}$ be a scheme of finite type. Let $L/ \mathbb{Q}$ be a Galois extension such that all irreducible components of $X \times \Spec L$ are absolutely irreducible, and let $O$ be the ring of integers of $L$. The group $\Gal(L/ \mathbb{Q})$ acts on the set of irreducible components of $X \times \Spec L$. For any prime ideal $\mathfrak{p}$ of $O$ with residue field $k_\mathfrak{p}$, consider the decomposition group $D_\mathfrak{p}=\left\{ \sigma \in \Gal(L/ \mathbb{Q}) \mid \sigma(\mathfrak{p})=\mathfrak{p} \right\}$, and the homomorphism $\Phi_\mathfrak{p} :D_\mathfrak{p} \rightarrow \Gal(k_\mathfrak{p} / \mathbb{F}_p)$. The group $\Gal(k_\mathfrak{p}/ \mathbb{F}_p)$ acts on the set of irreducible components of $X_{k_\mathfrak{p}}$. The following is obvious

\begin{proposition} \label{prop:inv.rel} Under the assumptions above, for any $(Y_1,Y_2)\in \mathfrak{R}_{(0), \mathfrak{p}}$ and $\sigma \in D_\mathfrak{p}$, we have $(\sigma \cdot Y_1, \Phi_\mathfrak{p}(\sigma) \cdot Y_2)\in \mathfrak{R}_{(0), \mathfrak{p}}$.
\end{proposition}

Proposition \ref{prop:inv.rel}, Theorem \ref{thm:EGA.9.7.8}, and Chebotarev's density theorem imply Proposition \ref{prop:Che}.

%The Lang--Weil bounds and Proposition \ref{prop:Che}\eqref{prop:Che:1} imply:

\begin{corollary} \label{cor:h.open.dense} Let $X$ be a scheme of finite type over $\Spec \mathbb{Z}$, and let $U \subset X$ be an open dense subscheme. There is finite set $S$ of prime numbers and a constant $C$ such that $h_X(\mathbb{F}_q)-h_U(\mathbb{F}_q)< C q ^{-1}$ for any $q\in \mathcal{P}_S$.
\end{corollary}

\nir{
\begin{proof} Let $Z=X\smallsetminus U$. We have $\dim Z_\mathbb{Q}<\dim X_\mathbb{Q} = \dim U_\mathbb{Q}$. Letting $C=c_Z(\overline{\mathbb{Q}})$, the Lang--Weil estimates and Proposition \ref{prop:Che}\eqref{prop:Che:1} imply that there is a finite set of primes $S$ such that
\[
h_X(\mathbb{F}_q)-h_U(\mathbb{F}_q) = \frac{|Z(\mathbb{F}_q)|}{q^{\dim X_\mathbb{Q}}} < C q ^{-1}
\]
for every $q\in \mathcal{P}_S$.
\end{proof} 
}

\subsection{Proof of the implication $\eqref{item:rate.precise} \implies \eqref{item:rate}$} \label{ssec:deprecise}
It is enough to show that there is a finite set $S'$ of prime numbers and a constant $C'$ such that $|h_X(\mathbb{F}_q)-1|<C'q^{-1/2}$ for all $q\in \mathcal{P}_{S'}$. By the assumption and Proposition \ref{prop:Che}\eqref{prop:Che:1}, there is a finite set $T$ of prime numbers such that $c_X(q)=1$ for all $q\in \mathcal{P}_T$. The Lang-Weil estimates imply the result.

\subsection{Proof of the implication $\eqref{item:lim.1.horz} \implies \eqref{item:RS}$} \label{ssec:horz.to.RS}

Let $m\in \mathbb{N}$ and $X^{(m)}=\Jet_m(X/\Spec \mathbb{Z})$. There is a finite set $S$ of prime numbers such that $X_{\mathbb{F}_p}$ is a local complete intersection and $\dim X^{(m)}_{\mathbb{F}_p} = \dim X^{(m)}_\mathbb{Q}$ for all $p\notin S$. By Proposition \ref{prop:Che}\eqref{prop:Che:1}, we can enlarge $S$ and assume, in addition, that $c_{X^{(m)}}(\overline{\mathbb{F}_p})=c_{X^{(m)}}(\overline{\mathbb{Q}})$ for all $p\notin S$. By the Lang--Weil estimates, we get that
\[
 \left| \frac{h_X(\mathbb{F}_p[t] / t^m)}{p^{\dim X^{(m)}_{\mathbb{F}_q}-m\dim X_\mathbb{Q} }}-c_{X^{(m)}}(p) \right| =\left| \frac{|X^{(m)}(\mathbb{F}_p)|}{p^{\dim X_{\mathbb{F}_p}^{(m)}}} -c_{X^{(m)}}(p)\right| \underset{p \rightarrow \infty}{\longrightarrow} 0,
\]
By Proposition \ref{prop:Che}\eqref{prop:Che:2}, there are infinitely many primes $p$ such that $c_{X^{(m)}}(p)=c_{X^{(m)}}(\overline{\mathbb{Q}})$. Taking the limit over those and using the assumption \eqref{item:lim.1.horz}, we get that $p^{m\dim X_\mathbb{Q} - \dim X^{(m)}_{\mathbb{F}_q}} \rightarrow c_{X^{(m)}}(\overline{\mathbb{Q}})$, which implies that $\dim X^{(m)}_\mathbb{Q} = m\dim X_\mathbb{Q}$ and that $c_{X^{(m)}}(\overline{\mathbb{Q}})=1$. If $X_\mathbb{Q}$ were not reduced, then \nir{there would be a non-empty open set of points whose tangent space has dimension greater than $\dim X_\mathbb{Q}$, so} $\dim X^{(2)}_\mathbb{Q}=\dim TX_\mathbb{Q}$ would be larger than $2\dim X_\mathbb{Q}$, a contradiction. Hence, $X_\mathbb{Q}$ is reduced. Since $X$ is a local complete intersection, each irreducible component of $X^{(m)}_\mathbb{Q}$ has dimension at least $m \cdot \dim X_\mathbb{Q}$. Thus, $X^{(m)}_\mathbb{Q}$ is absolutely irreducible. By Mustata's theorem, $X$ has rational singularities.


\subsection{The implication $\eqref{item:RS} \implies \eqref{item:rate.precise}$} \label{ssec:RS.to.rate.precise}
If $X_\mathbb{Q}$ is empty, the claim is trivial. Hence, in the following, we will assume that $X_\mathbb{Q}$ is non-empty.

\subsubsection{The case of fixed $m$}
\begin{proposition} \label{prop:weak.rate} Assume that $X$ satisfies condition \eqref{item:RS}. Then, for any $m$, there is a finite set $S(m)$ of prime numbers and a constant $C(m)$ such that $|h_X(\mathbb{F}_q[t]/t^m)-h_X(\mathbb{F}_q)|<C(m)q ^{-1}$ for all $q\in \mathcal{P}_{S(m)}$.
\end{proposition}

\begin{proof} Let $U \subset X$ be the smooth locus of the structure map $X \rightarrow \Spec \mathbb{Z}$. Since $X_{\mathbb{Q}}$ is reduced, $U_{\mathbb{Q}}$ is dense in $X_{\mathbb{Q}}$. It follows that there is a finite set $S_1$ of prime numbers such that $U_{{\mathbb{F}_p}}$ is a dense subvariety of $X_{{\mathbb{F}_p}}$, for all $p\notin S_1$. By enlarging $S_1$ if needed, we can assume that $\dim X_{\mathbb{F}_p}=\dim X_{\mathbb{Q}}$ for all $p\notin S_1$.

Denote $X^{(m)}=\Jet_m(X/\Spec \mathbb{Z})$ and $U^{(m)}=\Jet_m(U/\Spec \mathbb{Z})$. For any $p\notin S_1$ and any $n$, the natural projection $U^{(n+1)}_{\mathbb{F}_p} \rightarrow U^{(n)}_{\mathbb{F}_p}$ is an $\mathbb{A} ^{\dim U_\mathbb{Q}}$-bundle. In particular, $|U^{(m)}(\mathbb{F}_q)|=|U(\mathbb{F}_q)| \cdot q^{(m-1)\dim U_{\mathbb{F}_q}}$. Hence,
\begin{equation} \label{eq:weak.rate.3}
h_U(\mathbb{F}_q[t]/t^m)=h_U(\mathbb{F}_q).
\end{equation}

By Corollary \ref{cor:h.open.dense}, there is a finite set $S_2 \supset S_1$ of prime numbers and a constant $C_2$ such that
\begin{equation} \label{eq:weak.rate.1}
|h_X(\mathbb{F}_q)-h_U(\mathbb{F}_q)|<C_2 q ^{-1} \quad q\in \mathcal{P}_{S_2}.
\end{equation}

Since $X_{\mathbb{Q}}$ has rational singularities, Mustata's theorem implies that $U^{(m)}_{\mathbb{Q}}$ is dense in $X^{(m)}_{\mathbb{Q}}$. There is a finite set $S_3(m)$ of prime numbers such that $U^{(m)}_{\mathbb{F}_p}$ is dense in $X^{(m)}_{\mathbb{F}_p}$, for all $p\notin S_3(m)$. Applying Corollary \ref{cor:h.open.dense}, we get that there is a finite set $S_4(m) \supset S_3(m)$ of prime numbers and a constant $C_4$ such that
\begin{equation} \label{eq:weak.rate.2}
|h_X(\mathbb{F}_q[t]/t^m)-h_U(\mathbb{F}_q[t]/t^m)|=|h_{X^{(m)}}(\mathbb{F}_q)-h_{U^{(m)}}(\mathbb{F}_q)|<C_4 q ^{-1} \quad q\in \mathcal{P}_{S_4(m)}.
\end{equation}

The claim now follows from \eqref{eq:weak.rate.3}, \eqref{eq:weak.rate.1}, and \eqref{eq:weak.rate.2}.

\end{proof}

%\begin{corollary} \label{cor:Xizuk} Assume that $X$ satisfies condition \eqref{item:RS}. Then, for any $m$, there is a finite set $S(m)$ of prime numbers and a constant $C(m)$ such that
%\[
%\lim_{\mathcal{P}_{S(m)} \ni q \rightarrow \infty} h_X(\mathbb{F}_q[t]/t^m) = 1.
%\]
%\end{corollary}
%
%\begin{proof} It is enough to show that there is a finite set $S'$ of prime numbers such that $h_X(\mathbb{F}_q) \rightarrow 1$ as $q\in \mathcal{P}_{S'}$ tends to infinity. This is done exactly as in \S\ref{ssec:deprecise}.
%\end{proof}


\subsubsection{$\eqref{item:RS} \implies \eqref{item:bdd.vert.weak}$ in the case where $X_\mathbb{Q}$ is a complete intersection} \label{sssec:RS.bdd.vert}
Since $X_\mathbb{Q}$ is a complete intersection, there is a smooth algebraic variety $\overline{Y}$ over $\mathbb{Q}$, a closed embedding $X_\mathbb{Q} \rightarrow \overline{Y}$, and a regular map $\overline{\varphi} : \overline{Y} \rightarrow \mathbb{A} ^{N}_\mathbb{Q}$, which is flat above 0, such that $X_\mathbb{Q}\cong \overline{\varphi} ^{-1} (0)$. \nir{There is a finite set $S$ of primes and a $\mathbb{Z}[S ^{-1}]$-scheme $Y$ of finite type and a regular map $\varphi : Y \rightarrow \mathbb{A}^N_{\mathbb{Z}[S ^{-1}]}$ such that $Y_\mathbb{Q} = \overline{Y}$ and $\varphi_\mathbb{Q} = \overline{\varphi}$. After, possibly, enlarging $S$, we can assume that $Y_{\mathbb{Z}[S ^{-1}]}$ is smooth over $\Spec \mathbb{Z}[S ^{-1}]$, the restriction $\varphi_{\mathbb{Z}[S ^{-1}]}$ is flat above 0, and the isomorphism $X_\mathbb{Q} \cong \overline{\varphi} ^{-1} (0)$ extends to an isomorphism $X_{\mathbb{Z}[S ^{-1}]} \cong \varphi_{\mathbb{Z}[S ^{-1}]}^{-1} (0)$.} It is enough to show, for any $p\notin S$, that $h_{\varphi_{\mathbb{Z}[S ^{-1}]}^{-1} (0)}(\mathbb{Z} /p^m)$ is bounded uniformly in $m$.

%\nir{change to $\mathbb{Z}_q$ instead of $\mathbb{Z}_p$}

Fix $p\notin S$. Let $\mu$ be the measure on $Y(\mathbb{Z}_p)$ given by Corollary \ref{cor:mu}.  We have
\[
\mu \left( \varphi ^{-1} (p^m\Z_p^N) \right)  = \mu \left( r_m ^{-1} (\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)) \right)  = \sum_{x \in \varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)} \mu \left( r_m ^{-1} (x) \right)  = p^{-m\dim Y_\Q}|\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)|.
\]
By Theorem \ref{thm:push.forward.detailed}, there is a constant $C$ such that, for any $m \in \mathbb N,$
\[
\mu \left( \varphi ^{-1} (p^m\Z_p^N) \right)=\varphi_* \mu \left( p^m\Z_p^N \right) <\frac{C}{p^{mN}}.
\]
we get that
\[
|X(\mathbb{Z} / p^m)|=
|\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)| < C p^{\dim Y_\Q-N}.
\]
% Finally, since $Y \rightarrow \Spec \mathbb{Z}$ is smooth over $p$, we get that $|Y(\mathbb{Z} / p^m)|=|Y(\mathbb{F}_p)|p^{(m-1)\dim Y_\mathbb{Q}}$. By the Lang--Weil estimates, after enlarging $S$ and $C$, we can assume that $|Y(\mathbb{Z} / p^m)| < C p^{m\dim Y_\mathbb{Q}}$. Hence,
% \[
% |\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)| < C^2 p^{m(\dim Y_\mathbb{Q} -N)}=C^2p^{m \cdot \dim \varphi_\mathbb{Q} ^{-1} (0)},
%\]
Since $\dim Y_\Q-N=\dim X_\Q$, this implies the estimate we want.

\subsubsection{$\eqref{item:RS} \implies \eqref{item:rate.precise}$ in the case where $X_\mathbb{Q}$ is a complete intersection} \label{sssec:RS.rate.ci}


Assume now that $X$ is a complete intersection and satisfies \eqref{item:RS}. Applying Corollary \ref{cor:motivic.affine}, we get $M,S,I_j,g_j,V_j,\alpha_j,\beta_j,M_j,a_{j,k}$ such that
\begin{equation}\label{eq:RS.rate.ci}
h_X(\mathbb{Z}_q / \mathfrak{m}_q^m)=h_X(\mathbb{F}_q[t]/t^m)=\sum_{j=1}^M 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod_{k=1}^{M_j} \left( 1-q^{-a_{jk}} \right)}
\end{equation}
for all $q\in \mathcal{P}_S$ and $m$.

Define an equivalence relation on $\mathbb{N}$ by $m_1 \sim m_2$ iff  $ \forall j$ we have $m_1 \in I_j \Leftrightarrow m_2 \in I_j$.
We will show that there is a constant $C$
%and a finit set $S'$
such that, for any $m_1 \sim  m_2$, we have
\begin{equation} \label{eq:boolean.algebra}
|h_X(\mathbb{Z}_q / \mathfrak{m}_q^{m_1})-h_X(\mathbb{Z}_q / \mathfrak{m}_q^{m_2})| < C q ^{-1}.
\end{equation}

Property \eqref{item:rate.precise} for $X$ will follow by applying Proposition \ref{prop:weak.rate} to representatives of the finitely many equivalence classes of $\sim$.

If the equivalence class of $m_1$ and $m_2$ is finite then
\eqref{eq:boolean.algebra} follows from Proposition \ref{prop:weak.rate}. Thus,  we can assume that all $I_j$ are infinite.


% Let $D\in \mathbb{N}$ be such that, for any $j$, either $I_j \subset \left\{ 1,\ldots,D \right\}$, or $I_j$ is infinite. Consider the Boolean algebra $\mathcal{B}$ generated by the sets $\left\{ 1 \right\},\ldots,\left\{ D \right\}$, and the $I_j$s. We will show that there is a constant $C$ such that, for any $m_1,m_2$ that belong to the same atom of $\mathcal{B}$ and any $q\in \mathcal{P}_S$,
% \begin{equation} \label{eq:boolean.algebra}
% |h_X(\mathbb{Z}_q / \nir{\mathfrak{m}_q}^{m_1})-h_X(\mathbb{Z}_q / \nir{\mathfrak{m}_q}^{m_2})| < C q ^{-1}.
% \end{equation}
% Claim \eqref{item:rate.precise} for $X$ will follow by applying Proposition \ref{prop:weak.rate} to representatives of the finitely many atoms of $\mathcal{B}$.
%
% Since \eqref{eq:boolean.algebra} is trivial if $m_1=m_2$, we can assume that $m_1,m_2>D$. In particular, we can assume that all $I_j$ are infinite.


\begin{lemma} \label{lem:Pmq} Let $V$ be a scheme of finite type over $\Spec \mathbb{Z}$ whose generic fiber is non-empty, let $g(x,y)$ be a real polynomial, let $\alpha,\beta\in \mathbb{R}$, and let $a_1,\ldots,a_n$ be negative integers, %and let $S$ be a finite set of prime numbers.
Set $$P(m,q)=|V(\mathbb{F}_q)| \cdot \frac{g(m,q) q^{\alpha m+\beta}}{\prod_1^n \left( 1-q^{a_k} \right) }.$$  Then the following claims hold: \begin{enumerate}
\item Assume that either \begin{enumerate}
\item $\alpha >0$ or
\item $\alpha=0$ and $g$ depends on $m$ non-trivially (i.e. $\frac{\partial g}{\partial m} \neq 0$).
\end{enumerate}
Then $\lim_{m \rightarrow \infty} P(m,p)=\pm \infty$ for infinitely many primes $p.$%\in \mathcal{P}_{S}$.\RamiQ{Can we replace with primes?}
\item If $\alpha<0$ then there is a constant $D$ such that $|P(m,q)|<q ^{-1}$ for $m>D$ and any prime power $q$.
\end{enumerate}
\end{lemma}

\begin{proof} $ $
\begin{enumerate}
\item Under the assumptions, the limit $\lim_{m \rightarrow \infty} P(m,p)$ will be infinity if $V(\mathbb{F}_p)\neq \emptyset$. By the Lang--Weil bounds and Proposition \ref{prop:Che}\eqref{prop:Che:2}, this happens for infinitely many primes.
\item Suppose that the degree of $g$ is $d$. Then there is a constant $M$ such that $|g(m,q)| \leq Mm^dq^d$. In addition, There is a constant $e$ such that $|V(\mathbb{F}_q)|<eq^{e}$ for all prime powers $q$. Hence, there is a constant $C$ such that
\[
|P(m,q)| \leq Cm^dq^{\alpha m+\beta+d+e}.
\]
This implies the assertion.
\end{enumerate}
\end{proof}

% \begin{notation} For a polynomial $g(x)$, let $g^{top}$ be the coefficient of the monomial of highest degree in $g$.
% \end{notation}
%
% \begin{lemma} \label{lem:Pq} Let $V$ be a scheme of finite type over $\Spec \mathbb{Z}$, whose generic fiber is non-empty and irreducible, let $g(x)$ be a real polynomial, let $\beta\in \mathbb{R}$, let $a_1,\ldots,a_m$ be negative integers, and let $S$ be a finite set of prime numbers. Set $$P(q)=\frac{|V(\mathbb{F}_q)| g(q) q^ \beta}{\prod \left( 1-q^{a_k} \right) }.$$ Let $d=\dim V_\Q + \deg g +\beta$. Then
% \begin{enumerate}
% \item If $d>0$ then $\limsup_{p \rightarrow \infty} P(q)=\infty$, where the limit is taken over all primes.
% \item If $d<0$ then there is a finite set of primes $S' \supset S$ such that $P(q)q^d$ is bounded for $q\in \mathcal{P}_{S'}$.  In particular, $\lim_{ \mathcal P_{S'} \ni q \rightarrow \infty} P(q)=0$.
% \item If $d=0$ then there is a finite set of primes $S' \supset S$ such that  $$\lim_{\mathcal{P}_{S'} \ni q\rightarrow \infty} \left(P(q)-g^{top}c_{V}(q)\right)=0.$$
% \end{enumerate}
% \end{lemma}
%
% \begin{proof} These are immediate consequences of the Lang--Weil estimates and Proposition \ref{prop:Che}\eqref{prop:Che:2}.
% \end{proof}
%
By \S\ref{sssec:RS.bdd.vert}, after enlarging $S$, we have that
\[
\sup_{m} h_X(\mathbb{F}_p[t]/t^m)=\sup_{m}h_X(\mathbb{Z}/p^{m})< \infty,
\]
for any prime $p\notin S$. Since each summand in the right hand side of \eqref{eq:RS.rate.ci} is non-negative, we get that, for each $j$ and  $p\notin S$,
\begin{equation} \label{eq.lim.m}
\sup_{m} 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)} < \infty.
\end{equation}

For each $j$, Lemma \ref{lem:Pmq} implies that either $\alpha_j<0$ or $\alpha_j=0$ and $g_j$ is independent of $m$. Moreover, there is $D$ such that

\begin{equation}\label{eq:q.inv}
|V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)}< q ^{-1},
\end{equation}
 if $ \alpha_j <0$ and $m>D .$
 Let $J_1=\left\{ j \mid \alpha_j <0 \right\}$. %If $j\notin J_1$, we will write $g_j(q)$ instead of $g_j(m,q)$.

By \eqref{eq:q.inv} and \eqref{eq:RS.rate.ci} we get that, for any $m>D$
 and $q\in \mathcal P_S,$ \[
\left| h_X(\mathbb{F}_q[t]/t^m)-\sum_{j\notin J_1} 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)}\right| <|J_1| q ^{-1}.
\]

Note that the sum on the left hand side depends only on $q$ and the equivalence class of $m$.
Thus, if $m_1,m_2>D$,  $m_1 \sim m_2$, and $q\in \mathcal P_S$, then
$$\left| h_X(\mathbb{F}_q[t]/t^{m_1})- h_X(\mathbb{F}_q[t]/t^{m_2})\right| <2|J_1| q ^{-1}.
 $$
 This, together with proposition \ref{prop:weak.rate},  implies  \eqref{eq:boolean.algebra}.

% ????????????
%
% By Corollary \ref{cor:Xizuk}, for each $m$, there is a finite set $S(m)$ of prime numbers (which we can assume to contain $S$) such that
% \[
% \lim_{\mathcal{P}_{S(m)} \ni q \rightarrow \infty}h_X(\mathbb{F}_q[t]/t^m)=1.
% \]
% Since each summand in the right hand side of \eqref{eq:h.motivic}\RamiQ{What is this } is non-negative, we get that, for each $j\notin J_1$ and $m$,
% \begin{equation} \label{eq.lim.q}
% \limsup_{\mathcal{P}_{S(m)} \ni q \rightarrow \infty} 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(q) q^{\beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)} < \infty.
% \end{equation}
% \RamiQ{can we chenige the limit to be over primes? Do we need it?}
% By Lemma \ref{lem:Pq}, we get that $\dim, V_j+\deg g_j +\beta_j \leq 0$. Let $J_2=\left\{ j\notin J_1 \mid \dim\, V_j+\deg g_j +\beta_j < 0 \right\}$. By Lemma \ref{lem:Pq},\RamiQ{reference bug} there is a constant $C$ such that
% \[
% |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)}< Cq ^{-1},
% \]
% if $j\in J_2$. We get that
% \begin{equation} \label{eq:truncation}
% \left| h_X(\mathbb{F}_q[t]/t^m)-\sum_{j\notin J_1 \cup J_2} 1_{I_j}(m) |V_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)}\right| < \left( C|J_2|+|J_1| \right) q ^{-1}.
% \end{equation}
% Since the sum on the left hand side of \eqref{eq:truncation} is constant \RamiQ{check} on the \Rami{equivalence classes of $\sim$}, the inequality \eqref{eq:boolean.algebra} holds.
%
\subsubsection{$\eqref{item:RS} \implies \eqref{item:rate.precise}$ in general}
The proof is by induction on the size of the minimal open cover of $X_{\mathbb Q}$ by complete intersection varieties. The base is \S\ref{sssec:RS.rate.ci}. For the transition, let $X_{\mathbb Q}= \bigcup_1^n X'_i$ be a minimal open cover of $X_\mathbb{Q}$ by complete intersection varieties and assume that we know the assertion for any $Y$ such that $Y_{\mathbb Q}$ can be covered by less then $n$ complete intersection varieties. We can choose complete intersection schemes $X_i$ and a finite set of primes $S_0$ such that $X_{S_0^{-1}\mathbb Z}= \bigcup_1^n X_i$ is an open cover.

Let $U =\bigcup_2^n X_i$ and let $V \subset U \cap X_1$ be a complete intersection, open, and non-empty subscheme. By induction, we know that there is a finite set $S_{1}\supset S_0$ of prime numbers and a constant $C_1$ such that, for any $q\in \mathcal{P}_{S_{1}}$ and $m \in \mathbb{N}$, we have:
\begin{itemize}
\item $|h_{X_1}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1}(\mathbb{F}_q)|<C_{1} q^{-1}$.
\item $|h_{U}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{U}(\mathbb{F}_q)|<C_{1} q^{-1}$.
\item $|h_{V}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{V}(\mathbb{F}_q)|<C_{1} q^{-1}$.
\end{itemize}

By Lemma \ref{lem:simple.h},
\begin{multline*}
h_{X}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X}(\mathbb{F}_q) =\\= \left( h_{X_1}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1}(\mathbb{F}_q) \right) + \left( h_{U}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{U}(\mathbb{F}_q) \right) - \left( h_{X_1 \cap U}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1 \cap U}(\mathbb{F}_q) \right),
\end{multline*}
and so it is enough to prove that $|h_{X_1 \cap U}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1 \cap U}(\mathbb{F}_q)|=O(q ^{-1})$.

By Corollary \ref{cor:h.open.dense}, there exist a finite set $S\supset S_1$ of prime numbers and a constant $C_2$ such that, for any $q\in \mathcal{P}_{S}$ and $m \in \mathbb{N}$, we have:

\begin{itemize}
\item $|h_{X_1}(\mathbb{F}_q)-h_{X_1 \cap U}(\mathbb{F}_q)|<C_{2} q^{-1}$.
\item $|h_{X_1 \cap U}(\mathbb{F}_q)-h_V(\mathbb{F}_q)|<C_{2} q^{-1}$.
\end{itemize}


Now,
\[
h_{X_1 \cap U}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1 \cap U}(\mathbb{F}_q) \leq h_{X_1}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1}(\mathbb{F}_q)+h_{X_1}(\mathbb{F}_q)-h_{X_1 \cap U}(\mathbb{F}_q)< (C_{1}+C_{2}) q^{-1},
\]
%by the induction hypothesis and Corollary \ref{cor:h.open.dense} (which might require enlarging $S$).
Similarly,
\[
h_{X_1 \cap U}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_{X_1 \cap U}(\mathbb{F}_q) \geq h_{V}(\mathbb{Z}_q / \mathfrak{m}_q ^m)-h_V(\mathbb{F}_q)+h_V(\mathbb{F}_q)-h_{X_1 \cap U}(\mathbb{F}_q)>-(C_{1}+C_{2}) q^{-1}.
\]






\section{Zeta functions} \label{sec:global}

%The goal of this section is to prove Theorem \ref{thm:introduction.main} %and a generalization of Theorem \ref{thm:introduction.bound}. We first introduce %the setting.
\subsection{Representation zeta functions of compact $p$-adic groups and the proof of Theorem \ref{thm:zeta.minus.1}} \label{ssec:pf.zeta.minus.1}
By \cite[Corollary 4.1.4]{AA}, the deformation variety $\Def_{G,n}$ is absolutely irreducible; by the assumptions, it has rational singularities. By  Proposition \ref{prop:Denef.Loeser} and Theorem \ref{thm:size.X},  we can choose a finite set $S$ of primes and a positive number $C$ such that
\begin{itemize}
\item For any $q \in \mathcal{P}_S$ and any positive integer $m$,
\begin{enumerate}[(a)]
\item\label{it:asum.1} $h_{\Def_{G,n}}(\Z_q/\mathfrak{m}_q^m)=h_{\Def_{G,2n}}(\F_q[t]/t^m).$
\item\label{it:asum.2} $h_{G}(\Z_q/\mathfrak{m}_q^m)=h_{G}(\F_q[[t]]/t^m).$
\item\label{it:asum.1.5} $|h_{\Def_{G,n}}(\mathbb{F}_q)-1|<C q ^{\frac{1}{2}}$.
\item\label{it:asum.3} $|h_{\Def_{G,n}}(\Z_q/\mathfrak{m}_q^m)-h_{\Def_{G,n}}( \mathbb{F}_q)|< C q ^{-1}.$
\item\label{it:asum.4} $|h_{G}(\Z_q/\mathfrak{m}_q^m)-1|<C q ^{-\frac{1}{2}}$.
%\item $|\zeta_{G(\mathbb{F}_q)}(2n-2)-1|<C_1 q ^{-1}$
\end{enumerate}
\item $G$ is smooth over $\Spec(S^{-1}\Z)$.
\end{itemize}
%After a finite extension of scalars of $G_{\mathbb{Q}}$ is isomorphic to a simply connected Chevalley group. 

\nir{There is a finite extension $K$ of $\mathbb{Q}$ such that $G_K$ is $K$-split. Hence, there is a simply connected semisimple group scheme $H$ which is split over $\mathbb{Z}$ and an isomorphism $G_K \cong H_K$. Hence, for all but finitely many primes $\mathfrak{p}$ of $O_K$, we have $G_{O_K / \mathfrak{p}} \cong H_{O_K / \mathfrak{p}}$, so $G_{O_K / \mathfrak{p}}$ is semisimple and simply connected.} Hence, after enlarging $S$, we can assume that $G_{\mathbb{F}_p}$ is simply connected and semisimple, for all $p\notin S$.
%Using \cite[??]{??} (and possibly enlarging $S$ and $C$), we can also assume that
%\begin{enumerate}[(a)]
%\setcounter{enumi}{3}
%\item\label{it:asum.5} $|\zeta_{G(\mathbb{F}_q)}(2n-2)-1|<C q ^{-1}$.
%\end{enumerate}
In addition, \eqref{it:asum.4} implies that, after a further enlargement of $S$, we can assume that, for any $q\in \mathcal{P}_S$,
\begin{enumerate}[(a)]
\setcounter{enumi}{5}
\item\label{it:asum.6} $h_{G}(\Z_q/\mathfrak{m}_q^m)>\frac{1}{2}$.
\end{enumerate}
%Fix $q\in \mathcal{P}_S$. %s.t. $q>4C^2$.
%Let $O$ be either $\Z_q$ or $\mathbb F_q[[t]]$, and let $\mathfrak{m} \subset O$ be its maximal ideal.
For any $m$,
\begin{equation} \label{eq:zeta.h}
\zeta_{G(\mathbb{Z}_q/ \mathfrak{m}_q ^m)}(2n-2)=\frac{|\Def_{G,n}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)|}{|G^{2n-1}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)|}=\frac{h_{\Def_{G,n}}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)}{h_{G^{2n-1}}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)}=\frac{h_{\Def_{G,n}}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)}{h_{G^{2n-1}}(\mathbb{F}_q)},
\end{equation}
where the first equality follows from the Frobenius formula (Theorem \ref{thm:Frobenius}), the second follows from the fact that $\dim \Def_{G_\Q,n}=\dim G_\Q^{2n-1}$ (\cite[Corollary 4.1.4]{AA}), and the third follows from the fact that $G$ is smooth over $O$ and Hensel's lemma.


%Using \eqref{eq:zeta.h} with $m=1$ and \eqref{it:asum.1.5},\eqref{it:asum.4}, we get that $\zeta_{G(\mathbb{F}_q)}(2n-2) \rightarrow 1$. Together with \cite[Theorem 3.1]{AKOV} and the fact that $G_{\mathbb{F}_q}$ is semisimple and simply connected, after enlarging $C$ we can assume that for every $q\in \mathcal{P}_S$,
\nir{From \cite[Lemma 2.1]{LS05}, we get}
\begin{enumerate}[(a)]
\setcounter{enumi}{6}
\item\label{it:asum.5} $|\zeta_{G(\mathbb{F}_q)}(2n-2)-1|<C q ^{-1}$.
\end{enumerate}

Fix $q\in \mathcal{P}_S$. Let $O$ be either $\mathbb{Z}_q$ or $\mathbb{F}_q[[t]]$, and let $\mathfrak{m} \subset O$ be the maximal ideal. By \eqref{it:asum.1}, \eqref{it:asum.2}, and the Frobenius formula,
\begin{equation}
\zeta_{G(O/ \mathfrak{m} ^m)}(2n-2)=\frac{|\Def_{G,n}(O/ \mathfrak{m} ^m)|}{|G^{2n-1}(O / \mathfrak{m} ^m)|}=\frac{|\Def_{G,n}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)|}{|G^{2n-1}(\mathbb{Z}_q / \mathfrak{m}_q ^m)|}=\zeta_{G(\mathbb{Z}_q/ \mathfrak{m}_q ^m)}(2n-2).
\end{equation}
Thus, Equation \eqref{eq:zeta.h} implies that
\begin{multline*}
|\zeta_{G(O/ \mathfrak{m} ^m)}(2n-2)-1|\leq |\zeta_{G(\mathbb{Z}_q/ \mathfrak{m}_q ^m)}(2n-2)-\zeta_{G(\F_q)}(2n-2)|+|\zeta_{G(\F_q)}(2n-2)-1| =\\
=\frac{|h_{\Def_{G,n}}(\mathbb{Z}_q/ \mathfrak{m}_q ^m)-h_{\Def_{G,n}}(\F_q )|}{h_{G^{2n-1}}(\mathbb{F}_q)}+|\zeta_{G(\F_q)}(2n-2)-1|. \end{multline*}

Using \eqref{it:asum.3}, \eqref{it:asum.6}, \eqref{it:asum.5},  we obtain that:
$$
|\zeta_{G(O/ \mathfrak{m} ^m)}(2n-2)-1|\leq(2^{2n-1}+1)C q ^{-1}.
$$

% \begin{multline*}
% |\zeta_{G(O/\pi ^m)}(2n-2)-1|\leq |\zeta_{G(O/\pi ^m)}(2n-2)-\zeta_{G(\F_q)}(2n-2)|+|\zeta_{G(\F_q)}(2n-2)-1| =\\
% =\frac{|h_{\Def_{G,n}}(O/\pi ^m)-h_{\Def_{G,n}}(\F_q )|}{h_{G^{2n-1}}(\mathbb{F}_q)}+|\zeta_{G(\F_q)}(2n-2)-1| <(2^{2n-1}+1)C q ^{-1}.
% \end{multline*}

%%where the last \Rami{equality} holds because $G$ is smooth.
%By \cite[Theorem ??]{??}, there is a constant $C_1$ \Rami{and a finite set of primes $S_1\supset S_0$} such that
%\begin{equation} \label{eq:G.z}
%|\zeta_{G(\mathbb{F}_q)}(2n-2)-1|<C_1 q ^{-1}
%\end{equation}
%for any $q\in \mathcal P_{S_1}.$
%% Since the size of $G(\mathbb{F}_q)$ is a polynomial in $q$,\RamiQ{Why it is trou? We probaly need to thrw away some primes (at list $S_0$. Cant it differnt primes have differnt wail group?)}
%%We get that there is a constant $C_2$ such that
%%\begin{equation} \label{eq:G.pt}|h_{G^{2n-1}}(\mathbb{F}_q)-1|<C_2q ^{-1}.
%%\end{equation}
%%Taking $m=1$ in \eqref{eq:zeta.Def} and \eqref{eq:zeta.Def2}, we get that %there is a constant $C_3$ such that $|h_{\Def_{G,n}}(\mathbb{F}_q)-1|<C_3 %q ^{-1}$, \Rami{for $q\in \mathcal P_{S_1}$}.
%
%By Theorem ??, $\Def_{G,2n}$ is a local complete intersection \RamiQ{we do not need the dimension here, we needed it before} of dimension $(2n-1)\dim(G)$, and, by the assumptions, it has rational singularities. Thus, Theorem ?? implies that there is a constant $C_4$ and a  finite set $S_2\Rami{\supset S_1}$ of primes such that, if $q\in \mathcal P_{S_\Rami{2}}$ and $m>0$,
%\[
%|h_{\Def_{G,2n}}(O/\pi^{m})-h_{\Def_{G,n}}( \mathbb{F}_q)|< C_4 q ^{-1},
%\]
%%and, therefore,
%%\[
%%|h_{\Def_{G,2n}}(O/\pi^{m})-1|< (C_3+C_4) q ^{-1}.
%%\]
%Applying \eqref{eq:zeta.Def} \Rami{, \eqref{eq:zeta.Def2}, \eqref{eq:zeta.Def3} and \eqref{eq:G.z},} %and \ref{eq:G.pt}
%we get that there is a constant $C_5$ such that, if $q\in \mathcal{P}_{S_\Rami{2}}$ and $m \geq 1$,
%\begin{multline*}
%|\zeta_{G(O/\pi ^m)}(2n-2)-1|\leq |\zeta_{G(O/\pi ^m)}(2n-2)-\zeta_{G(\F_q)}(2n-2)|+|\zeta_{G(\F_q)}(2n-2)-1| =\\
%=\frac{h_{\Def_{G,n}}(O/\pi ^m)-h_{\Def_{G,n}}(\F_q )}{h_{G^{2n-1}}(\mathbb{F}_q)}+|\zeta_{G(\F_q)}(2n-2)-1|   <C_5 q ^{-1}.
%\end{multline*}

Since each continuous representation of a pro-finite group is locally constant, we get that the series defining $\zeta_{G(O)}(2n-2)$ equals the limit $$\lim_{m \rightarrow \infty} \zeta_{G(O/ \mathfrak{m} ^m)}(2n-2),$$ and the result follows.

\subsection{Representation zeta functions of adelic groups and the proof of Theorem \ref{thm:introduction.main}} \label{ssec:pf.main}

\begin{proof} [Proof of Theorem \ref{thm:introduction.main}] Theorem \ref{thm:zeta.minus.1} implies that there is a finite set $S$ of prime numbers and a positive integer $D$ such that, for every $q\in \mathcal{P}_S$,
\begin{equation} \label{eq:zeta.main}
\zeta_{G(\mathbb{Z}_q)}(2n-2)-1=\zeta_{G(\mathbb{F}_q[[t]])}(2n-2)-1 \leq D q ^{-1}.
\end{equation}
Let $C>\max S$, let $k$ be a global field of characteristic greater than $C$, let $T$ be a finite set of places of $k$ containing all archimedean ones, and let $n$ be such that $\Def_{G_\mathbb{Q},n}$ has rational singularities. We will show that $\zeta_{G \left( \widehat{O_{k,T}} \right) }(2n-2+\epsilon)$ converges, for every positive $\epsilon$.

For any non-archimedean place $v$, let $O_v$ be the ring of integers of the completion $k_v$, and let $|v|$ be the size of the residue field of $O_v$. We have that $\zeta_{G \left( \widehat{O_{k,T}}\right)}(s)=\prod_{v \notin T} \zeta_{G(O_v)}(s)$, by which we mean, in particular, that the left hand side converges absolutely if and only if each of the terms on the right hand side converges absolutely, and their product converges absolutely. By \cite[Theorem IV]{AA} and the assumptions, the series $\zeta_{G(O_v)}(2n-2)$ converges for every $v$. Thus, it is enough to prove that $\prod_{v \notin T'} \zeta_{G(O_v)}(2n-2+\epsilon)$ converges, for some finite set of places $T' \supset T$.

For almost all places $v$, we have
\begin{equation} \label{eq:O.main}
O_v\cong \mathbb{Z}_{|v|} \textrm{ or } O_v\cong\mathbb{F}_{|v|}[[t]].
\end{equation}

By \cite[Proposition 4.6]{LM}, there is a constant $\delta >0$ such that, for almost all places $v$, the minimal dimension of a non-trivial representation of $G(O_v)$ is at least $|v|^{\delta}$. It follows that
\begin{equation} \label{eq:rep.main}
\zeta_{G(O_v)}(2n-2+\epsilon)-1 \leq |v|^{-\epsilon \delta}\left( \zeta_{G(O_v)}(2n-2)-1\right).
\end{equation}

Let $T' \supset T$ be a finite set of places such that \eqref{eq:zeta.main}, \eqref{eq:O.main}, and \eqref{eq:rep.main} hold for any $v\notin T'$. We have

\[
\prod_{v\notin T'} \zeta_{G(O_v)}(2n-2+\epsilon) \leq \prod_{v \notin T'} \left( 1+D |v| ^{-1-\epsilon \delta} \right) \leq \prod_{v \notin T'} \left( 1+|v| ^{-1-\epsilon \delta} \right)^D \leq \prod_{v\notin T'} \left( 1-|v|^{-1-\epsilon \delta} \right) ^{-D}\leq
\]

\[
\leq \left( \prod_{v\textrm{ non-archimedean}} \left( 1-|v|^{-1-\epsilon \delta} \right) ^{-1}  \right) ^D.
\]
The last product is the product expansion of the Dedekind zeta function of $k$ at the point $1+\epsilon \delta$, and it is well-known that it converges absolutely.

\end{proof}

\subsection{Representation zeta functions of arithmetic groups and the proof of Theorem \ref{thm:introduction.bound}} \label{ssec:pf.bound}

%In order to formulate a generalization of Theorem \ref{thm:introduction.bound}, we use the following definition.
Let us first recall the notion of the Congruence Subgroup Property.
\begin{definition} \label{defn:CSP} Let $k$ be a global field, and let $T$ be a finite set of places of $k$ containing all archimedean ones. We say that $G(O_{k,T})$ has the {\em Congruence Subgroup Property} (CSP for short) if the canonical map
\[
\eta : \widehat{G(O_{k,T})} \rightarrow G \left( \widehat{ O_{k,T} } \right) %= G \left( \prod_{v \notin T} O_v \right)
\]
has a finite kernel. Here, the domain of $\eta$ is the pro-finite completion of $G(O_{k.T})$.%, and its range is the pro-congruence completion of the same group.
\end{definition}

By our assumptions on $G$ and the Strong Approximation Theorem (\cite[Chapter 7]{PR}), the map $\eta$ is always surjective. It is known that, if $\rk_{k} G_k \geq 2$, then $G(O_{k,T})$ satisfies CSP. More generally, a conjecture of Serre asserts that the group $G(O_{k,T})$ has CSP whenever $\sum_{v\in T}\rk_{k_v} G \geq 2$ and $\rk_{k_v} G \geq 1$ for any finite place $v\in T$. This conjecture is known in many cases; see, for example, \cite{Ra}.
%{In particular, it is known to hold for groups whose $\mathbb{Q}$ rank is greater than one.}  \RamiQ{Didn't we just saed one sentence above?}

%In view of the above, the following theorem implies Theorem \ref{thm:introduction.bound}
%
%\begin{theorem} \label{thm:bound.strong} There is a constant $C$ such that the following holds. For every global field $k$ of characteristic larger than $C$, finite set $T$ of places of $k$ containing all the archimedean ones, and any natural number $n$ such that $\Def_{G_{\mathbb{Q}},n}$ has rational singularities, if $G(O_{k,T})$ has wCSP, then $\alpha(G(O_{k,T})) \leq 2n-2$.
%\end{theorem}

Theorem \ref{thm:introduction.bound}
%\ref{thm:bound.strong}
follows from Theorem \ref{thm:introduction.main} and the following theorem

\begin{theorem} Let $k$ be a global field and let $T$ be a finite set of places of $k$ containing all the archimedean ones. Assume that $G(O_{k,T})$ satisfies CSP, then $\alpha(G(O_{k,T}))=\alpha \left( G(\widehat{O_{k,T}}) \right)$.
\end{theorem}

\begin{proof} If the characteristic of $k$ is non-zero, the claim follows from \cite[Theorem 3.3]{LL} and \cite[Lemma 2.2]{LM}. If the characteristic of $k$ is zero, the claim follows from \cite[Theorem 1.4]{AKOV}.
\end{proof}

%\begin{proof} For any non-archimedean place $v$ of $k$, let $O_v$ be the ring of integers of $k_v$. By \cite[Theorem 5.1 and Proposition 6.6]{LL}, $\alpha(G(\mathbb{C})) \leq \alpha(G(O_v))$, for any non-archimedean place $v$. By \cite[Theorem 3.3]{LL} and \cite[Lemma 2.2]{LM}, we get $\alpha(G(O_{k,T}))=\alpha \left( G(\widehat{O_{k,T}}) \right)$.
%\end{proof}

%\begin{theorem} Let $G \rightarrow \Spec \mathbb{Z}$ be an affine group scheme whose generic fiber is semisimple, connected, and simply connected, and let $n\in \mathbb{Z}_{\geq 2}$ such that $\mathcal{R}_{G,n}$ has rational singularities. There is a finite set $S$ of primes such that for any \begin{enumerate}
%\item Global field $k$ of characteristic not in $S$ and
%\item A finite set $T$ of places of $k$ containing all archimedean places of $k$,
%\end{enumerate}
%if $G(O_{T})$ has wCSP, then $\alpha(G(O_{T})) \leq 2n-2$.
%\end{theorem}
%
%\begin{lemma} \label{lem:small.dim} Let $G \rightarrow \Spec \mathbb{Z}$ be an affine group scheme whose generic fiber is connected, simply connected, and semisimple. There is a finite set $S$ of primes and a positive constant $C$ such that, for every $q\in \mathcal{P}_S$, any non-trivial representation of $G(\mathbb{Z}_q)$ or $G(\mathbb{F}_q[[t]])$ has dimension at least $q/C$.
%\end{lemma}
%
%\begin{proof} For almost all prime numbers $p$, Let $O$ be one of $\mathbb{Z}_q$ or $\mathbb{F}_q[[t]]$, and let $\rho$ be an irreducible representation of $G(O)$. We divide the argument into the following cases: \begin{enumerate}
%\item The restriction of $\rho$ to the first congruence subgroup is trivial. In this case, $\rho$ factors through a non-trivial representation of $G(\mathbb{F}_q)$. The claim follows form \cite[Theorem ? and ??]{LS}. \nir{dimensions are polynomials, zeta function tends to 1}
%\item The restriction of $\rho$ to the first congruence subgroup is non-trivial. Let $m$ be the $\tau$ be an irreducible component of this restriction. The group $G(\mathbb{F}_q)$ acts on $\Irr(G^1(O))$ and the stabilizer of $\tau$ is a non-trivial subgroup in $G(\mathbb{F}_q)$ \nir{explain+find reference}. Any such subgroup must have index at least $q$, so
%\[
%\dim \rho \geq [G(\mathbb{F}_q):\Stab_{G(\mathbb{F}_q)} \tau]\cdot \dim \tau \geq q
%\]
%\end{enumerate}
%\end{proof}
%
%\begin{proof} By Corollary \ref{cor:zeta.minus.1} and Lemma \ref{lem:small.dim}, there is a finite set $S$ of prime numbers and a constant $C$ such that, for any $q\in \mathcal{P}_S$,
%\[
%\zeta_{G(\mathbb{Z}_q)}(2n-2)=\zeta_{G(\mathbb{F}_q[[t]])}(2n-2) < 1+\frac{C}{q},
%\]
%and any non-trivial representation of either $G(\mathbb{F}_q[[t]])$ or $G(\mathbb{Z}_q)$ has dimension at least $q/C$.
%
%Let $k$ and $T$ be as in the assumptions of the theorem. Denote the set of archimedean places of $k$ by $V_\infty$. Recall that, if $\Gamma$ is a group, the pro-algebraic completion of $\Gamma$, which we denote by $A(\Gamma)$, is the inverse limit of $\overline{\rho(\Gamma)}^Z$, where $\rho$ ranges over all linear representations of $\Gamma$. By \cite[Theorem 3.3]{LL}, there is a finite-index subgroup $\Gamma_0 \subset G(O_S)$ such that
%\begin{equation}
%A(\Gamma_0)=G(\mathbb{C})^{|V_\infty|} \times \prod_{v \notin T} L_v,
%\end{equation}
%where $L_v$ is an open subgroup in $G(O_v)$ and is equal to $G(O_v)$ for almost all $v$.
%
%Since the abscissa of convergence does not change after passing to a subgroup of finite index, we have
%\begin{equation}
%\alpha(G(O_T))=\alpha(\Gamma_0)=\alpha(A(\Gamma_0))=\alpha \left( G(\mathbb{C})^{|V_\infty|} \times \prod_{v \notin T} L_v\right) = \max \left\{ \alpha \left( G(\mathbb{C})^{|V_\infty |} \right) , \alpha \left(  \prod_{v \notin T} G(O_v)\right) \right\}.
%\end{equation}
%If $k$ has characteristic zero, let
%\[
%R=T \cup \left\{ v \mid \textrm{$v$ lies over a prime in $S$}\right\} \cup \left\{ v \mid \textrm{$v$ is ramified in $k$}\right\}
%\]
%If $k$ has positive characteristic, let $R= T$. We claim that
%\begin{equation}
%\alpha(G(O_T))= \alpha \left( \prod_{v \notin R} G(O_v) \right) .
%\end{equation}
%The claim is trivial if $k$ has positive characteristic. If $k$ has characteristic zero, we argue as follows: \cite[Theorem ??]{LL} says that $\alpha(G(\mathbb{C})) \leq \alpha(G(O_v))$ for any non-archimedean $v$, while \cite[Theorem ??]{AKOV} says that, for any place $v$, there are infinitely many places $w$ such that $\alpha(G(O_v)) \leq \alpha(G(O_w))$.
%
%Thus, it is enough to show that, for every $\epsilon \in (0,1)$, the infinite product
%\[
%\prod_{v\notin R} \zeta_{G(O_v)}(2n-2+\epsilon)
%\]
%converges. If $v\notin R$, then $G(O_v)$ is isomorphic to either $G(\mathbb{Z}_{|v|})$ or $G(\mathbb{F}_{|v|}[[t]])$, so
%\[
%\zeta_{G(O_v)}(2n-2)-1 \leq C|v|^{-1}.
%\]
%Since every representation of $G(O_v)$ is either trivial or has dimension at least $\frac{|v|}{C}$, we get that
%\[
%\zeta_{G(O_v)}(2n-2+\epsilon)-1 \leq C^{1+ \epsilon}|v|^{-1-\epsilon}<C^2 |v|^{-1-\epsilon}.
%\]
%Therefore, if $\zeta_k$ denotes the Dedekind zeta function of $k$, we have
%\[
%\prod_{v\notin T} \zeta_{G(O_v)}(2n-2+\epsilon) \leq \prod_{v\notin T} \left( 1+C^2|v|^{-1-\epsilon} \right) \leq \prod_{v\notin V_\infty} \left( \frac{1}{1-|v|^{-1-\epsilon}} \right) ^{C^2} \leq \zeta_k \left( 1+\epsilon \right) ^{C^2} < \infty.
%\]
%
%\nir{If want to change to include $G$ defined over $R$, need to add to $T$ the places over ramified primes}
%\end{proof}

\subsection{The Igusa zeta function and proof of Theorem \ref{thm:igu}} \label{ssec:pf.thm.igu}
The following lemma is standard:
\begin{lemma} \label{lem:Dirichlet}
$ $
\begin{enumerate}
\item \label{it:Dirichlet.1} Let $a_n$ be a sequence and assume that there is a constant $C>0$ such that $\frac{1}{C} < a_n < C$ for $n> C$. Then the series $f(s):=\sum a_n p^{-ns}$ converges absolutely for $Re(s)>0$ and diverges for $s=0$.
\item \label{it:Dirichlet.2} Suppose in addition that $f(s)$ coincides (in its domain of absolute convergence) with a rational function of $p^{-s}$, which we continue to denote by $f(s)$. Then $0$ is a simple pole of $f(s)$ and all the poles on the imaginary axis are simple.
\item \label{it:Dirichlet.3} Let $a_{n,p}$ be a sequence indexed by a positive integer $n$ and a prime $p$, and let $\delta,C >0$. Suppose that $|a_{n,p}-1|<Cp^{-\delta}$.  Let $Z(s):=\prod_p(1+\sum_n a_{n,p} p^{-ns})$. Then:
\begin{enumerate}
\item $Z(s)$ converges absolutely for $Re(s)>1$.
\item If $\zeta(s)$ denotes the Riemann zeta function, then $Z(s)/\zeta(s)$ can be analytically continued for $Re(s)>1-\delta$.
\end{enumerate}
\end{enumerate}
\end{lemma}

Claim \ref{item:P.p.pole} of Theorem \ref{thm:igu} follows from Lemma \ref{lem:Dirichlet}(\ref{it:Dirichlet.1},\ref{it:Dirichlet.2}), Theorem \ref{thm:intro.count}, and the rationality of $\Rami{\mathfrak{P}}_{X,p}(s)$. Claim \ref{item:P.zeta} of Theorem \ref{thm:igu} follows from Lemma \ref{lem:Dirichlet}\eqref{it:Dirichlet.3} and Theorem \ref{thm:intro.count}. Claim \ref{it:3} of Theorem \ref{thm:igu} follows from claim \ref{item:P.zeta} and \cite[Theorem 4.20]{dSG}.

Finally, claim \ref{item:Z.zeta} of Theorem \ref{thm:igu} follows from Lemma \ref{lem:Dirichlet}\eqref{it:Dirichlet.3}, Theorem \ref{thm:intro.count}, and the fact that
\[
\mathcal{Z}_{X,p}(s)=\sum_n \left( h_X(\mathbb{Z} / p^n)-\frac{h_X(\mathbb{Z} / p^{n+1})}{p} \right) p ^{-n(s+1)}.
\]

\begin{remark} \label{rem:l.c.i.} In view of \nir{the comment just after Theorem \ref{thm:size.X}}
%Remark \ref{rem:l.c.i.h.bdd}
, Lemma \ref{lem:Dirichlet} also implies that, if $X$ is local complete intersection, then one can take $S$ to be empty in Theorem \ref{thm:igu}.
\end{remark}

\begin{thebibliography}{KKMS73}

\bibitem[AA]{AA} Aizenbud, A.; Avni, N.; {\em Representation growth and rational singularities of the moduli space of local systems}. \href{http://arxiv.org/abs/1307.0371}{Arxiv 1307.0371}, to appear in Inventiones Mathematicae.
\bibitem[AKOV]{AKOV} Avni, N.; Klopsch, B.; Onn, U.; Voll, C.; {\em Arithmetic Groups, Base Change, and Representation Growth}. \href{http://http://arxiv.org/abs/1110.6092}{Arxiv 1110.6092}.
\bibitem[AKOV2]{AKOV3} Avni, N.; Klopsch, B.; Onn, U.; Voll, C.; {\em Representation zeta functions of compact p-adic analytic groups and arithmetic groups}. Duke Math. J. 162 (2013), no. 1, 111--197.
%\bibitem{Bo} Boyarchenko, M.; Sabitova, M; {\em The orbit method for profinite groups and a p-adic analogue of Brown's theorem}. Israel J. Math. 165 (2008), 67-91.
%\bibitem{DDMS} Dixon, J. D.; du Sautoy, M. P. F.; Mann, A.; Segal, D.; {\em  Analytic Pro-P Groups}. Second edition. Cambridge Studies in Advanced Mathematics, 61. Cambridge University Press, Cambridge, 1999.
\bibitem[Avn11]{A} Avni, N.; {\em Arithmetic groups have rational representation growth.} Ann. of Math. 174 (2011), 1009--1056.
\bibitem[BLR90]{NeronModels} Bosch, S.; L\"utkebohmert, W.; Raynaud, M.; {\em N\'eron models}. Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)], 21. Springer-Verlag, Berlin, 1990.
 \bibitem[dSG00]{dSG} du Sautoy, M. P. F.; Grunewald, F.; {\em Analytic properties of zeta functions and subgroup growth}. Annals of Math. 152 (2000), 793--833.
\bibitem[Gro66]{EGA4}  Grothendieck A.; \emph{\'El\'ements de g\'eom\'etrie alg\'ebrique IV} Publications mathematiques de l' I.H.E.S., tome 28 (1966).
%\bibitem{Ha} Hall, P.; {\em A Contribution to the Theory of Groups of Prime-Power Order.} Proc. London Math. Soc. S2-36 no. 1, 29.
\bibitem[Har77]{Har} Hartshorne, R.; \emph{Algebraic geometry}, Springer-Verlag, New York   (1977).
\bibitem[HK06]{HK} Hrushovski, E.; Kazhdan. D.; {\em Integration in valued fields}. Algebraic geometry and number theory, volume 253 of Progr. Math., Birkh\"auser Boston, Boston, MA, 2006.
\bibitem[Jai06]{Jai} Jaikin--Zapirain A.; {\em Zeta function of representations of compact p-adic analytic groups.}  J. Amer. Math. Soc. 19 (2006), 91--118.
\bibitem[KKMS73]{KKMS} Kempf, G.; Knudsen, F.; Mumford D.; Saint-Donat, B.; \emph{Toroidal Embeddings I.} Springer Lecture Notes. no. 339 (1973)
\bibitem[LL08]{LL} Larsen, M.; Lubotzky, A.; {\em Representation growth of linear groups}. J. Eur. Math. Soc. 10 (2008), 351--390.
\bibitem[LM04]{LM} Lubotzky, A.; Martin, B.; {\em Polynomial representation growth and the congruence subgroup problem.} Israel J. Math. 144 (2004), 293--316.
\bibitem[LS05a]{LS} Liebeck, M.W.; Shalev, A.; {\em Character degrees and random walks in finite groups of Lie type.} Proc. London Math. Soc. 90 (2005), 61--86.
\bibitem[LS05b]{LS05} Liebeck, M.W.; Shalev, A.; {\em Fuchsian groups, finite simple groups and representation varieties.} Inventiones Math. 159 (2005), 317--367.
\bibitem[LW54]{LW} Lang, S.; Weil, A.; {\em Number of points of varieties in finite fields}. Amer. J. Math. 76 (1954), 819--827.
\bibitem[Mus01]{Mus} Musta\c{t}\u{a}, M.; {\em Jet schemes of locally complete intersection canonical singularities.} Invent. Math. 145 (2001), no. 3, 397-424.
\bibitem[Mus]{Mus_zeta} Musta\c{t}\u{a}, M.; {Zeta functions in algebraic geometry}. Lecture notes. Available at \url{http://www.math.lsa.umich.edu/~mmustata/zeta_book.pdf}.
%{http://www.math.lsa.umich.edu/$\sim$ mmustata/zeta\_book.pdf}.
%\bibitem{No} Nori, M.; {\em On subgroups of $\mathrm{GL}_n(\mathbb{F}_p)$.} Invent.\ Math.\ 88 (1987), 257--275.
\bibitem[PR94]{PR} Platonov, V.; Rapinchuk, A.; {\em Algebraic groups and number theory.} Pure and Applied Mathematics, 139. Academic Press, Inc., Boston, MA, 1994.
\bibitem[Rag04]{Ra} Raghunathan, M.S.; {\em The congruence subgroup problem.}  Proc.\ Indian Acad.\ Sci.\ Math.\ 114 (2004), no. 4, 299--308.
\bibitem[Ser64]{Se} Serre, J.P. \emph{Lie Algebras and Lie Groups.} Lecture Notes in Mathematics, {\bf 1500}. Springer-Verlag, New York, 1964.

\end{thebibliography}

\end{document}


\appendix
\section{Kirillov's Orbit Method for unramified extensions of big pro-$p$ groups}\label{app:kir}

Recall that $G$ is an algebraic group scheme over $\mathbb{Z}$ whose generic fiber is semi-simple together with a fixed embedding $G \hookrightarrow \GL_N$. The following weak version of Theorem \ref{thm:zeta.minus.one} was proved in \cite{AKOV}:

\begin{theorem} \label{thm:Larsen.Lubotzky} Let $n$ be such that the series defining $\zeta_{G(\mathbb{Z}_q)}(n)$ converges for every prime power $q$. There is a quantifier-free definable function $f:\VF^{\dim G +1} \rightarrow \VG$ such that, for every finite extension $L \supset \mathbb{Q}$, there is finite set $S(L)$ of primes of $O_L$ for which
\[
\zeta_{G(O_{L,\mathfrak{q}})}(n)-\zeta_{G(O_L/ \mathfrak{q})}(n) \sim \int_{O_{L,\mathfrak{q}}^{\dim G+1}}q^{f(x)}dx \quad \textrm{over $\mathfrak{q} \notin S(L)$}.
\]
\end{theorem}

Theorem \ref{thm:zeta.minus.one} is equivalent to the claim that there is a finite set $S$ of primes in $\mathbb{Z}$ such that, for every $L$, one can take $S(L)$ to be the set
\[
\left\{ \mathfrak{q} \mid \mathfrak{q} \cap \mathbb{Z} \in S \textrm{ or $\mathfrak{q} \cap \mathbb{Z}$ ramifies in $L$} \right\}.
\]

The argument in \cite{AKOV} gives explicit conditions on the primes $\mathfrak{q} \notin S(L)$ in Theorem \ref{thm:Larsen.Lubotzky}. Some of these conditions depend only on $\mathfrak{q} \cap \mathbb{Z}$ and not on $L$. Another condition is that $\mathfrak{q} \cap \mathbb{Z}$ is unramified in $L$. The rest of the conditions roughly say that Kirillov's orbit method holds for some pro-p subgroups of $G(O_{L,\mathfrak{q}})$. In order to formulate these conditions, we will use the following definitions:

\begin{definition} Let $p$ be a prime, let $q$ be a power of $p$, and let $n$ be a positive integer. Denote the reduction maps $G(\mathbb{Z}_q) \rightarrow G(\mathbb{Z}_q/p^n)$ and $\mathfrak{g}(\mathbb{Z}_q) \rightarrow \mathfrak{g}(\mathbb{Z}_q/p^n)$ by $\pi_n$ and $\delta_n$ respectively. \begin{enumerate}
\item We denote the kernel of $\pi_n$ by $G(\mathbb{Z}_q)^{(n)}$.
\item We denote the kernel of $\delta_n$ by $\mathfrak{g}(\mathbb{Z}_q)^{(n)}$.
\item Fix a $p$-Syllow subgroup $U \subset G(\mathbb{F}_q)$ . We denote the subgroup $\pi_1 ^{-1} (U)$ by $\Syl(G(\mathbb{Z}_q))$. {For almost any $p$, this an Iwahori subgroup of $G(\mathbb{Q}_q)$.}
\end{enumerate}
\end{definition}

\begin{definition} \label{def:Kir} Let $q$ be a prime power. We say that $(G,q)$ is a Kirillov pair if the following conditions hold: \begin{enumerate}
\item For every $g\in \Syl(G(\mathbb{Z}_q))$, the series
\begin{equation} \label{eq:log}
\log(g):=(g-1) - \frac{1}{2}(g-1)^2 + \frac{1}{3}(g-1)^3 - \cdots
\end{equation}
converges in $\mathfrak{gl}_N(\mathbb{Q}_q)$.
\item For every group $\Lambda$ satisfying $G(\mathbb{Z}_q)^{(1)} \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$, the subset $\log (\Lambda)$ is a Lie subring of $\mathfrak{gl}_N(\mathbb{Z}_q)$. Moreover, $\log$ induces a bijection between the collection of groups $\Lambda$ satisfying $G(\mathbb{Z}_q)^{(1)} \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$ and the collection of Lie rings $\lambda$ satisfying $\log \left( G(\mathbb{Z}_q)^{(1}) \right) \subset \lambda \subset \log \left( \Syl(G(\mathbb{Z}_q))\right)$.
\item For every group $\Lambda$ satisfying $G(\mathbb{Z}_q)^{(1)} \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$, there is a bijection between irreducible {representations} of $\Lambda$ {up to conjugation} and $\Lambda$-orbits in the Pontrjagin dual of the additive group $\log(\Lambda)$ such that, if a {representation} $\rho$ corresponds to an orbit $\mathcal{O}$, then $\dim\, \rho=| \mathcal{O} |^{1/2}$.
\end{enumerate}
\end{definition}

We denote the collection of primes powers $q$ such that $(G,q)$ is Kirillov by $\mathcal{K}$.

The proof of Theorem \ref{thm:Larsen.Lubotzky} in \cite{AKOV} gives the following

\begin{theorem} Let $n$ be such that the series defining $\zeta_{G(\mathbb{Z}_q)}(n)$ converges for every prime power $q$. There is a finite set $S$ of primes and a quantifier-free definable function $f$ such that
\[
\zeta_{G(\mathbb{Z}_q)}(n)-\zeta_{G(\mathbb{F}_q)}(n) \sim \int_{\mathbb{Z}_q^{\dim G+1}}q^{f(x)}dx \quad \textrm{over $q \in \mathcal{K} \cap \mathcal{P}_S$}.
\]
\end{theorem}

Hence, in order to prove Theorem \ref{thm:zeta.minus.one}, it is enough to prove the following:

\begin{theorem} \label{thm:PSKS} There is a finite set $S$ of prime numbers such that $\mathcal{P}_S \subset \mathcal{K}$.
\end{theorem}

We prove Theorem \ref{thm:PSKS} in the next two subsections.

\subsection{Kirillov's Orbit Method}

We first note that, if $g\in \Syl(G(\mathbb{Z}_q))$, then the reduction of $g-1$ to $\mathfrak{gl}_N(\mathbb{F}_q)$ is nilpotent. In particular, $\val_{\mathbb{Q}_q}((g-1)^n) \geq \lfloor \frac{n}{N} \rfloor$. Hence, Condition 1. in Definition \ref{def:Kir} holds for every prime power $q$. {A standard argument shows that} $\log(g)\in \mathfrak{g}(\mathbb{Q}_q)$.

The following Lemma is standard

\begin{lemma} \label{lem:exp.log} There is a finite set $S$ of primes such that, for all $q\in \mathcal{P}_S$, \begin{enumerate}
\item For every $g\in \Syl(G(\mathbb{Z}_q))$ and every $n$, we have $\frac{1}{n}(g-1)^n \in \mathfrak{gl}_N(\mathbb{Z}_q)$, and, therefore, $\log(\Syl(G(\mathbb{Z}_q))) \subset \mathfrak{gl}_N(\mathbb{Z}_q)$. Since the reductions of $\frac{1}{n}(g-1)^n$ are commuting nilpotents, we get that the reductions of each element of $\log(\Syl(G(\mathbb{Z}_q)))$ to $\mathfrak{gl}_N(\mathbb{F}_q)$ is nilpotent.
\item The series defining $\exp$ converges on $\log(\Syl(G(\mathbb{Z}_q)))$ and is an inverse function to $\log$.
\item For every $g\in \Syl(G(\mathbb{Z}_q))$ and $n\in \mathbb{N}$, the functions $\exp$ and $\log$ are inverse bijections between the cosets $gG(\mathbb{Z}_q)^{(n)}$ and $\log(g)+\mathfrak{g}(\mathbb{Z}_q)^{(n)}$
\end{enumerate}
\end{lemma}

Recall that the Campbell--Hausdorff formula is the formal Lie series equality
\begin{equation} \label{eq:CH}
\log \left( \exp(X) \cdot \exp(Y) \right) = \CH_1(X,Y)+\CH_2(X,Y)+ \cdots
\end{equation}
where $\CH_i$ is some homogeneous Lie polynomial of degree $i$ with coefficients in $\mathbb{Q}$. For example, $\CH_1(X,Y)=X+Y$, $\CH_2(X,Y)=\frac{1}{2}[X,Y]$, and $\CH_3(X,Y)=\frac{1}{12} \left( [X,[X,Y]]-[Y,[X,Y]] \right)$.

\begin{definition} Fix a prime $p$ and a natural number $i$. \begin{enumerate}
\item Let $\mathcal{A}_i$ be the $\mathbb{Q}$-vector space of non-associative polynomials of degree $i$ in two variables $X,Y$. For an element $P\in \mathcal{A}_i$, let $\val_p(P)$ be the minimum of the $p$-adic valuations of the coefficients of $P$.
\item Let $\mathcal{L}_i$ be the $\mathbb{Q}$-vector space of Lie polynomials of degree $i$ in $X,Y$. We have a natural surjection $\sigma:\mathcal{A}_i \rightarrow \mathcal{L}_i$. Given $\Phi\in \mathcal{L}_i$, let $\val_p(\Phi)=\max \left\{ \val_p(P) \mid \sigma(P)=\Phi \right\}$.
\end{enumerate}
\end{definition}

\begin{lemma}[{\cite[Page 123]{DDMS}}] \label{lem:val.CH} For any prime $p>2$, $\val_p(\CH_i)\geq \frac{i-1}{p-1}$.
\end{lemma}

Lemma \ref{lem:val.CH} implies that, after possibly enlarging $S$, the series in \eqref{eq:CH} converge.

\begin{lemma} \label{lem:log.group} Suppose that $p>N$, $p \notin S$, and $q$ is a power of $p$. Then \begin{enumerate}
\item If $g,h\in\Syl(G(\mathbb{Z}_q))$, then there is $x\in \langle g,h \rangle G(\mathbb{Z}_q)^{(1)}$ such that $g^{p}h^{p}=x^{p}$ modulo $G(\mathbb{Z}_q)^{(2)}$.
\item If $g,h,x\in \Syl(G(\mathbb{Z}_q))$ satisfy $g^{p}h^{p}=x^{p}$ modulo $G(\mathbb{Z}_q)^{(2)}$, then $\log(g)+\log(h)=\log(x)$ modulo $p$.
\item If $G(\mathbb{Z}_q)^{(1)} \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$ is a group, then $\log(\Lambda)$ is an additive subgroup of $\mathfrak{g}(\mathbb{Z}_q)$.
\end{enumerate}
\end{lemma}

\begin{proof} $ $ \begin{enumerate}
\item The group $\langle g,h \rangle G^{(1)}(\mathbb{Z}_q) / G(\mathbb{Z}_q)^{(2)}$ is a $p$-group of exponent $N<p$. Hence, it is regular (see \cite{Ha}), so the result holds.
\item Let $g^{p}h^{p}=x^{p}y$ with $y\in G(\mathbb{Z}_q)^{(2)}$. Let $A=\log(g),B=\log(h),C=\log(x)$. By Lemma \ref{lem:exp.log}, there is $D\in \mathfrak{g}(\mathbb{Z}_q)^{(1)}$ such that $y=\exp(pD)$. We have
\[
e^{pA}e^{pB}=e^{pC}e^{pD},
\]
so, by Campbell--Hausdorff,
\[
pA+pB \equiv pC+pD \quad \textrm{(mod $p^{2}$)},
\]
which implies the claim, as $p|D$.
\item Given $g,h\in \Lambda$, the previous claims imply that there is $x\in \Lambda$ such that $\log(g)+\log(h)\in \log(x)+\mathfrak{g}(\mathbb{Z}_q)^{(1)}$. By Lemma \ref{lem:exp.log}, there is $y\in x G(\mathbb{Z}_q)^{(1)} \subset \Lambda$ such that $\log(y)=\log(g)+\log(h)$.
\end{enumerate}
\end{proof}

We now show that Condition 2. in Definition \ref{def:Kir} holds. By \cite[Lemma 1.6]{No} and Lemma \ref{lem:log.group}, we get that $\log \Lambda$ is a Lie subring of $\mathfrak{g}(\mathbb{Z}_q)$. Conversely, if $\lambda \subset \log(\Syl(G(\mathbb{Z}_q)))$ is a Lie subring, then the Campbell--Hausdorff formula implies that $\exp(\lambda)$ is a group.


\begin{definition} $ $ \begin{enumerate}
\item Let $\Lambda$ be a pro-finite group. We denote the collection of locally constant complex valued functions on $\Lambda$ by $\mathcal{S}(\Lambda)$. The vector space $\mathcal{S}(\Lambda)$ is a ring under convolution (with respect to the normalized Haar measure).
\item Let $\Lambda$ be a pro-finite group, and let $\Delta$ be a group acting on $\Lambda$ by automorphisms. We denote the collection of $\Delta$-invariant complex-valued locally constant functions on $\Lambda$ by $\mathcal{S}(\Lambda)^ \Delta$. It is also a ring under convolution.
\end{enumerate}
\end{definition}
%The above definition will arise in two cases. One is $\mathcal{S}(\Lambda)^ \Lambda$, where $G^1(O_F) \subset \Lambda \subset \Syl(G(O_F))$, the other is $\mathcal{S}(\log \Lambda)^ \Lambda$. In both cases $\Lambda$ acts on by the adjoint action.

The core of the Kirilov orbit method is the following theorem which we prove in the next subsection.

\begin{theorem} \label{thm:conv.alg} There is a finite set $S$ of primes such that, for every $q\in \mathcal{P}_S$ and every subgroup $G(\mathbb{Z}_q)^{(1)} \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$, the map
\[
\log^*: \mathcal{S}(\log(\Lambda))^\Lambda \rightarrow \mathcal{S}(\Lambda)^\Lambda
\]
is an isomorphism of convolution algebras. Here, $\Lambda$ acts on itself and on $\log(\Lambda)$ by the adjoint actions.
\end{theorem}

The following Corollary of Theorem \ref{thm:conv.alg} implies Theorem \ref{thm:PSKS}:

\begin{corollary} There is a finite set $S$ of primes such that, for every $q\in \mathcal{P}_S$ and every subgroup $G(\mathbb{Z}_q)^{(1)} \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$, there is a bijection between irreducible representations of $\Lambda$ and $\Lambda$-orbits in the Pontrjagin dual of the additive group $\log(\Lambda)$ such that, if a representation $\rho$ corresponds to an orbit $\mathcal{O}$, then, for every $g\in \Lambda$,
\[
\chi_\rho (g) = \frac{1}{| \mathcal{O} |^{1/2}}\sum_{\psi \in \mathcal{O}} \psi(\log g).
\]
\end{corollary}

\begin{proof} It is easily seen that the functions $\frac{1}{| \mathcal{O} |^{1/2}}\sum_{\psi \in \mathcal{O}} \psi$ are the indecomposable idempotents of $\mathcal{S}(\log(\Lambda))^\Lambda$. Hence, their compositions with $\log$ are the minimal idempotents of $\mathcal{S}(\Lambda)^\Lambda$, i.e. the functions $\frac{1}{( \dim \, \pi )^ \frac{1}{2} }\chi_\pi$ for $\pi \in \Irr \Lambda$.
\end{proof}

\subsection{Proof of Theorem \ref{thm:conv.alg}}

{Our argument follows \cite{Bo}.} We start by establishing a formal identity between Lie series. Let $\mathcal{L}=\oplus \mathcal{L}_i$ be the free Lie algebra over $\mathbb{Q}$ on two generators, $X$ and $Y$ graded by degree. We denote the completion of $\mathcal{L}$ with respect to this grading by $\widehat{\mathcal{L}}$. If $\Phi(X,Y)\in \widehat{\mathcal{L}}$, we write $\Phi(X,Y)=\Phi_1(X,Y)+\Phi_2(X,Y)+\cdots$, where $\Phi_n(X,Y)\in \mathcal{L}$ is homogeneous of degree $n$. The composition map $\mathcal{L}\times \mathcal{L} \times \mathcal{L} \rightarrow \mathcal{L}$ sending $(\Phi(X,Y),\Psi_1(X,Y),\Psi_2(X,Y))$ to $\Phi(\Psi_1(X,Y),\Psi_2(X,Y))$ extends to $\widehat{\mathcal{L}}$ by continuity.

Define the element $X^Y\in \widehat{\mathcal{L}}$ by
\[
X^Y:=\exp(\ad(Y)) \cdot X=X+[Y,X]+\frac{1}{2!}[Y,[Y,X]]+\frac{1}{3!}[Y,[Y,[Y,X]]]+\cdots \in \widehat{\mathcal{L}}.
\]

\begin{proposition} \label{prop:Phi.Psi} There are $\Phi(X,Y),\Psi(X,Y)\in \widehat{\mathcal{L}}$ such that, \begin{enumerate}
\item $\val_p(\Phi_n),\val_p(\Psi_n) \geq -\frac{2n-2}{p-1}$.
\item \label{cond:star.plus} $\CH_1(X,Y)+\CH_2(X,Y)+\cdots=X^{\Phi(X,Y)}+Y^{\Psi(X,Y)}$.
\end{enumerate}
\end{proposition}

\begin{proof} We construct $\Phi_n$ and $\Psi_n$ recursively in $n$, starting from $\Phi_1(X,Y)=-\frac{1}{4}Y$ and $\Psi_1(X,Y)=\frac{1}{4}X$. For $n \geq 2$, the degree $n+1$ terms in Condition \ref{cond:star.plus} are
\begin{multline} \label{eq:CH.Phi.Psi}
\CH_{n+1}(X,Y)=[\Phi_n(X,Y),X]+\sum_{k=2}^n \sum_{j_1,\ldots,j_k} \frac{1}{k!}[\Phi_{j_1},[\cdots[\Phi_{j_k},X]\cdots]]+\\+[\Psi_n(X,Y),Y]+\sum_{k=2}^n \sum_{j_1,\ldots,j_k} \frac{1}{k!}[\Psi_{j_1},[\cdots[\Psi_{j_k},Y]\cdots]],
\end{multline}
where the inner summations are over $j_1,\ldots,j_k$ satisfying $j_1+\cdots+j_k=n$. By induction,
\[
\val_p \left( \frac{1}{k!}[\Phi_{j_1},[\cdots[\Phi_{j_k},X]\cdots]] \right) \geq -\frac{k}{p-1}-\frac{2(j_1+\cdots+j_k)-2k}{p-1}=-\frac{2n-k}{p-1} \geq -\frac{2n-2}{p-1},
\]
and
\[
\val_p(\CH_{n+1})\geq -\frac{n}{p-1} \geq -\frac{2n-2}{p-1}.
\]
This implies that we can write \eqref{eq:CH.Phi.Psi} as $$[\Phi_n(X,Y),X]+[\Psi_n(X,Y),Y]=\Xi,$$ where $\Xi\in \mathcal{L}$ is an homogeneous element of degree $n+1$ with valuation at least $-\frac{2n-2}{p-1}$.


The proposition follows from the following Lemma.
\end{proof}

\begin{lemma} Let $\mathcal{L}_{n,\mathbb{Z}}$ be the collection of homogeneous Lie polynomials of degree $n$ with integral coefficients. For any $n \geq 2$ and $\Xi \in \mathcal{L}_{n,\mathbb{Z}}$, there are $\Phi,\Psi \in \mathcal{L}_{n-1,\mathbb{Z}}$ such that $\Xi=[\Phi,X]+[\Psi,Y]$.
\end{lemma}

\begin{proof} We can assume that $\Xi$ is a represented by a monomial, $\Xi=[\Theta,\Theta']$, where $\Theta,\Theta'$ are lower-degree monomials. The proof is by induction on $n$ and $\deg(\Theta')$. The cases $n=2$ or $\deg(\Theta_2)=1$ are clear. For the induction step, the induction hypothesis implies that we can write $\Theta'=[\Upsilon_1,X]+[\Upsilon_2,Y]$, so it is enough to prove the claim assuming $\Xi=[\Theta,[\Upsilon,X]]$. By Jacobi identity, $[\Theta,[\Upsilon,X]]=[[\Theta,\Upsilon],X]-[[\Theta,X],\Upsilon]$. The first term has the desired form, and we can use induction on the second term, since $\deg(\Upsilon)=\deg(\Theta ')-1$.
\end{proof}

\begin{definition} An element $\Phi \in \widehat{\mathcal{L}}$ has slope $\geq k$ if $\val_p(\Phi_n) \geq -\lfloor \frac{n}{k} \rfloor$.
\end{definition}

\begin{lemma} \label{lem:slope.exp} Let $\Phi\in \widehat{\mathcal{L}}$. If $\Phi$ has slope $\geq k$, then $X^{\Phi}$ has slope $\geq \frac{1}{2}\min \left\{ k,p-1 \right\}$.
\end{lemma}

\begin{proof} It is enough to show that, for any $k$, the element $\frac{1}{k!}[\Phi,[\Phi, \cdots [\Phi,X] \cdots ]]$ has slope $\geq \frac{\max \left\{ k,p-1 \right\}}{2}$. The degree $n$ homogenous part of $\frac{1}{k!}[\Phi,[\Phi, \cdots [\Phi,X] \cdots ]]$ is a sum of elements of the form $\frac{1}{k!}[\Phi_{j_1},[\Phi_{j_2}, \cdots [\Phi_{j_k},X] \cdots ]]$, where $j_1+\ldots+j_k=n-1$. By the assumptions,
\[
\val_p \left( \frac{1}{k!}[\Phi_{j_1},[\Phi_{j_2}, \cdots [\Phi_{j_k},X] \cdots ]] \right) \geq -\frac{k}{p-1} - \sum \left \lfloor \frac{j_i}{k} \right \rfloor \geq -\frac{n-1}{p-1} - \frac{n-1}{k} \geq \frac{2n}{\max \left\{ k,p-1 \right\} }.
\]
\end{proof}

\begin{example} \label{exam:X.Phi} The series $\Phi(X,Y),\Psi(X,Y)$ from Proposition \ref{prop:Phi.Psi} have slopes $\geq \frac{p-1}{2}$ and the series $X^ \Phi$ and $Y^ \Psi$ have slopes $\geq \frac{p-1}{4}$.
\end{example}

\begin{definition} Let $\lambda$ be a torsion-free $\mathbb{Z}_p$-module together with a Lie bracket. We say that $\lambda$ is $k$-powerful if $[\lambda,_k \lambda]:=[\lambda,[\lambda,[\cdots]]] \subset p \lambda$.
\end{definition}

\begin{lemma}\label{lem:log.l.powr} There is a finite set $S$ of primes such that, for any $q\in \mathcal{P}_S$ and any $G^{(1)}(\mathbb{Z}_q) \subset \Lambda \subset \Syl(G(\mathbb{Z}_q))$, the Lie ring $\log(\Lambda)$ is $3N$-powerful.
\end{lemma}

\begin{proof}
Choose $S$ such that Lemmas \ref{lem:exp.log} and \ref{lem:log.group} hold for any $q\in \mathcal{P}_S$. Let $\lambda = \log(\Lambda)$ and $\overline{\lambda}=\lambda / \mathfrak{g}^{(1)}(\mathbb{Z}_q) \subset \mathfrak{gl}_N(\mathbb{F}_q)$. Since $\overline{\lambda}$ is nilpotent, we get that $[\overline{\lambda},_N \overline{\lambda}]=0$ and $[\overline{\lambda},_{2N} \mathfrak{gl}_{N}(\mathbb{F}_q)]=0$. Hence,
\[
[\lambda,_{3N} \lambda] \subset [\lambda,_{2N} \, p \mathfrak{gl}(\mathbb{Z}_q)] \cap \lambda \subset p^2 \mathfrak{gl}_N(\mathbb{Z}_q) \cap \lambda \subset p \lambda.
\]
\end{proof}

Suppose that $\lambda$ is $k$-powerful. Consider the filtration
\[
\lambda \supset [\lambda,\lambda] +p \lambda \supset \cdots \supset [\lambda,_{k-1} \lambda]+p \lambda  \supset p \lambda \supset p \left( [\lambda,\lambda] +p \lambda \right) \supset \cdots
\]
i.e. define $\mathcal{F}^{ak+b}\lambda =p^a \left( [\lambda,_b \lambda]+p \lambda \right)$ for $b\in \left\{ 0,\ldots,k-1 \right\}$. The following are easy to verify:
\begin{equation} \label{eq:filtration}
[\mathcal{F}^i \lambda, \mathcal{F} ^j \lambda] \subset \mathcal{F} ^{i+j} \lambda \quad\quad [\lambda,\mathcal{F} ^i \lambda] \subset \mathcal{F} ^{i+1} \lambda
\end{equation}


\begin{proposition} \label{prop:m.p}Let $\lambda$ be $k$-powerful.
\begin{enumerate}
\item Assume that $\Phi \in \widehat{\mathcal{L}}$ has slope $\geq 2k$. Then, for any $x,y \in \lambda$,
\begin{enumerate}
\item\label{prop:m.p:1a} $\Phi_n(x,y)\in \lambda$.
\item\label{prop:m.p:1b} The series $\Phi(x,y)$ converges and its limit is in $\lambda$.
\item\label{prop:m.p:1c} If $z,w \in \mathcal{F} ^i \lambda$ then $\Phi(x+z,y+w)-\Phi(x,y) \equiv \Phi_1(x+z,y+w)-\Phi_1(x,y)$ modulo $\mathcal{F} ^{i+1} \lambda$.
\end{enumerate}
\item\label{prop:m.p:2}  Assume that $\Phi,\Psi \in \widehat{\mathcal{L}}$ have slopes $\geq k$ and that $\Phi_1(X,Y)=X,\Psi_1(X,Y)=Y$. Then the map $(\Phi,\Psi): \lambda \times \lambda \rightarrow \lambda \times \lambda$ is measure preserving homeomorphism.
\end{enumerate}
\end{proposition}

\begin{proof}$ $ \begin{enumerate}
\item Suppose that $P(X,Y)\in \mathcal{L}$ is homogeneous of degree $n$ and has integral coefficients. If $x,y\in \lambda$, Equation \eqref{eq:filtration} implies that $P(x,y)\in \mathcal{F} ^{n-1} \lambda$. Since $\Phi$ has slope $\geq 2k$, we get that $\Phi_n(x,y) \in \mathcal{F} ^{n-1-k\lfloor n/2k \rfloor} \lambda$, proving \eqref{prop:m.p:1a} and \eqref{prop:m.p:1b}.

For $P(X,Y)$ as above, if $x,y\in \lambda$ and $z,w\in \mathcal{F} ^i \lambda$, then $P(x+z,y+w)-P(x,y) \in \mathcal{F} ^{i+n-1} \lambda$. Since $\Phi$ has slope $\geq 2k$, we get that, for $n >1$ ,
\[
\Phi_n(x+z,y+w)-\Phi_n(x,y) \in \mathcal{F} ^{i+n-1-k\lfloor n/2k \rfloor} \lambda \subset \mathcal{F} ^{i+1} \lambda.
\]
proving \eqref{prop:m.p:1b}.
\item By the previous claims, for any $i$, the map $(\Phi,\Psi)$ descends to a map from $(\lambda / \mathcal{F} ^i \lambda) \times (\lambda / \mathcal{F} ^i \lambda)$ to itself. We show by induction on $i$ that this map is injective. This will prove claim \eqref{prop:m.p:2}. The case $i=1$ is clear. For $i>1$, if $(\Phi(x,y),\Psi(x,y))=(\Phi(x',y'),\Psi(x',y'))$, the induction hypothesis implies that $x-x',y-y'\in \mathcal{F} ^{i-1} \lambda$, but then
\[
0=(\Phi(x,y),\Psi(x,y))-(\Phi(x',y'),\Psi(x',y')) \equiv (x-x',y-y') \quad \textrm{ mod $\mathcal{F} ^{i} \lambda$}.
\]
\end{enumerate}
\end{proof}

We can now prove Theorem \ref{thm:conv.alg}
\begin{proof} Let $S$ be a set of primes containing all primes up to $24N+1$ and such that such that Lemmas \ref{lem:exp.log}, \ref{lem:log.group}, and \ref{lem:log.l.powr} hold for $q\in \mathcal{P}_S$. Denote $\lambda=\log(\Lambda)$. For $x,y\in \lambda$, let $x\circ y=\log(\exp(x) \cdot \exp(y))$. The pair $(\lambda,\circ)$ is a group isomorphic to $(\Lambda,\cdot)$. The two operations, $+,\circ$ give two convolutions $*,\circledast$ on $\mathcal{S}(\lambda)$. In order to prove Theorem \ref{thm:conv.alg}, it is enough to show that the identity map $(\mathcal{S}(\lambda)^ \Lambda,*) \rightarrow (\mathcal{S}(\lambda)^ \Lambda,\circledast)$ is an isomorphism.

Let $\Phi(X,Y),\Psi(X,Y)$ be the Lie series from Proposition \ref{prop:Phi.Psi}. By our assumptions and Example \ref{exam:X.Phi}, $X^\Phi$ and $Y^\Psi$ have slopes $\geq 6N$. By Lemma \ref{lem:log.l.powr} and Proposition \ref{prop:m.p}, the map $T: \lambda \times \lambda \rightarrow \lambda \times \lambda$ given by $T(x,y)=(x^{\Phi(x,y)},y^{\Psi(x,y)})$ is a well-defined measure-preserving homeomorphism. For every $z\in \lambda$, the restriction of $T$ to $\left\{ (x,y) \in \lambda^2 \mid x \circ y=z \right\}$ is a bijection with $\left\{ (x,y) \in \lambda^2 \mid x + y=z \right\}$. Hence, for every $f,g\in \mathcal{S}(\lambda)^ \Lambda$ and $z\in \lambda$,

\begin{multline*}
f \circledast g(z)=\int_{\left\{ (x,y) \mid x \circ y =z \right\}}f(x) g(y) = \int_{\left\{ (x,y) \mid x + y =z \right\}}f(x^{\Phi(x,y)}) g(y^{\Psi(x,y)})=\\ = \int_{\left\{ (x,y) \mid x + y =z \right\}}f(x) g(y) = f *g (z).
\end{multline*}

\end{proof}













\subsection{The local case} \label{subsec:local.case}

\subsubsection{Proof of Proposition \ref{prop:Denef.Loeser} when $X$ is affine}

\subsubsection{The implication $\eqref{item:RS} \implies (\ref{item:lim.1.horz.p})$}

For the proof, we will use the Lang--Weil estimates. We start with the following notation.

\begin{notation} Suppose that $X$ is a scheme of finite type over $\Spec \mathbb{Z}$ and that $k$ is a field. We denote the number of irreducible components of $X _{\overline{k}}$ that are defined over $k$ and have dimension $\dim X_k$ by $c_X(k)$. If $q$ is a prime power, we also write $c_X(q)$ instead of $c_X(\mathbb{F}_q)$.
\end{notation}

\begin{theorem}[Lang--Weil (cf. \cite{LW})] Let $X$ be a scheme of finite type over $\Spec \mathbb{Z}$. Let $d=\dim X_\mathbb{Q}$. There is a finite set $S$ of prime numbers and a constant $C$ such that, for any $q\in \mathcal{P}_S$,
\[
\left| \frac{|X(\mathbb{F}_q)|}{q^d}-c_X(q)\right| < C q^{-\frac{1}{2}}.
\]
If, in addition, $X_\mathbb{Q}$ is irreducible and smooth {and $q\in \mathcal{P}_S$}, then $c_X(q)=0 \implies X(\mathbb{F}_q)=\emptyset$.
\end{theorem}

\begin{proof}[Proof of $\eqref{item:RS} \implies (\ref{item:lim.1.horz.p})$ in Theorem \ref{thm:size.X}] Let $X^{(m)}=\Jet_m(X / \Spec \mathbb{Z})$. Since we assume that $X_\mathbb{Q}$ has rational singularities, Mustata's Theorem implies that $X^{(m)}_\mathbb{Q}=\Jet_m(X_\mathbb{Q} / \Spec \mathbb{Q})$ is an absolutely irreducible variety of dimension $m\cdot \dim (X_\mathbb{Q})$. By the Lang--Weil estimates, there is a finite set $S$ of prime numbers such that, for all $q\in \mathcal{P}_{S}$, we have $|X(\mathbb{F}_q[t]/t^m)|=|X^{(m)}(\mathbb{F}_q)|=q^{m\dim X_\mathbb{Q}}(1+o_q(1))$, proving \eqref{item:lim.1.horz.p}.
\end{proof}

\subsubsection{The implication $(\ref{item:lim.1.horz.p}) \implies \eqref{item:RS}$}



\subsubsection{The implication $\eqref{item:RS} \implies \eqref{item:bdd.vert.weak}$ when $X_\mathbb{Q}$ is a complete intersection}

Since $X_\mathbb{Q}$ is a complete intersection, there is a smooth algebraic variety $\overline{Y}$ over $\mathbb{Q}$, a closed embedding $X_\mathbb{Q} \rightarrow \overline{Y}$, and a regular map $\overline{\varphi} : \overline{Y} \rightarrow \mathbb{A} ^{N}_\mathbb{Q}$, which is flat above 0, such that $X_\mathbb{Q}\cong \overline{\varphi} ^{-1} (0)$. Choose a $\mathbb{Z}$-scheme $Y$ of finite type and a regular map $\varphi : Y \rightarrow \mathbb{A}^N_\mathbb{Z}$ such that $Y_\mathbb{Q} = \overline{Y}$ and $\varphi_\mathbb{Q} = \overline{\varphi}$. There is a finite set $S$ of primes such that $Y_{\mathbb{Z}[S ^{-1}]}$ is smooth over $\Spec \mathbb{Z}[S ^{-1}]$, the restriction $\varphi_{\mathbb{Z}[S ^{-1}]}$ is flat above 0, and the isomorphism $X_\mathbb{Q} \cong \overline{\varphi} ^{-1} (0)$ extends to an isomorphism $X_{\mathbb{Z}[S ^{-1}]} \cong \varphi_{\mathbb{Z}[S ^{-1}]}^{-1} (0)$. It is enough to show, for any $p\notin S$, that $h_{\varphi_{\mathbb{Z}[S ^{-1}]}^{-1} (0)}(\mathbb{Z} / p^m)$ is bounded uniformly in $m$.

\begin{lemma} Suppose $Z$ is a smooth $\mathbb{Z}_p$ scheme. For any $m$, denote the map $Z(\mathbb{Z}_p) \rightarrow Z(\mathbb{Z} / p^m)$ by $r_m$. There is a Schwartz measure $\mu$ on $Z(\mathbb{Z}_p)$ such that, for every $m$ and $z_0\in Z(\mathbb{Z} / p ^m)$,
\[
\mu(r_m ^{-1}(z_0))=\frac{1}{|Z(\mathbb{Z} / p^m)|}.
\]
\end{lemma}

Since
\[
\mu \left( \varphi ^{-1} (r_m ^{-1} (0)) \right)  = \mu \left( r_m ^{-1} (\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)) \right)  = \sum_{x \in \varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)} \mu \left( r_m ^{-1} (x) \right)  = \frac{|\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)|}{|Y(\mathbb{Z} / p^m)|}
\]
and since
\[
\mu \left( \varphi ^{-1} (r_m ^{-1} (0)) \right)=\varphi_* \mu \left( r_m ^{-1} (0) \right) < C \lambda (r_m ^{-1} (0))=\frac{C}{p^{mN}}
\]
we get that
\[
|\varphi_{\mathbb{Z} / p^m} ^{-1} (0)(\mathbb{Z} / p^m)| < C \frac{|Y(\mathbb{Z} / p^m)|}{p^{mN}}
\]
\subsubsection{The implication $\left(\eqref{item:bdd.vert.weak} \textrm{ and } \eqref{item:lim.1.horz} \right)\implies \eqref{item:rate}$}

\subsection{The general case} \label{subsec:general.case}
For the deduction of the general case of theorem ??\ and proposition ?? we will need the following simple lemma

\begin{proof}[Proof of proposition ??]
We have alredy astablished the equvivalence (3) $\iff$ (2) $\iff$ (1) $\iff$ (4), so it left to setablish (4) $\implies$ (3), which we know in the case when $X$ is local complete interrsection.
%\begin{itemize}
%\item[(3)\implies(4):]






% there exists a finite set of primes $S$ s.t. we can lift the  cover $X_{\mathbb Q}= \bigcup X'_i$
% to a cover  $X_{S^{-1}\Z}= \bigcup X_i$ with $X_i$. complite intersections.
%\end{itemize}
\end{proof}

******************************************************************************************

\subsection{$\eqref{item:RS} \iff \eqref{item:lim.1.horz}$}



\subsection{$\eqref{item:RS} \implies \eqref{item:rate}$}


We now prove $\eqref{item:RS} \implies \eqref{item:rate}$
{
\begin{proof}[Proof of $\eqref{item:RS} \implies \eqref{item:rate}$] We can assume that $X$ is a complete intersection in $\mathbb{A} ^n$ \nir{do the reduction}, i.e., that there are polynomials $f_1,\ldots,f_c\in \mathbb{Z}[x_1,\ldots,x_n]$, where $c=n-\dim X_\mathbb{Q}$, such that $X$ is the common zero locus of the $f_i$. For every $q$ and $m$ we have

\[
h_X(\mathbb{F}_q[t]/t^m)=q^{mc}\int_{\mathbb{F}_q[[t]]^n} F(x),
\]
where $F$ is the function
\[
F(x)= \begin{cases} 1 & f_0(x)\equiv \cdots \equiv f_c(x) \equiv 0\textrm{ (mod $t^m$)} \\ 0 & \textrm{else} \end{cases}.
\]


Since $F$ is quantifier-free, Theorem \ref{thm:integration.q.f.} implies that there are:
\begin{enumerate}
\item A constant $M$.
\item A finite set $S$ of prime numbers.
\item (Finite or infinite) arithmetic progressions $I_1,\ldots,I_M \subset \mathbb{Z}_{\geq 0}$.
\item Polynomials $g_1,\ldots,g_M\in \mathbb{Q}[x,y]$ such that each $g_i(x,y)$ is positive on $I_i \times \mathbb{R}_{>1}$.
\item Reduced affine schemes $X_1,\ldots,X_M$ \nir{change to V in the following} of finite type over $\mathbb{Z}$ which are smooth over $\Spec \mathbb{Z}[S ^{-1}]$ such that $X_i \times_{\Spec \mathbb{Z}}\Spec \mathbb{Q}$ are non-empty and irreducible.
\item Rational numbers $\alpha_1,\ldots,\alpha_M,\beta_1,\ldots,\beta_M$.
\item Integers $a_{j,k}$ for $j=1,\ldots,M$ and $k=1,\ldots,M_j$.
\end{enumerate}
such that, for any $q\in \mathcal{P}_{S}$ and any $m \geq 0$,
\begin{equation} \label{eq:zeta.motivic}
h_X(\mathbb{F}_q[t]/t^m)=\sum_{j=1}^M 1_{I_j}(m) |X_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)}.
\end{equation}

We will apply \eqref{eq:zeta.motivic} only for $m$ large enough. Hence, we can also assume that all $I_j$ are infinite. In addition, we can (and will) assume that $|X(\mathbb{F}_q[t]/t^m)|=|X(\mathbb{Z}_q / \nir{\mathfrak{m}_q}^m)|$ for all $q\in \mathcal{P}_S$ and $m\in \mathbb{N}$ (by Proposition \ref{prop:Loeser}).

Since $\eqref{} \implies \eqref{}$, we have
\[
\limsup_{m \rightarrow \infty} h_X(\mathbb{F}_q[t]/t^m)=\limsup_{m \rightarrow \infty}h_X(\mathbb{Z}_q/ \nir{\mathfrak{m}_q} ^m)< \infty,
\]
for $q\in \mathcal{P}_S$. Since each summand in the right hand side of \eqref{eq:zeta.motivic} is non-negative, we get that, for each $j$ and $q\in \mathcal{P}_{S}$,
\begin{equation} \label{eq.lim.m}
\limsup_{m \rightarrow \infty} 1_{I_j}(m) |X_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)} < \infty.
\end{equation}

For each $j$, Lemma \ref{lem:Pmq} implies that either $\alpha_j<0$ or $\alpha_j=0$ and $g_j$ is independent of $m$. Let $J_1=\left\{ j \mid \alpha_j <0 \right\}$. If $j\notin J_1$, we will write $g_j(q)$ instead of $g_j(m,q)$.

Since $\eqref{} \implies \eqref{}$, for each $m$, there is a finite set $T_m$ of prime numbers (which we can assume to include $S$) such that
\[
\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty}h_X(\mathbb{F}_q[t]/t^m)=1.
\]
Since each summand in the right hand side of \eqref{eq:zeta.motivic} is non-negative, we get that, for each $j\notin J_1$ and $m$,
\begin{equation} \label{eq.lim.q}
\limsup_{\mathcal{P}_{S \cup T_m} \ni q \rightarrow \infty} 1_{I_j}(m) |X_j(\mathbb{F}_q)| \frac{g_j(q) q^{\beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)} < \infty.
\end{equation}
By Lemma \ref{lem:Pq}, we get that $\dim X_j+\deg g_j +\beta_j \leq 0$. Let $J_2=\left\{ j \mid \dim X_j+\deg g_j +\beta_j < 0 \right\}$.

By Lemma \ref{lem:Pmq}, there is a number $D$ such that, for $m>D$, we have
\begin{multline} \label{eq:lim.1}
1=\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty} h_X(\mathbb{F}_q[t]/t^m) =\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty}\sum_{j\notin J_1 \cup J_2} 1_{I_j}(m)\frac{|X_j(\mathbb{F}_q)|g_j(q)q^{\beta_j}}{\prod (1-q^{-a_{jk}})}=\\= \lim_{\mathcal{P}_{S \cup T_m} \ni q \rightarrow \infty} \sum_{j \notin J_1 \cup J_2} 1_{I_j}(m)g_j^{top}c_{X_j}(q)
\end{multline}
By Proposition \ref{prop:Che}, for almost all prime numbers $p$, we have $\lim_{r \rightarrow \infty} c_{X_j}(p^{r!})=c_{X_j}(\overline{\mathbb{Q}})$,  for every $j$. Fix such a prime $p$ such that $p\notin T_m$. Taking the limit in \eqref{eq:lim.1} over $q=p^{r!}$ ($r \rightarrow \infty$), we get that
\[
\sum_{j\notin J_1 \cup J_2} 1_{I_j}(m)g_j^{top}c_{X_j}(\overline{\mathbb{Q}})=1,
\]
 for every $m>D$. We claim that $c_{X_j}(\overline{\mathbb{Q}})=1$ for every $j$. Assuming the contrary, let $j$ be such that that $c_{X_j}(\overline{\mathbb{Q}})>1$. Let $m$ be such that $m>D$ and $m\in I_j$. By Proposition \ref{prop:Che}, there are infinitely many prime numbers $q\in \mathcal{P}_{T_m}$ such that $c_{X_j}(q)<c_{X_j}(\overline{\mathbb{Q}})$. Taking the limit in \eqref{eq:lim.1} over such $q$, we get a contradiction. This shows that $c_{X_j}(\overline{\mathbb{Q}})=1$. It follows that, after enlarging $S$, we can assume that $(X_j)_{\mathbb{F}_q}$ are absolutely irreducible, for every $j$. This implies that the limit
\[
\lim_{\mathcal{P}_{S} \ni q \rightarrow \infty} \frac{|X_j(\mathbb{F}_q)|g_j(q)q^{\beta_j}}{\prod (1-q^{-a_{jk}})}
\]
exists and is equal to $g_j^{top}$. Therefore, by Lemmas \ref{lem:Pmq} and \ref{lem:Pq},
\[
\lim_{\stackrel{\mathcal{P}_S \ni q \rightarrow \infty}{ m \rightarrow \infty }} \zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n) = \lim_{\stackrel{\mathcal{P}_S \ni q \rightarrow \infty}{ m \rightarrow \infty }} \sum_{j \notin J_1\cup J_2} 1_{I_j}(m)\frac{|X_j(\mathbb{F}_q)|g_j(q)q^{\beta_j}}{\prod (1-q^{-a_{jk}})}=\lim_{m \rightarrow \infty} \sum_{j \notin J_1 \cup J_2} 1_{I_j}(m) g_j^{top}=1 .
\]
Finally, by Theorem \ref{thm:pos.zero.local.zeta}, we can enlarge $S$ further so that $\zeta_{G(\mathbb{Z}_q)}(2n)=\zeta_{G(\mathbb{F}_q[[t]])}(2n)$ for all $q\in \mathcal{P}_S$. We get
\[
\lim_{\mathcal{P}_S \ni q \rightarrow \infty} \zeta_{G(\mathbb{Z}_q)}(2n)=\lim_{\mathcal{P}_S \ni q\rightarrow \infty} \zeta_{G(\mathbb{F}_q[[t]])}(2n)=\lim_{\mathcal{P}_S \ni q\rightarrow \infty} \lim_{m \rightarrow \infty} \zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)=1.
\]
\end{proof}
}















============================================================================================================================



\section{Uniform bounds on local zeta functions}\label{sec:zeta.bound}

\subsection{The main estimate}
Recall that $G$ is a group scheme over $\mathbb{Z}$ whose generic fiber is simple, connected, and simply connected. The main result of this section is the following:

\begin{theorem} \label{thm:zeta.minus.1} For every $n\geq 1$ such that $\Def_{G,n+1}$ has rational singularities, there is a finite set $S$ of prime numbers and an integer $C$ such that, for any $q\in \mathcal{P}_S$,
\[
\zeta_{G(\mathbb{Z}_q)}(2n)-1=\zeta_{G(\mathbb{F}_q[[t]])}(2n)-1 \leq C q^{-1}.
\]
\end{theorem}

We sketch the proof of the theorem. In Section \ref{ssec:finite.to.1} we use Mustata's theorem and the Lang--Weil estimates to show that, for every $m$, the sequence $\zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)$ tends to 1 as $q$ tends to infinity (Theorem \ref{thm:finite.to.1}). In Section \ref{ssec:two.param.limit}, we use the fact that the numbers $\zeta_{G(\mathbb{F}_q[[t]]/t^k)}(2n)$ are all uniformly described by a single definable integral (with parameters) {and Theorem \ref{thm:AA.equivalence}} in order to show that $\zeta_{G(\mathbb{F}_q[[t]])}(2n)$ tends to 1 as $q$ tends to infinity (Theorem \ref{thm:two.param.limit}). This implies that $\zeta_{G(\mathbb{Z}_q)}(2n)$ tends to 1 as $q$ tends to infinity. Finally, in Section \ref{ssec:pf.zeta.minus.1}, we use the fact that $\zeta_{G(\mathbb{Z}_q)}(2n)-1$ are all approximated by a single definable integral in order to prove Theorem \ref{thm:zeta.minus.1}.

In the rest of the section, fix $n$ such that $\Def_{G,n+1}$ has rational singularities.

\subsection{$\zeta_{G(\mathbb{F}_q[t]/t^m)}(2n)$ tends to 1} \label{ssec:finite.to.1}
{In this subsection, we prove}

\begin{theorem} \label{thm:finite.to.1} For every $m \geq 1$, there is a finite set $S$ of prime numbers such that,
\[
\lim_{\mathcal{P}_S \ni q  \rightarrow \infty} \zeta_{G(\mathbb{F}_q[t]/t^m)}(2n)=1.
\]
\end{theorem}

{For the proof, we will use the Lang--Weil estimates (see \cite{LW}). We start with the following notation}

\begin{notation} Suppose that $X$ is a scheme of finite type over $\Spec \mathbb{Z}$ and that $k$ is a field. We denote the number of irreducible components of $X \times_{\Spec \mathbb{Z}} \Spec \overline{k}$ that are defined over $k$ by $c_X(k)$. If $q$ is a prime power, we also write $c_X(q)$ instead of $c_X(\mathbb{F}_q)$.
\end{notation}

\begin{theorem}[Lang--Weil] Let $X$ be a scheme of finite type over $\Spec \mathbb{Z}$. Let $d=\dim (X \times_{\Spec \mathbb{Z}} \Spec \mathbb{Q})$. There is a finite set $S$ of prime numbers such that
\[
\lim_{\mathcal{P}_S \ni q \rightarrow \infty} \left| \frac{|X(\mathbb{F}_q)|}{q^d}-c_X(q)\right| =0.
\]
If, in addition, $X \times_{\Spec \mathbb{Z}} \Spec \mathbb{Q}$ is irreducible and smooth {and $q\in \mathcal{P}_S$}, then $c_X(q)=0 \implies X(\mathbb{F}_q)=\emptyset$.
\end{theorem}

\begin{proof}[Proof of Theorem \ref{thm:finite.to.1}] {Let
\[
X=\Def_{G,n+1}=\left\{ (g_1,h_1,\ldots,g_{n+1},h_{n+1})\in G^{2n+2} \mid [g_1,h_1]\cdots[g_{n+1},h_{n+1}]=1 \right\},
\]}
and let $X_m=\Jet_m(X / \Spec \mathbb{Z})$. Mustata's Theorem implies that $X_m \times \Spec \mathbb{Q}=\Jet_m(X \times \Spec \mathbb{Q} / \Spec \mathbb{Q})$ is an absolutely irreducible variety of dimension $m\cdot \dim (X \times \Spec \mathbb{Q})=m \cdot (2n-1)\cdot \dim\, G$. By the Lang--Weil estimates, there is a finite set $S$ of prime numbers such that, for all $q\in \mathcal{P}_S$, we have $|X_m(\mathbb{F}_q)|=q^{m(2n-1)\dim\, G}(1+o_q(1))$.

Since $X_m \times \Spec \mathbb{F}_q=\Jet_m(X \times \Spec \mathbb{F}_q / \Spec \mathbb{F}_q)$, we have
\[
X_m(\mathbb{F}_q)=\left\{ (g_1,\ldots,h_{n+1})\in G(\mathbb{F}_q[t]/t^m)^{2n+2} \mid [g_1,h_1]\cdots[g_{n+1},h_{n+1}]=1 \right\}.
\]
By Theorem \ref{thm:Frobenius} applied with $\Gamma=G(\mathbb{F}_q[t]/t^m)$ and $g=1$, we have
\[
\zeta_{G(\mathbb{F}_q[t]/t^m)}(2n)=\frac{|X_m(\mathbb{F}_q)|}{|G(\mathbb{F}_q[t]/t^m)|^{2n-1}}.
\]
For $q\in \mathcal{P}_S$, we have
\[
\zeta_{G(\mathbb{F}_q[t]/t^m)}(2n)=\frac{|X_m(\mathbb{F}_q)|}{|G(\mathbb{F}_q[t]/t^m)|^{2n-1}}=\frac{q^{m(2n-1)\dim\,G}(1+O(q^{-1/2}))}{\left( q^{m\dim\,G}(1+O(q^{-1/2})) \right) ^{2n-1}}\longrightarrow 1.
\]

\end{proof}

\subsection{$\zeta_{G(\mathbb{Z}_q)}(2n)$ tends to 1} \label{ssec:two.param.limit}

Next, we prove a weak version of Theorem \ref{thm:zeta.minus.1}
\begin{theorem} \label{thm:two.param.limit} There is a finite set $S$ of prime numbers such that, for every $n$ for which $\Def_{G,n+1}$ has rational singularities, we have
\begin{equation} \label{eq:limit.zeta.one}
\lim_{\mathcal{P}_S \ni q  \rightarrow \infty} \zeta_{G(\mathbb{Z}_q)}(2n)=\lim_{\mathcal{P}_S \ni q  \rightarrow \infty} \zeta_{G(\mathbb{F}_q[[t]])}(2n)=1 .
\end{equation}
\end{theorem}

%\subsubsection{Irreducible components modulo $p$}
%
%\begin{proposition} \label{prop:Che} Suppose that $X$ is a scheme of finite type over $\Spec \mathbb{Z}$. Assume that $X_{\mathbb{Q}}:=X \times \Spec \mathbb{Q}$ is irreducible. Then \begin{enumerate}
%\item For almost all prime numbers $p$, we have $c_X(\overline{\mathbb{F}_p})=c_X(\overline{\mathbb{Q}})$.
%\item If $c_X(\overline{\mathbb{Q}})>1$, then there are infinitely many prime numbers $p$ such that $c_X(p)<c_X(\overline{\mathbb{Q}})$.
%\end{enumerate}
%\end{proposition}
%
%
%\begin{definition} Let $S$ be an irreducible scheme with generic point $\eta$, let $s$ be a closed point of $S$, and let $ \varphi :X \rightarrow S$ be a morphism of finite type. Define a relation $\mathfrak{R}_{S,s}$ between the set of irreducible components of $X_\eta :=\varphi ^{-1} (\eta)$ and the set of irreducible components of $X_s:=\varphi ^{-1} (s)$ by $(Y_1,Y_2)\in \mathfrak{R}_{S,s}$ if $Y_2 \subset \overline{Y_1}$.
%\end{definition}
%
%\begin{theorem} \label{thm:EGA.9.7.8} (cf. \cite[Proposition 9.7.8]{EGA4}) Let $S$ be an irreducible scheme with generic point $\eta$ and let $ \varphi :X \rightarrow S$ be a morphism of finite type. Assume that all irreducible components of $X_\eta$ are absolutely irreducible. There is an open set $U \subset S$ such that, for any closed point $s\in U$, \begin{enumerate}
%\item All irreducible components of $X_s$ are absolutely irreducible.
%\item The relation $\mathfrak{R}_{\eta,s}$ is the graph of a bijection.
%\end{enumerate}
%\end{theorem}
%
%Let $X \rightarrow \Spec \mathbb{Z}$ be a scheme of finite type. Let $L/ \mathbb{Q}$ be a Galois extension such that all irreducible components of $X \times \Spec L$ are absolutely irreducible, and let $O$ be the ring of integers of $L$. The group $\Gal(L/ \mathbb{Q})$ acts on the set of irreducible components of $X \times \Spec L$. For any prime ideal $\mathfrak{p}$ of $O$ with residue field $k_\mathfrak{p}$, consider the decomposition group $D_\mathfrak{p}=\left\{ \sigma \in \Gal(L/ \mathbb{Q}) \mid \sigma(\mathfrak{p})=\mathfrak{p} \right\}$, and the homomorphism $\Phi_\mathfrak{p} :D_\mathfrak{p} \rightarrow \Gal(k_\mathfrak{p} / \mathbb{F}_p)$. The group $\Gal(k_\mathfrak{p}/ \mathbb{F}_p)$ acts on the set of irreducible components of $X_{k_\mathfrak{p}}$. The following is obvious
%
%\begin{proposition} \label{prop:inv.rel} Under the assumptions above, for any $(Y_1,Y_2)\in \mathfrak{R}_{\Spec O,\mathfrak{p}}$ and $\sigma \in D_\mathfrak{p}$, we have $(\sigma \cdot Y_1, \Phi_\mathfrak{p}(\sigma) \cdot Y_2)\in \mathfrak{R}_{\Spec O, \mathfrak{p}}$.
%\end{proposition}
%
%Proposition \ref{prop:inv.rel}, Theorem \ref{thm:EGA.9.7.8}, and Chebotarev's density theorem imply Proposition \ref{prop:Che}


\subsubsection{Proof of Theorem \ref{thm:two.param.limit}}

\begin{lemma} \label{lem:Pmq} Let $X$ be a scheme of finite type over $\Spec \mathbb{Z}$ whose generic fiber is non-empty, let $g(x,y)$ be a real polynomial, let $\alpha,\beta\in \mathbb{R}$, let $a_1,\ldots,a_n$ be negative integers, and let $S$ be a finite set of prime numbers. Set $$P(m,q)=|X(\mathbb{F}_q)| \cdot \frac{g(m,q) q^{\alpha m+\beta}}{\prod_1^n \left( 1-q^{a_k} \right) }.$$  Then the following claims hold: \begin{enumerate}
\item Assume that either \begin{enumerate}
\item $\alpha >0$ or
\item $\alpha=0$ and $g$ depends on $m$ non-trivially (i.e. $\frac{\partial g}{\partial m} \neq 0$).
\end{enumerate}
Then $\lim_{m \rightarrow \infty} P(m,q)=\pm \infty$ for infinitely many $q\in \mathcal{P}_{S}$.
\item If $\alpha<0$ then there is $D$ such that $\lim_{q \rightarrow \infty}P(m,q)=0$ uniformly for $m>D$.
\end{enumerate}
\end{lemma}

\begin{proof} $ $
\begin{enumerate}
\item The limit $\lim_{m \rightarrow \infty} P(m,q)$ will be infinity if $X(\mathbb{F}_q)\neq \emptyset$, and, {by Lang--Weil,} this happens for infinitely many $q\in \mathcal{P}_S$.
\item Suppose that the degree of $g$ is $d$. Then there is a constant $M$ such that $|g(m,q)| \leq Mm^dq^d$. In addition, there is a constant $e$ such that $|X(\mathbb{F}_q)|<eq^{\dim\, X}$ for all $q\in \mathcal{P}_S$. Hence, there is a constant $C$ such that
\[
|P(m,q)| \leq Cm^dq^{\alpha m+\beta+d+\dim X}.
\]
This implies the assertion.
\end{enumerate}
\end{proof}

\begin{notation} For a polynomial $g(x)$, let $g^{top}$ be the coefficient of the monomial of highest degree in $g$.
\end{notation}

\begin{lemma} \label{lem:Pq} Let $X$ be a scheme of finite type over $\Spec \mathbb{Z}$, whose generic fiber is non-empty and irreducible, let $g(x)$ be a real polynomial, let $\beta\in \mathbb{R}$, let $a_1,\ldots,a_m$ be negative integers, and let $S$ be a finite set of prime numbers. Set $$P(q)=\frac{|X(\mathbb{F}_q)| g(q) q^ \beta}{\prod \left( 1-q^{a_k} \right) }.$$ Let $d=\dim X + \deg g +\beta$. Then
\begin{enumerate}
\item If $d>0$ then $\limsup_{\mathcal{P}_S \ni q \rightarrow \infty} P(q)=\infty$.
\item If $d<0$ then $P(q)q^d$ is bounded for $q\in \mathcal{P}_S$. In particular, $\lim_{q \rightarrow \infty} P(q)=0$.
\item If $d=0$, then $\lim_{\mathcal{P}_S \ni q\rightarrow \infty} \left( P(q)-g^{top}c_X(q)\right)=0$.
\end{enumerate}
\end{lemma}

\begin{proof} These are immediate consequences of the Lang--Weil estimates.
\end{proof}

We now prove Theorem \ref{thm:two.param.limit}.
{
\begin{proof}[Proof of Theorem \ref{thm:two.param.limit}] By Theorem \ref{thm:Frobenius}, we have
%\[
%\zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)=\frac{\left | \left\{ (g_1,h_1,\ldots,g_n,h_n)\in G(\mathbb{F}_q[[t]]/t^m)^{2n} \mid [g_1,h_1]\cdots[g_n,h_n] =1\right\} \right |}{|G(\mathbb{F}_q[[t]]/t^m)|^{2n-1}}=
%\]
%\[
%=\left( \frac{1}{q^{m \cdot \dim\ G}\prod \left(1-q^{-e_i} \right)} \right)^{2n-1} \cdot \int_{G(\mathbb{F}_q[[t]])^{2n}} F(g_1,h_1,\ldots,g_n,h_n,m) d g_1 \cdots d h_n,
%\]
%where $e_i$ are the exponents of $G$ \nir{explain}, and $F$ is the function
%\[
%F(g_1,\ldots,h_n,m)= \begin{cases} 1 & [g_1,h_1]\cdots[g_n,h_n]\equiv 1\textrm{ (mod $t^m$)} \\ 0 & \textrm{else} \end{cases}.
%\]

\[
\zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)=\frac{\left | \left\{ (g_1,h_1,\ldots,g_n,h_n)\in G(\mathbb{F}_q[[t]]/t^m)^{2n} \mid [g_1,h_1]\cdots[g_n,h_n] =1\right\} \right |}{|G(\mathbb{F}_q[[t]]/t^m)|^{2n-1}}=
\]
\[
=\frac{q^{m(2n-1)\dim\, G}}{ |G(\mathbb{F}_q[[t]]/t^m) | ^{2n-1} }\cdot q^{-m(2n-1)\dim\, G}\int_{G(\mathbb{F}_q[[t]])^{2n}} F(g_1,h_1,\ldots,g_n,h_n,m) d g_1 \cdots d h_n,
\]
where $F$ is the function
\[
F(g_1,\ldots,h_n,m)= \begin{cases} 1 & [g_1,h_1]\cdots[g_n,h_n]\equiv 1\textrm{ (mod $t^m$)} \\ 0 & \textrm{else} \end{cases}.
\]

Let $S_0$ be the (finite) set of primes $p$ for which the map $G \rightarrow \Spec \mathbb{Z}$ is not smooth over $p$. For $q\in \mathcal{P}_{S_0}$, the numbers $\frac{q^{m(2n-1)\dim\, G}}{ |G(\mathbb{F}_q[[t]]/t^m) | ^{2n-1} }$ do not depend on $m$ and tend to 1 as $q$ tends to infinity.

Let
\[
\mathcal{I}_{m,q}=q^{-m(2n-1)\dim\, G}\int_{G(\mathbb{F}_q[[t]])^{2n}} F(g_1,h_1,\ldots,g_n,h_n,m) d g_1 \cdots d h_n.
\]

Since $F$ is quantifier-free, Theorem \ref{thm:integration.q.f.} implies that there are:
\begin{enumerate}
\item A constant $M$.
\item A finite set $S$ of prime numbers.
\item (Finite or infinite) arithmetic progressions $I_1,\ldots,I_M \subset \mathbb{Z}_{\geq 0}$.
\item Polynomials $g_1,\ldots,g_M\in \mathbb{Q}[x,y]$ such that each $g_i(x,y)$ is positive on $I_i \times \mathbb{R}_{>1}$.
\item Reduced affine schemes $X_1,\ldots,X_M$ of finite type over $\mathbb{Z}$ which are smooth over $\Spec \mathbb{Z}[S ^{-1}]$ such that $X_i \times_{\Spec \mathbb{Z}}\Spec \mathbb{Q}$ are non-empty and irreducible.
\item Rational numbers $\alpha_1,\ldots,\alpha_M,\beta_1,\ldots,\beta_M$.
\item Integers $a_{j,k}$ for $j=1,\ldots,M$ and $k=1,\ldots,M_j$.
\end{enumerate}
such that, for any $q\in \mathcal{P}_{S}$ and any $m \geq 0$,
\begin{equation} \label{eq:zeta.motivic}
\mathcal{I}_{m,q}=\sum_{j=1}^M 1_{I_j}(m) |X_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)}.
\end{equation}

We will apply \eqref{eq:zeta.motivic} only for $m$ large enough. Hence, we can also assume that all $I_j$ are infinite. In addition, we can (and will) assume that $S$ contains $S_0$ and that $\zeta_{G(\mathbb{F}_q[[t]])}(2n)=\zeta_{G(\mathbb{Z}_q)}(2n)$ for all $q\in \mathcal{P}_S$ (by Theorem \ref{thm:pos.zero.local.zeta}).

By Theorem \ref{thm:AA.equivalence} we have
\[
\lim_{m \rightarrow \infty} \zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)=\zeta_{G(\mathbb{F}_q[[t]])}(2n)< \infty,
\]
and, therefore, $\lim_{m \rightarrow \infty} \mathcal{I}_{m,q} < \infty$ for $q\in \mathcal{P}_S$. Since each summand in the right hand side of \eqref{eq:zeta.motivic} is non-negative, we get that, for each $j$ and $q\in \mathcal{P}_{S}$,
\begin{equation} \label{eq.lim.m}
\limsup_{m \rightarrow \infty} 1_{I_j}(m) |X_j(\mathbb{F}_q)| \frac{g_j(m,q) q^{\alpha_j m+ \beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)} < \infty.
\end{equation}

For each $j$, Lemma \ref{lem:Pmq} implies that either $\alpha_j<0$ or $\alpha_j=0$ and $g_j$ is independent of $m$. Let $J_1=\left\{ j \mid \alpha_j <0 \right\}$. If $j\notin J_1$, we will write $g_j(q)$ instead of $g_j(m,q)$.

Theorem \ref{thm:finite.to.1} implies that, for each $m$, there is a finite set $T_m$ of prime numbers (which we can assume to include $S$) such that
\[
\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty}\mathcal{I}_{m,q}=\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty}\zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)=1.
\]
Since each summand in the right hand side of \eqref{eq:zeta.motivic} is non-negative, we get that, for each $j\notin J_1$ and $m$,
\begin{equation} \label{eq.lim.q}
\limsup_{\mathcal{P}_{S \cup T_m} \ni q \rightarrow \infty} 1_{I_j}(m) |X_j(\mathbb{F}_q)| \frac{g_j(q) q^{\beta_j}}{\prod \left( 1-q^{-a_{jk}} \right)} < \infty.
\end{equation}
By Lemma \ref{lem:Pq}, we get that $\dim X_j+\deg g_j +\beta_j \leq 0$. Let $J_2=\left\{ j \mid \dim X_j+\deg g_j +\beta_j < 0 \right\}$.

By Lemma \ref{lem:Pmq}, there is a number $D$ such that, for $m>D$, we have
\begin{multline} \label{eq:lim.1}
1=\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty} \mathcal{I}_{m,q} =\lim_{\mathcal{P}_{T_m} \ni q \rightarrow \infty}\sum_{j\notin J_1 \cup J_2} 1_{I_j}(m)\frac{|X_j(\mathbb{F}_q)|g_j(q)q^{\beta_j}}{\prod (1-q^{-a_{jk}})}=\\= \lim_{\mathcal{P}_{S \cup T_m} \ni q \rightarrow \infty} \sum_{j \notin J_1 \cup J_2} 1_{I_j}(m)g_j^{top}c_{X_j}(q)
\end{multline}
By Proposition \ref{prop:Che}, for almost all prime numbers $p$, we have $\lim_{r \rightarrow \infty} c_{X_j}(p^{r!})=c_{X_j}(\overline{\mathbb{Q}})$,  for every $j$. Fix such a prime $p$ such that $p\notin T_m$. Taking the limit in \eqref{eq:lim.1} over $q=p^{r!}$ ($r \rightarrow \infty$), we get that
\[
\sum_{j\notin J_1 \cup J_2} 1_{I_j}(m)g_j^{top}c_{X_j}(\overline{\mathbb{Q}})=1,
\]
 for every $m>D$. We claim that $c_{X_j}(\overline{\mathbb{Q}})=1$ for every $j$. Assuming the contrary, let $j$ be such that that $c_{X_j}(\overline{\mathbb{Q}})>1$. Let $m$ be such that $m>D$ and $m\in I_j$. By Proposition \ref{prop:Che}, there are infinitely many prime numbers $q\in \mathcal{P}_{T_m}$ such that $c_{X_j}(q)<c_{X_j}(\overline{\mathbb{Q}})$. Taking the limit in \eqref{eq:lim.1} over such $q$, we get a contradiction. This shows that $c_{X_j}(\overline{\mathbb{Q}})=1$. It follows that, after enlarging $S$, we can assume that $(X_j)_{\mathbb{F}_q}$ are absolutely irreducible, for every $j$. This implies that the limit
\[
\lim_{\mathcal{P}_{S} \ni q \rightarrow \infty} \frac{|X_j(\mathbb{F}_q)|g_j(q)q^{\beta_j}}{\prod (1-q^{-a_{jk}})}
\]
exists and is equal to $g_j^{top}$. Therefore, by Lemmas \ref{lem:Pmq} and \ref{lem:Pq},
\[
\lim_{\stackrel{\mathcal{P}_S \ni q \rightarrow \infty}{ m \rightarrow \infty }} \zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n) = \lim_{\stackrel{\mathcal{P}_S \ni q \rightarrow \infty}{ m \rightarrow \infty }} \sum_{j \notin J_1\cup J_2} 1_{I_j}(m)\frac{|X_j(\mathbb{F}_q)|g_j(q)q^{\beta_j}}{\prod (1-q^{-a_{jk}})}=\lim_{m \rightarrow \infty} \sum_{j \notin J_1 \cup J_2} 1_{I_j}(m) g_j^{top}=1 .
\]
Finally, by Theorem \ref{thm:pos.zero.local.zeta}, we can enlarge $S$ further so that $\zeta_{G(\mathbb{Z}_q)}(2n)=\zeta_{G(\mathbb{F}_q[[t]])}(2n)$ for all $q\in \mathcal{P}_S$. We get
\[
\lim_{\mathcal{P}_S \ni q \rightarrow \infty} \zeta_{G(\mathbb{Z}_q)}(2n)=\lim_{\mathcal{P}_S \ni q\rightarrow \infty} \zeta_{G(\mathbb{F}_q[[t]])}(2n)=\lim_{\mathcal{P}_S \ni q\rightarrow \infty} \lim_{m \rightarrow \infty} \zeta_{G(\mathbb{F}_q[[t]]/t^m)}(2n)=1.
\]
\end{proof}
}
\subsection{Proof of Theorem \ref{thm:zeta.minus.1}} \label{ssec:pf.zeta.minus.1}

We are now ready to prove Theorem \ref{thm:zeta.minus.1}

\begin{proof}[Proof of Theorem \ref{thm:zeta.minus.1}] We first discuss $\zeta_{G(\mathbb{F}_q)}(2n)-1$. Since we assume that the generic fiber of $G$ is simply connected, there is a finite set $S_1$ of prime numbers such that $G(\mathbb{F}_q)$ is perfect for every $q\in \mathcal{P}_{S_1}$ (see, e.g. \cite[Remark 3.2]{AKOV}). Let $\Phi$ be the absolute root system of $G$. \cite[Theorem 3.1]{AKOV} states, in particular, that there is a constant $C_1$ and, for each $q\in \mathcal{P}_{S_1}$, a negative integer $a_1(q)$ such that
\[
\zeta_{G(\mathbb{F}_q)}(2n)-1 <C_1 q ^{-1}.
\]
Together with Theorem \ref{thm:two.param.limit}, we get that there is a finite set $S_1' \supset S_1$ of primes such that
\begin{equation} \label{eq:zeta.minus.zeta.to.0}
\lim_{\mathcal{P}_{S_1'} \ni q \rightarrow \infty} \left( \zeta_{G(\mathbb{Z}_q)}(2n)-\zeta_{G(\mathbb{F}_q)}(2n)\right)  = 0.
\end{equation}
By Theorems \ref{thm:zeta.minus.one} and \ref{thm:integration.q.f.}, there are \begin{enumerate}
\item Constant $M$.
\item A finite set $S_2$ of prime numbers.
\item Polynomials $g_1,\ldots,g_M\in \mathbb{Q}[x]$ such that each $g_i(y)$ is positive on $\mathbb{R}_{>1}$.
\item Reduced affine schemes $X_1,\ldots,X_M$ of finite type over $\mathbb{Z}$ which are smooth over $\Spec \mathbb{Z}[S ^{-1}]$ such that $X_i \times_{\Spec \mathbb{Z}}\Spec \mathbb{Q}$ are non-empty and irreducible.
\item Rational numbers $\beta_1,\ldots,\beta_M$.
\item Integers $a_{j,k}$ for $j=1,\ldots,M$ and $k=1,\ldots,M_j$.
\end{enumerate}

such that
\[
\zeta_{G(\mathbb{Z}_q)}(2n)-\zeta_{G(\mathbb{F}_q)}(2n)\sim \sum_{j=1}^M |X_j(\mathbb{F}_q)|\frac{g_j(q) q^{\beta_j}}{\prod \left( 1-q^{a_{j,k}} \right)} \quad \textrm{ over $q\in \mathcal{P}_{S_2}$}.
\]
Setting $S=S_1' \cup S_2$, we have that, for each $j$,
\[
\limsup_{\mathcal{P}_S \ni q \rightarrow \infty} |X_j(\mathbb{F}_q)|\frac{g_j(q) q^{\beta_j}}{\prod \left( 1-q^{a_{j,k}} \right)}=0.
\]
By Lemma \ref{lem:Pq}, we get that there is a constant $C_3$ such that
\begin{equation}
|X_j(\mathbb{F}_q)|\frac{g_j(q) q^{\beta_j}}{\prod \left( 1-q^{a_{j,k}} \right)} < \frac{C_3}{q}.
\end{equation}
It follows that there is a constant $C$ such that
\[
\zeta_{G(\mathbb{Z}_q)}(2n)-1=\zeta_{G(\mathbb{Z}_p)}(2n)-\zeta_{G(\mathbb{F}_q)}(2n)+\zeta_{G(\mathbb{F}_q)}(2n)-1 \leq \frac{C}{q}.
\]
\end{proof}

