To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Ramsey's theorem is a combinatorial result about finite sets with a proof that has interesting logical features. To prove this result about finite sets, we are first going to prove, in section 26.1, an analogous result about infinite sets, and are then going to derive, in section 26.2, the finite result from the infinite result. The derivation will be an application of the compactness theorem. Nothing in the proof of Ramsey's theorem to be presented requires familiarity with logic beyond the statement of the compactness theorem, but at the end of the chapter we indicate how Ramsey theory provides an example of a sentence undecidable in P that is more natural mathematically than any we have encountered so far.
Ramsey's Theorem: Finitary and Infinitary
There is an old puzzle about a party attended by six persons, at which any two of the six either like each other or dislike each other: the problem is to show that at the party there are three persons, any two of whom like each other, or there are three persons, any two of whom dislike each other.
The solution: Let a be one of the six. Since there are five others, either there will be (at least) three others that a likes or there will be three others that a dislikes. Suppose a likes them. (The argument is similar if a dislikes them.) Call the three b, c, d.
This chapter connects our work on computability with questions of logic. Section 11.1 presupposes familiarity with the notions of logic from Chapter 9 and 10 and of Turing computability from Chapters 3–4, including the fact that the halting problem is not solvable by any Turing machine, and describes an effective procedure for producing, given any Turing machine M and input n, a set of sentences Г and a sentence D such that M given input n will eventually halt if and only if Г implies D. It follows that if there were an effective procedure for deciding when a finite set of sentences implies another sentence, then the halting problem would be solvable; whereas, by Turing's thesis, the latter problem is not solvable, since it is not solvable by a Turing machine. The upshot is, one gets an argument, based on Turing's thesis for (the Turing–Büchi proof of) Church's theorem, that the decision problem for implication is not effectively solvable. Section 11.2 presents a similar argument–the Gödel-style proof of Church's theorem–this time using not Turing machines and Turing's thesis, but primitive recursive and recursive functions and Church's thesis, as in Chapters 6–7. The constructions of the two sections, which are independent of each other, are both instructive; but an entirely different proof, not dependent on Turing's or Church's thesis, will be given in a later chapter, and in that sense the present chapter is optional. […]
Suppose that a sentence A implies a sentence C. The Craig interpolation theorem tells us that in that case there is a sentence B such that A implies B, B implies C, and B involves no nonlogical symbols but such as occur both in A and in B. This is one of the basic results of the theory of models, almost on a par with, say, the compactness theorem. The proof is presented in section 20.1. The proof for the special case where identity and function symbols are absent is an easy further application of the same lemmas that we have applied to prove the compactness theorem in Chapter 13, and could have been presented there. But the easiest proof for the general case is by reduction to this special case, using the machinery for the elimination of function symbols and identity developed in section 19.4. Sections 20.2 and 20.3, which are independent of each other, take up two significant corollaries of the interpolation theorem, Robinson's joint consistency theorem and Beth's definability theorem.
Craig's Theorem and Its Proof
We begin with a simple observation.
Proposition. If a sentence A implies a sentence C, then there is a sentence B that A implies, that implies C, and that contains only such constants as are contained in both of A and C.
Tarski's theorem tells us that the set V of (code numbers of) first-order sentences of the language in arithmetic that are true in the standard interpretation is not arithmetically definable. In section 23.1 we show that this negative result is poised, so to speak, between two positive results. One is that for each n the set Vn of sentences of the language of arithmetic of degree of complexity n that are true in the standard interpretation is arithmetically definable (in a sense of degree of complexity to be made precise). The other is that the class {V} of sets of natural numbers whose one and only member is V is arithmetically definable (in a sense of arithmetical definability for classes to be made precise). In section 23.2 we take up the question whether the class of arithmetically definable sets of numbers is an arithmetically definable class of sets. The answer is negative, according to Addison's theorem. This result is perhaps most interesting on account of its method of proof, which is a comparatively simple application of the method of forcing originally devised to prove the independence of the continuum hypothesis in set theory (as alluded to in the historical notes to Chapter 18).
Arithmetical Definability and Truth
Throughout this chapter we use L and N for the language of arithmetic and its standard interpretation (previously called L* and N*), and V for the set of code numbers of first-order sentences of L ture in N.
The intuitive notion of an effectively computable function is the notion of a function for which there are definite, explicit rules, following which one could in principle compute its value for any given arguments. This chapter studies an extensive class of effectively computable functions, the recursively computable, or simply recursive, functions. According to Church's thesis, these are in fact all the effectively computable functions. Evidence for Church's thesis will be developed in this chapter by accumulating examples of effectively computable functions that turn out to be recursive. The subclass of primitive recursive functions is introduced in section 6.1, and the full class of recursive functions in section 6.2. The next chapter contains further examples. The discussion of recursive computability in this chapter and the next is entirely independent of the discussion of Turing and abacus computability in the preceding three chapters, but in the chapter after next the three notions of computability will be proved equivalent to each other.
Primitive Recursive Functions
Intuitively, the notion of an effectively computable function f from natural numbers to natural numbers is the notion of a function for which there is a finite list of instructions that in principle make it possible to determine the value f(x1, …, xn) for any arguments x1, …, xn. The instructions must be so definite and explicit that they require no external sources of information and no ingenuity to execute.
In the preceding chapter we introduced the distinction between enumerable and nonenumerable sets, and gave many examples of enumerable sets. In this short chapter we give examples of nonenumerable sets. We first prove the existence of such sets, and then look a little more closely at the method, called diagonalization, used in this proof.
Not all sets are enumerable: some are too big. For example, consider the set of all sets of positive integers. This set (call it P*) contains, as a member, each finite and each infinite set of positive integers: the empty set Ø, the set P of all positive integers, and every set between these two extremes. Then we have the following celebrated result.
Theorem (Cantor's Theorem). The set of all sets of positive integers is not enumerable.
Proof: We give a method that can be applied to any list L of sets of positive integers in order to discover a set Δ(L) of positive integers which is not named in the list. If you then try to repair the defect by adding Δ(L) to the list as a new first member, the same method, applied to the augmented list L* will yield a different set Δ(L*) that is likewise not on the augmented list.
The method is this. Confronted with any infinite list L
of sets of positive integers, we define a set Δ(L) as follows:
(*) For each positive integer n, n is in Δ(L) if and only if n is not in Sn.
Modal logic extends ‘classical’ logic by adding new logical operators ▪ and ♦ for ‘necessity’ and ‘possibility’. Section 27.1 is an exposition of the rudiments of (sentential) modal logic. Section 27.2 indicates how a particular system of modal logic GL is related to the kinds of questions about provability in P we considered in Chapters 17 and 18. This connection motivates the closer examination of GL then undertaken in section 27.3.
Modal Logic
Introductory textbooks in logic devote considerable attention to a part of logic we have not given separate consideration: sentential logic. In this part of logic, the only nonlogical symbols are an enumerable infinity of sentence letters, and the only logical operators are negation, conjunction, and disjunction: ∼,&,∨. Alternatively, the operators may be taken to be the constant false (⊥) and the conditional (→). The syntax of sentential logic is very simple: sentence letters are sentences, the constant ⊥ is a sentence, and if A and B are sentences, so is (A → B).
The semantics is also simple: an interpretation is simply an assignment ω of truth values, true (represented by 1) or false (represented by 0), to the sentence letters. The valuation is extended to formulas by letting ω(⊥)=0, and letting ω(A → B) = 1 if and only if, if ω(A) = 1, then ω(B) = 1. In other words, ω(A → B) = 1 if ω(A) = 0 or ω(B) = 1 or both, and ω(A → B) = 0 if ω(A) = 1 and ω(B) = 0.
By a model of (true) arithmetic is meant any model of the set of all sentences of the language L of arithmetic that are true in the standard interpretation N. By a nonstandard model is meant one that is not isomorphic to N. The proof of the existence of an (enumerable) nonstandard model of arithmetic is as an easy application of the compactness theorem (and the Löwenheim–Skolem theorem). Every enumerable nonstandard model is isomorphic to a nonstandard model M whose domain is the same as that of N, namely, the set of natural numbers; though of course such an M cannot assign the same denotations as N to the nonlogical symbols of L. In section 25.1 we analyze the structure of the order relation in such a nonstandard model. A consequence of this analysis is that, though the order relation cannot be the standard one, it at least can be a recursive relation. By contrast, Tennenbaum's theorem tells us that it cannot happen that the addition and multiplication relations are recursive. This theorem and related results will be taken up in section 25.2. Section 25.3 is a sort of appendix (independent of the other sections, but alluding to results from several earlier chapters) concerning nonstandard models of an expansion of arithmetic called analysis.
Order in Nonstandard Models
Let M be a model of (true) arithmetic not isomorphic to the standard model N.
In the preceding chapter we introduced the notion of Turing computability. In the present short chapter we give examples of Turing-uncomputable functions: the halting function in section 4.1, and the productivity function in the optional section 4.2. If Turing's thesis is correct, these are actually examples of effectively uncomputable functions.
The Halting Problem
There are too many functions from positive integers to positive integers for them all to be Turing computable. For on the one hand, as we have seen in problem 2.2, the set of all such functions is nonenumerable. And on the other hand, the set of Turing machines, and therefore of Turing-computable functions, is enumerable, since the representation of a Turing machine in the form of quadruples amounts to a representation of it by a finite string of symbols from a finite alphabet; and we have seen in Chapter 1 that the set of such strings is enumerable. These considerations show us that there must exist functions that are not Turing computable, but they do not provide an explicit example of such a function. To provide explicit examples is the task of this chapter. We begin simply by examining the argument just given in slow motion, with careful attention to details, so as to extract a specific example of a Turing-uncomputable function from it.
To begin with, we have suggested that we can enumerate the Turing-computable functions of one argument by enumerating the Turing machines, and that we can enumerate the Turing machines using their quadruple representations.
A normal form theorem of the most basic type tells us that for every formula A there is a formula A* of some special syntactic form such that A and A* are logically equivalent. A normal form theorem for satisfiability tells us that for every set г of sentences there is a set г* of sentences of some special syntactic form such that г and г* are equivalent for satisfiability, meaning that one will be satisfiable if and only if the other is. In section 19.1 we establish the prenex normal form theorem, according to which every formula is logically equivalent to one with all quantifiers at the beginning, along with some related results. In section 19.2 we establish the Skolem normal form theorem, according to which every set of sentences is equivalent for satisfiability to a set of sentences with all quantifiers at the beginning and all quantifiers universal. We then use this result to give an alternative proof of the Löwenheim–Skolem theorem, which we follow with some remarks on implications of the theorem that have sometimes been thought ‘paradoxical’. In the optional section 19.3 we go on to sketch alternative proofs of the compactness and Gödel completeness theorems, using the Skolem normal form theorem and an auxiliary result known as Herbrand's theorem. In section 19.4 we establish that every set of sentences is equivalent for satisfiability to a set of sentences not containing identity, constants, or function symbols. […]
This chapter is entirely devoted to the proof of the compactness theorem. Section 13.1 outlines the proof, which reduces to establishing two main lemmas. These are then taken up in sections 13.2 through 13.4 to complete the proof, from which the Löwenheim–Skolem theorem also emerges as a corollary. The optional section 13.5 discusses what happens if nonenumerable languages are admitted: compactness still holds, but the Löwenheim–Skolem theorem in its usual ‘downward’ form fails, while an alternative ‘upward’ theorem holds.
Outline of the Proof
Our goal is to prove the compactness theorem, which has already been stated in the preceding chapter (in section 12.3). For convenience, we work with a version of firstorder logic in which the only logical operators are ∼, ∨, and ∃, that is, in which & and ∀ are treated as unofficial abbreviations. The hypothesis of the theorem, it will be recalled, is that every finite subset of a given set of sentences is satisfiable, and the conclusion we want to prove is that the set itself is satisfiable, or, as we more elaborately put it, belongs to the set S of all satisfiable sets of sentences. As a first step towards the proof, we set down some properties enjoyed by this target set S. The reason for not including & and ∀ officially in the language is simply that in this and subsequent lemmas we would need four more clauses, two for & and two for ∀.
A function is effectively computable if there are definite, explicit rules by following which one could in principle compute its value for any given arguments. This notion will be further explained below, but even after further explanation it remains an intuitive notion. In this chapter we pursue the analysis of computability by introducing a rigorously defined notion of a Turing-computable function. It will be obvious from the definition that Turing-computable functions are effectively computable. The hypothesis that, conversely, every effectively computable function is Turing computable is known as Turing's thesis. This thesis is not obvious, nor can it be rigorously proved (since the notion of effective computability is an intuitive and not a rigorously defined one), but an enormous amount of evidence has been accumulated for it. A small part of that evidence will be presented in this chapter, with more in chapters to come. We first introduce the notion of Turing machine, give examples, and then present the official definition of what it is for a function to be computable by a Turing machine, or Turing computable.
A superhuman being, like Zeus of the preceding chapter, could perhaps write out the whole table of values of a one-place function on positive integers, by writing each entry twice as fast as the one before; but for a human being, completing an infinite process of this kind is impossible in principle.
In the preceding chapter we connected our work on recursion with our work on formulas and proofs in one way, by showing that various functions associated with formulas and proofs are recursive. In this chapter we connect the two topics in the opposite way, by showing how we can ‘talk about’ recursive functions using formulas, and prove things about them in theories formulated in the language of arithmetic. In section 16.1 we show that for any recursive function f, we can find a formula φf such that for any natural numbers a and b, if f(a) = b then ∀y(φf (a, y) ↔ y = b) will be true in the standard interpretation of the language of arithmetic. In section 16.2 we strengthen this result, by introducing a theory Q of minimal arithmetic, and showing that for any recursive function f, we can find a formula ψf such that for any natural numbers a and b, if f(a) = b then ∀y(ψf (a, y) ↔ y =b) will be not merely true, but provable in Q. In section 16.3 we briefly introduce a stronger theory P of Peano arithmetic, which includes axioms of mathematical induction, and explain how these axioms enable us to prove results not obtainable in Q. The brief, optional section 16.4 is an appendix for readers interested in comparing our treatment of these matters here with other treatments in the literature.
The original authors of this work, the late George Boolos and Richard Jeffrey, stated in the preface to the first edition that the work was intended for students of philosophy, mathematics, or other fields who desired a more advanced knowledge of logic than is supplied by an introductory course or textbook on the subject, and added the following:
The aim has been to present the principal fundamental theoretical results about logic, and to cover certain other meta-logical results whose proofs are not easily obtainable elsewhere. We have tried to make the exposition as readable as was compatible with the presentation of complete proofs, to use the most elegant proofs we knew of, to employ standard notation, and to reduce hair (as it is technically known).
Such have remained the aims of all subsequent editions.
The “principal fundamental theoretical results about logic” are primarily the theorems of Gödel, the completeness theorem, and especially the incompleteness theorems, with their attendant lemmas and corollaries. The “other meta-logical results” included have been of two kinds. On the one hand, filling roughly the first third of the book, there is an extended exposition by Richard Jeffrey of the theory of Turing machines, a topic frequently alluded to in the literature of philosophy, computer science, and cognitive studies but often omitted in textbooks on the level of this one.
Showing that a function is Turing computable directly, by giving a table or flow chart for a Turing machine computing the function, is rather laborious, and in the preceding chapters we did not get beyond showing that addition and multiplication and a few other functions are Turing computable. In this chapter we provide a less direct way of showing functions to be Turing computable. In section 5.1 we introduce an ostensibly more flexible kind of idealized machine, an abacus machine, or simply an abacus. In section 5.2 we show that despite the ostensible greater flexibility of these machines, in fact anything that can be computed on an abacus can be computed on a Turing machine. In section 5.3 we use the flexibility of these machines to show that a large class of functions, including not only addition and multiplication, but exponentiation and many other functions, are computable on a abacus. In the next chapter functions of this class will be called recursive, so what will have been proved by the end of this chapter is that all recursive functions are Turing computable.
Abacus Machines
We have shown addition and multiplication to be Turing-computable functions, but not much beyond that. Actually, the situation is even a bit worse. It seemed appropriate, when considering Turing machines, to define Turing computability for functions on positive integers (excluding zero), but in fact it is customary in work on other approaches to computability to consider functions on natural numbers (including zero).