MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there examples of sets of natural numbers that are proven to be decidable but by non-constructive proofs only?

share|cite|improve this question
up vote 17 down vote accepted

When I teach computability, I usually use the following example to illustrate the point.

Let $f(n)=1$, if there are $n$ consecutive $1$s somewhere in the decimal expansion of $\pi$, and $f(n)=0$ otherwise. Is this a computable function?

Some students might try naively to compute it like this: on input $n$, start to enumerate the digits of $\pi$, and look for $n$ consecutive $1$s. If found, then output $1$. But then they realize: what if on a particular input, you have searched for 10 years, and still not found the instance? You don't seem justified in outputting $0$ quite yet, since perhaps you might find the consecutive $1$s by searching a bit more.

Nevertheless, we can prove that the function is computable as follows. Either there are arbitrarily long strings of $1$ in $\pi$ or there is a longest string of $1$s of some length $N$. In the former case, the function $f$ is the constant $1$ function, which is definitely computable. In the latter case, $f$ is the function with value $1$ for all input $n\lt N$ and value $0$ for $n\geq N$, which for any fixed $N$ is also a computable function.

So we have proved that $f$ is computable in effect by providing an infinite list of programs and proving that one of them computes $f$, but we don't know which one exactly. Indeed, I believe it is an open question of number theory which case is the right one. In this sense, this example has a resemblence to Gerhard's examples.

share|cite|improve this answer
There is a difference between "we do not know" and "there is no constructive proof". – Andrej Bauer Sep 24 '13 at 8:03
Andrej, I agree with that. I had intended only to give an example where we have a proof of decidability, but we have no constructive proof, using the natural-mathematical-language meaning of this word, rather than the meaning arising in constructive logic. This is a softer interpretation of the question, but an interpretation that I believe the OP had intended. But you are right, to give an example where we can prove there is no constructive proof is another matter. – Joel David Hamkins Sep 26 '13 at 3:26
I would expect that we can easily produce these latter kind of examples by design. For example, define a set using the excluded middle, in such a way that in classical logic, we can prove it is trivial and decidable, but for which because of the excluded middle there would be no constructive proof. – Joel David Hamkins Sep 26 '13 at 3:27
For example, fix an instance $p\vee\neg p$ of excluded middle that is not constructively provable, and let $A$ be the set of even numbers, in case $p$ holds and otherwise $A$ is the set of odd numbers. Classically, we can easily prove $A$ is decidable by splitting into cases depending on whether $p$ holds. But there can be no constructive proof of this, since it would have to settle $p\vee\neg p$. (But is this the kind of example that the OP is seeking?) – Joel David Hamkins Sep 26 '13 at 3:46
This example is in Hartley Rogers' book on recursion theory. – Michael Hardy Sep 26 '13 at 3:58

The Robertson–Seymour theorem implies that every minor-closed family $F$ of finite graphs is decidable in time $O(n^3)$. However, it does not provide an explicit algorithm until one supplies an explicit finite list of forbidden minors that characterize $F$; the proof that such a list always exists is non-constructive.

share|cite|improve this answer

There is the standard example involving Fermat's Last Theorem, except that we now have a good idea what the set is. So let's replace it with "the smallest positive integer n which is a multiple of 4 and for which no Hadamard matrix of order n exists, or 1 if Hadamard matrices of all possible orders exist." This defines a singleton set, which is decidable. You could argue that in principle it is constructive, whereas I would argue that since we still don't know maximal determinants for small orders less than 100, you and your putative great-grandchildren will not see a value for n, so you will have a hard time showing to me that a construction based on this definition exists, as there is no guarantee of termination of the construction.

Alternatively, any finite set which is arrived at by nonconstructive means (E.g. encodings of counterexamples to Frankl's union-closed families conjecture, where the presumed proof that there are only finitely many is nonconstructive) should count as an example.

Better answers will arise once a good notion of nonconstructive has been specified. As to such a notion, I'll leave the philosophical wrangling to others.

Gerhard "Ask Me About System Design" Paseman, 2010.02.10

share|cite|improve this answer
To whom it may concern: What was the reason for down-voting? – Hans Stricker Feb 11 '10 at 9:32
I too would like to know. It would help to know what about the answer detracts from knowledge surrounding the answer. – Gerhard Paseman Feb 15 '10 at 6:50

Assume your set $A\subseteq\mathbb{N}$ is decidable, that is, $\forall_n (n\in A\vee n\not\in A)$. Markov's Principle ensures that your set is computable. As it is computable, it can be described by a $\Pi_2^0$-Formula, and this is provable in Peano Arithmetic. Therefore, using the Friedman-Translation, you'll find a constructive proof of its decidability from Heyting Arithmetic.

So much for the sets with decidability provable from Peano Arithmetic. There are of course things like Goodstein's Theorem, on which this Theorem might not be applicable. In this case, you have to specify which stronger constructive System you want. But probably, similar theorems also hold then.

share|cite|improve this answer
This is a very good observation. – Andrej Bauer Sep 26 '13 at 9:43

FIVE NOTES ON THE APPLICATION OF PROOF THEORY TO COMPUTER SCIENCE by Georg Kreisel, p. 32. Kreisel notes, that his set "is recursive by (the mere fact of) decidability and recursive enumerability of the theorems of any formal system. There is no apparent way of refining [this] brutal definition."

share|cite|improve this answer

There are lots of theories in model theory that can be proven to be decidable, in a non-constructive manner, by showing that a first order theory exhibits categoricity. One example that comes to mind the the theory of countable densely ordered fields (via Cantor's non-constructive proof that they are all isomorphic).

If one considers a decidable theory in stated in a a countable language, one can obtain a decidable set of numbers it corresponds to using Gödel numbering; ie, $\{\ \overline{\phi} \ |\ T \vdash \phi\}$. If the proof that the theory was non-constructive, then the decidability of the corresponding set of Gödel will also be non-constructive.

share|cite|improve this answer
Can you point me to this proof of Cantor's, or describe the idea. It feels to me like this could be made constructive. – Andrej Bauer Sep 24 '13 at 8:01
Any ordered field has characteristic $0$, and so the ordering is dense (because $(a+b)/2$ is between $a$ and $b$). But there are lots of non-isomorphic, countable ordered fields (for example, the rationals and a countable elementary submodel of the reals). – Andreas Blass Sep 26 '13 at 14:28
I disagree with the last sentence of this answer. A non-constructive proof does not preclude the possibility of another, constructive proof. – Andreas Blass Sep 26 '13 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.