\section{Introduction}\label{sec:introduction} For a Dirichlet character $\chi$ modulo $q$, the $L$-function \[ L(s,\chi)=\sum_{n\ge1}\frac{\chi(n)}{n^s}=\prod_p\frac1{1-\chi(p)p^{-s}}\qquad(\Rea s>1) \] continues to an entire function when $\chi$ is nonprincipal, and to a meromorphic function with a simple pole at $s=1$ otherwise. The distribution of primes in arithmetic progressions is governed by the zeros of these functions in the strip $0<\Rea s<1$ \cite[Chapters 17--19]{Davenport}. The classical zero-free regions, from Hadamard and de la Vall\'ee Poussin to Vinogradov \cite{Vinogradov}, Korobov \cite{Korobov} and Ford \cite{Ford}, have the shape \[ \sigma\ge1-\frac{c}{(\log(|t|+3))^{2/3}(\log\log(|t|+3))^{1/3}} \] and so approach the line $\Rea s=1$ as the height grows; see \cite{Khale} for Dirichlet $L$-functions and \cite{Sokolovskii,BartzI,BartzII,Hinz,Coleman} for Dedekind zeta functions and Hecke $L$-functions. Two recent results replace these regions by half-planes. Cureton and Thorner \cite{CuretonThorner}, building on \cite{OpenAIQRH,OpenAISeven,OpenAIPrimitive} and on the metaplectic theory of Kazhdan and Patterson \cite{KP,KPErratum}, proved that for every number field $K$ the Dedekind zeta function $\zeta_K(s)$ and the $L$-function of every finite-order Hecke character of $K$ are nonzero for $\Rea s>31/32$, apart from the pole at $s=1$. Alp\"oge and Claude \cite{AlpogeRemark,AlpogeGRH} went all the way to the critical line for Dirichlet $L$-functions: they proved the Generalized Riemann Hypothesis, $L(s,\chi)\ne0$ for $\Rea s>1/2$ and every Dirichlet character $\chi$. Both results were formalized in Lean~4. The proof in \cite{AlpogeRemark,AlpogeGRH} is, at heart, an argument of Chebyshev's kind. A nonzero integer is at least as large as the product of the prime powers known to divide it, and if both the size of the integer and those prime powers are known well enough, the comparison becomes an inequality about primes. Dirichlet's class number formula has the same shape: $L(1,\chi)$ is an explicit positive number times the class number, which is at least $1$. In \cite{AlpogeRemark,AlpogeGRH} the integer is the determinant of one family of iterated unitary theta lifts, built from Taylor coefficients of theta functions on an elliptic curve with complex multiplication, and there is one such integer at every scale. Its size is computed from the period of the curve, its forced prime factors from the supersingular primes, and the two main terms agree exactly. What is left is a one-sided bound for a sum over primes, and by a theorem of Landau a one-sided bound suffices. Section~\ref{sec:overview-rat} explains this in more detail. In this paper we carry the comparison out over an arbitrary totally real number field $k$. The outcome is the Riemann hypothesis for the Dedekind zeta function of $k$, and more generally for the Hecke $L$-functions of $k$ whose characters have the same sign at every real place. \subsection{Main results}\label{sec:main-results} Let $K$ be a number field with ring of integers $\OO_K$, absolute discriminant $D_K$, and $r_1$ real and $r_2$ complex places. Write $\N\fraka=|\OO_K/\fraka|$ for a nonzero ideal $\fraka$. The Dedekind zeta function \begin{equation}\label{eq:intro-dedekind} \zeta_K(s)=\sum_{\fraka\ne0}\frac1{\N\fraka^{s}}=\prod_{\frakp}\frac1{1-\N\frakp^{-s}}\qquad(\Rea s>1) \end{equation} continues meromorphically to $\C$ with a simple pole at $s=1$. With $\Gamma_{\R}(s)=\pi^{-s/2}\Gamma(s/2)$ and $\Gamma_{\C}(s)=2(2\pi)^{-s}\Gamma(s)$, the function \begin{equation}\label{eq:intro-completed-dedekind} \xi_K(s)=s(1-s)D_K^{s/2}\,\Gamma_{\R}(s)^{r_1}\Gamma_{\C}(s)^{r_2}\,\zeta_K(s) \end{equation} is entire and satisfies \begin{equation}\label{eq:intro-dedekind-fe} \xi_K(s)=\xi_K(1-s). \end{equation} The zeros of $\zeta_K$ in the strip $0<\Rea s<1$ are therefore symmetric about the line $\Rea s=1/2$. They control the error term in the prime ideal theorem: if $\zeta_K(s)\ne0$ for $\Rea s>\theta$, then \[ \#\{\frakp:\N\frakp\le x\}=\int_2^x\frac{dt}{\log t}+O\bigl(x^{\theta}\log(D_Kx^{[K:\Q]})\bigr), \] by the explicit formula \cite{Landau,IK}. We shall work with ray-class characters in ideal-theoretic form. Let $\frakm\subset\OO_K$ be a nonzero ideal. A \emph{narrow ray-class character} modulo $\frakm$ is a multiplicative function $\xi$ on the nonzero ideals of $\OO_K$ which vanishes on the ideals not coprime to $\frakm$, restricts to a character of the group of ideals coprime to $\frakm$, and satisfies $\xi((\alpha))=1$ whenever $\alpha\in\OO_K$ is nonzero, $\alpha\equiv1\pmod{\frakm}$, and $\sigma(\alpha)>0$ for every real embedding $\sigma$ of $K$. Such a character has finite order. It is \emph{principal} if it takes the value $1$ on every ideal coprime to $\frakm$. By Hecke's theory \cite{Hecke,TateThesis} there is a unique entire function $\mathcal L_K(s,\xi)$ with \begin{equation}\label{eq:intro-entire-hecke} \mathcal L_K(s,\xi)= \begin{cases} (s-1)\displaystyle\sum_{\fraka\ne0}\xi(\fraka)\N\fraka^{-s}&\text{if $\xi$ is principal,}\\[10pt] \displaystyle\sum_{\fraka\ne0}\xi(\fraka)\N\fraka^{-s}&\text{otherwise} \end{cases} \qquad(\Rea s>1). \end{equation} We call it the \emph{entire $L$-function} of $\xi$. For principal $\xi$ it equals $(s-1)\zeta_K(s)\prod_{\frakp\mid\frakm}(1-\N\frakp^{-s})$, and its value at $s=1$ is a nonzero multiple of the residue of $\zeta_K$. For nonprincipal $\xi$ it differs from the $L$-function $L_K(s,\xi_0)$ of the primitive character $\xi_0$ inducing $\xi$ by finitely many Euler factors, none of which vanishes for $\Rea s>0$. No gamma factors are included. In this language the theorem of Cureton and Thorner \cite[Corollary~1.2]{CuretonThorner} reads $\mathcal L_K(s,\xi)\ne0$ for $\Rea s>31/32$. A Dirichlet character $\chi$ modulo $q$ gives the narrow ray-class character $\chi\circ\N_{K/\Q}$ modulo $q\OO_K$, with value $\chi(\N\fraka)$ at $\fraka$. Our first theorem concerns these characters. \begin{theorem}\label{thm:intro-main} Let $k$ be a totally real number field and let $\chi$ be a Dirichlet character. Then \[ \mathcal L_k(s,\chi\circ\N_{k/\Q})\ne0\qquad\text{for }\Rea s>1/2 . \] \end{theorem} The trivial character gives $\mathcal L_k(s,1)=(s-1)\zeta_k(s)$. Together with the functional equation \eqref{eq:intro-dedekind-fe} this yields the Riemann hypothesis for $\zeta_k$. \begin{corollary}\label{cor:intro-dedekind} Let $k$ be a totally real number field. Then $\zeta_k(s)\ne0$ for $\Rea s>1/2$, $s\ne1$. Every zero of $\zeta_k$ in the strip $0<\Rea s<1$ lies on the line $\Rea s=1/2$, and \[ \#\{\frakp\subset\OO_k:\N\frakp\le x\}=\int_2^x\frac{dt}{\log t}+O\bigl(x^{1/2}\log(D_kx^{[k:\Q]})\bigr). \] \end{corollary} When $k$ is abelian over $\Q$, the function $\mathcal L_k(s,\chi\circ\N_{k/\Q})$ is a product of Dirichlet $L$-functions up to finitely many Euler factors, and Theorem~\ref{thm:intro-main} follows from the rational case \cite{AlpogeRemark,AlpogeGRH}; see Proposition~\ref{prop:abelian-norm}. For a general totally real field there is no such factorization, and the comparison of determinants has to be made over $k$ itself. Theorem~\ref{thm:intro-main}, applied to all totally real fields at once, extends in two directions by class field theory. Let $k$ be totally real. A narrow ray-class character $\xi$ modulo $\frakm$ is \emph{totally even} if $\xi((\alpha))=1$ for every nonzero $\alpha\equiv1\pmod{\frakm}$ in $\OO_k$, and \emph{totally odd} if $\xi((\alpha))=\sgn\N_{k/\Q}(\alpha)$ for every such $\alpha$. In either case we say that $\xi$ has \emph{uniform sign}. Let $\chi_4$ be the nonprincipal character modulo~$4$. If $\xi$ is totally odd then $\xi\cdot(\chi_4\circ\N_{k/\Q})$ is totally even, and a totally even character cuts out a cyclic extension of $k$ which is again totally real. Applying Theorem~\ref{thm:intro-main} to that extension, with $\chi=1$ or $\chi=\chi_4$, gives the following. \begin{theorem}\label{thm:intro-uniform} Let $k$ be a totally real number field and let $\xi$ be a narrow ray-class character of $k$ of uniform sign. Then $\mathcal L_k(s,\xi)\ne0$ for $\Rea s>1/2$. If $\xi_0$ is the primitive character inducing $\xi$, every zero of $L_k(s,\xi_0)$ in the strip $0<\Rea s<1$ lies on the line $\Rea s=1/2$. \end{theorem} Next let $K$ be a CM field with maximal totally real subfield $k$, and write $K=k(\sqrt{-\delta})$ with $\delta\in\OO_k$ totally positive. The three quadratic extensions $k(i)$, $k(\sqrt{\delta})$ and $K$ of $k$ are related by an identity of Euler products, and $k(\sqrt\delta)$ is totally real. This expresses the norm characters of $K$ through those of the totally real fields $k$ and $k(\sqrt\delta)$. \begin{theorem}\label{thm:intro-cm} Let $K$ be a CM field, or more generally a number field with an automorphism that induces complex conjugation under every embedding $K\hookrightarrow\C$. Then $\mathcal L_K(s,\chi\circ\N_{K/\Q})\ne0$ for $\Rea s>1/2$ and every Dirichlet character $\chi$. In particular every zero of $\zeta_K$ in the strip $0<\Rea s<1$ lies on the line $\Rea s=1/2$. \end{theorem} Theorems~\ref{thm:intro-uniform} and~\ref{thm:intro-cm} are proved in Section~\ref{sec:scope} as Propositions~\ref{prop:uniform-ray} and~\ref{prop:central-ray}, and Theorem~\ref{thm:intro-main} is proved in Section~\ref{sec:reduction} as Theorem~\ref{thm:technical-endpoint}. \begin{remark}\label{rem:intro-mixed} The restriction to uniform sign in Theorem~\ref{thm:intro-uniform} is a limitation of the method and not of the exposition. The method attaches to $k$ a CM extension, and a character of $k$ that factors through a CM extension has the same sign at every real place. Twisting a character of mixed signature by $\chi_4\circ\N_{k/\Q}$ reverses all of its signs and leaves it mixed, so the field it cuts out is never totally real. For such characters, and for number fields outside the scope of Theorem~\ref{thm:intro-cm}, the half-plane $\Rea s>31/32$ of \cite{CuretonThorner} remains the best result known. Section~\ref{subsec:scope-limits} explains why the known constructions stop at totally real and CM fields. \end{remark} \subsection{What is assumed from the literature}\label{sec:intro-inputs} The proofs in this paper are complete relative to three results from the literature, which we use without reproving them and state in full in Section~\ref{sec:literature}. The first, which we call Theorem~A, is the averaged Colmez formula of Yuan and Zhang \cite[Theorem~1.1]{YuanZhang}, proved independently by Andreatta, Goren, Howard and Madapusi Pera \cite{AGHMP}. It expresses the average, over all CM types, of the Faltings heights of the abelian varieties with complex multiplication by a given CM field as a logarithmic derivative of a quadratic Hecke $L$-function. We use it to evaluate one archimedean period exactly, in the height computation of Lemma~\ref{lem:individual-height}. The other two inputs are Brumer--Stark theorems, which control class groups of abelian CM extensions of totally real fields by Stickelberger elements built from partial zeta values. Theorem~B is the strong Brumer--Stark theorem of Dasgupta and Kakde \cite[Theorem~1.3]{DasguptaKakde}: away from~$2$, the Stickelberger element lies in the Fitting ideal of the dual of the minus part of a smoothed class group. Theorem~C is the Brumer--Stark theorem over $\Z$ of Dasgupta, Kakde, Silliman and Wang \cite[Theorems~1.1 and~1.2]{DKSW}, which supplies the corresponding statement at the prime~$2$. Theorems~B and~C enter at a single point, the bound for certain odd Selmer groups in Proposition~\ref{prop:odd-length}. Every other ingredient is proved here or is already available in formalized form. We have formalized in Lean~4 the deduction of Theorems~\ref{thm:intro-main}, \ref{thm:intro-uniform} and~\ref{thm:intro-cm} from Theorems~A, B and~C. In the formal development the three theorems are stated as axioms, each a transcription of a printed statement specialized to the fields in question, and every step from those statements to the main theorems is proved, including the passage from the printed Brumer--Stark statements to the form in which Proposition~\ref{prop:odd-length} uses them. Appendix~\ref{sec:verification} describes the formal development in the repository \cite{ERHLiteratureInputs} and states exactly what the proof assistant has checked. \subsection{What is taken from the proof over \texorpdfstring{$\mathbb Q$}{Q}, and what is new}\label{sec:intro-new} The method is that of Alp\"oge and Claude, and a large part of their work is used here as it stands. Their formalization \cite{AlpogeGRH} develops the following over an arbitrary CM field, and we take all of it over without change: algebraic modular forms on definite unitary groups and their integral structures; the theta correspondence for unitary groups, the seesaw identity and the Rallis inner product formula along a chain of lifts; Poincar\'e series and the selection of spanning translates; the Galois representations attached to unitary eigenforms and the bounds for congruence modules by the method of Ribet and Taylor--Wiles--Kisin; the integral theory of theta functions on abelian schemes, including the theorem of the cube over a general base; and the outer analytic argument leading to Landau's theorem. The overall architecture, one determinant bounded from two sides, is theirs. So is the observation that an exact evaluation of a period makes the main terms cancel. What is new is everything that depends on the base field being larger than $\Q$. Over $\Q$ the proof rests on an imaginary quadratic field and a CM elliptic curve, on the Chowla--Selberg formula, and on Stickelberger's theorem for abelian fields. None of these is available over a general totally real field $k$, and each has to be replaced. The imaginary quadratic field becomes a CM extension $F=k(\sqrt{-\delta})$, chosen so that its quadratic character sorts the primes of $k$ and so that the Galois group of its normal closure is as large as possible (Section~\ref{sec:inputs}). The elliptic curve becomes a family of abelian varieties with multiplication by $\OO_F$, with differentiation normalized separately at each infinite place, and the Chowla--Selberg formula becomes an exact formula for the height of each eigenline of the cotangent space, deduced from Theorem~A (Lemma~\ref{lem:individual-height}). The comparison of Galois conjugates, which over $\Q$ stays on one elliptic curve, becomes a comparison across the $2^n$ CM types of $F$ (Lemma~\ref{lem:algebraic-germ}). The local analysis of Taylor coefficients requires a study of formal groups with multiplication by $\OO_F$ at primes of every splitting type in $k$, including the ramified ones, together with a proof that the divisibility obtained is sharp (Lemma~\ref{lem:marked-clearer} and Proposition~\ref{prop:lower-coefficient}). Stickelberger's theorem is replaced by Theorems~B and~C, applied to the layers of a cyclotomic tower that is not abelian over $\Q$ (Proposition~\ref{prop:odd-length}). Finally, the classical zero-free region, which over $\Q$ is used to choose auxiliary primes and to bound tails, is replaced by the half-plane of Cureton and Thorner \cite{CuretonThorner}, together with a zero-density estimate for quadratic twists over $k$ (Lemma~\ref{lem:aux-twist-count}). For $k=\Q$ the construction reduces to that of \cite{AlpogeGRH}, and Section~\ref{sec:overview} explains each replacement in turn. \subsection{Organization} Section~\ref{sec:overview} recalls the argument over $\Q$ and the principle behind it, explains what fails when $\Q$ is replaced by a totally real field, and describes how each difficulty is resolved. Section~\ref{sec:literature} states Theorems~A, B and~C. Section~\ref{sec:inputs} constructs the arithmetic and geometric objects attached to $k$: a CM extension $F=k(\sqrt{-\delta})$ and its cyclotomic tower, the CM abelian schemes with their theta sections, the heights of the marked derivatives, the denominators of jets, the bound for the odd Selmer groups, and a coefficient showing that the finite bounds are attained. Section~\ref{sec:reduction} compares the two bounds for the determinant, obtains a one-sided estimate for a smoothed sum over primes, and deduces Theorem~\ref{thm:intro-main} by Landau's theorem. Section~\ref{sec:scope} treats abelian fields, characters of uniform sign, and CM fields, and explains where the method stops.