\section{Introduction and statement of results}
\label{sec:intro}}

The \emph{Riemann zeta function} is a central
object of study in analytic number theory. In terms of 
the complex parameter $s=\sigma+it$, the zeta function is defined in the
half-plane $\sigma>1$ by two equivalent expressions:
$$
\zeta(s)\defeq\sum_{n\ge 1} n^{-s}
=\prod_{p\text{~prime}}(1-p^{-s})^{-1}.
$$
Riemann~\cite{Riemann} showed
that $\zeta(s)$ extends analytically to a meromorphic
function in the whole complex plane, its only singularity being a
simple pole at $s=1$. Moreover, the zeta function
satisfies a functional equation relating its values at
$s$ and $1-s$.\footnote{There are many excellent accounts of the
theory of the Riemann zeta function; we refer the reader to 
Titchmarsh~\cite{Titchmarsh} and to Borwein \emph{et al}~\cite{Borwein}
for essential background.}
The \emph{Riemann Hypothesis} (RH) asserts that if $\rho=\beta+i\gamma$
is a zero of $\zeta(s)$ with real part $\beta>0$, then $\beta=\frac12$.

More generally, for a Dirichlet character $\chi\bmod q$,
the Dirichlet \text{$L$-function} $L(s,\chi)$ is defined 
for $\sigma>1$ by:
$$
L(s,\chi)\defeq\sum_{n\ge 1} \chi(n)n^{-s}
=\prod_{p\text{~prime}}(1-\chi(p)p^{-s})^{-1}.
$$
The function $L(s,\chi)$ extends to a meromorphic
function (which is entire if $\chi$ is nonprincipal),
and when $\chi$ is primitive
it satisfies a simple functional equation relating its values at
$s$ and $1-s$; see, e.g., Bump~\cite[Chapter~1]{Bump}.
The \emph{Generalized Riemann Hypothesis} (GRH), which was perhaps first
formulated by Piltz in 1884 (see Davenport~\cite{Daven}), asserts that 
if $\rho=\beta+i\gamma$ is a zero of $L(s,\chi)$ with
$\beta>0$, then $\beta=\frac12$.

For any \emph{principal} character $\chi_0\bmod q$ one has
$$
L(s,\chi_0)=\zeta(s)\prod_{p\,\mid\,q}(1-p^{-s}),
$$
hence RH is equivalent to GRH for $L(s,\chi_0)$. On the other hand,
for \emph{nonprincipal} characters $\chi$, no direct relationship between
RH and GRH for $L(s,\chi)$ has been previously established. To establish
such a connection, we study the following weak form of the GRH
for Dirichlet $L$-functions.

\bigskip\noindent{\sc Hypothesis ${\rm GRH}[\beta_0]$}:
{\it Given $\beta_0\in[\frac12,1)$, the
inequality $\beta\le\beta_0$ holds for all zeros $\rho=\beta+i\gamma$ of
an arbitrary Dirichlet $L$-function $L(s,\chi)$.}

\bigskip\noindent
Note that ${\rm GRH}[\tfrac12]$ is equivalent to that assertion that GRH
holds for all Dirichlet \text{$L$-functions}.
In the present paper, we show that hypothesis ${\rm GRH}[\frac{9}{10}]$
can be reformulated entirely in terms of certain distributional
properties of the zeros of the Riemann zeta function.

To state our results, we introduce some notation. If $T>0$ is not the
ordinate of a zero of the zeta function, then $N(T)$ is used to denote the number
of zeros $\rho=\beta+i\gamma$ of $\zeta(s)$ in the rectangle $0<\beta<1$,
$0<\gamma<T$, and we define
$$
S(T)\defeq\frac1\pi{\rm arg}\,\zeta(1/2+iT).
$$
If $\gamma>0$ is the ordinate of a zero, then we set
$$
N(\gamma)\defeq\frac12\{N(\gamma^+)+N(\gamma^-)\},\qquad
S(\gamma)\defeq\frac12\{S(\gamma^+)+S(\gamma^-)\}.
$$
Using an explicit form of the well known relation
(see, e.g., Montgomery and Vaughan\cite[Corollary 14.2]{MontVau})
\begin{equation}\label{eq:NTSTrelation}
N(T)=\frac{T}{2\pi}\log\frac{T}{2\pi}-\frac{T}{2\pi}+\frac{7}{8}
+S(T)+O(T^{-1})\qquad(T>0),
\end{equation}
one sees that the difference $S(\gamma^+)-S(\gamma^-)$ is an integer
for every zero $\rho=\beta+i\gamma$ of $\zeta(s)$ with $\gamma>0$. Extending
the definition of $S(T)$ appropriately, this also holds for complex zeros
with $\gamma<0$. Therefore, writing
$$
\e(u)\defeq \mathrm{e}^{2\pi iu}\qquad(u\in\R),
$$
we can unambiguously define
\begin{equation}\label{eq:Zrho-defn}
\EuScript{Z}(\rho)\defeq\lim\limits_{T\to\gamma}\overline{\e\big(S(T)\big)}
\end{equation}
(the common value of the left and right limits)
for every complex zero $\rho$ of $\zeta(s)$.

Our main results are as follows.
Throughout the paper, we use $C_c^\infty(\R^+)$ to denote the space of smooth
functions $f:\R^+\to\C$ with compact support in $\R^+$.

\bigskip

\begin{theorem}\label{thm:RHvsGRH}
Assume RH. Suppose that for every function $\EuScript{B}\in C_c^\infty(\R^+)$
and every rational number $\xi\in\Q\cap(0,1)$, the bound
\begin{equation}\label{eq:superbound}
\sum_{\rho=\frac12+i\gamma}\xi^{-i\gamma}\,\EuScript{Z}(\rho)
\,\EuScript{B}\Big(\frac{\gamma}{2\pi X}\Big)
\,\mathop{\ll}_{\xi,\EuScript{B},\eps}\,X^{9/10+\eps}
\end{equation}
holds for any $\eps>0$, where the sum runs over all
complex zeros $\rho=\frac12+i\gamma$ of $\zeta(s)$,
the quantity $\EuScript{Z}(\rho)$ is given by \eqref{eq:Zrho-defn},
and the implied constant depends only on
$\xi$, $\EuScript{B}$ and $\eps$. Then, the hypothesis ${\rm GRH}[\frac{9}{10}]$ is true.
\end{theorem}

We reiterate that the hypotheses of Theorem~\ref{thm:RHvsGRH}
involve only properties of the zeros of the Riemann zeta function.
\emph{No conditions are imposed on the zeros
of nonprincipal Dirichlet $L$-functions}.

We also have the following converse of Theorem~\ref{thm:RHvsGRH}.

\begin{theorem}\label{thm:RHvsGRH2}
Assume RH. If ${\rm GRH}[\frac{9}{10}]$ is true, then
for every $\EuScript{B}\in C_c^\infty(\R^+)$ and 
every $\xi\in\Q\cap(0,1)$, the bound \eqref{eq:superbound}
holds for any $\eps>0$ with an implied constant that depends only on
$\xi$, $\EuScript{B}$ and $\eps$.
\end{theorem}

In view of Theorem~\ref{thm:RHvsGRH2}, it is natural to expect that the bound
\eqref{eq:superbound} holds for all $\EuScript{B}\in C_c^\infty(\R^+)$ and 
$\xi\in\Q\cap(0,1)$; we conjecture that this is the case.

{\large\section{Approach}}

Using the explicit formula and assuming RH, we show that a sum of the form
\begin{equation}\label{eq:einstein}
\sum_{n\ge 1}\Lambda(n)\,\e(-n\xi)\,\EuScript{B}(n/X)
\end{equation}
with $\xi>0$ and $\EuScript{B}\in C_c^\infty(\R^+)$ is
equal to
\begin{equation}\label{eq:feynman}
-\ssum{\rho=\frac12+i\gamma}\xi^{-1/2-i\gamma}
\EuScript{Z}(\rho)\EuScript{B}\Big(\frac{\gamma}{2\pi\xi X}\Big)
\end{equation}
up to an error of at most $O_{\xi,\EuScript{B}}(X^{9/10})$;
see Theorem~\ref{thm:vonMangoldt-twist}.
To handle the integrals that
arise in our use of the explicit formula, we apply the method of the
stationary phase (however, some care is needed to
obtain adequate and explicit estimates for the error terms);
see Lemma~\ref{lem:the-child}, which is the main workhorse for
the proof of Theorem~\ref{thm:vonMangoldt-twist}.

Given the close relationship (under RH) between the sums \eqref{eq:einstein}
and \eqref{eq:feynman}, the bound \eqref{eq:superbound} for
rational numbers $\xi\in\Q\cap(0,1)$ allows us to deduce an equally strong bound
\begin{equation}\label{eq:thorne}
\sum_{n\ge 1}\Lambda(n)\chi(n)\EuScript{B}(n/X)
\,\mathop{\ll}_{q,\EuScript{B},\eps}\,X^{9/10+\eps}
\end{equation}
for any primitive Dirichlet character $\chi$ modulo $q>1$;
see \S\ref{sec:pfThm1}. Since $\EuScript{B}\in C_c^\infty(\R^+)$ is arbitrary,
${\rm GRH}[\frac{9}{10}]$ follows for $L(s,\chi)$.
Conversely, under ${\rm GRH}[\frac{9}{10}]$, we see that \eqref{eq:thorne} holds for every
primitive character $\chi\bmod q$. This leads to similar bounds on
the sums \eqref{eq:einstein} and \eqref{eq:feynman}; see \S\ref{sec:pfThm2}.

\bigskip

{\large\section{Integral bounds}
\label{sec:integralbounds}}

In this section, we establish certain integral bounds that are needed
in the proof of Theorem~\ref{thm:vonMangoldt-twist} (see
\S\ref{sec:vonMangoldt-twist}).

\bigskip

\begin{lemma}\label{lem:mandalorian}
Let $\xi>0$, $\EuScript{B}\in C_c^\infty(\R^+)$, and $X>10$. Then
$$
\int_{\R^+}\Big(1-\frac{1}{u^3-u}\Big)\e(-u\xi)\EuScript{B}(u/X)\,du
\,\mathop{\ll}_{\xi,\EuScript{B}}\,X^{-1},
$$
where the implied constant depends only on $\xi$ and $\EuScript{B}$.
\end{lemma}

\begin{proof}
Put
$$
g(u)\defeq\Big(1-\frac{1}{u^3-u}\Big)\EuScript{B}\Big(\frac{u}{X}\Big)
\qquad(u\in\R^+).
$$
Then $g$ and all of its derivatives are smooth
and supported on the set $X\,\text{\rm supp}(\EuScript{B})$.
In particular, $g''(u)=0$ unless $u\,\mathop{\asymp}_\EuScript{B}\, X$, in
which case one has $g''(u)\,\mathop{\ll}_\EuScript{B}\,X^{-2}$. 
Integrating by parts twice, we have (since $g$ and $g'$ vanish at $0$ and $\infty$)
$$
\int_{\R^+}\e(-u\xi)g(u)\,du
=\int_{\R^+}
\frac{\e(-u\xi)}{(-2\pi i\xi)^2}\,g''(u)\,du
\,\mathop{\ll}_\EuScript{B}\,\xi^{-2}X^{-2}
\,{\rm meas}\big(X\,\text{\rm supp}(\EuScript{B})\big),
$$
and the lemma follows.
\end{proof}

The next two technical lemmas are needed in the proof of
Lemma~\ref{lem:the-child} below.

\begin{lemma}\label{lem:technical}
Fix $u_0\in\R^+$, and let $\cL,\cD:C_c^\infty(\R^+)\to C_c^\infty(\R^+)$
be the linear operators defined by
$$
\cL F(u)\defeq\frac{uF(u)}{(u_0-u)}
\mand
\cD F(u)\defeq F'(u)\qquad(u\in\R^+).
$$
For any integer $k\ge 0$, let $(\cD\cL)^k$ and $\cL(\cD\cL)^k$ be the linear
operators given by
$$
[\cD\cL]^k\defeq
\mathop{\underbrace{~\cD\circ\cL\circ\cdots\circ\cD\circ\cL~}}
\limits_{\text{\rm $k$ copies each of $\cD$ and $\cL$}}
\mand
\cL[\cD\cL]^k\defeq\cL\circ[\cD\cL]^k.
$$
Then for every $F\in C_c^\infty(\R^+)$ and every integer $k\ge 0$ we have
\dalign{
[\cD\cL]^kF(u)&\,\mathop{\ll}_{F,k}\,
\max\big\{|u-u_0|^{-k},|u-u_0|^{-2k}\big\},\\
\cL[\cD\cL]^kF(u)&\,\mathop{\ll}_{F,k}\,
\max\big\{|u-u_0|^{-k},|u-u_0|^{-2k-1}\big\},
}
for all $u\in\R^+$, $u\ne u_0$, where the implied constants depend
only on $F$ and $k$.
\end{lemma}

\begin{proof}
Let $F\in C_c^\infty(\R^+)$ be fixed in what follows.
For any integers $A,B\ge 0$ and a real number $C>0$,
let $\EuScript{V}(A,B,C)$ denote the set of functions $G\in C_c^\infty(\R^+)$
of the form
$$
G(u)=\ssum{h,i,j\ge 0\\h\le A\le j\\i+j=h+B}
c_{h,i,j}\frac{u^hF^{(i)}(u)}{(u_0-u)^j},
$$
where the sum runs over nonnegative integers $h,i,j$,
and the coefficients $c_{h,i,j}$ are complex numbers
satisfying $|c_{h,i,j}|\le C$. If $F$ is supported on the
interval $[a,b]$, where $0<a<b<\infty$, then the trivial bound
\begin{equation}\label{eq:eureka0}
\big|G(u)\big|\le C'_{A,B}\,C\max\{b^A,1\}
\max\limits_{0\le i\le A+B}\big|F^{(i)}(u)\big|
\max_{A\le j\le A+B}|u-u_0|^{-j}
\end{equation}
holds for all $G\in\EuScript{V}(A,B,C)$, where
$$
C'_{A,B}\defeq\big|\{h,i,j\ge 0:h\le A\le j,~i+j=h+B\}\big|
\le\frac12(A+1)(A+2B+2).
$$

Next, noting that
$$
\cL G(u)=\ssum{h,i,j\ge 0\\h\le A\le j\\i+j=h+B}c_{h,i,j}
\frac{u^{h+1}F^{(i)}(u)}{(u_0-u)^{j+1}},
$$
it follows that
\begin{equation}\label{eq:eureka1}
\cL:\EuScript{V}(A,B,C)\to\EuScript{V}(A+1,B,C).
\end{equation}
Similarly, since
$$
\cD G(u)=\ssum{h,i,j\ge 0\\h\le A\le j\\i+j=h+B}c_{h,i,j}
\bigg\{\frac{hu^{h-1}F^{(i)}(u)}{(u_0-u)^j}
+\frac{u^hF^{(i+1)}(u)}{(u_0-u)^j}
-\frac{ju^hF^{(i)}(u)}{(u_0-u)^{j+1}}\bigg\},
$$
we see that
\begin{equation}\label{eq:eureka2}
\cD:\EuScript{V}(A,B,C)\to\EuScript{V}\big(A,B+1,(2A+B+1)C\big).
\end{equation}

Observe that $F$ itself lies in $\EuScript{V}(0,0,1)$. Therefore,
an inductive argument using \eqref{eq:eureka1} and \eqref{eq:eureka2} shows that
for every integer $k\ge 0$ we have
$$
[\cD\cL]^kF\in\EuScript{V}(k,k,k!\cdot 3^k)
\mand
\cL[\cD\cL]^kF\in\EuScript{V}(k+1,k,k!\cdot 3^k).
$$
Using \eqref{eq:eureka0}, the result follows.
\end{proof}

\begin{lemma}\label{lem:funnyexpint}
For any positive number $\lambda$, we have
$$
\mathop{\int_\R}_{(|u|>\lambda)}\mathrm{e}^{-iu^2}\,du
=\frac{\mathrm{e}^{-i\lambda^2}}{i\lambda}+i
\mathop{\int_\R}_{(|u|>\lambda)}\mathrm{e}^{-iu^2} u^{-2}\,du
\ll\lambda^{-1}.
$$
\end{lemma}

The next result is our primary tool; its proof is based on the well known
stationary phase method.

\begin{lemma}\label{lem:the-child}
Let $\xi>0$, $\EuScript{B}\in C_c^\infty(\R^+)$, and $X>10$. Suppose
 $\EuScript{B}$ is supported on the interval $[a,b]$, where $0<a<b<\infty$.
For any real number $\gamma\ne 0$, consider the integral $\cI(\gamma)$
defined by
$$
\cI(\gamma)\defeq\int_{\R^+}\e(-u\xi)\EuScript{B}(u/X)u^{-1/2+i\gamma}\,du.
$$
Put
\begin{equation}\label{eq:ast-bst-defn}
a_\star\defeq\frac{1+2a-\sqrt{1+4a}}{2},\qquad
b_\star\defeq\frac{1+2b+\sqrt{1+4b}}{2},\qquad
\gamma_\star\defeq\frac{\gamma}{2\pi\xi X}.
\end{equation}
Then, for $\gamma_\star\not\in[a_\star,b_\star]$ we have
$$
\cI(\gamma)\,\mathop{\ll}_{\xi,\EuScript{B}}\,X^{1/2}
\max\big\{X^{-2}|\gamma|^{-2},|\gamma|^{-4}\big\},
$$
where the implied constant depends only on $\xi$ and $\EuScript{B}$. 
On the other hand, for $\gamma_\star\in[a_\star,b_\star]$ we have
$$
\cI(\gamma)=\xi^{-1/2-i\gamma}
\e\Big(\frac{\gamma}{2\pi}\log\frac{\gamma}{2\pi\mathrm{e}}+\frac78\Big)
\EuScript{B}(\gamma_\star)+O_{\xi,\EuScript{B}}(X^{-1/10}),
$$
where the implied constant depends only on $\xi$ and $\EuScript{B}$.
\end{lemma}

\begin{proof}
Making the change of variables $u\mapsto Xu$, we have
\begin{equation}\label{eq:solar1}
\cI(\gamma)=X^{1/2+i\gamma}\int_{\R^+}\mathrm{e}^{iXf(u)}g(u)\,du
=X^{1/2+i\gamma}\,\cJ\quad\text{(say)},
\end{equation}
where
$$
f(u)\defeq -2\pi\xi u+\frac{\gamma\log u}{X},\qquad
g(u)\defeq \frac{\EuScript{B}(u)}{u^{1/2}}.
$$
Note that $\gamma_\star=\gamma/(2\pi\xi X)$
is the only real number for which $f'(\gamma_\star)=0$.

For any given $\Delta>0$, we write
$\cJ=\cJ_\infty+\cJ_\star$
with
$$
\cJ_\infty\defeq\mathop{\int_{\R^+}}_{(|u-\gamma_\star|>\Delta)}
\mathrm{e}^{iXf(u)}g(u)\,du,\qquad
\cJ_\star\defeq\mathop{\int_{\R^+}}_{(|u-\gamma_\star|\le\Delta)}
\mathrm{e}^{iXf(u)}g(u)\,du.
$$
We study $\cJ_\infty$ first.
Let $\cL$ and $\cD$ be the operators defined in
Lemma~\ref{lem:technical} with $u_0\defeq\gamma_\star$,
and put
$$
g_k\defeq [\cD\cL]^kg
\mand
\tilde g_k\defeq \cL[\cD\cL]^kg\qquad(k\ge 0).
$$
According to Lemma~\ref{lem:technical},
\begin{equation}\label{eq:signals}
g_k(u)\,\mathop{\ll}_{\EuScript{B},k}\,
\max\big\{|u-\gamma_\star|^{-k},|u-\gamma_\star|^{-2k}\big\}
\qquad(u\ne\gamma_\star).
\end{equation}
Taking into account that $f'(u)=2\pi\xi u^{-1}(\gamma_\star-u)$, we have
$$
\cJ_\infty=\frac{1}{2\pi\xi}\mathop{\int_{\R^+}}_{(|u-\gamma_\star|>\Delta)}
\mathrm{e}^{iXf(u)}f'(u)\cdot\tilde g_0(u)\,du
=-\frac{1}{2\pi i\xi X}\mathop{\int_{\R^+}}_{(|u-\gamma_\star|>\Delta)}
\mathrm{e}^{iXf(u)} g_1(u)\,du,
$$
where we have used integration by parts in the last step.
Similarly, by induction on $k$, we see that
\begin{equation}\label{eq:signals2}
\cJ_\infty=\frac{1}{(-2\pi i\xi X)^k}\mathop{\int_{\R^+}}_{(|u-\gamma_\star|>\Delta)}
\mathrm{e}^{iXf(u)} g_k(u)\,du.
\end{equation}

The numbers $a_\star$ and $b_\star$ defined in \eqref{eq:ast-bst-defn} have
the property that if $\gamma_\star\not\in[a_\star,b_\star]$, then
$|u-\gamma_\star|>|\gamma_\star|^{1/2}$ for all $u\in[a,b]$. Hence, choosing
$\Delta\defeq|\gamma_\star|^{1/2}$ in the case that
$\gamma_\star\not\in[a_\star,b_\star]$, it follows that $\cJ_\infty=\cJ$
and $\cJ_\star=0$. Setting $k\defeq 4$ and combining \eqref{eq:signals}
and \eqref{eq:signals2}, we derive the bound
$$
\cJ\,\mathop{\ll}_\EuScript{B}\,(\xi X)^{-4}
\max\big\{|\gamma_\star|^{-2},|\gamma_\star|^{-4}\big\}
\ll\max\big\{(\xi X)^{-2}|\gamma|^{-2},|\gamma|^{-4}\big\}
$$
In view of \eqref{eq:solar1}, we obtain the first statement of the lemma.

From now on, we assume that $\gamma_\star\in[a_\star,b_\star]$.
We further assume that
$X$ is large enough (depending on $\EuScript{B}$) so that
\begin{equation}\label{eq:Delta-constraint}
\Delta\defeq X^{-2/5}<\min\{1,2^{-1/2}a_\star\}.
\end{equation}
Write $\cJ=\cJ_\infty+\cJ_\star$ as before with this $\Delta$.
Setting $k\defeq 5$ (say) and combining \eqref{eq:signals}
and \eqref{eq:signals2}, we derive the bound
\begin{equation}\label{eq:solar2}
\cJ_\infty\,\mathop{\ll}_{\xi,\EuScript{B}}\,X^{-1}.
\end{equation}

Turning to the estimate of $\cJ_\star$, observe that the upper bound
\eqref{eq:Delta-constraint} implies that the interval
$\Omega_\Delta\defeq[\gamma_\star-\Delta,\gamma_\star+\Delta]$ lies
entirely inside $\R^+$; in particular, 
$$
\cJ_\star\defeq\int_{\Omega_\Delta}\mathrm{e}^{iXf(u)}g(u)\,du.
$$
Since $\gamma_\star\in[a_\star,b_\star]$ (and thus,
$\gamma_\star\,\mathop{\asymp}_\EuScript{B}\,1)$, the estimate
$$
f'''(u)=\frac{4\pi\xi\gamma_\star}{u^3}\,\mathop{\asymp}_\EuScript{B}\,\xi
$$
holds uniformly
for all $u\in\Omega_\Delta$, hence by Taylor's approximation we have
$$
\mathrm{e}^{iXf(u)}=\mathrm{e}^{iX\{f(\gamma_\star)
+\frac12f''(\gamma_\star)(u-\gamma_\star)^2\}}(1+r_1(u))
$$
for some complex function $r_1$ such that
$$
r_1(u)\,\mathop{\ll}_{\xi,\EuScript{B}}\,X|u-\gamma_\star|^3
\qquad(u\in\Omega_\Delta).
$$
We can also write
$$
g(u)=g(\gamma_\star)+r_2(u),
$$
where $r_2$ satisfies the bound
$$
r_2(u)\,\mathop{\ll}_{\xi,\EuScript{B}}\,|u-\gamma_\star|\qquad(u\in\Omega_\Delta).
$$
Therefore, since
\dalign{
\int_{\Omega_\Delta}\big|r_1(u)\big|\,du
&\,\mathop{\ll}_{\xi,\EuScript{B}}\,X\int_{\gamma_\star-\Delta}^{\gamma_\star+\Delta}
|u-\gamma_\star|^3\,du\ll X\Delta^4,\\
\int_{\Omega_\Delta}\big|r_2(u)\big|\,du
&\,\mathop{\ll}_{\xi,\EuScript{B}}\,\int_{\gamma_\star-\Delta}^{\gamma_\star+\Delta}
|u-\gamma_\star|\,du\ll\Delta^2,
}
and $\Delta^2\ll X\Delta^4=X^{-3/5}$ by \eqref{eq:Delta-constraint},
we derive the estimate
\begin{equation}
\label{eq:solar3}
\begin{split}
\cJ_\star
&=\int_{\Omega_\Delta}\mathrm{e}^{iX\{f(\gamma_\star)
+\frac12f''(\gamma_\star)(u-\gamma_\star)^2\}}(1+r_1(u))
\,(g(\gamma_\star)+r_2(u))\,du\\
&=\mathrm{e}^{-i\gamma}\gamma_\star^{-1/2+i\gamma}\EuScript{B}(\gamma_\star)
\int_{\Omega_\Delta}
\mathrm{e}^{-\pi i\xi X\gamma_\star^{-1}(u-\gamma_\star)^2}\,du
+O_{\xi,\EuScript{B}}(X^{-3/5}),
\end{split}
\end{equation}
where in the last step we used the identities
$$
Xf(\gamma_\star)=-\gamma+\gamma\log\gamma_\star,\qquad
f''(\gamma_\star)=-2\pi\xi\gamma_\star^{-1},\qquad
g(\gamma_\star)\defeq \gamma_\star^{-1/2}\EuScript{B}(\gamma_\star).
$$

Next, we extend the range of integration
in the preceding integral to all of $\R$ (with
an acceptable error). Consider the integral
$$
\cK\defeq\mathop{\int_\R}_{(u\not\in\Omega_\Delta)}
\mathrm{e}^{-\pi i\xi X\gamma_\star^{-1}(u-\gamma_\star)^2}\,du.
$$
Making the change of variables $u\mapsto c\,u+\gamma_\star$,
where $c\defeq\sqrt{\gamma_\star/(\pi\xi X)}$, and applying
Lemma~\ref{lem:funnyexpint}, we have
$$
\cK=c\mathop{\int_\R}_{(|u|>\Delta/c)}
\mathrm{e}^{-iu^2}\,du\ll\,c^2\Delta^{-1}\,\mathop{\ll}_{\xi,\EuScript{B}}\,X^{-3/5}.
$$
Using this bound together with \eqref{eq:solar3}, it follows that
$$
\cJ_\star=\mathrm{e}^{-i\gamma}\gamma_\star^{-1/2+i\gamma}\EuScript{B}(\gamma_\star)
\int_\R\mathrm{e}^{-\pi i\xi X\gamma_\star^{-1}(u-\gamma_\star)^2}\,du
+O_{\xi,\EuScript{B}}(X^{-3/5}).
$$

Combining the previous bound with \eqref{eq:solar2}, we have
\begin{equation}\label{eq:solar5}
\cJ=\mathrm{e}^{-i\gamma}\gamma_\star^{-1/2+i\gamma}\EuScript{B}(\gamma_\star)
\int_\R\mathrm{e}^{-\pi i\xi X\gamma_\star^{-1}(u-\gamma_\star)^2}\,du
+O_{\xi,\EuScript{B}}(X^{-3/5}).
\end{equation}
The integral here can be explicitly evaluated: 
$$
\int_\R\mathrm{e}^{-\pi i\xi X\gamma_\star^{-1}(u-\gamma_\star)^2}\,du
=\mathrm{e}^{-i\pi/4}\sqrt{\frac{\gamma_\star}{\xi X}}.
$$
Inserting this result into \eqref{eq:solar5}
and recalling \eqref{eq:solar1}, after some
simplification we find that
$$
\cI(\gamma)=\xi^{-1/2-i\gamma}
\e\Big(\frac{\gamma}{2\pi}\log\frac{\gamma}{2\pi\mathrm{e}}-\frac18\Big)
\EuScript{B}(\gamma_\star)
+O_{\xi,\EuScript{B}}(X^{-1/10}),
$$
and the proof is complete.
\end{proof}

{\large\section{Twisting the von Mangoldt function}
\label{sec:vonMangoldt-twist}}

\begin{theorem}\label{thm:vonMangoldt-twist}
Assume RH.
Let $\xi>0$, $\EuScript{B}\in C_c^\infty(\R^+)$, and $X>10$. Then
$$
\sum_{n\ge 1}\Lambda(n)\,\e(-n\xi)\,\EuScript{B}\Big(\frac{n}{X}\Big)
=-\ssum{\rho=\frac12+i\gamma}\xi^{-1/2-i\gamma}
\EuScript{Z}(\rho)\EuScript{B}\Big(\frac{\gamma}{2\pi\xi X}\Big)
+O_{\xi,\EuScript{B}}(X^{9/10}).
$$
\end{theorem}

\begin{proof}
Our goal is to estimate
$$
\sum_{n\ge 1}\Lambda(n)\,\e(-n\xi)\,\EuScript{B}\Big(\frac{n}{X}\Big)
=\sum_{n\ge 1}\Lambda(n)\varphi(n),
$$
where $\varphi(u)\defeq\e(-u\xi)\,\EuScript{B}(u/X)$.
By the explicit formula
(see, e.g., Iwaniec and Kowalski~\cite[Exercise~5, p.~109]{IwaniecKowalski})
we have
\begin{equation}\label{eq:explform}
\sum_{n\ge 1}\Lambda(n)\varphi(n)
=\int_{\R^+}\Big(1-\frac{1}{(u-1)u(u+1)}\Big)\varphi(u)\,du
-\sum_\rho\hat\varphi(\rho),
\end{equation}
where $\hat\varphi$ is the Mellin transform of $\varphi$ given by
$$
\hat\varphi(s)\defeq\int_{\R^+} \varphi(u)u^{s-1}\,du.
$$
Using Lemma~\ref{lem:mandalorian} to bound the integral in \eqref{eq:explform},
we get that
\begin{equation}\label{eq:FcX}
\sum_{n\ge 1}\Lambda(n)\varphi(n)
=-\sum_\rho\hat\varphi(\rho)+O_{\xi,\EuScript{B}}(X^{-1}).
\end{equation}

Next, for any complex zero $\rho=\tfrac12+i\gamma$ of $\zeta(s)$ we have
$$
\hat\varphi(\rho)\defeq\int_{\R^+} 
\e(-u\xi)\,\EuScript{B}(u/X)u^{-1/2+i\gamma}\,du,
$$
which is the integral $\cI(\gamma)$ considered in
Lemma~\ref{lem:the-child}. Defining $a,a_\star,a,b_\star,\gamma_\star$
as in Lemma~\ref{lem:the-child}, it follows that
\begin{equation}\label{eq:sydney}
\sum_{\rho=\frac12+i\gamma}\hat\varphi(\rho)
=\Sigma_1+O_{\xi,\EuScript{B}}(X^{9/10}),
\end{equation}
where
$$
\Sigma_1\defeq\ssum{\rho=\frac12+i\gamma\\
\gamma_\star\in[a_\star,b_\star]}\xi^{-1/2-i\gamma}
\e\Big(\frac{\gamma}{2\pi}\log\frac{\gamma}{2\pi\mathrm{e}}+\frac78\Big)
\EuScript{B}(\gamma_\star).
$$
Note that the error term in \eqref{eq:sydney} is a consequence of
the following bounds on the sums that arise
naturally in our application of Lemma~\ref{lem:the-child}:
$$
\ssum{\rho=\frac12+i\gamma\\
\gamma_\star\not\in[a_\star,b_\star]}X^{1/2}
\max\big\{X^{-2}|\gamma|^{-2},|\gamma|^{-4}\big\}
\,\mathop{\ll}_{\xi,\EuScript{B}}\,X^{1/2},
\qquad
\ssum{\rho=\frac12+i\gamma\\
\gamma_\star\in[a_\star,b_\star]}X^{-1/10}
\,\mathop{\ll}_{\xi,\EuScript{B}}\,X^{9/10}.
$$
The condition ``$\gamma_\star\in[a_\star,b_\star]$'' in the above
definition of $\Sigma_1$ is redundant (indeed,
we have $a_\star<a<b<b_\star$ by \eqref{eq:ast-bst-defn}, hence
$\EuScript{B}(\gamma_\star)=0$ if $\gamma_\star\not\in[a_\star,b_\star]$),
and so we can simply write
$$
\Sigma_1=\ssum{\rho=\frac12+i\gamma}\xi^{-1/2-i\gamma}
\e\Big(\frac{\gamma}{2\pi}\log\frac{\gamma}{2\pi\mathrm{e}}+\frac78\Big)
\EuScript{B}\Big(\frac{\gamma}{2\pi\xi X}\Big).
$$
Next, observe that \eqref{eq:NTSTrelation} implies
$$
\e\Big(\frac{T}{2\pi}\log\frac{T}{2\pi\mathrm{e}}+\frac78\Big)
=\e\big(N(T)-S(T)+O(T^{-1})\big)
=\overline{\e\big(S(T)\big)}+O(T^{-1})
$$
provided that $T>0$ is not the ordinate of a zero of $\zeta(s)$
(since $N(T)\in\Z$). Taking the limit as $T\to\gamma$, we get that
$$
\e\Big(\frac{\gamma}{2\pi}\log\frac{\gamma}{2\pi\mathrm{e}}+\frac78\Big)
=\EuScript{Z}(\rho)+O(\gamma^{-1}),
$$
where (as in \S\ref{sec:intro})
$$
\EuScript{Z}(\rho)\defeq\lim\limits_{T\to\gamma}\overline{\e\big(S(T)\big)}.
$$
Thus, up to an acceptable error, we can replace $\Sigma_1$ in
\eqref{eq:sydney} with the quantity
$$
\Sigma_1\defeq\ssum{\rho=\frac12+i\gamma}\xi^{-1/2-i\gamma}
\EuScript{Z}(\rho)\EuScript{B}\Big(\frac{\gamma}{2\pi\xi X}\Big).
$$
The theorem now follows by combining \eqref{eq:FcX}
and \eqref{eq:sydney}.
\end{proof}

{\large\section{Proof of Theorem~\ref{thm:RHvsGRH}}
\label{sec:pfThm1}}

We are now in a position to prove Theorem~\ref{thm:RHvsGRH}.
Observe that \eqref{eq:superbound} and 
Theorem~\ref{thm:vonMangoldt-twist} together yield the bound
(under RH)
\begin{equation}\label{eq:wind}
\sum_{n\ge 1}\Lambda(n)\,\e(-n\xi)\,\EuScript{B}(n/X)
\,\mathop{\ll}_{\xi,\EuScript{B},\eps}\,X^{9/10+\eps}
\end{equation}
for every $\xi\in\Q\cap(0,1)$, $\EuScript{B}\in C_c^\infty(\R^+)$, and $\eps>0$, where
the implied constant depends only on
$\xi$, $\EuScript{B}$ and $\eps$.

Since RH is equivalent to GRH in the case of principal characters,
we can assume $\chi$ is nonprincipal. Moreover, if
$\chi$ is induced from a primitive character~$\chi_\star$, then 
$L(s,\chi)$ and $L(s,\chi_\star)$ have the same zeros
in the critical strip since
$$
L(s,\chi)=L(s,\chi_*)
\sprod{p\,\mid\,q\\p\,\nmid\,q_*}(1-\chi_*(p)p^{-s}).
$$
Hence, to prove Theorem~\ref{thm:RHvsGRH} it suffices to show
that ${\rm GRH}[\frac{9}{10}]$ holds for any Dirichlet $L$-function
attached to a \emph{primitive} Dirichlet character $\chi$ of modulus $q>1$.
In this situation, the following identity is well known:
\begin{equation}\label{eq:chi-basic}
\chi(n)=\frac{\tau(\chi)}{q}
\sum_{m\bmod q}\overline\chi(m)\e(-mn/q)
\qquad(n\in\Z),
\end{equation}
where the sum runs over any complete set of residue
classes $m\bmod q$, and
$\tau(\chi)$ is the Gauss sum given by
$$
\tau(\chi)\defeq\sum_{n\bmod q}\chi(n)\e(n/q);
$$
see, e.g., Bump~\cite[Chapter 1]{Bump}. In particular, one has
$$
\chi(n)=\frac{\tau(\chi)}{q}
\sum_{m=1}^{q-1}\overline\chi(m)\e(-mn/q)\qquad(n\in\Z),
$$
and therefore
$$
\sum_{n\ge 1}\Lambda(n)\chi(n)\EuScript{B}(n/X)
=\frac{\tau(\chi)}{q}\sum_{m=1}^{q-1}\overline\chi(m)
\sum_{n\ge 1}\Lambda(n)\e(-mn/q)\EuScript{B}(n/X).
$$
Taking $\xi\defeq m/q$ in \eqref{eq:wind}, each inner sum
is $O_{q,\EuScript{B},\eps}(X^{9/10+\eps})$,
hence we conclude that the bound
$$
\sum_{n\ge 1}\Lambda(n)\chi(n)\EuScript{B}(n/X)
\,\mathop{\ll}_{q,\EuScript{B},\eps}\,X^{9/10+\eps}
$$
holds for any $\eps>0$. Since $\EuScript{B}\in C_c^\infty(\R^+)$ is arbitrary,
such bounds are sufficient to conclude that
${\rm GRH}[\frac{9}{10}]$ holds for $L(s,\chi)$.

\bigskip

{\large\section{Proof of Theorem~\ref{thm:RHvsGRH2}}
\label{sec:pfThm2}}

In view of Theorem~\ref{thm:vonMangoldt-twist} it suffices to show
(assuming RH and ${\rm GRH}[\frac{9}{10}]$) that
\begin{equation}\label{eq:moffs}
\sum_{n\ge 1}\Lambda(n)\,\e(-n\xi)\,\EuScript{B}(n/X)
\,\mathop{\ll}_{\xi,\EuScript{B},\eps}\,X^{9/10+\eps}
\end{equation}
holds for all $\xi\in\Q\cap(0,1)$, $\EuScript{B}\in C_c^\infty(\R^+)$, and $\eps>0$, where
the implied constant depends only on
$\xi$, $\EuScript{B}$ and $\eps$. By partial summation, \eqref{eq:moffs}
is a consequence of the bound
\begin{equation}\label{eq:tarkin}
\sum_{n\le X}\Lambda(n)\,\e(-n\xi)
\,\mathop{\ll}_{\xi,\eps}\,X^{9/10+\eps}
\end{equation}
for every $\xi\in\Q\cap(0,1)$ and $\eps>0$, where
the implied constant depends only on
$\xi$ and $\eps$. Fixing $\xi\defeq m/q\in\Q\cap(0,1)$ with $q>1$
and $(m,q)=1$, \eqref{eq:tarkin}  follows from the bound
\begin{equation}\label{eq:gideon}
\sum_{q<p\le X}(\log p)\,\e(-mp/q)
\,\mathop{\ll}_{q,\eps}\,X^{9/10+\eps},
\end{equation}
where the sum runs over primes $p\in(q,X]$. Using Dirichlet characters
to detect a reduced residue class modulo $q$, we have
\dalign{
\sum_{q<p\le X}(\log p)\,\e(-mp/q)
&=\ssum{a\in(\Z/q\Z)^\times}\e(-ma/q)
\ssum{q<p\le X\\p\equiv a\bmod q}\log p\\
&=\frac{1}{\phi(q)}\ssum{a\in(\Z/q\Z)^\times}\e(-ma/q)
\sum_{\chi\bmod q}\overline\chi(a)
\ssum{q<p\le X}(\log p)\,\chi(p),
}
where $\phi$ is the Euler function.
When $(a,q)>1$, we have $\chi(a)=0$ for all characters $\chi\bmod q$; therefore,
we can extend the above sum over $a$ to include all elements of $\Z/q\Z$. Then,
noting that $\ssum{a\in\Z/q\Z}\e(-ma/q)=0$ holds when $m$ and $q$ are coprime,
we see that the principal character $\chi_0\bmod q$ makes no contribution; that is,
$$
\sum_{q<p\le X}(\log p)\,\e(-mp/q)
=\frac{1}{\phi(q)}\ssum{a\in\Z/q\Z}\e(-ma/q)
\ssum{\chi\bmod q\\\chi\ne\chi_0}\overline\chi(a)
\ssum{q<p\le X}(\log p)\,\chi(p).
$$
Finally, for any nonprincipal character $\chi\bmod q$ we have
$$
\ssum{q<p\le X}(\log p)\,\chi(p)
=\ssum{n\le X}\Lambda(n)\chi(n)
+O_{q,\eps}(X^{1/2+\eps})\,\mathop{\ll}_{q,\eps}\,X^{9/10+\eps},
$$
where we have used ${\rm GRH}[\frac{9}{10}]$
for $L(s,\chi)$ in the last step.
Applying this bound in the previous identity and summing over $a$ and $\chi$,
we obtain \eqref{eq:gideon}, which  completes the proof of Theorem~\ref{thm:RHvsGRH2}.


\bigskip

{\large\section{Acknowledgements}}

The author thanks Henryk Iwaniec for some stimulating conversations.

