We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings.
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 [email protected]
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.
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).
Introductory textbooks in logic devote much space to developing one or another kind of proof procedure, enabling one to recognize that a sentence D is implied by a set of sentences г, with different textbooks favoring different procedures. In this chapter we introduce the kind of proof procedure, called a Gentzen system or sequent calculus, that is used in more advanced work, where in contrast to introductory textbooks the emphasis is on general theoretical results about the existence of proofs, rather than practice in constructing specific proofs. The details of any particular procedure, ours included, are less important than some features shared by all procedures, notably the features that whenever there is a proof of D from г, D is a consequence of г, and conversely, whenever D is a consequence of г, there is a proof of D from г. These features are called soundness and completeness, respectively. (Another feature is that definite, explicit rules can be given for determining in any given case whether a purported proof or deduction really is one or not; but we defer detailed consideration of this feature to the next chapter.) Section 14.1 introduces our version or variant of sequent calculus. Section 14.2 presents proofs of soundness and completeness. The former is easy; the latter is not so easy, but all the hard work for it has been done in the previous chapter. […]
Suppose that, in addition to allowing quantifications over the elements of a domain, as in ordinary first-order logic, we allow also quantification over relations and functions on the domain. The result is called second-order logic. Almost all the major theorems we have established for first-order logic fail spectacularly for second-order logic, as is shown in the present short chapter. This chapter and those to follow generally presuppose the material in section 17.1. (They are also generally independent of each other, and the results of the present chapter will not be presupposed by later ones.)
Let us begin by recalling some of the major results we have established for first-order logic.
The compactness theorem: If every finite subset of a set of sentences has a model, the whole set has a model.
The (downward) Löwenheim–Skolem theorem: If a set of sentences has a model, it has an enumerable model.
The upward Löwenheim–Skolem theorem: If a set of sentences has an infinite model, it has a nonenumerable model.
The (abstract) Gödel completeness theorem: The set of valid sentences is semirecursive.
All of these results fail for second-order logic, which involves an extended notion of sentence, with a corresponding extension of the notion of truth of a sentence in an interpretation.
In this chapter we begin to bring together our work on logic from the past few chapters with our work on computability from earlier chapters (specifically, our work on recursive functions from Chapters 6 and 7). In section 15.1 we show how we can ‘talk about’ such syntactic notions as those of sentence and deduction in terms of recursive functions, and draw among others the conclusion that, once code numbers are assigned to sentences in a reasonable way, the set of valid sentences is semirecursive. Some proofs are deferred to sections 15.2 and 15.3. The proofs consist entirely of showing that certain effectively computable functions are recursive. Thus what is being done in the two sections mentioned is to present still more evidence, beyond that accumulated in earlier chapters, in favor of Church's thesis that all effectively computable functions are recursive. Readers who feel they have seen enough evidence for Church's thesis for the moment may regard these sections as optional.
Arithmetization of Syntax
A necessary preliminary to applying our work on computability, which pertained to functions on natural numbers, to logic, where the objects of study are expressions of a formal language, is to code expressions by numbers. Such a coding of expressions is called a Gödel numbering. One can then go on to code finite sequences of expressions and still more complicated objects.
Our ultimate goal will be to present some celebrated theorems about inherent limits on what can be computed and on what can be proved. Before such results can be established, we need to undertake an analysis of computability and an analysis of provability. Computations involve positive integers 1, 2, 3, … in the first instance, while proofs consist of sequences of symbols from the usual alphabet A, B, C, … or some other. It will turn out to be important for the analysis both of computability and of provability to understand the relationship between positive integers and sequences of symbols, and background on that relationship is provided in the present chapter. The main topic is a distinction between two different kinds of infinite sets, the enumerable and the nonenumerable. This material is just a part of a larger theory of the infinite developed in works on set theory: the part most relevant to computation and proof. In section 1.1 we introduce the concept of enumerability. In section 1.2 we illustrate it by examples of enumerable sets. In the next chapter we give examples of nonenumerable sets.
Enumerability
An enumerable, or countable, set is one whose members can be enumerated: arranged in a single list with a first entry, a second entry, and so on, so that every member of the set appears sooner or later on the list.
We are now in a position to give a unified treatment of some of the central negative results of logic: Tarski's theorem on the indefinability of truth, Church's theorem on the undecidability of logic, and Gödel's first incompleteness theorem, according to which, roughly speaking, any sufficiently strong formal system of arithmetic must be incomplete (if it is consistent). These theorems can all be seen as more or less direct consequences of a single exceedingly ingenious lemma, the Gödel diagonal lemma. This lemma, and the various negative results on the limits of logic that follow from it, will be presented in section 17.1. This presentation will be followed by a discussion in section 17.2 of some classic particular examples of sentences that can be neither proved nor disproved in theories of arithmetic like Q or P. Further such examples will be presented in the optional section 17.3. According to Gödel's second incompleteness theorem, the topic of the next chapter, such examples also include the sentence stating that P is consistent.
The Diagonal Lemma and the Limitative Theorems
By the results in the preceding chapter on the representability of recursive functions, we can ‘talk about’ such functions within a formal system of arithmetic. By the results of the chapter before that on the arithmetization of syntax, we can ‘talk about’ sentences and proofs in a formal system of arithmetic in terms of recursive functions.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
‘Welcome to the wonderful world of finite state machines.’
Introduction
Computation is a concept common to all computing machines, regardless of the messy details associated with their hardware implementation. However, actual computing machines/computers are too complicated (due to the several constraints caused by physical reality) for a manageable mathematical theory to be ascribed to them. Therefore, in order to fully understand the power and limitation of real machines, idealised computers or computational models are designed and studied. These idealised computers may be accurate in some ways but perhaps not in others.
There are several computational models and the purpose of a computational model is to capture the computational aspects that are relevant to the particular problem under consideration while hiding the other unimportant aspects. Thus, a computational model can be thought of as a custom machine designed to suit particular needs. Some of the important computational models are – deterministic finite automaton (DFA), the non-deterministic finite automaton (NFA), the deterministic pushdown automaton (DPDA), the nondeterministic pushdown automation (NPDA), the deterministic Turing machine (DTM) and the nondeterministic Turing machine (NTM). Undoubtedly each of these models has a special significance in the theory of computation. The most basic computational model is the deterministic finite automaton (DFA).
Finite Automata
As discussed in chapter 1, finite automaton is a mathematical model of a system with discrete inputs and outputs. Such a system can be in any one of the finite number of internal configurations or ‘states’ and each state of the system provides sufficient information concerning the past inputs so that the behaviour of the system could be studied on the provision of subsequent inputs.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University