TITLE: Is the Riemann Hypothesis equivalent to a $\Pi_1$ sentence?
QUESTION [56 upvotes]: 1) Can the Riemann Hypothesis (RH) be expressed as a $\Pi_1$ sentence?

More formally,

2) Is there a $\Pi_1$ sentence which is provably equivalent to RH in PA?


Update (July 2010):
So we have two proofs that the RH is equivalent to a $\Pi_1$ sentence. 

Martin Davis, Yuri Matijasevic, and Julia Robinson,
"Hilbert's Tenth Problem. Diophantine Equations: Positive Aspects of a Negative Solution", 1974.
Published in "Mathematical developments arising from Hilbert problems", Proceedings of Symposium of Pure Mathematics", XXVIII:323-378 AMS.
Page 335
$$\forall n >0 \ . \ \left(\sum_{k \leq \delta(n)}\frac{1}{k} - \frac{n^2}{2} \right)^2 < 36 n^3 $$

2.
Jeffrey C. Lagarias, "An Elementary Problem Equivalent to the Riemann Hypothesis", 2001
$$\forall n>60 \ .\  \sigma(n) < \exp(H_n)\log(H_n)$$
But both use theorems from literature that make it difficult to judge if they can be formalized in PA. The reason that I mentioned PA is that, for Kreisel's purpose, the proof should be formalized in a reasonably weak theory. So a new question would be:

3) Can these two proofs of "RH is equivalent to a $\Pi_1$ sentence" be formalized in PA?


Motivation:
This is mentioned in P. Odifreddi, "Kreiseliana: about and around George Kreisel", 1996, page 257. Feferman mentions that when Kreisel was trying to "unwind" the non-constructive proof of Littlewood's theorem, he needed to deal with RH. Littlewood's proof considers two cases: there is a proof if RH is true and there is another one if RH is false. But it seems that in the end, Kreisel used a $\Pi_1$ sentence weaker than RH which was sufficient for his purpose.
Why is this interesting?
Here I will try to explain why this question was interesting from Kreisel's viewpoint only.
Kreisel was trying to extract an upperbound out of the non-constructive proof of Littlewood. His "unwinding" method works for theorems like Littlewood's theorem if they are proven in a suitable theory. The problem with this proof was that it was actually two proofs: 

If the RH is false then the theorem holds.
If the RH is true then the theorem holds.

If I remember correctly, the first one already gives an upperbound. But the second one does not give an upperbound. Kreisel argues that the second part can be formalized in an arithmetic theory (similar to PA) and his method can extract a bound out of it assuming that the RH is provably equivalent to a $\Pi_1$ sentence. (Generally adding $\Pi_1$ sentences does not allow you to prove existence of more functions.) This is the part that he needs to replace the usual statement of the RH with a $\Pi_1$ statement. It seems that at the end, in place of proving that the RH is $\Pi_1$, he shows that a weaker $\Pi_1$ statement suffices to carry out the second part of the proof, i.e. he avoids the problem in this case.
A simple application of proving that the RH is equivalent to a $\Pi_1$ sentences in PA is the following: If we prove a theorem in PA+RH (even when the proof seems completely non-constructive), then we can extract an upperbound for the theorem out of the proof. Note that for this purpose, we don't need to know whether the RH is true or is false.
Note: 
Feferman's article mentioned above contains more details and reflections on "Kreisel's Program" of "unwinding" classical proofs to extract constructive bounds. My own interest was mainly out of curiosity. I read in Feferman's paper that Kreisel mentioned this problem and then avoided it, so I wanted to know if anyone has dealt with it.

REPLY [33 votes]: I realized that none of the answers present what I consider to be the most straightforward $\Pi^0_1$ expression for the Riemann hypothesis, namely bounds on the error term in the prime number theorem. I will write it in terms of Chebyshev’s $\psi$ function as I find it more natural, but it works for $\pi$ just the same. The following are equivalent:

The Riemann hypothesis.
$\psi(x)-x=O(x^{1/2+\epsilon})$ for all $\epsilon>0$.
$|\psi(x)-x|\le\frac1{8\pi}\sqrt x\log^2 x$ for all $x\ge74$.

The equivalence of 1 and 2 is classical, the explicit bound in 3 is due to Schoenfeld. Now, the large leeway between 2 and 3 allows one to write the bound as a $\Pi^0_1$ sentence, even though we cannot compute exactly all the logarithms involved: let $\mathrm{psi}(n)$, $\mathrm{sqrt}(n)$, and $\mathrm l(n)$ be computable functions that provide rational approximations within distance $1$ of $\psi(n)$, $\sqrt n$, and $\log n$, respectively. Then RH is equivalent to
$$\forall n\,|\mathrm{psi}(n)-n|\le42+\mathrm{sqrt}(n)\,\mathrm l(n)^2.$$
The beauty of this is not only that it is in line with the form of RH most likely to be useful in elementary number theoretic arguments, but perhaps more importantly, it easily generalizes to extensions of the RH to other $L$-functions.
For a specific formulation, Section 5.7 of Iwaniec and Kowalski’s Analytic number theory states for a large class of $L$-functions (basically, functions in the Selberg class with a polynomial Euler product; the assumptions are somewhat negotiable, in particular I’m confident one can eliminate the Ramanujan–Petersson hypothesis at the expense of somewhat worse bounds) the equivalence of

The Riemann hypothesis for $L(s)$.
$\psi_L(x)-n_Lx=O(x^{1/2+\epsilon})$ for all $\epsilon>0$.
$|\psi_L(x)-n_Lx|\le c\sqrt x\,(\log x)\log(x^dq_L)$.

Here $c$ is an absolute constant that can (in principle) be extracted from the proof, $d$ is the degree of the Euler product, $n_L$ is the order of the pole of $L(s)$ at $s=1$, $q_L$ is a conductor of sorts, and
$$\psi_L(x)=\sum_{n\le x}\Lambda_L(n),$$
where $\Lambda_L(n)$ is a “von Mangoldt” function of $L$ extracted from the expansion of the logarithmic derivative of $L$ as a Dirichlet series:
$$-\frac{L'(s)}{L(s)}=\sum_{n=1}^\infty\Lambda_L(n)\,n^{-s}.$$
The upshot is that the RH for a class of $L$-functions is $\Pi^0_1$, provided the class is “recursively enumerable”: we can parametrize the class as $L(s,a)$ where the $a$’s are finite objects (including basic data like $d,n_L,q_L$) in such a way that the set of valid $a$’s is r.e., and given $a$, $n$, and $\epsilon>0$, we can compute an approximation of $\Lambda_L(n)$ within distance $\epsilon$ (or equivalently, if we can approximately compute terms of the Euler product).
For example, each of the following can be expressed as a $\Pi^0_1$ sentence:

The RH for Dirichlet $L$-functions.
The RH for Dedekind zeta-functions.
The RH for Hecke $L$-functions.

(The first two classes can be enumerated in a straightforward way. Finite-order Hecke characters are also easily enumerable, as ray class groups are finite and computable. The case of general Hecke characters needs a bit more work, but basically, one can enumerate a basis of suitably normalized infinity types using an effective version of Dirichlet’s unit theorem.)
I can’t tell (but would be interested to hear from someone more knowledgeable) whether the RH for standard automorphic $L$-functions is also $\Pi^0_1$, that is, whether these functions are recursively enumerable. (There are certainly only countably many up to normalization, and polynomially many of bounded analytic conductor, so conceivably this may be true.)