Friday, January 30, 2015

The Siegel-Walfisz theorem

When considering primes in arithmetic progressions, one is naturally led to study the zeros of Dirichlet $L$-functions. As will be seen, one can prove the prime number theorem in arithmetic progressions, that is $\pi(x;a,q)=\frac{\text{Li}(x)}{\varphi(q)}+O_q(x\exp(-c_q\sqrt{\log x}))$, using arguments very analogous to proving the prime number theorem with the help of the zero free region of the Riemann zeta function $\zeta(s)$. However, things get much more complicated when uniformity in the modulus $q$ is required. Such uniformity was for example required in this post on the ternary Goldbach problem. The reason for increased complexity is that the location of the zeros of $L(s,\chi)$ may depend intricately on the modulus $q$ of $\chi$, as well as $\chi$ itself. For the $\zeta$ function no such problem exists, and given any finite rectangle in the plane, one can determine whether it contains zeros of $\zeta(s)$ just by calculating an integral arising from the principle of argument. For general $L$-functions, zeros lying too close to the line $\sigma=1$ could ruin all hope of uniformity in the prime number theorem for arithmetic progressions.

Fortunately, there is a classical theorem , which states that zeros of $L(s,\chi)$ close to the line $\sigma=1$, say with $\sigma>1-\frac{c}{\log q}$, with $c$ a suitable constant, must be exceptional in three different ways. First, $\chi$ must be a non-principal real primitive character; second, $s$ must be real, and third such a zero is at most unique. We shall prove this result and deduce Siegel's theorem, stating that $L(s,\chi)$ has no zeros with $s>1-C(\varepsilon)q^{-\varepsilon}$ for any fixed $\varepsilon>0$. This in turn implies the Siegel-Walfisz theorem, which gives a uniform error term from primes in arithmetic progressions up to $q\leq (\log x)^{M}$ for any fixed $M$. A defect of these theorems is that the constant $C(\varepsilon)$ is completely ineffective; the proof gives no bounds for it. Nevertheless, 80 years after Siegel's discovery, the result is essentially the best known. Already showing that the single real zero with $s>1-\frac{c}{\log q}$, known as the Landau-Siegel zero, never exists, would have profound consequences, including an improvement of the Brun-Titchmarsh theorem (see this post), an improved Siegel-Walfisz theorem, and better estimates for the class numbers of imaginary quadratic fields. We follow Davenport's Multiplicative Number Theory.

The explicit formula

The distribution of prime numbers into arithmetic progressions is best captured by the Chebychev function
\[\begin{eqnarray}\psi(x;q,a)=\sum_{n\leq x\atop n\equiv a\hspace{-0.2 cm}\pmod q}\Lambda(n);\end{eqnarray}\]
other prime counting functions, such as $\pi(x;q,a)$, can be reduced to it by partial summation. This function can still be represented in terms of the functions
\[\begin{eqnarray}\psi(x;\chi)=\sum_{n\leq x}\chi(n)\Lambda(n)\end{eqnarray}\]
using the orthogonality relation
\[\begin{eqnarray}\sum_{\chi\hspace{-0.2cm}\pmod q}\overline{\chi(a)}\chi(n)=\begin{cases}1,\quad n\equiv a \hspace{-0.2cm}\pmod q\\0\quad \text{otherwise}.\end{cases}\end{eqnarray}\]
Indeed,
\[\begin{eqnarray}\psi(x;q,a)=\frac{\psi(x;\chi_0)}{\varphi(q)}+\frac{1}{\varphi(q)}\sum_{\chi\neq \chi_0\hspace{-0.2 cm}\pmod q}\overline{\chi(a)}\psi(x,\chi),\end{eqnarray}\]
and since
\[\begin{eqnarray}\psi(x;1,0)-\psi(x;\chi_0)=\sum_{p^{\alpha}\leq x\atop p\mid q}\log p\leq \log q,\end{eqnarray}\]
the ordinary prime number theorem with the classical error term gives
\[\begin{eqnarray}\psi(x;q,a)=\frac{\text{Li}(x)}{\varphi(q)}+\frac{1}{\varphi(q)}\sum_{\chi\neq \chi_0\hspace{-0.2 cm}\pmod q}\overline{\chi(a)}\psi(x,\chi)+O(x\exp(-\sqrt{\log x})).\end{eqnarray}\]
Now it is seen that if there is sufficient cancellation in the sums $\psi(x;\chi)$ for non-principal $\chi$, we have an error term for the prime number theorem in arithmetic progressions. The advantage of the functions $\psi(x;\chi)$ is that they are closely related to the Dirichlet $L$-functions. In fact, the behavior of $\psi(x,\chi)$ is intimately tied to the location of the zeros of $L(s,\chi)$ by means of the following explicit formula.

Theorem 1 (Explicit formula). Let $\chi$ be a non-principal character $\pmod q$. We have, for any $2\leq T\leq x$,
\[\begin{eqnarray}\psi(x;\chi)=\sum_{|\gamma|<T}\frac{x^{\rho}}{\rho}+O\left(\frac{x\log^2(qx)}{T}\right),\end{eqnarray}\]
where the sum is over the non-trivial zeros of $L(s,\chi)$ with imaginary part bounded by $T$, and the implied constant is absolute. For the function $\psi(x):=\psi(x;1,0)$, we have
\[\begin{eqnarray}\psi(x)=x-\sum_{|\gamma|<T}\frac{x^{\rho}}{\rho}+O\left(\frac{x\log^2 x}{T}\right),\end{eqnarray}\]
where $\rho$ runs trough the non-trivial zeros of $\zeta(s)$.
The proof of this formula is based on Perron's formula and the residue theorem, as well as bounds for the growth of the logarithmic derivative $\frac{L'}{L}$ (of course, one must also extend the $L$-functions to the whole plane via the functional equation). Another result we will need is an infinite partial fraction representation of $\frac{L'}{L}$; the formula is obtained by factorizing $L(s,\chi)$ into an infinite product involving its zeros (Hadamard product) and taking the logarithmic derivative.

Theorem  2 (Partial fraction series). Let $\chi$ be a non-principal  primitive character $\pmod q$. Let $a=0$ if $\chi$ is an even character and $a=1$ otherwise. We have
\[\begin{eqnarray}\frac{L'(s,\chi)}{L(s,\chi)}=-\frac{1}{2}\log \frac{q}{\pi}-\frac{1}{2}\frac{\Gamma'(\frac{s+a}{2})}{\Gamma(\frac{s}{2})}+B(\chi)+\sum_{\rho}\left(\frac{1}{s-\rho}+\frac{1}{\rho}\right),\end{eqnarray}\]
where the sum is over the non-trivial zeros of $L(s,\chi)$, taken as a limit of the sums $|\Im(\rho)|<T$, and $B(\chi)$ is a constant satisfying $ \Re(B(\chi))+\sum_{\rho}\Re\left(\frac{1}{\rho}\right)=0.$ We also have
\[\begin{eqnarray}\frac{\zeta'(s)}{\zeta(s)}=B-\frac{1}{s-1}-\frac{1}{2}\log \pi-\frac{1}{2}\frac{\Gamma'(\frac{s}{2}+1)}{\Gamma(\frac{s}{2}+1)}+\sum_{\rho}\left(\frac{1}{s-\rho}+\frac{1}{\rho}\right),\end{eqnarray}\]
the sum being over the non-trivial zeros of $\zeta(s)$, with $B$ a constant.

Exceptionality of Landau-Siegel zeros

When seeking to prove a zero free region for the $L$-functions, it is natural to start by mimicking the proof of the classical zero free region of $\zeta(s)$ (that is, $\zeta(s)\neq 0$ for $\sigma>1-\frac{c}{\log(|t|+2)}$). It turns out that we get essentially the same region, provided that $\chi$ is not real, or in other words $\chi^2$ is not principal (if we regard $q$ as fixed, we get the very same region, and hence the prime number theorem in arithmetic progressions for fixed modulus). The classical argument for the Riemann zeta function is based on the inequality
\[\begin{eqnarray}-3\Re\left(\frac{\zeta'(\sigma)}{\zeta(\sigma)}\right)-4\Re\left(\frac{\zeta'(\sigma+it)}{\zeta(\sigma+it)}\right)-\Re \left(\frac{\zeta'(\sigma+2it)}{\zeta(\sigma+2it)}\right)\geq 0\end{eqnarray}\]
(for $\sigma>1$), which follows by writing out the Dirichlet series and making use of the miraculous identity $3+4\cos \theta+2\cos(2\theta)=2(1+\cos\theta)^2\geq 0$. A similar argument gives us the following theorem.

Theorem 3. Let $\chi$ be a complex character $\pmod q$. We have $L(\beta+i\gamma,\chi)\neq 0$ for
\[\begin{eqnarray}\beta\geq \begin{cases}1-\frac{c_1}{\log(q|\gamma|)},\quad |\gamma|\geq 1\\ 1-\frac{c_2}{\log q},\quad |\gamma|\leq 1\end{cases}\end{eqnarray}\]
for some absolute and computable constants $c_1,c_2>0$.

All constants in this post will be labeled, because some of them depend crucially on others.

Proof. First assume that $\chi$ is primitive. Consider the expression
\[\begin{eqnarray}-3\Re\left(\frac{L'(\sigma,\chi_0)}{L(\sigma,\chi_0)}\right)-4\Re\left(\frac{L'(\sigma+it,\chi)}{L(\sigma+it,\chi)}\right)-\Re \left(\frac{L'(\sigma+2it,\chi^2)}{L(\sigma+2it,\chi^2)}\right).\end{eqnarray}\]
for $\sigma>1$. Writing out the Dirichlet series, it equals
\[\begin{eqnarray}&&\sum_{n=1}^{\infty}\Re\left(n^{-\sigma}(3\chi_0(n)+4\chi(n)n^{-it}+\chi^2(n)n^{-2it})\right)\\&&:=\sum_{(n,q)=1\atop n\geq 1} \Lambda(n)n^{-\sigma}(3+4\cos \theta_{n,\chi}+\cos(2\theta_{n,\chi}))\geq 0,\end{eqnarray}\]
where we definied $\chi(n)n^{-it}=\cos\theta_{n,\chi}+i\sin \theta_{n,\chi}$ so that $\chi(n)^2n^{-2it}=\cos(2\theta_{n,\chi})+i\sin(2\theta_{n,\chi})$. The Dirichlet series above of course arises from the logarithmic derivative of the Euler product
\[\begin{eqnarray}L(s,\chi)=\prod_{p}\left(1-\frac{\chi(p)}{p^{-s}}\right)^{-1}.\end{eqnarray}\]

We have
\[\begin{eqnarray}-\frac{L'(\sigma,\chi_0)}{L(\sigma,\chi_0)}=-\sum_{n=1}^{\infty}\frac{\chi_0(n)\Lambda(n)}{n^{\sigma}}\leq -\frac{\zeta'(\sigma)}{\zeta(\sigma)}<\frac{1}{\sigma-1}+c_3\end{eqnarray}\]
for $1<\sigma<2.$ Moreover, the partial fraction series (Theorem 2) gives
\[\begin{eqnarray}-\frac{L'(s,\chi)}{L(s,\chi)}=\frac{1}{2}\log \frac{q}{\pi}+\frac{1}{2}\frac{\Gamma'(\frac{s+a}{2})}{\Gamma(\frac{s+a}{2})}-\sum_{\rho}\frac{1}{s-\rho}\end{eqnarray}\]
for non-principal primitive $\chi$. By Stirling's formula, we get
\[\begin{eqnarray}\Re\left(-\frac{L'(s,\chi)}{L(s,\chi)}\right)\leq c_4\log(q(|t|+2))-\sum_{\rho}\Re\left(\frac{1}{s-\rho}\right).\end{eqnarray}\]
Writing $\rho=\beta+i\gamma,$ we see that the real part of $\frac{1}{s-\rho}$ is $\frac{\sigma-\beta}{|s-\rho|^2}\geq \frac{1}{\sigma-\beta}\geq 0$ for $\sigma>1$ (since non-trivial zeros have positive real part). Hence,
\[\begin{eqnarray}\Re\left(-\frac{L'(\sigma+it,\chi)}{L(\sigma+it,\chi)}\right)<c_4\log(q(|t|+2))-\frac{1}{\sigma-\beta}\end{eqnarray}\]
for any non-trivial zero $\beta+i\gamma$, and also
\[\begin{eqnarray}\Re\left(-\frac{L'(\sigma+2it,\chi^2)}{L(\sigma+2it,\chi^2)}\right)<c_4\log(q(|t|+2)).\end{eqnarray}\]
if $\chi^2$ is primitive (as $\chi$ is complex, $\chi^2$ is not principal). If $\chi^2$ is not primitive, so that it is induced by a character $\chi_1$ of smaller modulus, we still have
\[\begin{eqnarray}\left|\frac{L'(s,\chi^2)}{L'(s,\chi^2)}-\frac{L'(s,\chi_1)}{L'(s,\chi_1)}\right|\leq \sum_{p\mid q}\frac{p^{-\sigma}\log p}{1-p^{-\sigma}}\leq \sum_{p\mid q}\log p\leq \log q,\end{eqnarray}\]
because the Euler products of $L(s,\chi^2)$ and $L(s,\chi_1)$ are identical up to the factors with $p\mid q$. Combining the above bounds yields
\[\begin{eqnarray}\frac{3}{\sigma-1}+c_5\log(q(|t|+2))-\frac{4}{\sigma-\beta}>0.\end{eqnarray}\]
From this we solve
\[\begin{eqnarray}\beta<\sigma-\frac{4(\sigma-1)}{3+c_5\log(q(|t|+2))(\sigma-1)}.\end{eqnarray}\]
The choice $\sigma=1+\frac{\delta}{\log(q(|\gamma|+2))},t=\gamma$ gives
\[\begin{eqnarray}\beta<1+\frac{\delta}{\log(q(|\gamma|+2))}-\frac{\frac{4\delta}{\log(q(|\gamma|+2))}}{3+c_{5}\delta}<1-\frac{0.1\delta}{\log(q(|\gamma|+2))}\end{eqnarray}\]
when $\delta=\frac{1}{2c_5}$. So far we have assumed that $\chi$ is primitive. If $\chi$ is induced by $\chi_1$, we have the corresponding inequality for zeros of $L(s,\chi_1)$ (actually a stronger inequality since the modulus is smaller). However, $L(s,\chi)$ and $L(s,\chi_1)$ have the exact same zeros up to the zeros of finitely many Euler factors $\left(1-\frac{\chi(p)}{p^s}\right)^{-1}$, and these occur when $\chi(p)=p^s$ so that $\sigma=0$. We thus conclude that the desired inequality holds also if $\chi$ is primitive. ■

The following theorem tells what happens in the case where $\chi$ is real.

Theorem 4. For real non-principal $\chi$, there exist absolute and efficiently computable constants $c_6, c_7>0$ such that $L(\beta+i\gamma,\chi)\neq 0$ for
\[\begin{eqnarray}\beta\geq 1-\frac{c_6}{\log(q(|\gamma|+2))},\quad |\gamma|\geq \frac{c_7}{\log q}.\end{eqnarray}\]

Proof. We may consider just the case where $\chi$ is primitive, by the same argument as before. We proceed as in the complex case, except that now $\chi^2$ is principal. Therefore, as before,
\[\begin{eqnarray}\left|\frac{L'(s,\chi^2)}{L(s,\chi^2)}-\frac{\zeta'(s)}{\zeta(s)}\right|\leq \log q.\end{eqnarray}\]
For $\zeta(s)$, the partial fraction decomposition is by Theorem 2
\[\begin{eqnarray}B_1-\frac{\zeta'(s)}{\zeta(s)}=\frac{1}{s-1}-\frac{1}{2}\log \pi+\frac{\Gamma'(\frac{1}{2}s+1)}{\Gamma(\frac{1}{2}s+1)}-\sum_{\rho}\left(\frac{1}{s-\rho}\right),\end{eqnarray}\]
so
\[\begin{eqnarray}-\Re\left(\frac{\zeta'(\sigma+2it)}{\zeta(\sigma+2it)}\right)<\Re\left(\frac{1}{\sigma-1+2it}\right)+c_8\log(|t|+2).\end{eqnarray}\]
We obtain
\[\begin{eqnarray}\frac{4}{\sigma-\beta}<\frac{3}{\sigma-1}+\frac{\sigma-1}{(\sigma-1)^2+\gamma^2}+c_8\log(q(|\gamma|+2))\end{eqnarray}\]
for any zero $\beta+i\gamma.$ Taking $\sigma=1+\frac{\delta}{\log(q(|\gamma|+2))},t=\gamma$, we deduce
\[\begin{eqnarray}\beta&<&\sigma-\frac{4(\sigma-1)}{3+\frac{(\sigma-1)^2}{(\sigma-1)^2+t^2}+c_8(\sigma-1)\log(q(|t|+2))}\\&=&1+\frac{\delta}{\log(q(|\gamma|+2))}+\frac{\frac{4\delta}{\log(q(|\gamma|+2))}}{3+\frac{1}{1+\left(\frac{\gamma}{\sigma-1}\right)^2}+c_8\delta}\\&<&1-\frac{0.1\delta}{\log(q(|\gamma|+2))}\end{eqnarray}\]
if $|\gamma|\geq \frac{\delta}{\log q}$ and $\delta=\frac{c_8}{10}$. ■

We finally consider the case $|\gamma|<\frac{c_{9}}{\log q}$ for real $ \chi$ (we may have to reduce the value of $c_7$ to some number $c_ {9}$).

Theorem 5. Let $\chi$ be a non-principal real character, and let $L(\beta+i\gamma,\chi)=0$ with $|\gamma|<\frac{c_ {9}}{\log q}$. Then $\beta<1-\frac{c_{10}}{\log q}$, with possibly one exception, for absolute computable constants $c_9,c_{10}>0$.\\

Proof. We may again assume that $\chi$ is primitive. Suppose that there are several exceptional zeros. First consider the case where one of them is complex. Let $\beta\pm i\gamma$ be two zeros of $L(s,\chi)$ with $|\gamma|<\frac{\delta}{\log q}.$ We have, for $1<\sigma<2$,
\[\begin{eqnarray}-\Re\left(\frac{L'(\sigma,\chi)}{L(\sigma,\chi)}\right)<c_{11}\log q+\frac{1}{2}\frac{\Gamma'(\frac{1}{2}\sigma+\frac{1}{2}a)}{\Gamma(\frac{1}{2}\sigma+\frac{1}{2}a)}-\sum_{\rho}\Re\left(\frac{1}{\sigma-\rho}\right),\end{eqnarray}\]
so that
\[\begin{eqnarray}-\Re\left(\frac{L'(\sigma,\chi)}{L(\sigma,\chi)}\right)<c_{12}\log q-\frac{2(\sigma-\beta)}{(\sigma-\beta)^2+\gamma^2}.\end{eqnarray}\]
In particular,
\[\begin{eqnarray}-\frac{1}{\sigma-1}<c_{13}\log q-\frac{2(\sigma-\beta)}{(\sigma-\beta)^2+\gamma^2}.\end{eqnarray}\]
With the choice $\sigma=1+\frac{2\delta}{\log q},t=\gamma$, we see that
\[\begin{eqnarray}-\frac{\log q}{2\delta}<c_{13}\log q-\frac{2}{(\sigma-\beta)+\frac{\gamma^2}{\sigma-\beta}}<c_{13}\log q-\frac{2}{(\sigma-\beta)+\frac{\delta^2}{(\log q)^2(\sigma-\beta)}},\end{eqnarray}\]
and now $\beta<1-\frac{0.1\delta}{\log q}$ implies
\[\begin{eqnarray}-\frac{\log q}{2\delta}<c_{13}\log q-\frac{2}{\frac{1.1\delta}{\log q}+\frac{\delta}{2\log q}}=\left(c_{13}\delta-\frac{2}{1.1+\frac{1}{2}}\right)\frac{\log q}{\delta},\end{eqnarray}\]
so that we have a contradiction for $\delta\leq \frac{c_{13}}{2}$.

Next, let $\beta_1$ and $\beta_2$ be two real zeros of $L(s,\chi)$. By the same reasoning as above,
\[\begin{eqnarray}-\frac{1}{\sigma-1}<c_{13}\log q-\frac{2\sigma-\beta_1-\beta_2}{(\sigma-\beta_1)(\sigma-\beta_2)}.\end{eqnarray}\]
Take $\sigma=1+\frac{\delta}{\log q}$, and suppose $\beta_1,\beta_2>1-\frac{0.1\delta}{\log q}$. Then
\[\begin{eqnarray}-\frac{\log q}{\delta}<c_{13}\log q-\frac{\frac{2\delta}{\log q}}{\frac{1.1^2\delta^2}{\log^2 q}}=\left(c_{13}\delta-\frac{2}{1.1^2}\right)\frac{\log q}{\delta},\end{eqnarray}\]
which is impossible for $\delta\leq \frac{c_{13}}{2}$. Hence, we may take $c_{9}=\frac{13}{2},c_{10}=0.1c_{9}.$

The previous case also covers the possibility of a multiple zero, meaning that $\beta_1=\beta_2$, so the proof is complete. ■

Siegel's theorem and the Siegel-Walfisz theorem

We have now proved that there is at most one Landau-Siegel zero for a given modulus $q$. Nevertheless, this single zero could ruin estimates from primes in arithmetic progressions, so we need a region that does not contain even one zero, even if it is narrower that the region of the Landau-Siegel zeros. This is given by Siegel's theorem.

Theorem 6 (Siegel). Given $\varepsilon>0,$ for any real primitive character $\chi$ we have
(i) $L(1,\chi)>C(\varepsilon)q^{-\varepsilon}$ for some $C(\varepsilon)>0$.
(ii) $L(\sigma,\chi)\neq 0$ for $\sigma>1-C(\varepsilon)q^{-\varepsilon}$.

The second statement is actually a simple consequence of the first, as will be seen.

Proof. (i) The following argument is due to Estermann. Define
\[\begin{eqnarray}g(s)=\zeta(s)L(s,\chi_1)L(s,\chi_2)L(s,\chi_1\chi_2)\end{eqnarray}\]
for real primitive characters $\chi_1,\chi_2$ modulo $q_1$ and $q_2$ ($q_1\neq q_2$), respectively. Then $g$ is meromorphic in the plane, the only pole being a simple one at $s=1$ with residue $R=L(1,\chi_1)L(1,\chi_2)L(1,\chi_1\chi_2)$. When we multiply four Dirichlet series together, absolute convergence gives
\[\begin{eqnarray}g(s)=\sum_{n=1}^{\infty}c_nn^{-s}\end{eqnarray}\]
for $\sigma>1$ and some $c_n$. We have $c_1=1$, and by the Euler product
\[\begin{eqnarray}\log g(s)&=&\log \prod_p\left(\left(1-\frac{1}{p^s}\right)\left(1-\frac{\chi_1(p)}{p^s}\right)\left(1-\frac{\chi_2(p)}{p^s}\right)\left(1-\frac{\chi_1(p)\chi_2(p)}{p^s}\right)\right)^{-1}\\&=&\sum_{p}\sum_{m=1}^{\infty}\frac{1}{m}p^{-ms}\left(1+\chi_1(p)+\chi_2(p)+\chi_1(p)\chi_2(p)\right)\end{eqnarray}\]
the function $g_1(s):=\log g(s)$ has positive Dirichlet series coefficients. But then also
\[\begin{eqnarray}1+g_1(s)+\frac{g_1(s)^2}{2}+...=\exp(g_1(s))=g(s)\end{eqnarray}\]
has $c_n\geq 0.$ Let us write $g(s)$ as a Taylor series
\[\begin{eqnarray}g(s)=\sum_{n=0}^{\infty}b_n(2-s)^n,\quad |s-2|<1\end{eqnarray}\]
with $b_n=(-1)^n \frac{g^{(n)}(2)}{n!}.$ We have
\[\begin{eqnarray}g^{(m)}(s)=\sum_{n=1}^{\infty}(-1)^m(\log^m n)c_nn^{-s}\geq 0\end{eqnarray}\]
for real $s>1$, and $g(2)\geq 1$. Therefore, $b_0\geq 1,b_n\geq 0$. Now, summing a geometric series,
\[\begin{eqnarray}g(s)-\frac{\lambda}{s-1}=\sum_{n=0}^{\infty}(b_n-\lambda)(2-s)^n\end{eqnarray}\]
for all $s$, as the function is entire. Cauchy's formula gives
\[\begin{eqnarray}(-1)^n(b_n-\lambda)=\frac{1}{2\pi i} \int_{|w-2|=\frac{3}{2}}\frac{g(w)-\frac{\lambda}{w-1}}{\left(w-2\right)^{n+1}}dw.\end{eqnarray}\]
We have by partial summation, for $|s-2|=\frac{3}{2}$,
\[\begin{eqnarray}|L(s,\chi)|&=&\left|\sum_{n=1}^{\infty}\left(\sum_{m\leq n}\chi(m)\right)\left((n-1)^{-s}-n^{-s}\right)\right|\\&\leq& q\sum_{n=1}^{\infty}(n-1)^{-s}-n^{-s}|\leq c_{14}q.\end{eqnarray}\]
From this we infer
\[\begin{eqnarray}|b_n-\lambda|\leq 2c_{14}^3c_{15}q_1q_2\cdot q_{1}q_2\left(\frac{2}{3}\right)^n,\end{eqnarray}\]
where $c_{15}$ is an upper bound for $|\zeta(s)|$ when $|s-2|=\frac{3}{2}$. This means that for any $N$ and for $s\in[\frac{7}{8},1]$ we have
\[\begin{eqnarray}\sum_{n=N}^{\infty}|b_n-\lambda|(2-s)^n&\leq& \sum_{n=N}^{\infty}c_{16}q_1^2q_2^2\left(\frac{2}{3}(2-s)\right)^n\\&\leq& \sum_{n=N}^{\infty}c_{16}\left(\frac{3}{4}\right)^{n}\\&\leq& c_{17}\left(\frac{3}{4}\right)^N.\end{eqnarray}\]
We conclude that
\[\begin{eqnarray}g(s)-\frac{\lambda}{s-1}&\geq& 1-\lambda\sum_{n=0}^{N-1}(2-s)^n-c_{17}q_1^2q_2^2\left(\frac{3}{4}\right)^{N}\\&=&1-\lambda\frac{(2-s)^N-1}{1-s}-c_{17}q_1^2q_2^2\left(\frac{3}{4}\right)^{N}.\end{eqnarray}\]
for $s\in [\frac{7}{8},1].$ Choose $N$ in such a way that $\frac{3}{8}\leq c_{17}q_1^2q_2^2\left(\frac{3}{4}\right)^N<\frac{1}{2}$. Then
\[\begin{eqnarray}g(s)&>&\frac{1}{2}-\frac{\lambda}{1-s}(2-s)^N\\&>&\frac{1}{2}-\frac{\lambda}{1-s}\exp\left(\left(\frac{1}{\log \frac{4}{3}}\log(q_1q_2)+c_{18}\right)\log(2-s)\right)\\&>&\frac{1}{2}-\frac{c_{19}\lambda}{1-s}(q_1q_2)^{8(1-s)}.\end{eqnarray}\]

We can now finish the proof of the first part. Assume that there is a real zero $\beta$ of $L(s,\chi)$ for some real $\chi$ with $\beta>1-\frac{\varepsilon}{100}$. Fix $\chi_1$ to be such a character, and choose $\chi_2$ to be any primitive real character with $q_2>q_1$. Then $g(\beta)=0$, so that
\[\begin{eqnarray}\lambda>c_{20}(1-\beta)(q_1q_2)^{-8(1-\beta)}.\end{eqnarray}\]
On the other hand, for $\sigma\in \left[1-\frac{1}{\log q},1\right]$,
\[\begin{eqnarray}\sum_{n=1}^{q}\frac{\chi(n)}{n^{\sigma}}\leq e(\log q+1)\end{eqnarray}\]
and
\[\begin{eqnarray}\sum_{n=q+1}^{\infty}\frac{\chi(n)}{n^{\sigma}}&=&\sum_{n=q+1}^{\infty}\left(\sum_{m\leq n}\chi(n)\right)\left((n-1)^{-\sigma}-n^{-\sigma}\right)\\&\leq& 2eq\sum_{n=q+1}^{\infty}\frac{1}{n^2}<10.\end{eqnarray}\]
Now we obtain
\[\begin{eqnarray}c_{20}(1-\beta)(q_1q_2)^{-8(1-\beta)}<c_{21}\log q_1\log(q_1q_2)L(1,\chi_2),\end{eqnarray}\]
or
\[\begin{eqnarray}L(1,\chi_2)>C(\varepsilon)q_2^{-\varepsilon}\end{eqnarray}\]
for all $q_2>q_1$.

(ii) Let $L(\beta,\chi)=0$ with $\beta\geq 0.9$. Then
\[\begin{eqnarray}L(1,\chi)=L(1,\chi)-L(\beta,\chi)<c_{22}(1-\beta)\max_{\sigma\in [\beta,1]}|L'(\sigma,\chi)|<c_{23}(1-\beta)\log^2 q,\end{eqnarray}\]
where the last inequality is proved analogously to $L(\sigma,\chi)\ll \log q.$ If $\beta>1-q^{-\varepsilon}$, we get a contradiction for large $q$ by replacing $\varepsilon$ by $\frac{\varepsilon}{2}$ in part (i). ■

Note that when we assumed that $\chi_1$ is a character with a real zero greater than $1-\frac{\varepsilon}{100}$, we lost all constructivity in the proof, because no such zero should exixst.

We can finally prove the Siegel-Walfisz theorem.

Theorem 7 (Siegel-Walfisz). Given $M>0$, there exists $C_M>0$ such that
\[\begin{eqnarray}\pi(x;q,a)=\frac{\text{Li}(x)}{\varphi(q)}+O\left(x\exp(-C_M\sqrt{\log x})\right)\end{eqnarray}\]
uniformly for $q\leq \log^M x$.

Proof. Partial summation tells that the claim is equivalent to obtaining the same error term for $\psi(x;q,a)-\frac{x}{ \varphi(q)}$. For any non-principal $\chi \pmod q$, we have (Theorem 1)
\[\begin{eqnarray}\psi(x,\chi)=\frac{x^{\beta}}{\beta}+\sum_{|\gamma|<T\atop \gamma\neq\beta}\frac{x^{\rho}}{\rho}+O\left(\frac{x\log^2 x}{T}\right),\end{eqnarray}\]
where $ \beta$ is a Landau-Siegel zero if it exists, and otherwise any zero. Since $\beta<1-C(\varepsilon)q^{-\varepsilon}$ and $\Re(\rho)\leq 1-\frac{c_{25}}{\log(q(T+2))}$, we have
\[\begin{eqnarray}\psi(x,\chi)&\ll& x^{1-C(\varepsilon)q^{-\varepsilon}}+x^{1-\frac{c_{25}}{\log(q(T+2))}}\left(\sum_{1\leq |\gamma|<T}\frac{1}{\rho}+\sum_{|\gamma|<1}\frac{1}{\rho}\right)+\frac{x\log^2 x}{T}\\&\ll& x\left(\exp(-C(\varepsilon)\log^{1-\varepsilon M}x)+\exp\left(-\frac{c_{25}\log x}{\log(qT)}\right)\right)+\frac{x\log^2 x}{T}.\end{eqnarray}\]
Choose $T$ so that $\log T=\sqrt{\log x}$, and $\varepsilon=\frac{1}{2M}$. Then
\[\begin{eqnarray}\psi(x,\chi)&\ll& x\exp(-C'_M\sqrt{\log x})+x\exp\left(-c_{26}\frac{\log x}{\sqrt{\log x}+M\log \log x}\right)\\&\ll& x\exp(-C_M\sqrt{\log x}).\end{eqnarray}\]
For the principal character $\chi_0 \pmod q$, we have the prime number theorem $\psi(x,\chi_0)-x\ll x\exp(-\sqrt{\log x})$, so that
\[\begin{eqnarray}\psi(x;q,a)-\frac{x}{\varphi(q)}&=&\frac{1}{\varphi(q)}\sum_{\chi\neq \chi_0 \hspace{-0.3cm}\pmod q}\overline{\chi(a)}\psi(x;q,a)+O(x\exp(-\sqrt{\log x}))\\&\ll& x\exp(-C_M\sqrt{\log x}),\end{eqnarray}\]
so the proof is complete. ■