In , Ishihara introduced the following two lemmas in which, surprisingly, we can use completeness to make a decision which at first sight would seem to be impossible with purely constructive techniques (that is, with intuitionistic, rather than classical, logic). (Bridges, van Dalen, Ishihara: Ishihara’s proof technique in constructive analysis)
One does not have to be interested in mathematical analysis to appreciate it, however, it is enough to think about a sequence of computation steps and a measure of "distance" between every two consecutive computation steps. If one can prove that for a sequence the distance gets smaller and smaller as time goes on we say that the computation converges or is Cauchy. When we consider these converging processes of computation as inhabitants of some universe X we can say that X is a complete metric space.
Here I want to give a simpler (more predicative) proof of Bridges-vanDalen-Ishiharas's Proposition 1, which more obviously gives rise to a program than theirs.
Proposition 1. If X is a complete metric space, X=P∪Q, (x_n) is a sequence in X that converges to x and we have ∀y:X, x#y ∨ y∉Q, then we have that (∀n. x_n ∈ P) or (∃ n. x_n ∈ Q).
The role of x, y as members of X is to stand for a sequence (x_n), (y_n) together with a proof that the sequences make progress as time progresses, i.e. they are Cauchy/converging. The relation '#' is called apartness and it means that the two computation processes are not 'the same'.
Proof. Start with a sequence (x_n). Define the binary sequence λ to be 0 as far as the elements of the sequence (x_n) are in P, and to become 1 forever as soon as one of the elements of (x_n) is in Q.
Now define the sequence (y_n) to be x as far as λ_n is 0 and to become x_k as soon as λ_n becomes 1, where k is the smallest natural number at which λ becomes 1, i.e. the k-th element of the sequence (x_n) is in Q. The sequence (y_n) we defined is very similar to a constant sequence: it is either x forever, or it is x for a finite number of starting elements and then it becomes x_k forever.
In any case (y_n) is Cauchy, so we can think of it as an entity y from the universe X. We now use the hypothesis given in Proposition 1 and look at two cases.
- if x#y then there is k, the smallest number such that λ_k = 1, which implies x_k ∈ Q
- if y∉Q then we can show that ¬∃n. λ_n = 1 and, since λ is decidable, ∀n. λ_n = 0, which implies ∀n. x_n ∈ P
Apparently, in constructive analysis they use Proposition 1 (and 2, which was not shown) as constructive instances of the general law of excluded middle. Is it useful in logic and computer science?