It’s possible to work with real numbers constructively - a real number can be represented as a sequence (with a finite representation) converging to . For example, you can represent the square root of a rational number as a binary search sequence. Below is such a sequence generating .
At each step, we check:
- If we add a 1 to the binary representation, will the square of the result be less than 2?
- If so, add a 1; if not, add a 0.
But, while a real number is being generated by this process, each step of the process only involves rational numbers. Most notably, the comparisons that allow us to do the binary search are only allowed because comparison of rational numbers can be defined constructively. We cannot take comparison of real numbers for granted.
In fact, it is impossible to compare real numbers constructively. Let’s say we have two real numbers and , and we want to know whether . Obviously, we could just keep generating terms of their binary sequences until one of them has a 1 and the other has a 0 - but what happens if the two numbers are equal? In that case, the algorithm never terminates. So we have no general algorithm which compares two real numbers.
As it happens, we have no way of determining whether two real numbers are equal, either, for the same reason: a function that determines whether and are equal will not terminate if . You may think (since we’re working constructively) that we could use an alternative method: look at the processes by which and were constructed and somehow determine whether those processes are functionally identical. For example, if was constructed as , and as , then it is surely not beyond the reach of a computer to see that those constructions lead to identical results. But when you think about the infinite expanse of finitely representable processes capable of generating a given real number, it becomes clear that this method is not viable in the general case.
So we have no general way to compare real numbers. This means we can’t have discontinuities in our functions over the real numbers:
- A function of the form ” for , and for ” requires us to determine whether , which is impossible for the input .
- A function of the form ” for , and for ” will not be able to handle the input , as it will never conclude that , nor is it capable of concluding that .
- A function of the form ” for , and for ” breaks for the same reason as the previous.