\section{Introduction and examples}
 
 
 The primary motivation of this article is to study the variance of the excursion volume  for  Gaussian fields, and exhibit a parametric {\it diophantine} model  that realises any presribed asymptotic variance behavior. It turns out that this work is strongly related to the random walk which increment measure is the spectral measure  of the Gaussian field, and which behaviour depends on the diophantine properties of the atoms.
 
  \subsection{Gaussian excursions}
  
  Properties of excursions and level sets of continuous random Gaussian functions have been studied  under many different instances. The zero set of a one-dimensional Gaussian stationary process is the subject of an almost century long line of research, starting with the seminal works of Kac \& Rice \cite{Kac43}, or Cramer \& Leadbetter \cite{CL67}, and followed by many other authors \cite{Cuz,Slud91,KL97}, mainly interested by second order behaviour. In higher dimensions,  zeros of Gaussian entire functions  \cite{BKPV,NS11} and nodal sets of high enery Gaussian harmonics on a compact manifold  \cite{KKW13,Wigman10,MPRW} (and their Euclidean counterpart the Random Wave Model \cite{MRV}) have attracted a lot of attention of both physicists and mathematicians. Let us also mention a recent breakthrough about the Euler-Poincar\'e characteristic of Euclidean Gaussian excursions with the Central Limit Theorem of Estrade \& L\'eon \cite{EL16}. Random trigonometric Gaussian polynomials, i.e. independent Gaussian coefficients multiplied by trigonometric monomials based on a fundamental frequency,  have also been studied in the asymptotics of the large degree, see for instance \cite{WigGra11} and references therein.  We propose here a  crucial perturbation of the spectral measure support: instead of taking   frequencies in a proportionnal relation, we choose finitely many frequencies which are incommensurable; this specificity allows for instance to reach all possible behaviours for the variance asymptotics, even with a finite support.\\

A different approach to our results is through the lens of  hyperuniform   models. In the last decades, physicist have put in evidence amorphous states of matter  intermediate between crystals and liquids, where the medium exhibits apparent disorder at all scales, but  fluctuations are suppressed at large scales. This denotes in some sense an internal compensation of the medium behaviour,  and is considered by physicists a {\it new state of matter}, see the works by S. Torquato and his co-authors   \cite{Tor18,TS03} that introduce the topic and expose the main tools and discoveries. Even though the focus was primarily on atomic measures, i.e. point configurations, this concept has been then generalised to other random measures, in particular  bi-phased random media \cite{Tor16,Tor16b}.  Such heterogeneous materials abound in nature and synthetic
situations. Examples include composite and porous media, metamaterials, biological media (e.g., plant and animal
tissue), foams, polymer blends, suspensions, granular media, cellular solids, colloids. 

The Gaussian world provides models for many types of phenomena, and the present work is an attempt to produce Gaussian hyperuniform random sets. The model we present here shares some similarities with perturbed lattices, in the sense that the long range correlations are very strong, but its disorder state  is also one step above as one cannot write it as the (perturbed) repetition of a given pattern. It shares with quasi-crystals the property of {\it almost periodicity}, defined below, and exhibits a spectrum reminiscent of quasi-crystals, see Fig \ref{fig:1}. Any asymptotic variance can be achieved, yielding in particular hyperuniform models. According to the typology established in  \cite[6.1.2]{Tor18}, the model is  type-I hyperuniform for almost all choice of parameters; but uncountably many choices of the parameters will yield type-II or actually any type of hyperuniformity. We also give randomised versions of the model not involving diophantine parameters which exhibit different types of hyperuniformity.\\


  
  
  The main actors of this article are  real Gaussian random fields $\{X(\t);\t\in \mathbb{R}^{d}\}$, which law is invariant under translations of $\mathbb{R}^{d}$. It is known that such fields are completely characterised by their reduced covariance function
\begin{align*}
C(\t)=\mathbb{E}(X(0)X(\t)),\t\in \mathbb{R}^{d},
\end{align*} 
or by their spectral measure, i.e. the unique finite symmetric measure $\bm{\mu } $ on $\mathbb{R}^{d}$ such that $C$ admits the representation
\begin{align}
\label{eq:def-spectral}
C(\t)=\int_{\mathbb{R}^{d}}e^{i  \t \cdot {\bf x}   }\bm{\mu } (d{\bf x}),\t\in \mathbb{R}^{d},
\end{align}
 where $ \cdot    $ denotes the standard scalar product. See the monograph \cite{AT07} for a comprehensive expositions of main properties and results about Gaussian fields and their geometry.
 
 

Excursions of Gaussian processes on the real line have  often been studied through their number of crossings with the axis \cite{Kac43,CL67,Cuz,Slud91,KL97}. Elementary considerations yield that the average number of crossings on an interval is proportionnal to the length of the interval. Furthermore, if $\mu $ contains more than $1$ (symmetrised) atom, the variance of the number of crossings is quadratic \cite{Lac20}. On $\mathbb{R}^{d}$, we rather focus on the Lebesgue measure of the nodal excursions 
\begin{align*}
\{X>0\}=\{\t\in \mathbb{R}^{d}:X(\t)>0\}.
\end{align*}
Here again, the field centering yields that the expectation is proportionnal to the volume:
\begin{align*}
\mathbb{E}(\Leb[d](A\cap \{X>0\}))=\frac{\Leb[d](A)}{2},A\subset \mathbb{R}^{d}.
\end{align*} We give in Section \ref{sec:exc} general upper and lower bounds for the variance of the excursion volume. The need for models that yield any prescribed variance asymptotics is explained in \cite{ChenTor18}, along with another such procedure based on the Fourier transform.

We consider models  where the spectral measure is finite and observe that the excursion variance can have any prescribed behaviour. 
They fall  within the class of {\it almost periodic fields}, 
and their properties seem to put them between ergodic models, and  crystalline arrangements. 
We show that, depending on the diophantine properties of the atoms, the variance can either be minimal, i.e. of {\it surface-scaling order}  in $T^{d-1}$, or maximal, i.e. of {\it quadratic order} in $T^{2d}$, and achieves any reasonable intermediate behaviour.
For sublinear variances (below $T^{d}$), the excursions are hence hyperuniform, contributing to the already large research body on the subject.



\subsection{Variance asymptotics for diophantine measures}
 We consider   symmetric spectral measures whose support contains incommensurate atoms.
A model that offers  a lot of diversity in $\mathbb  R^{d}$ is parametrized by a $d$-tuple $\bm{\omega }$ where each entry belongs to $\mathbb{R}^{m}$ for some $m\geqslant 1$: $\bm{\omega } =(\omega _{[k],i})_{\substack{\text{$1\leqslant k\leqslant d$}\\\text{$1\leqslant i\leqslant m$}}}\in (\mathbb{R}^{m})^{d}$ and the measure 
\begin{align}
\label{mu:general}
\bm{\mu }=\frac{1}{d(m+1)}\sum_{k=1}^{d}(\bar \delta _{{\bf e}_{k}}+\sum_{i=1}^{m}\bar\delta _{\omega _{[k],i}{\bf e}_{k}}),  \text{\rm{ with }}\bar \delta _{u}=\frac{1}{2}(\delta _{u}+\delta _{-u}),u\in \mathbb{R}^{d},
\end{align}
where $({\bf e}_{k})_{1\leqslant k\leqslant d}$ is some basis of $\mathbb{R}^{d}$.

Denote by $X_{\bm{\omega }}$ a centered stationary Gaussian random field which spectral measure is $\bm{\mu } $.  
The excursion volume variance is denoted by
\begin{align*}
V_{\bm{\omega } }(T):=\text{\rm{\bf Var}}(\Leb(\{X_{\bm{\omega } }>0\}\cap B_{d}(0,T)))
\end{align*}
where $B_{d}(0,T)$ is the centred ball of $\mathbb{R}^{d}$ with radius $T.$


To describe the asymptotic behaviour,   introduce for   $\psi :\mathbb{N}_{*}\to [0,1]$ the set   of $\psi  $-BA (Badly Approximable) numbers, which are the $\omega \in \mathbb{R}^{m}$ such that for $p\in \mathbb{Z} ,q\in \mathbb{Z}^{m} $ with $|q|$ sufficiently large,
\begin{align*}
 | p-\omega\cdot q  | \geqslant  2\psi (|q|),
\end{align*}
where $ | q | $ is the Euclidean norm of $q$, the typical example being $\psi  ( | q | )= | q | ^{-\tau   },\tau >0$.  
On the other hand, a vector $\omega \in \mathbb{R}^{m}$ is $\psi  $-WA$^{(*)}$(Well Approximable) if for some $c_{W}>0$ there are infinitely many couples $p\in \mathbb{Z} ,q\in \mathbb{Z} ^{m}$ such that $(p,q)\equiv 1$  and 
\begin{align*}
 |p-\omega \cdot q  | \leqslant  c _{W}\psi (|q|).
\end{align*}
where here and in all the paper, for $p\geqslant 1$ and ${\bf x}=(x_{i})_{1\leqslant i\leqslant p}\in \mathbb{Z} ^{p}$ we write ${\bf x}\equiv 1$ if $\sum_{i=1}^{p}x_{i}$ is an odd number.
  

  \begin{definition}
 \label{def:regular}
 Say that $\psi $ is {\it regular} (or $\tau $-regular) if it is   of the form $\psi (q)=q^{-\tau }L(q),q\in \mathbb{N}^{*},$ where $\tau >0$   and $L$ does not vanish and is slowly varying in the sense that $ | L(q)-L(q+1) | =o(L(q)q^{-1})$ as $q\to \infty $.
\end{definition}
This property is motivated by Proposition \ref{prop:psi-regular} and yields that $\ln(L(q))/\ln(q)\to 0$ as $q\to \infty $, hence $L$ is dominated by any power of $q$ and $\tau $ is uniquely defined. 
 We  introduce the pseudo-inverse $\psi ^{-1}:(0,1]\mapsto \mathbb{N}$ by \eqref{eq:pseudo-inv}.  We can show that for every  finite $r>0$ there are finite $c_{i}>0$ such that  $c_{1}\psi (q)\leqslant \psi (rq)\leqslant c_{2}\psi (q)$ and $c_{3}\psi ^{-1}(\varepsilon )\leqslant \psi ^{-1}(r\varepsilon )\leqslant c_{4}\psi ^{-1}(\varepsilon )$ on their domains of definition.
Remark that $q\psi (q)$ is strictly non-increasing for sufficiently large $q$ if $\tau>1$. 
 
 
Given two functions $F(T),G(T),T\geqslant 1$, write $F(T)\stackrel{\text{\rm{\bf i.o.}}}{\leqslant }  G(T)$ (infinitely often) if  $F(T_{k})\leqslant G(T_{k})$ for some sequence $T_{k}\to \infty $.
Our most precise and general result concerns the case where frequencies of $\bm{\mu }$ are the same in all $d$ directions, it implies that diophantine Gaussian nodal excursions provide stationary random sets  in $\mathbb{R}^{d}$  with any reasonable asymptotic prescribed variance behaviour.


\begin{theorem} \label{thm:main-intro}
Let $\tau >0,\psi:\mathbb{N}_{*}\to(0,1]$ $\tau $-regular   and $\omega \in \mathbb{R} ^{m}$ that is $\psi $-WA$^{(*)}$ and $\psi $-BA, and  $\bm{\omega }:=(\omega ,\omega ,\dots ,\omega )\in  (\mathbb{R}^{m})^{d}$. Then with $\tau ^{*}=\frac{1+d(m+1)}{1+d}$, as $T\to \infty ,$ 
\begin{align*}
V_{\bm{\omega }}(T)\leqslant& c_{+}T^{d-1}&\text{\rm{ if }}&\psi (q)>q^{-\tau ^{*}}\ln(q)\\
V_{\bm{\omega }}(T)\leqslant &c_{+}T^{d-1}\ln(T)&\text{\rm{ if }}&\psi (q)=q^{-\tau ^{*}}\\
\frac{c_{-}T^{2d}}{\psi ^{-1}(T^{-1})^{1+d(m+1)}}\stackrel{\text{\rm{\bf i.o.}}}{\leqslant } V_{\bm{\omega }}(T)\leqslant &\frac{c_{+}T^{2d}}{\psi ^{-1}(T^{-1})^{1+d(m+1)}}=o(T^{2d})&\text{\rm{ if }}&\tau >\tau ^{*}
\end{align*}
for some $0<c_{-}\leqslant c_{+}<\infty $ depending on $d,m,\psi .$
If $m=1$ and $\tau >1$, there are uncountably many such $\omega \in \mathbb{R}^{1}$.
\end{theorem}



\begin{remark}
 
The presence of the term $T^{d-1}$ on the RHS, proportionnal to the surface measure of the observation window, is natural as  random stationary measures applied to a large window are usually not expected to have  a variance behaviour lower than the boundary measure.  No rigourous general result in this direction is known by the author, Beck \cite{Beck87} gives a formal proof in the case of point processes. See also  \cite{Tor18}, which classifies hyperuniform behaviours in three types: type I have asymptotic variance in $T^{d-1}$, type II in $T^{d-1}\ln(T)$, and type III gathers all other sublinear behaviours. The previous theorem shows that all types can be reached with the current model. Intermediate behaviours between $T^{d-1}$ and $T^{d-1}\ln(T)$ can likely be obtained by the same method.
 
\end{remark}

\begin{remark}
This type of behaviour is really specific of nodal excursions. The volume variance for excursions $\{X>u\}\cap B_{d}(0,T)$ always behave in $T^{2d}$ if $u\neq 0$, see Theorem \ref{thm:general-var}.
\end{remark}


\begin{proof}
To prove this theorem, apply first Theorem  \ref{thm:general-var} to the measure $\bm{\mu } $ to have bounds on the variance in terms of the function ${\bf J}_{3}$ (with $\gamma  $ as the unit ball indicator function, see Example \ref{ex:sphere}). Proposition \ref{prop:psi-regular} yields the upper bound. Then  lower bounds for ${\bf J}_{3}$ are derived in Theorem \ref{thm:dioph-rw}, noticing that $\bm{\omega }$ is $\psi $-BA and $\psi $-SWA$^{(*)}$ thanks to Proposition \ref{prop:bold-omega-SWA}.

 



It is a standard fact in diophantine approximation that  if $m=1$ the set of $\omega $ that are $\psi $-BA and $\psi $-WA is uncountable when $q\psi(q) $ is non-increasing at infinity, see the seminal construction based on continued fractions by Jarn\`ik \cite{Jarnik}.



\end{proof}
 
 
 
Prominent examples are provided by power functions, for which we introduce a special notation: say that $\omega\in \mathbb{R}^{m} $ is $(\tau) $-BA (resp. $(\tau) $-WA$^{(*)}$) if it is $cq^{-\tau }$-BA (resp. $cq^{-\tau }$-WA$^{(*)}$) for some finite $c>0$.
These considerations are further developped and commented in Section \ref{sec:dioph} (see Groshev's theorem and Corollary \ref{cor:groshev}){, let us simply mention that for $\eta >0$, $\Leb[m]$-a.a. $\omega \in \mathbb{R}^{m}$ is $(m+\eta )$-BA and   $(m)$-WA$^{(*)}$.  } For any $\eta \geqslant 0$, there are uncountably many $\omega \in \mathbb{R}^{m}$ that are $(m+\eta )$-BA and $(m+\eta )-$WA$^{(*)}$.  There are also uncountably many {\it Liouville numbers}, i.e. $\omega \in \mathbb{R}$ that are $(\tau )-$WA$^{(*)}$ for any $\tau >0.$

\begin{remark} The random excursion is hyperuniform   if $\omega $ is $(\eta)$-BA with $\eta <\frac{ 1+d}{d}$ (see also Section \ref{sec:structure} for characterisation of hyperuniformity via the structure factor), and strongly hyperuniform if $\eta <1-\frac{ m}{d+1}$. 

\end{remark}


The following corollary is then a consequence of  Theorem \ref{thm:main-intro}.

\begin{corollary}
\label{cor:intro}
For $\omega \in \mathbb{R}^{m}$, let $\bm{\omega }=(\omega ,\dots ,\omega )\in (\mathbb{R}^{m})^{d},\tau ^{*}=\frac{1+d(m+1)}{1+d}$.
\begin{itemize}
\item[(i)] If $d\geqslant m$, for $\tau \in (m,\tau ^{*})$, $\Leb[m]$-a.a. $\omega \in \mathbb{R}^{m}$ is $ (\tau  )$-BA, and the variance of $V_{\bm{\omega }}(T)$ is bounded by $c_{+}T^{d-1}$ for some $c_{+}<\infty $ (strong hyperuniformity).
\item[(ii)] If $d<m$, since for $\Leb[m]$-a.a. $\omega \in \mathbb{R}^{m}$, $\omega $ is $(m)$-WA$^{(*)}$ and $(m+\eta )-$BA for $\eta >0$,  we have $ c_{-} T^{d- \frac{1+d}{m}}\stackrel{\text{\rm{\bf i.o.}}}{\leqslant }  V_{\bm{\omega }}(T)\leqslant c_{+}T^{d-\frac{1+d}{m+\eta }}$ for some $0<c_{-}, c_{+}<\infty $.
\item[(iii)] Let $m=1.$ For $d-1\leqslant \beta <2d,$ the set of  $\omega \in \mathbb{R}$ such that for some $0<c_{-}\leqslant c_{+}<\infty $
\begin{align*}
c_{-}T^{\beta }\stackrel{\text{\rm{\bf i.o.}}}{\leqslant } V_{\bm{\omega }}(T)\leqslant c_{+}T^{\beta },T\geqslant 1
\end{align*}
 is uncountable
( there is  $\tau \geqslant 1$ such that  $\beta =2d-\frac{1+2d}{\tau  }$, and  uncountably many  $\omega $ are $ (\tau  )$-WA$^{(*)}$ and $ (\tau  )$-BA ). 
\item[(iv)] Let $m=1$. For $\omega $ a \emph{ Liouville number}, for every $\varepsilon >0$,  for some $c_{-}>0,$
\begin{align*}
c_{-}T^{2d-\varepsilon }\stackrel{\text{\rm{\bf i.o.}}}{\leqslant } V_{\bm{\omega }}(T).
\end{align*}
\item[(v)] In all cases, $V_{\bm{\omega }}(T)=o(T^{2d})$.
\end{itemize}
\end{corollary}


If  the $\omega _{[k]}$ differ along the directions $1\leqslant k\leqslant d$, 
  a similar application of Theorem \ref{thm:dioph-rw}, Proposition \ref{prop:psi-regular}, and Theorem \ref{thm:general-var} yield that the upper bound corresponds to the worst upper bound among the $\omega _{[k]}$:
 
 \begin{proposition}Let $\psi :\mathbb{N}_{*}\to (0,1]$ regular.
 Assume $\bm{\omega }\in (\mathbb{R}^{d})^{m}$  is such that each $\omega _{[k]}$ is $\psi $-BA, $1\leqslant k\leqslant d$. Then the same upper bounds as in Theorem \ref{thm:main-intro} hold. In particular
 \begin{itemize}
\item [(i)]if $d\geqslant m$, for $\Leb[md]$-a.a. $\bm{\omega }\in (\mathbb{R}^{m})^{d}$, $V_{\bm{\omega }}(T)\leqslant c_{+}T^{d-1}$ for some $c_{+}<\infty .$
\item[(ii)] for every $\bm{\omega }\in (\mathbb{R}^{m})^{d}$, $V_{\bm{\omega }}(T)=o(T^{2d})$
\end{itemize}
\end{proposition}

 





We need a further notion to state the lower bound. Say that $\bm{\omega }=(\omega _{[k]})_{k}$ is $\psi $-SWA (Simultaneously Well Approximable) if for some $c_{W}>0$,  for infinitely many $q^j \in \mathbb{Z} ^{m}  ,j\geqslant 1,$ there exist $p^{j}_{[k]}\in \mathbb{Z},1\leqslant k\leqslant d $ such that 
\begin{align*}
 | p^{j}_{[k]}-\omega _{[k]} \cdot q^j | <c_{W}\psi ( | q^j  | ),1\leqslant k\leqslant d,
\end{align*}
and say that it is $\psi$-SWA$^{(*)}$ if furthermore $
\sum_{k=1}^{d}(p^{j}_{[k]}+\sum_{i=1}^{m} q^{j}_{i})$ is odd. The need to distinguish between $\psi $-SWA and $\psi $-SWA$^{(*)}$ (or $\psi $-WA and $\psi $-WA$^{(*)}$) is discussed in Remark \ref{rk:psi-SWA}. Theorem \ref{thm:dioph-rw}-(iii) and Theorem \ref{thm:general-var} yield:
\begin{theorem}Assume that for some function $ \psi:\mathbb{N}*\to (0,1]$ converging to $0$, $\bm{\omega }$ is  $\psi$-SWA$^{(*)}$.  Then for some $c_{+}<\infty $
\begin{align*} 
 T^{2d}\psi ^{-1}(T^{-1})^{-1-d(m+1)}
\stackrel{\text{\rm{\bf i.o.}}}{\leqslant } c_{+}V_{\bm{\omega }}(T)
\end{align*}
where $\psi ^{-1}$ denotes the pseudo-inverse of $\psi $ (see \eqref{eq:pseudo-inv}).
\end{theorem}
Thanks to Groshev's theorem (see Section \ref{sec:dioph}), for $\eta >0$, $\Leb[md]$-a.a.  $\bm{\omega }\in (\mathbb{R}^{m})^{d}$ is  $ | q | ^{-m/d}$-SWA but  not $ | q | ^{-m/d-\eta }$-SWA.


\subsection{Structure factor, quasicrystals and almost periodicity}
\label{sec:structure}
\renewcommand{\S}{\mathcal  S}

We have observed, for some values of the parameter $\bm{\omega }$, the suppression of the variance at large scales, also called hyperuniformity phenomenon. A more general mathematical indicator of hyperuniformity is  the structure factor, or more generally the behaviour around zero of the Fourier transform of the signal in some sense. Here we adopt the  more general definition of the   structure factor of the random excursion indicator function $\t\mapsto \mathbf{1}_{\{X(\t)>0\}}$: if it exists, it is the  measure   $\S$  satisfying
\begin{align*}
\int_{\mathbb{R}^{d}}\varphi (\t)\text{\rm{Cov}}(\mathbf{1}_{\{X(0)>0,X(\t)>0\}})d\t=\int_{\mathbb{R}^{d}}\hat \varphi ({\bf x})\S (d{\bf x}),
\end{align*}
for $\varphi $ smooth with compact support. 
Integrable hyperuniform models are characterised by $\mathcal  S(d{\bf x})\sim  | {\bf x} | ^{\alpha }d{\bf x}$ near $0$ (for some $\alpha >0$), which integrates in \begin{align*}
\mathcal  S(B_{d}(0,\varepsilon ))\sim \varepsilon ^{\alpha +d},\varepsilon \to 0.
\end{align*}
Folowing \cite{OSST}, we adopt the latter characterization as hyperuniformity with index $\alpha >0$. 
Let us consider a diophantine Gaussian field with spectral measure $\bm{\mu } $, as described in the previous sections. We easily deduce from Lemma \ref{lm:cov-ind} that, with a computation similar to \eqref{eq:var-comput} 
\begin{align*}
\S=&\sum_{n\text{\rm{ odd}}}\frac{{n\choose 2n}}{4^{n}(2n+1)}\bm{\mu } ^{\star (2n+1)}\\
\S(B_{d}(0,\varepsilon ))\leqslant &c{\bf J}_{3}(\varepsilon )\leqslant c'\varepsilon ^{\frac{ 1+d(m+1)}{m+\eta }}\text{\rm{  using   \eqref{eq:Ib0-upper}}}
\end{align*}
where $m\geqslant 1$ is the number of different frequencies and $\eta\geqslant 0 $ is the diophantine approximation parameter of the model (see the previous section), and a similar lower bound holds for infinitely many $\varepsilon \to 0$; hence the model is indeed hyperuniform for $\eta <\frac{ 1+d}{d}$, as found at Corollary \ref{cor:intro}-(i), and strongly hyperuniform (i.e. $\alpha >1$) for $\eta <1-\frac{ m}{d+1}$.
 
We give an approximate representation at figure \ref{fig:1} in a special case. 
\begin{center}
\begin{figure}[h!]
\caption{Structure factor for $\bm{\mu }=\bar \delta _{{\bf e}_{1}}+\bar \delta _{\sqrt{2}{\bf e}_{1}}+\bar \delta _{{\bf e}_{2}}+\bar \delta _{\sqrt{2}{\bf e}_{2}}$}
\label{fig:1}
 \includegraphics[scale=.5]{spectrum2D} 
\end{figure}
\end{center}
This kind of spectrum is reminiscent of Bragg peaks in quasi-crystals, and more generally of almost periodic fields, for which we give a definition here: a field $X:\mathbb{R}^{d}\to \mathbb{R}$ is almost periodic if for any sequence of vectors $\t_{n}\to \infty $, there is a subsequence $\t_{n'}$ such that $\|X-X(\t_{n'}+\cdot )\|_{\infty }\to 0$, see for instance the monograph \cite{CG89}. Covariance functions and random Gaussian fields considered in this paper are $\|\cdot \|_{\infty }$-limits of trigonometric polynomials, and as such they are almost periodic. On the other hand, their excursions, seen as $\{0,1\}-$valued functions, are not almost periodic in this sense, mainly because of the discontinuities at the set boundary. On the other hand, they are likely almost periodic for weaker norms, and could hence be seens as {\it almost periodic sets}, but this question is outside the scope of the current article.


\subsection{A randomised model}
It is easy to build randomised models that exploit the metric properties of diophantine approximation to yield hyperuniform models.


\begin{proposition}
Let $\Omega $ be a real random variable which law is continuous with respect to Lebesgue measure, and let $a^{i}_{k},i\geqslant 0,k\geqslant 1$ be independent and identically distributed standard Gaussian variables. Define
\begin{align*}
X(\t)=\frac{ 1}{2d}\sum_{k=1}^{d}(a^{0}_{k}\cos(t_{[k]})+a^{1}_{k}\sin(t_{[k]})+a^{2}_{k}\cos(\Omega t_{[k]})+a^{3}_{k}\sin(\Omega t_{k})),\t=(t_{[k]})\in \mathbb{R}^{d},
\end{align*}$M_{T}= \Leb(\{X>0\}\cap B_{d}(0,T))$ and $V(T)=\text{\rm{\bf Var}}(M_{T})$. Then for some $c_{+}<\infty $,
\begin{align*}
V{(T)}\leqslant c_{+}T^{d-1}.
\end{align*} 
\end{proposition}

\begin{proof} 
Since the Gaussian field is centered, for any fixed $\omega \in \mathbb{R}$, 
\begin{align*}
\mathbb{E}(M_{T}\;|\;\Omega =\omega )=\Leb(B_{d}(0,T))/2
\end{align*}
is deterministic. We also know that a.a. $\omega \in \mathbb{R}$ is $(2)$-BA, and if we condition by $\Omega =\omega $, $X$ is the Gausian field with reduced covariance $\frac{ 1}{2d}\sum_{k=1}^{d}(\cos(t_{[k]})+\cos(\omega t_{[k]}))$. Hence 
 the conditional variance formula  and Corollary \ref{cor:intro} yield
\begin{align*}
V(T)=&\mathbb{E}(\text{\rm{\bf Var}}(M_{T}\;|\;\Omega ))+\text{\rm{\bf Var}}(\mathbb{E}(M_{T}\;|\;\Omega ))\\
 &\leqslant c_{+} T^{d-1}.
\end{align*}
\end{proof}


The same arguments with $1\leqslant m<d$ yield the following:
\begin{proposition}

Let $(\Omega _{0},\dots ,\Omega _{m})$ a random $(m+1)-$tuple of vectors with continuous law with respect to $\Leb[(m+1)d]$, and  
\begin{align*}
X(\t)=\frac{ 1}{d(m+1)}\sum_{k=1}^{d}\sum_{i=0}^{m}(a_{k}^{2i}\cos(\Omega _{i}t_{k})+a_{k}^{2i+1}\sin(\Omega _{i}t_{k})).
\end{align*}
Then the variance is bounded by $c_{+}T^{d-1}$ if $d>m$.

\end{proposition}

Along similar lines, exploiting Corollary \ref{cor:intro}-(iii) with $m>d$ yields randomised models which variance is in $T^{\beta }$ for $d-1<\beta <2d$.

 
 \subsection{Diophantine random walk on the torus}
\label{sec:intro-walk}

Let $\bm{\mu }$ be a symmetric measure on $\mathbb{R}^{d}$ of the form  \eqref{mu:general}  and $\overline{{\bf U}}_{n}$ the corresponding random walk on the torus
\begin{align*}
\overline{{\bf U}_{n}}= \{\sum_{i=1}^{n}X_{i}\}
\end{align*}
where the $X_{i}$ are independent and identically distributed with law $\bm{\mu }$ and $\{{\bf x} \}=(\{x_{[k]}\})\in [0,1[^{d}$ is the fractional part in $\mathbb{R}^{d}$.   As before, let $\bm{\omega }$ be the tuple of vectors generating the support of $\bm{\mu }$ in \eqref{mu:general}, with incommensurable coordinates.

 It is clear that if  $\bm{\omega }$'s coordinates are well approximable by rationals,  the same goes for the increments of the random walk, hence it is likely to come back closer to $0$ faster. The study of random walks on a group started on finite arithmetic groups with the works of Diaconis, Saloff-Coste, Rosenthal, Porod, (see references in \cite{Su98}) and results for such irrational random walks in the continuous settings were then achieved by Diaconis \cite{Diaconis88}, and finally Su \cite{Su98}, who gave the optimal speed of convergence   of the law of $\overline{\U}_{n}$ in an appropriate distance. Then Prescott and Su  \cite{PreSu} extended the study in higher dimensional tori. 


The novelty of our approach is to consider estimates as $\varepsilon \to 0$ uniformly in $n$; we show in Section \ref{sec:RW} that for a given $\varepsilon $, irrelevant of the number of steps $n$, there is a probablity always smaller than $c_{+}\varepsilon ^{\frac{m}{m+\eta } }$ that the walk on the torus ends up in $B_{d}(0,\varepsilon ) $ after $n$ steps, where $\eta $ is such that $\bm{\omega } $ is $(m+\eta )$-BA and $c_{+}<\infty $ does not depend on $n$ or $\varepsilon $. 

The probability is actually very sensititive to the probability of vanishing coordinates $\overline {\bf U}_{n,[k]}$ of $\overline{{\bf U}}_{n}$, in the sense that it decays slowly in $\varepsilon $ because of the fast recurrence to $0$ on the axes: for $p<d$
\begin{align*}
\mathbb{P}(\overline{\U}_{ n,[1]}=\overline{\U}_{ n,[2]}=\dots =\overline{\U}_{ n,[p]}=0)\sim n^{-p/2}.
\end{align*}
We don't give a formal proof but one can sense this result by noticing that the probability that the elementary random walk on $\mathbb{Z} $ with $\pm 1$ increments has a probability $\sim  n^{-1/2}$ to come back to $0$ in $2n$ steps, and the components are {\it almost} independent up to the parity relation $n\equiv \sum_{k=1}^{d}{\bf U}_{n,[k]}$ (see Lemma \ref{lm:gauss-approx}). Hence only non-vanishing coordinates matter in the speed of decay as $\varepsilon \to 0.$
Denote by $\llbracket d\rrbracket $ the set $\{1,2,\dots ,d\}$. Define for $K\subset \llbracket d\rrbracket ,K\neq \emptyset ,$ the restricted ball $B_{K}(\varepsilon ):=B_{d}(0,\varepsilon )\cap H_{K}$ where \begin{align*}
H_{K}:=\{{\bf y}=(y_{[k]})_{1\leqslant k\leqslant d}\in \mathbb{R}^{d}:y_{[k]}\neq 0,k\in K\text{\rm{ and }}y_{[k]}=0,k\notin K\}.
\end{align*}

 
 Then we have according to Theorem \ref{thm:dioph-rw} for some $c<\infty $, uniformly on $n,\varepsilon ,$
\begin{align*}
\bar p_{n}^{K}(\varepsilon )\leqslant c n^{-\frac{(d- | K |)m }{2}} \varepsilon ^{\frac{|K|m}{m+\eta }}\text{\rm{ where }}\bar p_{n}^{K}(\varepsilon )=\mathbb{P}(\overline{\U}_{n}\in B_{K}(\varepsilon ) ).
\end{align*} 
Regarding the dependance in $\varepsilon ,$ the random walk hence comes back to $0$ faster on subspaces with fewer coordinates equal to $0$ (the dependence as $n$ increases is opposite). The most interesting part of the convegence, i.e. where the magnitude is not dominated by coordinates equal to $0$, seems to happen on the domain $H_{[d]}$ of points with non-vanishing coordinates.  More precise results are derived in   \eqref{eq:pn-upper}, in Section  \ref{sec:RW}, dedicated to irrational random walks; the results are derived in particular in terms of the optimal function $\psi $ such that $\bm{\omega } $ is $\psi $-BA.



Lower bounds are more erratic and difficult to prove, hence we consider the smoothed estimate, for $\beta >2,$
\begin{align}
\label{eq:def-Ibeta} 
{\bf I}_{\beta }(\varepsilon )=&\sum_{n\geqslant n_{\varepsilon }}n^{-\beta /2}\mathbb{P}(0< | \overline{\U}_{n} | <\varepsilon )
\end{align}
where $n_{\varepsilon }\geqslant 1 $ grows sufficiently slowly.
We prove also in   Theorem \ref{thm:dioph-rw} that ${\bf I}_{\beta }(\varepsilon )$ behaves in $\varepsilon ^{\frac{\beta -2+dm}{m+\eta }}$ as $\varepsilon \to 0$, regardless of the number of vanishing coordinates.

\newcommand{{\bf e}}{{\bf e}}

In Section \ref{sec:RW}, similar results (but with different magnitudes in $n$) are actually derived first for the random walk ${\bf U}_{n}=\sum_{i=1}^{n}X_{i}$ itself, and  passed on to $\overline{\U}_{n}$ to yield the aforementionned results. A quantity ${\bf J}_{\beta }(\varepsilon )$ related to ${\bf U}_{n}$ and analogue to ${\bf I}_{\beta }(\varepsilon )$ is estimated and used in Section \ref{sec:exc}  to determine the variance of the excursion of the Gaussian field which spectral measure is $\bm{\mu }$, as discussed previously.
 
  \section{Diophantine approximation}
\label{sec:dioph}
The core of the paper is provided by results from diophantine approximation, we explain here basic principles and results, as well as the more advanced ones we will need. 
 The definitions of $\psi -$BA, $\psi -$WA$^{(*)}$, $\psi -$SWA are given in the introduction.  The quality of the approximation of a tuple $\omega \in \mathbb{R}^{m}$ is measured by the numbers
\begin{align*}
\d_{q}(\omega )=\inf_{p\in \mathbb{Z} } | p-q\cdot \omega  | ,q\in \mathbb{Z} ^{m}.
\end{align*}
The most basic, yet useful result is the Dirichlet principle:
 \begin{proposition}Let $m\geqslant 1$. There is $c_{m}<\infty $ such that for $N\in \mathbb{N}^*,$ one can find $q,q'\in B_{N}:=(\mathbb{Z} \cap [-N,N])^{m}$ distinct such that for $\omega \in \mathbb{R}^{m}$, 
\begin{align*}
\d_{q-q'}(\omega )\leqslant N^{-m}\leqslant c_{m}\|q-q'\|^{-m},
\end{align*}
which yields that $\omega $ is $(m)$-WA and if $\omega $ is $(m+\eta ) $-BA, then necessarily $\eta \geqslant 0.$
\end{proposition}

\begin{proof}Simply remark that if one divides $[0,1]$ in $M :=|B_{N}|-1$ bins of size $M ^{-1}$, out of the $|B_{N}|$ values $ \d_{q }(\omega ),q\in B_{N}$, at least two of them will end up in the same bin, yielding for some $q,q'\in B_{N}$ distinct
\begin{align*}
\d_{q-q'}(\omega ) \leqslant |\d_{q}(\omega )-\d_{q'}(\omega )|\leqslant M^{-1}\leqslant N^{-m}.
\end{align*}
The second inequality comes from $\|q-q'\| \leqslant 2\sqrt{m}N \leqslant \sqrt{m}2^{1-m} M^{1/m}$.
\end{proof}

Another fundamental but more technical result is the Khintchine-Groshev theorem, we do not include the proof here, see the latest improvement by Hussain and Yusupova \cite{HusYus}.

\begin{theorem}[Khintchine-Groshev]Let $\psi :\mathbb  N\to \mathbb{R}_{+}$ tending to $0$ such that 
\begin{align*}
\sum_{q\in \mathbb{Z} ^{m} }\psi ( | q | )^{d}<\infty .
\end{align*}
Then the set of $\bm{\omega }\in (\mathbb{R}^{m})^{d}$ that are $\psi $-SWA is $\Leb[md]-$negligible.  If on the other hand the sum diverges then $\Leb[md]-$a.a. $\bm{\omega } \in (\mathbb{R}^{m})^{d}$ is $\psi $-SWA, in the case $m=d=1$ $\psi $ needs furthermore to be monotonic.
\end{theorem}

The theorem yields that  $\Leb[md]-$a.a. $\bm{\omega }$ has irrationality index $\tau (\bm{\omega })=m/d$, where the irrationality index of some $\bm{\omega } \in (\mathbb{R}^{m})^{d}$ is defined by
\begin{align*}
\tau  (\bm{\omega } ):=\inf\{\tau  :\omega \text{\rm{ is not $\tau   $-SWA}}\}=\sup\{\tau  :\omega \text{\rm{ is $\tau $-SWA}}\}.
\end{align*}  


 

The following result can be retrieved from Dirichlet's principle and Groshev's theorem with $d=1$. The fourth point goes back to \cite{Jarnik}, who built explicit examples based on the continued fraction expansion of a real number.


\begin{corollary}\label{cor:groshev} \begin{enumerate}
\item All $\omega \in \mathbb{R}^{m}$ is $(m)$-WA
\item $\Leb[m]-$a.a. $\omega \in \mathbb{R}^{m}$  is not $(m)$-BA.
\item For $\eta >0$, $\Leb[m]-$a.a. $\omega $ is not $(m+\eta )$-WA and is $(m+\eta )$-BA
\item For $m=1$ and $\psi$ regular, the set of $\omega\in \mathbb{R} $ that are $\psi $-WA and $\psi $-BA has positive Hausdorff dimension and is in particular uncountable.
\end{enumerate}
\end{corollary}  
Thie third point implies that for $\Leb[m]$-a.a. $\omega \in \mathbb{R}^{m}$, $\omega $ is $(m+\eta )-$BA for each $\eta >0.$
The following result yields that the situation is essentially the same if WA is replaced by WA$^{(*)}$. Recall that   for $p\geqslant 1$ and ${\bf x}=(x_{i})_{1\leqslant i\leqslant p}\in \mathbb{Z} ^{p}$, ${\bf x}\equiv 1$ means that $\sum_{i=1}^{p}x_{i}$ is an odd number (otherwise ${\bf x}\equiv 0$).
  





\begin{proposition}
\label{prop:psi-SWA*}
If $\omega $ is $\psi $-WA and not $\psi $-WA$^{(*)}$ for $\psi $ non-increasing, then for some $1\leqslant i\leqslant m,$ $ \omega -{\bf e}_{i}$ is $\psi $-WA$^{(*)}$. 
\end{proposition}

\begin{proof}Since $\omega $ is $\psi $-WA and not $\psi $-WA$^{(*)}$, there are infinitely many $p^j\in \mathbb{Z}  ,q^j\in \mathbb{Z} ^{m} $ such that $(p^{j},q^{j})\equiv 0$ and $|p^j -\omega \cdot q^j  |<c_{W}\psi ( | q^j |  )$. 
Let  $k_j\in \mathbb{N}$ be the largest natural integer   such that $2^{k_j }$ divides $p^j $ and each $q^j _{i},1\leqslant i\leqslant m$, let $\tilde p^j=2^{-k_j }p^j ,\tilde q^j=2^{-k_j }q^j $. We have 
\begin{align*}
 | \tilde p^j-\omega \cdot \tilde q^j  | <2^{-k_j }c_{W}\psi ( | q^j |  )=2^{-k_j }c_{W}\psi (2^{k_j } | \tilde   q^j | )<c_{W}\psi ( | \tilde   q^j | )
\end{align*}
hence either $(\tilde p^{j},\tilde q_{j})\equiv 1$ for infinitely many $j$ and the result is proved, or for infinitely many $j$ , $(\tilde p_{j},\tilde q_{j})\equiv 0$. In the latter case, since $2^{1}$ does not divide each $\tilde q^{j}_{i}$ and $\tilde p^{j}$, but $(\tilde p^{j},\tilde q_{j})\equiv 0$, necessarily for each $j$, $\tilde q_{i}^{j}\equiv 1$ for at least one $i$.  By the drawer principle, for at least one $i$ there is an infinity of $j$ such that $\tilde q^j _{i}$ is odd, denote it by $i*$.   Let then $\omega '=\omega +{\bf e}_{i*}, p'^j=\tilde p^j +\tilde q^j _{i*}$. We have 
\begin{align*}
 | p'^j-\omega '\cdot  \tilde q^j | = |  p'^j -\tilde q^j _{i*}-\omega \cdot \tilde q^j  | = | \tilde p^j -\omega \cdot \tilde q^j |< c_{W}\psi ( | \tilde q^j |  ) .
\end{align*}
Since $(p'^j,\tilde q^{j}) \equiv \tilde q^j _{i*}\equiv 1$ for infinitely many $j$, the result is proved.

 
\end{proof}
The next result is useful for tensorizing variance estimates.
 \begin{proposition}
 \label{prop:bold-omega-SWA}
 If $\omega \in \mathbb{R}^{m}$ is $\psi $-WA$^{(*)}$, $\bm{\omega }=(\omega ,\dots ,\omega )\in (\mathbb{R}^{m})^{d}$ is $\psi $-SWA$^{(*)}$.
\end{proposition}

 \begin{proof}
Since $\omega $ is assumed to be $\psi $-WA$^{(*)}$, there is a sequence $(p^{j},q^{j})_{j}$ such that $ | p^j -\omega \cdot q^j   | <c_{W}\psi ( | q^{j} | )$ and $(p^j ,q^{j} )\equiv 1$. 
Hence with  $q^{j}_{[k]}=q^j ,p^{j}_{[k]}=p^j $, $$ | p^{j}_{[k]}-q^{j}_{[k]}\cdot \omega  | = | p^j -q^j \cdot \omega  |<c_{W}\psi (q^j )$$ but $\sum_{k=1}^{d}(p^{j}_{[k]}+\sum_{i=1}^{m}q^{j}_{[k],i})=d(p^j +\sum_{i}q_{i}^j )$ is odd only if $d$ is odd. If $d$ is even, choose instead $p^{j}_{[1]}=2p^j ,q^{j}_{[1]}=2q^j $, so that $ | p^{j}_{[1]}-q^{j}_{[1]   }\cdot \omega  | <2c_{W}\psi ( | q^j |  )$, and $\sum_{k=1}^{d}(p^{j}_{[k]}+\sum_{}q^{j}_{[k],i})=(2d+1)(p^j +q^j )$ is indeed odd.  This sequence demonstrates taht $\bm{\omega }$ is $\psi $-SWA$^{(*)}$.

\end{proof}

  
  
  \section{Irrational  random walks}
  \label{sec:RW}

Given $\bm{\mu }=\sum_{i=1}^{M}\theta_{i} \bar\delta _{\bm{\omega } i} $ a finite  atomic symmetric probability measure on $\mathbb{R}^{d}$, we are interested in the associated random walk 
\begin{align*}
{\bf U}_{n}:=\sum_{k=1}^{n}X_{k} 
\end{align*}
where the $X_{k}$ are independent and identically distributed with law $\bm{\mu } $, hence centred, and the $\theta _{i}$ are in $[0,\frac{1}{2}]$ and sum to $1$ ($\frac{1}{2}$ could be replaced by any element of $(0,1)$, as long as it is fixed throughout the paper).
The study of ${\bf U}_{n}$ is related to the random walk on the torus
\begin{align*}
\overline{{\bf U}}_{n}={\bf U}_{n}-[{\bf U}_{n}]\in [0,1[^{d},
\end{align*}
which has been intensively studied, the consequences of the current results to the random walk on the torus are discussed at  Section \ref{sec:intro-walk}.  
To avoid degenerate behaviour, we assume that $\bm{\mu }$ is   $\mathbb{Z} $-free, i.e. there is no ${\bf q} \in \mathbb{Z} ^{M}\setminus \{0\}$ such that $\sum_{i=1}^{M}{\bf q}_{i}\bm{\omega }_{i}=0.$ In general we further assume that $\bm{\omega }:=(\bm{\omega }_{i})$ is $\psi $-BA for some   non-vanishing function $\psi $, which automatically implies that $\bm{\mu }$ is $\mathbb{Z} $-free.

\newcommand{{\bf N}}{{\bf N}}




According to the Central Limit Theorem, the law of the renormalised sum $n^{-1/2}{\bf U}_{n}$ weakly converges to a Gaussian measure (see also Lemma \ref{lm:gauss-approx} for  precise estimates), and the law $\overline{\bm{\mu } _{n}}$ of $\overline{{\bf U}}_{n}$ is known to converge to Lebesgue measure on $[0,1[^{d}$ \cite{Su98}. But it seems that if we zoom in further on this convergence, it becomes very irregular.

\renewcommand{{\bf x}}{{\bf x}}

 We estimate the following quantities below:\begin{align*}
p_{n}^{{\bf x} }(\varepsilon )=&\mathbb{P}(0< | {\bf U} _{n}-{\bf x} | \leqslant \varepsilon ),\varepsilon > 0,{\bf x}\in \mathbb{Z}^{d} ,\\
\bar p_{n}(\varepsilon )=&\sum_{{\bf x}\in \mathbb{Z}^{d} }p_{n}^{{\bf x}}(\varepsilon )=\mathbb{P}(0< | \overline{{\bf U}}_{n} | \leqslant \varepsilon ).
\end{align*}
Remark that in general, if the sum $n+\sum_{k=1}^{d}{\bf x}_{[k]}$ is even, $\mathbb{P}({\bf U}_{n}={\bf x} )$ is in $n^{-\frac{M}{2}}$ and hence dominates $p_{n}^{{\bf x}}(\varepsilon )$ for $\varepsilon \to 0$, which is why it is estimated  separately. For odd values, since $\bm{\mu }$ is $\mathbb{Z} $-free, $\mathbb{P}({\bf U}_{n}={\bf x})=0$, hence $p_{n}^{{\bf x}}(\varepsilon )$ is simply $\mathbb{P}(|{\bf U}_{n}-{\bf x}|\leqslant \varepsilon )$.



A fine analysis of the recurrence around $0$ yields that the  rate strongly depends on the number of coordinates equal to $0$, expressed through  $$p_{n}^{K,{\bf x}}(\varepsilon )=\mathbb{P}({\bf U}_{n}-{\bf x}\in B_{K}(0,\varepsilon )),\;\bar p_{n}^{K}(\varepsilon )=\mathbb{P}(\overline{\U}_{n}\in B_{K}( 0,\varepsilon )).$$

We show below for instance that for some $c<\infty ,$ for $K \subset \llbracket d\rrbracket $,  for  $\omega $ that is $(m+\eta )$-BA, $\eta \geqslant 0,$
\begin{align*}
\bar p_{n}^{K}(\varepsilon )\leqslant c  n^{-m\frac{d-|K|}{2}}\varepsilon ^{ \frac{m| K| }{m+\eta }}
\end{align*}
so that it is really the number of vanishing coordinates that determines the recurrence probabilities. 
To avoid this technicality and  obtain lower bounds, we consider the smoothed estimates for $\beta >0,$ with $p_{n}^{\o}=p_{n}^{\llbracket d\rrbracket ,\o}$
\begin{align*}
{\bf J}_{\beta }(\varepsilon  ):=&\sum_{n\geqslant n_{\varepsilon },n\in \mathbb{N},n\text{\rm{ odd}} }n^{-\beta/2 }p_{n}^{\o }(\varepsilon )
\end{align*}analogue to ${\bf I}_{\beta }(\varepsilon )$ defined in the introduction at \eqref{eq:def-Ibeta} ,
where $n_{\varepsilon }$  does not grow too fast as $\varepsilon \to 0$ and serves the purpose to show that  it is the series  tail that actually matters. 
  Considering this statistic also allows to suppress the erratic behaviour in $n$, and we can prove that ${\bf I}_{\beta }(\varepsilon ),{\bf J}_{\beta }(\varepsilon )$ both behave in $\varepsilon ^{ \frac{m}{m+\eta } }$ and find a matching lower bound.
The summation over odd $n$  in ${\bf J}_{\beta }(\varepsilon )$ is adapted to   estimating the volume variance of Gaussian nodal excursions (see Remark \ref{rk:psi-SWA}).  


 Assume there is $m\in \mathbb{N},$ and real numbers $\omega _{[k],i},1\leqslant k\leqslant d,0\leqslant i\leqslant m$ such that $\mu $ is of the form \eqref{mu:general}
and denote by $\omega _{[k]}=(\omega _{[k],0},\dots ,\omega _{[k],m}),\bm{\omega }=(\omega _{[k]})_{1\leqslant k\leqslant d}$. 
  For $\psi :\mathbb{N}^{*}\to [0,1]$ that converges to $0$ let $\psi ^{-1}$ its pseudo-inverse defined by 
\begin{align}
\label{eq:pseudo-inv}
\psi ^{-1}(\varepsilon )=\min\{q\in \mathbb{N}^{*}: \psi (q )\leqslant \varepsilon \},\varepsilon >0.
\end{align} 


\begin{theorem}
\label{thm:dioph-rw}
Assume that $\bm{\mu }$ is   under the form \eqref{mu:general} for some $\bm{\omega }=(\omega _{[k]})_{1\leqslant k\leqslant d}\in (\mathbb{R}^{m})^{d}$. Let $\psi $ be  some mapping $\mathbb{N}_{*}\to (0,1]$ converging to $0$. 
Let $ \beta >0 $. There is  $0<c<\infty $ depending on $d,m,\psi ,\beta $ such that the following holds:

(i)
Assume each $\omega _{[k]}$ is $\psi  $-BA. We have for ${\bf x}\in \mathbb{Z} ^{d},K\subset \llbracket d\rrbracket,0<\varepsilon < \frac{1}{2},n\in \mathbb{N}^{*}$
\begin{align}
\label{eq:pn0-upper}p_{n}^{K,{\bf x}}(\varepsilon ) \leqslant &c  n^{-d/2}n^{-\frac{(d-|K|)m}{2}}\psi^{-1}(\varepsilon )^{ -m |K|}\exp(-c n^{-1}\|{\bf x}\|^{2})\\
\label{eq:pn-upper} \bar p^{K}_{n}(\varepsilon ) \leqslant &cn^{\frac{-(d-|K|)m}{2}}\psi^{-1}(\varepsilon )^{- m |K|}\\
\label{eq:Ib-upper} {\bf I}_{\beta }(\varepsilon )\leqslant& c\psi^{-1}(\varepsilon )^{- \beta -d m+2  }\\
\label{eq:Ib0-upper} {\bf J}_{\beta }(\varepsilon )\leqslant& c\psi^{-1}(\varepsilon )^{ -\beta -d(m +1)+2 }\end{align}



(ii) Assume $\bm{\omega } $ is $\psi $-SWA. Then if $n_{\varepsilon }\leqslant \psi^{-1}(\varepsilon )^{2},\varepsilon >0,$
\begin{align}
\label{eq:Ib-lower} \psi^{-1}(\varepsilon )^{-\beta -dm+2 }\stackrel{\text{\rm{\bf i.o.}}}{\leqslant } c{\bf I}_{\beta }(\varepsilon ),\varepsilon \to 0.
\end{align}


(iii) Assume $\bm{\omega }$ is $\psi  $-SWA$^{(*)}$. Then if $n_{\varepsilon }\leqslant \psi^{-1}(\varepsilon )^{2},\varepsilon >0,$
\begin{align}
\label{eq:Jb0-lower} \psi^{-1}(\varepsilon )^{-\beta -d(m+1)+2 }\stackrel{\text{\rm{\bf i.o.}}}{\leqslant }  c{\bf J}_{ \beta }(\varepsilon ),\varepsilon \to 0
\end{align}

\end{theorem}
  

 
\begin{remark}
\label{rk:psi-SWA}
The reason why $\bm{\omega }$ has to be $\psi -$SWA$^{(*)}$ instead of $\psi -$SWA at point (iii) is because summands are odd in the definition of ${\bf J}_{\beta }$. As proved at Proposition \ref{prop:psi-SWA*}, this subtlety does not influence final results about Gaussian excursions, hence one would like a general result from diophantine approximation that states that $\psi -$SWA tuples are also $\psi -$SWA$^{(*)}$, but that is unlikely.
\end{remark}

\subsection{Proof of Theorem \ref{thm:dioph-rw}}

{\bf Notation.} 
We introduce the notation $A=\Theta B$ to indicate that there are finite  constants $c,c'>0$ depending  on $\bm{\mu },m,d,\psi   $   and not (further) on $\bm{\omega },\varepsilon ,T,n$ such that $A\leqslant cB,B\leqslant c'A$.

Also, for a $d$-tuple of vectors of $\mathbb{R}^{m+1}$, $\bar {\bf x}=(\bar x_{[1]},\dots ,\bar x_{[d]})\in (\mathbb{R}^{m+1})^{d} $ with $\bar x_{[k]}=(x_{[k],0},\dots ,x_{[k],m})\in \mathbb{R}^{m+1}$, remove the bar when the $0$-th component is removed from each vector: 
\begin{align*}
x_{[k]}=(x_{[k],1},\dots ,x_{[k],m}),\hspace{1cm}{\bf x}=(x_{[1]}\dots ,x_{ [d] }).
\end{align*}
Euclideand norms in $\mathbb{R}^{m}$ are denoted by a single bar and in $(\mathbb{R}^{m})^{d}$ by two bars: 
\begin{align*}
|x_{[k]}|^{2}=\sum_{i=1}^{m}x_{i,[k]}^{2},\|{\bf x}\|^{2}=\sum_{k=1}^{d}|x_{[k]}|^{2}.
\end{align*}



\begin{lemma}
\label{lm:Ie-dispo} 
Let $\omega\in \mathbb{R}^m  $ that is $\psi $-BA.
For $ 1/2\geqslant \varepsilon >0$, define 
\begin{align*}
I_{\varepsilon }(\omega ) :=\{q\in \mathbb{Z} ^m \setminus  \{0\}:0<\d_{q}(\omega )\leqslant  \varepsilon \}.
\end{align*} 
Let $q^{(N)},N\in \mathbb{N}^{*} $, the elements of $I_{\varepsilon } $ ordered by increasing radius. Then
\begin{align}
\label{eq:qN} | q^{(N)} | \geqslant  \Theta N^{\frac{1}{m}}\psi ^{-1}(\varepsilon ).
\end{align}
 In particular, we have the following estimate:
\begin{align}
\label{eq:dispo}
\sum_{q\in I_{\varepsilon }}\exp(-\Theta n^{-1}|q|^{2})\leqslant \sum_{N=1}^{\infty }\exp(-\Theta n^{-1}N^{\frac{2}{m}}\psi  ^{-1}(\varepsilon )^{2})\leqslant \Theta n^{\frac{m}{2}}\psi^{-1}(\varepsilon )^{-m}.
\end{align} 
\end{lemma}

\begin{proof} 
The starting point is that for $q\in I_{\varepsilon } $, since $\varepsilon>\varepsilon/2 \geqslant \d_{q}(\omega )/2\geqslant    \psi ( | q | )$, we have $ | q  | \geqslant  \rho :=\psi ^{-1}(\varepsilon ).$
And the triangular inequality yields for $q\neq q '\in I_{\varepsilon } ,$
\begin{align*}
2\psi (q-q')\leqslant \d_{q-q'}(\omega )  \leqslant 2\varepsilon ,
\end{align*}hence  $
 | q-q' | \geqslant  \rho $ as well. 
It follows that all $q\in I_{\varepsilon }$ are pairwise distant by more than $\rho $, and the  balls $B_{m}(q,\rho /2),q\in I_{\varepsilon }$  are disjoint. Hence for $N_{0}\in \mathbb{N}^*,$ the total $\Leb[m]-$ measure occupied by the $B_{m}(q^{(N)},\rho/2 ),N\leqslant N_{0}$ is larger than $\Theta N_{0}\rho ^m $. This volume is necessarily smaller than the volume of the ball with  radius $ | q ^{(N_{0})} | +\rho /2\leqslant 2 | q ^{(N_{0})} | $, hence 
\begin{align*}
\Theta N_{0}\rho ^m    \leqslant \Theta  | q ^{(N_{0})} | ^m 
\end{align*}
which yields  \eqref{eq:qN}. Finally
\eqref{eq:dispo}
follows from
\begin{align*}
\sum_{N =1}^{\infty }\exp(-\Theta n^{-1}(N ^{\frac{1}{m} }\psi  ^{-1}(\varepsilon ))^{2})  \leqslant 2   \int_{1/2}^{\infty }\exp(-\Theta (n^{-\frac{m}{2}}\psi  ^{-1}(\varepsilon )^{m}y)^{\frac{2}{m} })dy\leqslant \Theta n^{\frac{m}{2}}\psi  ^{-1}(\varepsilon )^{-m}.\\
\end{align*}
\end{proof}


\begin{proof}[Proof of Theorem \ref{thm:dioph-rw}] Let $M=d(m+1).$
The proof is based on the study of the symmetric random walk $(S_{n})_{n}$ on $\mathbb{Z} ^{M}$ with independent increments defined by $S_{0}=0$ and
\begin{align*}
\mathbb{P}(S_{n+1}=S_{n}\pm {\bf e}_{j})=\frac{1}{2M},1\leqslant j\leqslant M,
\end{align*}
where $({\bf e}_{j})_{j}$ is the canonical basis.
 Following the notation introduced above, denote also $ \bar \omega _{[k]}=(1,\omega _{[k]})$ and $ \bar \bm{\omega }=(\bar \omega _{[k]})_{k}.$


 For $\bar q_{[k]}=(q_{[k],0},q_{[k]})\in \mathbb{Z} ^{m+1},1\leqslant k\leqslant d,\bar {\bf q}=(\bar q_{[1]},\dots ,\bar q_{[d]})\in (\mathbb{Z} ^{m+1})^{d}\approx\mathbb{Z} ^{M}$,   denote by  $q_{[k]}=(q_{[k],1},\dots ,q_{[k],m})\in \mathbb{Z} ^{m},{\bf q}=(q_{[k]})_{k}\in (\mathbb{Z} ^{m})^{d}$.  
We define
\begin{align*}
 \bar {\bf q}\otimes \bar \bm{\omega } := (\bar q_{[k]}\cdot   \bar \omega _{[k]})_{k=1,...,d}=  {\bf q}_{0}+{\bf q}\otimes  \bm{\omega }  \in \mathbb{R} ^{d}
\end{align*}where ${\bf q}_{0}=(q_{[k],0})_{k=1}^{d}$, so that we have the representation
$
{\bf U}_{n}= S_{n}\otimes \bar \bm{\omega }.$

 We use the notation, for ${\bf x}=(x_{[1]},\dots ,x_{[d]})\in \mathbb{Z} ^{d},K\subset \llbracket d\rrbracket $,
  $$ \bar {\bf I}^{{\bf x},K}_{\varepsilon } =\{\bar {\bf q}\in  \mathbb{Z} ^{M} :\bar q_{[k]}=0,k\notin K\text{\rm{ and }}0< |  \bar q_{[k]}\cdot  \bar \omega _{[k]}-x_{[k]}  | \leqslant \varepsilon,k\in K \} .$$


For $\varepsilon <1/2$, an element $\bar {\bf q}\in \bar {\bf I}^{{\bf x},Z}_{\varepsilon }$ satisfies the following for $1\leqslant k\leqslant d$: \begin{align*}
| q_{[k],0}+q_{[k]}\cdot \omega _{[k]}- x_{[k]} | <\varepsilon ,
\end{align*}
hence since $ x_{[k]}\in \mathbb{Z} $ and $q_{[k]}\in I_{\varepsilon }(\omega _{[k]})$, $\d_{q_{[k]}}(\omega _{[k]})\leqslant \varepsilon $. It follows that $q_{[k],0}$ depends explicitly on other coordinates
\begin{align}
\label{eq:jk0}
q_{[k],0}=&q_{[k],0}( x_{[k]},q_{[k]}):=\text{\rm{argmin}}_{p\in \mathbb{Z} } | p+q_{[k]}\cdot \omega _{[k]}-x_{[k]} |\\
\notag{\bf q}_{0}=&{\bf q}_{0}({\bf x},{\bf q}):=(q_{[k],0})_{k}.
\end{align}
In particular,  $ | x_{[k]} | \leqslant  | q_{[k],0} | + |q_{[k]}\cdot \omega _{[k]} | +1 $, and
\begin{align}
\label{eq:j2}
 \| \bar {\bf q} \| ^{2}=&\|{\bf q}_{0}\|^{2}+\|{\bf q}\|^{2}\geqslant \max(\|{\bf q}\|^{2},\|{\bf q}\|^{2}+\Theta( \|{\bf x}\|^{2}-1))\geqslant \Theta (\|{\bf q}\|^2+\|{\bf x}\|^{2}).
\end{align}
We also have the one-to-one correspondance
\begin{align}
\label{eq:1to1}
{\bf I}^{{\bf x},K}_{\varepsilon }(\bm{\omega }):=\{{\bf q}\in \prod_{k}\mathbb{Z} ^{m }: ({\bf q}_{0}({\bf x};{\bf q}),{\bf q})\in \bar {\bf I}_{\varepsilon }^{{\bf x},K}(\bm{\omega }) ,k\in K\}\equiv \{\o\}^{d-|K|}\times \prod_{k\in K}I_{\varepsilon }(\omega _{[k]}).
\end{align}
 
{\bf Proof of (i):}
By the Gaussian approximation   Lemma \ref{lm:gauss-approx} (below), and \eqref{eq:j2}, \begin{align}
\notag p_{n}^{{\bf x},K}(\varepsilon )&=\sum_{\bar {\bf q}\in \bar {\bf I}^{{\bf x},K}_{\varepsilon }}\mathbb{P}( S_{n} =\bar {\bf q} )=\sum_{  {\bf q}\in  {\bf I}^{{\bf x},K} _{\varepsilon }}\mathbb{P}( S_{n} = ( {\bf q}_{0}({\bf x},{\bf q}),{\bf q} ))\\
\notag&\leqslant \Theta \sum_{{\bf q}\in {\bf I}^{K,{\bf x}}_{\varepsilon }} n^{-\frac{M}{2}} {\exp(-\Theta n^{-1}( \| {\bf q} \| ^{2}+\|{\bf q}_{0}\|^{2}))}\\
\notag &\leqslant \Theta n^{-\frac{M}{2}}  \sum_{{\bf q}\in {\bf I}^{K,{\bf x}}_{\varepsilon }} {\exp(-\Theta n^{-1} \| {\bf q} \| ^{2})\exp(-\Theta n^{-1} \|{\bf x}\|^2 ))} \\
\label{eq:pnx}&\leqslant \Theta n^{-\frac{M}{2}} \exp(-\Theta n^{-1}\|{\bf x}\|^{2})   \prod_{k\in K}\sum_{q_{[k]}\in I_{\varepsilon }(\omega _{[k]})}\exp(-\Theta n^{-1} | q_{[k]} | ^{2} ))\text{\rm{ by \eqref{eq:1to1}}}\\
\notag&\leqslant \Theta n^{-\frac{d(m+1)}{2}}\exp(-\Theta n^{-1}\|{\bf x}\|^{2}) (n^{\frac{m  }{2}}\psi^{-1}(\varepsilon )^{-m})^{|K|} \;\;\text{\rm{ with   \eqref{eq:dispo},}}\\
\notag&\leqslant \Theta n^{-d/2}n^{-\frac{(d-|K|) m}{2}}\psi^{-1}(\varepsilon )^{-m|K|}\exp(-\Theta n^{-1}\|{\bf x}\|^{2})  
\end{align}
and \eqref{eq:pn0-upper} is proved.

 


The bound  \eqref{eq:pn-upper}
immediately stems from $\bar p^{K}_{n}=\sum_{{\bf x}\in \mathbb{Z} ^{d}} p_{n}^{{\bf x},K}$ and Lemma \ref{lm:gauss-sum} (after summing over $i\in \{0,1\}$). 
Hence  using \eqref{eq:dispo}, and \eqref{eq:pnx} with ${\bf x}=0$
\begin{align*}
{\bf I}_{\beta }^{\o}(\varepsilon ):=&\sum_{n\geqslant n_{\varepsilon } }n^{-\beta/2 }p_{n}^{\o}(\varepsilon )\\
=&\sum_{n\geqslant n_{\varepsilon }}n^{-\beta /2}\sum_{K\neq \emptyset }p_{n}^{\o,K}(\varepsilon )\\
\leqslant&   \Theta {\bf K}_{\beta}(\varepsilon )\\
\text{\rm{ with }}{\bf K}_{\beta }(\varepsilon ):=&    \sum_{n\geqslant n_{\varepsilon } }n^{-\beta/2 -\frac{M}{2}}\sum_{K\subset \llbracket d\rrbracket ,K\neq \emptyset } \prod_{k\in K}  \sum_{N_{k}=1}^{\infty }\exp(-\Theta n^{-1}(N_{k}^{\frac{1}{m }}\psi^{-1}(\varepsilon ))^{2})\\
\leqslant &    \sum_{n\geqslant n_{\varepsilon } }n^{-\beta/2 -\frac{M}{2}}\sum_{K\subset \llbracket d\rrbracket ,K\neq \emptyset } \sum_{N_{k}\geqslant 1,k\in K}^{\infty }\exp(-\Theta n^{-1}\sum_{k\in K }(N_{k}^{\frac{1}{m }}\psi^{-1}(\varepsilon ))^{2})\\
\leqslant  &\Theta \sum_{K\subset \llbracket d\rrbracket ,K\neq \emptyset} \sum_{N_{k}\geqslant 1,k\in K}\sum_{n\geqslant n_{\varepsilon } }\int_{n}^{n+1/2}(z-1/2)^{-\beta/2 -\frac{M}{2}}   \exp(-\Theta z^{-1}\sum_{k\in K} \psi^{-1}(\varepsilon )^{2}N_{k}^{2/m } )dz\\
\leqslant & \Theta  \sum_{K\subset \llbracket d\rrbracket ,K\neq \emptyset }\sum_{N_{k}\geqslant 1,k\in K} (\sum_{k\in K}
\psi^{-1}(\varepsilon )^{2}
 N_{k}^{2/m })^{1-\beta/2 -\frac{M}{2}}\int_{0}^{\infty }y^{\beta/2 +\frac{M}{2}-2}\exp(-\Theta y )dy\\
 \leqslant &\Theta (\psi^{-1}(\varepsilon )^{2})^{1-\beta/2 -\frac{M}{2}}\max_{K\subset \llbracket d\rrbracket ,K\neq \emptyset }
 \int_{[1,\infty  ]^{  | K | }}(\sum_{k\in K}x_{k}^{\frac{2}{m }} )^{1-\beta/2 -\frac{M}{2}}\prod_{k\in K}dx_{k}\\
 \leqslant &\Theta \psi^{-1}(\varepsilon )^{2-M-\beta }\max_{1\leqslant p\leqslant d}\int_{ [1,\infty  ]^{p}}(\sum_{k=1}^{p}y_{k})^{1-\beta/2 -\frac{M}{2}}\prod_{k=1}^{p}y_{k}^{\frac{m }{2}-1}dy_{k}\\
 \leqslant &\Theta \psi^{-1}(\varepsilon )^{2-d(m+1)-\beta }\max_{1\leqslant p\leqslant d}\int_{1}^{\infty }(\Theta r)^{1-\beta/2 -\frac{(m+1)d}{2}}r^{mp/2-p}r^{p-1}dr 
 \end{align*}
and the integral converges if  $\beta/2 >1-d/2$.
Since there are less terms in ${\bf J}_{\beta }(\varepsilon )$, than in ${\bf I}_{\beta }^{\o}(\varepsilon ),$ the upper bound holds and \eqref{eq:Ib0-upper}  is proved.  



With the  same computations, using first \eqref{eq:pnx},  and then\eqref{eq:dispo}, and Lemma \ref{lm:gauss-sum},
\begin{align*}
{\bf I}_{\beta } (\varepsilon )
=&\sum_{n\geqslant n_{\varepsilon }}n^{-\beta /2}\sum_{{\bf x}\in \mathbb{Z} ^{d}}\sum_{K\neq \emptyset }p_{n}^{{\bf x},K}(\varepsilon )\\
\leqslant & \sum_{n\geqslant n_{\varepsilon } }n^{-\beta/2 -\frac{M}{2}}\sum_{{\bf x}\in \mathbb{Z} ^{d}}\exp(-\Theta n^{-1}{\bf x}^{2})\sum_{K\subset \llbracket d\rrbracket ,K\neq \emptyset } \prod_{k\in K}  \sum_{N_{k}=1}^{\infty }\exp(-\Theta n^{-1}(N_{k}^{\frac{1}{m }}\psi^{-1}(\varepsilon ))^{2})\\
\leqslant &  \Theta {\bf K}_{\beta -d}(\varepsilon )
\end{align*}
provided $\beta /2>1$ , which proves \eqref{eq:Ib-upper}.
  
  
  Let us conclude with the proof of {\bf (iii)}, the proof of {\bf (ii)} is similar and easier.  There are by hypothesis   infinitely many $q^j\in \mathbb{Z} ^{m},j\geqslant 1$ and $p^j_{[k]}\in \mathbb{Z},1\leqslant k\leqslant d, $ such that $\bar {\bf q}^j:=((p^j_{[k]},q^j))_{k}\equiv 1$ and  $$ | p^j_{[k]}-\omega _{[k]}\cdot q^j   |  =\d_{q^j  }(\omega _{[k]})\leqslant  c_{W}\psi  (|q^j|)=:c_{W}\varepsilon _j$$
(we have $\varepsilon _j\to 0$ because $\psi $ converges to $0$ by hypothesis).
We have in particular  with Cauchy-Schwarz inequality 
$$
\|\bar {\bf q}^j\|\leqslant \sum_{k=1}^{d} (| p^j_{[k]} | + | q^j | )\leqslant \sum_{k=1}^{d}( | \omega _{k} |  | q^j | +1+ | q^j | )\leqslant \Theta  | q^j | $$
and clearly the other inequality as well $ | q^j | \leqslant \|\bar {\bf q}^j\|$.


Then, by Lemma \ref{lm:gauss-approx},  with $\tilde n_{j}:= {c_{\text{\rm{inf}}}^{-1} |\bar {\bf q}^j |\vee n_{\varepsilon _{j}}}$
\begin{align*}
{\bf J}_{\beta}(\varepsilon _j)=\sum_{n\geqslant  n_{\varepsilon _{j}},n\text{\rm{ odd}}}n^{-\beta/2 }p_{n}^{\o}(\varepsilon _j)\geqslant &\sum_{n\geqslant n_{\varepsilon_{j} },n\text{\rm{ odd}}}n^{-\beta/2 }\mathbb{P}(S_{n}=\bar {\bf q}^j)\\ \geqslant &\Theta \sum_{n\geqslant \tilde n_{j},n\equiv \bar {\bf q}^j  \equiv 1}n^{-\beta/2 }n^{-\frac{d(m+1)}{2}}\exp(-\Theta n^{-1}  \| \bar  {\bf q}^j   \| ^{2})\\ 
\geqslant &\Theta \int_{[\tilde n_{j}/2] }^{\infty }y^{-\beta/2 -d\frac{m+1}{2}}\exp(-\Theta y^{-1} |   q^j  | ^{2})dy\\
\geqslant &\Theta| q^j  |^{2-\beta  -d(m+1) }\int_{0}^{\Theta    |  q^j  | ^{2}\tilde n_{j}^{-1}}z^{\beta/2 +d\frac{m+1}{2}-2}\exp(-\Theta z)dz\\
\geqslant & \Theta \psi^{-1}(\varepsilon _j)^{2-\beta  -d(m+1) }
\end{align*}
provided $\beta >0$, because $ |  q^j  | ^{2} |  \bar{\bf q}^j  | ^{-1}\geqslant \Theta >0$ and $n_{\varepsilon _{j}}\leqslant \psi ^{-1}(\varepsilon _{j})^{2}$ yields  (recalling $\psi (|q^{j}|)=\varepsilon _{j}$)
\begin{align*}
 | q^j  | ^{2}n_{\varepsilon_{j} }^{-1}\geqslant \psi ^{-1}(\varepsilon _{j})^{2}\psi ^{-1}(\varepsilon _{j})^{-2}=1,
\end{align*}
hence \eqref{eq:Jb0-lower} is proved. The proof of \eqref{eq:Ib-lower} is similar without the requirement that $\bar {\bf q}^j\equiv 1$, hence the sum is over all $n\geqslant n_{\varepsilon _{j}}$ (even and odd).  
   

\end{proof}

\subsection{Gaussian approximation}

The following lemma quantifies how much  $S_{n}$ is close to a Gaussian distribution.
 

\begin{lemma}
\label{lm:gauss-approx}
Let $p\in \mathbb{N}$ and $S_{n}$ be the centred random walk on $\mathbb{Z} ^{p}$ with weights $\theta _{i}\in (0,1),1\leqslant i\leqslant p$, summing to $1$, i.e. 
\begin{align*}
\mathbb{P}(S_{n+1}=S_{n}\pm {\bf e}_{i})=\frac{\theta _{i}}{2},1\leqslant i\leqslant p,n\in \mathbb{N}.
\end{align*} 
For ${\bf q}=({\bf q}_{i})\in \mathbb{Z} ^{p},n\in \mathbb{N}$, write ${\bf q}\equiv n$ if $\sum_{i=1}^{p}{\bf q}_{i}$ and $n$ have the same parity, and remark that $\mathbb{P}(S_{n}={\bf q})=0$ if ${\bf q}\not\equiv n.$ There is a constant $c_{\text{\rm{inf}}}>0$  such that
for ${\bf q}\in \mathbb{Z} ^{p}
$
\begin{align}
\label{eq:up-bnd-binom}
\mathbb{P}(S_{n}={\bf q})\leqslant& \Theta n^{-\frac{p}{2}}\exp(-\Theta n^{-1} \| {\bf q} \| ^{2})\\
\notag\mathbf{1}_{\{|{\bf q}|\leqslant c_{\text{\rm{inf}}} n\}}\mathbb{P}(S_{n}={\bf q})\geqslant& \Theta n^{-\frac{p}{2}}\exp(-\Theta n^{-1} \| {\bf q} \| ^{2})\mathbf{1}_{\{|{\bf q}|\leqslant c_{\text{\rm{inf}}} n\}}\text{\rm{ for }}{\bf q}\equiv n.
\end{align}\end{lemma}

\begin{remark}The constants involved in this result depend also on the $\theta _{i},1\leqslant i\leqslant p$.
\end{remark}


\begin{proof} 
\renewcommand{{\bf N}}{{\bf N}}
Let $N_{i}$ be the number of times direction $i$ has been chosen in the random walk, and  let $B_{i}\leqslant N_{i}$ be the number of $+{\bf e}_{i}$ increments, hence $N_{i}-B_{i}$ is the number of $-{\bf e}_{i}$ increments.
The $i$-th component of $S_{n}$ is therefore $S_{n,i}:=N_{i}-2B_{i}$. We  have $N_{i}\sim \mathcal{B}(n,\theta _{i}),B_{i}\sim \mathcal{B}(N_{i},1/2)$, and the $B_{i}$ are independent conditionally on ${\bf N}:=(N _{i})_{i}$. Hence for $ | \varepsilon |  \leqslant  c_{\text{\rm{Bin}}}$, from Lemma \ref{lm:binomial-approx}
\begin{align*}
\mathbb{P}(B_{i}=[N_{i}(1/2+\varepsilon] )\;|\;{\bf N})=\Theta \exp(-\Theta N_{i}\varepsilon ^{2})N_{i}^{-1/2}.
\end{align*}
Let ${\bf q}=({\bf q}_{i})\in \mathbb{Z} ^{p}$ such that for $1\leqslant i\leqslant p, | {\bf q}_{i} | \leqslant  c_{\text{\rm{Bin}}} N_{i}$, let $\varepsilon_{i} =N_{i}^{-1}{\bf q}_{i}$,
\begin{align*}
\mathbb{P}(S_{n,i}={\bf q}_{i}\;|\;{\bf N} )=\mathbb{P}(B_{i}=N_{i}/2+{\bf q}_{i}/2\;|\;{\bf N} )=\begin{cases}
0$ if $N_{i}\not\equiv {\bf q}_{i}\\
  \Theta N_{i}^{-1/2}\exp(-\Theta N_{i}\varepsilon_{i} ^{2})=\Theta N_{i}^{-1/2}\exp(-\Theta N_{i}^{-1}{\bf q}_{i}^{2})$ otherwise.$
\end{cases}
\end{align*} 
Let
\begin{align*}
c_{\text{\rm{inf}}}:= {c_{\text{\rm{Bin}}}}{(1-c_{\text{\rm{Bin}}})\min_{i}\theta _{i}}>0.
\end{align*}
If for all $i$, $N_{i}>\theta _{i}(1-c_{\text{\rm{Bin}}})n$ and $ | {\bf q}_{i} | <c_{\text{\rm{inf}}} n$, then $ | {\bf q}_{i} | <c_{\text{\rm{Bin}}} N_{i}$ and we have the lower bound
\begin{align*}
\mathbb{P}(S_{n}={\bf q})=&\mathbb{E}(\mathbb{P}(S_{n}={\bf q} \;|\;{\bf N} ))\\
=&\mathbb{E}(\mathbf{1}_{\{{\bf q}_{i}\equiv N_{i} ,\forall i\}}  \mathbb{P}(S_{n}={\bf q}\;|\;{\bf N} ) )\\
\geqslant & \mathbb{E}(\mathbf{1}_{\{{\bf q}_{i}\equiv N_{i},N_{i}>\theta _{i}(1-c_{\text{\rm{Bin}}})n,\forall i\}}\mathbb{P}(S_{n}={\bf q}\;|\;{\bf N} ))\\
\geqslant & \mathbb{E}(\mathbf{1}_{\{{\bf q}_{i}\equiv N_{i},N_{i}>\theta _{i}(1-c_{\text{\rm{Bin}}})n,\forall i\}}\Theta \prod_{i}N_{i}^{-\frac{1}{2}}\exp(-\Theta N_{i}^{-1}{\bf q}_{i}^{2}))\\
\geqslant & \mathbb{E}(\mathbf{1}_{\{{\bf q}_{i}\equiv N_{i},N_{i}>\theta _{i}(1-c_{\text{\rm{Bin}}})n,\forall i\}}\Theta n^{-\frac{p}{2}}\exp(-\Theta n^{-1}{\bf q}^{2}))\\
\geqslant &\Theta n^{-\frac{p}{2}}\exp(-\Theta n^{-1}{\bf q}^{2})\mathbb{P}({\bf q}_{i}\equiv N_{i},N_{i}>\theta _{i}(1-c_{\text{\rm{Bin}}})n,\forall i).
\end{align*}

If ${\bf q}\equiv n$, Asymptotically a fraction $2^{-(p-1)}$ of tuples ${\bf N} \in \llbracket n\rrbracket ^{p}$ are such that $\sum_{i}N_{i}\equiv n$ and $N_{i}>\theta _{i}(1-c_{\text{\rm{Bin}}})n$ will be compatible with ${\bf q}$, hence $\mathbb{P}( {\bf q}_{i}\equiv N_{i},N_{i}>(\theta _{i}-c_{\text{\rm{Bin}}})n,\forall i)=\Theta\mathbf{1}_{\{{\bf q}\equiv n\}}\mathbb{P}(N_{i}>(\theta _{i}-c_{\text{\rm{Bin}}})n,\forall i) $ and the latter probability converges to $1$ thanks to Lemma \ref{lm:binomial-approx}
, hence the lower bound is proved.

The upper bound is a bit delicate.  Let us start by the trivial bound, if  $ | {\bf q}_{i} | >n$ for some $i$,$$0=\mathbb{P}(S_{n,i}={\bf q}_{i}\;|\;{\bf N} )=\mathbb{P}(S_{n}={\bf q})\leqslant \Theta n^{-1/2}\exp(-\Theta n^{-1}{\bf q}_{i}^{2}).$$

Assume henceforth  that $ | {\bf q}_{i} | \leqslant n$ for all $i$. Let $\Omega $ be the event that for some $i$, $N_{i}<\theta _{i}(1-c_{\text{\rm{Bin}}})n$.
 On $\Omega ^{c}$, $N_{i}=\Theta n$ for all $i$, hence
\begin{align*}
\mathbb{P}(S_{n,i}={\bf q}_{i}\;|\;\Omega ^{c} )\leqslant  \Theta n^{-1/2}\exp(-\Theta n^{-1}{\bf q}_{i}^{2}).
\end{align*}
Finally, in all cases,
\begin{align*}
\mathbb{P}(S_{n}={\bf q})\leqslant & \mathbb{E}(\mathbf{1}_{\{\Omega^{c}\}} \prod_{i}\mathbb{P}(S_{n,i}={\bf q}_{i}\;|\;{\bf N} ))+\mathbb{P}(\Omega )\\
\leqslant &\mathbb{E}(\mathbf{1}_{\{\Omega^{c}\}} \Theta \prod_{i} n^{-\frac{ 1 }{2}}\exp(-\Theta n^{-1}{\bf q}_{i}^{2} ))+\mathbb{P}(\Omega  )\\
\leqslant &n^{-p/2}\exp(-\Theta n^{-1}{\bf q}^{2})+\mathbb{P}(\Omega  ).
\end{align*}
 Then   Lemma \ref{lm:binomial-approx} with $\varepsilon =-c_{\text{\rm{Bin}}} $ yields, using the decreasing of binomial probabilities around the mean,
\begin{align*}
\mathbb{P}(\Omega )\leqslant& \sum_{i}\sum_{k<[n\theta _{i}(1-c_{\text{\rm{Bin}}} )]}\mathbb{P}(N_{i}=k)\\
\leqslant &\sum_{i}\Theta n\mathbb{P}(N_{i}=n\theta _{i}(1+\varepsilon ))\\
\leqslant &\Theta n^{1/2}\exp(-\Theta n)\\
\leqslant &\Theta n^{-\frac{p}{2}}\exp(-\Theta n/2)\\
\leqslant &\Theta n^{-\frac{p}{2}}\exp(-\Theta n^{-1}{\bf q}^{2}),
\end{align*}
using $ | {\bf q} | \leqslant n,$ which concludes the proof of \eqref{eq:up-bnd-binom}.
\end{proof}  

\begin{lemma}
\label{lm:gauss-sum} 
For $i\in \{0,1\}$
\begin{align*}
 \sum_{{\bf x}\in \mathbb{Z} ^{d},{\bf x}\equiv i}\exp(-\Theta n^{-1}{\bf x}^{2})=\Theta n^{d/2}.
\end{align*}
where ${\bf x}\equiv i$ means that $\sum_{k=1}^{d}{\bf x}_{[k]}$ has the same parity as $i$.
\end{lemma} 

\begin{proof}
 

The lower bound stems from $y^{2}\geqslant \min_{{\bf x}\in \mathbb{Z} ^{d}\cap B(y,2),{\bf x}\equiv i\text{\rm{ or }}{\bf x}=0}{\bf x}^{2},y\in \mathbb{R}^{d},$ and
\begin{align*}
\Theta n^{d/2}\leqslant \int_{\mathbb{R}^{d}}\exp(-\Theta n^{-1}y^{2})dy\leqslant& \int_{}\max_{{\bf x}\in \mathbb{Z} ^{d}\cap B(y,2),{\bf x}\equiv i\text{\rm{ or }}{\bf x}=0}\exp(-\Theta n^{-1}{\bf x}^{2})dy\\
\leqslant & 4^{d}\sum_{x\in \mathbb{Z} ^{d},{\bf x}\equiv i\text{\rm{ or }}{\bf x}=0}\exp(-\Theta n^{-1}{\bf x}^{2})\\
\leqslant &4^{d}(\sum_{{\bf x}\in \mathbb{Z} ^{d},{\bf x}\equiv i}\exp(-\Theta n^{-1}{\bf x}^{2})+1)
\end{align*}
because at most a mass $4^{d}$ of $y's$ are within distance $2$ from some ${\bf x}\in \mathbb{Z} ^{d}$. For the upper bound,  for ${\bf x}\in \mathbb{Z} ^{d}\setminus \{0\},$ there is at least one cube $C_{{\bf x}}$ within the $2^{d}$ cubes that touch ${\bf x}$
 such that for all $y\in C_{{\bf x}}$, $y^{2}\leqslant {\bf x}^{2}$. Hence
\begin{align*}
\sum_{{\bf x}\equiv i}\exp(-\Theta n^{-1}{\bf x}^{2})\leqslant &\sum_{{\bf x}\equiv i,{\bf x}\neq 0}\exp(-\Theta n^{-1}{\bf x}^{2})+1 \leqslant  \sum_{{\bf x}\in \mathbb{Z} ^{d}\setminus\{0\} }\int_{C_{{\bf x}}}\exp(-\Theta n^{-1}y^{2})dy+1\\
\leqslant&   2^{d}\int_{\mathbb{R}^{d}}\exp(-\Theta n^{-1}y^{2}dy)+1\leqslant \Theta n^{d/2}.
\end{align*}\end{proof}

 




 

\subsection{Binomial estimates}
 
 
\begin{lemma}
\label{lm:binomial-approx}Let $\theta _{0}<1$.
There is a universal constant $c_{\text{\rm{Bin}}}\in (0,1)$ such that
for $0<\theta \leqslant \theta _{0}, B\sim \mathcal{B}(m,\theta )$, for $-c_{\text{\rm{Bin}}}\theta \leqslant \varepsilon _{m}=\varepsilon \leqslant c_{\text{\rm{Bin}}}\theta $ 
\begin{align*}
\mathbb{P}(B= [m(\theta +\varepsilon )])=&\Theta m^{-1/2} \exp\left(
-\Theta {m\varepsilon ^{2}} \right)
\end{align*}
where the constants involved in $\Theta $ depend on $\theta_{0} $.
\end{lemma}
\begin{proof}Let   $k=[ m( \theta +\varepsilon )]$.
By Stirling's formula, 
\begin{align*}
\mathbb{P}(B =k)=&\Theta \frac{\sqrt{m}}{\sqrt{k}\sqrt{m-k}}\theta ^{k}(1-\theta) ^{m-k}\frac{m^{m}}{k^{k}(m-k)^{m-k}} \\
=&\Theta m^{-1/2}\frac{\theta ^{k}(1-\theta )^{m-k}}{\sqrt{(\theta+\varepsilon ) (1-\theta-\varepsilon  )}}\frac{m^{m}}{(\theta m)^{k}(m(1-\theta ))^{m-k}\left(
\frac{k}{\theta m}
\right)^{k}\left(
\frac{m-k}{m(1-\theta )}
\right)^{m-k}}\\
=&\Theta m^{-1/2}\frac{1}{\sqrt{\theta  }} \left(
 {1+\frac{\varepsilon }{\theta }}
\right)^{-k}\left(
 {1-\frac{\varepsilon }{1-\theta }}
\right)^{k-m}\\
=&\Theta m^{-1/2}\theta ^{-1/2}\exp(\gamma _{\varepsilon ,\theta })\end{align*}
where  for $|\varepsilon |\leqslant \theta /2$
\begin{align*}
\gamma _{\varepsilon ,\theta }=&-m(\theta +\varepsilon )( \frac{\varepsilon }{\theta }-\frac{\varepsilon ^{2}}{2\theta ^{2}}+O(\varepsilon ^{3}/\theta ^{3}))-m((1-\theta )-\varepsilon )( -\frac{\varepsilon }{1-\theta }+\frac{\varepsilon ^{2}}{2(1-\theta )^{2}}+O(\varepsilon ^{3}))\\
=&m\frac{\varepsilon ^{2}}{2\theta  }-\frac{m\varepsilon ^{2}}{\theta }+O(m\varepsilon ^{3}\theta ^{-2}+m\varepsilon ^{4}\theta ^{-3})-\frac{m\varepsilon ^{2}}{2(1-\theta )}-\frac{m\varepsilon ^{2}}{1-\theta }+O(m\varepsilon ^{3}+m\varepsilon ^{4})\\
=&\frac{-m\varepsilon ^{2}}{2\theta }-\frac{3m\varepsilon ^{2}}{2(1-\theta )}+O(m\varepsilon ^{3}\theta ^{-2})
\end{align*}
using $\varepsilon \leqslant \theta ,$ hence for some $C$
\begin{align*}\left|
\gamma _{\varepsilon ,\theta }-(\frac{-m\varepsilon ^{2}}{2\theta }-\frac{3m\varepsilon ^{2}}{2(1-\theta )}
)\right|\leqslant Cm\varepsilon ^{3}\theta ^{-1}
\end{align*}
and for every $C'>0$ there is $c$ such that for $|\varepsilon| <c$, the right hand side is smaller than $C'm\varepsilon ^{2}\theta ^{-1}$, 
hence $\gamma _{\varepsilon ,\theta } =-\Theta m\varepsilon ^{2}$ for $c$ sufficiently small and $|\varepsilon |\leqslant c$.   \end{proof}


\section{Variance estimates}
\label{sec:exc}

Let $X$ be some stationary Gaussian field on $\mathbb{R}^{d}$ with spectral measure  $\bm{\mu }$ and reduced covariance function denoted by $C.$ 
We study here the excursion set 
\begin{align*}
E_{u} =\{\t\in \mathbb{R}^{d}: X(\t)\geqslant u\}, u\in \mathbb{R},
\end{align*}
and the  statistic
\begin{align*}
M_{u}^{\gamma }=\int_{\mathbb{R}^{d}}\mathbf{1}_{\{X(\t)>0\}}\gamma ( \t)d\t
\end{align*}
where  $\gamma $ is some measurable {\it window function}, bounded with compact support. Define
\begin{align*}
\hat{\gamma }({\bf x})=\int_{\mathbb{R}^{d}}e^{i \t \cdot {\bf x}   }\gamma (\t)d\t,{\bf x}\in \mathbb{R}^{d},
\end{align*} and $\gamma _{T}(\t)=\gamma (T^{-1}\t),T>0$. 
The nodal variance is
\begin{align*}
V^{\gamma }_{\bm{\mu } }(T)=\text{\rm{\bf Var}}( \Leb( M_{0}^{\gamma _{T} } ) ).
\end{align*}
The most prominent example is the unit sphere indicator $\gamma^{d} =\mathbf{1}_{\{B_{d}(0,1)\}}(\cdot )$, and in this case $\gamma^{d} $ is implicit in the notation $V^{\gamma ^{d}}_{\bm{\mu }}=V_{\bm{\mu }}.$
Recall the notation 
\begin{align*}
{\bf J}_{3 }(\varepsilon )=\sum_{n\in \mathbb{N}\text{\rm{ odd}}}n^{-\frac{ 3}{2} }\mathbb{P}( | {\bf U}_{n} | <\varepsilon ) 
\end{align*}
where $({\bf U}_{n})_{n}$ is the random walk on $\mathbb{R}^{d}$ with increment law $\bm{\mu } .$  Say that $\bm{\mu }$ is $\mathbb{Z} -$free if $\mathbb{P}({\bf U}_{n}=0)=0$ for $n\in \mathbb{N}$ odd.

\begin{theorem}
\label{thm:general-var}Assume $\bm{\mu }$ is $\mathbb{Z} -$free and $\hat\gamma (\t)\geqslant c_{1}>0,\t\in B_{d}(0,4 r)$ for some $r>0$.
\begin{itemize}
\item [(i)]  Then for some $c_{2}>0$, as $T\to \infty ,$
\begin{align}
\label{eq:var-lower}
c_{2}T^{2d}{\bf J}_3 (rT^{-1})\stackrel{\text{\rm{\bf i.o.}}}{\leqslant } V_{\bm{\mu } }^{\gamma }(T).
\end{align} 
\item [(ii)] If in addition for some $c_{3}<\infty $, $|\hat\gamma ({\bf x})|\leqslant c_{3}  \|{\bf x}\| ^{-\frac{d+1}{2}}$ as $\|{\bf x}\|\to \infty ,$
then for some $c_{4}<\infty ,$
\begin{align}
\label{eq:var-upper}
V_{\bm{\mu } }^{\gamma }(T)\leqslant c_{4}(T^{2d}{\bf J}_{3} (rT^{-1})+T^{d-1}\int_{1}^{(T/r)^{d+1} }{\bf J}_{3}(y^{-\frac{1}{d+1}})dy ).
\end{align} 
\item [(iii)] If the hypotheses of (i) and (ii) and Proposition \ref{prop:psi-regular} below are satisfied,  as $T\to \infty ,$
\begin{align*}
V_{\bm{\mu }}^{\gamma }(T)=o(T^{2d}).
\end{align*}
\item [(iv)] If $\bm{\mu } $ has an atom, we have for $u\neq 0$ some finite $c_{5},c_{6}>0$ such that
\begin{align*}
c_{5}T^{2d}\leqslant \text{\rm{Var}}(M_{u}^{\gamma _{T}})\leqslant c_{6}T^{2d}.
\end{align*}
\end{itemize}
\end{theorem}



 



\begin{example}
\label{ex:sphere}
For the unit sphere indicator,
we have
\begin{align*}
\hat\gamma ^{d}({\bf x})=\kappa _{d}|{\bf x}|^{-d/2}B_{d/2}(|{\bf x}|)
\end{align*}
where $B_{a}$ is the  Bessel function of the first kind with parameter $a$ and $\kappa _{d}=\Leb[d](B_{d}(0,1))$. In particular, $\hat\gamma ^{d}({\bf x})\sim \kappa _{d}\Gamma (d/2+1)^{-1}>0$ in $0$ and 
\begin{align*}
\hat \gamma ^{d}({\bf x})\sim \kappa _{d}(2/\pi )^{1/2}|{\bf x}|^{-\frac{d+1}{2}}\cos(|{\bf x}|+\Delta  _{d})
\end{align*}as ${\bf x}\to\infty $, for some $\Delta _{d}\in \mathbb{R}.$  It is known \cite{Elbert01} that the first zero of $B_{a},a\geqslant 1/2$ is larger than the first zero of $B_{1/2}$, which  is $\pi $ , hence we can take $r=\frac{1}{2}$ in the result above.
\end{example}

The terms on the right hand side of \eqref{eq:var-upper} have similar  magnitude  in the regular diophantine case:
\begin{proposition}
\label{prop:psi-regular}
Let $\psi(q)=q^{-\tau }L(q) $ be regular (Definition \ref{def:regular}) and assume $\bm{\mu }$ is of the form \eqref{mu:general} with $\bm{\omega }$ that is $\psi $-BA. Let $\tau ^{*}=\frac{1+d(m+1)}{d+1}$. Then as $T\to \infty ,$
\begin{align*}
\max\left\{T^{2d}{\bf J}_{3}(T^{-1}) , \quad
T^{d-1}\int_{1}^{T^{d+1} }{\bf J}_{3}(y^{-\frac{1}{d+1}})dy\right\} \leqslant \begin{cases}
\Theta T^{d-1}$ if $\psi (q)>q^{-\tau ^{*}}\log(q)^{1/d}\\
\Theta T^{d-1}\ln(T)$ if $\psi (q)=q^{-\tau ^{*}}\\
 \Theta T^{2d}\psi ^{-1}(T^{-1})^{-1-d(m+1)}$ if $\tau >\tau ^{*}
\end{cases}
\end{align*}

\end{proposition}



\begin{remark}
It is likely that the upper bound in $T^{d-1}\ln(T)$ is sharp if $\psi (q)=q^{-\tau ^{*}}$, proving it rigourously would require a lower bound for $v_{T}^{(2)}$ in the proof, which raises some technical difficulties because of the cosine term.
\end{remark}

\begin{proof}According to \eqref{eq:Ib0-upper} in Theorem \ref{thm:dioph-rw}-(i), 
\begin{align*}
{\bf J}_{3}(\varepsilon )\leqslant \Theta \psi ^{-1}(\varepsilon )^{-1-d(m+1)},\varepsilon >0,
\end{align*}
which yields that $T^{2d}{\bf J}_{3}(T^{-1})$ admits an upper bound consistent with the claim.

To deal with the other term, assume without loss of generality that $\psi $ is extended to a  smooth strictly non-increasing function $z^{-\tau }L(z):[a,\infty )\to (0,1]$ for some $a\geqslant 1$, such that $L'(z)=o(z^{-1}L(z))$. Make the change of variables $z=\psi ^{-1}(y^{-\frac{1}{d+1}})$, i.e. $\psi (z)^{-d-1}=y$, $Z=\psi ^{-1}(T^{-1})\leqslant \Theta \psi ^{-1}(T^{-1}),$
\begin{align*}
\int_{a}^{T^{d+1} }{\bf J}_{3}(y^{-\frac{1}{d+1}})dy\leqslant \Theta \int_{a}^{T^{d+1}}\psi ^{-1}(y^{-\frac{1}{d+1}})^{-1-d(m+1)}dy=\Theta \int_{\Theta }^{Z}z^{-1-d(m+1)}(\psi (z)^{-d-1})'dz.
\end{align*}
The hypotheses on $\psi $ yield
\begin{align}
\notag
(\psi (z)^{-d-1})'=&(d+1)(\tau z^{-\tau -1} L(z)-z^{-\tau }L'(z))\psi (z)^{-d-2}=(d+1)(\tau z^{-1}\psi (z)-z^{-\tau }o(z^{-1}L(z)))\psi (z)^{-d-2}\\
\label{eq:psi}\sim_{z\to \infty }& (d+1)\tau z^{-1}\psi (z)^{-d-1}.
\end{align}
In the case $\tau \leqslant \tau ^{*}$, the previous two displays yield
\begin{align*}
\int_{a}^{T^{d+1} }{\bf J}_{3}(y^{-\frac{1}{d+1}})dy\leqslant \Theta \int_{\Theta }^Zz^{-2-d(m+1)}\psi (z)^{-(d+1)}dz
\end{align*}
and the integral converges if $\psi (q)>q^{-\tau ^{*}}\ln(q)^{1/d}$, and if $\psi (q)=q^{-\tau ^{*}}$ it behaves in $\ln(Z)=\Theta \ln(T)$.

Let us turn to the case $\tau >\tau ^{*}$.  Let $\tau '\in (\tau ^{*},\tau )$, we have by \eqref{eq:psi} as $z\to \infty $
\begin{align*}
(z^{-1-d(m+1)}\psi (z)^{-d-1})'=&z^{-1-d(m+1)}(\psi (z)^{-d-1})'-(1+d(m+1))z^{-2-d(m+1)}\psi (z)^{-d-1}\\
\geqslant & z^{-1-d(m+1)}(\psi (z)^{-d-1})'-\frac{ 1+d(m+1)}{d+1}z^{-1-d(m+1)}(\psi (z)^{-d-1})'\\
\geqslant &z^{-1-d(m+1)}(\psi (z)^{-d-1})'(1-\frac{\tau *}{\tau ' })
\end{align*}
which results in 
\begin{align*}
\int_{a}^{T^{d+1} }{\bf J}_{3}(y^{-\frac{1}{d+1}})dy\leqslant \frac{\Theta }{1-\tau ^{*}/\tau '}[z^{-1-d(m+1)}\psi (z)^{-d-1}]_{\Theta }^{Z}=\Theta \psi ^{-1}(T^{-1})^{-1-d(m+1)}T^{d+1}
\end{align*}
which allows to conclude.
\end{proof}

 


 \begin{proof}[Proof of Theorem \ref{thm:general-var}]

The starting point is the following lemma, available for instance partially in \cite[Lemma 2]{BST}.
\begin{lemma}
\label{lm:cov-ind}
We have for every $u\in \mathbb{R}$ coefficients $\alpha_{n,u}\geqslant 0,n\in \mathbb{N} $ such that for two standard gaussian variables $X,Y$ with correlation $\rho $
\begin{align}
\label{eq:cov-indic}
\Gamma _{u}(\rho ):=\text{\rm{Cov}}( \mathbf{1}_{\{X>u\}},\mathbf{1}_{\{Y>u\}})=\sum_{n=0}^{\infty }\alpha_{n,u}\rho ^{n} =\frac{1}{2\pi }\int_{0}^{\rho }\frac{1}{\sqrt{1-r^{2}}}\exp\left(
-\frac{u^{2}}{1+r}
\right)dr
\end{align}
in particular,  $ \Gamma_{0}(\rho )=\text{\rm{arcsin}}(\rho ) $  with $\alpha_{2n,0}=0$ and $$\alpha _{2n+1}:=\alpha_{2n+1,0}=\frac{{n\choose 2n}}{4^{n}(2n+1)}=\Theta n^{-3/2}.$$
For $u\neq 0,\alpha _{2,u}+\alpha _{4,u}>0.$
\end{lemma}
\begin{proof}
The result is a consequence of the proof of \cite[Lemma 2]{BST}. 
 Denoting by $\Phi ^{(k)}$ the $k$-th order derivative of the Gaussian distribution function, it is shown there that \eqref{eq:cov-indic} is true with
\begin{align*}
\alpha _{k,u}=\frac{\Phi^{(k)}(u)^{2}}{k!},
\end{align*}hence for instance $\alpha_{2,u}=0$ only if $u\in \{0,3\}$, and $\alpha _{4,3}>0$, which yields that for $u\neq 0$, $\alpha _{2,u}+\alpha _{4,u}>0.$
For $u=0$ we have the explicit decomposition of the arcsine function with 
\begin{align*}
\Gamma _{0}(\rho )=\arcsin(\rho )=\sum_{n=0}^{\infty }\alpha _{2n+1}\rho ^{2n+1}\text{\rm{ with }}\alpha_{2n+1}=\frac{{2n \choose n}}{4^{n}(2n+1)}\sim_{n\to \infty } \frac{1}{\sqrt{\pi n}(2n+1)}.
\end{align*}
\end{proof}
Let ${\bf U}_{n}=\sum_{i=1}^{n}X_{i}$ where the $X_{i}$ are independent and identically distributed with law $\bm{\mu } .$ 
Recall the Fourier inversion formula
\begin{align*}
\gamma (\t)=(2\pi )^{-d}\int_{}\widehat{\gamma (\t)}e^{i  \t \cdot {\bf x}   }d{\bf x},\t\in \mathbb{R}^{d}.
\end{align*}
Denote by $\gamma ^{\star 2}$ the auto-convolution of $\gamma $ with itself, and by $\bm{\mu } ^{*(n)}$ the $n$-fold convolution of the probability measure $\bm{\mu }$ with itself, which is the law of ${\bf U}_{n}$.
We have by Lemma \ref{lm:cov-ind}  
\begin{align}
\label{eq:var-comput}
V_{\bm{\mu } }(T)=&\int_{(\mathbb{R}^{d})^{2}}\Gamma _{u}(C(\t-{\bf s}))\gamma  (\t/T)\gamma  ({\bf s}/T)d\t d{\bf s} \\
\notag=&\int_{(\mathbb{R}^{d})^{2}}\Gamma _{u}(C({\bf z}))\gamma \left(
\frac{{\bf z}+\t}{2T}
\right)\gamma  \left(
\frac{\t-{\bf z}}{2T}
\right)d\t d{\bf z}\\
\notag=&\int_{\mathbb{R}^{d}}\Gamma _{u}(C({\bf z}))\gamma _{2T}^{\star 2}(2{\bf z})d{\bf z}\\
\notag=&\sum_{n\in \mathbb{N}}\alpha _{n,u}\int_{}C({\bf z})^{n}\gamma _{ 2T}^{\star 2}(2{\bf z})d{\bf z}\\
\notag=&\sum_{n\in \mathbb{N}}\alpha _{n,u}\int_{} \bm{\mu } ^{*(n)}(d{\bf z})\hat\gamma _{ 2T}(2{\bf z})^{2}d{\bf z}\text{\rm{ using \eqref
{eq:def-spectral}}}\\
\notag=&\sum_{n\in \mathbb{N}}\alpha _{n,u}\int_{}\bm{\mu } ^{*(n)}(d{\bf z})(2T)^{2d}\hat \gamma  (4T{\bf z})^{2}d{\bf z}\\
\notag=&(2T)^{2d}\sum_{n\in \mathbb{N}}\alpha _{n}\mathbb{E}(\hat\gamma  (4T{\bf U}_{n})^{2})\\
\notag=& 2^{2d}(v_{T} ^{(1)}+v_{T} ^{(2)})
\end{align}
where, with $A_{1}=[0,r],A_{2}=]r ,\infty ]$
\begin{align*}
v_{T}^{(i)}=T^{2d}\sum_{n\in \mathbb{N}} \alpha _{n,u}\mathbb{E}(\hat\gamma (4T{\bf U}_{n})^{2}\mathbf{1}_{\{\|T{\bf U}_{n}\|\in A_{i}\}}).
\end{align*}
 

  For the case $u\neq 0$, we simply have according to Lemma \ref{lm:cov-ind} $\alpha _{2,u}+\alpha _{4,u}>0$, hence
\begin{align*}
V_{\bm{\mu }}(T)\geqslant 2^{2d}v_{T}^{(1)}\geqslant T^{2d}(\alpha _{2,u}\mathbb{P}({\bf U}_{2}=0)+\alpha _{4,u}\mathbb{P}({\bf U}_{4}=0))\hat\gamma _{d}(0)^{2}>0.
\end{align*}

Let us now focus on the case $u=0,\alpha _{n}=\alpha _{n,u}=\Theta n^{-3/2}\mathbf{1}_{\{n\text{\rm{ odd}}\}}$, and estimate $v_{T}^{(1)}$. Remark first that since $\bm{\mu }$ is $\mathbb{Z} $-free, $\mathbb{P}({\bf U}_{n}=0)=0$ for $n$ odd, and since by hypothesis $C\geqslant \hat \gamma (\t)\geqslant c>0$ on $B_{d}(0,4r)$ for some $r\in (0,1)$,
\begin{align*}
v_{T}^{(1)}= &T^{2d}\sum_{n \text{\rm{ odd}}}\Theta n^{-3/2}\mathbb{P}( \| {\bf U}_{n} \| <rT^{-1})=\Theta T^{2d}{\bf J}_{3}(rT^{-1})
\end{align*}
hence \eqref{eq:var-lower} is proved.


For the second point, the second term satisfies
\begin{align*}
v_{T}^{(2)}\leqslant & T^{2d}\sum_{n\text{\rm{ odd}}}\Theta n^{-3/2}\mathbb{E}( \|T{\bf U}_{n}\| ^{-d-1}\mathbf{1}_{\{|T{\bf U}_{n}|>r\}}) \\
\leqslant & T^{2d}\sum_{n\text{\rm{ odd}}}\Theta n^{-3/2}\int_{0}^{r^{-d-1} }\mathbb{P}((T\|{\bf U}_{n}\|)^{-d-1}>y)dy\\
\leqslant &\Theta T^{2d}T^{-d-1}\sum_{n\text{\rm{ odd}}}n^{-3/2}\int_{0}^{(T/r)^{d+1}} \mathbb{P}(\|{\bf U}_{n}\|<y^{-\frac{1}{d+1}}) dy\\
=&\Theta T^{d-1}\int_{1}^{(T/r)^{d+1}}{\bf J}_{3}(y^{-\frac{1}{d+1}})dy.
\end{align*}
Point (iii) is a consequence of Proposition \ref{prop:psi-regular} and the fact that $\psi^{-1} $ converges to $0$ in $0$.

\end{proof} 

\section*{Acknowledgements}
I am indebted to M. A. Klatt, with whom I had many discussions about hyperuniformity and Gaussian excursions. I also wish to thank S. Torquato for comments on the final manuscript.
I am particularly grateful to Yann Bugeaud for insights about diophantine approximation. 

This study was supported by the IdEx Universit\'e de Paris, ANR-18-IDEX-0001.



    
\bibliographystyle{plain}
