1

I have come up with an explanation for the countability of the reals and I am wondering where I went wrong.

In the lambda calculus, all integers can be represented by functions fairly simply. Rationals are represented as pairs of integers. Reals are represented as limits of rational functions.

I have come up with a simple way to demonstrate this. To represent $n\in\mathbb R$, use a function $f$ such that $\lim_{x\to\infty} f(x) = n$. For example, $\sqrt 2$ can be represented using its continuous fraction, in the lambda calculus $\lambda n.ng(0)$, where $g(x) = 1/(2+x)$. This calls the $g$ function $n$ times. $g$ and $0$ can be represented in the lambda calculus as well.

Next, I will show that all functions in the lambda calculus are countable using the SKI combinator calculus. Any function can be represented as a string of S, K, (, ), and optionally I, so the $n$th function could be the $n$th valid string of these characters.

If all functions in the lambda calculus are countable and all reals can be represented as function in the lambda calculus, then the reals must be countable, but this is of course false. Where did I err?

afuous
  • 185
  • 1
    I think the error lies in assuming that all reals can be written that way (that is, in the form $\lim f(x)$ where $f$ is a function in the lambda calculus). I don't know much about the lambda calculus, but I think what you're describing is similar to Turing's notion of "computable number." In Turing's paper, he proved the existence of uncomputable numbers, and — using Cantor's diagonal argument — gave an example of one. (He didn't supply any of its digits. That would take too much effort.) – Akiva Weinberger Apr 07 '15 at 15:05
  • 2
    How do you know that there exists a function in the lambda calculus converging to $x$ for any given real $x$? – Zach Effman Apr 07 '15 at 15:07
  • ("Computable number" — roughly, one whose digits can be given by an algorithm. There are algorithms that give us the digits of, say, $\frac13$ or $\pi$ or $e$ or $\sqrt2$. Probably all real numbers you've heard of are computable. Going a big meta: Turing proved that there is no general algorithm that determines whether or not a given algorithm outputs a real number. Turing originally defined "algorithm" in terms of what are now called Turing machines, but defining it to be a code in some given computer programming language works.) – Akiva Weinberger Apr 07 '15 at 15:12
  • I see. This would not work for uncomputable numbers. On the bright side, this does show that the computable numbers are countable. – afuous Apr 07 '15 at 15:14
  • 1
    You are exactly correct, the computable numbers are countable, for exactly the reason that you said. Relevant: Are there any examples of non-computable real numbers? – MJD Apr 07 '15 at 15:45
  • I have a copy of The Annotated Turing by Petzold, which I recommend. (Turing actually assigns an integer to every computable number. Well, there's more than one integer for every computable number, but at most one computable number for every integer. Using Cantor's diagonal argument doesn't give us a new computable number, though, mostly since no algorithm can tell us whether a given integer corresponds to a computable number or not.) – Akiva Weinberger Apr 07 '15 at 15:55
  • EDIT: "Integer" should be "natural number." – Akiva Weinberger Apr 07 '15 at 16:01

0 Answers0