Desperately Seeking Integers
A few twists on Turing’s proof of undecidability of predicate calculus
|
| By permission of Rich Longmore, artist, blog source |
Alan Turing presaged Stephen Cook’s proof of -completeness of
Turing reduced the halting problem for his machines to the decision problem of the first-order predicate calculus, thus showing (alongside Alonzo Church) that the latter is undecidable. Cook imitated Turing’s reduction at the level of propositional calculus and with a nondeterministic machine.
Today we present a version of Turing’s proof and show how it answers a side issue raised in our previous post.
Completely aside from the ongoing work by Harvey Friedman previewed in that post, we—that is Dick and Ken—were interested in the boundary between decidable and undecidable theories in logic. We noted Michael Rabin’s theorem that the theory of the rationals with order is decidable with first-order quantifiers and second-order quantifiers allowed only over unary predicates—that is, over subsets of
We sketched how quantifiers over ternary predicates—that is, over subsets of
—enable defining properties of
and
from which undecidability follows by the mentioned theorem of Julia Robinson.
This left the binary case. Most in particular, we were interested in the decision problem for second-order sentences of the form
where the only predicate symbols in (besides
and
) are
and
has only first-order quantifiers. We were given references to papers by László Kalmár and William Quine but judging from this by Church and Quine (see page 183 and also this and this plus these slides) we wonder what extra is involved, for instance pairing. Our search for a crisp and brief proof led back to Turing’s first-order theorem.
Defining a Stairway
Our starting point is to build a predicate so that
will define a set with properties needed of the integers. Our intent is to make
define a kind of ceiling function
the least “integer”
The first rules we write say that
is a functional relationship:
-
For each
there is a unique
so that
:
and
Thus
defines the desired function
The further rules we need are:
-
The function
is non-decreasing.
-
The function
is a “step-like” function:
This means that
is constant on an interval.
- We add one more rule for good measure but it does not do all we might expect:
-
The function
tends to infinity:
Now all we need is to define the successor relation via more rules and postulate an element to act as zero. The rules for successor
are:
Among several ways to handle we find it most thematic is to leave it unquantified and assert
This will be on the left-hand side of implications of the form
Any interpretation—that is, any assignment of a function on
for
and a value for
—that makes all the
parts true will make
the bottom of a stairway that has infinitely many steps above
Let
be the conjunction of
and all the above rules.
The last rule for might seem to imply the stairway climbs to infinity. As we’ll discuss, this is not enough to make a single “stairway to heaven.” But it does provide that any angel who climbs some number
of steps above
will need exactly
steps to get back down to
Encoding Computations
Proofs of Turing’s theorem such as this implicitly use relations like and
for binary strings on Turing machine tapes, which numerically work out to
and
We will use a universal two-counter machine instead. We don’t need the arithmetic details of why it is universal, such as Marvin Minsky’s coding trick. The machine input is in unary but we can just define it as a natural number
To represent the current state and the counters at any time
, we use three more binary predicates:
-
the machine is in state
at time
-
counter 1 holds value
at time
-
counter 2 holds value
at time
We can write rules to make these functions of The program has a finite number of states and so we can (if we wish) use dedicated symbols
for them. We can take
as the start state. Following Minsky, we need only two kinds of instructions:
-
: If in state
, increment counter
and go to state
-
: If in state
and counter
is zero, go to state
, else decrement counter
and go to state
Each state has exactly one of these instructions except the halting state The rules corresponding to these instructions all have the form
where is
In case the instruction for state is
we have
as
whereas in case the instruction is a conditional jump we get
as
We conjoin all the machine rules into one finite formula The conditions to start in state
on a given input value
are:
Here we mean to be a fixed natural number but we can’t say so literally, so what
includes are terms
until we get to the fixed value
Finally, the condition to halt eventually in state
is:
Turing’s Theorem
Now given any number , take
We want to decide whether is valid. Now
is first-order: we haven’t put in the existential quantifiers over the predicates yet. To be valid in our setting means that whatever relations on
are used for the four predicates
and whatever value is used for
, the resulting statement about rational numbers is true.
Theorem 1 The formula
is valid if and only if
on input
halts in state
Hence first-order predicate calculus is undecidable.
Proof: First suppose halts. We need only consider interpretations that make
true. Such interpretations set up the initial configuration of
with
standing for zero and make every instance of the universally quantified implications implications in
true. The chain of those instances eventually yields
where
is the number of steps
takes to halt. Thus
and hence
overall are made true.
Conversely, suppose is valid. Then we can pick the interpretation that makes
the actual integer ceiling function and
This makes
true so it must make
true with
ranging over the positive integers, which means that
must halt.
We seem to have sacrificed some generality by basing on , but in fact we used nothing about the rationals except
being a total order (including trichotomy:
). We could axiomatize those properties too. Alternatively, we could forgo equality
in favor of having function symbols as in the Turing machine-based proof mentioned above.
Ups and Downs in the Second-Order Case
Now we put the second-order quantifiers on the predicates in order to prove our desired theorem:
Theorem 2 Consider sentences of the form
where
is first-order. The problem of deciding whether
is true in
is undecidable.
A natural impulse is to take for a given input
as before. This leads to a notable issue, one that Ronald Fagin reminded us of. If
halts, we get that
(for that
) is true. Indeed—and this is a first hint that wires are crossed from the above proof—we can use the genuine integer ceiling function for the “
” part and the rest follows.
Conversely, suppose does not halt. The rub is that we can still make
true. Take
such that the derived set
, our set of “integers,”includes
Take
Then
is the successor of
for all
but
is not the successor of anything. Although the values of
for
are fixed for all
by actions of the machine, nothing prevents us from blithely defining
to be true. This makes
true too.
We forgot about the rule that grows unboundedly but it doesn’t help: we can just add the rest of the natural numbers to
Attempts to fix this by running
backwards from state
are forestalled by the possibility of adding
to
for all
as well—our axioms are too weak to prevent having infinitely many predecessors.
The upshot is that although we can will into existence multiple infinite staircases, we cannot guarantee a single staircase that goes to heaven. In broad terms, we cannot rule out taking a nonstandard integer number of steps to halt (for connections to
start here). But in this situation we can fix the problem by a simple twist (used also here).
Proof: Define by asserting instead that
doesn’t halt. That is, take
If doesn’t halt, then the standard assignment to
giving
and
works for that as well. The converse is now to suppose that
does halt in state
We need to show that there is no way to instantiate the four binary predicates and
to make the resulting sentence
true. By
it sets up the initial configuration. The
part leans only on features of
that the instantiation must make true. Thus successive configurations are forced by the implications in
to follow correctly, so that
is made true for some
that does belong to the staircase above
This immediately contradicts of
So
is false.
Thus is true if and only if
does not halt.
This finally answers the last post’s desire for showing concretely that second-order existential is undecidable with binary predicates, needing no reference other than Turing (OK: and Minsky). We would still like to trace this historically through the above-mentioned references to Kalmár and Quine and perhaps others. In contrast to great past attention to minimizing the alternation and number of quantifiers, we are curious also about minimizing the number of binary predicates. We note how this 1984 paper by Warren Goldfarb gets the number of binary predicates down to one but at a greater cost in unary predicates, of which above we’ve used none. We are also not sure how our setting with domain and a fixed meaning for
plays in the tradeoffs.
Open Problems
What is the best reference? Is there a nice and clean proof for the case of just one dyadic predicate? What other tradeoffs, such as between function symbols and predicates using equality (or exists-unique quantifiers), are in play here?
[added reference to Goldfarb paper and changed next sentence; changed picture at top with permission notice]



Trackbacks