Every computable number is definable. However, the converse is not true. What is an example of a real number that is definable but that is NOT computable? I guess if it is there, we can "define" (describe) it, can't we?
-
1Define in what language? – Asaf Karagila May 04 '15 at 15:47
-
As in the intro of this article. http://en.wikipedia.org/wiki/Definable_real_number – islamfaisal May 04 '15 at 15:53
-
1I don't actually believe, philosophically speaking, in non-computable reals. – Kyle Strand May 05 '15 at 05:03
-
I don't know if integrals of some pathological functions can qualify as "non-computable " here. If yes, there are way too many examples. – Vim May 05 '15 at 07:52
-
@Vim: Every real number is an integral of the constant function over a particular interval. Namely $\int_0^r dx=r$. – Asaf Karagila May 05 '15 at 09:06
-
@AsafKaragila. Sorry but my point is not about defining real numbers as imtegrals. Actually I was referring to some pathological integrals, say, integral of $\zeta(x)$ over $[1.3,1.7]$. – Vim May 05 '15 at 10:10
-
Let $x$ be the smallest positive real number, that is not computable. Then $x$ is definable (I just did) but not computable (per definition). – Of course this example won’t hold under reasonable definitions of definable, but I could not resist. – Wrzlprmft May 05 '15 at 12:09
-
2@Wrzlprmft: You said "the smallest positive real number". I don't agree that there is one, not to say a unique one! So you cannot use it in a definition. =) – user21820 May 05 '15 at 12:10
-
@user21820: Actually, if you allow parameters in your definition, then by fixing a well-ordering of $\Bbb R$ you can talk about the least non-computable real number, or the least positive real number. Of course this well-ordering will not agree with the usual ordering of $\Bbb R$. – Asaf Karagila May 05 '15 at 15:47
-
@AsafKaragila: Yup, but "first positive real number in the well-ordering" may well be computable, so as you said we'd have to go with something like "first non-computable real number in the well-ordering", which is still cheating because we cannot define any well-ordering to begin with. =) – user21820 May 06 '15 at 04:01
-
@user21820: Inaccurate. Since all computable reals are in $L$, and there are non computable reals in $L$, and there is a definable well-ordering of the reals in $L$, we can do that shtick without even using parameters. In fact, I am going to add this to my answer, it's fairly nice. – Asaf Karagila May 06 '15 at 04:32
-
@AsafKaragila: Oh but $L$ is cheating in yet another way! You might as well just say "the real number that is proven to be non-computable by the length-lexicographically smallest proof over ZF" and forget about using $L$. Clearly the proofs are well-ordered and there is a non-computable real number so this number is well-defined. – user21820 May 06 '15 at 04:38
-
@AsafKaragila: And earlier I meant "we cannot define any well-ordering on $\mathbb{R}$"; was that inaccurate? – user21820 May 06 '15 at 04:40
-
@user21820: Yes, that's inaccurate since in $L$ and other very canonical inner models we can in fact define a well-ordering of the universe, and it is (in the case of $L$, for example) a projective well-ordering of $\Bbb R$ no less. So in any case the constructible reals have a definable well-ordering in $\sf ZF$, and at least some of them are non-computable. – Asaf Karagila May 06 '15 at 04:42
-
@AsafKaragila: Oh that's interesting. I had thought that it wasn't possible without AC. So what about my shortest provably non-computable number? That's easier right? – user21820 May 06 '15 at 04:51
-
@user21820: (1) You define a real-order on a subset of the reals, which just happens to be all the reals if $V=L$ holds; (2) how do you argue that any definable real is provably non-computable? Maybe $\sf ZF$ is consistent with the statement that all the definable reals are computable (in which case we can prove the existence of a non-computable real, but we cannot define a particular one)? – Asaf Karagila May 06 '15 at 04:54
-
(1) Oh that's what you mean; I thought most people assume $V \ne L$. (2) Can't we use say kasperd's answer which proves the existence of at least one provable non-computable real, and then select the shortest provably non-computable real? – user21820 May 06 '15 at 05:05
-
@user21820: Well, proofs from $\sf ZFC$ don't quite live inside the universe of $\sf ZFC$. Some of them do, but it's more complicated than that. So while you can do something like that in theory, it won't work in models of $\sf ZFC+\lnot\operatorname{Con}(ZFC)$, so it's not a definition that works in $\sf ZFC$ itself, and it requires a stronger consistency strength to prove that it is a good definition. As for $V=L$, most people don't care, most set theorists would probably work outside of $L$, but the point that $\Bbb R^L$ is definably and canonically well-orderable remains true. – Asaf Karagila May 06 '15 at 05:09
-
@AsafKaragila: Ah okay. Okay I get what you mean about (2). – user21820 May 06 '15 at 05:47
-
@user21820: Most of the last comment address (2), actually. Just because we can prove there is a non-computable real doesn't mean we can prove that any specific real is non-computable. And even if we could prove that some reals are provably non-computable, we need to be way more careful and accurate in "shortest proof", since proofs - as I mentioned - don't live within the universe, so we can't quite access them in definitions. – Asaf Karagila May 06 '15 at 06:26
6 Answers
The point here is that definable real numbers are definable using the entire strength of might of the set theoretic universe; whereas computable real numbers are only allowed to access the natural numbers and their very very very rudimentary properties (since computable functions are only $\Sigma_1$ definable functions over $\Bbb N$).
Let $\varphi_n$ enumerate the sentences in the language of arithmetic. Now consider the real number whose $n$-th digit in the decimal expansion is $1$ if and only if $\Bbb N\models\varphi_n$, and $0$ otherwise. So it is a number in $[0,1]$.
This number is of course definable in the language of set theory, since the set of true sentences in $\Bbb N$ is definable; but it is not a computable real number since there is no computable function telling us what is true in $\Bbb N$ and what isn't (not even arithmetical, to be more accurate).
We can also take the following approach, as I suggest in the comments to the original question.
Note that every computable real lies in $L$, by absoluteness arguments (every computable functions lies there), and in $L$ there is a definable well-ordering of the reals (even with a $\Delta^1_3$ definition!), so there is a least real in the canonical well-ordering which is not definable.
Since the set "the real numbers which also lie in $L$" cannot change between models of $\sf ZF$ with the same ordinals, this set always has a canonical, definable well-ordering in any model of $\sf ZF$, and this indeed gives us a definition of a real number which is non-computable.
You can also argue that various generic reals are non-computable but definable, if you're willing to go this far as to consider different set theoretic universes (or at least one which can be seen as a nontrivial generic extension of some inner model).
For example Jensen reals are definable (they are the unique solution to a $\Pi^1_2$ predicate) but not computable.
Similarly, you can consider the iterated forcing that at the $n$-th step does the lottery sum between forcing $2^{\aleph_n}=\aleph_{n+1}$ and forcing $2^{\aleph_n}=\aleph_{n+2}$, at the limit step take a finite support limit, and consider the real number whose $n$-th decimal digit $1$ if and only if $2^{\aleph_n}=\aleph_{n+1}$, and $0$ otherwise.
This is a Cohen real which is definable, since it encodes the continuum below $\aleph_\omega$; but of course it is not computable by genericity arguments.
Note that this gives a very peculiar example of a real number, the one encoding the continuum function below $\aleph_\omega$. It is always definable, but in different models of $\sf ZFC$ it wil have different values, sometimes they will be computable (e.g. if $\sf GCH$ holds) and sometimes they could be non-computable (as above).
So this gives us a definition of a real number which is not provably computable and not provably uncomputable!

- 393,674
-
-
2
-
2I'd be happy to hear verbally about the mistakes in this answer! Silent downvotes might speak volumes, but it can often be in a foreign language, even more so when they are countered by many upvotes. – Asaf Karagila May 05 '15 at 10:00
-
Hmm... second downvote. I'd really love to hear some actual criticism. Although I can't help but feel that maybe the criticism begins and ends with "It was written by Asaf Karagila", which admittedly is not that constructive. But if anyone has any idea what's wrong with this answer, I'd be interested to hear about that! – Asaf Karagila May 05 '15 at 15:45
-
Could you elaborate on how you define a real number by doing those forcings? – Mario Carneiro May 06 '15 at 01:22
-
I've no idea what the downvoters are thinking, but maybe your answer just goes over their head and so it is not, strictly speaking, useful to them? Haha.. – user21820 May 06 '15 at 04:02
-
@Mario: Jensen reals are a bit complicated, but it is a real constructed over $L$, using $\lozenge$ and perfect trees. As I wrote, it is a unique solution to a projective predicate, so it is definable. In the case of the Cohen real encoding the continuum, what else should I add? – Asaf Karagila May 06 '15 at 04:29
-
@user21820: Well, I gave a plain example of a non-computable real (which by the way, lies in $L$ since we brought up this topic), and then jumped the shark with my awesome "definable but computably independent" real suggestions. :-) – Asaf Karagila May 06 '15 at 05:07
-
To be perfectly honest, I haven't really worked in any detail with forcing arguments, so it is still very much a black box to me. After reading about Cohen reals on WP, I don't think it would be easy to explain concisely. It seems like the idea is to find a generic filter of Borel sets, which then must converge to a real number. But how does the choice of cardinal powers translate to a condition in the Borel sets? – Mario Carneiro May 06 '15 at 08:31
-
@Mario: You're right, Cohen reals are not easy to explain concisely, especially if you're not very familiar with forcing arguments, even more so to explain why the resulting real in this example is in fact a Cohen real. I'm afraid that this question that you ask goes beyond the scope of this site. If you happen to visit Israel any time soon, I'll be more than happy to give you the whole story. – Asaf Karagila May 06 '15 at 08:59
-
"(...)whereas computable real numbers are only allowed to access the natural numbers and their very very very rudimentary properties (since computable functions are only Σ1 definable functions over ℕ)". Why this restriction? – Clearer May 14 '18 at 13:08
-
Here is a non-computable real number: $$\sum_{i=1}^\infty 2^{-\Sigma(i)}$$ where $\Sigma$ is any busy beaver function.

- 82,796
-
2
-
5@cfh: Since the Busy Beaver function is a well-defined function, yes. How could it not be well-defined? – Asaf Karagila May 04 '15 at 16:04
-
1
-
22The sum converges since it is bounded above by $\sum_{i\ge 1} 2^{-i}$, which is geometric. – vadim123 May 04 '15 at 16:07
-
4
-
A BB function seems to be quite an overkill for this purpose, since the Halting Problem (or any other undecidable problem) immediately gives such a number as $(0.x_1x_2x_3...)_2$, where $x_i$ is the characteristic function of the corresponding undecidable set. I've posted an answer accordingly. – r.e.s. May 06 '15 at 05:42
-
4How does our knowledge that this sum cannot be computed prove that the number itself is not (coincidentally, and necessarily unbeknownst to us) computable via some other algorithm? – Kyle Strand May 23 '15 at 23:17
-
1....in the same way that the outputs of busy-beaver functions themselves are computable (since they're integers) but their value is not (computably) knowable? – Kyle Strand Mar 10 '16 at 00:17
-
@KyleStrand The OP's number (call it $x$) is noncomputable, meaning that there is no finite, terminating algorithm that computes $x$ to arbitrary precision. This follows from the fact that the function $\Sigma$ is noncomputable. (If there were such an algorithm, then, for any $n$, it could be used to count and return the number of binary digits of $x$ until the $n$th $1$ appears, and that count would be $\Sigma(n)$, contradicting the noncomputability of $\Sigma.$) – r.e.s. Jul 18 '19 at 01:07
-
@r.e.s. My point is that there may be a function that would compute those digits to arbitrary precision, but which we cannot know does so. – Kyle Strand Jul 18 '19 at 02:13
-
@KyleStrand Noncomputability means that such an algorithm does not exist. It's not the case that it might "exist without being known." – r.e.s. Jul 18 '19 at 03:23
-
2@r.e.s. that is precisely my point. The formula above defines some number, but it is impossible to calculate the number from the formula itself. I do not believe this is sufficient to demonstrate that there exists no algorithm for calculating the number, even though there cannot exist an algorithmically verifiable proof of the correspondence between the number defined by The Busy Beaver formula and any calculable formula. – Kyle Strand Jul 18 '19 at 03:48
-
Note that, as I said above, the busy beaver numbers themselves have calculable formulas that exist without being known. – Kyle Strand Jul 18 '19 at 03:55
-
@KyleStrand Perhaps your questions can be seen as challenging the Church-Turing thesis; otherwise, if algorithms are understood as implementable in a Turing-equivalent language, then it is provably impossible that an algorithm for the OP's number "exists without being known". – r.e.s. Jul 18 '19 at 14:00
-
The probability that a random computer program will run forever is not computable. http://en.wikipedia.org/wiki/Chaitin%27s_constant
That some aspects of our concepts in this area are problematic is illustrated by the following example, which I learned from Hartley Rogers' book on computability: let $$ f(x) = \begin{cases} 1 & \text{if there is a sequence of }x\text{ consecutive 7s in the decimal expansion of }\pi, \\ 0 & \text{otherwise}. \end{cases} $$ This is computable! And there is an easy argument for its computability. And the algorithm for computing this function is really really simple. One can prove that easily, but no one knows, nor is it at all easy to know, which algorithm it is.
-
Could you elaborate what qualifies as a 'really really simple' for the algorithm of $f$? – orlp May 04 '15 at 18:03
-
6It is either identical to g (x) = 1 for all x, or it is identical to h (x) = 1 if x ≤ n, and h (x) = 0 otherwise, for some value of n. In any case, it is very easy to compute. The only problem is that we don't know which one it is and what the value of n would be. – gnasher729 May 04 '15 at 18:09
-
1@orlp : The algorithm is one of the following. If there is no longest sequence of consecutive $7$s, then always return $1$. If there is a longest such sequence, return $1$ if $x\le{}$the length of that longest sequence, and otherwise $0$. That gives you an infinite sequence of algorithms, each really simple. But WHICH one is the right one? No one knows. ${}\qquad{}$ – Michael Hardy May 04 '15 at 18:28
-
@MichaelHardy It is computable, but not nessesarily terminating. Just generate a moving window of size $x$ of the digits of $\pi$ and check if all of them are $7$. – NightRa Aug 28 '15 at 10:11
-
@NightRa : Computability as usually defined does not follow from your comment. ${}\qquad{}$ – Michael Hardy Aug 28 '15 at 14:45
If we consider an enumeration of all possible pairs of turing machines and inputs, then we can let $S$ denote the set of those positive integers $n$ for which the $n$th pair halts. Now this number $x$ will be well-defined but uncomputable:
$$x = \frac 1 3 + 4\sum_{n \in S} 10^{-n}$$
$x$ will consist of a sequence of decimals all of which are either 3 or 7. The $n$th decimal will be 7 if the $n$th pair of turing machine and input halts, and 3 otherwise. In other words computing a decimal of $x$ is equivalent to solving an instance of the halting problem.
What is also interesting about $x$ is that there is a simple constructive algorithm to produce a sequence of rational numbers, that converge towards $x$.
- Initialize $a := \frac 1 3$
- For $i \in \mathbb{N}$ do:
- Simulate the first $i$ turing machines for the first $i$ steps.
- For each turing machine $n$ which halted and did not halt for any lower $i$:
- $a := a + 4 \cdot 10 ^{-n}$
- Output $a$
This shows that it possible for a computable sequence of rational numbers to converge on a non-computable number. This is a bit more than what you asked for, but to me this particular example gave me a better feeling for what the boundary of compatibility looks like.

- 423
-
How is this more than what was asked? The rational numbers are dense in $\Bbb R$. So if there is an uncomputable real, there is a sequence of rationals converging to it. – Asaf Karagila May 05 '15 at 04:14
-
@AsafKaragila Because in this case the sequence is computable. Every number in $\mathbb{R}$ will be the limit of a sequence of rational numbers, but for most of them the sequence will not be computable. – kasperd May 05 '15 at 05:13
-
@AsafKaragila: He means that there is a Turing machine that outputs a sequence of Turing machines that all halt and whose output converges to the uncomputable real number. There just isn't a Turing machine that outputs the sequence of digits of that real number. The crucial difference is that the sequence converges at an uncomputable rate but outputting the digits in order requires a linear convergence. kasperd, you might want to include such kinds of detail in your answer to make it more complete. =) – user21820 May 05 '15 at 12:17
The Chaitin's constant is a well defined number in computability theory, but it is not computable. But, about the concept of definable number see the answers to Definable real numbers.

- 62,675
The simplest is perhaps the uncomputable real number whose binary expansion is $$0.x_1x_2x_3...$$ where $$x_i = \begin{cases} 1 & \text{if }T_i\text{ eventually halts}\\ 0 & \text{otherwise} \end{cases} $$ and $T_i$ is the $i$th Turing machine (in some chosen ordering) with an initially blank tape.

- 14,371