J .Donald Monk
Mathematical Logic
Springer- Verlag New York
Heidelberg
Berlin 1976
to Dorothy
J. Donald Monk Depa...
54 downloads
937 Views
18MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
J .Donald Monk
Mathematical Logic
Springer- Verlag New York
Heidelberg
Berlin 1976
to Dorothy
J. Donald Monk Department of Mathemat~cs Un~vers~ty of Colorado Boulder, Colorado 80302
Editorial Board P. R. Halmos
F. W . Gehring
C. C . Moore
Mur~ugrrrgEdrtor
Un~versityof Michigan Department of Mathemat~cc Ann Arbor. M~chigan48104
Un~versityof Californ~aat Berkeley Depanment of Mathematics Berkeley, Califorma 94720
Univers~tyof Californ~a Depanment of Mathematics Santa Barbara. California 93106
A M S Subject Classifications Primary: 02-xx Secondary: ION-xx, 06-XX, 08-XX, 26A98
Library o f Congress Catalog~ngIn Publication Data Monk, James Donald, 1930 Mathematical logic. (Graduate texts in mathematics ; 37) Bibliography Includes indexes. 1. Logic, Symbolic and mathernat~cal.I. Title. 11. Series. QA9.M68 511'.3 75- 42416
All rights reserved No part of this book may be translated or reproduced in any form without written permission from Springer- Verlag.
@ 1976 by Springer-Verlag lnc. Printed in the United States of America
ISBN 0-387-90170-
1
Springer-Verlag
New York
ISBN 3- 540-90 170- I
Springer-Verlag
Berlin
Heidelberg
Preface
This book is a development of lectures given by the author numerous times at the University of Colorado, and once at the University of California, Berkeley. A large portion was written while the author worked at the Forschungsinstitut fur Mathematik, Eidgennossische Technische Hochschule, Ziirich. A detailed description of the contents of the book, notational conventions, etc., is found at the end of the introduction. The author's main professional debt is to Alfred Tarski, from whom he learned logic. Several former students have urged the author to publish such a book as this; for such encouragement I am especially indebted to Ralph McKenzie. I wish to thank James Fickett and Stephen Comer for invaluable help in finding (some of the) errors in the manuscript. Comer also suggested several of the exercises. J . Donald Monk October, 1975
Contents
Introduction Interdependence of sections Part I
Recursive Furzctiorl Theory 1. Turing machines
2. 3. *4. 5. 6. 7.
Elementary recursive and primitive recursive functions Recursive functions; Turing computability Markov algorithms Recursion theory Recursively enumerable sets Survey of recursion theory
Part I1
Elemerlts of Logic *8. *9. 10. 1I. * 12.
Sentential logic Boolean algebra Syntactics of first-order languages Some basic results of first-order logic Cylindric algebras
Introduction
Part I11
Decidable and Urzdecidahle Theories 13. 14. 15. 16. 17.
Some decidable theories Implicit definability in number theories General theory of undecidability Some undecidable theories Unprovability of consistency
Part 1V
Model Theory 18. 19. *20. 21. 22. *23. 24. 25. 26. 27. 28.
Construction of models Elementary equivalence Nonstandard mathematics Complete theories The interpolation theorem Generalized products Equational logic Preservation and characterization theorems Elementary classes and elementary equivalence Types Saturated structures
Leafing through almost any exposition of modern mathematical logic, including this book, one will note the highly technical and purely mathematical nature of most of the material. Generally speaking this may seem strange t o the novice, who pictures logic as forming the foundation of mathematics and expects to find many difficult discussions concerning the philosophy of mathematics. Even more puzzling t o such a person is the fact that most works on logic presuppose a substantial amount of mathematical background, in fact, usually more set theory than is required for other mathematical subjects at a comparable level. T o the novice it would seem more appropriate t o begin by assuming nothing more than a general cultural background. In this introduction we want t o try to justify the approach used in this book and similar ones. Inevitably this will require a discussion of the philosophy of mathematics. We cannot d o full justice t o this topic here, and the interested reader will have t o study further, for example in the references given at the end of this introduction. We should emphasize at the outset that the various possible philosophical viewpoints concerning the nature or purpose of mathematics d o not effect one way or the other the correctness of mathematical reasoning (including the technical results of this book). They d o effect how mathematical results are to be intuitively interpreted, and which mathematical problems are considered as more significant. We shall discuss first a possible definition of mathematics, and then turn t o a deeper discussion of the meaning of mathematics. After this we can in part justify the methods of modern logic described in this book. The introduction closes with an outline of the contents of the book and some comments on notation. As a tentative definition of mathematics, we may say it is an apriori, exact, abstract, absolute, applicable, and symbolic scientific discipline. We now
Part V
Unusual Logics 29. Inessential variations 30. Finitary extensions 3 1. Infinitary extensions Index of symbols Index of names and definitions
fi
Introduction
consider these defining characteristics one by one. To say that mathematics is a priori is to say that it is independent of experience. Unlike physics or chemistry, the laws of mathematics are not laws of nature or dependent upon laws of nature. Theorems would remain valid in other possible worlds, where the laws of physics might be entirely different. If we take mathematical knowledge to mean a body of theorems and their formal proofs, then we can say that such knowledge is independent of all experience except the very rudimentary process of mechanically checking that the proofs are really proofs in the logical sense-lists of formulas subject to rules of inference. Of course this is a very limited conception of mathematical knowledge, but there can be little doubt that, so conceived, it is apriori knowledge. Depending on one's attitude towards mathematical truth, one might wish to broaden this view of mathematical knowledge; we shall discuss this later. Under broadened views, it is certainly possible to challenge the a priori nature of mathematics; see, e.g., Kalmar [6] (bibliography at the end of this introduction). Mathematics is exact in the sense that all its terms, definitions, rules of proof, etc. have a precise meaning. This is especially true when mathematics is based upon logic and set theory, as it is customary to do these days. This aspect of mathematics is perhaps the main thing that distinguishes it from other scientific disciplines. The possibility of being exact stems partially from its a priori nature. It is of course difficult to be very precise in discussing empirical evidence, because nature is so complex, difficult to classify, observations are subject to experimental error, etc. But in the realm of ideas divorced from experience it is possible to be precise, and in mathematics one is precise. Of course some parts of philosophical speculation are concerned with a priori matters also, but such speculation differs from mathematics in not being exact. Another distinguishing feature of mathematical discourse is that it is generally much more abstract than ordinary language. One of the hallmarks of modern mathematics is its abstractness, but even classical mathematics is very abstract compared to other disciplines. Number, line, plane, etc. are not concrete concepts compared to chairs, cars, or planets. There are different levels of abstractness in mathematics, too; one may contemplate a progression like numbers, groups, universal algebras, categories. This characteristic of mathematics is shared by many other disciplines. In physics, for example, discussion may range from very concrete engineering problems to possible models for atomic nuclei. But in mathematics the concepts are a priori, already implying some degree of abstractness, and the tendency toward \ abstractness is very rampant. Next, mathematical results are absolute, not revisable on the basis of experience. Again, viewing mathematics just as a collection of theorems and formal proofs, there is little to quarrel with in this statement. Thus we see once more a difference between mathematics and experimental evidence; the latter is certainly subject to revision as measurements become more exact.
Introduction
Of course the appropriateness of a mathematical discipline for a given empirical study is highly subject to revision. Experimental evidence and a posteriori reasoning hence play a role i11 motivation for studying parts of mathematics and in the directions for mathematical research. One's attitude toward the absoluteness of mathematics is also colored by differing commitments to the nature of mathematical truth (see below). A feature of mathematics which is probably not inherent in its nature is its applicability. A very great portion of mathematics arises by trying to give a precise mathematical theory for some concrete, perhaps even nonmathematical, situation. Of course geometry and much of classical mathematics arose in this way from special intuition derived from actual sense evidence. Also, logic owes much to this means of development; formal languages arose from less formal mathematical discourse, the notion of Turing machine from the intuitive notion of computability, etc. Many very abstract mathematical disciplines arose from an analysis of less abstract parts of mathematics, and may hence be subsumed under this facet of the discipline; group theory and algebraic topology may be mentioned as examples. This aspect of mathematics is emphasized in Rogers [12], for example. Finally, the use of symbolic notation is a main characteristic of mathematics. This is connected with its exact nature, but even more connected with the development of mathematics as a kind of language. In fact, mathematics is often said just to be a language of a special kind. Most linguists would reject this claim, for mathematics fails to satisfy many of their criteria for a language, e.g., that of universality (capability of expressing usual events, emotions, ideas, etc. which occur in ordinary life). But mathematics does have many features in common with ordinary languages. It has proper names, such as n and e, and many mathematical statements have a subjectpredicate form. In fact, almost all mathematical statements can be given an entirely nonsymbolic rendering, although this may be awkward in many cases. Thus mathematics can be considered as embedded in the particular natural language-English, Russian, etc.-in which it is partially expressed. But also mathematics can, in principle, be expressed purely symbolically; indeed, a large portion of mathematics was so expressed in Russell and Whitehead's Principia Mathernatica. Now we turn to a discussion of the nature of mathematical truth. We shall briefly mention three opposed views here: platonism, formalism, and intuitionism. The views of most mathematicians as to what their subject is all about are combinations of these three. On a subjective evaluation, we would estimate the mathematical world as populated with 65y0 platonists, 30y0 formalists, and 5y0intuitionists. We describe here the three extremes. There are (perhaps) more palatable versions of all three. According to extreme platonism, mathematical objects are real, as real as any things in the world we live in. For example, infinite sets exist, not just
Introduction
as a mental construct, but in a real sense, perhaps in a "hyperworld." Similarly, nondenumerable sets, real numbers, choice functions, Lebesgue measure, and the category of all categories have a real existence. Since all of the mathematical objects are real, the job of a mathematician is as empirical as that of a geologist or physicist; the mathematician looks at a special aspect of nature and tries to discover some of the facts. The various mathematical statements, like the Riemann hypothesis or the continuum hypothesis, are either true or false in the real world. The axioms of set theory are axioms in the Greek sense-self-evident statements which form a partial basis to deductively arrive at other truths. Hence such results as the independence of the continuum hypothesis relative to the usual set-theoretical axioms force the platonist into a search for new insights and intuitions into the nature of sets so as to decide the truth or falsity of those statements which cannot be decided upon the basis of already accepted facts. Thus for him the independence results are not results about mathematics, but just about the formalization of mathematics. This view of mathematics leads to some revisions of the "definition" of mathematics we gave earlier. Thus it no longer is independent of empirical facts, but is aS empirical as physics or chemistry. But since a platonist will still insist upon the absolute, immutable nature of mathematics, it still has an a priori aspect. For more detailed accounts of platonism see Mostowski [lo] or Godel [3]. In giving the definition of mathematics we have implicitly followed the view of formalists. A formalist does not believe that any mathematical objects have a real existence. For him, mathematics is just a collection of axioms, theorems, and formal proofs. Of course, the activity of mathematics is not just randomly writing down formal proofs for random theorems. The choices of axioms, of problems, of research directions, are influenced by a variety of considerations-practical, artistic, mystical-but all really nonmathematical. A revised version of platonism is to think of mathematical concepts not as actually existing but as mental constructs. A very extensive understructure for much of formalism is very close to this version of platonismthe formal development of a mathematical theory to correspond to certain mental constructions. Good examples are geometry and set theory, both of which have developed in this way. And all concept analysis (e.g., analyzing the intuitive notion of computability) can be viewed as philosophical bases for much formal mathematics. Another motivating principle behind much formalism is the desire to inter-relate different parts of mathematics; for example, one may cite the ties among sentential logic, Boolean algebra, and topology. Thus while mathematics itself is precise and formal, a mathematician is more of an artist than an experimental scientist. For more on formalism, see Hilbert [5], A. Robinson [ll], and P. Cohen [ 2 ] . For another discussion of platonism and formalism see Monk [9]. Intuitionism is connected with the constructivist trend in mathematics: a mathematical object exists only if there is a (mental) construction for it. This philosophy implies that much ordinary mathematics must be thrown
Introduction out, while platonism and formalism can both be used to justify present day mathematics. Even logical principles themselves must be modified on the basis of intuitionism. Thus the law of excluded middle-for any statement A, either A holds or (not A) holds-is rejected. The reasoning here goes as follows. Let A, for example, be the statement that there are infinitely many primes p such that p 2 is also a prime. Then A does not presently hold, for we do not possess a construction which can go from any integer m given 2 with m < p. But (not A) also does not to us and produce primes p and p hold, since we do not possess a construction which can go from any hypothetical construction proving A and produce a contradiction. One may say that intuitionism is the only branch of mathematics dealing directly with real, constructible objects. Other parts of mathematics introduce idealized concepts which have no constructive counterpart. For most mathematicians this idealism is fully justified, since one can make contact with verifiable, applicable mathematics as an offshoot of idealistic mathematics. See Heyting [4] and Bishop [I].
+
+
Now from the point of view of these brief comments on the nature of mathematics let us return to the problem of justifying our purely technical approach to logic. First of all, we do want to consider logic as a branch of mathematics, and subject this branch to assevere and searching an analysis as other branches. It is natural, from this point of view, to take a no-holdsbarred attitude. For this reason, we shall base our discussion on a settheoretical foundation like that used in developing analysis, or algebra, or topology. We may consider our task as that of giving a mathematical analysis of the basic concepts of logic and mathematics themselves. Thus we treat mathematical and logical practice as given empirical data and attempt to develop a purely mathematical theory of logic abstracted from these data. Our degree of success, that is, the extent to which this abstraction corresponds to the reality of mathematical practice, is a matter for philosophers to discuss. It will be evident also that many of our technical results have important implications in the philosophy of mathematics, but we shall not discuss these. We shall make some comments concerning an application of technical logic within mathematics, namely to the precise development of mathematics. Indeed, mathematics, formally developed, starts with logic, proceeds to set theory, and then branches into its several disciplines. We are not in the main concerned with this development, but a proper procedure for such a development will be easy to infer from the easier portions of our discussion in this book. Inherent in our treatment of logic, then, is the fact that our whole discussion takes place within ordinary intuitive mathematics. Naturally, we do not develop this intuitive mathematics formally here. Essentially all that we presuppose is elementary set theory, such as it is developed in Monk [8] for example. (See the end of this introduction for a description of set-theoretic notation we use that is not standard.) Since our main concern in the book is
Introduction
Introduction
certain formal languages, we thus are confronted with two levels of language in the book: the informal metalanguage, in which the whole discussion takes place, and the object languages which we discuss. The latter will be defined, in due course, as certain sets (!), in keeping with the foundation of all mathematics upon set theory. It is important to keep sharply in mind this distinction between language and metalanguage. But it should also be emphasized that many times we take ordinary metalanguage arguments and "translate" them into a given formal language; see Chapter 17, for example. Briefly speaking, the book is divided up as follows. Part I is devoted to the elements of recursive function theory-the mathematical theory of effective, machine-like processes. The nfost important things in Part I are the various equivalent definitions of recursive functions. In Part I1 we give a short course in elementary logic, covering topics frequently found in undergraduate courses in mathematical logic. The main results are the completeness and compactness theorems. The heart of the book is in the remaining three parts. Part I11 treats one of the two basic questions of mathematical logic: given a theory T, is there an automatic method for determining the validity of sentences in T? Aside from general results, the chapter treats this question for many ordinary theories, with both positive and negative results. For example, there is no such method for set theory, but there is for ordinary addition of integers. As corollaries we present celebrated results of Godel concerning the incompleteness of strong theories and the virtual impossibility of giving convincing consistency proofs for strong theories. The second basic question of logic is treated in Part IV: what is the relationship between semantic properties of languages (truth of sentences, denotations of words, etc.) and formal characteristics of them (form of sentences, etc.)? Some important results of this chapter are Beth's completeness theorem for definitions, Lindstrom's abstract characterization of languages, and the Keisler-Shelah mathematical characterization of the formal definability of classes of structures. In both of these chapters the languages studied are of a comprehensive type known as first-order languages. Other popular languages are studied in Part V, e.g., the type theory first extensively developed by Russell and Whitehead and the languages with infinitely long expressions. Optional chapters in the book are marked with an asterisk *. For the interdependence of the chapters, see the graph following this introduction. The book is provided with approximately 320 exercises. Difficult o r lengthy ones are marked with an asterisk *. Most of the exercises are not necessary for further work in the book; those that are are marked with a prime '. The end of a proof is signaled by the symbol 0. As already mentioned, we will be following the set-theoretical notation found in [8]. For the convenience of the reader we set out here the notation from [8] that is not in general use. For informal logic we use " 3" for "implies," "c-" or "iff" for "if and only if," " 7"for "not," "V" for "for all," and "3" for "there exists." We distinguish between classes and sets in the usual fashion. The notation {x : p(x)) denotes the class of all sets x such
that ~ ( x ) Inclusion . and proper inclusion are denoted by c and c respectively. The empty set is denoted by 0, and is the same as the ordinal number 0. We let A B = {x : x E A , x $ B). The ordered pair (a, b) is defined by (a, b) = {{a), {a, b)); and (a, b, c) = ((a, b), c), (a, b, c, d) = ((a, b, c), 4 , etc. A binary relation is a set of ordered pairs; ternary, quaternary relations are defined similarly. The domain and range of a binary relation R are denoted by Dmn R and Rng R respectively. The value of a function f at an argument a is denoted variously by "f, .f, f",fa, fa, f(a); and we may change notation frequently, especially for typographical reasons. The symbol ( ~ ( i :) i E I) denotes a function f with domain I such that f i = ~ ( ifor ) all i E I. The sequence (x,, . . ., x , - ~ ) is the function with domain m and value xi for each i E m. The set *B is the set of all functions mapping A into B. An m-ary relation is a subset of "A, for some A. Thus a 2-ary relation is a set of ordered pairs, (x, y). By abuse of notation we shall sometimes identify the two kinds of ordered pairs, of binary relations, ternary relations, etc. We write f * A for {fa : a E A). The notationsf: A -+ B,f:A +-B, f : A x- B, andf: A* B mean that f is a function mapping A into (onto, one-one into, one-one onto respectively) B. The identity function (on the class of all sets) is denoted by I. The restriction of a function F to a set A is denoted by F A. The class of all subsets of A is denoted by SA. Given an equivalence relation R on a set A, the equivalence class of a E A is denoted by [a], or [a], while the set of all equivalence classes is denoted by AIR. Ordinals are denoted by small Greek letters a,/3, y , . . ., while cardinals are denoted by small German letters m, n, . . . . The cardinality of a set A is denoted by IA [ . The least cardinal greater than a cardinal m is denoted by mC.For typographical reasons we sometimes write (exp (m, n) for mn and exp m for 2m. One final remark on our notation throughout the book: in various symbolisms introduced with superscripts or subscripts, we will omit the latter when no confusion is likely (e.g., [a], and [a] above).
-
r
BIBLIOGRAPHY 1. Bishop, E. Foundations of Constructive Analysis. New York: McGraw-Hill (1967). 2. Cohen, P. Comments on the foundations of set theory. In: Axiomatic Set Theory. Providence: Amer. Math. Soc. (1971), 9-16. 3. Godel, K. What is Cantor's continuum problem? Amer. Math. Monthly, 54 (1947), 515-525. 4. Heyting, A. Intuitionism. Amsterdam: North-Holland (1966). 5. Hilbert, D. Die logischen Grundlagen der mathematik. Math. Ann., 88 (1923), 151-165. 6. Kalmar, L. Foundations of mathematics-whither now. In: Problems in the Philosophy of Mathematics. Amsterdam: North-Holland (1967), 187-194. 7. Kreisel, G. Observations on popular discussions of foundations. In: Axiomatic Set Theory. Providence: Amer. Math. Soc. (1971), 189-198. 8. Monk, J. D. Introduction to Set Theory. New York: McGraw-Hill (1969).
Introduction
Introduction
9. Monk, J. D. On the foundations of set theory. Amer. Math. Monthly, 77 (1970), 703-71 1. 10. Mostowski, A. Recent results in set theory. In: Problems in the Philosophy of Mathematics. Amsterdam: North-Holland (1967), 82-96. 11. Robinson, A. Formalism 64. In: Logic, Methodology, and the Philosophy of Science. Amsterdam: North-Holland (1964), 228-246. 12. Rogers, R. Mathematical and philosophical analyses. Philos. Sci., 31 (1964), 255-264.
Interdependence of Chapters
Chapter 1: Turing Machines
1
(3) Move tape one square to the right. (4) Move tape one square to the left. (5) Stop.
Turing Machines
We now want to make this rigorous. Definition 1.1. A Turing machine is a matrix of the form
In this chapter we shall present a popular mathematical version of effectiveness, Turing computability, which will form our main rigorous basis for the mathematical discussion of effectivity. Actually in this section we present only some of the basic definitions concerning Turing machines and some elementary results which both illuminate these definitions and form a basis for later work. The definition of Turing computability itself is found in Chapter 3. After giving the formal definition of a Turing machine we discuss briefly the motivation behind the definition. In our exposition of Turing machines we follow Hermes [2] rather closely. A Turing machine (intuitively) consists of a mass of machinery, a reading head, and a tape infinite in both directions. The machine may be in any of finitely many internal states. The tape is divided up into squares calledfields of the tape (see figure).
l l l l l l l l ~ 1 l 1 ~1 .. .
... Left
I
A>
machinery Mass Of
reading head
Right
I
The machine proceeds step by step. At a given step it takes an action depending on what state it is in and upon what it finds on the field that the reading head is on. We allow only two symbols, 0 and 1, to be on a given field, and all but finitely many of the fields have 0 on them. These are the actions the machine can take: (1) Write 0 on the given field (first erasing what is there). (2) Write 1 on the given field (first erasing what is there).
where: c,, . . ., c, are distinct members of w, v,, . . ., v,, E (0, 1, 2,3,4) and dl, . . ., d,, E {cl, . . ., c,). c,, . . .,c, are called states. c, is called the initial state of the machine. We think of a row ci e vj dj of this matrix as giving the following information: when the machine is in state ci and scans the symbol e on the tape, it takes action vj and then moves into state dj. Here the action given by vj is as follows: v, = 0: write 0 on scanned square; vj = 1 : write 1 on scanned square; vj = 2: move tape one square to the right; vj = 3: move tape one square to the left; vj = 4: stop. To make this precise, we proceed as follows: Definition 1.2. Let Z be the set of all (negative and nonnegative) integers. A tape description is a function F mapping Z into (0, 1) which is 0 except for finitely many values. A configuration of a given Turing machine T is a triple (F, d, e) such that F is a tape description, d is a state, and e is an integer (which tells us, intuitively, where the reading head is). A computation step of T is a pair ((F,d, e), (F', d', e')) of configurations such
Part 1: Recursive Function Theory
Chapter 1 : Turing Machines the case of two tapes, for example, one may instead use odd and even numbered squares on a single tape. These intuitive comments on the strength of Turing machines of course would require proof. Some of them will be proved later, and we hope that they will all seem plausible after we have worked with Turing machines a while. For a more detailed argument on the strength of Turing machines see the introduction to [2].
that : if the line of the Turing machine beginning with (d, Fe) is (d, Fe, w, f), then : if w = 0 if w = 1 ifw=2 ifw=3
then then then then
F' = F& F' = F", F1=F, F1=F,
d' = f, d' = f, dl=f, d'=f,
-
e' = e; e' = e; el=e-1; el=e+l.
,
Here F; is the function ( F {(e, Fe))) u {(e, E ) } . Thus F: is the tape description acting like F except possibly at e, and Fze = e . A computation of T is a finite sequence ((Fo, do, eo), . . ., (F,, dm,em)) of configurations such that do = c,, ((F,, di, ei), (Fi+l, d,+l, ei+,)) is a computation step for each i < m, and the row of the Turing machine beginning (dm,Fe,) has 4 as its third entry. The way a Turing machine runs has now been described. To compute a functionf, roughly speaking we hand the machine a number x and it produces fx as an output. Since only zeros and ones appear on a tape, we cannot literally hand x to the machine; it must be coded by zeros and ones. The mathematically most obvious way of coding x is to use its binary representation as a "decimal" with base 2. However, this is inconvenient, in view of the very primitive operations which a Turing machine can perform. We elect instead to represent x by a sequence of x + 1 one's. (This is sometimes called the tally notation.) The extra "one" is added in order to be able to recognize the code of the number zero as different from a zero entry on the tape whose purpose is just as a blank. The precise way in which functions are computed by a Turing machine will be defined in Chapter 3. In this chapter we want to see how these rather primitive looking machines can nevertheless perform some intricate operations on strings of zeros and ones. These results will be useful in Chapter 3 and later work. Using the intuitive notion of coding we can argue as follows that Turing machines are really quite powerful: We have seen informally how to represent any number on a tape. A sequence of numbers can be represented by putting blanks (zeros) between the strings of ones representing the numbers. By using two blanks one can code several blocks of numbers, or one can use the two blanks to recognize a portion of the tape set aside for a special purpose. By repeated adjoining of a one, it is possible to add with a Turing machine; and by repeated addition, one can multiply. Since a new state depends on the currently scanned symbol, it is possible to set up different actions depending upon what is on the tape. And we are not really restricted to just one square in this decision making, since by using several states we can examine any restricted portion of the tape. In the general theory of Turing machines, one allows several symbols instead of just 0 and 1 (see, e.g., [2]). However, it is clearly possible to code these different symbols by different strings of 1's. Several tapes may also be allowed. Again such a modification can be coded within our machines; in
Definition 1.3. Trig,, is the following machine :
Proposition 1.4. For any tape description F and any e E Z, ((F, 0, e), (F, 1, e - 1)) is a computation of Trig,,. Thus Trig,, merely moves the tape one square to the right, and then stops.
Definition 1.5. TI,,, is the following machine: 0 0 3 1 0
1 3 1
1 0 4 1 1 1 4 1
Proposition 1.6. For any tape description F and any e E Z, ((F, 0, e), 1)) is a computation of TI,,,. (F, 1, e
+
Thus TI,,, moves the tape one square to the left and then stops.
Definition 1.7. To is the following machine:
,-
Proposition 1.8. For any tape description F and any e E Z, (i) if Fe = 0,then ((F, 0,e)) is a computation of To; (ii) if Fe = 1 , then ( ( F , 0,e), (F& 0,e)) is a computation of To. Thus To writes a 0 $a zero is not here, but does not move the tape.
Chapter 1: Turing Machines
Part 1: Recursive Function Theory
Definition 1.13.
Definition 1.9. T, is the following machine:
T,seekois the following machine: 0 0 3 1 0 1 3 1 1 0 4 1
Proposition 1.10. For any tape description F and any e E Z, (i) ifFe = 0, then ((F, 0, e), (F;, 0, e)) is a computation of T,; (ii) zyFe = 1, then ((F,0, e)) is a computation of TI. T, writes a 1 i f a 1 is not there, but does not move the tape. Definition 1.11. If a is any set and m E w , let a'"') be the unique element of "'{a). Thus a"')' is an m-termed sequence of a's, a'") = (a, a , . . ., a) (m times). If x and y are finite sequences, say x = (x,, . . ., x,-,) and y = (yo, . . .,yn-&, we let xy = (x,, . . ., xm-,, yo, . . ., yn-,). Frequently we write a for (a). Definition 1.12. T, ,,,,, is the following machine:
1 1 1 0 T,,,,,, finds the first 0 to the right of the square it first looks at and stops at that 0.
Definition 1.14. T,,,,,,
is the following machine: 0 0 2 1 0
1 2 1
1 0 0 0 1 1 4 1 T,,,,,, finds the first 1 to the left of the square it first looks at and stops at that 1. It may be that no such 1 exists; then the machine continues forever, and no computation exists.
Definition 1.15. T, ,,,,,is the following machine : 0 0 3 1
A computation with Tlseekocan be indicated as follows, where we use an obvious notation :
0 1 3 1 1 0 0 0 1 1 4 1 T,,,,,, finds the first 1 to the right of the square it first looks at and stops at that 1. But again, it may be that no such 1 exists.
0 1"')' a
-
A
Definition 1.16. Suppose M, N , and P are Turing machines with pairwise disjoint sets of states. By M + N we mean the machine obtained by writing down N after M, after3rst replacing all rows of M of the forms (c 0 4 d ) or (c' 1 4 d') by the rows (c, 0 0 e) or (c' 1 1 e) respectively, where e is the initial state of N. By
f Reading head Thus T,,,,,, finds the first 0 to the left of the square it first looks at and stops at that 0. In this and future cases we shall not formulate an exact theorem describing such a fact; we now feel the reader can in principle translate such informal statements as the above into a rigorous form. - 0
we mean the machine obtained by writing down M, then N, then P, after first replacing all rows of M of the forms (c 0 4 d ) or (c' 1 4 d') by the
Part 1: Recursive Function Theory
Chapter I : Turing Machines In the nontrivial case we start with - 0'") 0 0'") -; m > 0 :
rows (c 0 0 e) or (c' 1 1 e') respectively, where e is the initial state of N and e' is the initial state of P. Obviously we can change the states of a Turing machine by a one-one mapping without effecting what it does to a tape description. Hence we can apply the notation just introduced to machines even if they do not have pairwise disjoint sets of states. Furthermore, the above notation can be combined into large "flow charts" in an obvious way.
A
-
Definition 1.17. TSee,, is the following machine :
Stop
Tr seek 1
Tl seek 1
if 1
(Here by Trig,,-+ Stop we mean that the row (1 1 4 1) of Trig,,is not to be changed.) This machine just finds a 1 and stops there. It must look both left and right to find such a 1; 1's are written (but later erased) to keep track of how far the search has gone, so that the final tape description is the same as the initial one. If the tape is blank initially the computation continues forever. Since this is a rather complicated procedure we again indicate in detail a computation using Tseekl.First we have two trivial cases: Starting with
1a A
Starting with 0 1 A
Here i
=
1 initially, and the portion beyond 0'"-1) 1 0(23--2)0 O ( n - i + l )
place only if i < m and i I n. Thus, if we start with
n
+ 1r
m, we end as follows (setting i = m):
-
takes A 1 O(m) 0 O(n) -, and A
Part 1: Recursive Function Theory
On the other hand, if we start with - Ocm) 0 Ocn) 1 -, and n as follows (setting i
=
n
A
+ 1):
+ 1 < m we end
I !
Chapter 1: Turing Machines
Definition 1.20. TltranS is the following machine:
7 * To Trig,, TI
Start --+Tleft + TI,,,
-+
+
Jifo Tright
The action of Tltrans is indicated thus, in the case of interest to us:
The tape is otherwise unchanged
Definition 1.21. TI,,,,, is the following machine :
1.0
T trans TI,,,, acts as follows in the case of interest to us:
Definition 1.18. TI,,, is the following machine:
4
Start
The tape to the left and right of this portion of x unchanged.
lift
TIseek 0 -+ Trig,+,3 T e f t
+
TI,,, moves the tape to the right until finding 00, and stops on the rightmost of these two zeros. TI,,, does not start counting zeros until moving the tape.
1
i
f
l
TI,,,
+
+I Tl seek 0
ifo -+
Jifo
Tl trans
Definition 1.19. T,,,, is the following machine:
Start -+T, seek
Definition 1.22. Tfinis the following machine:
Tmt
Trendmoves the tape to the left until finding 00, and stops on the left-most of these two zeros. Trenddoes not start counting zeros until moving the tape.
I Tright
1
TI trans
+ y + 5 symbols is
Chapter 1 : Turing Machines
Part 1: Recursive Function Theory
T,,,,,,acts as follows:
T,,, acts as follows in the case of interest t o us:
wherep = xo this :
+ x, + . . . + xmVl+ 2m + 2. I n c a s e m = 0, it workslike
The tape is otherwise unchanged. This machine copies the nth block t o the left. These are all the basic machines needed t o compute functions. We shall return t o Turing machines after discussing some classes of number-theoretic functions. BIBLIOGRAPHY
I n each case the tape is otherwise unchanged. Here "fin" abbreviates "finish." This machine will be used at the end of computations t o erase scratchwork.
1. Davis, M. Computability and Unsolvability. New York : McGraw-Hi11 (1958). 2. Hermes, H. Enurnerability, Decidability, Computability, 2nd ed. New York: Springer (1969). 3. Minsky, M. Computation. Englewood Cliffs: Prentice-Hall (1967).
EXERCISES
Definition 1.23. T,,,, is the following machine:
1.25. Give an example of a Turing machine which gets in a loop-repeats configurations over and over.
some
1.26. Give an example of a Turing machine which never stops, but doesn't get in a loop. 1.27'. Prove rigorously that T,,,,,,
does what is said in the text.
1.28'. Prove rigorously that T,,,,,, does what is said in the text.
T,,,, acts as follows:
1.29'. Prove rigorously that T,,, does what is said in the text. 1.30'. Prove rigorously that T,,,, does what is said in the text. 1.31'. Prove rigorously that T,,,,,, does what is said in the text. 1.32. Show that there is no Turing machine which, started at an arbitrary position, will find the left-most 1 on the tape.
Construct a Turing machine which will print the sequence 11001100. . .
The tape is otherwise unchanged.
1.33.
A machine M repeated m > 0 times will be indicated by M m in our
1.34. Construct a Turing machine that stops iff there are at least two one's on the tape.
diagrams.
Definition 1.24. F o r
ti
> 0, Tn,,,, is the following machine:
I
Start -+ TFSeek+ Tl,rt
t
if I
To
+ T,!'A;k 0
-+
TI
+
TI"i% o
-+
TI
Chapter 2: Elementary recursive and primitive recursive functions
7
Elementary recursive and primitive recursive functions
(3) the 2-ary operation f such that f(m, n) = Im - nl for all m, n E W ; (4) the 2-ary operation f such that f(m, n) is the greatest nonnegative integer ~ m l (if n n # O), 0 if n = 0 ; we denote f(m, n) by [mln]; ( 5 ) for each positive integer n and each i < n, the n-ary operation f on w such that for all x,, . . ., xn-, E w, f(x,, . . ., xn-,) = xi;f is denoted by U:; it is called an identity or projection function. Second, and last, A is required to be closed under the following operations upon number-theoretic functions : (a) The operation of composition. Iff is an m-ary function, and g o , . . . , g m _ ,are n-ary functions, then the composition off with g o , . . . , gm-, is denoted by K: (f;go, . . ., g m -,); it is defined to be the n-ary function h such that for all x,, . . ., xn-, E w, ~ ~ ( X. .C. I Xn ? - 1) = f(go(x09 . . ., Xn - I), . . . , gm- I(XO,. . ., Xn - 1)). (b) The operation of summation. Iff is an m-ary function, then g (m-ary) is obtained from f by .sun7mation, in symbols g = I f , if for all x,, . . ., X m - 1 EW, t
To show that many number-theoretic functions are Turing computable, it is convenient to distinguish some functions by closure conditions. The class of elementary recursive functions which we shall now define in this way is a class of intuitively effective functions which contains most of the effective functions actually encountered in practice. However, not every effective function is elementary recursive. Toward the end of the chapter we introduce the wider class of primitive recursive functions, which still does not cover all kinds of intuitively effective functions. In the next chapter we go from primitive recursive functions to a class of functions, the recursive functions, intuitively corresponding to the entire class of effective functions. An elementary recursive function is just a function obtainable from the usual arithmetic operations of addition, subtraction, multiplication, and division by composition, summation, and multiplication. Most of this chapter is concerned with listing out some elementary functions and with giving operations which lead from elementary functions to elementary functions. This is necessary in order to be able to easily recognize that some of the rather complicated intuitively effective functions are, in fact, elementary recursive. A more detailed treatment of the topics of this section can be found in PCter [2].
Definition 2.1. A number-tl~eoreticfunction is a function which is, for some positive integer n7, an in-ary operation on W. The class of ~lcnwntary rcywrsi~,~, or for brevity elemcntary function.\, is the intersection of all classes A of number-theoretic functions such that, first of all, the following specific functions are in A : ( I ) +, the usual 2-ary operation of addition; (2) ., the usual 2-ary operation of multiplication;
, Yxm-1) ):Y g ( x o , . . . > ~ m - 1=) C { ~ ( X ~ , . . . , X ~ - ~ < [note that if m
=
1 the definition reads
for any m, we have g(x,, . . ., x ,-,, 0) = 0 by convention]. (c) The operation of multiplication. I f f is an m-ary function, then g (m-ary) is obtained from f by multiplication, in symbols g = if for all x,, . . . , xm-, E W,
nf,
n
g h , . . ., ~ ~ - = 1 )
{ ~ ( x o ,. .., xm-2, Y) : Y < xm-1)
[if x m - , = 0, the right hand side is 1 by convention]. It should be evident that each elementary function is effectively calculable in the intuitive sense. To convince oneself of this, it is enough to argue that each of the functions (1)-(5) above is effectively calculable, and that the class of effectively calculable functions is closed under the operations (a)-(c). For (1)-(S), the ordinary school algorithms suffice for this argument. As to (a)-(c), suppose, for example, that j; an m-ary function, is effectively calculable, and we wish to show that 2 f also is. Given x,, . . . , x m - , E W,we merely calculate f ( x o , . . ., x , , - ~ ,O), f ( x o , . . ., xm-2,I), . . ., f ( x o , . . ., x , , - ~ ,xm-I - 11, which we can do since f is effectively calculable, and then we add them all up by the school process, giving us ( 2f)(x,, . . . , xm-,).
Chapter 2: Elementary recursive and primitive recursive functions
Part 1 : Recursive Function Theory
PROOF.If xo, . . . , x P _ ,E w , then, with I side,
=
left hand side and r
=
We now proceed to show that many garden-variety number-theoretic functions are elementary and that simple operations on elementary functions again give elementary functions. For later purposes it is convenient to formulate results of the second kind in a more general way. A class A of number-theoretic functions is said to be closed under elementary recursive operations provided A contains all the elementary functions 2.1(1)-(5) and is closed under composition, summation, and multiplication. Obviously the class of all elementary functions is closed under elementary recursive operations. So will be all of the wider classes of effective functions which we discuss later.
right hand
The following theorem is the usual set-theoretical consequence of a definition like 2.1.
Proposition 2.4. Let A be closed under elementary recursive operations. Iff is m-ary andf E A, and rr is a permutation of (0, . . . , m - 11, then the m-ary function g such that g(xo, . . ., x,- ,) = f(x,,, . . ., x ,,) for all x,, . . ., x,-, E w is also in A .
,-
Proposition 2.3. A nunzber-theoretic function f is elementary iff there is a jinite sequence (go, . . . ,g, _ ,) of number-theoretic functions such that g,-, = f, and for each i < k one of the following conditions holds: G) gi = +, (ii) gi = ., (iii) g, = subtraction (in the sense of 2.1(3)), (iv) g, = division (in the sense of 2.1(4)), (u) gi = U; for some n > 0, some j < n, (vi) g, is n-ary, andfor some m > 0 there exist j < i and k,, . . . , k, - , < i such that g j is m-ary, g,,, . . ., g are n-ary, and g, = K: (g, ; gh.O,, , ., gh.(,- ,,) (g, ix obtained from earlier funcrions by composition), (vii) there is a j < i such that g, = 1(g,), (viii) there is a j < i such that gi = 1-1(g,).
PROOF.g
=
K: (f; UFO,. . ., U:,-,,).
0
Proposition 2.5 (Identification of variables). Let A be closed under elementary recursive operations. Iff is m-ary, m > 1, and f E 4 then the (m - 1)-ary function g such that g(xo, . . ., x,-,) = f(x0, . . ., x,-,, x0)for all xo, . . ., xm-, E w is in A.
4;
,,,-,,
PROOF. Let A be the set of all f such that there is a finite sequence of the kind described in the theorem. By considering I-termed sequences it is easy to see that +, ., subtraction, division, and U; are all in A (for any 11 > 0 and j < n). Suppose f E A , f is wary, h,, . . ., 11, 6 A , all of h,, . . . , /I,_, are n-ary. Choose a finite sequence (go, . . . , g, - ,' such that g, - = f and or each i < k one of the conditions (i)-(uiii) holds for g,. For each j < nl choose a finite sequence (I ,.,, . . . , I,,,,-,)such that I,,,,-,= 11, and for each i < a, one of the conditions (i)-(viii) holds for I,,. Then consideration of the sequence
By means of 2.4 and 2.5 variables can be identified in an arbitrary number of places. Thus iff is 3-ary elementary, so is the function g with g(x, y) = f(x, y, y), for if h(x, y, z) = f(y, x, z), h is elementary by 2.4; letting k(x, y) = h(x, y, x) for all x, y E w , k is elementary by 2.5, and g(x, y) = k(y, x) for all x, y E w , SO g is elementary by 2.4. Usually it is just as easy in cases like this to use the method of proof of 2.4 and 2.5.
I
I
I PROOF.g =
1 shows that K; ( f ; /I,, . . . , h,- ,) E A . Thus A is closed under composition. 1f f E A , so that a sequence (g,,. . ., g , - l i exists as in the theorem, then 1f \ and cg,, . . . , gh-,, rI f ) show that Zf, consideration of (a,, . . . , g, _,, f E A . Hence every elementary function appears in A . This proves =>. If j t A , with (go,. . ., g,_,> given as in the theorem, then it is easily shown by induction on i that g , is elementary for each i < k . In particular, f = g,-, is elementary; this proves +.
rI
Proposition 2.6 (Adjoining apparent variables). Let A be closed under elementary recursive operations. Iff is m-ary and f E A, then the (m + 1)-ary function g such that g(x,, . . . , x,) = f(xo, . . ., x,-,) for all xo, . . . , x, E w, is in A .
(f; U t f l , . .., U;+j).
D
Definition 2.7 (i) For n > 0, m E w , C; is the n-ary function such that C ; (x,, . . .,xn-,) = m for all x,, . . . , x,-, E w . (ii) sg and are unary functions; for x E w , sgx -
=
sgx =
0 1
{
ifx=O, if x f 0, if x = 0, it.x.0.
Chapter 2: Elementary recursive and primitive recursive functions
Part 1: Recursive Function Theory
(iii)
# is a unary function :
fix=@-
I
I
ifx=O i f x + o for all x
E w.
(iu) By convention, O0 = 1, OX = 0 for x # 0 ; O! = 1. (v) a is a unary function: 4x = x + 1 for all x E w. Thus Ck is the n-ary constant function with value m. The functions sg and @ are of a technical usefulness. / is the predecessor function and 4 the successor function.
The definition 2.9(iii) is motivated by our intuitive feeling that a relation R is effective iff x, is an effective function. In fact, if we have an effective procedure for determining membership in R, then we can effectively calculate XR as follows. Given any object a, determine whether a E R or a $ R. In the first case, X,a = 1, and in the second case, X,a = 0. Conversely, suppose we have an effective procedure for calculating values of x,. Given any object a, calculate XRa. If XRa = 1, then a E R. If x,a = 0, then a $ R. Given any class A of number-theoretic functions, an m-ary numbertheoretic relation R is said to be an A-relation if X, E A.
Proposition 2.10. 0 and w are elementary; i f x
Ew
then {x) is elementary.
Proposition 2.8. The following functions are elementary: (i) C", for n # 0) (ii) 4 (iii) sg (iv) Sg (0) exponentiation (vi) factorial (vii) p
PROOF (1) Ch is elementary: CA x = Ix - xl for all x E w. ,,CA y, for all x E w. is elementary: Sg x = (2) (3) sg is elementary: sg x = Sg Sg x for all x E w. (4) C: is elementary: C: x = @ C; x for all x E w. (5) C1, is elementary: (by induction on m) C;+, x = C; x + C: x for all X E W. (6) Ck is elementary: Ck (x,, . . ., x,-,) = C; U6 (x,, . . ., x,-,) for all
n,
Xo
,..., X , - 1 E W .
+
(7) 4 : 4X = X c: X. (8) exponentiation : xY = (9) factorial : x! = ,az. (10) p : p x = \ x - c:x\ .sg x.
nZ,Ug (x, z). n,,
Definition 2.9 (i) By an m-ary number-theoretic relation (m > 0) we mean a set of is the set of all m-tuples of natural m-tuples of natural numbers. numbers. As usual, we identify l w and W,in an informal way. (ii) If R is an m-ary number-theoretic relation, its characteristic function x,, is the m-ary number-theoretic function such that for all x,, . . ., Xm-1 E w, 0 if (xo, . . ., x,,,-~>$ R, X R ( X O ' . . . * X ~ - ~ ) = { Ii f ( ~ ~ , . . . , x ~ - ~ > E R . (iii) An m-ary number-theoretic relation R is elementary if X, is elementary.
By 2.10, {x) is always on effectively decidable set. Intuitively speaking, to check whether y E {x) we simply check if y = x (surely an effective matter). As an example, let B = (0) if Fermat's last theorem is true, yhile B = 0 if it is false. B is an effectively decidable set, although we do not know now whether 0 E B or not. Thus there is a decision procedure for membership in B, but we don't know what it is (it is either the obvious one for (0) or the obvious one for 0).
Proposition 2.11. Let A be closed under elementary recursive operations. If R and S are A-relations, then so are R n S, R u S, and "w R.
-
PROOF. For all x,, . . ., xm-,, x,,S(xo, . . ., Xm- 1) = XR(XO, . . .,Xm- 1) .XS(XO, . . .,x,,,-~), xT(xO,. . .,x,-~) = Sg xR(xO,. . .,xm- with T = R, R v S = R) n ( m ~S)]. 0
- -
-
-
Corollary 2.12. Every Jinite subset of w is elementary, andso is every cojinite set. Proposition 2.13. The binary relations I, < , 2 , = , # are elementary. ~ W P .
For any x, y E w,
-
so # is elementary. Finally, 5 ==
#).
=
(
y. (by induction). For m > 2, rnin, (x,, . . . , x,-,) = min (min,-I (x,, . . ., x,-,), x,-,), with rnin, (x, y) = min (x, y). max (x, y), max, (x,, . . ., x,- ,) similarly. rm (x, y) = remainder upon dividing x by y, if y # 0 ; rm (x, 0) = 0. ( = {(x, y) : x divides y) = {(x, y) : there is a z such that y = xez). PM = {x : x is a positive prime). min (x, y)
(iii) (iv) (u) (vi) (vii)
=
Proposition 2.20. All of the functions and relations of 2.19 are elementary. PROOF. Obvious, as concerns (i)-(iv). For (v),
Hence For (vi), note that xl y iff there is a z such that y = x . z iff there is a z < y such that y = x.z; now see 2.14. Finally, p E PM iff for every x < p, either not xlp or x = 1, and p f 0, p Z 1; cf. 2.15. 0 The rather technical proof of 2.17 may be compared with a proof of the intuitive version of the proposition, which goes: if R is an m-ary effective relation, then the function f of 2.16 is effective. In fact, to calculate f(x,, . . ., x,-,), we test successively whether (x,, . . . , x,-,, 0 ) E R, (x,, . . ., x,-,, 1) E R, . . ., (x,, . . ., x,-,, x,-,) E R. If at some point we reach an i such that (x,, . . ., x,-,, i) E R, we set f(x,, . . ., x,-~) = i and stop testing. If we complete our testing without finding such an i we setf(xo, . . ., x,= 0.
Proposition 2.18 (Definition by cases). Let A be closed under elementary recursive operations. Suppose go,. . ., g,-l are n-ary members of A ,
Definition 2.21. For every k let pl, be the (k PI = 3, p, = 5, . . ..
+ 1)st prime; thus po = 2,
Proposition 2.22 (Number-theoretic). For every k, p, PROOF. By induction on k. Trivial for k
=
exp (2,2'").
0, 1. Induction step, k > 0:
Pk+l 5 P O . .. . p k - 1 (Euclid) 5 exp (2,2O). . . . .exp (2,2'") - 1 (induction hypothesis) - 2.Uexp(2.i):i 0, f and h are elementary, m-ary and (m 2)-ary respectively, g = Rm(f, h), k is elementary, and g(xo, . . ., x,) I k(xo, . . ., x,) for all x,, . . ., x, E w. Then g is elementary. (ii) Suppose h is a binary elementary function, g = RO(a,h) (with a E w), and gx I k x for all x E w, with k elementary. Then g is elementary.
'+
$
+
PROOF. (i) For any x,, . . ., x,, z E s(xO,.. ., x,) Let R consist of all (m p$g0,...3XW so that (1)
=
(x,
w
+ 1)- z < x m k(xo, . . .,xm-,, z).
(9)o =f(xo,.
. . ., x,, y) such that there is a q
5
., xm-1)
(qIZ+1= h(xo, . . ., xm-1, z, (q)Z)
and, finally, y (3)
=
(q),,.
g(x0, . . ., x,)
Obviously R is elementary. Now (i) follows from = CL), Ik(x0,
Lemma 2.36.
LZ
is primitive recursive.
PROOF. We may assume that m # 0. Now we prove 2.37 by induction on n: a(m,.O) = m. Assuming m 2 a(m, n),
and, for all z < x,, (2)
,
Lemma 2.37. m 5 a(m, n) for all m, n.
let
+ 2)-tuples (x,,
\
Thus a(m, n) is the iterated exponential, m raised to the m power n times. Although exponentiation is elementary by 2.8(v), we shall see that iterated exponentiation is not. The reason is that it grows faster than any elementary function; see 2.44. Obviously, we have:
. . .,x,)[(x~, . . .,x,, Y)
E
Rl.
T o prove (3), assume that x,, . . ., x, E w, let t be the sequence (g(xo, . . ., x,-I, O), . . .,g(x0, . . .,Xm - 1, x,)), and let
+ 1) = 2 mm 2 m. 0 Lemma 2.38. a(m, n) < a(m, n + I) for all m > 1 and all n E w. PROOF. a(m, n + 1) = > a(m, n). 0 Lemma 2.39. a(m, n) < a(m + 1, n) for all m # 0 and all n E w. PROOF. We proceed by induction on n: a(m, 0) = m < m + 1 = a(m + 1,O). a(m, n
Assuming our result for n, a(m, n
Lemma 2.40. all n , p E w.
+ 1) =
I (m
+ I)a(m,n)
+ 1 , n + I). 0 a(m, n) + a(m, p) I a(m, rnax (n, p) + 1) for all m > 1 and < (,
+ l)a(m+l.n) = a(m
+ a(m, p) I 2a(m, rnax (n, p)) by 2.38 < < - 2a(m.max - ma(m.max = a(m, rnax (n, p) + 1). a(m, n).a(m, p) I a(m, rnax (n, p) + 1)for
PROOF. a(m, n)
(n,p))
Then for each i I x, we have
Lemma 2.41. n, p E W. and so
(n.P))
0 all m > 1 and all
PROOF. If n = p = 0 then the inequality is obvious. Hence assume that n # 0 o r p # 0.Then
5 p$;o....."m'
Furthermore, q satisfies the conditions (I), (2). Thus (x,, . . ., x,, g(x,, . . ., x,)) E R. It is also clear that (x,, . . ., x,, y) E R implies that y = g(xo, . . ., x,), so (3) holds. 0 Condition (ii) is proved similarly. As our final result of this chapter we shall give an example of a primitive recursive function which is not elementary.
Definition 2.35. a is the binary operation on conditions: for any m, n E w,
w
given by the following
Lemma 2.42. a(m, n)a(m,p)5 a(m, rnax ( p all n, p E W. PROOF. For n = 0 we have a(m, n)5(m.~)= m a ( m . ~ ) = ~ ( mp,
+ 1)
+ 2, n + 1)) for I a(m,
max ( p
all m > 1 and
+ 2, n + 1))
(using 2.38). If n # 0 we have a(m, n)a(m.P) = m a ( m . n - l ) . a ( m , p ) < matm.max (n - I.P)+1) = a(m, rnax ( p + 2, n + I)).
by 2.41
0
Chapter 2: Elementary recursive and primitive recursive functions
Part 1 : Recursive Function Theory
Lemma 2.43. a(a(m, n), p) I a(m, n
+ 2p) for
all m > I and all n, p
E w.
Assume now that rnax {gi(xo,. . . , xn-,) : i < m) > 1. Then
PROOF. We proceed by induction on p : a(a(m,n),O)
=
a(m,n)
=
a(m,n
+ 2.0).
Assuming our result for p, we then have a(a(m, n), p
+ I) = a(m, n)a(acm,n).p)< a(m, n)a(m.n + 5 a(m, rnax (n + 2p + 2, n + 1)) -
=
a(m, n
2 ~ )
+ 2(p + 1)).
by 2.42
0
Lemma 2.44. If g is a k-ary elementary function then there is an m E w such that for all x,, . . ., x k _ , E w , if rnax (x,, . . ., xk-,) > 1 then g(x,, . . . , xk-,) < a(max (x,, . . ., xk-,), m).
PROOF. Let A be the set of all functions g (of any rank) for which there is such an m. T o prove the lemma it suffices to show that A is closed under elementary recursive operations. (1)
A is closed under 2. (7) I n fact, suppose f E A, say f is m-ary, and let g = Since f E A, choose p E w such that rnax (x,, . . . , x,-,) > 1 implies that f(x,, . . ., xm-,) < a(max (x,, . . ., x,- ,), p). Let
xf.
Then for any x,, . . ., xm-, E w ,f(x,, . . ., xm-,) < a(max (x,, . . ., xm-,, 2), q), using 2.38. Thus if rnax (x,, . . ., x,- ,) > 1 we have
+€A.
In fact, let m
=
x,
2: for any x,, x,
+ x,
Ew
I rnax
with rnax (x,, x,) > 1,
+ max (x,, xl) 0) + a(max (x,, x,), 0) I) + a(max (x,, x,), 1)
(x,, x,) a(max (x,, x,), < a(max (x,, x,), I 4 m a x (x,, x,),
=
2)
by 2.38 by 2.40
Thus (1) holds, Analogously,
(3)
Similarly, using 2.42,
. E A.
(2) f E A,
where f(m, n)
=
Im
-
n 1 for all m, n
E w.
For if rnax (x,, x,) > I, then Is, - x,l 5 rnax (x,, x,) = ~ ( m a x(x,, x,), 0) < a(max (x,, x,), 1). Similarly, the next two statements hold: (4) (5) (6)
f E A, U; E A ,
=
rnax {q, : i < m )
+ 2p + rnax {f(x,,
. . ., x,-,)
: x,, . . . , x,-,
This completes the proof of 2.44.
PROOF. By 2.36,
5 1)
a
is primitive recursive. Suppose
a
is elementary. Let
fm = a(m, m) for all m E w . Thus f is elementary. By 2.44 choose m E w such that x > I implies that fx < a(x, m). Then a(m contradiction.
+ 2 , m + 2) = f(m + 2) < a(m + 2,m) < a(m + 2 , m + 2)
+ 1.
Now suppose that rnax (x,, . . ., x,-,) > I . Then if go(xo,. . ., xn-,), . . . , g,-,(x,, . . ., x,-,) I1, we obviously have
. 11, . . ., S n - ~ ( x o., . ., xn-1)) by 2.38 < s 5 a(max (x,, . . . , x,-,), s)
~ ( x o , . . ., xn - 1) = ~ ( S O ( X .O. , , X n -
n.
Theorem 2.45. There are primitive recursive functions which are not elementary in fact, a is such a function.
where f(m, n) = [mln] for all m, n E w . for any positive n E w and any i < n. A is closed under composition.
For, suppose f is m-ary, go,. . . , g , , are n-ary, and f , go, . . . , g,-, E A . Choose p, q,, . . ., 4,-, E w such that rnax (x,, . . ., x,,) > I implies that f(x0,. . ., x,-,) < (b(max (x,, . . ., x,-,),p), and such that for each i < m, rnax (x,, . . .,x,-,) > I implies thatg,(x,, . . . ,x,- ,) < (c(max(x,, . . . , x n - ,),q,). Let h = K: (f; go, . . . , g, - ,). Let s
A is closed under
(8)
by 2.38
0
BIBLIOGRAPHY 1. Grzegorczyk, A. Some classes of recursive functions. Rozprawy Matematyczne, 4 (1953).
2. PBter, R. Recursive Funktionen. Berlin: Akademie-Verlag (1957).
Part 1 : Recursive Function Theory
EXERCISES 2.46. Show that the following functions are elementary:
Chapter 2: Elementary recursive and primitive recursive functions
each f E A introduce a symbol Rf. Allow, in addition, variables v0, ul, v2, . . .. We define term: any variable standing alone is a term. I f f 6 A, f m-ary (m > O), and a,, . . ., am-,are terms, then so is Rfao, . . ., om-l. These are all the terms. Let i be such that all the variables appearing in a certain term T are in the list v,, . . .,vi. Define g::
where R is elementary. (2) g(xo, . . . , x,-~, y) = max {f(xo, . . ., x,-~, z) : z 5 y}, with f elementary. (3) g(xo, . . . ,xm-2, y) = min {f (xo, . . .,x,-~, z) : z i. y), with f elementary. 2.47. Show that the following functions and relations are elementary:
(1) (2) (3) (4)
(a, b) = gcd (greatest common divisor) of a and b, = 0 if a = 0 o r b = 0. sa = sum of positive divisors of a. the set of perfect numbers, i.e., numbers a with sa = 2a. the Euler p function: pa = the number of elements of {x :1 < x < a) with (x, a) = 1.
< e .n, for every n E w , where e is the base of the natural system of logarithms. Show that f is elementary. Hint: write
2.48. Let fn = [e .n] = greatest integer
Let Sn = n! + n!/l! + . + n!/n!. Define S primitive recursively, but show that is bounded by an elementary function. Let Rn = l/(n + I)! + . . (Note: R is not a number-theoretic function, since its values are actually transcendental.) Show that for n > 1, Rn < lln!. Hence conclude that [e n] = [Sn/(n - 1)!] for n > 1, as desired. 2.49. Show that
):(
(combinatorial symbol) is elementary.
The purpose of the following two exercises is t o show how one can be rigorous in applying the results of this section in showing that functions o r relations are elementary. However, later we shall not use these exercises, since the application of results of this section are obvious anyway. Both exercises have t o d o with certain formal languages which are special cases of languages which will be discussed in detail later. 2.50 (EXPLICIT DEFINITION). Let A be a class of number-theoretic functions closed under composition, and such that U: E A whenever n > 0 and i < n. For
for all vo, . . ., vi E w , where each Rf occurring in T is interpreted asf. Show that g, E A. [Try induction on how 7- is built up.] 2.51 (COMPLEX EXPLICIT DEFINITION).. For each elementary function f introduce a
symbol Ff, and for each elementary relation R a symbol gR.Also let No, Nl, . . . be some more symbols, and uo, vl, . . . variables. For logical symbols we take 3, V, p, l, v , A ,-+,*, =. Special symbols: (,), < . We define terms and formulas simultaneously and recursively: (1) v, is a term; (2) iff is an m-ary elementary function and a,, . . .,am-, are terms, then is a term; Ff(ao,. . (3) Ni is a term; (4) if R is an m-ary elementary relation and a,, . . ., are terms, then B8(ao, . . .,om-l) is a formula; (5) if a, T are terms then a = T is a formula; ( 6 ) if p and # are formulas then so are - , p , p v #, p A #, p + #, p f;' #; (7) if vi does not occur in a term a, and if p is a formula, then 3vi < a, p and Vvi < a, p, are formulas; (8) under the assumptions of (7),p v i < a, p is a term. These are all the terms and formulas. Now show:
(9) $a is a term whose variables are in the list vo, . . ., vf,andiff f,(uo,. . .,vJ = a for all vo, . . ., vi E w , then ff,is elementary; (10) ifp is a formula whose variables are in the list vo, . . ., vi and if Rf, = {(vO,. . .,vi> : vO,. . .,ui E w and p), then Rf, is elementary. In (9) and (lo), the symbol Ff is to be interpreted as f; gRas R; Ni as i, and the other symbols are to have their natural meanings. Suggestion: prove (9), (10) simultaneously by induction on how a and g, are built up. 2.52. Suppose g and g' are 1-ary primitive recursive and h and h' are 3-ary
primitive recursive. Define f and f ' simultaneously:
Show that f and f' are primitive recursive. Hint: define f"(x, y) 3f'(X.Y).
= 2f(x.y).
Part 1: Recursive Function Theory
Recursive Functions; Turing Computability
Suppose that g is 1-ary primitive recursive, h is 4-ary primitive recursive and f is defined as follows: f(0,n)
= f ( l , n) =
gn
f(m+l,n)=h(f(m-l,n),f(m,n),m,n)
form>O.
/
3
Show that f is primitive recursive. Show that there are exactly X , primitive recursive functions. Show that there is a number-theoretic function which is not primitive recursive.
I j
In this chapter we shall give three versions of the notion of effectively calculable function: recursive functions (defined explicitly by means of closure conditions), an analogous but less redundant version due to Julia Robinson, and the notion of Turing computable function, based upon Turing machines. These three notions will be shown to be equivalent; here the results of Chapters 1 and 2 serve as essential lemmas. In the exercises, three further equivalent notions are outlined: a variant of our official definition of recursiveness, the Godel-Herbrand-Kleene calculus, and a generalized computer version which is even closer to actual computers than Turing machines. As stated in the introduction to this part, none of these different versions stands out as overwhelmingly superior to the others in any reasonable way. The versions involving closure conditions are mathematically the simplest. The ones using generalized machines seem the most intuitively appealing. The Kleene calculus and the Markov algorithms of the next section are closest to the kinds of symbol manipulations and algorithmic procedures that one works out on paper or within natural languages. Take your pick.
Definition 3.1. Let m > 1. An m-ary number-theoretic function f is called E w there is a y such that f(xo, . . . , x, -,, y) = special if for all x,, . . ., x, 0. Iff is a special function, we let
-,
I '
I
k(x,, . . ., x,-,)
. . .,x,-,, y) = 0. - ,, y) = 0)" for "k(xo, . . . , x,-,) ". The
= the least y such that f(x,,
We write "py(f(x0, . . ., X, operation of passing from f to k is called the operation of (unbounded) minimalization. The class of general recursive functions is the intersection of all classes A of functions such that 4, U; E A for all n > 0 and i < n, and such that A is closed under composition, primitive recursion, and minimalization
Chapter 3 : Recursive Functions; Turing Computability
part 1 : Recursive Function Theory
(applied to special functions). A relation R is general recursive iff X , is general recursive. Frequently, both for functions and relations, we shall say merely recursive instead of general recursive. A class A of numbertheoretic functions is said to be closed under general recursive operations provided that A contains all the functions 4, U; and is closed under composition, primitive recursion, and minimalization (applied to special functions). Several comments on Definition 3.1 should be made before we proceed. First, the minimalization operator used in 3.1 is somewhat different from the one in 2.16, and the difference in their notations reflects this. We shall see later that this difference is essential (see, e.g., 3.6). To see that all general recursive functions are effectively calculable it suffices to assume that f is an m-ary special effectively calculable function with m > 1 and that k is obtained from f by minimalization and argue that k is effectively calculable. In fact, given x,, . . ., xm-, E w , start computing f (x,, . . ., xm-,, O), f (x,, . . ., xm-,, I), . . .. Since f is special, 0 eventually appears in this sequence. The first y for which f(xo, . . ., x ,-,, y) = 0 is the desired value of k at (x,, . . ., xm-,), and the calculation can then terminate. Thus the assumption that f is special is very crucial. Otherwise, for some arguments this procedure would continue forever without yielding an output. We can argue as follows, intuitively, that every effectively calculable function is general recursive. Let f, m-ary, be effectively calculable. We then have a finitary procedure P to calculate it. Given an argument (x,, . . ., xm-1), from P we make a calculation c; the last step of the calculation has the value f(xo, . . . , xm-,) coded in it. Let Tconsist of all sequences (P, x,, . . . , xm-,, c) of this sort. Presumably T itself is effectively calculable and probably more easily calculable than f. By a coding device we may assume that P E w and c E w . Let V be the function that finds the output f(xo,. . ., x ~ - within ~ ) c. Now it is reasonable to suppose that both T and V are simple enough that they are recursive, for no matter how complicated f is, T and V must be very routinely calculable. Also, it is reasonable to assume that c is uniquely determined by P and x,, . . ., x ,-,. Hence
so f is recursive. We shall see that this intuitive argument is very close to the rigorous argument that every Turing computable function is recursive. Church's thesis is the philosophical principle that every effectively calculable function is recursive. This principle is important in supplying motivation for our notion of recursiveness. We shall not use it, however, in our formal development. Later, especially in Part 111, we shall use what we will call the weak Church's thesis, which is just that certain definite arguments and constructions which we shall make are to be seen to be recursive (or even elementary) without a detailed proof. The weak Church's thesis rests on the same foot as the common feeling that most mathematics can be formalized
within set theory. Of course we can take extensive practice with checking the weak Church's thesis as strong evidence for Church's thesis itself.
,
Theorem 3.2. If A is closed under recursive operations, then A is closed under primitive recursive operations. In particular, every primitive recursive function is recursive. Now we want to see that there is a recursive function which is not primitive recursive. The argument which we shall use for this purpose is of some independent interest, so we shall first formulate it somewhat abstractly.
Definition 3.3. Let A be a collection of number-theoretic functions. A binary number-theoretic function f is said to be universal for unary members of A provided that for every unary g E A there is an m E w such that for every n E w , f(m, n) = gn. Theorem 3.4. Let A be a set of number-theoretic functions closed under elementary recursive operations. Iff is uniuersal for unary members of A , then f $ A. PROOF. Assume t h a t f ~A. Let gm = f(m, m) + 1 for all m E w . Thus g E A. Sincef is universal for unary members of A , choose m E w such that f(m, n) = gn for all n E w . Then gm = f(m, m) = f(m, m) + 1, contradiction. 0 The proof just given is an instance of the Cantor diagonal argument. Other instances will play an important role in this part as well as in Part 111; see, e.g., 15.18 and 15.20.
Lemma 3.5. There is a general recursive function which is universalfor unary primitive recursive functions. PROOF. We first define an auxiliary binary function h by a kind of recursion which is not primitive recursion, and afterwards we will show that h is actually general recursive. We accompany the recursive definition with informal comments. We think of a number x as coding information about an associated primitive recursive function f : (x), is the number of arguments off, and the next prime factor of x indicates in which case of the construction of 2.29 we are in. The definition of h(x, y) for arbitrary x, y E w breaks into the following cases depending upon x: Case 1 (Successor). x = 2. Let h(x, y) = (y), + 1 for all y. Case 2 (Identity functions). x = 2".3'+l, where i < n. Let h(x, y) = ( Y ) ~ for all y. 'I, with n, m > 0. Case 3 (Composition). x = 2%.5".p;.p',0. . . . .p;:; For any y, let h(x, y ) = h(g, p ; ( ~ O . ~ ) . . . . .ph(r(m - U.Y) m-1 1.
Note here that q < x and rO, . . ., r(m - 1) < x, so the recursion is legal.
47
Chapter 3 : Recursive Functions; Turing Computability
Part 1: Recursive Function Theory
~t is similarly show that r is closed under primitive recursion with parameters. Thus ( 1) holds. Now let f ( s , y) = h(x, 2Y)for all x, y E w . Then by (I), f is universal for unary primitive recursive functions. Hence it only remains to show that h (and hence f ) is general recursive. This proof can easily be modified to show that almost any legal kind of recursion leads to a general recursive function. This kind of proof is, however, very laborious. There is a much easier way of proving this kind of thing: see the comments following the recursion theorem in Chapter 5. The computation of h(x, y) can be done in finitely many steps, in which we compute successively certain other values of h : h(a,, bO),. . ., h(am-,, bm-,). We identify this sequence of computations with the number pgO... . . pctm m _-,1), where, for each i < m, ci = 2a'.3bi.51t(ai.bi). This intuitive idea should be kept in mind in checking the following statement, which clearly shows that h is general recursive. For brevity, we write (a),, (or (a),,, or (a)(i, j)) in place of ((a),),; similar abbreviations hold for (((u)~)~),, etc.
Case 4 (Primitive recursion without parameters). x = 2.7'-lla with q > 0. We define h(x, y) by recursion on y: h(x, 1) = a, 2~+ 1) = h(x, z) = 0
2 ~3h(x. . em ( 2 . ~ )1,) for z not of the form 2"
l l q .13' with Case 5 (Primitive recursion with parameters). x = 2'" m > 0 and q > 0. We define h(x, y) by recursion on y. First let y be given with (y),,, = 0. We set 0 , Y) = h(9, Y) y .p%.ph,'=f.""P(Prn.2)) )1) = Case 6. For x not of one of the above forms, let h(x, y)
=
0 for all y.
This completes the recursive definition of h. We first claim (I) for every m E w .-. 1 and for every m-ary primitive recursive function f there is an x E w 1 such that, for all yo, . . ., ym- E w ,
-
Statement. For any x, y E w , h(x, y) = (z),,,,, where z is the least u such that u 2 2, (u),,,, = X, ( u ) , ~=. ~y, and for each i < lu one of the following holds :
Indeed, let J? be the set of all f such that an x exists. Then, for all y,
so ri E J?. Next, suppose i < n. Then for any yo,. . ., yn-l
E w,
so UT E I?. To show that is closed under composition, suppose that f e I', go, . . .,gm-l E J?, f m-ary, and go, . . . ,g,-, each n-ary. Choose u e w for f and v,, . . ., vm-, t w for go,. . .,gm-, respectively so that ( I ) holds for f, u ; g o , u 0 ; .. . g v 1 Let x = 2n.5m.p;.pF-.. ..pY(.jl). Then for any yo, . . . , yn- t w we have, with z = pEO.. . . - p;(" I), gi(yo,. . ., yn- l) = ti for each i < m,
Y
f
Thus J? is closed under composition. T o show that r is closed under primitive recursion without parameters, suppose f t r,f binary, with associated number q SO that (I) works, and suppose that x = 2'. 7'. 1 la. Let kO = a, k(n 1) = f(n, kn) for all n E w . Then we show that ky = h(x, 2y) for all y w by induction on y :
+
(2) (uho = 2 and (u),, = (u),,, + 1 ; (3) Kuh0 = 1 and (u),,, - 1 < (u),,, and (u),, = (u)(i, 1, (u),,, - I ) ; (4) ( ~ ) , o#o 0, (U),OI= 0, ( u ) , ~ # ~0, I(u),, < (u),,, + 3, and there is a j < i such that (u),, = (u),,,, I(u),, n, then there is a computation ((F, c,, n + I), (G,, a,, b,), . . ., (G,- ,, a, - ,,b, - ,)) of M having the following properties :
ci
is Turing computable.
PROOF. A machine for
4
is
U; is Turing computable. PROOF. The machine is T(n-i)copy. Lemma 3.11.
Lemma 3.12. The class of Turing computable functions is closed under composition. PROOF. Suppose f m-ary, go, . . .,g,-, n-ary. Supfiose f, go, . . .,g,-, are computed by M, N o , . . ., N,-, respectively. Then the following machine computes K; ( f ;go, . . .,g, - ,) : K e f t + Tl
-+
Tleft
NO+ T&+,)copy
+
T6+1)copy + TpseehO
+NI +
.' '
-+
Tright
-+
T 6 +,)copy Nm - 1 T(m+( m- a)n)copy-+ . . . + Tm c o p y + M -+ Tfin. -+
-f
-f
+ Trend
+
T(m+( m - 1)n)ocpy
-f
Lemma 3.13. The class of Turing computable functions is closed under primitive recursion without a parameter. PROOF. Suppose that f is a binary operation on w , computed by a machine M, and a E w . Let go = a, g(n + 1) = f ( n , gn) for all n E w. Then the following machine computes g :
-,
(1) Gp-,i = F i f o r all i 5 n + 1; (2) l ( f ' " o . . ~ . ~ x ( m l lies ) ) + lon ) G,-I beginning at n b p - I - 1; (3) G,-,i = 0 for all i 2 b,-,. We then say that f is computed by M.
+2
and ending at
There are, of course, several arbitrary aspects in this definition of computable function. Many details could be changed without modifying in an
Lemma 3.14. The class of Turing computable functions is closed under primitive recursion with parameters. PROOF. Suppose that f is m-ary, m > 0 , g is ( m + 2)-ary and that they are computed by M and N respectively. Let h(xo,. . ., x,-,, 0 ) = f ( x o , . . . , x,-,), Z1
Chapter 3 : Recursive Functions; Turing Computability
Part 1 : Recursive Function Theory
Definition 3.17. Let [E be the set of even numbers. Let T be the class of all Turing machines. If M is a Turing machine, with notation as in 1.1, we let the Godel number of M, g M , be the number
Lemma 3.18. 8*T is elementary.
PROOF. For any x E w , x E ~ * ifTlx is odd, x > 1, for every i 5 lx we have ((x),), < 5, for every i I lx there is a j I lx such that ( ( x ) ~ )=~ ((x),),, for every i I Ix, if i is even then ((x),), = ((x),,~),, and for all i, j I lx, if i 2 I j, then ((x),), # ((x),),, and if i is even then ((x),), = 0, while if i is odd, ((x),)~= 1. 0
+
Lemma 3.15. The class of Turing computable funcrions is closed under minimalization (applied to special functions).
Definition 3.19. If F is a tape description, then the Godel number of F, gF, is the number
PROOF. Let f be an m-ary special function, m > 1, and suppose that f is , computed by a machine M. Let g(xO,. . . , xm-,) = py[ f ( x O , .. ., x ~ - y)~ = 01 for all x,, . . . , x,-, E w . Then the following machine computes g :
where
ki
=
(/2) {F(-(i
+
if i is even, 1)/2) if i is odd.
Note that a natural number m is the Godel number of some tape description iff Vx < Im((m), < 2) and m # 0. Summarizing Lemmas 3.10-3.15, we have:
Lemma 3.16. Every general recursive function is Turing computable. We now want to get the converse of 3.16. This requires Godel numbering. This process, whose name is just a catch-word for the process of numbertheoretically effectivizing nonnumber-theoretic concepts (already hinted at in the introduction to this part), has already been used twice in less crucial contexts. In discussing course-of-values recursion, we numbered finite sequences of numbers; see 2.31. And in constructing a function universal for unary primitive recursive functions essentially we numbered construction sequences for primitive recursive functions; see 3.5. Now we want to effectively number various of the concepts surrounding the notion of Turing machine. Besides our immediate purpose of proving the equivalence of Turing conlputability and recursiveness, this effectivization will be important for our later discussion of general recursion theory. The script letter g will be used for Godel numbering functions throughout this book; we will usually just depend on the context to distinguish the various particular uses of "g."
I
: I
Definition 3.20. A complete conjiguration is a quadruple (M, F, d, e) such that (F, d, e) is a configuration in the Turing machine M. C is the set of all complete configurations. The Godel number g(M, F, d, e) of such a complete configuration is the number
where
Lemma 3.21. 8*@is elementary. PROOF. For any x E w , x iff Vi I l(x),(((x),), < 2), (x), # 0, (x), E g*T, and there is an i 5 l(x), such that (x), = (((x),)~),, and lx I3. 0
Definition 3.22. (i) For any e E E , let
Chapter 3 : Recursive Functions; Turing Computability
Part 1 : Recursive Function Theory
For any x
E w,
Lemma 3.27. R2 is elementary.
let x
+2
x-2
f,x=
[r: 1
i f x is even,
ifxisoddandx>I, i f x is even and x > 0, ifx=O, ifxisodd.
Lemma 3.23. fo andf, are elementary. For any e E Z we havefoge and flge = g(e - 1).
Definition 3.28. I f h is a finite sequence of 0's and l's, we let =
g(e
+ 1)
gh =
n
pZi+l.
i < Dmnh
For any x
E w,
let f2x
=
n,, ,pa.
Lemma 3.29. f, is elementary, and f,x Definition 3.30. For any x , y
E w,
= gl("+l)for
Cat ( x , y)
=
any x.
ni, pg: ,.
x.
,y
+
Lemma 3.31. If h and k are jinite sequences of 0's and l's, then ~ ( h k=) Cat (gh, gk). (Recall the definition of hk from 1.11.) Lemma 3.24. Let R , = { ( x ,n, E , y) : x = 9 F for some tape description F, n = ge for some e E Z, E = 0 or E = 1, and y = 9(F:)). Then R , is elementary. I x ( ( x ) ~ < 2), x # 0, E < 2, and y = PROOF. (x, n, E , y) E Ro i f f Vi I [xIPY" .pi. 0
Definition 3.32. f Ax
=
Cat (2,f2x). For m > 1 ,
Lemma 3.33. f ? is elementary for 8(0 1 ( ~ 0 + 1 0) . . .0 l(x(m-1)+1)
each m , and f?(x,,. . ., x,-,)
=
>.
Lemma 3.25. Let R, = { ( x , y) : x is the Godel number of a complete conjiguration ( M , F, d, e), y is the Godel number of a complete conjiguration ( M , F', d', e') (same M ) , and ((F,d, e), (F', d', el)) is a computation step). Then R, is elementary.
Lemma 3.34. Let R3 = { ( x ,y, m , n): x is the Godel number of a tape description F', y is the Godel number of a jinite sequence h of 0's and l's, m = ge and n = ge' for certain e, e' E Z, and h lies on F beginning at e and ending at e'). Then R3 is elementary.
PROOF. For any x , y, m , n ( x , y, m , n) E R3 i f f y # 0, Vi I lx((x), < 2), # 0, either y = 1 and m = n, or else y > I , for every i I ly[(y),= 1 or ) ~that (z), = m , fo((z)J = ( z ) ~ + ~ ( y ) , = 21, and there is a z r ( m + 2 ~ such X
for each i < lz, lz
Definition 3.26. A complete computation is a sequence 5% = ( ( M , F,, do, e,), . . ., ( M , F,, dm,em)) such that 0 let T , = {(e,x,, . . ., x,-,, u ) : e is the Godel number o f a Turing machine M , and u is the Godel number o f a complete ; computation ( ( M , F,, do, v,), . . ., ( M , Fn, dn, v,)) such that O 1 ( x O + l ) 0 . . 0 l(x(m-l)+l) lies on Fo ending at - 1 , F, is zero otherwise, v, = 0, and Fnl = 1.) rr
Chapter 3 : Recursive Functions; Turing Computability
Part 1: Recursive Function Theory
Note that for any e, x,, . . ., x,-, (e, x,, . . ., X , - U ) E T,.
there is at most one u such that
Ew
Lemma 3.36. T, is elementary.
1
Definition 3.42. ( i ) J(a, b) = ((a Exc [ d x ]for all x E w.
+ b)2 + b)2 + a for all a, b E w. (ii) L x =
Theorem 3.43 (i) J and L are elementary; (ii) Exc 0 = 0 and LO = 0 ; (iii) if Exc (a 1) # 0, then Exc (a + 1) La; (iv) Exc J(a, b) = a ; (v) LJ(a, b) = b ; (ui) J i s 1 - 1.
+
=
Exc a
+ 1 and L(a + 1 ) =
= x2 + Exc a < ( X 1)'. Since Exc (a 1) Z 0 , it is then clear that Exc (a + 1) = Exc a 1. Furthermore, clearly x2 I a < ( x + and x2 I a + 1 < (X I)', SO x = [.\/a] = [ d ( a l ) ] and hence La = L(a + I ) . To prove (iv), note that
PROOF. ( i ) and (ii) are obvious. As to (iii), choose x such that a Obviously V is elementary.
+
Lemma 3.38. Every Turing computable function is recursive.
PROOF. Let M be a Turing machine which computes f as described in Definition 3.9(ii), and let e = gM. Then for any x,, . . ., x m - , E w , f ( x 0 , . . ., x,-d
=
V M e , X O , . . ., x,-
I,
0
Theorem 3.39. A function is Turing computable i f it is recursive. We close this chapter with a variant of the notion of recursiveness due to Julia Robinson [3].It will be useful to us later on. The idea is to simplify the definition of recursive function by using rather complicated initial functions but very simple recursive operations.
Lemma 3.41.
I.\/@
greatest integer I .\/x x - [2/xI2;this is the
[%I] and Exc are elementary.
PROOF. [.\/XI 5 x for all x
[@I
= =
=
E w.
0
{!$:;
Thus we may use 2.34. Finally, Exc n
=
n
((a
+ +
+ b)' + b)'
I J(a, b) < ((a b)2 b)2 + 2(a = ((a + b)2 + b + 1)'.
+
+
+ b)2 + 2b + 1
Hence Exc J(a, b) = a, and (iv) holds. Furthermore, clearly from the above [1/J(a,b)] = (a b)2 b ; since
+
+
we infer that LJ(a, b) = Exc [ d J ( a ,b)] = b, as desired in (v).Finally, (vi)is a purely set-theoretical consequence of (iv) and (v). 0 For the next results we assume a very modest acquaintance with number theory; see any number theory textbook.
Tbeorem 3.44 (Number-theoretic: The Chinese remainder theorem). Let m,, . . ., m, - be natural numbers > 1, with r > 1 , the mi's pairwise relatively prime. Let a,, . . ., a,-, be any r natural numbers. Then there is an x E w such that x = ai(mod mi)for all i < r.
,
Further,
1 # ( [ d n ]+ 112, + 1if n +otherwise = [ d n ] + G In + 1 - ([z/nl + 1)'1
+ 111 =
+
u) E Tml,
as desired.
Definition 3.40. [ z / ]is the function such that [.\/XI for each x E w . Also, for any x E w we let Exc x excess of x over a square.
+
A
[z/nI2.
The next definition and theorem introduce special cases of the important device of pairing functions, extensively used in recursive function theory.
PROOF. By induction on r ; we first take the case r
= 2. Since rn, and m , are relatively prime, there exist integers (positive, negative, or zero) s and t such that 1 = m,s + m,t. Then a, - a, = mos(ao- a,) + m,t(a, - a,). Choose u E w such that a, - mos(a0- a,) + urnom, > 0 , and let x = a, m,s(a, - a,) + um,m,.Then x = a,(mod m,),andx = a, + mlt(a0 - a,) urnom, = a,(mod m,), as desired. Now we assume the theorem true for r and prove it with "r" replaced by
+
Chapter 3: Recursive Functions; Turing Computability
Part 1: Recursive Function Theory
+
-
r + 1". With s, t, u as above, choose x E OJ such that x E a, - mos(ao - a,) umoml(mod moml), x = a2(mod m,), . . ., x = a,(mod m,). Then x = a, (mod m,) and, since a, - m,s(a, - a,) = a, m,t(a, - a,), x a,(mod m,) D as desired. "
+
Definition 3.45. For all x, i E w let P(x, i )
=
rm (Exc x, 1
+ (i + 1)Lx).
Theorem 3.46 (Number-theoretic: Godel's &function lemma). For any finite sequence yo, . . ., y,-, of natural numbers there is an x E w such that P(x, i) = yi for each i < n. PROOF. Let s be the maximum of yo,. . ., y,-,,n. For each i < n let m, = 1 + (i 1) - s! Then for i < j < n the integers m, and mj are relatively prime. For, if a prime p divides both mi and m,, it also divides mj - mi = ( j 1). s! - (i + l).s! = ( j - i).s! Now pts!, since pll (i + l)s!. Hence p l j i. But j - i < n I s, and hence this would imply that p(s!, which we know is impossible. Thus indeed mi and m, are relatively prime. Hence by the Chinese remainder theorem choose u such that
+
+
v
= y,(mod m,)
+
for each i < n.
that for any x E w , x2 I x2 Thus (1) Next,
+ x < ( X + I)', Exc has range
and hence Exc (x2 + X) = X.
w.
+
Ex&" (2x) = x2 2x (2) for all x E w. For, obviously Exc (x2 2x) = 2x. If Exc (y) = 2x with y < x2 + 2x, we may write y = z2 2x < (z 1)'and so z c: x and hence (z + = z2 + 22 1 I z2 2x < (Z a contradiction. Thus (2) holds. Again,
+ + + + +
+
+ I ) = x2 + 4x + 2 for all X E U . For, (X + 1)' = x2 + 2x + I < x2 + 4x + 2 < x2 + 4x + 4 = ( X + 2J2, and hence Exc (x2 + 4x + 2) = 2x + 1. Now suppose Exc (y) = 2x + I, with y < x2 + 4x + 2. Choose z such that y = z2 + 2x + I < ( z + Then z2 + 2 x + 1 = y < x2 + 4x + 2 = ( x + + 2 x + I, and hence z 5 x. Hence (z + = z2 + 22 + 1 I z2 + 2x -I- 1 = y < (z + a contradiction. Thus (3) holds. From (2) we see that CA x = 0 = Exc Ex&" (x + x) for all x w; Exc(-"(2x
(3)
E
J
Let x = J(v, s !). Then Exc x = u by 3.43(iu), and Lx = s ! by 3.43(u). Hence if i < n we have P(x, i) = rm (Exc x, 1 ( i 1)Lx) = rm (u, mi) - Yf.
hence
+ +
Definition 3.47. Iff is a 1-place function with range w, letf(-l)y = PX(fx for all y E w . We say that f(-l) is obtained from f by inversion.
= y)
Theorem 3.48 (Julia Robinson). The class of recursive functions is the intersection of all classes A of functions such that 4, Exc, U; E A (for 0 5 i < n), and such that A is closed under the operations of composition, and of inversion (applied to functions with range w).
+,
PROOF. Clearly the indicated intersection is a subset of the class of recursive functions (f(-l)y = PX((fx - yl = 0), SO we have here a special case of minimalization). Now suppose that A is a class with the properties indicated in the statement of the theorem. We want to show that every recursive function is in A. This will take several steps. The general idea of the proof is this : Inversion is a special case of minimalization, and the general case is obtained from inversion by using pairing functions. Primitive recursion is obtained by representing the computation of a function f as a finite sequence of the successive values off, coding the sequence into one number using the fi function, and selecting that number out by minimalization. Our proof will begin with some preliminaries, giving a stock of members of A , which leads to the fact that the pairing functions are in A . First note
Hence by composition with
Ck E A
(5)
Now let x @ y Thus
=
J,
for all n > 0 and all m E w.
Exc (Exc'-') (2x
+ 2y) + 3x + y + 4) for
all x, y
E w.
Now if x 2 y, then (x
+ y + 2)2 = (X + y)2 + 4x + 4y + 4 I (x + Y ) + ~ 2(x + y) + 3 5 + y + 4 =Exc'-l)(2~+2~)+3x+y+4 < (x y)2 6x 6y 9 = (x y 3)2.
+ +
+ + + +
by(2)
Hence (7) Let fx
=
xOy=x-y i f y ~ x . x2 for all x E: w. Then by (2), ( 7 ) , f-Y = Ex&" (2x) - 2x for all
X E w, SO
(8)
Next note that sg .w (9)
f € A. =
Exc .(x2) and @ x
=
sg, G EA .
I
a sg s for all x
E w.
Thus
Chapter 3 : Recursive Functions; Turing Computability
Part 1: Recursive Function Theory Let Ix
Furthermore,
[ d x ] for all x
E w.
Then by (18), Ix = k(x 0 Exc x), so
Exc o 4 has range w.
(10)
+
For, Exc 40 = 0, and if x # 0, then Exc 4(x2 x - 1) = X. Now using 3.43(iii) we see that j x = Exc (Exc 0 d)(-l)(x) for all x E w. Hence
+€A.
(1.1)
+ y y + 2x + 2y + 1 + y y + 5x + 3y + 4 + Y ) +~ 4x + 4y + 4 + y + 2)2. ~ 2(x + y) + 3x + y + 4), (21) now follows. Since x 0y = Exc ((x + Y ) +
(12) =
2y, then EXC44 Exc(-')
i f x = 2y
(x
for all x E w.
x[E(x) = Exc 44 Exc(- l)x
EXC44 (y2 + 2y) Exc (y2 + 2y + 2) = 1;
X = =
(22)
+ 1, then EXC44 Exd-l'
+
EXC44 (y2 + 4y 2) = Exc (y2 + 4y + 4) = 0.
X =
Hence by (8) and (19)
For,
Recall that [E is the set of even numbers. Next we show
For, if x
=
x
+y +
= (x
< (x < (x = (x
(x, y) = sg [(x O y) 0(3x hence X, E A.
+ y + 3)]
for all x, y E w, and
For, if x 2 y then
by (3)
From (12) we have: XEE A.
(13) Now let gx
=
2 Exc x
If x < y, then
+ sg xlEx for all x E w. Thus
(14) We claim (15)
g has range w.
For, if x = 2y then, since y2 + y is even, g(y2 + y) = 2 Exc (y2 2y = x. If x = 2y + 1 then, since (y y is odd, g((y 2y 1 = x. Let hx = [x/2] = greatest integer y I x/2 for all x E W. Then
+
+
(16)
hx
=
Exc g(-l)x
+
for all x
E
+
+ y) = + y) =
for m(x, Y) = x>(x, y)-(x O Y) + x>(Y,x).(y O 4 . With the aid of the auxiliary functions which we have shown to be in A, we can now show how minimalization can be reduced to inversion.
w, and hence h E A.
For, 2 Exc g(-l)x + Sg XIEg(-l)x= x for any x ; thus if x is even, then 2 Exc g(-l)x = x ; while if x is odd, 2 Exc g(-l)x + 1 = x, as desired. For any x E w, let kx = [(Exc/x)/2] + sg x. Thus Furthermore, (18) For, if x
k(x2) = x
for all x.
= 0 the result is obvious. If x # 0, thenjx2 = x2 - 1 = (X 2x - 2, Exc/x2 = 2x - 2, and hence k(x2) = X, as desired.
~ x2) 0y2)/2] for all x, Y E w . Let m(x, Y) = For, x.y = [(((x + Y ) 0 Ix - yl for all x, y E w. Then
+
Suppose f is a 2-ary special function, f E A. Let gx = py(f(x, y) = O), for all x E w. Then for all x E w , gx = Lpz(f(Exc z, Lz) = 0, (25) Exc z Lz = [d[\/z]], and Exc z = x) (and for each x there always is a z satisfying the conditions in parentheses).
+
To prove this, let x E w be given. Let z = J(x, gx). Then f(Exc z, Lz) = f(x, gx) = 0 by 3.43; Exc z + Lz = x + gx = [ d [ d z ] ] by direct computation, and Exc z = x. Clearly also Lz = gx. It remains to show that our choice of z gives the least integer s satisfying the conditions of the p - operator. Assume that f(Exc s, Ls) = 0, Exc s + Ls = [l/[l/s]], and Exc s = x. Say
Chapter 3 : Recursive Functions; Turing Computability
Part 1 : Recursive Function Theory
To prove (31), let x,, . . ., x, - ,, y E w be given. By Theorem 3.46 choose z y we have such that P(z, i) = g(xo, . . ., xm-,, i) for each i 5 y. Thus if ow I
Then [ d s ] = p, and Ls = Excp. Say p = q2 + s = p2 + x < ( p + Then [2/[2/s]] = q. Thus x + Ls = q. Since f(Exc s , Ls) = Ls < (q + 0, we have gx I Ls. Hence x + gx I q, (x + g ~ < )q2,~(x + g ~ + )gx ~I p, [(x + g ~ +)gxI2 ~ I p2, and z = J(x, gx) I p2 + x = S, as desired. Thus (25) is established. (26)
Under the hypothesis of (25) we have g E A . Hence
For, let nz = Sg f(Exc z, Lz).Sg (IExc z + Lz - [z/[z/z]]l).Exc z. By (25), n has range W , and clearly n E A . Clearly for any x E w we have gx = Sg x . go + Ln(-l)x, so g E A. Next,
. .,., xm - 1, w, P(z, w)) Or w = Y) = y. ~lw(P(z,ow) Z ~ ( X O Furthermore, P(z, 0) = g(xo, . . ., xm-,, 0) = f(xo, . . ., xm-,). Hence there is a z of the sort mentioned in (31). Let t be the least such z. By induction on i it is easily seen that for any i Iy we have P(t, i) = g(xo, . . ., x,- ,, i). Hence P(t, y) = g(xo,. . ., x,-,, y), as desired.
(27) iff is special, f E A , and g is obtained from f by minimalization, then g E A. For suppose f is rn-ary, rn > 1. We proceed by induction on rn; the case rn = 2 is given by (26). Inductively assume that rn > 2. Define f ' by
Under the hypothesis of (31), if in addition f and h are in A, 0 2 ) then g E A. For, first let
for all x,, . . ., xm-, E w . Clearly f ' is special, since f is. Let g' be obtained from f ' by minimalization. By the induction hypothesis, g' E A. Now if x,, . . ., x,-, E w , then
for all x,, . . .,xm-,, y, z, w E w . Then k' more, obviously k' is special and
by (9), (24), and (30). Further-
,
Let kt'(x0, . . ., xm-,, y, z) = ~lw(k'(x,,. . ., x ,-,, y, z, w) = 0) for all x,, . . ., xm-,, y, z E w . Then k" E A by (27). Let km(x0,. . .,xm-,, y, z) = sg (I/?(z, 0) f(xO,..., ~ ~ - ~ ) 1 ) + s g ( I k,..., " ( x ~ , - ~ , y , z ) yl). Then ~ " E A and , by (31) kmis special; moreover,
",
~ ( x o ,..., xm-I, Y) = P(CLZ(~"(XO,. . ., Xm-13 Y, Z) = O), Y).
hence g E A by (20). For all x, y E w let g k Y) = [x/yl. ,
For, if x, y E w then
EA
.IHence g
E
A, as desired.
so g E A by (27) and (22). Now since rm (x, y) = x @ ([x/y].y), we have
If g is obtained from a and h by primitive recursion, a E w and h (33) binary and h E A, then g E A.
Hence by (20),
The proof is similar to that of (32). Thus 4, U; E A, and A is closed under composition, primitive recursion, and minimalization (applied to special functions). Hence, every recursive function is in A, and the proof of 3.48 is complete. 0
Now we can take care of primitive recursion. Suppose g is obtained from f and /I by prim~tiverecursion, f tn-ary and /I ( m + 2)-ary, m > 0. Then for any so,. . ., s,,_,, y E w , (3 1 ) g(xo,. . . , .I-,- ,, = &z[P(z, 0) = f ( u, . . . , x, - ,) and pM'(P(2,J W ) # /7(x0,. . . , Xm-l, M', P(z, M')) Or IZ. = 4') = J'], Y ) ; such z and w always exist, for any x,, . . ., s,_,,y t w . 13)
Definition 3.49. such that
Let P be the two-place operation on one place functions P(f, g)(x)
=f
for all one place functionsf, g and all x
x
+ gx
E w.
Chapter 3: Recursive Functions; Turing Computability
Part 1: Recursive Function Theory
(3) f ( x , Y + 1) 5 f ( x + 1, y); (4) f ( x , Y) < f ( x + 1, Y); (5) f ( l , Y) = Y + 2;
Theorem 3.50. The class of 1-place recursive functions is the intersection of all sets A of 1-place functions such that d, Exc E A a n d A is closed under K:, P, a n d inversion (applied to functions with range w).
(6) f(2, y) = 2y + 3 ; (7) for any el, . . ., c, there is a d such that for all x, XI., 1 and
R, is elementary.
PROOF. (m, n, p, q) E R1 if m, n, p, q are Godel numbers of words and Cat (Cat (m, n), p) = q and Vx I q Vy 5 q[lx < lm & x and y are Godel numbers of words 3 Cat (Cat (x, n), y) # q]. 0
Definition 4.11. R, = {(p, m, n) :p is the Godel number of a Markov algorithm A, m, n are Godel numbers of words a, b respectively, and (a, b) is a nonterminating computation step under A). R, is elementary.
PROOF. (p, m, n) E R, iff p is the Godel number of a Markov algorithm, m and n are Godel numbers of words, 3i lp such that (((P)~)~, m) E R,, and Qi I 1, Vx I m QY 5 mm[(((~)i)o, m) E Ro & V j < i[(((p)j)o, m) @ R01 & (x, ((p>i)o,Y, m) E RI => Cat (Cat (x, ((p),)~,y) = n & ((p)i)z = 01. 0
Definition 4.13. R, is like R, except with "terminating" instead of "nonterminating".
The set of Godel numbers of words is elementary.
PROOF.m is the Gijdel number of a word iff m [(m), r 3 and 1 r (mhl.
R, is elementary.
PROOF (m, n) E Ro iff m is the Godel number of a word, n is the Godel number of a word, and 3x I n 3y I n[Cat (Cat (x, m), y) = n]. (Recall from 3.30 the definition of Cat.)
Lemma 4.12. Definition 4.3.
The set of Godel numbers of Markov algorithms is elementary.
Vi < Im 0
Lemma 4.14.
R, is elementary.
Chapter 4: Markov Algorithms
Part 1 : Recursive Function Theory
If (do, . . ., dm) is a finite sequence of words, its Godel
Definition 4.15. number is
Also let R, = {(m, n) : m is the Godel number of a Markov algorithm A, and n is the Godel number of a computation under A).
Lemma 4.16.
BIBLIOGRAPHY 1. Curry, H. Foundations of Mathematical Logic. New York: McGraw-Hill (1963). 2. Detlovs, V. The equivalence of normal algorithms and recursive functions. A.M.S. Translations Ser. 2, Vol. 23, pp. 15-81. 3. Markov, A. Theory of Algorithms. Jerusalem: Israel Program for Scientific Translations (1961).
R, is elementary.
PROOF. (m, n) E R, iff m is a Godel number of a Markov algorithm, In 2 1, 0 and Vi < In l[(m, (n)i, ( n h + d E R21 and (m, (n)lnzl, (n),,) E Ra.
Definition 4.17. fix
=
EXERCISES 4.28.
Let A be the algorithm
n,,,pp.
Lemma 4.18. f, is elementary. Definition 4.19. f i x f ixm).
=
Cat (2, fix).f ?+l(x,,
. . .,x,)
Lemma 4.20. f," is elementary, for each m E w
=
Cat (f ;(x,,
Show that A converts any word a on 0, 1 (i.e., involving only 0 and 1) into a
. ..,xm-,,)
(0).
4.29.
Construct an algorithm which converts every word into a fixed word a.
4.30.
Construct an algorithm which converts every word a into l("+'), where n is the length of a.
4.31.
Let a be a fixed word. Construct an algorithm which converts any word # a into the empty word, but leaves a alone.
4.32.
There is no algorithm which converts any word a into aa.
4.33.
Construct an algorithm which converts any word a on 0, 1 into aa.
Lemma 4.21. f ,"(x,, . . ., xm-,) is the G6del number of
0 1'~"+1' 0 . . . 0 l(x(rn-l)+l) The notations R,, R,, R,, R,, f,, f," section.
will not be used beyond the present
Definition 4.22. Th = {(e, x,, . . ., x,-,, c) : e is the Godel number of a Markov algorithm A , and c is the Godel number of a computation (do, . . ., d,) under A, (c), = Cat (f ?(x,, . . ., xm- 2. 33), and 2 occurs only once in d,). Lemma 4.23. Definition 4.24.
Th is elementary. V'y
=
p x 2 y[(Cat (f ix, 2.33), (y),,)
Lemma 4.25.
V' is elementary.
Lemma 4.26.
Every algorithmic function is recursive.
E
Ro].
PROOF. Say f is m-ary and is computed by a Markov algorithm A . Let e be the Godel number of A. Then for any x,, . . ., xm- E w we have
,
f(x0, . . ., xm-,)
=
V1pz((e, x,,
. . .,xmWl,z ) E Th). 0
Thus f is recursive, as desired.
Theorem 4.27.
Turing computable
=
recursive
=
algorithmic.
4.34*. Show directly that any algorithmic function is Turing computable.
Chapter 5: Recursion Theory
5
Recursion Theory
(i) (x,, . . ., x, - ,) E Drnn F, (ii) there is a computation of M beginning with (F, c,, n
+ 1)
are equivalent; and if one of them holds, and (F, c,, n + I), (GI, a,, b,), , . ., (G,-l, a,-,, 6,-,)) is a computation of M, then (1)-(3) of 3.9(ii) hold. Clearly any partial Turing computable function is effectively calculable.
Corollary 5.2. Every Turing computablefunction is partial Turing computable. Every total partial Turing computablefunction is Turing computable. Next, we want to generalize our Definition 3.1 of recursive functions. To shorten some of our following exposition we shall use the informal notation
to mean that . - . is defined iff - - - is defined, and if . . . is defined, then - . = - - -. For example, iff is the function with domain {2,3) then when we say We have been concerned so far with just the definitions of mathematical notions of effectiveness. We now want to give an introduction to the theory of effectiveness based on these definitions. Most of the technical details of the proofs of the results of this chapter are implicit in our earlier work. We wish to look at the proofs and results so far stated and try to see their significance. In order to formulate some of the results in their proper degree of generality we need to discuss the notion of partial functions. An m-ary partial function on w is a function f mapping some subset of "w into w. The domain off may be empty-then f itself is the empty set. The domain off may be finite; it may also be infinite but not consist of all of "w. Finally, it may be all of "w, in which casef is an ordinary m-ary function on w. When talking about partial as total. functions, we shall sometimes refer to those f with Drnn f = Intuitively speaking, a partial function f (say m-ary) is effective if there is an automatic procedure P such that for any x,, . . ., xm-, E w, if P is presented with the m-tuple (x,, . . ., xm-,) then it proceeds to calculate, and if (x,, . . ., x,- ,)E Dmnf, then after finitely many steps P produces the answer f(xo,. . ., x,-,) and stops. In case (x,, . . ., xm-,) $ Drnn f the procedure P never stops. We do not require that there be an automatic method for recognizing membership in Drnn f. Clearly iff is total then this notion of effectiveness coincides with our original intuitive notion (see p. 12). Now we want to give mathematical equivalents for the notion of an effective partial function.
Definition 5.1. Let f be an m-ary partial function. We say that f is partial Turing computable iff there is a Turing machine M as in 1.1 such that for every tape description F, all q, n E Z, and all x,, . . ., xm-,E w, if 0 l(xO+l)0 - - - 0 l(x(m-l)+ lies on F beginning at q and ending at n, and if Fi = 0 for all i > n, then the two conditions
we mean that Drnn g
f (x + 2).
n Drnn h = {0,1) and for
any x E {0,1), gx
+ hx =
Definition 5.3 (i) Composition. We extend the operator K! of 2.1 to act upon partial functions. Let f be an m-ary partial function, and go, . . .,g m _ , n-ary partial functions. Then Kg is the n-ary partial function h such that for any Xo, . . . , X,-lEw,
(ii) Primitive recursion with parameters. Iffis an m-ary partial function and h is an (m + 2)-ary partial function, then Rm(f,h) is the (m 1)-ary partial function defined recursively by:
+
for all x,, . . ., xm- ,,y E w. (iii) Primitive recursion without parameters. If a E w and h is a 2-ary partial function, then RO(a,h) is the unary partial function g defined recursively by
Chapter 5: Recursion Theory
Part 1: Recursive Function Theory (iv) Minimalization. Let f be an (m + 1)-ary partial function. An m-ary partial function g is obtained from f by minimalization provided that for all g(x,, . . ., x,-~)
2:
Theorem 5.7. There is a partial recursive function f such that f cannot be extended to a recursive function.
least y such that Vz 5 y((xo, . . ., x,-~, Z) E Dmn f ) and f(x,,. . ., x,-~, y) = 0.
We then write g(x,, . . ., xm-l) "- py( f(x0, . . ., xm-l, y) = 0). (v) The class of partial recursive functions is the intersection of all classes C of partial functions such that 4 E C, U; E C whenever i < n E w , and Cis closed under composition, primitive recursion, and minimalization. Clearly every partial recursive function is effectively calculable. Note that it is not appropriate to simplify the definition of minimalization to g(x,, . . ., x,-~)
2:
least y such that (x,, . . ., x , - ~ , y) E Dmn f and ~ ( x o ,. . , X ~ - I , Y = ) 0,
+
Corollary 5.4. Every general recursive function is partial recursive.
recursive.
Here it is PROOF. PARTIALRECURSIVE =. PARTIALTURINGCOMPUTABLE. only necessary to read again the proofs of Lemmas 3.10-3.16 and check that they adapt to the situation of partial functions and the new Definitions 5.1 and 5.3. COMPUTABLE + PARTIAL RECURSIVE. PARTIAL TURING to reread 3.17-3.38.
Corollary 5.6.
Again one needs only
Any total partial recursive function is recursiue.
+
fx
=0
if x is not the Godel number of a Turing machine, Vpu((x, X, U)E TI) 1 if x is the Godel number of a Turing machine and there is such a u, fx is undefined, otherwise.
+
It is routine to show that f is partial recursive; we will prove this formally in this case, but usually not in the future. We can define f by (1). Clearly then, for any x E w
so f is partial recursive. Now f cannot be extended to a general recursive function. For, suppose f s h with h general recursive. By the proof of 3.38 there is an e E w such that, for all x E w ,
In particular, he = Vpu((e, e, u) E TI) and (by the definition of TI, 3.35) e is the Godel number of a Turing machine. Thus fe is defined, and
In contrast to the situation for Turing computability, it is not at all immediately clear that every total partial recursive function is general recursive; this is, however, true, as our next theorem shows. The proof of this theorem is rather long when carried out from the beginning. = partial
PROOF. The rule for computingf is as follows. For a given x E w , determine whether or not x is the Godel number of a Turing machine. If it is not, set fx = 0. If it is, test in succession whether or not (x, x, 0) E TI, (x, x, 1) E TI, (x, x, 2 ) ' TI, ~ etc. The first time we find a u such that (x, x, u) E TI, set fx = Vu 1. If we never find such a u, the computation never ends. Clearly f is intuitively a calculable partial function, and it has the following property: for any x E w,
(1)
for all x,, . . .,xm- E w. For, even iff is calculable there may be no clear way to calculate g. For example, suppose that (x,, . . ., xm-,, 0) Dmnf, while (x,, . . .,xm-l, 1) E Dmn f and f(x,, . . ., xm-,, 1) = 0. Without knowing that (x,, . . ., x,-~, 0) $ Dmn f it is unclear at what point in a computation of g(x,, . . ., x,-,) one would be justified in setting g(x,, . . ., x,-~) = 1. The above definition of minimalization clearly avoids this difficulty. One can give explicit examples where f is partial recursive but g, defined in this new way, is not. (See Exercise 5.38.) Note that there are nontotal partial recursive functions. For example, clearly C: is partial recursive, and hence by 5.3(iv) so is the function g such that gx 2: py(C?(x, y) = 0). Obviously, however, g is the empty function.
Theorem 5.5. Partial Turing computable
A natural question occurs as to whether every partial recursive function can be extended to a recursive function; the answer is no:
0
fe contradiction.
=
Vpu((e, e, u) ET,)
+ 1 = he + 1 = fe + 1, 0
We now turn to the formulation of some basic results called the normal form, iteration, and recursion theorems.
Definition 5.8. For any e E w and m E UJ let cpr be the m-ary partial recursive function such that for all x,, . . ., xm-, E w, cpr(xo, . . ., xm-,) 2: Vpu((e, x,, . . ., xm-1, u) E Tm). Note also that the (m + 1)-ary partial function F' defined by cpt(xo, . . ., xm-1, e) 2: Vpu((e, XO,. . ., x , - ~ , u) E T,) for all x,, . . ., x ,-,, e E w, is also partial recursive. This remark will be frequently useful in what follows.
Chapter 5 : Recursion Theory
Part 1: Recursive Function Theory Theorem 5.9 (Normal form theorem). For any partial recursive function f (say m-ary) there is an e E w such that f = cpz. PROOF. By the proof of 5.5, second part.
0
Corollary 5.12 (Universal partial recursive function). There is a partial recursivefunction g of two variables such that for any partial recursive function f of one variable there is an e E w such that for all x E w, g(e, x) 2. fx. PROOF. Let g be as in the proof of 5.1 1.
This theorem, which was implicitly used already in the proof of 5.7, has many important corollaries, which we shall now explore. First of all, its normal form nature is made a little more explicit in the following corollary.
-
1 there exist a 1-place elementary function Corollary 5.10. For each m E w f and an ( m + 2)-place elementary function g such that for any m-ary partial recursive function h there is an e E w such that for all x,, . . ., x m - , E w,
PROOF. Let f
=
V and g
=
Sg
0
x,,.
0
In view of the proof of 3.4, the reader might view 5.12 with some suspicion. Let us see what happens if we try the diagonal method on the g of 5.12. For any x E w, let fx .- g(x, x) I. Then f is partial recursive, so by 5.12 there is an e E w such that for all x E w , g(e, x) 2. f x . Now if g(e, e ) is defined, then g(e, e ) = fe = g(e, e ) 1. Conclusion: g(e, e) is not defined. We are saved by g being a partial function. No contradiction arises. We now turn to the iteration theorem. This basic result, although of a rather technical nature, is basic for most of the deeper results in recursion theory. See, e.g., the proofs of 5.15, 6.19, and 6.25.
+
+
0
This formulation suggests the possibility of improving the result by droppingf. (Another possibility, dropping p, is impossible since there are recursive functions which are not primitive recursive.) As to this possibility, see Exercise 5.43; the answer is no. Theorem 5.9 and its proof give rise to a certain universal phenomenon as follows. Corollary 5.11 (Universal Turing machines). There is a Turing machine M with the following property. I f f is any unary partial Turing computable function and a Turing machine N computes it, and if e is the Codel number of N , then if 0 1'" + I ) 0 I("+ l) 0 is placed upon an otherwise blank tape ending at - 1 and if M is started at 0, then M will stop ifJ x E Dmn f, and if x E Dmn f , then after the machine stops I""+" 0 will lie on the tape beginning at 1 . PROOF. Let g be the partial recursive function defined by
-
+
Theorem 5.13 (Iteration theorem). For any m, n c w 1 there is an ( m 1)ary recursive function SF such that for all e, y,, . . ., y,, x,, . . ., x, E w,
PROOF. If M is any Turing machine and y,, following Turing machine :
. . .,y,
E w,
let M,*, ,.,,,, ,be the
+
Clearly there is an (m 1)-ary recursive function s: such that for any e, y,, . . ., y, E w, if e is the Godel number of a Turing machine M, then s:(e, y,, . . ., y,) is the Godel number of M*,, ,...,., Obviously SF is as desired in the theorem. 0 Actually a more detailed analysis would show that s; in 5.13 can be taken to be elementary recursive, but we shall not use this fact. As a first application of the iteration theorem we give Corollary 5.14. There is no binary function f such that for all x, y
for all e, x E w. Let M compute g. Clearly M is as desired.
In more intuitive terms we can describe the way M is to act as follows: M is presented with two numbers e and x. First M checks if e is the Godel number of some Turing machine. If it is, say t. = g N , then M begins checking one after the other whether 0 or 1 or . . . is the Godel number of a computation under N with input x. If there is such a number, M takes the first such and reads off the result of the computation. It may be that e is not the Godel number of a Turing machine or that there is no computation with input x ; then M does not give an answer. 0 r.
E p,
0 PROOF. Suppose there is such a n f ; say f = cpz. Now for any x, y
Ew
if y is the Godel number of a Turing machine, (x, x) E Dmn cpz, and cpE(x, x) = 0; g(x, y ) is undefined, otherwise.
g(x, y)
=0
let
part 1 : Recursive Function Theory
Say g
=
Chapter 5 : Recursion Theory Case I. x Case 2. x Case 3. x Let
cp:. Then by the iteration theorem,
iff (s:(r, e), e) E Dmn cpf ifff(s:(r, e), s:(r, e)) = 0
s:(r, e) E Dmn vl(s:(r, e))
U
~h~~ there is no automatic method for determining of a pair (x, Y)whether Dmn cp:. Otherwise stated, there is no automatic method of determining of a Turing machine M and a number y whether M will eventually stop with an output when presented with input y. Thus Corollary 5-14 shows the recursive unsolvability of the Halting problem for Turing machines. We can give a more intuitive, informal proof of this result. Suppose we have an automatic method telling us whether a Turing machine M will stop with input y. Then we can construct a machine N such that for any Y E * the following conditions are equivalent:
(1) N stops when given input y ; (2) is not the @&I number of a Turing machine, or it is the number of a machine T such that T does not stop when given input Y. ~ eNt have Gadel number e. By (I) and (2) we reach a contradiction in trying to decide whether N stops, given input e.
Theorem 5.15 (Recursion theorem). If m > 1 and f is an m-arY partial recursive function, then there is an e E w S U C ~that for all xo, . . ., xm-2 E w, f(x0,. . ., ~ ~ - e)2 21, 0, neither 4 nor II, nor A, is closed under complementation; see 5.36. The following proposition is evident.
f
k
1
I
Proposition 5.30. I f R is an n-ary 2,-relation with n > 1 and m > 0, and if S = {(xO, . . .,x,- 2) : 3y E w(xo, . . ., x, - z , y) E R), then S E 2,. Similarly with II. and V. Proposition 5.31. I f R is an n-my Cm-relation,then so are the two relations
and A,.
Proposition 5.27 (Adjunction of apparent variables). If R is an n-ary C,relation and S = {(x,, . . ., x,) : (x,, . . ., x,) E R), then S E C,. Similarlyfor II, and A,. Proposition 5.28 (Identification of variables). If R is an n-ary C,-relation, n > 1, and S = {(x,, . . ., x , - ~ ) : (x,, x,, xl, x2, . . ., x , - ~ ) E R}, then R E Z ., Similarly for n, and A,. Proposition 5.29. If R and S are n-ary C,-relations, then so are R u S and R n S. Similarly for n, and A,. n,
w,
(x, ,..., x , - , ) e R n S
Note that there are only X, arithmetic relations, and hence most numbertheoretic relations are not arithmetical. Now we want to describe the relationships between the various classes C,, II,, and indicate some operations under which these classes are closed. The following obvious proposition indicates how these classes can be inductively defined, and furnishes a basis for inductive proofs of our further results. Proposition 5.25 (i) An n-ary relation R is in C,, iff there is an (n + 1)-ary relation S in IIm such that for all x,, . . ., x,-, E w, (x,, . . ., x,-,) E R zff 3y E w ( ( ~ 0.,. ., xn-1, Y) E S). (ii) An n-ary relation R is in II,+, iff there is an (n + 1)-ary relation S in C, such that for all x,, . . ., x,-, E w, (x,, .-.., x,-,) E R iff Vy E w ( ( ~ 0., . ., Xn-1, Y) E S).
E
1
PROOF. Again we prove all cases simultaneously by induction on m. The case m = 0 is trivial. Assume that all of the statements are true for m. We take one typical case for m + 1 : Let R be an n-ary C,+,-relation, and let T be as above. By 5.25, let R' be a II,-relation such that for all x,, . . ., x,-, E w, (X0,...,Xn-1)ER
iff3z€w[(x0,..., X , - ~ , Z ) E R ' ] .
Clearly, then, it suffices to show that for all x,, . . ., x,-, (1)
Vy
fx).
Clearly f is as desired. (ii) * (i). Assume f as in (ii). Then by induction on x ,
(X
+ 1)).
4
If A is r.e. and f is partial recursive, then f *A is r.e.
PROOF.We may assume that A # 0. Say A = Rng g, g recursive. Clearly 0 0 g is partial recursive. 0
f * A = Rng ( f g ) and f
Theorem 6.10. I f A is r.e. and f is partial recursive, then f-'*A is r.e. PROOF. Say A
=
Theorem 6.11.
If A is r.e., then U,,, Rng cp: is r.e.
Thus (2)
Vy E Rng f 3x
Iy
(fx
=
Y).
Dmn cp:. Then f-l*A
PROOF. For any y Y
1
if3x Iy ( f x = y) otherwise,
as desired.
,
K is recursively enumerable but not recursive.
PROOF. Obviously K E Cl so K is recursively enumerable. Suppose K is recursive. Then so is w K, so by 6.2(v) there is an e E w such that w K = Dmn cp:. Then iff e E Dmn cp: by the definition of K, eE K iff e E Dmn cp: by the choice of e, e6K
Theorem 6.7.
E w,
=
Dmn (cp: f ) as desired. 0
E w,
E
U Rng cp:
I*€A
i f f 3x E A ( y E Rng cp:).
Since both A and each Rng p: are in C,, it follows easily that is in 2,.
U,,,
Rng p:
0 n
(vii) => (viii). (viii) (ix). Suppose f is as in (viii). Sayf = cp:. For any x,, . . ., x , let
if (e, ( 4 0 , . . ., (4,) E Tm f,x = ai otherwise. Clearly each f, is elementary and R = { ( f o x ,. . .,fm-,x) : x
E
w).
0
Theorem 6.14. Every recursiue relation is recursively enumerable. For each positive m there is a recursively enumerable m-ary relation which is not recursiue. PROOF. The first part is true by 6.13(x) and 5.33; for the second part, use 5.36. 0 The following result is proved just as for sets.
Theorem 6.15. Let R
c " w . The following conditions are equivalent:
( i ) R is recursive; (ii) R and "w R are recursively enumerable.
-
The following important theorem shows that the notion of a partial recursive function can be defined without resorting to the rather complicated notions discussed at the beginning of Chapter 5.
' I i
!
11 1 1 I
-,E w
R . Now for i < m and any
A x = (x)t
Definition 6.12. A relation R G "w is recursively enumerable (for brevity r.e.) if A = 0 or there exist m recursive functions f,, . . ., fm- such that
Theorem 6.13. For R G "w the following are equivalent: ( i ) R = 0 or there exist elementary functions fo, . . ., f m - I with R = {(fox,. . . , f m - l x ) : X E ~ ) ; (ii) like ( i ) with "elementary" replaced by "primitive recursive"; (iii) R is recursively enumerable; (iv) there exist partial recursive functions fo, . . ., f m - , with R = { ( f o x , .. ., f m - l ~ :) x E D m n f , n . . . n Drnn f,-l); (0) R = 0 or there is an elementary function f with R = {((fx),, . . ., ( f ~ ) , - l ): X E w); (ui) like (v), with "elementary" replaced by "primitive recursiue"; (vii) like (v), with "elementary" replaced by "recursive"; (viii) there is a partial recursive function f such that R = {((fx),, . . ., (fx),: x E Dmn f I; (ix) there is an m-ary partial recursive function f such that R = Drnn f ; (x) R e x 1 .
E
P
:
Theorem 6.16. Let f be a unarypartialfunction. Then the following conditions are equivalent: ( i ) f is partial recursive; (ii) {(x,f x ) : x E Dmn f ) is r.e. PROOF. ( i ) * (ii). Assume (i). For any x, y
E
w let
--
g(x, Y ) P ~ -Yfxl = 0). Clearly g is partial recursive and Drnn g = { ( x ,f x ) : x E Drnn f ) . (ii) 3 (i). Assume (ii), and by 6.12 let g and h be recursive functions such that {(x,f x ) : x Then for any x E w,
E
fx
Drnn f )
2:
=
{(gx, hx) : x
E w).
~PY(= ~ Y4,
so f is partial recursive. Clearly g is partial recursive and R = Drnn g. (ix) => (.x). Suppose R = Drnn cp?. Then
W e now turn to the study of some special r.e. sets. Definition 6.17 (i) A set A 5 w is productive if there is a recursive function f (called a productive function for A ) such that for all e E w , if Drnn cp: G A then fe E A Drnn cp:. (ii) A set A G w is creative if A is r.e. and w A is productive.
-
-
Chapter 6: Recursively Enumerable Sets
Part 1: Recursive Function Theory
Thus a productive set A is strongly not recursively enumerable: there is an effective procedure for finding members of A B for any r.e. subset B of A. A creative set, while r.e., is strongly nonrecursive. The sets of Godel numbers of theorems of many theories studied in Part 111 are creative, as we shall see. Recall Definition 6.4.
Second, suppose that y $ A. Then y 4 Drnn cp;, so Vz (z, y, e) $ Drnn I, hence Vz((z, y) $ Drnn cpz), so by 5.13 Drnn cpl(s:(e, y)) = 0. Thus, since g is productive,
Theorem 6.18.
K. For
The following result will not play a role in our logical discussion, but is important in the general theory of r.e. sets. See also the definition and results concerning simple sets below.
-K
Theorem 6.20. $ A is productive, then A has an infinite recursive subset.
-
K is creative.
-
-
PROOF. By 6.5, K is r.e. Now U,1 is a productive function for w i f e ~ w a n d D m n c p :E w K , t h e n e ~ ( w K ) - Dmncp:;for
so e E
w
-
-
by definition of K, 6.4 by assumption Drnn cp: c
e E K + e E Drnn cp: +eE w K
w
0
K, and hence by definition of K, e $ Dmn cp:.
The next theorem shows that, in a sense, any r.e. set can be obtained from a creative set; cf. 6.10 and the initial section of Chapter 7.
Theorem 6.19. If A is r.e. and C is creative, then there is a recursivefunction f such that A = f-'*C.
-
PROOF. Say A = Drnn cp& and let g be a productive function for For any x, y, z E w let
@, Y, x)
pub
= gs:(x,
w
-
k(y, x)
= f -l*C.
Dmn cpl(s:(e, x))
=
{(x),
(1)
1 : i I 1x1.
In fact, for any y E w, y E Drnn cpl(s:(e, x)) Now let r be such that cp:
Sincef is obviously
-
(x)~-I 1).
cp:. Now for any x E w,
iff (y, x) E Drnn cpz iff 3i IIx(y = (x), =
-
iff (y, x) E Drnn k 1).
0, and define
g(x,y)=fr ify=Oorl, if Y # 0 and y # 1. g(x, Y) = fsXe, Y)
= d ( z , Y).
Let fy = gs:(e, y) for ally E w. We claim that A recursive, this will complete the proof. First suppose that y E A. Then
=
=
Thus I is partial recursive. By the recursion theorem (5.15) choose e E w such that for all y, z E w, Kz, Y, e)
pi(i I lx and y
Clearly k is partial recursive; say k
C.
Y)I + cp:y.
-
PROOF. By 6.8 it suffices to show that A has an infinite r.e. subset. Let f be a productive function for A. For any x, y, let
Thus g is recursive. Now define t: w -+ w by setting, for any x E w, tx = g(x, fx). Here fx is defined in 2.31, and by 2.33, t is recursive. Now we claim for all x E w, tx E A
(2)
-
{ty : y < x}.
We establish (2) by induction on x. For x = 0,
z E Drnn cpl(s:(e, y))
iff (z, y) E Drnn cp: iff (z, y, e) E Drnn I (by choice of e) iff z = gs:(e, y) and y E Drnn cp; iff z = gs:(e, y).
-
Thus (1) holds. Now iffy $ C, this means that gs:(e, y) $ C and so by (1) C. Since g is a productive function for w C we Drnn cpl(s:(e, y)) -C OJ would get gs:(e, Y)E (w contradicting (1). Thus fy E C .
-
- C)
Dmn cpl(s:(e, Y)),
(since cp: = 0 s A and f is a productive function for A). Thus (2) holds for x = 0. Suppose (2) holds for all x' < x, where x # 0. Then tx = g(x, fx), and h # 0, 1, so tx = fs:(e, fx). Also Drnn cpl(s:(e, fx))
-
=
{ty : y < x} E A
by (1) and the induction hypothesis. Since f is a productive function for A, tx = fs:(e, fx) E A {ty : y < x), as desired. Thus (2) holds. Hence Rng t is an infinite r.e. subset of A, and the proof is complete. 0
Chapter 6 : Recursively Enumerable Sets
Part 1: Recursive Function Theory
We now give a method to arrive at creative sets. Definition 6.21 (i) . Two sets A and B are recursively separable if there is a recursive set C such that A 5 C and B G w C. (ii) A and B are recursively inseparable if they are disjoint but not recursively separable. (iii) A and B are effectively inseparable if they are disjoint and there is a 2-ary recursive function f such that for all e and r, if A r Drnn cp:, 6 c Drnn cp:, and Drnn cp: n Drnn cp: = 0, then f(e, r) E w (Dmn cp,' u Drnn cp:).
-
,
-
Effectively inseparable sets will be constructed in abundance in Part 111; most undecidability results actually yield such sets. Obviously we have: Theorem 6.22. If A and B are effectively inseparable then they are recursively inseparable. The converse of 6.22 fails; see Exercises 6.47, 6.48. Theorem 6.23. If A and B are recursively enumerable and effectively inseparable, then both A and B are creative.
Clearly Kl and K2 are r.e. and Kl n K, = 0. For any e, r E w let f(e, r) = 2'.3". To verify 6.21(iii), assume that Kl c Drnn cp,' and K2 E Drnn cp: with Drnn cp,' n Drnn cp: = 0. Suppose f(e, r ) E Drnn cp: u Drnn 9:. By symmetry, sayf(e, r ) E Drnn cp,'. Thus 3y((e, 2'.3", y) E TI), and since Drnn cp: n Drnn cp: = 0, obviously Qz((r, 2'. 3", z ) $ TI). Thus 2r.3eE K2, so 2'- 3" E Drnn cp:, contradiction.
0
The next theorem gives an important method of producing new effectively inseparable sets from old ones: Theorem 6.25. Suppose that A and B are effectively inseparable, f is a unary recursive function, C, D c w, C n D = 0, A E f-l*C, and B c f-l*D. Then C and D are effectively inseparable. PROOF. Let h be a function given by 6.21(iii) because A and B are effectively inseparable. For any e, x E w , let g(x, e) 2 py((e, fx, y) E TI). Thus g is partial recursive; say g = 9:. Now we can define a function k intended to satisfy 6.21(iii) for C and D: for any e, u E w, let k(e, u) = fh(s:(r, e), s:(r, u)). Thus k is recursive. In order to verify 6.21(iii), assume that C c Drnn cp: and D r Drnn cpt, where Drnn cp,' n Drnn cpt = 0. It follows that A G f - l * Drnn cp,', B r f - l * Drnn cp:, and f -l* Drnn cp,' nf -l* Drnn cpt = 0. Now for any x t w, x E f -I* Drnn cp,'
-
PROOF. By symmetry it suffices to show that A is creative, i.e. that w A is productive. Let f be as in 6.21(iii) Say A = Drnn cpt and B = Drnn cpb. For any e, x E w let g(x, e)
P Y ( ( ~x,, Y) E T1 or (s, X, Y) E TI).
Thus Drnn g = {(x, e) : x E Drnn cp: U B}. Clearly g is partial recursive; say g = cp;. Now for any e E w we have, by 5.13, (1)
Drnn cp1(s;(r, e))
=
{x : (x, e) E Drnn
-
tp;)
=
Drnn cp:
Similarly, f - l * Drnn cpt = Drnn cpls:(r, u). Thus A c Drnn 2e; if Rng ), is infinite then e E: Dmnf.
(1) (2)
6.37. If A is productive, then so is {e: Dmn cp;
-
-
if n
E w,
then 2n
6.40. If B is r.e. and A
-
n B is productive, then A is productive.
6.41. There is an r.e. set which is neither recursive, simple, nor creative. Hint: let A be simple and set B = { x : ( x ) E~A}. 6.42. For A 5 w the following are equivalent:
(1) A is recursive and A # 0; ( 2 ) there is a recursive function f with Rng f
BIBLIOGRAPHY
1 . Malcev, A. I. Algorithms and Recursive Functions. Groningen: WoltersNoordhoff (1970). 2. Rogers, H. Theory of Recursive Functions and Effective Computability. New York: McGraw-Hill (1967). 3. Smullyan, R. M. Theory of Formal Systems. Princeton: Princeton University Press (1961).
=
A and Vx E w( fx
-
- A are productive.
6.46. If A is productive and B is simple, then A n B is productive.
6.30. Prove that the class of r.e. sets is closed under union and intersection using
the argument following 6.8, but rigorously. 6.31. Show that if A is a Cn-set, n > 0, and f is partial recursive, then f * A is C,. 6.32. If A and B are r.e. sets, then there exist r.e. sets C , D such that C G A, D G B , C U D = A U B , ~ ~ ~ C ~ D = O . 6.33. Suppose that f and g are unary recursive functions, g is one-one, Rng g is
recursive, and V x ( f x
L
gx). Show that Rng f is recursive.
cA
6.44. If A is creative, B is r.e., and A n B = 0,then A u B is creative.
Then the following conditions are equivalent:
( 1 ) f is recursive; ( 2 ) ( ( x ,fx) :x E w ) is an r.e. relation; (3) { ( x ,fx) : x E w ) is a recursive relation.
+ 1)).
( 1 ) A is productive; ( 2 ) there is a partial recursive function f such that Ve E w (if Dmn cp: then fe is defined and fe E A Dmn cp:).
6.45. There is a set A such that both A and w -+ w .
f (x
6.43. For A G w the following are equivalent:
EXERCISES 6.29. Let f : w
-
- -
-
For, let i e 2n n Rngf: Say i = fi. By (I), 2 j < fi, so 2 j < i < 2n. Thus j < n, s o i~ f*n. Since (3) holds, 12n n R n g f ( 5 n, hence 12n R n g f 1 2 n, for any U n E w . Thus w R n g f is infinite.
-
c A).
6.39. Any infinite r.e. set is the disjoint union of a creative set and a productive set. Hint: say Rng f = A. Let gn = f p i ( f i # gj for all j < n). Show that g * K is creative and A g * K is productive.
n Rng f c_ f *n.
-
is not r.e.
6.38. There are 2Ho productive sets. Hint: Let A = { e : Dmn cp: c w K}. Show that A G w K , ( w K ) A is infinite, and any set P with A GP w K is productive.
Now Rng f is simple. For, it is obviously r.e. Suppose B is any infinite r.e. set. By choice of g, choose e E w s o that R n g ), = B. By (2) and (I), fe e R n g ).. Thus B n Rng f # 0.Finally, t o show that w Rng f is infinite, note
(3)
nXGA Dmn cp:
-
6.47. Two sets A and B are strongly recursively inseparable if A n B = 0 , w ( A LJ B ) is infinite, and for every r.e. set C, C A infinite C nB # 0, C B infinite => C n A # 0. Show that if A and B are r.e. but strongly
-
-
;q 1 !$
C
recursively inseparable, then: (1) A and B are recursively inseparable. ( 2 ) A u B is simple. (3) neither A nor B is creative. ( 4 ) A and B are not effectively inseparable.
6.48. Show that there exist two r.e. strongly recursively inseparable sets. Hint: let E = { ( e ,x) : j y ( ( e , x, y ) E TI)). Show that there exist recursive functions
f, g such that E = { ( f i ,gi) : i . :w ) .
103
Part 1 : Recursive Function Theory
Show that there exist recursive functions h, k such that
Let A
=
h(n
+
k(n
+
Survey of Recursion Theory
pi(gi > 3f i ) ; = pi(gi > 3 f i and gi # ghO); 1 ) = pi(gi > 3fi & Vj 5 n(gi # gkj) & Vj 'i n(f i # fhj) & Vj 'i n(gi # ghj)); 1 ) = pi(gi > 3fi &Vj 'i n + l ( g i # ghj) & Vj 'i n ( f i # f k j ) & Vj 'i n(gi # gkj)).
hO kO
=
Rng ( g h), B 0
=
7
Rng ( g k). 0
We have developed recursion theory as much as we need for our later purposes in logic. But in this chapter we want to survey, without proofs, some further topics. Most of these topics are also frequently useful in logical investigations.
Turing Degrees Let g be a function mapping OJ into w . Imagine a Turing machine equipped with an oracle-an inpenetrable black box-which gives the answer gx when presented with x . The function g may be nonrecursive, so that the oracle is not an effective device. Rigorously, one defines a g-Turing machine just like Turing machines were defined in 1.1, except that v,, . . ., v,, are arbitrary members of (0, 1, 2, 3, 4, 5). And one adds one more stipulation in 1.2: If w = 5, and F(e - 1) = 0 or Fe = 1, then F' = F, d' =f, e' = e , while if w = 5 and 0 1'" + I ) 0 lies on F ending at e , then l) 0 lies on F' ending at e', e' = e + gx 2, 0 0 F' is otherwise like F and d' = f.
+
Then the notion of g-Turing computable function is easily defined. One can also define g-recursive function: in 3.1, each class A is required to have g as a member. These two notions, g-Turing computable and grecursive function, are shown equivalent just as in Chapter 3. In fact, most considerations of Chapters 1 through 6 carry over to this situation. If h is g-recursive, we also say that h is recursive in g. One can extend the notion in an obvious way to a set of F of functions, arriving at the notion of a function being recursive in F. At present we restrict ourselves to the simpler notion. We say that h and g are Turing equivalent if each is recursive in the other.
Chapter 7: Survey of Recursion Theory
Part 1: Recursive Function Theory
This establishes an equivalence relation on the set of all functions mapping w into U. The equivalence classes are called Turing degrees of unsolvability. Each equivalence class has at most No members (actually exactly KO,as is easily seen), since there are only No possible Turing machines with oracles. Clearly then there are exp No degrees. Let D be the set of degrees. For a, j3 E D we write a IB provided there exist f E a and g E j3 with f recursive in g. This relation I makes D into a partially ordered set. Clearly the degree of recursive functions, denoted by 0, is the least element of D. Many of the important results about D are concerned with trying to describe the partial ordering I. A complete description is far from being known. The rather scattered results which we now want to mention are among the strongest facts known. Some of their proofs are quite complicated, involving priority arguments, a kind of argument seemingly unique to this area.
corohary 7.9. There are degrees 1 0 ' which are not r.e.
-\cC
Partial Recursive Functionals Apartial functional is a function F such that for some m, n E w, the domain of F is a subset of "("w) x "w, while the range of F is a subset of w; additionally we assume m n > 0. In case m = 0 we are dealing with the partial functions of Chapter 5. In case the domain of F is all of "("w) x "w, we call F total. An (m, n)-relation R is any subset of "("w) x "w. We now wish to give a reasonable meaning to F and R being recursive, and to R being recursively enumerable. Since a function cannot be presented in its entirety to a machine it is natural to seek a definition of these notions in which only initial segments of functions are given. If 2l = (fo, . . . ,fm-,, x,, . . ., xn-,) E "(Ow) x "w, we let for any y E w
+
Proposition 7.1. Any two elements of D have a least upper bound. Theorem 7.2. There exist two elernents of D without a greatest lower bound. Theorem 7.3. In D, no ascending sequence a. < al < bound.
-
0
. has a
Now we say that an (m, n)-relation R is recursively enumerable (r.e.) provided that there is an (m + n + 1)-ary recursive relation S c "+"+lw such that for all 2l E "("w) x "w,
least upper
UE R
Proposition 7.4. Every element of D has only countably many predecessors.
Theorem 7.5. There are exp No minimal degrees. A subset E of D is an initial segment of D provided that for all a, j3 E D, if a < j3 E E, then cc E E.
R
Theorem 7.6. Any finite distributive lattice can be embedded as an initial segment of D; likewise any countable Boolean algebra and any countable ordinal.
Theorem 7.7. No r.e. degree is minimal. Theorem 7.8. There are two minimal degrees with join 0'.
iff 3x E w[(ax, x) E S].
Obviously this definition coincides with the definition of r.e. relation if m = 0. The definition is motivated as follows. We generate the members of S one after the other. Having generated a member (yo,. . ., yrn-,, z,, . . ., zn-,, x) of S,we have implicitly generated each member 21 of R such that a x = (YO,. . ., ym- zo, . . ., zn-,). Eventually each member of R is generated in this fashion. A partial functional F is partial recursive provided that its graph
An element a of D is minimal, if 0 < a and there is no B with 0 < /3 < a.
One of the main open problems in the theory of degrees is the conjecture that every finite lattice can be embedded as an initial segment in D. There are some special degrees of particular importance for applications to logic. A degree a is recursively enumerable (r.e.) provided that x, E a for some r.e. set A . Note that there are only No r.e. degrees. We let 0' be the degree of xK. We know from Theorem 6.19,p. 98 that X , E 0' for any creative set B; and 0' is the largest r.e. degree.
Theorem 7.10. For every nonzero r.e. degree a there is a minimal degree 2 a.
,
t I
I
=
{(a, x) : 2l E Dmn F, F2l = x)
is r.e. Again this notion coincides with the old definition for m = 0. Given 2L E Dmn F, clearly the above generation of R constitutes an effective calculation of F2I (provided there is some way to recognize effectively that a x = b0, . . . ,yrn-,, zo, . . . , zn-J for given (yo, . . ., yrn-,, ZO,. . . , zn-l)). An (m, n)relation R is recursive provided X, is recursive. These definitions form the basis for a generalized recursion theory. This generalization, expounded at length in Shoenfield [9],has many of the properties of ordinary recursion theory; the enumeration, iteration, and recursion theorems carry over, as well as the considerations concerning the arithmetical hierarchy. As is suggested above, there is a strong connection between generalized recursion theory and relative recursiveness : Theorem 7.11. A function f : w --+ w is recursive in a function g : w + w iff there is a total recursive functional F: x w + w such that for all x E w, fx =m ,4 . 1 n7
Chapter 7: Survey of Recursion Theory
Part 1: Recursive Function Theory
The notion of a functional also enables one to clarify the role of the sets A, in the arithmetical hierarchy:
It follows that we can define . on RET by setting a./3 alence type of JX(A x B), where A E a and B E /3.
=
recursive equiv-
nn)z f f it is
Proposition 7.17. Addition and multiplication of RET's are commutative and associative. Multiplication is distributive over addition.
The notion of recursive functionals also makes possible the construction of a new hierarchy. An ( m , n)-relation R is CL (resp. Ilf,) where m > 1 provided there is a recursive relation S so that for all U E "("w) x "w we have
The structure (RET, .) is not, however, a ring, and it cannot be embedded in a ring. This can be seen for example, from the fact that a + /3 = a where a and /3 are respectively the recursive equivalence types of w and of 1 . Since /3 /3 # 13, ,6 is not the additive zero of (RET, +, .), so this structure cannot even be embedded in a ring. For each n E w, let ii be the recursive equivalence type of n. Then - is an isomorphic embedding of (w, +, .) into (RET, +, .). The structure (RET, .) has a simple substructure which is much more closely related to (w, .). To define it, let us call a set A G w isolated if it is not recursively equivalent to any proper subset B c A. An RET a is an is01 if it has an isolated member. We denote by ISOL the collection of all isol's.
Theorem 7.12. A relation is An+liff it is recursive in {xA: A is recursive in {X, : A is C,).
+,
+
. ., Q, are quantifiers V or 3 on functions (members of Ow), where Ql,. alternately V and 3 (with Ql = 3 (resp. Ql = V), while is a quantifier V x or 3x on numbers. By collapsing quantifiers, it is easy to see that any second-order prefix can be put in this form (see Chapter 30). The classification of relations in the sets CL and I l k forms the analytical hierarch~l.Again we set A; = Cf, n IIL. The theory of this hierarchy shows considerable similarity, in results and proofs, to the classical topological theory of analytic sets. For example, we have Theorem 7.13 I f P and Q are disjoint R such that P c R a n d Q G - R .
relations, then there is a A: relation
+
Two sets A , B c w are said to be recursively equivalent if there is a one-one partial recursive function f such that A 5 Dmn f and f *A = B. This establishes an equivalence relation on the set of all subsets of w; the equivalence classes are called recursive equivalence types (RET's). They are the effective version of cardinal numbers.
Proposition 7.14. I f a and ,6 are RET's, then there exist A t a and B E /3 such that A and B are recursively separable. Proposition 7.15. If a and ,6 are RET's, A, A' E a, B, B' E 8, A and B are recursively separable, and A' and B' are recursively separable, then -A u B is recursively equivalent to A' U B'.
By 7.14 and 7.15,we can define a binary operation + on RET by setting + ,6 = recursive equivalence type of A u B, where A E a , B E /3, and A and
B are recursively separable. Recall the function J, from 3.60. It is a one-one function mapping onto w.
Proposition 7.16. If a, B E RET, A, A' E a, and B, B' is recursively equivalent to J*,(A1 x B').
Theorem 7.18. ISOL is closed under have :
+ and
E
w
x w
B, then J*,(A x B)
.. For any
a,
/3,
y
E
ISOL we
+
(i) a /3 = a y implies /3 = y ; (ii) a.8 = a . y a n d a # Uimply/3 = y ; (iii) (w, +, -) is a substructure of (ISOL,
Isols
a
+, +,
+, .).
The structure (ISOL, +, .) can be embedded in a ring ISOL*, which has the ordinary ring of integers as a substructure. It has many interesting properties. Since it has zero divisors, it cannot be embedded in a field.
Recursive Real Numbers It is natural to try to effectivize common notions of mathematics, such as the notion of a real number. We give here a few of the relevant definitions and results. Let Q be the set of rational numbers. A sequence r E OQ is recursive iff there exist unary recursive functionsf; g, h such that for all n E w,
rn
=
( f n - gn)/(l
+ hn).
Thus if en = 112"for all n E w, then E is recursive. In fact we may take fn = 1 for all n, gn = 0 for all n, and hn = 2" - 1 for all n. Now a recursive sequence r E "Q recursively converges to a real number a provided there is a unary recursive function k such that for all n E w and all n 2 k m we have Irn - a1 < em. A real number a is recursive if there is a recursive sequence of rationals which recursively converges to a.
Chapter 7: Survey of Recursion Theory
Part 1 : Recursive Function Theory t
Theorem 7.19. The set of recursive real numbers forms a subfield F of the field of real numbers. Every rational number is recursive. F is countable. There is a Cauchy recursive sequence of rationals which does not converge recursively. Theorem 7.20. If r E "Q is recursive, strictly monotone, converges to a recursive real number a , then r recursively converges to a. A sequence r E " F is recursive provided there are binary recursive functions
f, g, h, k such that for all m , n E w and all p 2 k ( m , n ) we have Irn - { [ f ( ~n ), - g(p, n)ll[l
+ h ( ~n)l)l ,
< em.
Many other concepts of ordinary mathematics can be given effective formulations in a similar way.
Word Problem for Groups There is a classical problem in group theory which has been given a negative solution using notions of recursive function theory. We shall give a precise formulation of it. Let X be a nonempty set. We form the free group generated by X as follows. For each x E X let x' = (X, x). Note that ' is a one-one function whose range is disjoint from X. A finite sequence (perhaps 0 ) of elements of X u Rng' is called a word on X; we let W x be the set of all words on X. Let = be the smallest equivalence relation on W x containing all pairs (0, aa') and (0, a'a) with a E X. It is easily seen that if a, b, c, d E W x , a = b, and c =- d, then ac = bd. Hence there is a binary operation . on the set Fx of equivalence classes under = such that [a].[b]= [ab] for all a, b E W x . Under this operation Fx becomes a group, called the free group generated by X. A defining relation over X is a pair (a, b ) of words over X. If R is a set of defining relations over X, we let R* be the normal subgroup of Fx generated by all elements [ a ] .[b]-l with (a, b) E R. Let F,,, = Fx/R*. A group G is determined by generators X and defining relations R if it is isomorphic to Fx,,; then (X, R) is a presentation of G. It is easily seen that every group has a presentation. If X and R are finite, then (X, R ) is afinite presentation and G is finitely presentable. Iff is a one-one map of X U X' into W , then any word x of W x can be given a Godel number 9,x by 8,X
=
n
pixi+ 1
t <m
where x i s of length m. We say that the word problem for (X, R) is recursively solvable provided that for some such f,
{(gJa,gJb) : h b l
=
h[bl)
is recursive, where h is the natural homomorphism of Fx onto Fx,,. For X and R finite, this definition does not depend on the choice off.
.-
Theorem 7.21 (Novikov). There is a group G with afinite presentation ( X , R ) which is recursively unsolvable. Thus there is no automatic procedure for determining of a pair of words ( a , b ) whether they become equal upon applying the relations in R.
Solvability of Diophantine Equations. A diophantine equation is an equation of the form P(x,, . . ., x,-,) = 0 , where P(xo, . . ., xm-,) is a polynomial in indeterminants x,, . . . , x m - , with integer coefficients. A classical problem of number theory, called Hilbert's tenth problem (see Davis [2]) is whether there is an automatic method for determining whether an arbitrary diophantine equation has an integral solution. By means of Godel numbering this question can be given a rigorous form. The answer (Theorem 7.24) is negative, and follows from an even stronger result which we now want to formulate. An n-ary relation R c "w is called diophantine if there is a polynomial P(xo,. . ., xn-,, yo,. . ., ym-,) with integral coefficients such that R
=
{ xE : there exist yo,. . ., y,-, E w such that P(x0 ,..., xn-1, yo , - . . ,ym-1) = 0).
Theorem 7.22 (J. Robinson, M. Davis, Y. Matiyasevic). it is diophantine.
A relation is r.e. iff
As an interesting corollary we have Theorem 7.23. There is a polynomial with integral coeficients such that its positive values, when members of w are substituted, are exactly all positive primes. It is also easy to derive the solution to Hilbert's tenth problem from 7.22: Theorem 7.24. There is no automatic method which, presented with a diophantine equation E , will decide whether e has a solution. BIBLIOGRAPHY 1. Boone, W. W. The word problem. Ann. Math., 70 (1959), 207-265. 2. Davis, M. Hilbert's tenth problem is unsolvable. Amer. Math. Monthly, 80 (1973), 233-269. 3. Dekker, J. C. E. Les Fonctions Combinatoires et les Zsols. Paris: GauthierVillars (1966). 4. Dekker, J. C . E. and Myhill, J. Recursive equivalence types. Univ. Calzx Publ. Math., 3 (1960), 67-214. 5. Herrnes, H. Enumerability, Decidability, Computability. New York: Springer (1969).
PART I1 Elements of Logic
Sentential Logic
We now begin the study of logic proper. In this part we shall introduce the basic notions of a first-order language and the structures appropriate for it. We shall only present here the most basic definitions and results, up to and including the completeness theorem-which expresses the most important relationship between the syntactical and semantic notions. In Parts I11 and IV many deeper results in these two domains will be found. The emphasis throughout this book, as well as in the mathematical world, is on first-order languages. There are many other languages, some of which will be briefly discussed in Part V. First-order languages are, roughly speaking, the simplest languages with which one can conveniently formulate any mathematical theory. Moreover, one can prove about these languages and their structures many interesting and useful results which cannot be extended to more involved languages.
8
Before considering first-order languages we consider some simpler languages, whose study will be a simplified model of the more involved study of first-order languages themselves. These sentential languages enable one to express only such primitive logical notions as not, implication, and, or, etc. I These connectives between sentences are such that the truth of a complicated sentence can be inferred just from the truth or falsity of its components. We shall choose two of these connectives, negation and implication, as 1 primitive, and show at a later stage that all other connectives can be expressed in terms of them. We show how the notion of a sentence can be I rigorously defined, how axioms for valid sentences can be given, and the 1 connection between the axioms and the notion of truth. In the exercises we 1 outline the theories of some nonclassical versions of logic, such as threevalued and intuitionistic logic.
:
:
Definition 8.1. A sentential language is a triple (n, c, P) such that n # c, {n, c) n P = 0, and P # 0. We think of n and c as a negation symbol and implication symbol respectively, while P is a set of atomic, indivisible sentences. With these intuitive meanings it is possible to define in a rigorous way additional intuitive notions, such as an expression-any sequence of symbols-and a sentencean expression which has a meaningful form: Definition 8.2. Let 9 = (n,c, P ) be a sentential language. The set {n, c) u P is the set of symbols of 8. An expression of 9 is any finite sequence of symbols of 8 ;the empty set (=empty sequence) is admitted. We define
Part 2: Elements of Logic
one-place and two-place operations by setting
Chapter 8 : Sentential Logic
i
s E P. Then (iii) holds, by (i). Now assume, inductively, that m > 1. By (ii) for some sentence #. Thus po = n, we have two cases. First suppose p = i# and # = (p,, . . ., pm-l). If (po, . . ., pi) is a sentence, then by (ii) we easily infer that (F,, . . ., pi) is a sentence, contradicting the induction hypothesis, since # is a sentence. Second, suppose p = # + x for sentences # and x, and suppose the hypothesis of (iii) holds. Then p0 = c, and there is a j with 1 < j < m - 1 and # = (p,, . . ., p,), x = (pj+l, . . ., v,,-~). Suppose that (pO,.. ., pi) is a sentence. Then by (ii) there are sentences 0, a such that (po, . . ., pi) = 0 += a ; hence there is a k with I < k < i such that 0 = (pl,. . ., pk) and a =
-+
<s1>
-I<s1>
-+
( - . l < ~ l >+ ($1))
Lemma 8.20. I-( i p + p) + P. Lemma 8.21. kp + ( i# + - ~ (+ p 4)). Now we introduce a semantical consequence relation I? k p. Roughly speaking, the difference between syntactical notions like t and semantical ones like k is this: Syntactical notions are defined purely in terms of the formal symbols, with only the mathematical notions being used which are essential for the definition. In semantical notions, however, mathematical ideas of a very different sort from formal notions play an essential role; almost always some version of the idea of a model, or mathematical realization, of the formal notions plays a role, along with a rigorous notion of truth.
''
Clearly this truth table procedure provides an effective procedure for determining whether or not a sentence is a tautology. This statement could be made precise for sentential languages B = (n, c, P ) with P countable by the usual procedure of Godel numbering. (See 10.19-10.22, where this is done in detail for first-order languages.) In practice, to check that a statement is or is not a tautology it is frequently better to argue informally, assuming the given sentence is not true and trying to infer a contradiction from this. For example, if ( s , ) + ((s,) J ( s ~ ) )is false, then s, is true and (s,) -,< s l ) is false; but this is impossible; (s,) + ( s , ) is true since s, is true. Thus ( s l ) + (<s2)-,( s , ) ) is a tautology. 1?1
Chapter 8: Sentential Logic
Part 2: Elements of Logic
We are going to show shortly that the relations t and k are identical. T o d o this we need some preliminary statements.
Lemma 8.23.
II
Hence we may apply Zorn's lemma t o obtain a member A of d maximal under inclusion. Now we establish some important properties of A.
For, if A t- p, and p, $A, then A v {p,) is inconsistent, so by 8.26, A t i p . Then by 8.14, A is inconsistent, contradiction.
PROOF. Let A = {p, : every model of I? is a model of p). It is easy t o check, using truth tables for the logical axioms, that I? c A, every logical axiom is in A, and A is closed under detachment. Hence all I?-theorems are in A. The lemma follows. 0 Definition 8.24. I' is consistent iff
A t p, implies that p, E A.
(1)
If F I- p,, then r t= p.
if p, E Sent, then p
(2)
E
A or i p , E A.
For, suppose p, $ A. Then A u {p,) is inconsistent, so by 8.26 A t i p , , and (1) yields i p , E A.
r If p, for some p.
Theorem 8.25. The following conditions are equivalent:
T o prove this, first suppose i p , E A. By 8.15 and (I), p + $ E A. If IC, E A, then p + $ E A by A1 and (1). Thus in (3) holds. Now suppose i p , 6 A E A. Hence by 8.21 and ( l ) , i ( p , + 4) E and $A. By (2) we have p, E A and i$ A, so p + IC, $ A since A is consistent. Thus (3) holds. We now define the desired modelf: For any s E P let
(i) I? is inconsistent. (ii) I? t i ( p , +- p) for every sentence p,. (iii) I? t i ( p +- p,) for some sentence p,.
+
PROOF. Obviously (i) * (ii) 3 (iii). Now suppose I? t i ( p , + p,) for a certain sentence p,. Let $ be any sentence. By Al, I' t (p, + p,) + [-+ + (p, + p,)]; from 8.10 we infer that F b i$ + (p, p,), and then 8.17 yields I' t i ( p + p,) + i i+. Hence F t i 11S)o.by 8.16, T' t 4 : being any sentence, I' is inconsistent.
fs=1 fs = 0
+
if(s)~A, otherwise.
We claim: for any sentence p,, f +p, = 1 iff p, E A.
(4)
For, let O = {p, :f +g, = 1 iff p, E A}. By the definition ofS, (s) s E P. Now suppose p, E O. Then
Theorem 8.26. I' u {p) is inconsistent iff I' t i p .
+,
PROOF. 3 : Since J? u {p,) t 4 for any sentence we have I? u {p,) k ~ p , so , by the deduction theorem r t p, + i p , . By 8.19, I' t i p , . e : I' u {p,) k i g , and r u {p,) t p, so by 8.14, r u {p) t for any sentence +. 0
f+(ip,) = 1
+
Theorem 8.27. 0 is consistent. PROOF. Since i ( p , + p,) always receives the value 0 under any model, for any sentence p, by 8.23 we have not ( t i ( p , + p,)). 0
I
PROOF. Let 'I be a consistent set of sentences. Let d = {A : r G A, A is &' is nonempty. Suppose Li? is a subset o f d simply consistent). Since r E d, ordered by inclusion, B # 0. Then I? c U 9?.Also, U 9? is consistent, for, if not, there would be, by 8.25, a sentence p, such that U B t i ( p + g,). t i ( p , + p) for some finite subset {4,, . . ., 4,Then by 8.9, {$,, . . ., of U B. Say $, E A, E B, . . ., 4,-, E A,_, E 93. Since 93 is simply ordered, there is an i < rn such that Aj G Ai for all j < m. Thus 4, E Ai, . . . , E Ai, so Ai k i(cp + cp). Thus Ai is inconsistent by 8.25, contradicting Ai E 93. Thus U is consistent.
O for each
ifff+p, = 0 definition of ifff+g,# l iffp,$A since p E O iff i p , E A (2), consistency of A +
Thus i p , E O. Finally, suppose p,, $ E O. Then f+(p,++)
I
Theorem 8.28 (Extended completeness theorem). Every consistent set of sentences has a model.
E
I
=
1
ifff+p,=Oorff$= I ifff+p,# 1 o r f + $ = 1 iffp,$Aor$~A iff i p , ~ A o r $ ~ A iffp,-+$tA
definition of
+
since p, $ E O (2), consistency of A (3)
Thus g, + $ E O. Hence Senty c 0 , and (4) holds. If g, E I', then g, E A and hence f +p, = 1 by (4). Thusfis a model of r, as desired. 0
Theorem 8.29 (Completeness theorem).
r
t p rff
r
k p.
PROOF. 3 : by 8.23. c : Suppose not ( I ' 1 F).Then not ( r t i i p ) by 8.16, u { lcp} is consistent, by 8.26. By 8.28, let f be a model of r u { -y). Thus f is a model of 1' but not of q, so not ( r k cp). 0 SO
Chapter 8: Sentential Logic
Part 2: Elements of Logic
This completeness theorem is our first result of a modern model-theoretical character. It shows the complete equivalence of the syntactical notion t and the semantical notion k . Hence in considering various problems in sentential logic we can use syntactical or semantical methods with equal right. Another interesting consequence of the equivalence, kg, iff kp,, is that there is an automatic method for determining whether tp,or not (the truth-table method above). From just the definition of t p it is difficult to infer that such a decision method exists. This does not mean that for any T there is an effective procedure to determine whether I? I- p, or not. For example, P may be infinite, we may have I? G P, and under a natural Godel numbering I? may be nonrecursive; in this case there is no such decision method. We have now seen that our axioms for sentential logic formulated for negation and implication are sound and complete. Next, we indicate how various other notions of sentential logic can be expressed in terms of negation and implication. Some important results, like duality and normal form theorems, can be formulated using the new notions.
Definition 8.30. For any sentences p and
# let
cp v # = i p , + # (disjunction of cp and #); p, A = i ( p ,+ i # ) (conjunction of p, and #); p, t, = (p, + +) A (+ + p,) (biimplication between p, and
+ +
$1.
The following obvious proposition enables one to tell easily whether a sentence formulated using these defined symbols is a tautology or not:
Proposition 8.31. I f f is a model of 8 and p, and
(i) f + ( c p v # ) = 1 (ii) f + ( p , A +) = 1 (iii)f+(cpo#)=l
# are sentences of 8, then
ifff+p,= 1 0 r f + # = 1; i f f f + p , = 1 andf+# = 1 ; ifffcp,=f+#.
Having all of these sentential notions available, we can discuss the notion of the dual of a sentence:
Definition 8.32. For any sentence p, we define the dual of p,, denoted by p,d, as follows (using 8.6): (i) ( s ) ~ = ( s ) for each s E P; (ii) ( ~ c p =) ~- p d ; (iii) (p, +#)d = l PAd #d.
Proposition 8.33 ( 0 49, A +Id +, vd V + d ; (ii) kip, V $)d t,rpd A yid; (iii) I-p, t,p,dd; (iv) iff and g are models of 9 and fs = g+ -I ( s ) for all s E P, then f + p, = g ( l p d )for every sentence p,; (0) ~ k p , ~ f f { l + ~ : *t ~l p r ' )d ; (vi) I-p, ~ f ft -I tpd; (vii) I-p, + $ iff k g d + p,d; (viii) I-p, t,$ 18 hpd o z+hd. +
PROOF.In the case of ( i ) and (ii) it is just necessary to apply Definition 8.32 to the sentences (p, A $)d and (p, v $)d in order to see what combination of 9d and +d they are and then check that then ( i ) and (ii) are tautologies. For example, (p,
A
*)d = ( 3 9 ) --, 1Wd= l ( p , + ~ $ 4 ~ = l ( 7 y d A ( T $ ) ~ )= l( i v d A l+ * d p,d) v $d is a tautology (by, say, the truth-table
and i ( i V d A method). We prove (iii) by induction on p,. For p, of the form ( s ) with s E P, we have vdd= p,, and (iii) is clear. Now we assume (iii) for p, and prove it for i p . Now ( l p , ) d d= i T and dd (p, * , p,dd)+-( i p t, i F d d is ) a tautology, so (iii) for p, clearly implies (iii) for i p . Finally, assume (iii) for p, and +; we establish it for p, + $. We have (p, + $ ) d d = ( l p A d(Cld)d = ( 1 ( l v d+ 1 ~ ) ~ ) ) ~ = l( lY -+ dl + d ) d= l ( l( l V d ) d A ( 1$bd)d) = l (1l P d A d 1$bdd)= 1 l ( 1 l V-+ dd 1~ $ ~ d ) ; thus (p, t,rpdd)+ ((+ e, +dd)+-[(p, + +) * (p, -+ ~ , h ) ~is~a]tautology, ) so (iii) follows for p, -t +. Therefore (iii) holds in general. Assume the hypothesis of (iv). We prove its conclusion also by induction on cp. The case p, = ( s ) with s E P is trivial from the hypothesis of (iv). Assuming f +p, = g+ i p,d, we have f + i p ,=0
iff f + p , = 1 iff g + -I vd = 1 =0 iffg+ i lVd iff g + -I( ~ p , =) 0. ~ Thus if the conclusion of (iv) holds for p,, then it also holds for l p , . Finally, assume that f +p, = g + ( l v d )and f =g + ( ~ + ~ Then ).
++
f+(p,+$)
The following proposition shows that A and v are dual notions. The most useful part of the proposition is probably (viii), by which one can conclude that vdo +d is a tautology after proving that q t, is.
+
=
0
iff f+cp = 1 a n d f + + = 0 i f f g fiV =d 1 andg+ =0 i f fg + 1 p,d = 1 and g+$d = 1 i f f g + ( l p dA + d ) = 1 iffg+(p,++)d = 1 i f fg+ i (p, + +)d = 0.
Part 2: Elements of Logic
Chapter 8: Sentential Logic
Hence the conclusion of (iv) holds for p + # if it holds for p and for #. Hence (iv) holds. We can derive (v) from (iv) easily using the completeness theorem. First assume I' t- rp Thus by the completeness theorem I' k p. We shall now establish that { T # ~#: G r) k i p d . To this end, let g be any model such that g + i = 1 for all # E I?. Define fs = g + -I (s) for all s t P. By (iv), f + # = g + i #d for every sentence ). Hence f is a model of I?, and so f + p = 1. Therefore g + i pd = 1. Since g is arbitrary, : # E I') k l p d . By the # E I?) t- i p d . The converse is proved in completeness theorem, exactly the same way; (v) follows. The condition (vi) is a special case of (v). Concerning (vii), recall that (y+ #). = i p d A (Gd. Hence t- i (p + fld* + pd), so (vii) follows from (vi). Finally, (viii) follows from (vii) since t-x o '6 is equivalent to the 0 conjunction of t-x +- 0 and t-0 + X, for any sentences x and 8.
PROOF. By 8.9(ii) we may assume that A is finite. Hence it is enough to prove by induction on m that for all m E w and all p E "+,SentB, if I? v ivi :i 5 m) I- # then I? 1 A,,, pi + +. This statement for m = 1 is just the deduction theorem. Now we assume our statement for m (and for all sentences #), and we assume that p E m+2Sentpand I? v {pi : i I m + 1) I- #. By the deduction theorem, I? LJ {pi : i 5 m) t- p,,, + #. Hence by the induction assumption, I' t- A,,, pi + (cp,,, + 4).Now using Proposition 8.35 it is easily checked that the following sentence is a tautology, and hence is a I?-theorem : [ iA smR + ( P ~ + I + A
I
A
+ (ism+l
pi+#).
It follows that 'I I- Airm+l pi 4 #, as desired.
0
We can also give a useful criterion for inconsistency:
Some other important sentential connectives are the finite generalizations of conjunction and disjunction :
Theorem 8.37. For any set I? of sentences the following conditions are equivalent: (i) I? is inconsistent; (ii) there is an m E w and a q~ E "'+'I' such that !- ViSmi pi.
Definition 8.34. Let (po, . . ., pm-,) be a finite sequence of sentences, with m > 0. We define the general conjunction Ai,, pi and the general disjunction Vi , vi for j < m by recursion :
PROOF. (i) * (ii). Assuming (i), we have I' I- # A i# for any sentence #; we fix $. From 8.27 we know that I' # 0.Hence by Theorem 8.36 there is an m E w and a p ~ ~ + ~ I ' s that uch
It remains only to notice that the sentence
We sometimes write po instead of Vir pi.
,
A
.. A
p, instead of
Ail;, pi, and po v - . - v
ism
T,
The following proposition shows how to calculate truth values with these new connectives; it is easily established by induction on j. Proposition 8.35. Under the assumptions of Dejnition 8.34, for any j < m and any modelf we have (i) f (ii) f
+
+
AiSjpi = 1 iffVi I j (f Vi,, pi = 1 i f f 3 I j (f
With the aid of generalized conjunction we can formulate a generalized form of the deduction theorem 8.11 which is frequently useful in the further study of sentential logic:
+
0
The following theorem is perhaps the most important result in the classic theory of sentential logic :
+pi = 1);
+pi = 1).
Theorem 8.36. If r u A t- andA # 0,then there is an rn E w and a p E "+'A such that I? I- p, A - . - A cp, +- +.
ism
is a tautology. (ii) 3 (i). Assume (ii). Then for any sentence # we have I? k #. In fact, let f be a model of I?. Then in particular f +pi = 1 for all i I m. But, by virtue of Proposition 8.35, this contradicts the fact that Vi,, 1pi is a tautology. Conclusion: 'I has no models. Thus, vacuously, every model of P is a model of #. Hence, indeed, I? k #, so I? t- # by the completeness theorem. Thus F is inconsistent.
,,
A
, ,
Tbeorem 8.38 (Distinguished disjunctive normal form). Let 8 = (n, c, {so, . . ., s,)) be a sentential language, with m t w . Let p be a sentence which has at least one model. Then there is a function # such that:
+
+
+
(i) the domain of is (p 1) x (m 1)for some P 6 w ; (ii) for each i I p and j I m, #ti = <sf> or #ij = l(si>; ( W b w Visp A t s m +ij-
Chapter 8 : Sentential Logic
Part 2: Elements of Logic
A general sentential logic is a quadruple 9 = (K, P, f, g ) such that P # 0, K n P = 0, f is a function mapping K into w -- 1, and g is a function ' are the assigning to each k G K an fk-truth function g,. Symbols of 9 members of K u P ; expressions of 9 are finite sequences of symbols. With
PROOF. Let M be the set of all models of q ; M # 0 by assumption. Let g be a one-one function mapping some integer p + I onto M. For each i 2 p and j I m let (sj) if gisj = 1, Thus g,' A,, #,, = 1, whilef + A, this ~t follows easily that f t9, = f desired.
each k
., +
+,, = 0 ~ff # fit, for each i 5 1). From V l r pA] = fs
f +p);
-f
+ p ) Uf
+
f + ( W = XNf+g, f + ( g , + + ) = ( X - f+g,) U ~ + Q f U p = interior of f +cp.
#I.
+
This gives rise to a notion 'I Ci p. (y) Prove that r ti p implies r ki p. (8) Show that if r is consistent, then there is a model f with associated topological space X such that for any sentence p, r t p iff f + p = X. Hint: let X = { A : I? G A, A consistent}. For each sentence p, let
1 Y
Show that the U,'s form a base for a topology on X. Let fs = U (iii). Assume (ii). Now 0 = x.-x E I, SO by (ii), x E I or - x E I. (iii) 3 (iu). Assume (iii). Then [0] # [I] since I # A. For any x E I, [x] = [O] and [-XI = [I], so [O] and [I] are the only elements of %/I, by (iii). -,- are just like in 9.24, so %/I is isomorphic to 2. Clearly the tables for (iv) 3 (i). Since IAIIJ > 1, I i s proper. If J is an ideal such that I c J c A, choose x E J I. Then [0], # [x], since I # J, and [x], # [I], since J # A. Thus IAIII > 2, contradiction. 0
+,
-
There is a theorem dual to 9.25 concerning filters; we will apply it when needed. The same applies to our next theorem. Of course the dual of 9.25(iv)
..,.
Chapter 9: Boolean Algebra
Part 2: Elements of Logic
requires a careful formulation of the notion %IF, F a filter. This is straightforward using 9.20. For example, the associated equivalence relation, is {(x, y) : x . y -x.-y E F}. Now we prove a fundamental existence theorem for maximal ideals.
+
Theorem 9.26 (Boolean prime ideal theorem). If I is a proper ideal of U (i.e., I is an ideal of U, and I # A), then there is a maximal ideal J of U such that I s J. PROOF. Let d = {J:I c J , J is a proper ideal of a}. Then d # 0, since obviously I Ed.Let be a nonempty subset of d simply ordered by inclusion. We now show that U g E d.Since 93 is a nonempty collection of ideals 2 1 , clearly U W # 0, and I s U a.Let x, Y E U 93. Say X E J E B and y E K E W. By symmetry we may assume that J G K. Then x, y E K, and since K is an ideal it follows that x + y E K and hence x + y E U 93. If x I ~ E U B ' ,say y ~ J ~ 9 Then 3 . XEJ since J is an ideal; thus X E U ~If . 1 E U W,then 1 E J E93 for some J , contradicting J proper. Thus U 99 is proper, and we have established that U 99 ~ d . We can now apply Zorn's lemma to obtain a member J of d maximal under inclusion. Clearly J is as desired. 0 The Boolean prime ideal theorem has been studied extensively from the point of view of axiomatic set theory. It is weaker than the axiom of choice (which is equivalent to Zorn's lemma), but it cannot be established on the basis of the usual axioms of set theory without choice, both statements assuming those axioms are consistent. The prime ideal theorem can be used to establish the following important result. In its proof we make a switch from working with ideals to working with filters. Ideals seem more appropriate in. pureIy algebraic contexts, as above, while filters are natural when considering matters, like here, which verge on topology; see Exercise 9.69.
+
thus f(a b) =fa u fb. It remains to show that f is one-one. Suppose x E A, x # 0. Let F = {z : z E A, x I z). Clearly F is a proper filter. By 9.26, let G be an ultrafilter such that F E G. Now x E G, so G E fx, as desired. The Boolean representation theorem shows that our axioms for BA's are complete, in the sense that the only models of these axioms are the Boolean set algebras, up to isomorphism. By this theorem, we can establish properties of arbitrary BA's by establishing them for the more special Boolean set algebras. On the other hand, we can apply ordinary algebraic constructions, some of which, like homomorphisms and quotient algebras, lead out of the class of Boolean set algebras, to establish properties of Boolean set algebras themselves. We now turn to some important notions special for Boolean algebras.
Definition 9.28. An element x E A is an atom of U if x $ 0, while for all y, 0 I y 5 x implies 0 = y or y = x. U is atomic if for every nonzero x E A there is an atom a 5 x. U is atomless if U has no atoms. In the BA of all subsets of a set X, the singletons {x} for x E X are the atoms, and this BA is atomic. An easy example of an atomless BA is the BA of subsets of the set of rational numbers generated by all half-open intervals [r, s). There are BA's which are neither atomic nor atomless. A fundamental property of atomless BA's is given in 9.48 below. With the aid of the notion of an atom we can determine all finite BA's; see 9.30.
Proposition 9.29. Everyfinite BA is atomic. PROOF. Suppose U is nonatomic. Choose a nonzero a, E A such that there i s n o a t o m a, > - . . > a, > 0, since there is no atom l a , choose a,,, E A with a, > an+l > 0. The so constructed sequence a E WAis one-one, so IAI 2 X,. 0
Theorem 9.27 (Boolean representation theorem). Every BA is isomorphic to a Boolean set algebra.
Proposition 9.30. If U is afinite BA with m atoms, then U is isomorphic to the Boolean set algebra of all subsets of m.
PROOF. Let U be a BA. Let X = {F: F is an ultrafilter of 3). It suffices to find an isomorphism f of U into the BA (SX, u , n, -, 0, X). For each a E A, let fa = { F : a E F E X). Then for any F E X and any a, b E A,
PROOF. Let a
FE~(-a) SO f(-a)
=
X
-
iff-a~Fiffa$F i f f F g f a i f f F ~ X - fa;
(by 9.25(iii))
"A enumerate all atoms of U. For each x fx
iffa + b ~ F i f f a ~ F o r b ~ (by9.25(ii)) F i f f F ~ f aor F ~ f b i f f F f~a u fb;
=
E
A, let
{i : a, I x).
Thus f maps A into the Boolean set algebra 23 of all subsets of m. Suppose i~ f(x + y), while i $ fx. Thus a, I x + y but a, $ x. Hence a,.x < a,, so a , - x = 0 since a, is an atom. Therefore a, = ai.(x + y) = a i - y I y, i.e., y) 5 fx u fy; the converse inclusion is obvious, i E fy. This proves that f(x so f(x + y) = f x u fy. Clearlyfxn f - x = 0. For any i ~ m w e h a v e a=~ a,-(x + -x) = a i . x + a,.--x, so ai.x # 0 or a,--x # 0; these two alternatives imply (since ai is an atom) a, i x or a, i - x respectively. Thus i E fx
+
fa;
F ~ f ( a +b)
E
Chapter 9: Boolean Algebra
Part 2: Elements of Logic
o r i f(-x). ~ Hencefx u f(-x) = m,som fx = f(-x).Thusfisahomomorphism of U into 8. If x # 0, then, since U is atomic by 9.29, there is an i E m with ai x ; thus fx # 0. It follows by 9.19 that f is one-one. Finally, a,; we claim that fx = T. If i E T, obviously suppose T G m. Let x = a, I x and i E fx. NOWsuppose i E fx. Thus a, I x, so ai = CjeTai.aj. Hence there is a j E T with a,. a, # 0. Since ai and a j are both atoms, ai = a,. a j = a j il and so i = j E T, as desired. N
xi,,
PROOF. For any x E X, x 5 XX and hence u . x i u.XX. Now suppose that b is any upper bound of { x . u : x E XI. Then for any x E X, x . a 5 b and so x 5 -a b. ThusXX I -a 6, s o a . X X I b. D
+
+
The next general algebraic notion we shall consider for BA's is that of direct or Cartesian products.
Definition 9.38.
Let (21, : i E I) be a system of BA's,
Corollary 9.31. For any n E UJ the following conditions are equivalent:
for each i E I. By the product of the system ( a i : i E I) we mean the structure
(i) there is a BA of power n; (ii) n = 2" for some m.
Corollary 9.32.
If U and 8 are finite BA's,
then U g 23 if
1A /
=
1 B(.
Definition 9.33. Let 31 be a BA, X G A . The least upper bound of X, if it exists, is the unique element CX such that Vx E X (X I CX) (i.e., CX is y]. Dually, the an upper bound of X) and Vy E A [Vx E X (x y) * CX I greatest lower bound of X, if it exists, is the unique element n X such that Vx E X ( n X I x) (i.e., n X is a lower bound of X) and Vy E A [Vx E X (y I X) = > y I n x ] . Proposition 9.34.
Ui = ( A i , +i, .i, -i, Oi, 1,)
The following conditions are equivalent:
where B = i E I ) and
Pi.,
Ai
=
{f: f is a function with domain I andJ;
E
A, for all
+, ., - are defined as follows (for arbitrary f, g t B, i E I):
The members 0, 1 of B are of course given by hypothesis. If each Ui = B, we denote P,, 21, by 'B. If 1= 2, we denote Pi,, 21i by Qlox a,. Thus U, x 21, consists of all pairs ( x , y) with x t A,, y t A , , with the operations given by
(i) U is atomic; (ii) for every a E A , Z{x : x I a, x is an atom of U) exists and equals a.
PROOF (i) 3 (ii). Assume (i), and let a E A . Obviously a is an upper bound for X = {x : x I a, x is an atom of 2). Suppose that b is another upper bound for X. If a $ b, then a . - b # 0, and there is an atom x with x I a>-b. Thus x I a, so x E Xand x I b. Thus x I b.-b = 0, contradiction. Thus a I b, as desired. 0 (ii) => (i): obvious. Corollary 9.35. If U is atomic and has only finitely many atoms, then U is finite.
The following proposition is straightforward:
Proposition 9.39.
: i E I) is a system of BA's, then
Pi,, 24 is a BA.
Proposition 9.40. The BA ( S X , LJ, n, -, 0, X ) is isomorphic to X2.
PROOF. For each Y G X , let X, be the characteristic function Y , i.e., for all x E X let
Proposition 9.36. I f C X exists, then n { - x : x E X) exists and equals -C X.
PROOF. If x E X, then x I CX and hence -XX I-x. Thus -CX is a lower bound for Y = {-x : x E X). Let a be any lower bound for Y. Thus V X E X ( a I -x), s o V x ~ X ( xI -a). HenceXX I- a a n d a I-XX.
It is easily verified that
x is the desired isomorphism.
0
If we combine this proposition with the representation theorem, we obtain
Proposition 9.37. equals a.XX.
If XX
exists and a
E
A , then X{x.a : x
E
X) exists and
Corollary 9.41. Any BA can be isomorphically embedded in X2for some set X.
Chapter 9: Boolean Algebra
Part 2: Elements of Logic
PROOF. Assume URB. If A is finite, then U z 23 by (ii) and Corollary 9.32. Hence assume A is infinite. By (ii), B is also infinite. Let a : w ~ A and b : w% B. We now define two sequences ( x i : i E w ) E " A and ( y i : i E w ) E " B by recursion so that for every m E w and every t _c m ,
This corollary shows another completeness property of our axioms for BA's. Namely, if we wish to check that an equation holds in all BA's, it is enough to check that it holds in the two-element BA 2. For, then it will also clearly hold in X2, and any subalgebra of X2, and hence by 9.41 in any BA. This gives a decision procedure for checking when equations hold in all BA's; in fact, under a natural Godel numbering the set of Godel numbers of equations holding in all BA's is recursive, indeed even elementary recursive. The decision procedure really coincides with the truth table method described for sentential logic. Another important fact about products of BA's can be expressed using the notion of relativized BA:
n
I (JJ iot xi. i ~ m t-
id
ut
n n=n JJ xi.
=
k t
A. U
n .
- ~ i ) .
i~m-t
vt
xi,
isn-t
Yi.
~ i .
ten-t
Lot
E
i
Let xo = a,, and by (iii) choose yo E B so that (U xo)R(23 yo) and (U 1 -xo)R(23 t -yo). Thus ( 1 ) holds for m = 1. Now suppose xi and yi defined for all i < n, where ( 1 ) holds for all m I n, and n L 1. For each t E n let
Definition 9.42. For any BA 21 = ( A , +, ., -, 0, 1) and any a E A we let U 1 a = ( A 1 a, +', -',-', 0, a), where
for any x , y
I (JJ ~
- xi)..
For n odd we proceed as follows. Let j be minimum such that bj $ { y , : i < n), and set y, = b,. Now let t E n. We have (U ut)R(23 r u t ) by (I), so by ( i ) and (iii) choose wt E A t ut so that [(U u,) 1 wt]R[(23t v,) f (v,.y,)] and [(U f ut) -' wt]R[(231 v,) -"(vt. y,)], where -' and -" are the minus operations in U f ut and 23 v, respectively. Thus
1 a is the relativization of 91 to a.
It is easy to check the following proposition:
z,,,
Proposition 9.43. U a is a BA. Proposition 9.44. For any a E A, ?I is isomorphic to (91 1 a) x (91 1 -a).
PROOF. For any x E A , let f x the desired isomorphism.
=
nls(,+
( x - a , x.-a). It is easily checked that f is
0
Definition 9.45. Given a product Pi,, ?Ii of BA's, and any i E I, pr, is the function mapping Pi,, Al into A, given by pr,x = xi for all x E Pier Ai. Corollary 9.46. pr, is a homornorpkismfrom
Pi,,
Ui onto 91,.
I
/C
I
I
The following lemma expresses an important property of the notion of relativization.
b
Lemma 9.47 (Vaught). Let R be a binary relatiotz between countable BA's such that the following conditions hold:
t
( i ) ifUR23, then 23RU; (ii) ifllR23, then \ A ] = JBI; (iii) if UR23 and a E A , then there is a b E B such that (U (2L - a)R(23 1 - 6). Then U
23 whenever UR23.
1 a)R(23 1 b) and
w,. We now check (1) for m = n + 1. Given where w, I u,. Set x, = any subset s of n + 1 , we take two cases. Case 1. n E S. Then we write s = t u {n), where t G n. Thus xi1, -,- X t = Ut.X n and Y1. L n + 1 )-,- Y1 = vt .Yn. Now if t ' c n and t # t ' , clearly u,. u , = 0. Hence ut .x, = w,. Hence the desired result is immediate from (2). Case 2. n $ s. Thus s E n, and x,-n,,(,+ -,- x, = us.- x,, while ~ : . n t e ( n + l ) -~ Y , = us.-yn. Clearly us.-x, = us.- w,, so again the desired conclusion follows from (2). If n is even, we proceed as above except with the roles of U and 23, a and b, x and y interchanged. Thus our sequences are defined, and ( 1 ) holds for every m E w and t c m. In particular, for any m E w and t c m, using (ii),
1
I
n,,,
n:,,
n,,,
nlEs
Now we claim if i, j
1, show that A is consistent, and apply (1) to get a modelf. Show that F = {[p,] :f +p, = 1) is an ultrafilter in A'?. For (2) 3 (I), assume that I'is a consistent set of sentences in a sentential language 9.Let h be an isomorphism from yfi*$' onto a Boolean set algebra of subsets of a set X. Since r is consistent, X # 0. Choose xo E X, and let f be the model of B such that fs = 1 iff xo E h[<s)]. Show that f is a model of r. 9.75 (Tarski). Let U be the Boolean set algebra of recursive subsets of w . Show that a B A B is isomorphic to U iff 8 is denumerable, atomic, and for every b~ B, i f B I b is infinite then there are c, d 5 b with c . d = 0,c + d = b, and both 23 23 c and 23 d infinite. Hint: use Vaught's Lemma 9.47. 161
Chapter 10: Syntactics of First-order Languages
10
Syntactics of First-order Languages
range. Also, corresponding to each 0 E Drnn 0 an 00-ary operation on A is selected as the "meaning" of 0.Finally, corresponding to each R E Drnn W an WR-ary relation on A is chosen as the meaning of R. The logical symbols, i.e., members of Rng L, are interpreted in their intuitive senses. We shall make all of this precise in the next chapter. We will shortly define precisely the notions of term, formula (grammatical expression), etc. First let us give some examples of first-order languages. Language of equality. We let L = (w i : i E 5), v = (rn : rn E w), 0 = W = 0.This language is suitable just for expressing statements about equality alone. For example, the statement that equality is a symmetric relation is expressed by the formula
+
and the statement that the universe has at least three elements is expressed by the formula
In this chapter we give the basic definitions and results concerning the syntax of first-order languages: terms, formulas, proofs, etc. As we proceed we shall also check the effectiveness of many of the notions, although at a later stage we shall just appeal to the weak Church's thesis (see the comments preceding 3.3). This long section contains only very elementary facts, which will be used later mainly without citation. The basic definitions of syntactical notions occupy 10.1-10.18. The remainder of the chapter is concerned with elements of proof theory; this plays an important role in our discussion of decidable and undecidable theories in Part 111, but will not be used in the discussion of model theory (Part IV). The basic notion of a first-order language, with which we shall be working for most of the remainder of this book, is as follows:
Definition 10.1. A first-order language is a quadruple 9 = (L, v, 8 , g ) with the following properties : (i) L, v, 0 and W are functions such that Rng L, Rng v, Drnn 0, and Drnn W are pairwise disjoint. (ii) Drnn L = 5, and L is one-one. Lo is the negation symbol of 9,L1 the disjunction symbol of 9,L, the conjunction symbol of 9,L, the universal and L, the equality symbol of 9. quantifier of 9, (iii) Drnn v = w, and v is one-one. v, is called the ith individual variable. (iv) Rng 0 G w. For 0 E Drnn 8 , 0 is called an operation symbol of rank 0 0 ; in case 8 0 = 0, we also refer to 0 as an individual constant. (v) Rng W G w 1. For R E Drnn W, R is called a relation symbol of rank 9 R .
-
In an intended interpretation (model) of a first-order language, a certain set A is chosen as the domain or universe over which the variables vi are to
(For the meaning of some of the symbols here, see below.) Note that there are other languages which are clearly equivalent in all respects to this lan5 : rn E w), 0 = guage. For example, we might let L = ( i : i E 5), v = (rn W = 0. In general, if we have two languages 9 = (L, v, 0,W) and 9' = (L', v', Cot,) ' % 9' and there is a one-one function f from Rng L u Rng v u Drnn 0 u Drnn W onto Rng L' U Rng v' U Drnn 8' u Drnn B' such that f 0 L = L', f 0 v = v', 8' 0 f = 0, and B' 0 f = 9,then 9 and 9'are equivalent in all senses of interest to us. For this reason, we usually do not specify a language in full detail; any exact specification the reader imagines should be all right for our purposes. In particular, there is no need to specify L or v. It is enough just to indicate the number and rank of the operation and relation symbols. Language of set theory. There are no operation symbols and only one relation symbol, E, which is to be binary. The statement that the union of two sets exists is:
+
Language of rings. There are no relation symbols. The operation symbols (binary); (unary); 0 , 1 (0-ary). In this language, specific polyare: nomials with integer coefficients can be expressed. For example, the polynomial x3 3x - 1 is expressed by
-
+, .
+
Language of ordered3elds. This is like the language of rings, except that we add a binary relation symbol 1 and there is a y < p;"' such that ( y ) , , = x and for each i I l y one of the following conditions holds:
by induc-
(1) there is an m < ( y ) ,such that ( y ) , = 2 P m + ' ; ( 2 ) there is a k < x such that k E y* Drnn 0, U y l k = 0, and ( y ) , = 2"l; (3) there exist k < x and z < p":,' such that k E I/* Drnn C, C y l k > 0 , lz = fiY-'k - 1, for each j Iz there is an \ < i such that ( z ) , = (y),, and ( y ) , = Cat ( 2 k+',Con" 2 ) . 0
w,
Con' (x, 0 ) = (x),, Con' (x, y 1) = Cat (Con' ( x ,y), (s;)~+ J.
+
Finally, we set Con" y = Con' ( x , Ix) for any x E w. ( i i ) Trm2, the collection of terms of 9, is the intersection of all classes I? of expressions such that the following conditions hold: (1) ( v , ) E ~f o r e a c h m ~ w ; ( 2 ) if 0 E Drnn 8 , say with 8 0 = m, and if #,, . . ., #,-I E r , then
#0.. .#,-I
The following proposition follows directly from the definition of terms and is frequently of use. Proposition 10.11 (Induction on terms). If (v,) E r for all m E w, and (O)a,. . .urn-, E r whenever 0 E Drnn B, 60 = m , and a,, . . . , a,-, E r, then Trm E r.
~ r .
Note, with regard t o 10.8(ii), that if 0 0 = 0 , then the condition merely says that ( 0 ) E r. The number-theoretic functions in ( i ) are introduced so that the following properties of Godel numbers will hold. If y o , . . ., y,-, are expressions, m > 0 , then
Con" x
= g + ( y o .-
Proposition 10.12 (Unique readability) ( i ) Every term is nonempty. (ii) If a is a term, then either u = (0,) for some m E w, or else there exist 0 E Drnn 9,say with 8 0 = m, and 7 0 ,. . ., 7,- E Trm such that a = ( 0 ) ~. .~T , - l.. (iii) If a is a term and i < Drnn a, then (a,, . . ., a,-,) is not a term. (iv) If 0,P E Drnn 0, say 8 0 = m, lrP = n, and a E "Trm, T E "Trm, and ( 0 ) ~ O ~ ~=~( Pa ) m T , .~. . Tl , - ~ , then m = n, 0 = P, a n d o = 7.
.T,-~).
The notion of term in 10.8 is the general~zation to arbitrary first-order languages of the common mathematical notion of a polynomial. In case the first-order language is a language for rings (see above after 10.1), then we obtain exactly the ordinary notion of a polynomial with integer coefficients. The following construction property of terms is easily established. '
Proposition 10.9. An exprrssion a is a term iff there is a jnite sequence (T,, . . ., T,-,) of expression.^ with T , _ , = u such that for each i < n one of the following conditions holds: ( i ) ri = (0,) for some m E w, (ii) there is an 0 E Drnn 8 , say with 8 0 such that ri = < O ) r j O.. .T ~_ ( ~
=
m, and there are j,, . . .,j,
-
,< i
I
1
1
, I
I
There is an effective procedure for recognizing when an expression is a, term :
I
Proposition 10.10. The functions Con,, Con', and Con" are recursive. The set g + * Trm is recursive.
I
1I 1
I
PROOF. In each of the cases ( i ) and (ii), let be the collection of terms for which the des~redcondition holds, and apply 10.11. We prove (iii) by induction on Dmn a. The case Drnn a = 1 is clear by ( i ) . Now assume that Dmn > 1 and that (iii) is true for all terms T such that Drnn T < Drnn a. By (ii) we may write a = ( 0 ) ~. .~T,-,, . where 0 E Drnn I f , 8 0 = m , and T E ,Trm. If i = 0 , then 0 = (a,, . . ., a,-,) is not a term, by ( i ) . If i = 1, then (a,, . . ., a,-,) = ( 0 ) , which fails to be a term because ( 1 ) i < Drnn a implies m > 0 and ( 2 ) by ( i i ) ,for ( 0 ) to be a term we would have to have 0 0 = 0. So, assume that i > 1. Then (a,, . . ., 0,- ,) = ( 0 ) ~. .~T I.- 1 p for some j < m and some expression p whlch 1s an inltial segment of 7,. Assume that 1 & Vp m[(p,m ) E R => 3i I ln(p = (n),)]& Vi I In[((n),,m ) E R ] & (n),, = m & Vf I plm, [ I f = In & Vi r If [ ( f ) ,= 1 or ( f ) , = 21 & Vi r If Vj r lf [ i l ( n ) ,= (n), => ((f),= 2 o ( f ) , = I ) ] & V i < l f V j 5 1fVk < If [(n), v r ( n ) , = (n), => ( ( f ) , = 2 o ( f ) , = 2 or ( f ) , = 2)] & Vi r IfVj r If Vk I I f [(n), A ' ( 4 k = (4,=> ( ( f), = 2 iff ( f ), = 2 and ( f )k = 211 * ( f l u = 211. Note here that n is used to code the set S of all subformulas of p,, if m = g+p, while f is used to code any function as in 10.20(ii). Of course, the form of the above displayed expression shows that { m : m is the Godel number of a tautology) is recursive. 0 Tautologies are by no means the only logically valid formulas in a first order language. Some additional ones are, for example, the formulas vo = vO, VvO(vO = vl) + v2 = v3, VvO[vO = v1 v i ( v 0 = v l ) ] We now want to formulate the notion of a logically valid formula, or theorem, in a general way, but still syntactically. We defer to the next section the proof of the completeness theorem, which states that the theorems are exactly the logically valid formulas. See also the next section for the rigorous definition of a logically valid formula. Delinition 10.23 ( i ) Axm9, the set of logical axioms of 9?is the set of all formulas of the following forms (where p, and # are formulas, i < w, and o and T are terms) :
( 1 ) p,, p, any tautology; (2) v v i ( ~+ #) + W v i + ~ Vvi#) ; (3) p, + Vvip,, if v, does not occur in p,; (4) 3u,(ui a), if vi does not occur in a ; (5) a = T + (p, + #)? if p, and # are atomic formulas and # is obtained from p, by replacing an occurrence of u in p, by T. (ii) Let I? be a set of formulas. Then F-Thm9, the set of all I?-theorems of 9,is the intersection of all subsets A of Fmla9 such that
=
( 1 ) I? u Axm9 E A ; (2) # E A whenever p,, p, + # E A (closure under detachment or modus ponens) ; (3) Vvip,E A whenever p, E A and i < w (closure under generalization). We write T h m 9 instead of 0-Thm2, r k9 p, instead of p, E r-Thm2, and F ~ instead Q of 0 t2 p,. Formulas e, with be, are called logical theorems. If I? I-9 cp, we call p, a (syntactical) consequence of I'. Of course when no ' in all these cases. confusion is likely we shall omit the subscript 2
Chapter 10: Syntactics of First-order Languages
Part 2: Elements of Logic
of r , then there is an automatic method for checking when a sequence of formulas is a I?-formal proof. We now proceed to prove this rigorously.
As usual, we give an equivalent version of this closure definition of theorems : Proposition 10.24. For I? u {p) G Fmla, (t,b0, . . . ,$,, - l ) of formulas such that the following conditions holds:
r I- cp
z j f there is a jinite sequence
Definition 10.26. We extend 9 and 9+further to finite sequences of expressions. If p = (p,, . . ., pm-l) is a finite sequence of expressions, let
+, -, = cp and for each i < m one of
(i) $, E Axm, (ii) 4, E r , (iii) 3j, k < i such that = $, + $(, (iv) 3 j < i 3k E w (+, = VV,$,).
Proposition 10.27. Let I? be a set of formulas such that g + * r is recursive. Then g (r-Prf) is recursive.
A sequence of the sort described in 10.24 is called a formalproof of p from
PROOF. For any x E w we have: x ~ g+*(I?-Prf) + iff x > 1 and for every i I lx one of the following conditions holds:
+,
I?, or a r-formalproof of cp. We denote by r-Prf the set of all r-proofs. This is our rigorous formulation of the intuitive potion of a proof. In fact, as stated in the introduction, we consider mathematics itself to be formalized on the basis of set theory. More precisely, mathematical language can be identified with a certain definitional expansion of the language of set theory describing following 10.1. The axioms of mathematics are just the usual axioms for set theory together with definitions of all the defined symbols. It is our conviction that any mathematical proof can be expanded, somewhat routinely, to eventually reach the form of a formal proof from I? in the above sense. Of course, this conviction is another instance, like the weak Church's thesis (see the comments following 3.1), of a judgement of applied mathematics that is not subject to a rigorous proof. We are just stating that our rigorous notion of proof is a fully adequate mathematical version of the mathematical proofs actually found in articles and books. It is clear that there is an effective method for recognizing when an expression is a logical axiom. More rigorously, we have the following theorem : Proposition 10.25. g
+
* Axm is recursive.
* iff one of the following conditions PROOF. For any x E w , x ~ g +Axm holds : (1) x is the Godel number of a tautology; (2) 3y, z, w I x[y, z E ~ * Fmla + and w E Rng ( g o v) and X = v'2W y y +' z) (v'2W ly v12'"+lz)] ; (3) 3y,z 5 x [ y ~ g + * F m l a a n d z ~ R n g ( ~ o v ) a n d - , 3 uI , wy y = Cat (Cat (u, 2"+I), w) and x = y +' V'2z+ly]; (4) 3 y , z I x [ y ~ g + * T r m a n d z ~ R n g ( g o v ) a n~d3 u w, I y y = Cat (Cat (u, 2"+l), w) and x = 3'2"+l(2"+l =' y)]; ( 5 ) 3s, t, y, z I x[s, t ~ g +Trm * and y and z are Godel numbers of atomic formulas and 3m, n Iy[y = Cat (Cat (m, s), n) and z = Cat (Cat (m, t), n)] 0 and x = (s =' t ) +' (y +' z)]. +
+I
+
+I
Since there is an automatic method for recognizing logical axioms, it is clear from 10.24that if there is an automatic method for recognizing members
+
+
From this proof we also obviously obtain: Proposition 10.28. I f r is a set of formulas such that y + * r is recursively enumerable, then 9 + *(r-Prf) is recursively enumerable. +
The following easy consequence of this proposition is one of the most important results of elementary logic.
I I
, I
I
'
1 i
b
1 %
i
! ;
Theorem 10.29. Let I' be a set of formulas such that 9 + * r is recursively enumerable. Then g + *(F-Thm) is recursively enumerable. PROOF. For any x (Y~Y= XI.
E w,
we have x EB+*(I?-Thm) iff 3y[y E B ++*(I?-Prf) and
0
An intuitive proof of Theorem 10.29 runs as follows. We assume that r can be listed by some effective procedure A . Let B be an effective procedure which lists all formulas. Now we describe an effective procedure C listing all I?-theorems. We start the procedures A and B going simultaneously. At the kth stage of the procedure C , having accomplished the kth stage of both A and B, we list out all sequences of length I k of formulas already produced by B. For each such sequence p, we check whether it is a F-proof using for members of I? only the formulas already produced by A . For each sequence p for which the answer is affirmative, procedure C produces as an output the last term of p. Clearly the procedure C so described generates precisely the I?-theorems. It is quite possible in 10.29 to have 8+*(I'-Thm) nonrecursive; this is in fact the defining characteristic of the undecidable theories which will be discussed extensively in Part 111.
Part 2: Elements of Logic
Chapter 10: Syntactics of First-order Languages
Most of the remainder of this chapter is devoted to establishing elementary results about the relation t defined in 10.23. Some high points of this development, which is rather tedious because of our economical system of axioms, are as follows: a formal expression of the principle of substitution of equals for equals, 10.49; the principle for changing bound variables, 10.59; universal specification-dropping a universal quantifier, 10.61; substitutivity of equivalent formulas, 10.71; prenex normal form theorem, 10.81; provability for sentences alone, 10.85; and the notion of consistency, 10.89-10.93. Proposition 10.30. For any m E w, if a E "Rng v and p, and then
+ are formulas,
PROOF. We proceed by induction on m. The case m = 0 is trivial, since (p, -+ +) + (p, + 4) is a tautology. Now assume the result for m, and suppose that p, E +' Rng v. Then
We prove (1) by induction on n. The case n = 0 is trivial. Suppose true for n, F t' Vao. . .Vanp,, F t' Vao. . .Van(p,+ +). Now and I? t1Va0.. .Van-1 Van(p,+ +), so by the induction hypothesis, r tfVa0.. Van- l(Vanp, +Van+). By the induction hypothesis again, F 1' Va, . . .Van+,as desired, hence F-Thm G A. In particular (taking m = 0 in the definition of A), r I- p, a r In the following proposition we summarize some simple properties of t which will be used frequently without citation.
+
Proposition 10.33. Let r , A E Fmla and p, E Fmla. Then (i) if r E A and 'I t p,, then A k v; (ii) if F t v, then O t p,for some finite subset O of F ; (iii) if I? t Xfor e a c h x E A a n d A tp,, then I? tp,; (iv) if r t p, and I? t p, + 4, then I' t
+.
by the induction hypothesis. Generalizing on a,, noticing an instance of the axioms 10.23(2), and applying detachment, we get
Now by another instance of 10.23(2), a tautology, and detachment, we get 1. our desired result for m 0
+
In what follows, a, fi will denote arbitrary variables, o, T, p will denote arbitrary terms, and p,, 4, x arbitrary formulas. Proposition 10.34. to
PROOF. Let
Related to 10.30 is the following important theorem, to the effect that there is a version of t not involving the rule of generalization:
+
Theorem 10.32. F k p, if I? t' p,.
PROOF. F-Thm clearly satisfies the conditions 10.31(i) and 10.31(ii). Hence r-Thm' G r-Thm, i.e., r t' p, a I? t p. To prove the converse, let
be a variable not occurring in o. Then
ta=o+(a=u+o=o) by 10.23(5) I-T(u= u ) + -(a= 0) by a tautology, detachment tVa[ -(a = a) + -(a = o)] generalization 10.23(2), detachment tVa 7 (a = U)+Va i (a = a) t ~ ( =a o) +Va 1(a = o) 10.23(3) t l ( o = a) +Va 7 (a = a) tautology, etc. t3a(a = o) + o = a tautology, etc. to o using 10.23(4)
Definition 10.31. Let I? G Fmlap. We let F-Thm' be the intersection of all sets A G Fmla2 satisfying the following conditions: (i) i f p , ~ A x m ~F,UmEw, and a E m R n g v ,t h e n V a , . . . V c ~ ~ - ~ p , ~ A ; (ii) E A whenever p,, p, + E A. We write Thmh instead of 0-Thm;P, F t> p instead of p, E F-Thm>, and t>p, instead of 0 t&p,.
+
a
= o.
=
Proposition 10.35. to = T -+ T = a.
PROOF. ~u=T+((z=u+T=u) ~ ~ = T + T = u
Obviously Axm u F c A and A is closed under generalization. To show that A is closed under detachment it is clearly sufficient to establish
10.23(5) using a tautology
Proposition 10.36. to = T + (T = p + o = p].
t~=u+(~=p+o=p) to = T + (T = p + o = p)
10.23(5) using 10.35 and a tautology
Chapter 10: Syntactics o f First-order Languages
Part 2 : Elements o f Logic Lemma 10.37. If 0 is an operation symbol of rank m , i < m , a,, . . ., a, are terms, and T is a term, then
,
Before returning t o proof-theoretic matters concerning these notions, we as usual want t o briefly discuss the effectivity o f the notions. It is, in fact, obvious that there is an effectiveprocedure for recognizing i f a certain variable occurs bound or free at a given place in a formula. The following three propositions give a rigorous formulation o f this fact.
tai = 7 + OuO..-om-l = PROOF. The following formula is an instance o f 10.23: ai=7+ (Ou,.
- .U,-l
=
O~O"'um-l+O~O --a,-1 .
Proposition 10.42. Let R = {(m,i, x, y) : m = ga for some variable a, x = g + p and y = 8+#for some formulas p,, #, i < Drnn p,, and V is a quant$er on a at the ith place in p, with scope $1. Then R is recursive.
= 0a0"'ai-17a*+1"'am-l).
Hence 10.34 and a suitable tautology give the desired result.
0
PROOF. ( m , i , x , y ) ~ R i f f m ~ R n g ( g o u ) a n d yx ~ , g+*FmlaandiIlx 1 and ( x ) ~ +=, m + 1 and i + ly I lx and V j I and (x), = g L , b [ ( ~ )=r (x)i+jI. 0
Using this lemma, we give our first form o f the principle o f substitution o f equals for equals:
+
Theorem 10.38. If 0 is an operation symbol of rank m , and a,, . . ., a,-,, TO,. . ., 7,-, are terms, then
toi = T i + 0 7 , . .
.7i-la,ai+1.. .a,-1
= OTO..
.TiUi+l..
Proposition 10.43. Let S = {(m,k , x ) : m = ga for some variable a, x = g+p,for some formula p, k < Drnn p,, and a occurs bound at the kth place of p,}. Then S is recursive.
PROOF. ( m , k , x ) ~ S i f f m ~ R n g ( g ~ v ) , x ~ ~ + * F r n l a , k I l x , ( x ) , = m + 1 and 3 I lx 3 y I x [ y ~ g +Fmla, * i < k I i + ly, and (m, i, x, y) E R ] , where R is as in 10.42. 0
-am-l.
Hence 10.36 and an easy but long tautology give the desired result.
0
Lemma 10.39. If t u = T + (p, + +) and a E Rng v does not occur in a or in T , then t o = 7 + (Vap,+Va$).
Proposition 10.44. Let T = {(m,k , x ) : m = ga for some variable a, x = 9 +p, for some formula p,, k < Drnn p,, and a occurs free at the kth place of p,). Then T is recursive.
PROOF.
PROOF. (m, k , x ) E T i f fm E Rng (9 v), x and (m, k , x ) $ S , where S is as in 10.43. 0
=
t a 7 + (p, + I)) tVa(a 7 ) -+ Va(p,+ #) ta = r+Va(a = 7 ) t a = 7 + (Vap,+ Va*)
=
hypothesis generalization, 10.23(2) 10.23(3) using 10.23(2) and a tautology
E
g + * Fmla, k I lx, ( x ) , = m
+ 1, 0
The following proposition is analogous t o 10.40, and is proved similarly:
Ci
Proposition 10.45. Let p, = (vo, . . ., p,, - be a formula, and suppose that i < m. If pi E Drnn 8 u Rng v, then there is a unique j such that i < j I m - 1 and (p,, . . .,p,,) is a term.
T o proceed further, we must introduce the basic notions o f free and bound occurrences o f variables in formulas. The definitions are based on the following Proposition, which is easily proved by induction on p,, using 10.17.
W e now extend the notion o f free variable t o terms: Proposition 10.40. Let p, = (p,,, . . ., p,,-,) be a formula, and suppose that i < m. I f y i E Rng L , then there is a unique j such that i < j I m - 1 and ( y i , . . ., v j ) is a formula. Definition 10.41. Let p, = (p,,, . . ., p,,-,) be a formula, and let i < m. W e say that V is a quantijier on a at the ith place in p, with scope 4 i f vi = LS, p,i+l = a, and # = (q,,. . ., y j ) is the unique formula given by 10.40. A variable o occurs bound at the kth place of p, i f vk = a and there exist i, j < m such that V is a quantifier on a at the ith place in p, with scope (ii). Obviously A = {p, : p, E Sent2, I? t p,) is consistent. Suppose A c @; say p, E O A. Thus I? If p,, SO by (i) I? !- i p , . Hence i p , E A c O, SO both p, and i p , are in O. Hence O is inconsistent. (ii) G- (iii). Assume that I? H p, and I? If I/, and let A be as above. Then A c A U {p,}, so A u {p,) is inconsistent. Hence by 10.92, A k i p , so I? t i p , . and so by a suitable tautology, r t i ( p , v #). Thus Similarly I? !- i# I? p, v # since I? is consistent. (iii) => (i). Given a sentence p,, we have I? t p, v i p , so by (iii), I? k p, or 0 I? t ip,. Thus I? is complete.
ino
1 o U) = [Sa7],
Similarly, for any formula p, let Sap,be obtained from p, by simultaneously replacing each free occurrence of ui in p by ai for each i < w . Then: (3)
For any formula p,, U i= p,[[ ] 0 a] iff U i= Sap,.
Of course (3) is also established by induction on p,; we consider two steps as illustration. If p, is T = p, then
-
We now show, by a direct construction, that any complete, rich, consistent set of sentences has a model:
for any term T, T'([
t= ,[
I 01 O
iff .a([ I) O 0) = pa([ I O 0) iff O(Sa~)% = O(soP)ILby (I), (2) iff U i=Sap.
P
4
Now, suppose p, is Vu,#. Assume first U t= p,[[ ] o]. Then Sap,has the form Vv,#', where 4' is obtained from # by simultaneously replacing each free occurrence of v, in # by a,, for each j E w {i). To show that Sap,holds in U, let a = [T] be arbitrary. Then U t= #[([I a):], i.e., 21 i= #[[I oil. By the induction hypothesis, U k S(ot)#. Clearly S(a:)# = S(o;)#', so again by the induction assumption, U k #'[[ ] a:], i.e., U k #'[([ ] a):]. Thus Sap,holds in U, as desired. The converse is similar. 0
-
0
0
0
0
Chapter 11 : Some Basic Results of First-order Logic
Part 2: Elements of Logic
Now we return to the proof that 91 is a model of I?. This is immediate from the following stronger statement: for any sentence p,, I' t p, iff p, holds in 21. (4) We prove (4) by induction on the sentence p,. If p, is
a
= T, then
To extend a consistent set r to a rich consistent set r is technically somewhat difficult. If 9 has no individual constants, then it is obviously impossible to do this extension within 9 itself. In general we must expand the language. We now briefly discuss the idea of expansion of languages.
t
$ Definition 11.14. A language 9' = (L', u', 0', B') is an expansion of a language 2 = (L, v, O , 2 ) provided that L = L', v = u', O s 6' and W s 9'; we also say then that 9 is a reduct of 2". In case 3 '= (L', v', O', B', 5~')and 9 = (L, v, 0, W,8 ) are effectivized first-order languages, then we insist additionally that g s 8', and we call 9' an efSective expansion of 9 . Assume that 9' is an expansion of 9 . If U = (A, f, R) is an 2-structure and 23 = (B, f ', R') is an 2"-structure, we say that U is the 9-reduct of 23, or that 23 is an 9'-expansion of 21 provided that A = B, f E f', and R E R'. We then write U = 23 19.
5. $
Next, let p, be Ru,. . .urn- First suppose r 1 9 . Then by the definition of R2', ([a,], . . . , [ u m l ] )E R". By ( I ) it follows that 91 1 Roo. . .om_l. Conversely, suppose 21 1 Roo. . .am-l. Thus (Ooa', . . . , OU;-,) E RU, i.e., by (I), ([a,], . . ., [am-l]) E R ~Hence . by the definition of R", there exist T,, . . ., T , - ~ E B with By an easy argument . [a,] = [T,], . . . , [urn- = [rm- and r I- R T ~. .7,using 10.23(5), I' t p,. For p, = i$ we have (by consistency and completeness) iff I? V $ I? t p, iff%#$ (induction hypothesis) iffBkp,.
i
4
In discussing expansions we will usually not be as rigorous as in 11.14. Thus we might say "let 9' be obtained from 9 by adjoining a new binary relation symbol" or "let 9' be obtained from 9 by adjoining m individual constants." Note that the ways of making such statements precise are all equivalent, in some sense; see the comments following 10.1. In the following proposition we summarize the most important elementary facts about expansions.
The cases p, = $ v x and p, = $ A x are similar. Finally, suppose p, is Vv,$. First suppose r t p,. To show that p, holds in 91, let a = [TI be arbitrary. Since tp, -+ SubfYi$ by universal specification, we have k Subf:$. Hence 21 k Subfy$, by the induction assumption. By (3) we have 91 k $[[ ] 0 a], where u E @Bis any sequence with a, = 7. Thus p, holds in 91. Conversely, suppose p, holds in 91. Since I' is rich, let c be an individual constant of 9 such that I? t 3vi i $ + Subf? i $. Thus r t SubfEL$-+ Vvi$. Let a E @ B be any sequence such that oi = c. Since p, holds in 21, U k $[[ ] u]. By (3), Subf:# holds in 91, so I' t Subfr$ by the induction assumption. Hence I' t p,, as desired. 0
Proposition 11.15. Let 2, 3', 21, 23 be as in 11.14. Then: (i) Trm2 _c T r m p , Fmlay s Fmlap, Axmy G A x m p , and Sent2 Sentp ; (ii) if a E Trm2, then aU = 5%; (iii) ifp, E Fmla2, then p,% = p,B; (iv) ifr E F m l a ~ then , U is a model of I? 1 823is a model of I'; (v) if I? u {p,) E Fmla2, then I? k2 p, ifS r kyf p,.
0
To obtain the completeness theorem, we still need to see how any consistent set r of sentences can be extended to a complete, rich, consistent set. First we deal with the case of extension to a complete consistent set. The theorem in question has many applications in addition to our immediate concern with the completeness theorem : then Theorem 11.13 (Lindenbaum). If r is a consistent set of sentences of 9, tkere is a complete consistent set A of sentences in 9 such that I? G A. is a nonempty PROOF. Let d = {A : r G A r Sent,, A consistent}. If 9 3 G Sent,. Also, UB is subset of .d simply ordered by c , then r G 0 1 and a p, E "UB consistent. For, otherwise, by 10.93 there is an 172 E w such that t 19, v . . . v i v m - Since B is simply ordered, p, E "A for some A E =B.Thus by 10.93, A is inconsistent, contradicting our assumption that 28 5 .d. Now we can conclude by Zorn's lemma that d has a maximal 0 member A. By 1 1.1 1, A is complete.
-
/ S1
s
This proposition is easy to prove; (i)-(iii) are proved by induction, and (iv) and (v) follow from (i)-(iii). By the completeness theorem which we will shortly prove, 1l.l5(v) also holds for the notion t . This statement is needed in our proof of the completeness theorem, however, so we will give a prooftheoretic proof of it:
Proposition 11.16. Let 2'be an expansion of 9 , andassume that I? u {p,) E Fmlay. Then I? ty p, if I? tp p,. PROOF. Obviously t-9q~ 3 I? tp p,. Now assume that I? tp p,. Say that is a I'-formal proof in 9' with = p,. Nonlogical constants ''which do not appear in 9 will be called new constants. Let ol be a of 2 variable not occurring in any of the formulas . . .,#,-,. We now associate
&, . . . ,
+,,
c
Part 2: Elements of Logic
with any formula or term recursion :
x
PROOF. Let ($,, . . ., +,-,) be a I?-formal proof with I),-,= Subf:~. Let /3 be a variable not occurring in any of the formulas 4,, . . .,+,-,. For any i < m let t+h; be obtained from $, by replacing c throughout +i by /3. As in the proof of 1 1.16 it is seen that (&, . . ., t,h;- ,) is a r-formal proof. Since
of 8' a formula or term X - of 9 , defined by
(v,)- = vi; ( 0 0 , . .am- ,)- = 00;- . .a;( 0 ~- .am-,)~ . = a (a = 7 ) - = (a- = 7 - ) ; (Rae. .am-,)- = Ru;. . .a,-, (Rae. . .am-,)- = (a = a) ( 1 p ) - = 19-; ( p v *)- = p - v *-; ( p A $1- = 9- A *-; (Vqp)- = vv,p - .
,
if 0 is an old operation symbol; if 0 is a new operation symbol;
(Subf :p)- = Subf gp, we have I? t Subf gp. Hence I? t V/3 Subfgp and I? I- p by universal specification. 0
if R is an old relation symbol; if R is a new relation symbol;
Finally we are in a position to construct rich extensions:
Lemma 11.18. Let 9 be anyfirst-order language and let I? be a consistent set of sentences in 2'.Let 2" be an expansion of 8 obtainedby adj~ininglFrnla~I new individual constants. Then there is a consistent rich set A of sentences 0j-8' such that r G A.
We claim: (I)
if i < m and
Chapter 11: Some Basic Results of First-order Logic
-
PROOF. Let ( p a : a < m) be a list of all sentences of 2" of the form 3/3I), where m is an infinite cardinal number. Note that m = IFmla21. We now define a sequence ( d , : a < m) of new individual constants. Suppose we have already defined d/3 for all /3 < a, where a < m. Then
is a logical axiom, then 4; is a logical theorem in 9 .
To prove (1) we take up the five possibilities for #i according to 10.23. First suppose that *i is a tautology. Then #; is a tautology. For, let f be any truth valuation in 8.Definef + p = f p - for any formula p of 8 ' . It is clear that f is a truth valuation, so f +$i= 1. Thus f*; = 1 , as desired. Second, suppose has the form Vvi(p+ X )+ (Vvip + Vvix). Then #; is
{d/3 : /3 < a ) u { C : c is a new individual constant occurring in some pb with /3 5 a )
+
so I); is still a logical axiom. Third, suppose +i is the formula p +Vvip, where vi does not occur in p. Then is the formula p- + V q p - , and, by choice of a, vi does not occur in p-. Thus is a logical axiom. For $i of the form 3vi(vi = a) where vi does not occur in a, a similar argument works. Finally, suppose has the form a = 7 + ( p + x), as in 10.23(5). If p has the form Rp,. . p m - , where R is a new relation symbol, then +i is U - = 7 - -+ (a = a -+ a = a), which is a logical theorem. If p does not have this form, then the desired result follows easily from the following statement:
+;
(2)
if p = and
has cardinality < m, so we can let d, be some new individual constant not in this set, say the first one under some given well-ordering of all the new individual constants. This completes the definition of the sequence (d, : a < m). Now for each a < m let p, be the sentence 3/3,#,. For each a. 5 m let O,
+;
/ I
=
r u {3/3,+, +=
S u b f S : y < a).
We claim that each set 0, is consistent in 9,and we shall establish this by induction on a. We have O, = I?, so Oo is consistent in 9' by 11.16. The induction step to a limit ordinal is clear from 10.92. So now assume that O, is consistent; we prove that O,+, is consistent. If a,+, is inconsistent, then by 10.92 we have
and p' = p7v are terms, then either p - = p'- or else phave the respective forms p'u-v', pfr-vl.
~ U V
This statement is easily established by induction on p. Thus ( 1 ) holds. Clearly: (3)
for a a term of 9 , a -
= a ; for
p a formula of 9 , p-
NOWusing (1) and (3) it is easily checked that each i < m. Hence r t2 p, as desired.
=
p.
#; is a r-theorem in 8 for 0
The same method of proof gives the following proposition which is also needed in our construction of rich extensions: Proposition 11.17 Let c be an individual constant not occurring in any Then l7 t p. formula of I? u {p). Assume that I? t Subf
8 $,
and also O, I- iSubfm.
The following important theorem follows immediately from the first form of the completeness theorem.
PROOF. Suppose the conclusion fails. Thus for every m E w there is a finite 9-structure of power > m in which p, fails to hold. Adjoin new individual constants c, for m E w. Let
Theorem 11.22 (Compactness theorem). If I? is a set of sentences such that every finite subset of I' has a model, then I? has a model. PROOF. By 11.19 it suffices to show that I? is consistent. Suppose not: say r t p, A ~ p , By . 10.33, A I- p, A i p , for some finite subset A of I?. By 11.20 (in fact, the easy part of 11.20 given in 11.8), A k p, A i p , . By hypothesis, A has a model U. Hence p, A ~ p holds , in U, which is impossible. 0 The compactness theorem lies at ;he start of model theory, and it will play a very important role in Part IV. For some motivation for the name
I? = {-I,}
u { i ( c i = c,): i, j~
w,
i # j}.
Then every finite subset of I? has a model, so I'has a model U. Thus U 1 9 is an infinite model of i p , , so the hypothesis of 11.25 fails. 17 We now turn to some basic results about first-order languages which we prove in a model-theoretic way. These results have to d o with introducing new symbols or eliminating symbols. First we prove a theorem which shows, roughly speaking, that any first-order language is equivalent to a language in which there are no operation symbols.
Part 2: Elements of Logic
Chapter 11: Some Basic Results of First-order Logic
Definition 11.26 ( i ) Let 9 = (L, v, 0, W ) be a first-order language. A relational version of 9 is a first-order language of the form 9' = ( L , v, 0', 9 ' ) such that 0' = 0, W G B', and such that there is a one-one function T (called a translation of 9into 9')mapping Drnn O onto Dmn 9%" Drnn 92 such that 9 ' T o = 8 0 1 for all 0 E Drnn O. T be as in ( i ) . With each formula p of 9 we associate (ii) Let 9,9', T-translate p' as follows. First we define p' for formulas p of the its 9', form a = v,, a a term:
-
+
( v j = 0,)' = v j = vi; for 0 an individual constant. (0= q)' = Tout If 0 is an operation symbol of rank m > 1 and p is OU,. .a,-, a,, . . ., a,-, be the first m variables not occurring in p, and set p'
=
3ao. .3am- ,[(ao= a,)' A . - - A (a, h Toao-- .a,- l ~ i ] .
= vi, let
,= a, - 1)'
Next we define p' for p of the form a = 7 , 7 not a variable. Let a be the first variable not occurring in p, and let
p'
=
3a((a = a)'
A
(7 = a)').
If p = Roo. - .a,-, with each oi a variable, let p' = p. If at least one at is not a variable, let a,, . . ., a,-, be the first m variables not occurring in p, and set
Finally we set ( i p ) ' = i p ' , ( p v = p' v $', ( p A 4)' = p' A $', and (Vap)' = Vap'. (iii) Let 9,9')T be as in ( i ) . For 0 E Drnn 9 , the existence condition for 0 is the following sentence of 2" (where 0 is m-ary): $)I
the uniqueness condition for 0 is the sentence
$'
9' = ( L , v, 0', 9',),' such that ( L , v, O', 9') is a relational version of 2, 9 1 (Rng L u Rng v u Dmn W ) = ', 1 (Rng L u Rng v u Dmn W ) , and there is a translation T of ( L , u, O , 9 ) into ( L , v, O f , 9 ' ) such that TO 9 - I 18* Dmn O is partial recursive.
it
f
0
:i,
The following proposition is easily (weak Church's thesis!) established.
i
I
Proposition 11.27. Let 9, 9, T be as in 11.26(v). For any m
'r; 1
fm
=
fm
=
+
0
p'
E w,
dejine
if m = y + pfor some p, E Fmlap, where p' is the 2') T-translate of p, otherwise.
Then f is a recursive function.
k'
;: 1
, $
In the next theorem we give the main properties of relational versions of languages.
Theorem 11.28. Let 2" be a relational version of 9 with translation, T , notation as in 1 1.26(i). ( i ) I f p is a formula of 9 in which no operation symbol occurs, then p' = p; (ii) Let U be an 9-structure and U' the relational version of 3, with notation as in 11.26(iv). Then U' is a model of the translation conditions. Furthermore, if p is any formula of 9, and x E " A , then U 1 pix] ifSU' 1 pl[x].For any formula p of 2" there is a formula p* of 9 such that for all x E W A ,U C p*[x] iff U' C p[x].I f % is an P-structure which is a model of the translation conditions, then '23 = U' for some 9-structure U. Then I' 1 p iff (4' : $ E I') u (iii) Let I' u {p} be a set of formulas of 9. {# : # is a translational condition} k p'.
PROOF. ( i ) and the first part of (ii) are obvious. We prove the second part of (ii) by induction on p, following 11.26(ii). If p is v, = v,, obviously U C ~ [ xiff] U' C pl[x].Suppose p is 0 = v,, where 0 is an individual constant. If U C p[x], then x, = Oa, and hence x, E T?; thus U' C pl[x].The converse is similar. Now suppose, inductively as in 11.26(ii), that p is Oa, . . .a,- = v,. Assume that U 1 p[x].Thus 0 % ~ . .az-,x ~ . = x,. Let y be like x except that Yao = oyx, . . ., yam- = a t - ,x. Thus by 1 1.3, U C a , = a o [ y ] ., . . , 2l 1 = a,-l[y]. SO, by the induction hypothesis, U' 1 (a, = a,)'[y], . . ., U' C (a,-, = a,-,)'[y]. It follows easily that U' C pl[x].The converse is similar. The remaining steps in this inductive proof are similar. Next, given a formula p of 2" we construct p* by replacing all atomic subformulas of p of the form Tea,. . .a, by Oao. . .a,- , = a,. The desired property of p* is easily established by induction on p. The final condition of (ii) is clear. To prove (iii), first assume r C v. Let 23 be any model (an 2"-structure) of (4' : 4 s I?} u ( 4 : 4 is a translation condition}. By (ii) we may write 8 = U' with U an 9-structure. Since U' k 4' for each 4 E J? it follows by
,
The set of translation conditions is the set of all existence and uniqueness conditions for all 0 E Drnn 0. (iv) If U is any 2'-structure, the relational version U' of 2 is obtained from U by replacing each operation of U by the associated relation. That is, if U = ( A , f , R), then U' = ( A , R'), where U' is the 2"-structure such that R c R', while if 0 E Drnn 0, with 0 m-ary, then
RrTO = {(x,, . . ., x,) :foxo. . .x, -
=
x,).
(v) If 9 = (L, v, O , 9 , g) is an dectivized first-order language, then an effectivized relational version of 9 is an effectivized first-order language
Chapter 11 : Some Basic Results of First-order Logic
Part 2: Elements of Logic
(ii) that U is a model of r. Hence U k p,, so by (ii),U' 1 p,' as desired. Second, assume {(I,' : (I, E r) U {(I, : (I, is a translation condition) 14'. Let U be a model of I?. By (ii), U' is a model of {(I,' : (I, E I') u {(I, : (I, is a translation condition}. 0 So U' U v', and by (ii) again, U k v, as desired. We now want to give the main facts concerning the role of definitions in first-order languages.
Definition 11.29. A theory is a pair (I?,9 )such that J? is a set of sentences of 9 and v E r whenever I7 1 p,, for each sentence p, in 9.We call r itself a theory when 9 is implicitly understood, or we say that I? is a theory over or in 9.If U is an 9-structure, the 9-theory of U is the pair (I?,9 ) , where I? = {p, E Sentp : U U v } ;clearly (I?, 9 ) is a theory. A theory (I", 9') is an extension of a theory (I?, 9)provided that 9' is an expansion of 9 and I? c F'. We say that (I",9 ' ) is a conservative extension of (I?, 9) provided that, in addition, r = I?' n Sentp. If I? is a theory in 9,a set A E Sent9 is a set of axioms for F provided that r = {p, E Sent9 : A k p,}. Now let 9' be an expansion of 9 and let r and I" be theories over 9 and 9 'respectively. ( i ) If R is a relation symbol of Y but not of 9,then apossible definition of R over r is any formula p, of 9 with free variables among {v,, . . ., urn-,), where m is the rank of R . (ii) If 0 is an operation symbol of 9' but not of 9, then apossible definition of 0 over I? is a formula p, of 9 with free variables among {v,, . . ., v,), where m is the rank of 0, such that the following existence and uniqueness conditions are in I?: vV0.. .V V ,- 1 3 ~ , v ; V V O . . . V U ~ + I [..,urn) ~ ~ O ,A. d u o , . - ., Vm-~,Vm+l)+Um=
Vrn+ll.
(iii) We say that (I",9') is a definitional extension of (I?,9 ) provided that for every nonlogical constant C of 9' but not of 9 there is a possible definition p,, of C over r such that
I?'
=
u {& : C a nonlogical constant of 9' but not of 9 ) k v ) ,
{p, : p, E Sent9, and F
where p,; is the sentence
definitional extension of (r,9 ) if (I", 9 ' ) is a definitional expansion of (I?, 9 ) for which there is a function p, as in (iii) such that g + 0 p, 0 8 I - l 1 {9'C : C is a nonlogical constant of 9' but not of 9 ) is partial recursive. There are two central results concerning definitions. The first is that defined symbols can always be eliminated in favor of old symbols:
Theorem 11.30. Let (I?', 9 ' ) be a definitional extension of (I?,9 ) , with notation as in 11.29. Then for any formula # of 9' there is a formula #' of 9 with the same free variables as # such that F' k # t* 4'.I f I" is an effective definitional extension of I?, then such a formula #' can be effectively obtained from (I,.
PROOF.We construct (I,' by induction on (I,. In each step the desired properties of (I,' are easy to prove, and we prove the desired result in only one step as an illustration. To begin with, we construct #' for (I, of the form a = vi by induction on a. If o is a variable, we set #' = #. Now suppose inductively that a is 07,. . .rn-,. Let a,, . . ., a n - , be the first m variables not occurring in (I,. If 0 is a symbol of 9,then we let (I,' be the formula
If 0 is a symbol of 9' but not of 9,we let (I,' be the formula
In this case we check explicitly that I" I= (I,t,#'. Let U be any model of I". First suppose that U k +[XI with x E W A . Thus oUx = xi, so O U ( r f x , .. ., 7:- 1 ~=) xi. Hence U I= (Ov, . .v, - ,= v,)[r$x, . . . , 7:- ,x, x i ] Since r ' k pb, it follows that U I= p,,[~Yx,. . ., T?-,X, x i ] Now let y be like x except that ya, = T ~ for X each j < n. Clearly then U k p,,(a,, . . ., an-,, vi)[y]and U k (7, = a j ) [ y ]for each j < n. By the induction assumption, U k ( r j= aj)'[y] for each j < n. Thus U U #'[XI. The converse is similar. Now we continue the inductive definition of 4';it is complete for (I, of the form u = vi. If (I, is a = T , where T is not a variable, let a be the first variable not occurring in (I,, and set #' = 3a((a = a)' A (7 = a)'). Next, suppose # is Roo. - .on - ,. Let a,, . . ., an- be the first n variables not occurring in #. If R is a symbol of 9, set
if C is a relation symbol of rank m, while p,; is
if C is an operation symbol of rank m. (iv) If 9 = (L, v, 0,W , 8 ) and 9' = (L', v', 0', a',B') are effectivized first-order languages, the above notation applies to them also. We assume is an effective expansion of 9. We say that (I",9'is ) an effective that 9'
If R is a symbol of 9' but not of 9,set
Chapter 11: Some Basic Results of First-order Logic
Part 2: Elements of Logic (# A x)' = #' A and Finally, let ( -r#)' = l# (# v x)' ' = , f v (VVi#)' = VVi*'. The final assertion of the theorem concerning effectiveness is clear from 0 the above. XI,
The second important fact concerning definitions is that nothing new can be proved:
Theorem 11.31. Let (F', 9 ' ) be a definitional expansion of ( r , 9 ) . Then (I", 9 ' ) is a conservative extension of (I?, 9 ) . PROOF. Again we take all notation as in 11.29. Suppose # is a formula of 9 and F' 1 #; we must show that r k #. Let 2l be any model of r (2l is an 9-structure). For C a nonlogical constant of 9 , let CU' = Ca. Let R be a relation symbol of 9' but not of 9 , say R is m-ary. We define RU' = "p;. Now suppose that 0 is an operation symbol of 9' but not of 9 ; say 0 is m-ary. Since p, is a possible definition of 0 over I' and U is a model of ,'I we may define Ow as follows. For any x0, . . . , xm- E A, let Ow(xo, . . ., xm-,) be the unique y E A such that U I=pa[xo, . . ., xm-,, y]. This defines the 9'structure 3'.Clearly 2l' is a model of ,'?I so U' is a model of #. Hence U is 0 also a model of #, since # is a formula of 9 . Thus I' 1 #, as desired. Closely related to this fact about definitions is the following result.
Theorem 11.32. Let I? be a theory in a language 9 , and p a formula of 9 with free variables among v,, . . . , urn.Assume that F b Vu, . . .Vvm-,3v,p. Let 9' be an expansion of 9 by adding a new m-ary operation symbol 0 . Let F' be a theory in 9' with axioms r together with the sentence Vv, . . Vvm-lp(vO, . . ., urn- ,, OU, . .urn-,). Then I" is a conservative extension of I'.
Definition 11.33. For any formula p, let Fv p be the set of all variables occurring freely in p. For any first-order language 9 , aprimitive Skolem expansion of 9 is an expansion 9' of 9 such that there is a function S mapping {3vip : p E Fmla2} one-one onto the set of all nonlogical constants of 9' which are not constants of 9 , such that for each p E Fmla2 and each variable a, S,,, is an operation symbol of rank IFv 3apl. In case 9 and 9' are effectivized with Godel numbering functions 9,9',we call 9' an effective primitive Skolem expansion provided that 2' is an effective expansion of 9 and the function
is partial recursive. Given first-order languages 9 = (L, v, 0 , B), and 9' = (L, U,0', B), we say that 9' is a Skolem expansion of 9 provided there is a sequence (9,: i E w ) of first-order languages Yi = (L, v, Ui, B ) such that go= 9, for each i E w %+,is a primitive Skolem expansion 0 f 9 ~ with associated function S i , and 0' = Ui,, 0,. If all of these languages are effectivized, 9' is an effective Skolem expansion of 9 provided that each gi+, is an effective primitive Skolem expansion of g, and 9'is an effective expansion of each L&. Assuming that 9' is a Skolem expansion of 9 , with notation as above, the Skolem set of 9' over 2 is the set of all sentences [[3uidv0, . - ., ui) + v ( ~ o.,. -
vi - 1,
u)II
where a = S$Vi,aO.. .am-,, m = IFv 3vipl, FV3vip = {ao,. . ., a,-l} with v - b o < . . . < la,-^, and j is minimal such that 3vip is a formula of pj. (Recall that [[XI]denotes the universal closure of x; see 10.94.)
+
PROOF. Assume that I" k #, where # is a formula of 9 . To prove k #, let 2l be any model of I'. By the axiom of choice, there is an m-ary function g on A such that for all x,, . . ., xm-, E A, U k p[xo, . . ., X, - ,, g(xo, . . ., x,-~)]. Let U' be the expansion of U to an 9'-structure in which 0 is interpreted as g. Then 2l' is a model of I",so U' is a model of #. Since # is a formula of 9 , 0 U is a model of #. Theorem 11.32 justifies the common intuitive practice in mathematics of introducing notation for objects proved to exist. For example, after proving that an algebraic equation of a specified type has a solution, one introduces a name c for such a solution. By 11.32, nothing new not involving c can be proved after this that was not provable before. The procedure can be used even if one cannot pick out a unique such c. We now want to generalize the process described in Theorem 11.32. The construction we give is essential for our present purpose of proving the Skolem normal form theorem and Herbrand's theorem, and also plays an important role in model theory.
The following two propositions are obvious.
Proposition 11.34. any first-order language has a Skolem expansion. Proposition 11.35. If 9' is a Skolem expansion of 9, then IFmla21 I Fmlap 1.
=
The following lemma is fundamental for our main results.
Lemma 11.36. If 9' is a Skolem expansion of 9 , then any 9-structure can be expanded to a model of the Skolem set of 9' over 9 . PROOF. From the definition of Skolem expansions, we see that it is enough to prove the following statement:
' ' be a primitive Skolem expansion of 9, and U an Statement. Let 2 2-structure. Then 21 can be expanded to an 9'-structure which is a model of all sentences [[3v,p(vo,. . ., v,) + p(vo, . . ., v,- ,, a)]], where p is a formula 71 1
Chapter 11 : Some Basic Results of First-order Logic
Part 2: Elements of Logic
of 9 , a = S3uiVIOa0. . .am-l, m v-'ao < - - . < ~ - ' a , - ~ .
=
IFv 3qp,l, and Fv 3viV
= { a o , . . .,
bs-+ p,;
a,-,) with
(ii) if9L is a model of the Skolem set of 9' over 9, then 3 I=p, -+ p,S; (iii) ifr is a theory in 9 and r' = {@ : p, E r)-ThmP, then the following conditions hold: ( a ) if% is a model of P and U' is an expansion of U to a model of the Skolem set of 9' over 9 , then U' is a model of r'; (b) if%' is a model of I", then U' 1 9 is a model of r; (c) (I", 9 ' ) is a conservative extension of (I?, 9 ) ; (iv) p, has a model iff r,oS has a model.
To prove this statement, let C be a choice function for nonempty subsets of A. Let # = 3vip, be a formula of 9 , with Fv 3vip, = {ujo,. . ., v ~ ( , - ~ )where ), jO < . . . < j(m - 1). We define an m-ary operation t, on A as follows. For any x,, . . ., x , -,E A, set t,(xo, . . ., x,-I)
=
t,(xo, . . ., x,-,)
=
C{a : there is a y E p,% such that y, and y,, = x , for each k < m ) , CA if the above set is empty.
=
a
PROOF. Clearly cpS is universal and Fv p, = Fv @. Condition ( i ) is easily proved by induction on p,, as is (ii).To prove (iii)(a),assume its hypothesis and let p, E I?. Then U 1 p, by hypothesis, so by (ii), U' t @. Thus U' is a model of r', as desired. Condition (iii)(b)follows from (i). To prove (iii)(c),assume first that r 1 p,, p, a sentence of 9 . If U' is any model of I", then by (iii)(b), U' 1 9 is a model of r and so U' 1 9 I= p, and U' t p. Thus F' t p,. Now assume that I?' k p,. Let U be any model of r. By Lemma 11.36, let U' be an expansion of U to a model of the Skolem set of 9' over 9 . Then by (iii)(a), U' is a model of I", so U' t p, by assumption. Thus U t p,. Hence r t p,, as desired. Condition (iu) is immediate from 11.36, (iii)(a),and (iii)(b) (with I? axiomatized by {p,)). 0
Let U' be the expansion of U to an 9'-structure in which each symbol S, is interpreted as t,. To show that U' is as desired, consider any formula # = 3vip, of 9 with notation as above. Suppose x E "A and U' t 3qp,[x]. Then U t 3vip,[x]since 3u,p, is a formula of 2. Thus there is an a E A such that U t p,[x',]. Hence the first clause in the definition of t,(xjO,. . ., x ~ ( , - ~ ) ) gives an element b E A such that U t p,[xL]. Let a be the term S 3 v i c ~ j O - - . u,,,-,,. Recall that the formula p,(vo,. . ., U , - ~ Uhas ) the form Subf;'p,', where p,' is obtained from p, by replacing bound variables suitably. Clearly U t p1[x;], where b = t,(x,,,. . ., x,,,-,,). Hence we easily infer that U C Subfgp,'[x].Thus U' is a model of [[3vip,(vo,.. ., ui) + y(uo, . . ., v , - ~ ,u)]], as desired. 0
The starting point of our considerations concerning Herbrand's theorem is 11.38(io). From it one can easily obtain an equivalent condition for a prenex sentence p, to be universally valid. Indeed, this is true iff i p , has no model, and the sentence i p , is equivalent in a natural way to a prenex sentence #. Thus tp, iff # has no model iff t,hS has no model (by 11.38(iv)) iff C T # ~The . sentence - 1 4 ~is equivalent to a certain prenex sentence with only existential quantifiers. We define it explicitly as follows.
The functions introduced in the expansion of U to U' in the proof of 11.36 are called Skolem functions. The entire method associated with Skolem expansions is sometimes called the method of Skolem functions. One of the main properties of Skolem expansions is that every formula becomes equivalent, in a certain sense, to a prenex formula having only universal quantifiers :
Definition 11.39. A formula p, is existential if it is in prenex normal form with only existential quantifiers. Let 9' be a Skolem expansion of 9, with notation as in 11.33. With each prenex formula p, of 9' we associate the prenex formula p," obtained from p, by interchanging 3 and V and replacing the matrix # of p, by -I#. Now with each prenex formula p, of 9' we associate a formula p H :
Definition 11.37. A formula is universal if it is in prenex normal form with only universal quantifiers. Let 9' be a Skolem expansion of 9 , with notation as in 11.33. With each prenex formula p, of 9' we associate a formula qS:
vS = p, if p, is quantifier free; ( V a y y = ValpS; ( 3 ~ i ~ )=' vS(vo,. . ., V i - l r a),
-
where a = S$ui,/30. .&-l, FV3v19 = {Po,. . ., Prn-,) with v-lPo < . . < v - ~ ~ , - , ,and j is chosen minimal so that 3v1p,is a formula of 9,.
i 211
Theorem 11.38 (Skolem normal form theorem). Let 9' be a Skolem expansion of 9.For every prenex formula p, of 9 , the formula yS is universal and the same variables occur free i: y as do in qP. Furthermore, for any prenex formula p, of 9' we have: 3 13
i
where a = S1,Po.. .P,-l, # = 3vip,", Fv # = {Po,. . .,rBm-l} with v-lrBO < - .. < v-lP,-,, and j is chosen minimal so ihat # is a formula of g..
Theorem 11.40. Let 9' be a Skolem expansion of 9,and let p, be a prenex formula of Y. Then: ( i ) p,H is an existential formula;
Part 2: Elements of Logic
Chapter 11: Some Basic Results of First-order Logic with 4 quantifier-jree. Then kp zflsome disjunction of instances Subf:;. - Subf :$I:;+ of $I is a tautology, where a,, . . ., a,-, are variable-free terms.
(ii) kpH o lpns; (iii) ifp is a sentence, then tcp iff CpH. PROOF. (i) is obvious from the definitions. To prove (ii), first note that t- ~ go, vn. Next we prove (ii) by induction on the length of p; it is clear if cp is quantifier free. Now ( 3 ~ z p = ) ~3acpH, and we assume inductively that kpHo i p n S . Thus C(3ap)He,3a -I f S . Also C3a i pnSt, -MapnS, and (VCZP;")~ = VaVnS.Since (3ap)n = Vapn, it follows that C(3a1p)~ o l(3ap)ns, ) ~ . ., v,-,, a), with notation as in as desired. Next, let ( V U ~=~pH(vo,. 11.39. By the induction hypothesis, CcpH o i p n S , SO CpH(vo,. . ., vi-,, a) o - I ~ ~ ~. (. .V , vi, , a). Recalling 11.37, we see that qPS(v0,. . ., vi- ,, a) = ( 3 ~ ~ ~Note " ) ~that . (Vuip))"= 3uipn. Thus t-(V~~cp)~ t* 1(VulpyS, as desired. Finally, we prove (iii) :
,,
Cp
iff iff iff iff
-up does not have a model pn does not have a model pnSdoes not have a model (by 11.38(iv)) C -pnS iff CpH(by (ii)).
where a,, . . ., a,-, are variable-free terms of 9'.We claim that I' is inconsistent. For, if it is consistent, then it has a model U. Let B be the set of all elements ,aU of A (see 11.4), where a is a variable-free term. If R is a relation symbol of rank n, denoted by RU in U, let R~
=
{(x,, . . ., x,-
: x,,
. . .,x,-
OsOab. . - 'a?-
0
PROOF. Assume that p is not a tautology; let f be a truth valuation (10.19) such thatfp = 0. Let A = Trm9. For any relation symbol R, say R of rank m, let RU = {(T,,. . ., T , - ~ ) :~ R T ~ . - - T , - ~11.. = Also, for any operation symbol 0 , say of rank m, let
With these denotations for operation symbols and relation symbols we obtain an 2-structure U. Note that aUx = a for every term a where xi = (q) for each i E w . Hence by induction on 4 we easily obtain: for any quantifier-free formula 4 not involving equality, U C $[XI ifff* = 1. 0, it follows that ZI # ~ [ x ]so , #p, as desired.
::", :;II,
E
B and (x,, . . .,x,- ,)
E RU).
,
Theorem 11.41. If p is a quantijier-free formula not involving equality and Cp, then p is a tautology.
=
i S u b f $. . .Subf
If 0 is an operation symbol of rank n, denoted by 0% in 3,let for variable free terms a,, . . ., a,-
Herbrand's theorem in a sense reduces provability to checking tautologies. The following result, interesting in itself, is one of the main lemmas for the theorem.
Since f p
PROOF. =>. Assume Cp. Thus by 11.40, kcpH. Now let I' be the set of all sentences
=
'(Oa,.
. .a, - ,)a.
This definition is easily justified. Thus we obtain a structure 23. Since each member of r is quantifier-free, 23 is a model of r. Since kcpH, choose x,, . . ., x,-, E B SO that 23 C #[x,,. . ., x,-,I. Say xi = 'a? for each i < m. Thus Subf J;. - .Subf J\",t;+ holds in 23, which is a contradiction since 23 is a model of I'. Thus r is inconsistent. Hence by 10.92, some disjunction of negations of members of I' is valid, so by 11.41 it is a tautology, as desired. e.Obvious. 0 We give one simple application of Herbrand's theorem: Consider the formula 4 = 3aV/3p +V/33ap, where a and are distinct variables and p is any formula (possibly involving equality). We want to prove that h,b by using Herbrand's theorem. It is of course easy to prove k# by a direct semantic argument, but as we shall see, an application of Herbrand's theorem is more routine. Let 9 be our original language. Choose n > 0 so that Fv p E {v,, . . ., un-,). Expand the language to 2' by adding a new n-ary relation symbol R. Now let p' = Rv,. . -v,-,, 4' = 3aV/3p1+V/33ap1. We first show that 14'. Let y and 6 be new variables. Then a prenex formula equivalent to 4' is
x = VyV/3363a(~ S u b f Subf $$p'
v p'),
0
Now we can give our version of Herbrand's theorem. Several versions of this theorem can be found in the literature. It has found considerable use, especially in finitary proofs of the consistency of theories. Theorem 11.42 (Herbrand). Let 9' be a Skolem expansion of p(%: and let p be a prenex sentence of 2" not involving equality. Say pH = 301,. . .3a, - ,t,h
and
XH
has the form 363a( ~ S u b f :Subf &' v Subf ip'),
of where c and d are new individual constants, in a Skolem expansion 9" 9'An . instance of the matrix of this prenex formula is the tautology ~ S u bPf u b f ip' v Subf Subf ip'.
Part 2: Elements of Logic
Thus k#' by Herbrand's theorem. Now let I? be the theory consisting of all consequences of the sentence
I
+
+
The fundamental model-theoretic relationships concerning interpretations are expressed in the following proposition, which is easily proved by induction on the formula p,. Proposition 11.45. Let U = (x,f, R, I") be a syntactical 9-structure in 9 ' , and let B .be a model of .'?I Then for any formula p, of 9 and any x E OBr'% we have Br'% t= p[x] iff23 i=p,a[x]. Corollary 11.46. Let F be a theory in 2 , and let U = (x,f, R, 1'') be an interpretation of F in 9 ' . Then for any formula p, of 9 , the condition P C p, implies that I?' k p,%. I
i
1
1
If F is a theory in 9 , we say that U is an interpretation of I? in r' provided that r' t= p,% for each p, E I?. With each model B of I?' we associate an 9-structure Br'% = B(Ff, U) as follows: Bra = lX3; for 0 an operation symbol of 9 , say m-ary, and for any b,, . . ., b,-, E By%, let OQ(r',a)(bo,. . ., b, - ,) = fZ(b,, . . ., b,-,) ((ii) assures that Br'% is closed under 0%('.%)); for R a relation symbol of 2 , say R m-ary, let Rs(ygU) = "'RE n lx2. In case, to start with, 9 and 9' are effectivized first-order languages with corresponding Godel numbering functions 9 and g', a syntactical 9-structure U in 9 ' , with notation as above, is effective provided that the functions g ' o f o g - l rg*DmnCo and g'+ o R o 9 - l r g * D r n n B are partial recursive (no further restrictions on I").
We give a few simple facts about these notions. First, concerning effective interpretations, the following proposition is clear. Proposition 11.44. Let U be an effective syntactical 9-structure in 9 ' . Then the formation of UU and p,a is effective. That is, 8'+0 f 0 8+ 19 * Trm2 andg' 0 f 0 9 + 19+ * Fmla2 are partial recursive, wheref is the function assigning 0%to a and p,% to p,.
is a definitional expansion of ({p, E Sent2 : by), 2 ) . Clearly (I?, 9') It is also easy to see that 1' C 4- 4'. Hence 1' t= 4 since we know that k+'. By Theorem 11.31, ( r , 9 ' ) is a conservative extension of ({p, E Sent2 : t=p,), Y ) , so h/~,as desired. The final topic of this chapter is the notion of an interpretation of one theory in another. This can be viewed as a syntactical counterpart of the notion of a model. All of the definitions relevant to this new notion are given in the following Definition 11.43. Let 9 = (L, v, 0,W) and 9' = (L', v', LO,' W') be two first-order languages. A syntactical 9-structure in 9' is a quadruple U = (x, f, R,I?') such that x is a formula of 9' with Fv x G {v,), f : Dmn LO + Dmn LO' and U'fO = LOO for each 0 E Dmn LO, R : Dmn B -+ Fmla2, and Fv RR E {v,, . . ., urn-,), with m = B R , for each R E Dmn 9, while 1'' is a set of sentences of 9 'satisfying the following conditions: (i) F' t= 3u0x; (ii) F' t= Vv, . . - Vv, - ,(Ai,, x(vi) += x(fovo - - .v, - ,)) for each operation symbol 0 of 2 (say of rank m). Given a syntactical 9-structure U with the notation above, with each term o and formula p, of 9 we associate a term 0%and formula p,' of 2' as follows (this is the syntactical counterpart of Definitions 11.2 and 11.5) :
Chapter 11: Some Basic Results of First-order Logic
PROOF. Assume that F k p,, and let B be any model of r' (thus '23 is an 9'-structure). Since I" C 4% for each 4 E r , it follows that 8 t= 4%for each 4 E I?, and hence by 11.45 Bra is a model of F. Thus Br'% t= p, by assumption, so by 11.45 again, B k p,%. Thus I?' C p,%, as desired. 17 BIBLIOGRAPHY 1. Chang, C. C., Keisler, H. J. Model Theory. Amsterdam: North-Holland Publ. Co. (1974). 2. Shoenfield, J. Mathematical Logic. Reading: Addison-Wesley (1967). 3. Tarski, A., Mostowski, A., Robinson, R. M. Undecidable Theories. Amsterdam: North-Holland Publ. Co. (1953). EXERCISES
I
11.47. Show that the restriction that a not occur in a or in 7 is essential in Lemma
10.39. 11.48. Show that the restrictions in 10.49, that only free occurrences of a are 11.49. 11.50. 11.51. 11.52. 11.53.
replaced and that the new occurrences of 7 are free, are essential. Show that in 10.59 it is essential that j3 not occur in p,. Show that the restriction of 10.61 is essential. Show that in 10.71 the string of quantifiersVor,. . .Vor,-l cannot be deleted. Show that Ifv, = vl -+ vo = v2 (cf. the remarks after 10.86). Carry out a modification of the proof of 11.12 in which B is the set of all individual constants of 3
Part 2: Elements of Logic
11.54. Show that any consistent set of formulas in a language 9 can be extended
Cylindric Algebras
to a maximal consistent set of formulas of 3 11.55. Let K be the class of all groups in which every element is of finite order, and let 9 be an appropriate first-order language. Show that there is no set I' of sentences of 9 such that K = {U : U is a model of I'). 11.56. Let K be the class of all fields of prime characteristic, and let 9 be an
appropriate first-order language. Show that there is no set of 9 such that K = {U : U is a model of I?).
12*
r of sentences
11.57. If a sentence g, holds in all non-Archimedean ordered fields, then g, holds
in all ordered fields. 11.58. Let I? be a theory in a language d%: Suppose that for every finite subset A of I? there is a model of A which is not a model of I?. Then there is no finite set 9 of sentences which has exactly the same models as I?. 11.59. Let K be a nonempty set of 9-structures. For each L K let CL = {U E K :2l is a model of every sentence which holds in all members of L). Show that with respect to C as a closure operator, K is a compact topo-
logical space. Cylindric algebras stand in the same relationship to first-order logic as Boolean algebras stand to sentential logic. We present in this chapter an introduction to the theory of these algebras paralleling our treatment of Boolean algebras. Again, the simplest motivation for the study of these algebras is from elementary set theory:
11.60. Establish using Herbrand's theorem that any formula of the last type in
10.101 is universally valid.
Definition 12.1. Let U be a nonempty set and a an ordinal. For each K < cr we define a one place operation C, on subsets of "U by setting, for any x G "U,
C,X={x~~U:x~cr~{~}=y~cr~{~)forsomey~ For
K,
X < a we set
DKh= { X E aU : X,
=
x,).
Thus C,X is the generalized cylinder obtained by moving X parallel to the K-axisin a-space, while D,, is a diagonal hyperplane. An a-dimensional cylindric$eld of sets is a set at' of subsets of "U (for some U) which is a field of sets in the Boolean sense and which is closed under all operations C, and contains all sets D,, as elements. A cylindric set algebra of dimension a is a structure (d,u,n, N , 0,"U, C,, DKh)K,h,,A 0 the following pairs of formulas are equivalent : I
I Note that the third kind of basic formulas involves quantifiers. As indicated in the introduction to this section, this is typical of the elimination of quantifiers method when it is applied to theories of any complexity at all. Lemma 13.8. For any formula p, one can eflectivelyjnd a formula # equivalent to p, such that # is a quantzjier-free combination of basic formulas under and Fv# G Fvp,.
PROOF. The assertion is obvious for atomic formulas, and the induction steps involving 1,v , A are trivial. As in the proof of 13.4 it is hence sufficient to prove the lemma for p, of the form 3 4 , $ a conjunction of basic formulas and their negations. Now the following formulas hold in U:
$ \
=T
1. Thus (1)
w h e r e O ~ i s j I k I l > O , p >l , q o,..., ql-I > 1 , a n d t 0,..., (,-,do not involve a. This in turn is clearly equivalent to
In case i > 0, (2) is equivalent to
Thus we may assume that i Therefore we may actually assume that $ is a conjunction of basic formulas. As in the proof of 13.4, we may assume that each conjunct actually involves a. Now if a is a term involving a, then there is a term T not involving a and an m E Z such that
=
and po PT; and pa < pr; and pa r,,pT. It follows that in (1) we may assume that no = becomes of the form a
CT
=
0; so (2) is equivalent to a formula of the form
where 0 I s I t < u, r,, . . ., ru-, > 1, and rlo,. . ., qu-l do not involve a. Next, we claim that we may assume that u = t 1. This clearly follows from the following number-theoretic fact:
+
Let a, b, m, n be integers with m, n > 1. Letp = lcm (myn); then gcd (plm, pln) = 1, so there exist integers c, d such that c(p/m) d(p/n) = 1. It follows that for any integer y the following two conditions are equivalent : (i) y = a (mod m) and y = b (mod n); (ii) a = b (mod gcd (m, n)) and y = c(p/m)a d(p/n)b (mod p).
+
holds in U. It follows that formulas of the forms (4)
+
are respectively equivalent to formulas of the forms na = p na < p p na -,
or p < nff
To prove (4), assume its hypothesis. Suppose (i) holds. Then y - a = em and y - b = fn for some e, f, so a - b = fn - em, which is divisible by gcd (m,, n). Thus a = b (mod gcd (m, n)). Also,
where n 2 0 and p does not involve a ; and we may clearly assume n > 0. Hence we may assume that p, is equivalent to a formula of the form Thus (ii) holds. Conversely, suppose that- (ii) holds. Write a - b v gcd (m, n). Then y
-a
=y
- c(p/m)a
=Y
- 4plm)a
= 0 (mod m)
- d(p/n)a - d(pln)b - d(pln) v gcd (myn)
=
Part 3 : Decidable and Undecidable Theories
-
-
since y - c(p/m)a - d(p/n)b 0 (mod p) and d(p/n)gcd (m, n) 0 (mod m). Similarly, y = b (mod n). Hence (4) has been checked, and hence in (3) we may assume that u = t 1. If s = 0 or t = s, it is clear that (3) is equivalent to 0 = 0. So, assume that 0 < s < t. Then (3) is equivalent to the following formula:
+
Chapter 13 : Some Decidable Theories
PROOF. The atomic case is trivial, and the induction steps using 1 , v , A are trivial. As in previous proofs it now suffices to assume that p, has the form 3 4 , a quantifier-free combination of basic formulas. Since the formulas em are sentences, and since a = a is equivalent to el, we may assume that p, has the form where Po, . . .,pn-, are distinct variables # a . If m > 0, p, is clearly equivalent to
Theorem 13.9. F2 is decidable. PROOF. By the method of proof of 13.5 we see that it suffices to describe a method for determining the truth in U of basic sentences. The basic sentences are easily seen to be effectively equivalent to sentences of the forms
(or to if m = 1 and n (i : m I i < n). We claim
=
m). Hence assume that m
=
0. Let I
=
To prove (I), first let A be any set and let x E OA. Suppose x satisfies p, in U, J c I, and x satisfies Ai,j,J,i+ i (pi pj) in A. Say pi = vk, for all i E I, and a = v,. Thus xk, # xk, whenever i, j E J and i # j. Since x satisfies p, in U, choose a E A so that xf,satisfies A,,, 1(a pi). Thus a # xk, for each i ~ I , i n p a r t i c u l a r f o r e a c h i ~ J , /sAo / 2 IJI l . T h ~ s e ~ holdsinA. ,~+~ Conversely, suppose x satisfies the right side of (1) in A . Define i E j iff i, j E I and xk, = xk,. Clearly = is an equivalence relation on I. Let J be a subset of Iwhich has exactly one element in common with each = equivalence class. If i, j~J and i # j, then xk, # xkj. Thus x satisfies / \ i , j , J , i + j i (Pi pj) in A . Since x satisfies the right side of (1) in A, it follows that E I J I + ~holds in A, i.e., A has at least I JI 1 elements. Hence we may choose
=
which are true in 21 iff, respectively, m = n, m < n, or m = , p . Obviously there is a decision method for determining these latter three questions.
Theorem 13.10. The theory of ( E , +) is decidable.
The Pure Theory of Equality Our language here has no nonlogical constants. F3 consists of all sentences p, such that tp,. Thus in this case, unlike the preceding two cases, the theory we investigate is not complete. For example, VvoVvl(v,= 0,) holds in oneelement structures but not in any others. The general procedure is still the same, however. First we distinguish some basic formulas, which again are not special atomic formulas but some of which are rather complicated sentences. We let
and, for m > 1,
= +
=
+
( a = pi), so x satisfies p,. Thus (1) holds, and Clearly then xf, satisfies Ai,, i this completes the proof of 13.11. 0
Theorem 13.12. I?, is decidable.
-
PROOF. The only basic sentences are em, m E w 1. Clearly el E I', while em $ F3 if m # 1. Let A be the set of all sentential combinations of basic sentences. Note: m I IAl iff em holds in the set A. For any p, E A let m , be the maximum m such that em is a part of p,. Using (1) it is easy to check that (1)
By a basic formula we mean a formula vi = v j or a formula E,. Note that the 2'-structures here are just sets. The basic lemma, as usual in this chapter, is:
Lemma 13.11. For anyformula p, one can eflectivelyfindaformula 4 equivalent under r3to g, such that $ is a quantifier-free combination of basic formulas and Fv$ G F v p
(2)
if p, E A and m , I IAl, IBI, then p, holdsin A iff p, holds in B.
Now by (2) we have (3)
if p, E A, then p, holds in every A with m , 5 ] A [iff p, holds in the set m,.
Chapter 13: Some Decidable Theories
Part 3 : Decidable and Undecidable Theories EXERCISES
Thus (4)
if p E A, then kp iff p holds in the set n for every nonzero n I m,.
Condition (4) clearly provides an effective procedure for determining whether p E F3 for p E A. Namely, for each n I m,, n # 0 one checks whether p, holds in n, this being essentially just a matter of checking tautologies by virtue of (1). 0
Corollary 13.13. If A is any nonempty set, then a subset B of A is elementarily definable i ' B = 0 or B = A. As a further consequence of our decision method for I?, we can find all complete extensions of ;,'I i.e., all theories A 2 r, which are complete. For 1 let I?," be the set of all sentences p such that each m E w
and let F," be the set of all sentences p, such that
Theorem 13.14 (i) The theories r,"and I?," are each complete, consistent, and decidable. (ii) The theories r," and I'," constitute all the complete and consistent extensions of r,.
PROOF (i) By (1) in the proof of 13.12, ern A -ern+, holds in a set A iff it holds in the set m. Hence I'b = {p, : p, holds in m), so Q' is complete and consistent. Similarly, r," = {p, : p holds in w), so I?," is complete and consistent. Obviously then each theory I',"is decidable. l?," is easily seen t o be decidable using (I) in the proof of 13.12, and 13.11. (ii) Obviously r, is a subset of r," and of each set rb. Now suppose that A is any complete and consistent extension of I',. By the completeness theorem, let A be a model for A. If IAl = m < w, clearly then rb = A. If [ A ] 2 w , by (2) in the proof of 13.12 we easily see that I?," E A, so I?," = A. 0 BIBLIOGRAPHY 1. Ershov, Yu., Lavrov, I., Taimanov, A., Taitslin, M. Elementary theories. Russian Mathematical Surveys, 20 (1965), 35-105. 2. Rabin, M. Decidability of second-ordz theories and automata on infinite trees. Trans. Amer. Math. Soc., 141 (1969), 1-35. 3. Tarski, A., Mostowski, A., Robinson, R. M. Undecidable Theories. Amsterdam:
North-Holland (1953).
13.15. Determine all elementarily definable subsets of Z with respect to the
structure (Z,
+,
n, for a certain n. Now assume ~n < m. Now Q k A m = m + n = A(m - I), and n < rn - 1 implies Q k i ( n = A ( m - I)) by the induction hypothesis, so Q k - ( A m = m).
+
= v,)
Now
=
Proposition 14.18 ( i ) Q is finitely ax-iomatizable. (ii) P is rrcursively axiomatizable. (iii) Q , P, and N are w-consistent.
QG P
i ( v , = 0 ) + 3v,(sv2
Hence 14.17(i)(b)yields Q t v, 5 0 + v, that
x; also recall the
E
A
so, making use of l4.l7(i)(e),
(ii) The theory P in 04",,, of Peano arithnwtic is the collection of all sentences g, such that 1 t g,, where A consists of the sentences (a), (b), (d)-(g) above and also, for each formula $, the following sentence:
Theorem 14.19. R
+ v, = 0
+
+
+ m = v, + A(am) for every m E w . In fact, Q k sv, + 0 = sv,, Q != sv, = s(v, + O ) , and Q != s(vo + 0 ) = v, + SO using l4.l7(i)(d) and l4.l7(i)(e). Thus Q k sv, + 0 = v, + 1. Assume that Q b sv, + m = v, + A(dm). Then Q k sv, + A(m + 1) = s(sv, + m ) by 14.17(i)(e), Q 1 s(sv, + m ) = s(v, + A(am)) by our assumption, and Q k s(vo + A(am)) = v, + A(dom) by 14.17(i)(e). Thus Q 1 SV, + A(m + 1) = V , + A(m + 2), and (3) has been established by induction. Now
(3)
Q 1 sv,
+
and hence Q =! n 5 v, += n = u, v A(n + 1) 5 v,. We easily infer from this, the inductive hypothesis and (2) that Q I.v, 5 - A ( n + 1) v A(n 1) 5 vo.
+
Corollary 14.20. The following conditions are equivalent:
( i ) f is recursive; (ii) f is syntactically dejinable in R, Q, or P.
Chapter 14: Implicit Definability in Number Theories
Part 3: Decidable and Undecidable Theories
Rig has a smallest and a largest element and under which each element of Ria different from the greatest element has an imntediate successor; (iii) for any x E Ri3, i j { y : ( y , x ) E RE2[)isfinite, then l{y : ( y , x ) E R1g}l = f l { y : ( Y , x) E Ria)/.
Corollary 14.21. The following conditions are equivalent:
( i ) R is r.e.; (ii) R is weakly syntactically definable in R, Q, or P. Now we turn to our second notion of implicit definability in number theory.
different from RA, R i , R i , R;, PROOF. We first divide the symbols of pun and R: into two disjoint classes, consisting of distinct symbols OR; and l R ; for q E w 1 , r E w, where 'R9, is q-ary. The symbols OR: will be used for a translation of p,, while the other symbols lR9, will be used for auxiliary purposes. To define the translation of v, first let v, be a variable not occurring in p,, fixed for the rest of the proof. Let A be the set of all formulas of 2',,whose relation symbols and variables occur in p,. For each formula x E A we associate a formula x':
-
Definition 14.22. Tun(the universal language) is an effective first-order 1 language with no operation symbols but such that for each m E w and each n E w there is an m-ary relation symbol R; (with R: # RE,' if m # m' or n # n'). An n-ary number-theoretic function f is spectrally represented by a sentence p, of Zunprovided that for all x,, . . ., x,-, E w the following two conditions hold :
-
(i) there is a finite model 91 of p, such that (R:aI = xi for each i < n ; (ii) if 91 is any model of p, such that (R??ll = xi for each i < n, then IR;"I = f ( x o , . . ., 4 - 1 1 .
Now we can describe our desired sentence (I,. Namely, there clearly is a sentence (I, such that for any 9un-structureU, U k (I,iff the following conditions hold :
Lemma 14.23. Any spectrally representable function is recursive.
PROOF. We give an intuitive proof for this, thus appealing to the weak Church's thesis (see p. 46). Letf, n-ary, be spectrally represented by p,. Let r = { R ~ : m € lw, i~~ w , R ~ o c c ~ r ps,ionr m = 1 and is n).Thus F i s finite. Let 9' be the reduct of 9,, to the symbols of I'. We know that the truth of p, in an Zun-structure 91 is completely determined by the truth of p, in the 9'-reduct of 91. Clearly we can effectively construct all 2'-structures with universe a fixed m E w 1, and any 9'-structure 91 with [ A ] = m is isomorphic to one of them. Our decision method for f is as follows. Given x,, . . . , x,-, E w, we begin constructing all 9'-structures 91 with A = I, all with A = 2, etc. For each structure 91, as soon as it has been constructed, we check if p, holds in 91 (surely an effective question) and if IR:?il = x , for each i < n. As soon as we get an affirmative answer to all of these questions, which must eventually happen by 14.22(i), we set f(x,,. . ., x,-,) = IRA31 (by 14.22(ii)). 0
I
I I
!
-
We shall shortly prove that every recursive function is spectrally representable. For this theorem and one in Chapter 16 we need the following rather technical lemma. It essentially shows. how to spectrally represent simultaneously. not only x and f x but also x and all values f 0 , f I , . . .,ji Lemma 14.24. Let f be a unary function spectrally represented by a sentence p,. Then there is a sentence y5 which also spectrally reprrsmts f such that for any modd 91 of y5 the following conditions hold: ( i ) IR:y = 1R;"'I
+ 1;
(ii) Rg" i s a simple ordering of R y in the l) is finite. We know by (3)(b) that {a : (a, x) E 1Rg21}# 0, so 23, is defined. Take any z E "B,. Then by (3)(a) we have 2i k p'[zL], so (7) yields
(7)
if B, # 0, x
E
x and a (21) 'Rf2' = {(a, a, y ) : y I 'R2,?' = {(a, a) : a E R ; ~ "); (22) (23) Rf2' = 0 otherwise.
E
RiZy};
Clearly I I is finite and IRAXI = x, so to finish the proof of 14.22(i) and hence of our lemma it remains only to check that 2i k 4,i.e., that (1)-(4) hold. Of these, all but (3)(a) are routinely checked. But this condition is also clear, for (7) again is easily established by induction on X, so since 23, k p for each 0 y 5 x, (3)(a) follows. Now we prove the converse of 14.23 :
Now by (3)(c), (5) and (6) we have
and by (3)(d), (5) and (6) we have
But since p spectrally represents f, it follows from (8), (9), (10) that f l{a : (a, X) E Rg2L)I= ]{a : (a, x) E Ri2l)j, as desired in (iii). Now we turn to showing that 4 still spectrally representsf. To this end, let x E w , fixed for the rest of this proof. To check 14.22(ii), suppose that U is a model of 4 and IRh2'I = x. Then, by what we have shown above, conditions (i)-(iii) of our lemma 14.24 hold. By (ii), let y be the greatest number of Ri2I under Rg3; then by (i),
Theorem 14.25 (Trachtenbrot). sentable.
Every recursive function is spectrally repre-
PROOF. Let A = { f : f is spectrally representable). We shall again apply Julia Robinson's theorem 3.48 in order to show that every recursive function is in A . I. + is in A . We can clearly write down an =Pun-sentencep whose models are exactly those =Pun-structures 21 for which Rh2 n Ri2 = 0 and Ri3 = Rka u Ria. Thus p spectrally represents 11. a is in A . This time take a sentence p, such that 21 is a model of p, iff with exactly one more element than RA2'. R i a is a superset of 111. U: is in A . Let p, express that Rk2 = R:". IV. Exc E A. To motivate the construction of the desired sentence p,, suppose that Exc x = z. Then we can write x = y 2 + z for a certain y, where x < ( y In our sentence p,, Rb is to be thought of as a set with x elements, R: one with z elements, and R i one with y elements. We can express that x = y 2 + z by using functions (see below). Also, R$ is to have y 1 elements. We can express that x < ( y by means of a one-one function that is not onto. Getting down to details, let p be a sentence such that U is a model of p, iff the following conditions hold:
+.
+
By (4) and (iii) it follows from (10) and ( I I) that IR:211 = fx, as desired in 14.22(ii). It remains to check 14.22(i), i.e., to construct a finite model 21 of 4 such that IRA2'1 = X. TO do this, we first apply 14.22(i) for p, to produce for each y r x a finite model of p, with IRAcDyl= y. For the universe of our model 21 we take
Now we define the relations of 91 as follows:
Rka = x and Rh2l = x + 1 ; Rg3 = { ( y , z ) : y < z Ix ) ; R:?' = RIB". 1 > R:x = {(a,y ) : y 5 x and a E RiBy); OR(q + 1)PI = {(zo,. . ., z , - ~ y, ) : y I x and (z,, . . . , z,-,) E R : ~ ~ ) ; r 1R2'21 = 2 {(y, Y : y E RA29; lR221 = {(a,y): y I x and a E By}; lRga is any relation such that for each y I x, {(a, 6 ) : (a, b, y ) E lR;?I) is a one-one function mapping y onto RABy;
+
+
(1) RgQi: Ria H Rp'; R33 . R i a x Ri2l tf RA21; Rng Rga n Rng Ri2 = 0 and Rng R;% U (2) R y = R?; (3) Ria G R$?l, and Rill has exactly one more element than Rk2I; (4) R:% : R1,2L H Ria x Rj2; but R3,a does not map onto R$a x Ria.
ORig
+
+
To check the conditions of 14.22, let x E w . Say x = y 2 Exc x < (y Choose a finite =Pun-structure 91 such that IRi"1 = x, IRial = Exc x, ]Ri2'1 = y, RiQl c Ria, and R y has exactly- one more element than Rig'. Clearly then we can choose RZa, Ria, Rf3 SO that (I)-(4) hold. Thus 14.22(i) holds. Similarly, 14.22(ii) holds. V. A is clorcd undcr composition. For, supposef, go,. . .,g , _ , E A , where f is m-ary and each g, is n-ary; let h = K z ( f ; g o , . . .,g,-,). Say g o , . . .,
Part 3 : Decidable and Undecidable Theories
Chapter 14: Implicit Definability in Number Theories
grn-,,f are spectrally represented by $,, . . ., $,, respectively. The idea of the construction of a sentence p spectrally representing h is this. We modify the sentences $i so that pairwise they talk about entirely different symbols. Then we can introduce relationships between them in order to represent h. Formally, the first step takes place via m + 1 different syntactical Zunstructures in Z U n .We can clearly divide the symbols of -Punup into m + 2 pairwise disjoint parts such that each part contains infinitely many relation symbols of each rank and such that RA, . . ., Ri all are in the last part. The j-ary relation symbols of the ith part (0 I i I m + 1) will be denoted by iR.'0, i ~ i. ., and we assume that "'+lR: = Ri for each k I n. For each ti, Si, I?,) be the syntactical -Pun-structure in i I m let Ui = (rn+lR~+,+lvo, Yunsuch that : ti
(5) (6) (7)
=
0 (since -Punhas no operation symbols); SiRL = 'Ri',v0. . .v, - ; ri = { ~ v ~ ~ + ~ R ~ + ~ + ~ u ~ ) .
By means of these syntactical structures, our sentences $,, . . . , $, receive translations $to, . . ., $gm. The relationships between these translations that we need to express are: (1) our standard argument places RA, . . . , Rh-I correspond to the argument places in the translations $yo-. .$z(yil'; (2) the results obtained in + t o , . . ., $$Ti1) correspond to the argument places in $2"; (3) the result obtained in $2" corresponds to the standard result place Ri. Thus we want a sentence p (which clearly exists) such that for any -Pun-structure 8 , 8 k g, iff the following conditions hold : (8) (9)
8 k $ ~ ~ 3 ~ ~ ~ + f ~o r eRa c~h i+s m~; + ~ v ~ 23 k ('R:v0 + m + 'R;+,+ l ~ o A) (rnR:~o+ "'+lR1n+rn+lvo)
A
A
Ism
i (iii) by 10.29. Now assume that (iii) holds. Let f be an elementary function with range gC*I?. Set A = {p, : p, is a sentence, and there is an x r y+p,such that f x = g+J,for some sentence J, such that p, = $ A J, A . - A
$1.
Obviously g +*A is elementary, and A s r. Now suppose that J, E I?. Choose x so that f x = g + $ . Clearly we can find 3 sentence p, of the form $ A J, A - . . A J, such that g+p,2 x. This follows from the simple observation that g +(Oo A 01) > + Oo for any formulas 0,, 0,. Thus p, E A, and hence J, E A - Thm, as desired. 0
r
the following conditions are
r is decidable: r is recursively axiomatizable.
PROOF. ( i ) ( i i ) .This is obvious, since r axiomatizes r. ( i i ) a (i).Assume ( i i ) , say A axiomatizes r, where g + *A is recursive. A decision procedure for r can be described as follows. Assume that I' is consistent. (It is obvious, and trivial, that an inconsistent theory is both decidable and recursively axiomatizable.) Given any sentence q, start listing all sentences derivable from A (recall from 10.29 that +*(A-Thm) is r.e.). Since is con~plete, either p, or -19 will eventually appear on the list. If p, appears, we of course give the output p, E r. If i p , appears, by the consistency of I' we give the r.i output p, $ More formally, write g+*(A-Thm) = Rngf, where f is recursive. Then x E ~ + *iffF x EJir+*Sentand f p y ( f y
=
.u or fy
=
~ ' x =) x.
Because of their importance, we list here two corollaries of 15.2 which are simple logical transformations of it:
Corollary 15.3. I f F is recursivrly axiomatizable and undecidable, then 1' is incomplete. Corollary 15.4. If axiomatizable.
r
is complete and undecidable, then I' is not recursively
In Corollary 15.3 we encounter a justification for our emphasis on undecidability in this book. Even if our main concern were proving various theories incomplete, we see by 15.3 that more general results are obtained by proving undecidability (since we are mainly concerned with recursively axiomatizable theories). In 16.1 we shall see that N is an example of a theory which is con~pletebut undecidable; thus by 15.4, N is not recursively axiomatizable. Another important connection between our basic notions is given in
Theorem 15.5. I f r is consistent and decidable, tlzen 1' c A ,for some consistent, decidable complete theory A.
Part 3 : Decidable and Undecidable Theories
Chapter 15 : General Theory of Undecidability
PROOF. Intuitively we proceed as follows, merely effectivizing a proof of Lindenbaum's Theorem 11.13. Effectively list out all sentences. Now extend I? by an effective, recursive procedure: at the mth step, add the mth sequence if it is consistent t o d o so, otherwise add nothing. In this way we extend r t o a complete theory A with y *A r.e. ; by 15.2, A is decidable. More formally, we proceed as follows. Let h be a recursive function with range 8+*Sent and with hO E 9 * r . Now we define a function f by recursion. Let
Rng h, h recursive. Let k be a recursive function such that Rng k = 8+*Sent. We now define our binary recursive function$ For any m, n E w, f(m,O) = hm f(m,n+l)=kn
+
f (m, n
i f tAs ny + - I f ( m , i ) + i y + - l k n $ r ,
+ 1) = f (m, n)
otherwise.
+
f0 f(m f(m
=
hO
+ 1) = hm + 1) = fm
if I? Y /\y+-Ifi+
-y+-lhm,
(1)
otherwise.
+
As a generalization of 15.5 we have the following result. It shows that the decidability of a theory I' is equivalent t o the existence of complete decidable extensions of I? with certain restrictions. This result is practically useful in proving decidability of theories. The proof is just an extension of the proof of 15.5.
Theorem 15.6 (Ershov). Let I? be consistent and recursively axiomatizable. Then I? is decidable 18there is a sequence O,, O,, . . . of complete consistent extensions of r and a binary recursive function f such that the following conditions hold:
nt 1. If (1) fails for n, then
Hence f(m, n - 1) # k(n - 2) by the way f was defined, so f(m, n - 1) = f(m, n - 2). But then (1) fails for n - 1, contradiction. Thus (1) holds. Next, (2)
E
A,
for each m E w.
For, let p,EI?. Say p, = y C - l k n . Then A i S n y + - l f ( m , i ) + i y + - l k n $ r ; for otherwise, since also y + - lkn E I? we would have u {y -If (m, i) : i In) 1) = kn, and p, E A,. Also inconsistent, contradicting (I). Hence f(m, n note the following consequence of (1):
+
(3)
+
Omis consistent, for each m E w.
Next, (4)
Omis complete, for each m E w.
For, let p, be any sentence; say p, = g +-lkn. If A,,, 8' -lf(m, i) + - y + - l k n $ I?, then f(m, n 1) = kn and hence p, E Om.If Ai,. 9'-'f(m, i) + i g + - l k n E I?, then by (2) we see that A, t. i p , , so i p , E Om. Thus (4) holds. O,. Suppose p, is any It remains only to establish (i). By (2), F c sentence not in I'.Then I' u { i p ) is consistent, so i p , E Q. Say 8+-'hm = l p , . Thus f(m, 0) = hm implies that i p , E A, G Om, so by (3), p, $ Om. Hence p $ r ) ,,,O,. Thus (i) holds. Conversely, suppose that @, @,, . . . are complete consistent extensions of I' sucn that (i) and (ii) hold. Since r is recursively axiomatizable, by 15.1 it follows that y + * r is r.e. Hence it suffices to show that w f + * ris r.e. First we give an informal proof for this. Begin listing members of @, (note
+
n,,,
-
Chapter 15: General Theory of Undecidability
Part 3 : Decidable and Undecidable Theories that 9+* Omis r.e. for all m). After listing a few of them, list a few members of O,. Then list more members of O,, then of O,, then of 0,. Then list more members of O,, etc. In this listing process, if i p , appears, then on a separate list put p,. Since r G 0, and 0, is consistent, each such p, fails to be in r. Since each Omis complete and (i) holds, each sentence not in r eventually appears on the list. More formally, define a partial recursive function h as follows. For any x E w,
hx (5)
= py(x $ 9 +*Sent, or x E 9 +*Sent and for all i I l(y),[((y),), = f((y),, i)] and (y), is the Godel number of a @proof of A i s , ~ o 9+-Y(Y)O),+ 19+-'x).
- -
We claim that Drnn h = w 9 + * r (as desired). For, first let x E Drnn h. If x $ 9+*Sent, obviously x E w g +* r . Assume that x = y+p,, where p, is a sentence. Since x E Drnn h, we get a y as indicated in (5). Let m = (y),. Then by (ii), i p , E Om,so p, $ Omsince Omis consistent. Thus p, $ by (i), SO E 9 + * r . Second, let x E w -- 9 + * r . If x $9+*Sent, obviously x E Drnn 12. Suppose x = +p,, where cp is a sentence. Thus since x $ 9+* r we have p, $ r. By (i) choose m such that p, $ Om; hence i p , E Om by the completeness of Om.By (ii) and the deduction theorem there are +,, . . ., E A, such that t-+, A . . . A + i p , . By (ii), choose p such that 9++,,. . ., 8 + + m ~ { f ( mi, ) : i Ip). Clearly then we still have t- Ais,9+-lf(m, i ) + i p , . Now we let q = ~ f ' " . ~let ) , r be the Godel number of a 0-proof of A, 9+-lf(m, i) + i p , , and let y = 29.3"-5'. Clearly y satisfies the con0 ditions in (5), so x E Dmn h.
+,
+,
n,.,
essentially undecidable can be shown to actually be finitely inseparable. To see the logical significance of the latter notion, first note: (*)
if r is a finitely axiomatizable theory, then M = 9+*{p, : p, is a sentence whose negation holds in some finite model of r ) is r.e.
In fact, we can assume that the language has only finitely many nonlogical constants, and we list all members of M as follows. Begin listing all finite 9-structures with universe m E w 1 (any finite 9-structure will be isomorphic to one of this form). Simultaneously start listing all sentences. For each finite 9-structure 21, check if U is a model of J?; since r is finitely axiomatizable, this can be done in finitely many steps. If 2l is determined to be a model of F, check each sentence already listed for truth in 2l. For those sentences of the form i p , determined to hold in U we put y+p,on our output list. Clearly this gives an effective enumeration of M. Thus (*) holds. A rigorous proof of (*) would be rather lengthy, but is clearly possible (weak Church's thesis). Thus we see that if r is finitely inseparable, then the following is true:
-
(7)
There is an automatic procedure P such that, given any consistent finitely axiomatizable theory A with the property that every finite model of r is a model of A, the procedure P produces after finitely many steps a sentence p, such that 9, $ A but p, holds in all finite models of A.
In fact, let f be a recursive function satisfying the definition 6.21 for the effectively inseparable pair 9+*Thm2 and M = 9 *{p, : p, is a sentence whose negation holds in some finite model of r). Let A be as in (t),and set A = 9 +*A u {X : x is not the Godel number of a sentence) and B = 9 *{p, : is a sentence whose negation holds in some finite model of A). Thus y+*Thm2 E A , M E B, A n B = 0, and A and B are r.e. (using (*)). Say A = Drnn p,,1 and B = Drnn p,:. Then f(e, r ) = p+p,for some p, satisfying the conclusion of (?). On the other hand, it is clear from Definition 15.7 that any finitely inseparable theory I? is undecidable. The property (?) exhibits another property of r: no finitely axiomatizable extension of r is determined by its finite models. Roughly speaking, a finitely inseparable theory is a weak theory which is undecidable. However, there are consistent theories which are intrinsically undecidable, in the sense that all their consistent extensions are undecidable. Most such essentially undecidable theories can be shown to be inseparable, a stronger property. An important property of inseparable theories is that they are effectively incompletable, in the following sense: +
+
Some Generalizations of the Concept of Undecidability and their Relationships to Each Other and to Some Logical Notions Definition 15.7. Let be a theory in a language 9 . We say that r is essentially undecidable if I? is consistent and whenever A is a consistent theory in 9 with I? G A, it follows that A is undecidable. The theory r is inseparable if 9 + * r and 9+*{p, : p, is a sentence and i p , E I?) are effectively inseparable (see Chapter 6). And we say that F is finitely inseparable provided that *Thm2 and 9+*{p, : p, is a sentence whose negation holds in some finite model of r ) are effectively inseparable. +
Some remarks on the origin and intuitions underlying these notions are in order. There are some theories which are undecidable but which can be easily extended to consistent decidable theories. An example is the theory of one binary relation, which is proved undecidable in the next chapter. If we adjoin to this theory the axiom VvoVvl(vo= v,), we obviously get a consistent decidable theory. (See Exercise 15.24.) Thus r is not essentially undecidable. Most theories with this property of being undecidable but not
(#)
if I' is an inseparable theory, then there is an automatic procedure P such that if A is any consistent recursively axiomatizable extension of I? then P yields a sentence p, such that p, $ A and i p , 4 A.
Part 3 : Decidable and Undecidable Theories
Chapter 15: General Theory of Undecidability
PROOF. Let F be an inseparable theory in 9. Thus 8 + * F and A = 8+*{p,: p, is a sentence and i p , E r ) are disjoint, by 6.21, so 'I is consistent. Suppose that A is a consistent theory in 9 with r c A. Let B = g+*{p,: p, is a sentence and i p , E A). Thus g + * r G g +*A, A E B, and g +*A n B = 0. Clearly B is recursive if 8+*A is recursive, so the recursive inseparability of g * r and A implies that g + *A is not recursive, i.e., A is undecidable. Hence r is essentially undecidable. Trivially, every essentially undecidable theory is undecidable. Now suppose that F is a finitely inseparable theory in 9, and let C = {8+tp: p, is a sentence which holds in every finite model of F). By 15.7, g +*Thm2 and g + *Sent2 C are effectively inseparable. If F is decidable, then g +* r is a recursive set containingg *Thm2 and disjoint from 8. *Sent2 C , which is impossible. Thus r is undecidable. If C is recursive, C is a recursive set containing 8+ *Thm2 and disjoint from 8+ *Sent2 C, which is again impossible. 0
In fact, let f be a recursive function satisfying Definition 6.21 for the effectively inseparable pair g + * r and M = g +*{p, : p, is a sentence and i p E I?). Given A as in (#), set A = g f * A u { x : x is not the Godel number of a sentence) and B = 8 +*{g, : p, is a sentence and i p , E A). Then g +*I? E A, M c B, A n B = 0, both A and B are r.e., say A = Drnn p,,l and B = Drnn cp:. Then f(e, r ) = g+p,for some p, as desired in (#).
+
The following theorem gives a rigorous version of (#):
Theorem 15.8. Let F be an inseparable theory. Then there is a recursive function h such that ifA is any consistent extension of r in 9and ifg+*A = Drnn v,l, then he = g+p,for some sentence p, such that p, $ A and i p , $ A.
-
-
PROOF.Let f be as above. We define a partial recursive function k' by setting kl(x, e) py [(e, x, y ) E TI or x $ g *Sent9], for all x, e E w. Say k' Drnn k' Let ke
=
Note that
{(x, e) : x
E
Dmn cp: or x $ 8 *Sent2). +
s:(r, e) for all e E w. Then for any x
E w,
:
and hence Dmn cpk,
(1)
+
+
-
+
= cp?. =
-
=
Dmn cpi u (w
-
g+*Sent~).
Next, we define a partial recursive function I' by setting 1
for all x, e E w (recall the definitions of ifand cp' from 5.8 and 10.6). Say I' = (pf. Let le = s:(s, e) for all e E w. Then for any x E w ,
!
I
There are examples of undecidable theories which are not essentially undecidable (see the comments following 15.7); essentially undecidable theories which are not inseparable; finitely inseparable theories which are not essentially undecidable and hence not inseparable (again see the comments following 15.7); inseparable (hence essentially undecidable and undecidable) theories which are not finitely inseparable (see the comment following 16.2); and decidable theories r with 8+*{p, : p, holds in all finite models of F) nonrecursive (15.25). Now we want to consider the effect of extending theories on the above notions. Recall the definition of extensions of theories from 11.29. The following result generalizes the definition of essentially undecidable theories.
Proposition 15.10 Let F be a theory in 9, A a consistent theory in an efSective expansion 9' of 9, and assume that F E A. Then F essentially undecidable implies A essentially undecidable, and inseparable implies A inseparable.
,
and hence Dmn cp:, = {x : i ' x E Dmn 9:). (2) For any e E w , let he = f(ke, le). Now suppose that A is a consistent extension of I? and g + * A = Drnn rp:. By (1) and (2), Drnn cpi, = A and Drnn cp;, = B, with A and B as in the discussion preceding this theorem. ( A u B), so he = g+p,for some sentence p, with Hence he = f(ke, le) E w 0 g, $ A and i p , $ A, as desired.
-
Next we list some simple properties of the notions in 15.7.
Proposition 15.9. Every inseparable theory is essentially undecidable, and every essentially undecidable theory is undecidable. EveryJinitely inseparable theory is undecidable. If I? is finitely inseparable, then {8 +p, : p, is a sentence which holds in everyJinite model of I?) is not recursive.
PROOF. Assume the first sentence of 15.10. Let I? be essentially undecidable. Suppose that O is a consistent decidable extension of A in 9'. Then O n Sent2 is a consistent decidable extension of F in 9, contradiction. Next, suppose F is inseparable. Since 8+*F c g + * A and g+*{p, : g, is a sentence of 2 ' and i p , E r ) E g+*{p, : p, is a sentence of 9' and i p , E A), while the two sets on the right of these inclusions are disjoint, it is clear , that A is inseparable. 17 There is an example of theories I?, A in a ianguage 9 such that r c A, A is inseparable, but I? is decidable (see 15.27). On the other hand, we have:
Proposition 15.11. If I? and A are theories in a language 9,and A is an extension of r, then A finitely inseparable implies I? finitely inseparable.
Part 3 : Decidable and Undecidable Theories
Definition 15.12. Let I' and A be theories in languages 9 and 9 ' , A an extension of r (hence 9' an expansion of 9 ) . We say that A is afinite extension of F provided that there is a finite set O of sentences of 9' such that F u O axiomatizes A. Proposition 15.13. If I? and A are theories in 9 and A is afinite extension of r, then A undecidable implies I? undecidable.
PROOF. Let O be a finite set of sentences such that r u O axiomatizes A. Then for any sentence p,, we have p, E A iff A O -t p, E ,'I so I? is undecidable. 0 The following result enables one to prove that some rather weak theories are undecidable.
Proposition 15.14. Let 9' be an effective expansion of a language 9.Suppose I' is a theory in 9 , A is a theory in 9')and I? u A is consistent. If r is finitely axiomatizable and essentially undecidable, then A is undecidable.
PROOF. Let O = {p, : p, is a sentence of 2" and r u A k p,). Clearly O is a theory in 2'which is an extension of I? and a finite extension of A. By 0 15.10, O is essentially undecidable, so by 15.13, A is undecidable. In case we deal with definitional expansions, it is to be expected that we obtain complete equivalences between our notions for a theory and its expansion :
Proposition 15.15. Let (I",9 ' ) be an effective definitional expansion of (I?, 9 ) . Then: ( i ) I? is decidable iff I" is decidable; (ii) r is essentially undecidable iff I" is essentially undecidable; (iii) I? is inseparable iff I" is inseparable; (iv) l7 is finitely inseparable iff r' is finitely inseparable.
PROOF. Let the notation be as in 11.29 and 11.30. For any sentence p, of 9 , by 11.31 we know that p, E I? iff p, E r'. Hence I" decidable 3 I? decidable. By 11.30 we know that for any sentence $ of 9 ' , we have IC, E I?' iff $' E r ; because the formation of I)' is effective, r decidable 3 I?' decidable. Thus ( i ) holds. The implication from left to right in (ii) is a special case of 15.10. NOW assume that I" is essentially undecidable, and ? ! G A, where A is a consistent theory in 9. Let A' be the theory in 9' with axioms A u I?'. Then A' is a definitional expansion of A ; furthermore, since I?' G A', it follows that A' is undecidable. Hence by (i) of our present theorem, proved above, A is undecidable.
Chapter 15: General Theory of Undecidability
The implication from left to right in (iii)is immediate from the definitions involved. Now suppose I" is inseparable. Let B = g+*{p: p, E Sentp, i p , E I"), D = 8 *{p, : p, E Sent2, ip, E r). Thus we are given that 8.+*I" and B are effectively inseparable sets. Now by 11.30 and 11.31 we know that for any sentence p, of 9 ' , p, E r r iff p,' E I?, and g+p,E B iff g+plE D. Hence from 6.25 it follows that g+*rand D are effectively inseparable. Hence r is inseparable. For (iv), suppose I? is finitely inseparable; thus g+*Thm9 and B = {p, : p, E Sent9, -IT holds in some finite model of I?) are effectively inseparable. As in the proof of 11.31 we see that any model of I? can be expanded to a model of I". Henceg + *Thm9 G g *Thmp, and B G {p, E Sentp : -IT holds in some finite model of r');it follows that I" is finitely inseparable. Finally, assume that r' is finitely inseparable. For each sentence p, of 9 , let A, be the set of all existence and uniqueness conditions 11.29(ii) for the new operation symbols occurring in p,. Let p,* = p,' (defined in the proof of A, -t p,' if A, # 0. Furthermore, let O, 11.30) if A, = 0, and let it be be the set consisting of all definitions for the new symbols in p,. Note that by the proof of 11.30, 0, k p, o p,'. Now it suffices to prove +
+
(1)
(2)
if p, E Sent9, and kp,, then by*; if p, E Sentp and -~p, holds in some finite model of ,'?I ip,* holds in some finite model of r.
then
To prove (I), assume that p, E Sent9. and kp,. To check that krp*, let U be any 9-structure which is a model of A,. Obviously U can be expanded to an 9'-structure 23 which is a model of 0,. Since kp, and 0, k p, t,p,', it follows that 23 k p,' and hence 11 k p,', as desired. To prove '(2), assume that E Sentp, and U i= -IT, where U is a finite model of r'. Then I( 9 is a model of A, u and of l p , ' , since I?' k i p , o ip,', so U 1 9 k iV*
r
Next we consider the general notion of interpretation of one theory into another (1 1.43-1 1.46).
Proposition 15.16. Let 9 and 9' be two languages, I? and A consistent theories in 9 and 2" respectively, and suppose that U is an effective interpretation of r in A. Then:
(i) r essentially undecidable 3 A essentially undecidable. (ii) l? inseparable A inseparable. (iii) Suppose also that for every model Q of F there is a model 23 of A such that Q = BAa.Then l? undecidable 3 A undecidable. (iv) Suppose that for each finite model Q of I? there is a finite model 23 of A such that Q = BAC1. Then A finitely inseparable 3 A finitely inseparable. PROOF. (i! Let A' be any consistent theory in 9' which extends A. Set I" = {p, E Sents : A' k Thus r c I" since U is an interpretation of I' in A. Now I" is a theory in 9,for if I?' 1 p,, then O 1 p, for some finite subset O
Part 3 : Decidable and Undecidable Theories
Chapter 15: General Theory of Undecidability
of I", hence kA O + p,, kA{#a : # E O) + p,a by 11.46, so A' k p,2[ and .'?I r' is consistent because A' is. Therefore, r' is undecidable (since we assume that r is essentially undecidable). The formation of p,%is recursive by 11.44, so A' is undecidable, as desired. (ii) The implication here is essentially a trivial consequence of 6.25. Let A = g + * r and B = g+*{p,: p, E SentP, i p , E I'). Thus A and B are effectively inseparable. Correspondingly, let C = g + * A and D = g+*{p, : p, E SentP, i p , E A). Note that C n D = 0 since A is consistent. Now we define a funetionf: w 4 w: for any x E w, if x $ g +*Sent9, fx = 0 fx=g+(g+-l~)~ ifx~g+*Sent~.
p, E
It is easily checked that A c f - l * C and B c f-l*D. Since f is recursive by 11.44, it follows that C and D are effectively inseparable, by 6.25. Thus A is inseparable. (iii) The added hypothesis implies, as we shall see, that for any sentence p, of 2 , p, E I? iff p,a E A; hence clearly A decidable implies r decidable. In fact, p, E I? 3 p,a E A even without the added hypothesis, by 11.46. Now assume that q~~ E A. Let O be any model of r. By our added hypothesis, O= for some model 23 of A. Thus 23 k q?, so by 11.45, O k p,. Hence r k p, and p, E r, as desired. (iv) We can prove this similarity t o (ii); we just need t o establish the following two results : (1)
for any sentence p, of 9 , kp, implies ITa;
(2)
for any sentence p, of 9 , if i p , holds in some finite model of r , then ( -ip,)a holds in some finite model of A.
Now (1) is immediate from 11.46, since any syntactical 2-structure in 2' is an interpretation of Thm2 in Thmp (obviously). Condition (2) follows 0 from our extra hypothesis for (iu) along with 11.45. The following variant of 15.16(iu) will be useful in Chapter 16. Proposition 15.17. Let 2 and 2' be two languages, and let r and A be consistent theories in 2 and 2' respectively. Assume that 2 has only finitely many operation symbols (with no restriction on the number of relation symbols). Let U = (x,f, R, I?') be an efective syntactical 2-structure in 2' such that r' is finite. Finally, suppose that for each finite model O of J? there is afinite model 23 of A u I" such that O = Br'%. Then r finitely inseparable 2 A finitely inseparable.
PROOF. By virtue of 6.25 it suffices t o establish the following: I?' + p,II; for any sentence p, of 2 , kp, implies k (1) (2)
for any sentence p, of 9, if i p , holds in some finite model of holds in some finite model of A. then -(/\I" +
r,
To prove (I), assume that kp, and that 23 is an 2'-structure which is a model of Art.Then Wa k p,, SO by 11.45, 23 k p,%,as desired in (1). To prove (2) let O be a finite model of r such that O k - I T . By hypothesis of our proposition let % be a finite model of A u r' such that O = Wa. Thus by 11.45, 23 k i v a , as desired in (2). 0
Connecting the Notions of Implicit Definability in Chapter 14 with the Undecidability Notions Theorem 15.18. If r is a theory in 2,,,in which every recursive set is weakly syntactically definable, then F is undecidable.
PROOF. Suppose
r is decidable. Let
A = {e : e is the Godel number of a formula free, and #(e) $ .)?I
# having at most uo
Clearly A is recursive, by the hypothesis that I? is decidable. Let p, weakly syntactically define A in I',and set e = g + y . Then p,(e)~r
iffe~A iff d e ) 6 r
(since p, weakly syntactically defines A) (by definition of A)
This is a contradiction.
0
The above proof constitutes a typical application of the diagonal method in the theory of undecidable theories. T o see the idea more clearly, suppose I' is a theory which has 23 = (w, ., 4,O) as a model. Then if p, syntactically defines A, it follows by 14.14 that the formula p, actually elementarily defines A in 23, in the sense of 11.7. Hence p(e) holds in 23 iff e E A, i.e., iff cp(e) $ r. Thus, in a sense, p,(e) asserts of itself that it is not in r. (Holding in 23 can be loosely identified with intuitive truth.) Theorem 15.8 of course yields, along with our results of Chapter 14, that the theories R, Q, P and N are undeidable. We shall save a formal statement of this and various consequences and generalizations until the next section.
+,
Theorem 15.19. Let is inseparable.
r
be a consistent theory in 2,,,,with R
G
r. Then
I?
PROOF. By 6.24, let A and B be r.e. but effectively inseparable sets of integers. Since A and B are nonrecursive, they are nonempty. Hence we can write A = Rng f and B = R n g g for suitable recursive functions f and g. Note that every recursive function is syntactically definable in I', since this is true of R by 14.1 1. Say f and g are syntactically defined by formulas p,, Ijl respectively in I?. Let x be the following formula having at most uo free:
Chapter 15 : General Theory of Undecidability
Part 3 : Decidable and Undecidable Theories
I Let hx = 9 + x ( x )for each x E W . Clearly h is a recursive function. To show that I' is inseparable, it suffices by 6.25 to show that A G h-'*,+*r and B G h-l*${p E Sent : i p E r). That is, it suffices to prove the following two statements : (1)
if x E A , then C ~ ( x ) ; if x E B, then I? C i X ( x ) .
(2)
First let x E A , and choose y so that fy defines f in r ,
r C Y(Y,4
(3) Also, since R
Because of (7) we then infer that
=
x. Then, since p syntactically
.
C v, 5 y v y 5 v,. Hence by ( 8 ) and ( 9 ) we
0
The notion of spectral representability will be related with our undecidability notions in the next chapter. We conclude this chapter with our first important results concerning incompleteness. The following fixed-point, or self-reference theorem is basic for the remaining results in this chapter.
c r we have
r t v 25 Y + v 2 = ~ v . . . v v 2 = y .
(4)
Now R c l7 implies that have I? C 1 0 , as desired.
Since A and B are disjoint, x $ B. Hence Vi E w ( g i # x), so, again since RG r, for all i E w . I? C i A ( g i ) = x (5)
Theorem 15.20. Let r be a theory in 9,, in,which every unary recursive with , function is syntactically definable, and let p be a formula of 9,, Fvg, G {v,). Then there is a sentence $ of 9,, such , that r C p(Ag+$) ++ $.
On the other hand, by the second condition of 14.1 for $ syntactically defining g we have
PROOF. For any x E w, let
F k ( i , x ) +x
=A
for all i E w .
)
fx fx
Putting this together with (4) and (5) we easily obtain
Hence using (3) we easily obtain l7 C ~ ( x )as, desired. E
B, and choose y so that gy
=
x. Since $ syntactically defines
r C *(Y, XI.
(6)
Also note that x $ A, since A n B = 0 . Hence f i # x for all i E w, and we easily infer from the second condition of p syntactically defining f in 14.1 that
I? C i p ( i , x )
(7)
=
0
with , Fvx G Thus f is recursive. By hypothesis, let x be a formula of 9,, {v,, v,} such that x syntactically defines f. Let 0 be the formula 3v,[g,(vl) A x(q,, u,)], and let $ be the sentence O(Ap+O). Thus f9+0 = 9 B(A9 8) = 9 +$. Hence by choice of x we have +
Now let x g in I?,
if x = 9 +$ for some formula $, otherwise.
= 9+$(x)
+
Hence it obviously follows that I' C g,(A9+$) + 0(A9+0), i.e., I? k p(Ag+$) -,$. On the other hand, by the second condition in 14.1 we have
and hence
for all i E w .
Now let 0 be the formula ,(%
X) A
Vv2[v2 5
01 +
-r$(u2, $1.
Clearly it suffices now to show that I? k 1 0 . First note since R I-CV,
Hence we clearly have
5 y + v l ~ o v ~ v~ , =. yv.
F that
As a simple application of 15.20 let us show that Peano arithmetic, theory P of Chapter 14, is incomplete. This result is considerably generalized in Chapter 16, so we shall not state it formally. b n the other hand, it is perhaps the most interesting result so far proved in this book, and its proof is quite direct compared to our more general results. Within P it is possible to formalize essentially all of the elementary arguments found in number theory books; no exceptions are known to this author, so it is surprising
Part 3 : Decidable and Undecidable Theories
Chapter 15: General Theory of Undecidability
that there d o exist sentences of L?,,, which are neither provable nor disprovable in P. From the viewpoint of the philosophy of mathematics the incompleteness of P is a very major fact, because the proof clearly works for almost any mathematical discipline. The argument that P is incomplete is based just on these previously established facts in addition t o 15.20: ('1
Note by 14.16 and 14.17 that 15.21 really says that g + * N is not in the arithmetical hierarchy. In particular, it is not recursive, not r.e., not the complement of an r.e. set, etc. BIBLIOGRAPHY
All recursive functions and relations are syntactically definable in P.
1. Dyson, V. H. On the decision problem for extensions of a decidable theory. Fund. Math., 64 (1969), 7-70. 2. Ershov, Yu., Lavrov, I., Taimanov, A., Taitslin, M. Elementary theories. Russian Mathematical Surveys, 20 (1965), 35-105. 3. Hanf, W. Model-theoretic methods in the study of elementary logic. In Model Theory. Amsterdam: North-Holland (1965). 4. Pour-El, M. Effectively extensible theories. J. Symb. Logic, 33 (1968), 56-58. 5. Tarski, A., Mostowski, A., Robinson, R. M. Undecidable Theories. Amsterdam: North-Holland (1953).
This was proved in 14.1 1, 14.2 and 14.19. (2)
All sentences of P are true in (w,
+,
a ,
ri,
0).
P is axiomatizable by a recursive set A of axioms. (3) The conditions (2) and (3) are obvious from the definition of P. Now we prove that P is incomplete. Let R = {(x, y ) : x is the Godel number of a A-proof of a formula with Godel number y ) . By 10.27, R is recursive. Hence by (1) let x be a formula with Fvx E {v,, v,) which syntactically defines R in P. Let p, be the formula i3vIX(v,, u,). Thus Fvp, c {v,). We now apply 15.20 t o obtain a sentence # such that P k p,(Ag+#) t,4. We First suppose that P t #. Let 0 be a A-proof claim that P V # and P V i#. of +. Then (8.++B,,9+#) E R, SO P t x(A9+ +B, A9+#), s o P k 3v1x(vl, fly+#) and P 1 ip,(Ag+#). This contradicts the fact that P k p,(AYC#) o #. Second, Then P k ip,(A9+#), i.e., P k 3vlX(v,, A9+#). By (2), suppose that P t i#. ., a, 0), s o x(x, fly++) is true in 2l 3u,~(v,, A9+#) is true in U = (w, for some x E w. It follows that ( x , 9 + # ) E R, since otherwise P k i X ( x , A9+#) and i,y(x, Af+#) would be true in U by (2). Thus, by the definition of R, P t #, contradicting the first part of this proof.
EXERCISES
+,
+,
Note that # holds in (w, ., 4,O) iff p,(A9+#) holds there, i.e., as is easily seen, iff p,(Ag+#) is not provable in P, i.e., iff P V #. (Thus # does ., ri, O), and hence is intuitively true.) Thus this proof is hold in (w, related t o the informal paradox of the man who says "I a m now lying"; it is impossible that he is lying o r that he is telling the truth. Of course the proof can also be considered as another instance of Cantor's diagonal method. As another application of 15.20 we give the following important result which shows the undefinability of the true statements of number theory.
15.22.
Give an example of a decidable theory with denumerably many decidable extensions. Every theory has at most countably many decidable extensions.
15.23.
Let 9be a language with unary relation symbols R,, m E w, but no other nonlogical constants. Show that r = {p, E Sent2 : bv) is decidable but has exp Xo complete undecidable extensions. Hint: use elimination of quantifiers, as with the pure theory of equality.
15.24.
(See the comments following 5.7.) Let 9be a language with a single binary relation symbol R, and let r be the theory in 2 with the axiom {VvoVv,(vo= ul)). Show that r is decidable.
15.25.
(See the comments following 5.9.) Let 2 be a language with two unary relation symbols P and Q. Let A be an r.e. set which is not recursive, say A = Rng f with f recursive. Let r be the theory in 2 such that U C I? iff the following conditions hold:
+,
(a) P U n Q~ = 0; (b) P ~ Q% U = A; if lPal = m < w, then lQUl = fm. (c) Show that is decidable but that p+*{p,E Sent2 : p, holds in all finite models of U) is nonrecursive.
t
Theorem 15.21. (Tarski). Let U = (w, +, ., a, 0) and let X = { 9 + # : # is a sentence of L?,,,, and U k #). Then X is not elementarily definable in U. PROOF. Suppose X is elementarily definable by a formula p, in 3. Thus Fvp, c {u,) and X = '9. By 15.20 choose a sentence # such that R k 7p,(Ay+#) o #. Since U is a model of R, it follows that U k iv(A9+#) t,#. But then we reach a contradiction in trying t o decide whether U k 4 o r not: if U k #, i.e., 9+#E X, then 21 k i v ( A y + # ) and hence U P ip,[g+#], s o y + #$ X, contradiction. Also, U # # implies 9 + 46 X, hence U k ip,[9+#], U C iv(A9+$) and U k #, which is absurd, as shown above. 0
15.26. 5
i
Let 2' be an effective expansion of a language 9obtained by adding only new individual constants, and let f and r' be theories in 2 and 2' respectively such that I?' = {p, E Sent2 : r k v). Show: (1) I? undecidable cr I?' undecidable; (2) r essentially undecidable tt I?' essentially undecidable; (3) I? inseparable ++ I?' inseparable; (4) r finitely inseparable I" finitely inseparable.
-
Part 3 : Decidable and Undecidable Theories
15.27. There are theories I', A with F G A, A inseparable, F decidable. Hint: take 2 and I? as in 15.23. Let A have the following axioms:
{3voRmvo: m
E
Some Undecidable Theories
A ) u { ~ 3 v o R m v: 0m E B ) ,
where A and B are effectively inseparable. 15.28'. Show in detail that the sentence $ constructed following 15.20, such that P H$and P If -$is truein ( A , +, . , d , O ) .
16
15.29. Suppose that r is an W-consistent recursively axiomatizable theory in T,,,in which every recursive function and relation is syntactically definable. Show that F is incomplete. 15.30. If I'is finitely axiomatizable and has a finite model, then tially undecidable.
r is not essen-
15.31. Any theory with only finitely many complete and decidable extensions is decidable. 15.32'. If I' is finitely inseparable and finitely axiomatizable, then { g + q: q is a sentence which holds in every finite model of I?) is not r.e.
Corresponding t o our list in Chapter 13 of decidable theories we begin this section with a list of undecidable theories. As we have previously indicated, most undecidable theories satisfy one of the two stronger properties of inseparability o r finite inseparability, and we shall indicate these properties in the table below.
Some undecidable theories Theory
Inseparable ?
1. Th9, where No (a) 2 has at least one relation symbol of rank > 1, or (b) T has at least two unary operation symbols or (c) 9 has at least one operation symbol of rank > 1. 2. Theories R, Q, P, Yes N 3. Theory of (Z, + , .) Yes 4. Theory of (Q, +, .) Yes 5. Theory of groups No
Finitely inseparable ?
Proved by
In this book
Yes
Trachtenbrot, 1953
pp. 293296
No
Tarski, Mostowski, 'Robinson, 1949 Tarski, Mostowski, 1949 J. Robinson, 1949 Mal'cev, 1961
No No Yes
p. 280
p. 282
-
Part 3: Decidable and Undecidable Theories
Chapter 16: Some Undecidable Theories
- -
Theory
6. Theory of semi-
Inseparable?
Finitely inseparable?
Proved by
No
Yes
Mal'cev, 1961
No No
Yes No
No
No
No No
Yes Yes
No
Yes
Mal'cev, 1961 Undecidable: J. Robinson, 1949 Undecidable : J. Robinson, 1949 Taitslin, 1961 Ershov, Taitslin, 1963 Taitslin, 1962
No
Yes
Lavrov, 1963
No
Yes
Lavrov, 1963
Yes
No
Tarski, 1949
and essentially give a definition of putational and easily checked:
In the book
w
+, .). The first is purely com-
in (Z,
Lemma 16.3. For any integers x,, x2, x3, x4, y l , y2, y3, y, we have
groups 7. Theory of rings 8. Theory of fields
9. Theory of ordered fields 10. Theory of lattices 11. Theory of distributive lattices 12. Theory of partial orderings 13. Theory of two equivalence relations 14. Theory of two linear orders 15. Set theory ZF
.
Lemma 16.4. For each prime p > 2 there is an m with 1 i m < p such that mp is a sum of four squares. PROOF. The members of { x 2 : 0 I x i ( p - 1)/2) are pairwise incongruent mod p, as are the members of { - 1 - y 2 : 0 i y i ( p - 1)/2). There are p 1 numbers in the union of these two sets, so there are x and y such that 0 i x, y I ( p - 1)/2 and x2 - 1 - y 2 (modp). Say
-
+
x2
+ 1 + y 2 = mp.
Thus 1 2 m . Since x, y I ( p - 1)/2, we have
0
as desired. In the first section of this chapter we shall be concerned with proving various theories inseparable, while in the second section we deal with finitely inseparable theories. Immediately from 15.19 we have
Lemma 16.5. For any positive prime p, p is a sum of four squares.
+ + +
PROOF. Obvious for p = 2 (2 = 1 + 1 0 0). Suppose p > 2. Let m be the smallest positive integer such that mp is a sum of four squares. Thus 1 Im < p by 16.4. Say mp = xf + xg x: + x;. Suppose m > 1; we shall get a contradiction. Now
Theorem 16.1. Theories R, Q, P, and N are inseparable, and hence essentially undecidable and undecidable.
(1) m is odd. For, suppose m is even. Then x? + x$ x: xi is even, so either (1) all four of x,, x,, x3, x4 are even, (2) two are even, two are odd, or (3) all four are odd. In case (2) we may assume that x, and x, are even. Then in any of the cases (1)-(3),
By 15.3 we then obtain:
+ +
Theorem 16.2. The theories R, Q, and P, as well as any of their recursively axiomatizable consistent extensions, are incomplete. Note that, trivially, R, Q, P and N are not finitely inseparable, since they d o not have finite models. Less trivial examples of inseparable but not finitely inseparable theories can be found in the paper of Dyson mentioned at the end of Chapter 15. Now we shall show how Proposition 15.16 of the last chapter can be used to take care of #3 and #15 in the above table. Intuitively speaking it is a matter of finding definitions for w , +, ., 4 and 0 in the theory of (h, +, .) (for #3), and in set theory (for #15). Proceeding to the first task, we first need the fbllowing four purely number-theoretic facts, which are well known
+
and all the entries [ ] on the right are integers. This contradicts the minimality of m. Thus (1) holds. Now the members of T = { y : - ( m - 1)/2 y I ( m - 1)/2) are pairwise incongruent mod m, and IT1 = m. Hence there exist y, E T such that xi = y, (mod m), i = 1 , . . ., 4. Thus y?
+ yz + yz + yi = x? + xi + x; + xi
=0
(mod m),
\
Part 3 : Decidable and Undecidable Theories
Chapter 16 : Some Undecidable Theories
be a fixed first-order language with a single nonDefinition 16.8. Let 9,,, logical constant, a binary relation symbol s. Let S be the theory in PCP,,, with the following axioms : Then n # 0, since otherwise yi = 0 for each i = 1,. . ., 4 and mlxi each i = 1, . . ., 4 , so m2)x? . . - + xz = mp hence mlp, contradiction. Also, mn < 4(n1/2)~= m2, SO n < m. NOW(mn)(mp) is a sum of four squares by Lemma 16.3 and as is easily seen, each expression ( ) on the right in 16.3 is divisible by m. Hence np is a sum of four squares. But 0 < n < m, 0 contradiction.
+
Theorem 16.6 (LaGrange). bet a be an integer. The following are equivalent: (i) a E w, (ii) a is a sum of four squares. Using this celebrated theorem of LaGrange we can take care of the theory of (Z, .):
+,
Theorem 16.7. Let 9 be a language appropriate for U = (Z, +, .), and let J? be the set of all sentences of 9 which hold in U. Then I? is inseparable.
PROOF. AS mentioned above, we apply 15.16 to prove this theorem; in fact, we shall define a certain effective interpretation of N into a theory which is a definitional expansion of 9.Let 9' be a definitional expansion of 9 obtained by adjoining two operation symbols s (unary) and 0 (nullary). Let A be the definitional expansion of l? in 9' with the following definitions :
We shall show that the theory Q is interpretable in a definitional extension of S. To this end we must come up with definitions for w, +, ., 0 and 5. We d o this by a series of definitional expansions of S. In each case it will be evident that we do have a definitional expansion. The notations introduced here will not be used beyond our treatment of set theory.
get with
Delinition 16.9. dp, is a definitional expansion of new symbols and axioms:
the following
(i) 0, an individual constant. New axiom
(ii) Op, a binary operation symbol. New axiom: vv,vv,Vv,[v,
E Op(v,,
v,)
0
v,
E
v, v v,
= vl].
(iii) { }, a unary operation symbol. New axiom: Vvo[{vo}
= OP(O, v0)l.
(iv) { , }, a binary operation symbol. New axiom: VvoVv1[{vo, vl}
= Op({vo},
vdl.
(v) U, a unary operation symbol. New axiom: Now we define a syntactical 9n,,-structure 3 be the formula
= (p,,f,
Vvo[Uvo = Op(v0, v0)I.
R, A) in 9 ' . Let p,
(vi) C , a binary relation symbol. New axiom:
+,
f. = ,fs = s, f O = 0, and let R = 0 (empty set). (see 11.43). Set f+ = Clearly this does define a syntactical go,-structure in 9 ' . Let O be the natural expansion of U to an 9'-structure (see the proof of 11.31; the new symbols receive the denotions indicated in their definitions), and let 9 = (w, d,O). Clearly QAs = 9 (see 11.43), and A = {p, E Sent2 : O k p,), so by 11.45, A k p,s for each p, E N . Hence 23 is an interpretation of N in A. By 15.16, A is inseparable, so by 15.15, r is inseparable. 0
+,
a ,
Now we want to accomplish a similar thing for set theory. Actually we shall show that the very simple set theory of the following definition is inseparable : 7R7
(vii) Trans, a unary relation symbol. New axiom: Vv,[Trans v,
Vv,(vl
t ,
E
v, + v1 E v,)].
(viii) J , a unary relation symbol. New axiom: Vv,{Jv,
c*
Vvl[vl
c v, + Vv,3v3Vv4(v46 v,
v,
t ,
E
v1
A
v4 E v,)]).
(ix) n, a ternary operation symbol. New axiom: V U ~ V U ~ V U , V= U U,~ {n V .,vl ~ Uo E Vz A VV4(V4E U3 t,U 4 E DO t , [Ju, v [ ( ~ J Vv, l v 0
UI)] ~2A ) U 3 = 01).
A U4 E
E
Chapter 16: Some Undecidable Theories
Part 3 : Decidable and Undecidable Theories
There are more definitions to come, but first a few remarks on those already made. Intuitively 0 is the empty set; Op(x,y ) = x u { y ) ; U x = x u {x). Trans x means that the transitive law for E holds with x on the right side: z E y E x implies z E x. The statement Jx means that the intersection y n z can be formed whenever y E x. Finally y n, z is the intersection of y and z if Jx and y s x, otherwise it is 0.Note that already several complications arise because we cannot in general form the union and intersection of sets. Elementary facts such as those already mentioned will be used without proof. We formulate explicitly only the properties which are harder to prove. It is convenient in the proofs to argue informally within the given languages, and to mix,logical and informal notation.
Lemma 16.10. 9, != Jv,
A
Lemma 16.14. LZ2 =! CV,+ COp(v,, v,).
-
PROOF. Assume that Cx, y is arbitrary, z = Op(x,y ) , and w is arbitrary; w has its usual sense. If y E W , then Vu(u E X w we want to show that z iff u E z and u $ w), since Cx. If y $ w, then Vu(u E Op(x w, y ) iff u E z and u $ w). 0
-
-
Corollary 16.15. T21 Bv, + BOp(vo,v,). Definition 16.16. Y3is a definitional expansion of dp, with the following new symbols and axioms: (i) W , a unary relation symbol. New axiom:
v, E u0 + Jv,.
Lemma 16.11. 9, != Jv, + JOp(v0, v,). PROOF. Assume that Jx, y is arbitrary, z = Op(x,y ) , w c z, and v is arbitrary; we want to show that w n, v has its usual meaning, i.e., that 3uVs(s E u o s E w and s E v). Since Jx, both x n, w and ( x n, w) n, v have their usual meanings. If y $ w or y $ v, then ( x n, w) n, v is the desired set u. If y E w and y E v, then Op((x n, w) n, v, y ) can be taken 0 for u. Definition 16.12. z2is a definitional expansion of Plwith the following new symbols and axioms: ( i ) C, a unary relation symbol. New axiom:
(ii) -, a binary operation symbol. New axiom:
(ii) S2, a unary relation symbol. New axiom:
Vvo[S2voo Bv,
A
Trans v,
A
Vvl(vl E V ,
-+ Trans
v,)
A
WV,].
The statement W x encodes several properties of x : each element y of x is regular, in that y E z E y is ruled out; each nonempty subset of x has a least element under the relation E, and each nonempty subset of x has a greatest element under E. The statement S2x is a conventional set-theoretical definition for x being a natural number, with a few redundancies because of our very weak axioms. It is routine to check the following two lemmas.
Lemma 16.17. Y3I. S2O. Lemma 16.18. 2T3 != Woo A v1 C vo -+ Wv,.
(iii) B, a unary relation symbol. New axiom: Vvo(Bvot,Jv,
A
Lemma 16.19.
Cv,).
-
Of course Cx means that the operation x y can always be performed in its usual sense. If Cx, we let x y have its usual sense, while x y = 0 if Cx fails to hold. The statement Bx means that x admits both of the Boolean operations n and -.
-
!= Bv, Lemma 16.13. 2.
A
-
v, G v, -+ Bv,.
-
PROOF. Assume that Bx and y G x. Thus Jx and Cx. Hence by 16.10, Jy. To check that C y , let z be given; we want to show that y z has its usual sense. But clearly Vw(wE y n, ( x z ) iff w E y and w $ z), since Jx, Cx, and y c x.
-
!= Jvo
A
W v o-+ WUv,.
PROOF.Assume that Jx and W x . To check W U x , we consider separately the three conjuncts in the definition of W . If y E U x , then y E x or y = x. In the first case, 73z(y E z E y ) since W x . In the second case, simply note that x E z E x would still contradict W x . Thus the first conjunct for W U x holds. For both of the other conjuncts we assume that y E Ux. If x $ y, then y _c x and the desired result follows in both cases because W x . Now assume that x E y. To check the second conjunct, note that it is obvious if y = {x), while if y # {x), then x n, y has its usual meaning (since Jx), and 0 # x n, y 5 x, so since W x , we may choose z E x n, y SO that Vw E x n, y ( z E w v z = w). Thus z E y, and if w E y then w E x or w = x, hence w E X A, y or w = x, and in either case z E w V z = W . -%a
0, e standard. Then by (i) there is an m E w such that Ix, - s I I e for all n 2 m. Thus the following formula v is satisfied in U = (R, 5 , I - 1, w, x) by m, s and E assigned to v,, v1 and v,, where S and T are interpreted by w and x respectively.
iff, > 2,
Now {i :f, > 2) E F since Lf] is infinite, and {i :fi > 2)
For any finite nonstandard real number r, the unique standard real s such that r *- s is infinitesimal is called the standardpart of r and is denoted by st r. Two nonstandard reals a and b are said to be infinitely close, in symbols a E b, if a *- b is infinitesimal. Clearly the difference and product of finite nonstandard reals are again finite. Hence the finite nonstandard reals form a subring 'R of *R. Every infinitesimal is finite. A sum or difference of infinitesimals is infinitesimal, and the product of an infinitesimal and a finite nonstandard real is again infinitesimal. The relation Y is an equivalence relation on *R, and each equivalence class contains at most one standard real. An infinite sequence x = (x, : n E w) of real numbers can be given two nonstandard interpretations. First, it is an element of "R,and hence t[x] is an element of *R. But also x can be considered as the set of all ordered pairs (n, xn) with n E w, and hence as a binary relation on R. As such it receives an interpretation *x as a binary relation on *R. Clearly *x maps *w into *R.
c {i :g, is a prime < f,),
p) E F, and {i :fi > p) c {i :p I gi}, so [g] is infinite. There are numbers divisible by infinitely many primes; an example is [(n! : n E w)]. Now we turn to nonstandard analysis. A nonstandard real number r is infinitesimal if *Ir 1 *< t for every standard positive real number t. The reciprocal of an infinite real number is obviously infinitesimal; thus by 20.1 infinitesimals exist.
Since U (*R, *I, *I -1, *w, *x) = *U, it is still satisfied in *U by the same elements. Thus *I*x, *- sl *I e for any infinite natural number n. Since e is arbitrary, (ii) holds. (ii) => (i). Assume (ii). Thus for any standard E > 0 the formula ~ v o ( %A v) is satisfied in *U by s and E assigned to v, and v,, so it is satisfied in U by the same assignment. Thus there is an m E w such that Ix, - s 1 i E whenever n 2 m. Since E is arbitrary, (i) holds. 0
Proposition 20.4. For any Jinite nonstandard real number r there is a unique standard real number s such that r *- s is infinitesimal. PROOF. We may assume that r * 2 0. Since r is finite, there is a natural number m such that r *I m. Let s be the inf of {t : t is a real number and r *I t). Thus s is a standard real number. If r *- s is not infinitesimal, choose a standard E > 0 with E *I *Ir *- sI. Then s - 4 2 *< r, so *Ir *- sI *< ~ / 2contradiction. , Thus r *- s is infinitesimal. Suppose that t is a standard real <s. Let E = (S - t)/2. Then t + e < s, so t + E *< rand *Ir *- t *> E , so r *- t is not infinitesimal. Similarly, if t > s, t standard, then r *- t is not infinitesimal. So s is unique. [7
I
Corollary 20.6.
Assume that limn,, x,
+
'
=
s and limn,, y,
=
t. Then
+
(i) limn,, (x, y,) = s t; (ii) limn,, (x, .y,) = s .t. PROOF. Let n be an infinite natural number. Then by 20.5, *x, *y, *- t are infinitesimal. Hence *(x + y), *- (s + t) = *x,
*+*- *y,s and *-
s *- t is also infinitesimal. So (i) holds by 20.5. Also, *(X.y)n*- s . t = *x, *.*yn *- *x, *.t *+ *x, * . t *- s *. t = *xn(*yn*- t) *+ (*x,*- s) *.t
Chapter 20: Nonstandard Mathematics
Part 4: Model Theory
is infinitesimal since finite. infinitesimal Hence (ii) is true by 20.5.
+ infinitesimal. finite = infinitesimal. 0
Corollary 20.6 is our first example of a standard theorem proved by nonstandard means. Note that no e, &methods were involved in this proof, although of course they were essential to connect standard and nonstandard notions, in 20.5. Another example of such a proof is as follows.
Since x *- a is infinitesimal, of course *Ix *- a1 *< 8. Hence by (2) in * R , *I*fx *- fa1 *< e. Since e is arbitrary, *fx E fa. Now assume (ii),and let e be any positive standard real. Let 5 be a positive infinitesimal. Then for any x E * R , *Ix *- a1 *< 5 implies that *Ix *- a1 itself is infinitesimal, or 0, so x N a and hence by (ii) *fx 21 fa. Thus, in * R
Since the same statement holds in R, f is continuous at a. Proposition 20.7 (Bolzano-Weierstrauss). at least one limit point.
PROOF. Let x E 9 2 be bounded. Thus there is an M E R such that lxnl < M for all n E w. Hence *It[x]l* I M also, since w = { n : lxnl I M ) E F. Let y = st t [ x ] ;we claim that y is a limit point of x. Given e > 0 and any positive integer m, we must find n 2 m such that lxn - yl I e. Now *It[x]*- yl * I e since t [ x ]*- y is infinitesimal, so {n : Ixn - yl I e) E F. In particular, there are infinitely many n so that Ixn - yl I e, as desired. 0 The notion of a bounded sequence can be given a nonstandard formulation as follows. Proposition 20.8. Let x
E
OR. Then the following conditions are equivalent:
( i ) x is a bounded sequence; (ii) *xn is finite for every infinite natural number n. PROOF. ( i ) s (ii). Choose a positive real number M such that Ixnl 5 M for all n. Since * R is an elementary extension of R for any structures over R, *I*xnJ*I M for all infinite natural numbers n also. Thus (ii) holds. (ii) => (i). Suppose ( i ) fails. Thus for every positive real number M there is an m E w such that lxml 2 M . The nonstandard version of this holds in * R ;taking a positive infinite M we obtain an m E *w such that *I *x,l * 2 M. Thus *xmis infinite. 0 Next we shall deal with functions mapping R into R. We start with a nonstandard formulation of continuity: Proposition 20.9.
For a n y f : R -+ R the following conditions are equivalent:
( i ) f is continuous at a; (ii) for all x N a we have * f x E fa. PROOF. First assume (i). Thus, in R, (1)
0
A bounded infinite sequence has
for every e > 0 there is a 8 > 0 such that for all x , if Ix - a1 < 8 then I f x - fa1 < e.
Now assume that x N a. Let e be any positive standard real number. By (I), still in R,choose a standard 8 > 0 such that, in R, (2) for all y, if 1 y - a1 < 6 then I fy - fa1 < e.
We shall give a mixed, standard and nonstandard, proof for the intermediate value theorem for continuous functions : Proposition 20.10. Let f be a real-valued continuous function defined on a closed interval [a,b],such that fa < 0 andfb > 0. Then there is a c E [a, b] such that fc = 0. PROOF. Let c = inf { x E [a, b] :f x 2 0). Thus
( 1 ) V x ( x < c * f x < O), (2) V x [ c < x s 3y(c I y < x and fy 2 O)]. Let i be a positive infinitesimal. By (I), *f(c *- i ) *< 0. By (2), choose y so that C * I y * < c*+ i and * f y * 2 0. Now c * - i N c 2: y, so by 20.9 *f(c *- i ) N fc N *fy. Since *f(c *- i ) < 0 I *fy, it follows that fc 2: 0 ; 0 hence fc = 0.
Lemma 20.11. Let f be a real-valued continuousfunction defined on a closed interval [a,b]. Then f is bounded. Hence *fc is finite for each non-standard C E [a, b]. PROOF. Suppose f is not bounded. Then it is easy to define a sequence x,, x,, . . . of members of [a,b] such that I fxil 2 i for all i E w. Let n be an infinite natural number. Since the sentence Vi(lfxil 2 i ) holds in R, it holds in *R.It follows that *f *xn is infinite. By 20.8, *xn is finite. Let y = st *xn. Then y N *xn, so by 20.9 fy N *f*xn, which is impossible since *f*xn is infinite. Thus f is bounded, i.e., V c E [a, b] 1 fcl I M for a suitable M . Since this holds in * R , it follows that *(*fcl * I M for all c E *[a,b], standard or not. 0 hoposition 20.12. Let f be a real-valued continuous function defined on a closed interval [a,b]. Thenf attains a maximum value on this interval.
PROOF. For any two integers i,j
E w with j # 0, let xi, .. Let m be an infinite natural number. Now
=
a
(1) for any standard c E [a, b] there is an i * I m such that c For, the following statement holds in R: V jE w
1Vc E [a, b]3i 5 j(xij 5 c 5
+ (i/j)(b - a). N
*xi,.
Part 4: Model Theory This holds in * R also, so there is an i * m~ such that *xi,*I c I* *(i*+ 1,m). Now clearly c *- *xi, *I l*/m, and l*/m is infinitesimal, so c 2: *xi, Next, note that the following statement holds in R:
Complete Theories
The statement holds in * R also, so we can choose i * I m such that V k *I m (*f*xkm*I *f *xi,). Let c = st *xi;note that *xiE [a, b] since V j E w 1 V i 5 jxijE [a, 61. Hence c E [a, b]. Since c 2: *xi,by 20.9 we have fc 2: *f *xi. Now for any y E [a, b], choose by (1) k *I m such that y 21 *xkm.Then by 20.9, f y 2: *f *xk,, while by the above *f*xk, *< *f *xi, E fc. Hence f~ 5 fc. 0
-
21
The above results indicate something of the flavor of nonstandard mathematics. The subject has now been rather extensively developed; one can do nonstandard algebra, complex analysis, functional analysis, topology, and even nonstandard logic. BIBLIOGRAPHY 1. Robinson, A. Non-standard Analysis. Amsterdam: North-Holland (1966).
EXERCISES 20.13. Let 2l be any model of the set of all sentences holding in ( w , r >. Show that the order type of U has the form w + ( w * + w ) .T for some type T. Also prove the converse. 20.14.
If a nonstandard natural number is divisible by all finite primes, then it is divisible by some infinite prime.
20.15. *Z is an integral domain which fails to satisfy the ascending chain condition or the descending chain condition. It is not a principal ideal domain. 20.16.* *Q is isomorphic to the quotient field of *Z. Every element of *Q is transcendental over Q. *Q is not a pure transcendental extension of Q.
Let S be the ring of finite elements of *Q, and let I be the ideal of infinitesimal elements of S. Show that S/Z R.
=
Let x E OR be bounded. Then st *xn is a limit point of x for every infinite natural number n. Using 20.9, show that the sum and product of continuous functions are continuous. A sequence x
E
converges iff * x ,
E
*xn for all infinite m and n.
I
'
Our main purpose in this chapter is to give concrete examples of complete theories. As a byproduct we obtain several new examples of decidable theories. We shall discuss some general model-theoretical methods for proving theories complete, mainly m-elementary extensions, the LoS-Vaught test, and model completeness. In our examples of complete theories we shall need to assume some familiarity with several standard algebraic notions and results. No single example is crucial for succeeding chapters. The notion of a complete theory is closely connected historically and philosophically with the notion of categoricity. As we shall see, the latter notion is trivial for first-order languages, but a cardinality version of it is quite interesting.
Definition 21.1. A theory I? is categorical if any two models of I? are isomorphic. Let m be a nonzero cardinal. A theory I? is m-categorical if any two models of I? of power m are isomorphic. Since isomorphism implies elementary equivalence, 21.1 combined with 19.2 yields
Corollary 21.2. Any categorical theory is complete. Now we show that categorical theories are trivial: Theorem 21.3. For any consistent theory I?; the following conditions are equivalent: ( i ) I? is categorical; (ii) there is a positive integer m such that model of r has power m.
r
is m-categorical and every
Chapter 21 : Complete Theories
Part 4: Model Theory
of {x, :j 2 n, a, < x,). If y, 2 ' yt, let y, +, = b,. If y, < ' yt, choose y, such that y, < y,+, < yt. Case 2. n even. Interchange A and B in Case 1. By an easy induction on n it is established that
PROOF. Obviously (ii) (i). Now assume (i). Since any two models of r are isomorphic, they all have the same cardinality m, and r is m-categorical. Suppose m 1 X,. Let 2l be a model of r , and by the upward LowenheimSkolem theorem let 23 be an elementary extension of 2l of power >m. Then 0 2l =, 23, so 23 is also a model of r, contradiction. Hence m < H,. Much of the importance of the notion of m-categoricity stems from the following result.
Theorem 21.4 (EoS-Vaught test for completeness). If I? is a theory with is categorical in some power m 2 IFmlasl, only infinite models and then I? is complete. PROOF. We need to show that any two models a , 23 of r are elementarily equivalent. By the Lowenheim-Skolem theorems there are 9-structures a', 23' of power m with 2l =,, 2l' and 23 =, 23'. Thus 2l' and 23' are models 23' by assumption. Hence 2l re,23. 0 of r, so 2l' There are many theories which satisfy the hypothesis of 21.4, which hence gives a practical method for showing many theories complete. The assumption of categoricity in power 2 (Fmla21 is necessary in 21.4; see Exercise 21.38. As we shall see later, there are many complete theories which are not categorical in any power. We now give a few applications of 21.4. More are found in Exercises 21.39 and 21.40. A linearly ordered set A is densely linearly ordered if for any x, y E A with x < y, 3a(x < a < y). The argument proving the following settheoretical result is frequently used in some form in model-theoretic arguments (see also 9.47).
Theorem 21.5 (Cantor). Let A and B be two denumerable densely linearly B. ordered sets, each without first or last elements. Then A PROOF. Let < and < ' be the dense linear orderings of A and B respectively. Say A = {a, : n E w) and B = {b, : n E w), with a and b one-one. We define a sequence ((x,, y,) : n E w) by induction. Let (x,, yo) = (a,, b,). Suppose (x,, yo), . . ., (x,, y,) have already been defined so that x,, . . ., x, are all distinct and yo, . . .,y, are all distinct. We distinguish two cases. Case I. n is odd. Let x,,, = a,, m the least element of {p : a, ${x,, . . . , xnH. We define y, + by considering several subcases. Subcase I. a, < xi for all i I n. Since B does not have a first element, the set M = {b, : b, < ' y, for all i 5 n) is nonempty; let y,,, be any element of it. Subcase 2. xi < a, for all i r n. This case is similar. n. There are unique s, t such that Subcase 3. xi < a, < x, for certain i, j I x, is the greatest element of {xi : i r n, x, < a,) and x, is the least element
,
(1)
for every n < w, {(x,, yo), . . ., (x,, y,)} is a one-one function such that xi < x j iffy, < yj; {a,, . . ., a,) E {x,, . . ., x,,); {boy. . ., b,) E { Y O , .. -,yzn+d
Let f
=
{(xi, yi) : i < w}. f is the desired isomorphism.
+
,
0
Since we can obviously write down finitely many axioms expressing that
< is a dense linear ordering on A without first element or last element, the theory of such structures is recursively axiomatizable. Hence by the to$-Vaught test and 21.5 we have:
Corollary 21.6. The theory of dense linear order without first or last elements is complete and decidable.
By Theorem 9.48 we know that any two denumerable atomless Boolean algebras are isomorphic. Hence : Theorem 21.7. The theory of nontrivial atomless Boolean algebras is complete and decidable. It is well known that for any m > H,, any two divisible torsion-free Abelian groups of power m are isomorphic. Hence:
Theorem 21.8. The theory of nontrivial divisible torsion-free Abelian groups is complete and decidable. Any field can be obtained by a pure transcendental extension of its prime field followed by a pure algebraic extension. Hence for any m > Ho, any two algebraically closed fields of power m that have the same characteristic are isomorphic. Hence :
Theorem 21.9. For any p (p a prime or p = O), the theory of algebraically closedfields of characteristic p is complete and decidable. Theorem 21.9 forms a partial justification for the heuristic Lefschetz principle in algebraic geometry, according to which results over the complex field generalize to results over any algebraically closed field of characteristic 0. Note that, by 21.9, to establish a first-order 'statement for all algebraically closed fields of characteristic 0 it suffices to prove it for the complex field, where one has available all the tools of classical analysis. Next, let F be any field. We can describe a first-order language 2 appropriate for discussing vector spaces over F. Namely, 9 is to have the binary
Part 4: Model Theory
Chapter 21 : Complete Theories
+,
operation symbol the individual constant 0, and for each a E F a unary operation symbol s,. Then the theory of vector spaces over F is the set of all consequences of the axioms for Abelian groups ( A , 0) together with all sentences of the following forms:
+,
+
+
for each a E F; V ~ o V v l [ ~ a (vl) ~ o= S,V, savl] V U ~ ( S , +=~S,U, U ~ sbvO) for all a, b E F; Vuo(s,,vo = sasbvo) for all a, b E F; Vv0(s,vo= u,).
+
Now any two vector spaces over F of the same dimension are isomorphic. Hence the theory of vector spaces over F is (IFI+ u *,)-categorical, and hence :
Theorem 21.10. For any field F, the theory of infinite vector spaces over F is complete. All of the above theories I? have the following property: if I? is m-categorical in some power m > IFmla91, then I? is m-categorical in every such power. One of the deepest results in model theory, due to Morley and Shelah, is that this implication holds for all theories I?. We shall next present a modified notion of elementary equivalence which has been used by Dana Scott to show that certain theories are decidable or complete.
theorem on isomorphisms it follows that x:, 6 $%. Since x:, duction hypothesis yields x;, $ $%. Thus x $ cps, as desired.
E
wB, the in-
0
Corollary 21.13. Assume that 9 c U, and that for any X G B with I X I < w, and any a E A, there is an automorphism f of U such that f 1 X = I 1 X and fa E B. Then 9 U.
(i). Assume (iv). Let U and 23 be nibdels of r such that U E '13, let x E OA, and let p, be any formula. By (iv), let $ be a universal formula such that Fv p, = Fv 4 and I' k p, t,$. Then 23 k g,{x] implies 23 k #[x] (since 3 k I?) 21.23(i)) implies U k v[x].
implies U k $[x] (by
Chapter 21 : Complete Theories
Part 4 : Model Theory
(iii) 3 (0). Trivial. (u) => (iii). To prove this implication, it suffices to establish the following quite general logical fact: for any existential formula p there is a system ($i : i < m ) of primitive formulas such that kp o Vi,, 4,. The procedure for showing this is similar to our method for eliminating operation symbols in Chapter 11; see 11.26. Namely, p has the form 3ui0. . . 3 ~ ~ ( , , , - ~where )p', p' is quantifier-free. Now we may assume that p' is in disjunctive normal form, and (4)
the atomic parts of pf have the forms Rv,,. . -u,,,0 v j o .' ' U j ( , - 1) ujn.
-
The following proposition is proved just like 21.29: i
Proposition 21.31. If then I' is complete.
r is model complete and has thejoint extension property,
As our final theoretical result concerning model completeness, we shall use the concept to give a highly useful purely mathematical condition for completeness.
,, or
Theorem 21.32. Let
be a theory satisfying the following two conditions:
( i ) if% and 23 are any two models of r, then everyfinitely generated substructure of U is embeddable in 23; (ii) ifU and 23 are any two models of I', U G 23, and 23' is aJinitely generated substructure of 23, then there is an embedding f of 8' into U such that frAnB1=IrAnB'.
This is easily seen from the following logical validities, where a,, . . ., an- ,, P are new variables:
Then 'I is complete.
PROOF. First we show that r is model-complete; to prove this we shall apply 21.27(iii). Assume, then, that U and 8 are models of I', U G 8, x E "A, cp is a universal formula, and not (8C p[x]); we want to show that not (9L C ~ [ x ] Say ) . p = Vuio.. .Vq,,-,,+ with $ quantifier free. Then there is a y E "B with not (23 C $ [ y ] ) and y, = x j for all j E w {iO,. . ., im-l}. Let M = { y , : v, occurs in p}, and let 8' be the substructure of 23 generated by M. Choose z E "B' with z j = y, whenever uj occurs in p. By our assumption (ii), there is an embedding f of 23' into U such that f 1 A n B' = I A n B'. Since $ is quantifier-free, 8' C i $ [ z ] and so U C i$[f z ] and 51 C i p l f o z]. Since ( f z), = x j for uj occurring free in p, U k i p [ x ] ,as desired. Now to show that r is complete it suffices by 21.27(iu) to show that if a universal sentence holds in one model of I'then it holds in any model of I'. Let p = Vvio...VU~(,-~)$ be a universal sentence, with $ quantifier-free; suppose that U and 23 are models of r and U C i p . Choose x E "A such that 3 C -+[XI, and let U' be the substructure of U generated by {x, : v j occurs in $1. We may assume that x E "Af. By our condition ( i ) , let f be an embedding of U' into 23. Then 3' C i + [ x ] ,hence 8 C i $ l f o x ] , hence 8 k i p .
From (4), making use of the validity C3a(p v +) o 3ap v 3 4 , our logical fact above follows. 0
r
0
By 21.27(iu) we see that model completeness is related to elimination of quantifiers: quantifiers can "almost" be eliminated. In the exercises it is shown that a theory can be model complete without being complete, and complete without being model complete. We now turn, however, to conditions which, when added to model completeness, give completeness. These conditions are important in their own right.
0
Definition 21.28. U is a prime model of I' if U is a model of I'and U can be embedded in any model of I'. Proposition 21.29. If I' is model complete and has a prime model, then complete.
-
r is
PROOF. Let U and 8 be any two models of I'; we show that U 23. Let O be a prime model of I'. Thus there are embeddings f and g of O into U and 9 respectively. Since I' is model complete, f and g are actually elementary 0 embeddings. Hence U = g = 8. Definition 21.30. A theory I' has the joint extension property if any two models of F can be embedded in a model of F.
We finish this chapter with two important examples of complete theories proved via model completeness: the theory of infinite atomic Boolean algebras, and the theory of real-closed fields. To fix the notation for the logical theory of Boolean algebras we introduce the following definitions. '
Definition 21.33 ( i ) YBA is a first-order language for Boolean algebras; the only nonlogical constants are -,-, 0, 1, operation symbols of ranks 2, 2, 1, 0,0 respectively.
i\
+,
7
cn
Part 4: Model Theory
Chapter 21 : Complete Theories
(ii) r,,, the theory of Boolean algebras, has as axioms the formal sentences corresponding to the axioms given in 9.3. (iii) p,, is the following formula of ZBA:
is the set of all atoms of U. Thus Fv p,, = {v,) and for any BA U, (iv) FA, is the extension of ,?I with the additional axiom
Thus U is a model of I?,, iff U is an atomic BA. (v) I?,", is the extension of I?,, with the following additional axioms (for each m E w 1):
-
Thus 24 is a model of l?s iff U is an infinite atomic BA. (vi) ZAtis an expansion of ZBA obtained by adjoining a new unary relation symbol P. (vii) ,I?, (resp. ,I?,",) is obtained from ,?I (resp. I?%) by adjoining the following sentence as an axiom:
It is obvious that (PA,, ,FA,) is a definitional expansion of (SBA,FA,), We shall actually and (SAt, ,Fh) is a definitional expansion of (SBA, show that ,I?,", is complete, from which the completeness of ,",r is clear. To prove ,I?", complete we apply 21.32, which shows that is also modelcomplete (see the proof of 21.32). It is easy to see that FA", itself is not model-complete (see Exercise 21.47). The trick of adding a defined symbol to convert a theory into a model-complete theory is rather common.
rz).
Theorem 21.34.
The theory of infinite atomic Boolean algebras is complete.
PROOF. AS indicated above, it suffices to use 21.32 to show that ,I?; is complete. First we verify 21.32(i). To this end, let (U, P ) and (23, Q) be two models of ,I?& and let (U', P') be a finitely generated substructure of (U, P). By exercise 9.65 we know that A' is finite, so by 9.29 U' is atomic. Let a,, . . ., am-, be all of the atoms of U'; say a,, . . ., a,-, are also atoms of U, while a,, . . ., a,-, are not atoms of 3 . Thus n = 0 is possible, but n < m, since otherwise a,, . . ., am-, would be all of the atoms of U and hence, as is easily seen, U would be finite. Let R,, . . ., Rm-, be a partition of Q into nonempty sets such that I R,I = . . . = I R,- ,I = 1, I R,( = . . . = IRm-,l = 2, and hence IRm-,I = 1 Ql 2 No. For each j < m - 1, let , letbm-I = -(bo + . . . + bm-,). Then b, = Z X E R i xand
Now for any x E A' we set fx = C {bj : a, I x}. It is easily seen that f embeds U' into 8. We have to also check that f preserves P. For any x E A', XEP' i f f x ~ P iffxisanatomofU iff fx is an atom of 23 iff 3j < n (x = a,) iff fx E Q. Thus 21.32(i) holds. To verify 21.32(ii), assume that (U, P ) and (23, Q) are models of ,I',", that (4P) _c (23, Q), and that (8', Q') is a finitely generated substructure of (23, Q). Thus, again, 23' is a finite BA. Now A' = A n B' is the universe of a subalgebra U' of U. Let a,, . . ., a,-, be a list of all of the atoms of 3'. Then by 9.34 we have Xi,, a, = 1. Hence by 9.44 we have:
r
for each i < m,either U 1a, g 23 1 a, or else both U a,and (4) 8 [ a, are infinite atomic BA's. For, let i < m; there are then two cases which present themselves. Case 1. U [ a, is finite. Then U 1 ai is atomic; let e,, . . ., en-, be all of the atoms of U 1 e,. Thus U b pAt[e,]for each j < n, so e, E P 5 Q and hence e, is an atom of 9. Also, X,,, e, = a,. Hence 23 1 a, is also an atomic BA with exactly n atoms. Therefore U 1 a, g 8 1 b,. Case 2. U 1 a, is infinite. Then 23 [ a, is also infinite; and both U [ ai and 23 1 a, are atomic. Hence (4) holds. By (4), for each i < m the BA 23' 1 a, can be embedded in U 1 a,. Hence by (3) 8' can be embedded in U so that elements of B' n A are k e d . 0 Now we turn to the theory of real-closed ordered fields. We shall establish the famous result of Tarski that this theory, too, is complete. We assume only a knowledge of real-closed ordered fields such as is found in van der Waerden. The language Z which we deal with has operation symbols *, -, 0 , l of ranks 2, 2, 1,0, 0 respectively, and a binary relation symbol 5 . We begin with a purely algebraic lemma not found in van der Waerden.
+,
Lemma 21.35. Let U be a real-closed orderedfield and let U(b) be a simple transcendental ordered extension of U; denote the order of U(b) by < . If < is any order on U(b) which makes it into an ordered$eld, and if Va E A (a < b e a 4 b), then < = 4. PROOF. It suffices to show that U(b) has the same positive elements under < and is I or 0, and K(B:jeJ' is J or 0. Furthermore, the first is I iff the second is J , since U =, 9. Hence for any sentence X, if (p, $0, . . ., #m) is correlated by 23.3 we have
Theorem 23.6 (Vaught). If
Pi,, a,k x for
eachJinite F G I, then
Pis' ai
x.
Chapter 23 : Generalized Products
Part 4: Model Theory
PROOF. We may assume that I is infinite. Assume the hypothesis of 23.6. Let (p,, #, . . ., #), be correlated with x by 23.3. Set L = {k I m : K:, is finite}. For each s E w let 9, be the following sentence of the theory of Boolean algebras.
Vv, . . .Vu,[((v,, . . . , v,) forms a partition of the universe) A AkSL (there are exactly I KykI atoms I v,) A A,,,, + (there are at least s atoms I v,) + TI.
,,,,
Theorem 23.9. I f {X: K k X} is decidable, then so is {X: P K k x), where P K is the class of all products of members of K. PROOF. The decision procedure for {x : P K k is as follows. Given X, let (T, +, . . ., #), be determined as in 23.3. Then let T = {k I m : K k i#,}, which can be effectively determined, by assumption. Let 9 be the following sentence of the theory of Boolean algebras:
We claim (I)
there is an s E
w
such that 9, holds in every finite BA.
Otherwise, for each s E w let 23, be a finite BA in which 9, fails; say b;, . . ., b; E B, satisfying the hypothesis of the implication above but not p, in 23,. Choose a finite L, c I so that E L, for each k E L , while L, n KTk has at least as many elements as there are atoms of 23, I b;, for k E (m 1) L. Note that K:JL" L, n K$k for each k 5 m. Let O, = SL,. Clearly there is an isomorphismf, of 23, into O, such that f,b+ KfLLVor each k I m. Thus 23, k i p , [ b & .. ., b;], while O, k p,[f,b&. . .,f,b;], by the hypothesis of the theorem. Let F be a nonprincipal ultrafilter over w . Then P,., 23JF and P,,, Q,/F are infinite atomic BA's. Let bj, = [(b", s E w ) ] . Then there is an isomorphism g of P,,, B,/F into P,,, O,/F such that g [ x ] = [ ( A x , : s E w ) ] for all x E P,,, B,. NOWlet 23' and g' be the expansions of PSEW23JF and P,,, 0,lF respectively to models of ,I?,",. By the proof of 21.34, ,I?,", is model complete. Hence by 21.27(iu) there is a universal forin ,I'," such that ,I?,", k p, o # and Fv E {v,, . . ., v,). Since mula O' k p,[gbb, . . ., gb,], it follows that Q' k #[gb,, . . ., gb,], hence 23' 1 #[bb, . . ., b,] and 23 b p,[b,, . . ., b,]. But also 23 k ip,[%, . . ., b;], contradiction. Thus (I) holds. From (1) and the completeness of the theory of infinite atomic BA's it follows that 9, holds in all infinite BA's, for some s. Choosing such an s, we see that SI k p,[K$,, . . ., K?,,,]. Hence by 23.3, Piel Ut b x. 17
+
+
-
ek
+
Corollary 23.7. If F is a set of sentences and Mod C! = {U : U is a model of r } is closed under products with two, or zero, factors, then Mod I? is closed under arbitrary products. Finally, we give some applications to decidable theories.
PK 1 x iff 9 holds in all atomic BA's. (1) By 21.34 and 15.6, this completes the decision procedure. To prove (I), first suppose that P K k X. By 21.34 it suffices to show that 6 holds in any BA of the form SZ. Assume that J,, . . ., J, G I, they form a partition of I, and J, = 0 whenever k E T ; we must show that SI C v [ J 0 ,. . .,J,,,]. NOW for k E ( m 1) T there is a structure Uk E K such that 21, 1 #., Define 23: I + K as follows. Given i E I, there is a unique k E (m 1) T such that i E Jk, and we set 23, = U,. Thus KFk 2 Jk for 1, and hence, since (p,, #, . . ., +), is partitioning, KFk = Jk each k ~m for all k E m 1. But P K I= X, so by 23.3, SI k p,[KFo,. . . , K?,], as desired. Conversely, suppose that 9 holds in all atomic BA's. To show that P K k X , let U: I -+ K be given. Then K?,, . . ., K $ , forms a partition of I, and K?, = 0 if k E T. Hence, since 9 holds in SZ, we see that SI C. p,[KFo,. . ., KF,]. Hence, 0 by 23.3, PiSI Ui k x.
+
+
-+
+
We conclude this chapter with two simple applications of the above results. Corollary 23.10. The theory of Boolean algebras which have a maximal nonzero atomless element, but infinitely many atoms, is complete and decidable.
PROOF. Let 21 and 23 be two such Boolean algebras. Then we can write 9.4 2 0, x 0, and 23 9, x 9,, where 0, and 9 , are atomless, while El and 9, are infinite atomic. By 21.7 and 21.34 we have Oi =, 9,for i < 2. Hence 21 re,23 by 23.4. 0 The following is immediate from 23.6:
Theorem 23.8. If U has a decidable theory, then so does 'BL. PROOF. From 21.34, SI has a decidable theory. The decision procedure for {X : 'U k x) goes as follows. Given X, determine (p,, #, . . . , +), by 23.3. m. Hence we can determine if SIC. Note that K1,', = I or 0 for each k I p,[K?,,. . ., K?,,,] by first deciding whether or not 9l k for each k 5 m, then using the decision procedure for SI. By 23.3 this gives the decision procedure for 'U k x. 0
-
.
Corollary 23.11. For any structure 21, a sentence of 21 r f f p, holds in allfinite powers 'U of U , i E w.
p,
holds in all powers
'a
+,
gin be an expansion of the language for Boolean algebras obtained by adjoining a unary relation symbol Fin. Given any formula p, of Tfi,
23.12. Let
201
Chapter 23 : Generalized Products
Part 4: Model Theory
and any rn E w with Fv p, s {vo,. . ., urn- one can effectively find M E w , functions pk eSrnw for each k < rn and partitions (U:, U:, Ug,U $ ) of Sm for each k c: M, such that for any 9-structure of the form % = ( S I , U , n, -, 0 , I, F,), where FI is the collection of all finite subsets of I, and given x E OB the following conditions are equivalent: ( i ) 23 b d x l ; (ii) there exists k < M such that for each r E m, the set ni,,xi n n l s m - r ( I X I )has: (a) exactly pkr elements, if r E U:; (b) at least pkr elements, if r E UE; (c) at least pkr elements, but only finitely many elements, if r E U'j; (d) infinitely many elements, if r E Uf. Hint: proceed by induction on p,, beginning with atomic formulas of the form vt v,, v, vf vk, etc.
=
+ =
=
= = =
= = = = =
Note that if yi = 0, then vi does not occur free in q~,. Now show that for I), any p,, y, x, z, if p, and y are as above, x E Ow, y E sg x , z E O(W zi = x i if xi i0 , and zi = 1 if xi = 0, then ( w , .) bp,[x]iff (w 1, .) C p,,[z]. Then use 23.16. 0
--
23.18. The theory of any free Abelian group is decidable.
23.13. The theory of a structure of the form 8 in 23.12 is decidable. 23.14. Let a language 2 ' have a certain individual constant c in it. Given a system (a,, . . ., a,- ,) E Ra. Hence a one-one homomorphism is not necessarily an isomorphism. We state without proof two very easy consequences of the definition of homomorphism; the first proposition is a generalization of a part of 18.23. Proposition 24.4. Let f be a homomorphism from U into 23; let o be a term, and let x E OA. Then foUx = uCD(fox). Proposition 24.5. Let (Ui : i E I ) be a system of 9-structures. Then pr, is a homomorphism from Pi,, Ui onto Ui. Now we introduce a useful notion related to the notion of homomorphism ; in fact, it can be considered as a kind of internal version of homomorphisms. Definition 24.6. Let 9 be an algebraic language, and let 24 be an 9-structure. A congruence relation on U is an equivalence relation R on A such that for any operation symbol 0 (say m-ary) and any a, b E "A, the condition V i < m(a,Rbi) implies OU(a,, . . ., a, - ,)ROU(b,, . . ., b, - ,).
Part 4 : Model Theory
Chapter 24: Equational Logic
Given such a relation R, we can define a uniquely determined 2'structure UIR whose universe is the set AIR of R-equivalence classes and whose operations are given by this structure is denoted by UIR. Iff is any function, then the kernel off, kerf, is {(x,y ) : x , y and f x = fy).
E
PROOF. Obvious from 24.4. Thus a variety is closed under all three operators H, S, and P. The main theorem of this chapter is that the converse holds. Before beginning the proof of this, we want to develop the basics of general algebra and equational logic a little further. The following proposition is easy to prove.
Dmn f
The basic facts relating homomorphisms and congruence relations are as follows:
Proposition 24.7. Let 2' be an algebraic language, and let U and 9 be 9structures. ( i ) If R is a congruence relation on U, then [ 1, is a homomorphism from U onto UIR. (ii) I f f is a homomorphism from U into 23, then kerf is a congruence relation on U. (iii) I f f is a homomorphism from U onto 23, then 23 UIR; in fact, there is an isomorphism g from 23 onto UIR such that g f = [ 0
Proposition 24.10 ( i ) SHK c HSK. (ii) PSK G SPK. (iii) PHK 5 HPK. Easy examples can be given to show that none of the inclusions in 24.10 can be replaced by equalities, in general; see Exercises 24.25-24.27. These inequalities lead to the following useful equivalences.
Proposition 24.11. The following conditions are equivalent: (i) K = SK = HK = PK. (ii) K = HSPK. (iii) K = HSPL for some L. PROOF. Obviously ( i ) => (ii) 3 (iii). Now assume (iii). Clearly HK and K c SK, K c PK. Next,
SK PROOF. Conditions ( i ) and (ii) are completely straightforward. Now assume the hypothesis of (iii). Let g = {(fa, [a]): a E A}. To see that g is a function, assume that fa = fc with a, c E A; we must show that [a] == [c]but this is obvious. Thus g : B + AIR. Similarly, g is one-one. If 0 is m-ary and a E ,A, then
g 0% (fa,, . . . ,fa,
-
J
= =
Hence g : 23 H UIR. Obviously g f 0
gf 0% (a,, . . . , a,- 1) [OU(ao,. . ., a,- dl = OUIR([aol, . . ., [a, - 11) = OUlR(gfao,. . .,gfa, - ,). = [
1.
= =
0
{U : U is a homomorphic image of some 23 E K); {U : U is isomorphic to an ultraproduct of members of K).
Note that all of the classes SK, PK, HK and UpK are closed under taking isomorphic images.
Proposition 24.9. If K is a variety, then K
=
HK.
SHSPL G HSSPL = HSPL = K.
by 24.10(i)
PHSPL c HPSPL c HSPPL HSPL = K.
by 24.10(ii), (iii)
=
Finally,
PK
= =
0
To prove our main theorem, we need the notion of an absolutely free algebra. As will be seen, this notion is very analogous to the construction in 11.12 of an "internal" model for a consistent set of sentences. It is really just a part of that construction.
Definition 24.8. Let K be a class of 9-structures, where 2' is not necessarily algebraic. We set HK UpK
K
=
Definition 24.12. Let 2' be an algebraic language. We construct an 2'structure $r, which will be called the absolutely free 2'-algebra. Its universe is Trm2, and for any operation symbol 0 of 9, O ~ = q a .O. .,, a,
=
05,. . .am-1.
Now the definition of satisfaction yields the following basic fact about 5r, :
Proposition 24.13. If 2 is algebraic, is an 2-structure, and x <sax : a E Trm,) is a homomorphism of Srz into U.
E
" A , then
Chapter 24: Equational Logic
Part 4: Model Theory
A very useful congruence relation on 5r2 is introduced in the following definition. Delinition 24.14. If 9 is an algebraic language and we let of 9, zr = {(a, T) : a,
Proposition 24.15. relation on Sr,.
T
E
Trmp and
r is a set of equations
r != o = T}.
Under the assumptions of 24.14,
-,is
a congruence
(i) I? t,, a = a ; (ii) if I' t,, o = T, then I? t,, T = a; (iii) ifr I-,, a = T and r be, T = p, the12 r I,,a = p; (iv) if 0 is an operation symbol, say of rank m, and if o,, . . ., a,-,, T~ for each i < m, then TO,.. ., T,-, are terms such that r t,, U, r lep OD,.. .am-1 = o r , . . .Tm-l.
=
PROOF. Condition (i) is obvious from 24.17(ii) and 24.17(iii). For (ii): assume that I? be, o = T. We also have I? I-, T = T by (i), SO I? I,,T = a by 24.17(iv). Condition (iii) clearly follows from (ii) and 24.17(iv). To prove (iv), let a,, . . ., am-,be distinct variables not occurring in any of o,, . . ., am-,, TO,. . ., T,-~. Then
The following simple proposition is proved by induction on a : Proposition 24.16. If g is a homomorphismfrom 5r2 into U, and ifxi for every i < w, then (TUX = ga for every term a.
=
gv,
Recall that, by the completeness theorem, the model-theoretic condition I? =! p, is equivalent to the proof-theoretic condition I? t p,. If we apply this fact when p, is an equation and I? is a set of equations, it seems a little unsatisfactory, since the proof-theoretic condition involves the logical axioms and hence the whole apparatus of first order logic. We now describe a prooftheoretic condition in which only equations appear-no quantifiers and not even any sentential connectives. Definition 24.17. Let I? be a set of equations in an algebraic language. Then r-eqthm is the intersection of all sets A of equations such that the following conditions hold : (i) I? E A; (ii) vo = vo E A; (iii) if p, E A, i < w, o is a term, and $ is obtained from p, by replacing vi throughout p, by a, then E A; (iv) if o = T E A and p = T E A, then a = p E A; (v) if a = T E A, 0 is an operation symbol, say of rank m, i < m, and a,, . . . , am-2are variables, then the following equation is in A: O(aO,. . ., ai-1, 0, ai,. . . , a m - J O(ao, . . ., ai- ,,T, ai, . . . , a m -2).
+
-
We write I? t,, p, instead of p, E I?-eqthm. We shall prove an analog of the completeness theorem for this notion. First a technical lemma: Lemma 24.18. Let I? be a set of equations in an algebraic language. Then for any terms a, T, p,
Now several applications of (iv) give the desired result. Theorem 24.19 (Completeness theorem for equational logic). Let I? U {p,} be a set of equations in an algebraic language. Then I? k p, iff I? t,, p,. PROOF. It is easily checked that I? I-, p, => r k p,. Now suppose that not(I' t,, p,); we shall construct a model of F u { i[[p,]]}. In fact, the desired model is simply 2l = $r/z,. To show that U is a model of I?, let a = T be an arbitrary element of I?, and let x E 0Trm2; we want to show that a%([ ] x) = T%([] x). TO do this, for any p E Trm2 let S p be the result of simultaneously replacing vi by xi in p, for each i < w. Then 0
0
be all of the variables occurring in the To prove (I), let q,, . . ., v,,,-,, equation a = T. Let Po,. . . ,Bm-, be new variables, not appearing in o = T, and not appearing in xi,, . . ., x ~ ( ~ -Let ~). different from viO,. . ., vi(,a' T' be obtained from a = T by replacing in succession 4, throughout by Po, vil throughout by B1, . . ., vi,,throughout by 6,- ,. By 24.17(iii) we have I? t,, 5' = 7'. Since Po, . . ., Pm-, do not occur in o = T and they are different from viO,. . ., u , ( ~ - ~the , , equation a' = T' is also obtainable from a = 7 by simuItaneousIy replacing uiO,. . . , ~ i ( ~ - 1 by ) Po, . . . ,B m - 1 respectively. Now by replacing Po throughout by xi,, then throughout by xi,, . . ., Pm-, throughout by xi,,-,, we obtain So = STand (1) follows. Note that Po,. . ., Bm-, are introduced to reduce simultaneous substitution to a sequence of simple substitutions. Next, note that
=
(2)
,,
,
for any term p we have
pa([ ]
0
x) = [ S p ] .
Chapter 24: Equational Logic
Part 4: Model Theory
By the axiom of choice let x by
Condition (2) is easily proven by induction on p. From (1) and (2) we obtain oU([ 1 x) = [Sa] O
=
=
g,F g,F
[ST] = T%([] 0 x).
E
,P,,
=
A,. For each a 6 A define g, a
= X,
and let fa
24.16 we obtain oty = [go] and rZy = [T,]. Since not(r t,, oo have [o,] # [T,]. Thus a, = TO fails t o hold in U.
Theorem 24.22 (Birkhoff). K is a variety iff K
= T,),
we
0
' is an algebraic Lemma 24.20. Let K be a class of 2-structures, where 2 language. Let I' = {o = T : the equation o = T holds in each member of K) Then ~ r s / - , E SPK.
= =
T E I?). Then for each (a, T) 6 I there PROOF. Let I = 2Trm {(a, T) : u is a structure U,, E K such that a T fails to hold in U,,; hence, further, there is an xu, E "A,, such that oU~=x,, # T ~ ~ ~ =Let x , , .y be the unique element of U, such that for each m E w and i E I, (y,), = (xi),. Let -23 = PiorU,. Then
-,
(1)
,
, , I
?
, # f [TI. Hence osy # ~ ~ SOyf [o]
0
We now find it convenient to prove Exercise 19.42.
Lemma 24.21. Suppose K = SK = UpK, in a not necessarily algebraic language 2. If 81 is an 2'-structure rveryjnitely generated substructure oj which is in K, then ?I is in K. PROOF. Let I = { F :0 # F G A, F finite]. For each F E I, let ?IF be the substructure of ?igenerated by F. Thus 91, E K by assumption. For each F E I let M , = {G E 1 : F G G). If F, G E I, then M, n M , = MFUG.It follows that there is an ultrafilter 3 over I such that M , E 5 for all F 6 I. Thus PFEr?1,/5 E K, so it suffices to define an embedding f of ?I into P,, ?1,/$.
[gal5. The desired properties off are easily checked. =
0
HSPK.
for every b E B there is a term
o
such that osx
=
b.
Indeed, let C = {oax : o E Trm9). It is easily seen that F cr C and C is a subuniverse of U, so B G C, as desired in (1). Now U is a model of r and -23 c 94 so 9 is a model of r. Hence there is a function f mapping Fry/=, into B such that f [a] = ocDxfor all o E Trmy. Clearly f i s a homomorphism from 3t2/=r into 9, and it is onto by (I). Hence -23 E K by 24.20. 0
=
T. Thus r I: u = T, so it follows that u T holds in every For, suppose u member of K. From 18.14 we infer that u = T holds in -23, as desired. By (1) there is a mapping f of Fr2/=, into B such that f [o] = ocDyfor each term a. It is easily checked that f is a homomorphism of $r2/=, into 23. It only remains to check that f is one-one. Suppose [a] # [TI. Thus not (I? k a = T), SO in particular o = T $ r. Thus (o, T) E I. Hence
A,
PROOF. The trivial direction 3 is given by 24.2 and 24.9. Now assume that K = HPSK. By 24.1 1, K is closed under H, S, and P ; and so it is also obviously closed under Up. Let I' = {o = T : u = T holds in every member of K}. We claim that K is exactly the class of all models of I'. Obviously each member of K is a model of r. Now let U be a model of I?. By 24.21 it now suffices to take any finitely generated substructure -23 of U, say generated by F # 0, F finite, and show that 23 6 K. Choose x E "B so that Rng x = F. Then
Now we return to our discussion of free algebras, and give a lemma needed for our main characterization theorem.
-
=
P,,,
iff a E A,, otherwise,
Thus a T holds in 21, so U is a model of I?. However, U is not a model of p,. For, say p, is the equation a, TO.Let y, = [v,] for each i E w . Then by
=
E
Theorem 24.22 is a typical characterization theorem (it was historically the first such). A logical concept (variety) is characterized in terms of nonlogical notions (closure under H, S and P). It may of course also be viewed as a characterization of closure under H, S, and P in terms of the logical notion of a variety. Such equivalences between notions in widely separated domains are typical of a large part of model theory and illustrate a healthy trend toward unification in mathematics. A closely related result is the following preservation theorem.
Theorem 24.23. Let p, be a sentence, in an algebraic language, which is preserved under H, S, and P. That is, assume about p, the following three things : ( i ) if ?I k p, and ?L -n 9, tlwn B k p,; ( i i ) $91 k p, and 9 c ?l, then 9 I: p,; (iii) 1y?1,I: p, for each i E I, then P,, 91, I: P) Then there is a conjunction $ of equational identities such that kp, tt $. PROOF. Let K be the class of all models of p,. The conditions (i)-(iii) imply that K = HSPK. Hence by 24.22 there is a set r of identities such that K is the class of all models of I'. Thus 1' k p,, so I:++- p, for some finite conjunction # of members of r. But obviously kp, +- $ also, so kg, +. U
-
I na
Part 4: Model Theory
Theorem 24.23 is a typical preservation theorem. Such a theorem has the following form: if a sentence p, is preserved under certain algebraic operations or relations, then p, is equivalent to a sentence # of a specified syntactical form. In such cases it is usually obvious that such a sentence # is preserved under the given operations. Thus, for example, any identity is obviously preserved under H, S, and P.
Preservation and Characterization Theorems
25
BIBLIOGRAPHY 1. Gratzer, G. Universal Algebra. Princeton: van Nostrand (1968). 2. Jonsson, B. Topics in Universal Algebra. Berlin: Springer (1972). 3. Tarski, A. Equational logic and equational theories of algebras. In Contributions to Mathematical Logic. Amsterdam: North Holland (1968). EXERCISES 24.24.* If we consider sequences of operators H, S, and P, there are exactly
18 distinct sequences (with the empty sequence allowed). Give an example of a class K such that SHK Z HSK. Give an example of a class K such that PSK # SPK. Give an example of a class K such that PHK # HPK. For any equation p,,
kp,
iff p, has the form a
= a for some term a.
In this chapter we shall prove several more theorems of the general type of 24.22 and 24.23. We shall consider universal sentences, quasivarieties, universal-existential sentences, and positive sentences. We have not tried to give uniform proofs for these results, but we have instead chosen the proofs that seem most natural to us.
In an algebraic language, a class K is a variety iff K = 'HSP(Sr/=,), where I? = {(a, T) : a = T holds in each member of K).
Universal Sentences
Birkhoff's theorem cannot be improved by eliminating H, S, or P.
Definition 25.1. For any set F of sentences, Mod I' is the class of all models of .'I A class K is a universal class if K = Mod I' for some set F of universal sentences. K is an elementary class if K = Mod r for some set r of sentences. We also say that F characterizes Mod F.
An algebra U is a subdirect product of the system (ii). Suppose Mod I' = Mod A, where A is a set of universalexistential sentences. Suppose d is a subset of Mod F directed by s. Let p, be any member of A; say p, is the sentence To show that p, holds in U d,take any x E "U d.Then by directedness there is an U E d such that xij E A for each j < m. Since U P p,, choose y E "A with y 1 w {i, : m I j < n) = x 1 w {i, : m 5 j < n) such that U k #[y]. But U E U d,so U d k #[y] also. Hence U d k 34,. . . ~ V ~ ( , - ~ ) # Since [ X ] . x is arbitrary, U d k p,. Hence, p, being arbitrary, U d E Mod A = Mod I?. (ii) => (iii) is obvious. Now assume (iii). Let A = {p, : p, is a universal existential sentence and I' P p). Obviously Mod I? E Mod A. Now take any U E Mod A; it suffices to show that U E Mod F. To this end we shall construct a chain U = 3, s 23, s . . . of structures whose union will be in Mod r by (iii). The following notation will be useful. We write U E . . 23 provided that U E 3 and for every universal-existential formula p, and every x E "A, if 23 k p,[x] then U k p,[x]. To get our chain started we need the following statement :
-
-
(2) there is a model B1 of F such that U c
.,
31.
TO prove (2), let 9' be a n A-expansion of 2'. Let A' be the set of all universal which hold in (3, a),,,. Then sentences in 9' (3) A' u I? is consistent.
For, otherwise there is a conjunction p, of members of A' such that r k l p , . Now 1 i p , t,# for some existential sentence # of 9'.We can replace the constants c,, for a E A, which appear in # by variables and obtain a universalexistential sentence x of 9 such that kx + # and F k x. Thus x E A, so U P X. On the other hand, i# holds in (U, a),,,, so iX'holds in U, contradiction. Thus (3) holds. Let (8, I,),,, be a model of A' u I?. Noticing that the 9'-diagram of U is a subset of A', we see that I: 24 ++B. Now suppose that p, is a universalexistential formula of 9, x E "A, and U P ip,[x]. Say p, has the form (1). Choosey~"Asuchthaty1w-{ij:j<m)=xrw-{ij:j<m)andUk Vu,, . . .Vv,(,- -I #[y]. Let Fv Vvim.. . Vvi(,- l) 1# E {v0,. . ., upThen ( ~SO the sentence Vv,, . . (U, a)aeAk Yoim.. .Vvi(,- 1#(cyO,. . ., c ~- ,)), V U ~ ( , - -~I )#(cyO,. . ., c ~ ( ~ of - 9' is in A' and so holds in (23, I,),,,. Hence tB 1 Yoirn.. .Vvi(,-,, i #[I 0 y] and so 23 P ip,[lo x]. Now a simple replacement yields (2). Let so= U, and let 23, be as in (2). We now suppose that B,, and '23,,+, have been defined so that 23,, E FD,, + l. NOWwe define %,, +, and B,, + ,. We shall find 9,, +, so that
..
To do this, let 2" be a B,,+l-expansion of dq let A' be the elementary 9'diagram of B,,, and let I?' be the 2'-diagram of s2,+,. Then
(5) A'
u F' is consistent.
For, otherwise there is a finite conjunction p, of members of F' such that A' k i p , . Replace constants c, for b E B2, + B,, occurring in p, by variables, and generalize; we obtain a universal sentence # of 9 ' , involving only constants from s,,, such that A' P # and k# + i p , . There is then a universal formula x of 9 such that I/ = x(cb0,.. ., cb,,-,)) for some m. Hence 23,, k x[bo,. . ., b,-,I. Since B,, c ., 8,n+l, it is clear then that 1 ~ [ b , ,. . ., b m - 11- But (%n + 1, b)b~B(2n+ 1) 1 and hence (%+ 1, b)bsB(Zn ) k l#and 8 2 , +, k ix[b0, . . . , b, - ,I, contradiction. Thus (5) holds after all. By ( 5 ) , let (Q, lb)bEB(2n+l) be a model of A' U r'. Thus 1 is an embedding of 23zn+1into Q and I 1 B,, is an elementary embedding of s2,into Q. Let 82, + be an 2'-structure and s a map such that % ,, + G + ,, s: Q H+ FD,, + , , and s 0 I = I 1 B2,+ ,. Clearly then also 23,, B,, +, as desired in (4). Next, we shall find 'B2,+, so that
-
~9
,
0, by induction on i. Let Aj: be the set of all atomic formulas of B with free variables among u,, . . ., vn-,. Our assumptions on 9 imply that A: is finite. Suppose i < n and Af, has been defined so that it is a finite set of formulas with free variables among v,, . . ., vn- -i. Let Af: l consist of all formulas
,
+
(3) If m 1 E a, xZmy,and a E A, then there is a b E B such that (x,, . . ., xm- a)Z,+ ,(yo, . . ., y,- ,,b), and similarly with the roles of A and B exchanged ; (4) If a E w 1 and XI,-,y, then U t p[x] iff 9 k p,[y] for any atomic formula p with variables among {v, : i E or - 11, and if a = w then U k p[x] iff 23 k p,[y] for any x E "A and y E "'A with m E w, xZ,y, and any atomic formula p, with Fv p, E {u,, . . ., v,-,). Note that there is, trivially, always a 1-sequence for any two structures U, 23 in a language with no operation symbols, since then 26.6(ii)(4) holds
vacuously, there being no atomic formulas without variables.
-
Lemma 26.7. Let 9 be a language with no operation symbols and onlyfinitely 1, many relation symbols. Assume that U and 23 are 9-~tructures,n E w and that for any p, E A:, 2l t p zff 23 t p. Then there is an (n + 1)-sequence for U, 23. PROOF. For each i I n let Zi
=
{(x, y): XE'A, ~ E ' B and , 2l t p,[x] iff 23 tp,[y] for all ~ E A E - ' ) .
Obviously 26.6(ii)(1),(2),(4) hold. To check (3), suppose that m XI,y, and a E A. Let
+ 1 < n + 1,
-
- ,,- l,n, 0 i p) is in At-" and it holds Then the formula 3vm(/\,,,p A AmEA,,, in U, so it also holds in 23. This gives us an element b E B such that (x,, . . . , xm-,, a)I,+,(y,, . . ., y,-,, b), as desired. Of course the argument is similar if U and 23 are interchanged. Hence 26.6(ii)(3) holds. T I
The following lemma completes the proof of equivalence of mathematical notions in 26.4 and 26.6.
Lemma 26.8. Let n E w. If tkere is an (n UE,~.
+ 1)-sequencefor
=,
with our
U and 23, then
PROOF. Let (I, : m I n) be an (n + 1)-sequence for 2l, 23. We now prove the following statement by induction on i; the case i = n gives the desired result.
for O a subset of A',. (ii) Let a E w u {w), and let 2l and 23 be two 9-structures (9 any firstorder language). An a-sequence for 11, 23 is a sequence I = (I, : m E a) such that the foliowing conditions hold : (1) I, E "'A x "B ' for each rn E a; (2) 0100;
The case i = 0 is obvious. Now assume (1) for i, and suppose that XI,-,-,y. To prove that (3, x,),,,-, =,+, (23, y,),,,-, - ,, by symmetry take a G A . From the definition of I, 26.6(ii), choose b E B such that (x,, . . . , x,-,- ,, a ) =, In-i(yo, . . ., yn-i- b). By our induction assumption, ( a , x,,a), ,,-, -,(3, Yt9 b ) t < n - i - 1 0
-,
Part 4: Model Theory
Chapter 26: Elementary Classes and Elementary Equivalence
Now we introduce another slight variation of the notion
=,.
Definition 26.9. Let U and 8 be 2-structures. A partial isomorphism of U into 23 is a one-one function f mapping a subset of A into B such that if m I IDmn f 1, p, is an atomic formula, Fv p, c {v,, . . ., v,- ,), and x E "Dmnf, then U k p,[x] iff 8 23 p,[f x]. For any a E w u {w), an a-system of partial isomorphisms of U into 8 is a system (I, : m E a) satisfying the following conditions : 0
(i) each I, is a nonempty set of partial isomorphism of U into 8 ; (ii) if m + 1 € a , then I,,, G In; (iii) if m + 1 E a, f E I,+ and a E A (resp. b E B), then there is a g E I, such that f c g and a E Dmn g (resp. b E Rng g). In view of the above lemmas, the following lemma shows that elementary equivalence implies this new notion.
Lemma 26.10. Let U and 8 be 9-structures and let n E w. If there is an (n + 1)-sequencefor U and 8 , then there is an (n + 1)-system of partial isomorphisms of U into 8. PROOF. Let ( J , : m En mEn 1 weset
+
I,
=
+ 1) be
an (n
+ 1)-sequence for
U, 8. For each
{{(xi, y,) : i < k) : k I n - m and xJ,y).
Thus 26.9(ii) is obvious. By 26.6(ii)(2),(3) each J, is nonempty, so each I, is nonempty. Also, from 26.6(ii)(2),(3),(4) we infer that for each k I n, if xJky then U k p,[x] iff 8 k p,[y], for each atomic formula p, with variables among u,, . . . , vk-,. It follows that each I, is a set of partial isomorphisms of U into 8. Finally, 26.6(ii)(3) immediately yields (iii). 0 Our final equivalent for elementary equivalence is not quite such a simple reformulation of the relations =,. It is formulated in game terminology, and we shall first give an intuitive account of the game. Let U and 8 be 9-structures, and let two players I and I1 be given. Player I begins the game by picking a positive integer n, an E E 2, and if E = 0 an element a, of A, while if E = 1 an element b, of B. The game continues with I1 and I moving in turn. At the ith move of I, he chooses an E E 2, and if E = 0 an element ai of A while if E = 1 he chooses an element bi of B. Then I1 chooses an element b, of B if E = 0, or an element ai of A if E = 1. The game ends after 2n moves, at which point two sequences a E "A and b E "B have been constructed. The rule of the game is that I1 wins provided that {(a,, b,) : i < n) is a partial isomorphism of 21 into 8 . As we shall show, elementary equivalence is equivalent to the existence of a winning strategy for 11. It is clear intuitively what we mean by "winning strategy": there must exist a completely deterministic method for I1 to makc a move, given what has happened so fa;in the game, so that at the end I1 always wins. The precise definition runs as follows:
Definition 26.11. Let U and 8 be 2-structures. We say that I1 has a winning strategy for the m-elementary game over U, 8 provided that there is a function F with the following two properties : (i) If k < m, x E kA, and y E "B, then F(x, y, 0, a) E B for each a E A and F(x, y, 1, b) E A for each b E B. (ii) For every z E "'[({O) x A ) u ((1) x B)], define x E "A and y E "B by induction as follows. Suppose k < m and x 1 k, y 1 k have been defined. If (zk), = 0, let x, = (zk), and y, = F(x 1 k, y k, 0, x,). If (zk), = 1, let y, = (zk), and x, = F(x 1 k, y 1 k, 1, y,). Then for the so defined sequences x and y it is the case that {(x,, y,)) :i < m) is a partial isomorphism of U into 8.
r
Lemma 26.12. Let U and 8 be 2-structures, and let m be a positive integer. If there is an (m + 1)-system of partial isomorphisms of U into 8 , then player I1 has a winning strategy for the m-elementary game over U, 23. PROOF. Assume the hypothesis of 26.12, and let (I, : k I m) be an (m + 1)system of partial isomorphisms of U into %. We define a function satisfying 26.1 1(i) as follows. Let a well-ordering of A, B, and all sets I, for k < m be given. Let k < m, x E kA, and y E kB. Set f = {(xi, yi) : i < k). Let a E A and b E B. If there is no g E In-,such that f G g, we let F(x, y, 0, a) be the first element of B and F(x, y, 1, b) be the first element of A . Now suppose there is such a g, and let g be the first such. By 26.9(iii) let h be the first member of I,-,-, such that g c h and a E Dmn h, and let I be the first member of I,-,-, such that g G I and b E Rng I. Then we set F(x, y, 0, a) = ha and F(x, y, 1, b) = I-lb. Thus F is constructed so that 26.1 1(i) holds. To check 26.1 l(ii), let z E ,[({O) x A) u ((1) x B)] be given, and construct x and y as in 26.1 l(ii). It is straightforward to check by induction on k that m there is an g E I,- such that {(xi, y,) : i < k) c g. Applying whenever k I this for k = m, we obtain the conclusion of 26.1 l(ii). 0
,
Our final lemma completes the circle of implications between the above notions.
Lemma 26.13. Let U and 8 be 9-structures, and let m be a positive integer. If player I1 has a winning strategy for the m-elementary game over U, 8 , then 21 k p, iff 23 k g, whenever p, is a prenex sentence with m initial quantifiers. PROOF. Let F be as in 26.1 1, and for each z E "[({O) x A) u ((1) x B)] let x, and y, be constructed as in 26.1 l(ii). Let p, be a sentence Q,vo. . .Q, - ,urn where $ is quantifier free and each Qi is V or 3. We now prove the following statement by downward induction on k from m to 0. (1)
for all k 5 m and all z E '"[({O) x A) u ((1) x B)], U k Q,vk. Q,~,v,~,~[x,O,. . ., x,(k - l)] iff 8 k Qkuk.. . Qrn-~~rn-l+[~zO, . . ., yz(k - 111. A l l
Chapter 26: Elementary Classes and Elementary Equivalence
Part 4: Model Theory
The case k = m is true because of the conclusion of 26.1 l(ii). Now suppose that (1) is true for k + 1 ; we prove it for k. Suppose that z E "[({O) x A ) u ((1) x B)]. We take only the case Q, = V, and argue from satisfaction in U to satisfaction in 23. Assume, then, that 2l I= Q,v,. . .Qm-,urn-,+[x,O, . . . , x,(k - I)]. Let b he any element of B. Let w be like z except that w, = (1, b). Clearly (by 26.1 l(ii)) x, [ k = x, 1 k, so U I= Qkvk.. .Qm-lvm-l$[xwO,. . ., x,(k - I)]. Since Q, = V, we have U I=Q,, ,vk+ . .Qm-,urn- ,+[xWO,. . ., x,k]. By the induction hypothesis, 23 I= Q, + ,v, + . . .Qm- ,urn - ,+[y,O, . . .,y,k]. But y,k = b and y, 1 k = y, 1 k, so 23 I = Q k + l v k + l ~ ~ ~ Q m ~ l v m ~ l .$.,[ y , O , . y,(k - l), b]. Since b is arbitrary, it follows that 23 1 Qkvk.. .Qm-lvm-,+[y,O, . . . , y,(k - I)]. Hence (1) holds. But condition (1) for k = 0 is exactly what 0 we want to prove.
,
Now we can give the main theorem characterizing elementary equivalence by the back-and-forth method : Theorem 26.14 (Fraisst, Ehrenfeucht). Let 9be a language with no operation symbols and only finitely many relation symbols. Let 2l and 23 be two 2structures. Then the following conditions are equivalent:
(i) U =ee 23; (ii) 2l r m 23 for each m E w; (iii) for each m E w, there is an m-sequencefor U, 23; (iu) for each m E w, there is an m-system of partial isomorphisms of U into 23; (v) for each m E w, player I1 has a winning strategy for the m-elementary game over 2423. As mentioned following 26.3, this theorem immediately gives rise to mathematical characterizations of the logical notion of an elementary class, using 26.3. We shall not state these characterizations explicitly. We now want to give an application of 26.14. We shall give a simple characterization for the elementary equivalence of two structures (a, m such that K and L do not have the same members of power n.
For, otherwise choose m E w such that for all n > m, K and L have the same m, let M, be a set of members of power n. Say L = Mod {p}. For each n I members of K containing exactly one member from each isomorphism type of members of K of power n. For each U of power s n let be a sentence whose models are exactly all structures isomorphic to U. Then the sentence x:
+,
But we shall now apply Lemma 26.20 to show that Q 9.In view of 26.19(v), (I), this is the contradiction we have been seeking. To apply 26.20, first, in view of (11) we may choose f as in ( 5 ) . Now 'I?j is infinite by (14), so by (4) we can choose for each n E w a member a, of which has exactly n T,-predecessors. Now for each n E w we set (16) In= {(x, y) : x E "A,y E " A , and there exist c, d E A such that (a,, c, d) E and Vi < n Cf,ai = xi and &ai = y,)}.
e
Thus to apply 26.20 and hence finish the proof it remains only to check that m. Let us note a few facts about this operation; they will be used below without proof. Since mn = m for n finite but mm > m, we clearly have Xo I ma m. Obviously 8: = So.If GCH is assumed and m is regular, then ma = m. We have 82 = Xo, since
x,=c,,,x,
m. Suppose that G is a finite subset of UP m, by Lemma 26.38 choose a nonempty Fl G F such that IFII I m and ( F Fl, G, D) is m-consistent over n. Fix f E F Fl. Let
-
-
and for each 6 < n let b, b, For each
v
= Cf6 = co
and let D' = F 9 ( D u {C, : v < p)). We claim, now, that (F', 0, D') is mconsistent over n, and hence the lemma holds. Since p < m+, clearly D' is generated by I m elements. Suppose that (F', 0, D') is not m-consistent over n. Then there is a 5 < na, a one-one h E rF', and an cr E 1. From ( 5 ) and the fact that R, = (0, a,) we know that
-
+
-
+
+
: i < w)]}
E
Ds.
We now check the hypotheses of 26.41 with n, m, F, D, U, p, a, p, replaced by n, n 1/31,F', D', 23, n 1/31, (dcviS: v < n 1/31,i E w, S < n), p, respec1/31 is finite. tively. In fact, it remains only to check (i). So suppose M E n For each v E M let J, = { j E w : vj occurs free in p,) (0). Choose (K, : V E M ) so that each K, E w 1, the K,'s are pairwise disjoint, IJ,I = IKvl, and for all j E K,, the variable v, does not occur in any of the p,, for v E M. Say u, : J, * K,. Let p,: be obtained from p,, by replacing each free occurrence of v j by uuvjfor each j E J,. Let $ = A,,, p,:. Define e E "Dmn H, as follows, where z E Dmn H, is fixed : for each j E w,
+
+
uVEM
Clearly the number of such sets I?,, is
+
Clearly 0 # 101 I n 1/31. Say 0 = {(p,,, c,) : v < n 1/31}. Now for any v < n 1/31 we have {S < n : U t 3vOp,,[(cviS: i < w)]} E D' 2 D, SO,by (4) for /3, {S < n : U t 3uOp,,[(cviS: i < w)]) E D,. For each x E Dmn H, choose d, so that xH,dx. Then by (3) for /3 we obtain for each v < n + 1/31
+
-
+
-
e, = cvuv-lj if j E Kvand v E M, otherwise. e, = z Now the value assigned to uvj under (eiS : i < w): so for any x E A, S < n, and v E M we have U Cp,,[(cViS: i < w):]
iff
is c,,S, for any j~ J,,
Cp,i[(eiS: i < w):].
Hence it is clear that U t $[(e,S : i < w):] iff for all v E M, U t pv[(cviS: i < w)!]. Now by (8) for any v E M we have {S < n : U C p,,[(c,,S : i < w)~,a]) E D', SO {S < n : U C $[(eta : i < w):,~]) E D'. Hence (4, e) E 0 , say (+, e) = (yo,c,), where o < n 1/31. Now for each v E M and S < m, the value assigned to uvj by (dcUiS: i < w) is dC,,,,S = deuvjS= dcvjS,which is the same value the sequence (dcviS: i < w) assigns to j, where j E K,. Hence for any y E B we have
+
23 C p,,[(d,,S 23 C p,:[(d,,,S
: i < w):] : i < w)!]
iff Vv E M iff Vv E M 23 k p,,[(dCviS: i < w):],
which is as desired in 26.41(i). We now apply 26.41 to obtain b E "B, F, F' and D, 2 D' so that IF' FYII n + Iyl, (F,, 0, D,) is (n + lyl)-consistent 1/31 we have over n, and for every v < n
-+
(9) {S < n : 23 C p,,[(d,,,S : i < w)&]) E D,. Let Hy= H, U {(a,, b)). Clearly now (I), (2), and (5) hold, while (6) and (7) are not relevant to this case. To check (4), suppose x E "Dmn H, and 0 is any formula. We may assume that there is a y E Dmn H, such that xi = y for all but finitely many i E w. Thus by our choice of D', we have either I?,, E D' G Dy or n rBX E D' G D,,as desired.
-
Part 4: Model Theory
Chapter 26: Elementary Classes and Elementary Equivalence
To check (3), suppose that x,H,y, for each i < w, that O is any formula, and that 10 (6 < n : 2l =! O[(x,S : i < w)]) E D,. We may assume that a, $ Dmn H,, and hence that yi = b whenever xi = a,. To apply the result of our construction, we need to reformulate things so that only the variable v, has the new value a$ assigned to it. To this end, let 0' be obtained from O by replacing each free occurrence of v, by a new variable us, and changing all bound occurrences of v, to some still newer variable. Let x' = xi, and y' = go. Thus still x;H,yl for each i < w, and by (lo),
By (4) for 6 it is clear that (6 < n : U k v[(ciS : i < w)]) E Do. Hence by (3) for /3, {S < n : 23 k v[(di8 : i < w)]) E DB E D,, as desired. This completes the inductive definition. Let p = 2" and let E = D,. By ( I ) and (7), E is an ultrafilter over n. Let K = {([a],, [b],) : aH,b). By (5) and (6), K has domain "AIE and range "BIE. If aH,b and a1Hpb', then aH,b and alH,b' for some y < p, so [a],
=
iff {S < n : a, = a:) E E iff {S < n : U != (v, = vl)[a,, a:]) E E iff {S < n : U k (v, = vl)[a,, a:]) E D, iff (6 < n : 8 C (v, = vl)[b,, b:])~D, iff [b], = [btIEsimilarly.
[a'],
(11) {S < n : U C O1[(x;S : i < w)]} E D,. Let X = {i : x; = a,, u, occurs in Of), and let $ be obtained from 0' by replacing v, by vo for each i E X. Choose w so that aoH8w,and define for each i ~ w zi = xi z: = a, ui = y; u, = w
if x; # a, and v, occurs in O', otherwise, if x; # a, and v, occurs in O', otherwise.
Thus z,H8ui for all i < w . Moreover, z, = a, E Dmn HB for all but finitely many i E w. Furthermore, for any 6 < n we have 2l k O1[(x:S : i < w)] iff 2l C $[(ziS : i < w):,,]. Hence from (11) we obtain E E D,, where E = {S E n : U C #[(ziS : i < w):,,]). By our choice of D' it is then clear that E E D'. Thus ($, z) E 0 , say (#, z) = (yV,c,). Thus (9) holds for this v. Now for all i < w we have ziHBuiand ziH,dcvi,and {S < n : U k (v, = vl)[ziS, z,S]) = n E DB,SO by (3) for p, {S < n : 23 C (v, = vl)[uiS, dcviS]}E DB.Thus for any i~ w , (6 < n : ui6
=
dcV,6)E D,.
Now if we intersect all of these sets where vi occurs in $ with (9) we easily obtain
It follows easily that {S < n : 8 23 O[(yiS : i < w)])
E
D,,
as desired. Case 4. y = p 1, R8 = (1, b,). Like Case 3, with A and B interchanged. Subcase 1 is unnecessary. Case 5. y = /? + 1, R8(2, A) whereA c n. By Lemma 26.39 choose F, 5 F, and D, 2 D, so that IFB FYI< na, D, = S9(D,u {A)) or D, = F 9 ( D , u {n -- A}), and (F,, 0,D,) is (n + lyl)-consistent over n. Let H, = H,. All of the gesired conditions are clear except (3). Assume that c,H,d, for all i < w, that rp is any formula, and that (6 < n : U C rp[(ciS : i < w)]] E D,.
+
-
by (4) by (3)
Thus K is a one-one function. In an exactly analogous way it is shown that K preserves relations and operations. For example, if R is an m-ary relation symbol, a,, . . ., am-, E " A , and aiHpbi for all i < m, then aiH,bi for some O = "2l/E, 9 = %/E, y < p, and hence, with p, the formula Roo. . .u,,([a019 . . ., [am-11)
E
RE
iff k ~[[aol,. . ., [am-111 iff(6 < n : U !=y[a,G,.. . , a m - , S ] ) ~ E iff (6 < n : U C y[aoS, . . .,~ ~ - ~E 8D,] ) by (4) iff {S < n :23 k y[boS, . . .,bm-lS]) E D, by (3) iff ([b,], . . . , [b,- ,I) E R@ similarly. 0
As mentioned at the beginning of this section, a characterization as in 26.42 immediately gives a characterization of the notion of elementary class: Theorem 26.43 (Keisler, Shelah).
The following conditions are equivalent:
(i) K is an elementary class; (ii) UpK = K and if1U/FE K, then U E K. PROOF.The implication (i) .;> (ii) is obvious. Now assume (ii). By 26.2 it sufficesto show that K is elementarily closed. Assume, then, that U =, 8 E K. By Theorem 26.42 there exist I and F with 'U/5 z '23/5. Since UpK = K and 23 E K, it follows that '%IFE K. Hence by (ii), 21 E K, as desired. 0 Thus we may say that a class K is an elementary class iff it is closed under ultraproducts and ultraroots. EXERCISES 26.44. If K is compact and L
=
{U : for some 23, U =, 23 E K}, then L is elemen-
tary. 26.45. For any class K, let K< = {U : for some 23, U
conditions are equivalent : (i) K is an elementary class; (ii) UpK5 c K.
tEoand 23 = ,,,, with A = B = w, R o = So = w, R i + l = R t N { i + 1)) S t + l = St N {i). 26.48. Use 26.14 to show that the following two structures are elementarily equivalent: U = (w, Eo and {fbio, . . .,fbin(iJ E Eo. Thus O' 23 ~iVai0,. . . 7 fain(t)l and O' C tpi[fbio,. . .,fbinci,].Since f E I, it follows that (1) holds in O". Thus, indeed, 0" is a model of I?' u O. Hence, by the compactness theorem, I?' u A has a model, which we may assume has the form 9 with A G D, and with d, interpreted by a for each a E A. Let 23' be the substructure of 9 generated by A, and set 23 = 23' 1 9 . We now proceed to check the conditions (i)-(iii) of the theorem. Clearly IBI s IFmla9( + IAl, i.e., (iii) holds. To check (i), first note that 23' E 9 and 9 is a model of the Skolem set for 9 , LC:', so by Proposition 19.20, 23 m. Clearly then oQx = oQz and rDY= rtQz.Thus 9 k (a T')[z,, . . ., zm+,+ ,I. Note from 27.16 that U is homogeneous for 9 19'. Hence 9 k (o T')[~z,,. . ., fz,,,,,], so oQ(f o x) = oQ(f 0 z) = ~ ' ~ 0(z )f = ~ ~ 0 y), ( showing f that f is a function. In an entirely analogous way one shows that f + is one-one and that it preserves relations and operations. 0 +
n, if i < j where p, E FmlaF1 for some n E w, a, b E n+lA, and for all i, j I then ai < a, and bi < b,. We claim that r" u A has a model. To prove this we apply the compactness theorem. Let O be a finite subset of A ; say O = {#,,. . ., #), u O', where for each i I m the sentence #, is, as above, while Of is a finite set of sentences of the form i ( d , = db) where a # b. We now define subsets Do,. . ., D m + , df C by induction. Let Do = C. Having defined D, as an infinite subset of C , where i i m, we define D,+1 as follows. Let E,
=
El
=
{F E Sni+ ,Di : if x is the unique order-preserving map from 1 onto F, then O' C v i [ x O., . ., xni1>, n, Sni+,Di Eo.
+
By Ramsey's theorem, there is an infinite D,+, G D, and a j E 2 such that Sni+ D, ,c E,. This completes the definition of the sequence Do, . . ., Dm+,. Now let A' -= {x E A : x = aij or x = b,, for some i i m and j n,} U { x E A : d, occurs in some sentence of a'}.Thus A' is finite. Let f be an order +
=
=
+
We shall present one corollary of this important theorem. It depends on the following result from the theory of ordered sets. Theorem 27.18. For any infinite cardinal m there is a simple ordering structure U = (A, i ) with I A1 = m such that U has 2m automorphisms. PROOF.Let A = m x T, where T is the set of all rational numbers r such that 0 i r < 1. We define a linear order on A as follows: (a,r )
< (lg,
S)
iff u < lg, or
u =
/3 and r
Fmla2 on the other hand. In the case of countable languages, we can actually characterize when a theory has an No-saturated countable model :
Theorem 28.7 (Vaught). Let I? be a theory in a countable language 64 Then the following conditions are equivalent: (i) I' has a countable No-saturated model; (ii) for each m E w there are only countably many m-types over I?.
PROOF (i) 3 (ii). Let U be a countable No-saturated model of r , and let m E w . For each m-type A over r let fA = {a E mA: a realizes A in U). Since U is Nosaturated, by Proposition 28.2 we see that fA # 0 for each m-type A over r. ClearlyfA n fA' = 0 for distinct m-types A, A' over r. Hence (ii) holds since U is countable. (ii) => (i). We apply 28.6 with m = n = No, 9 = 9 ' , and I? = I". Obviously np = n for 0 < p < m. Let 9 " be as in 28.6, and let B E C with IBI < No, say B = P o , . . ., b,-,} with m < w . For each p, E Fmlak,, let p,' be obtained from p, by first suitably replacing bound variables and then replacing bo, . . ., bm-, by v,, . . ., vm respectively. For each 1-type A over I?
Chapter 28: Saturated Structures
Part 4: Model Theory
in p B , let fA = {cp' : cp EA). We claim that f establishes a one-one correspondence between 1 types over r in ZBand (m f 1)-types over I' in 9. It is a routine matter to check this claim. Hence the assumption (ii) yields the fact that there are only countably many l-types over r in SB.Thus the hypotheses of 28.6 are fulfilled, and (i) follows. 0 From 28.7 and 27.12 we obtain many examples of theories with countable No-saturated models :
Corollary 28.8. I f r is a consistent No-categorical theory with only infinite models, in a countable language, then r has a countable No-saturated model. in this case are NoOf course, actually all the countable models of saturated. Recall from Chapter 21 our many examples of ~o-categorical theories. Actually 27.12 is not needed to establish 28.8. A more direct argument can be given which generalizes to prove
Corollary 28.9. If I? is a consistent theory in a countable language and r has up to isomorphism only countably many countable models, then I? has a countable No-saturated model.
-
PROOF. Let m E w. Each m-type over I? is realized in some countable model of I?, by 27.2. Hence there are only countably many m-types over r (cf. the proof (i) (ii) in 28.7). So by 28.7, I? has a countable No-saturated model. Corollary 28.9 makes evident the existence of No-saturated models in several more theories. For example, consider the theory I? of algebraically closed fields of characteristic 0.The countable models of r are, up to isomorphism, the algebraically closed fields U, for a 5 w, where 3, has transcendence degree a over Q. Hence by Corollary 28.9, one of these fields is No-saturated. In fact, only U, is No-saturated. For, let m < w, and let X be a transcendence base for Urn.Thus 1x1 = m. For each n E w one has a formula cp, of 9' (with 9' as in 28.1) such that Urnk cpn[a]iff a is not algebraic of degree n over Q(X). For each n there is such an a, by elementary field theory, but {cpn: n E w} is not realized in (a,, x),,,. Thus Urn is not Nosaturated. So %, is No-saturated by 28.9. The following interesting result connects No-saturation with the existence of elementarily prime models.
Theorem 28.10. Let I? be a complete theory in a countable language. If has a countable No-saturated model, then I? has an elementarily prime model. PROOF. Suppose that r has no elementarily prime model. Then by 27.10 there is an n E w for which there is an n-atomless formula cp over r. We shall show that these are 2 K o n-types over I?, so that by 28.7 r has no countable Xo-saturated model.
For each f E Urn,, "2 we define a formula $,. Let I), = cp. Suppose that $, has been defined so that 4,E Fmlag and $, is n-atomless over r. Then there is a x E Fmlas such that I? Y 4, -+ x and r Y $, 4 i x . Let $, = $, A x and I/,,= $, A 1 ~Clearly . $,, and $, are again n-atomless over r. This completes the definition. For each f E "2 let A, = {$, : g s f ) . Clearly A, is consistent over r and so it can be extended to an n-type 0,. For f # h obviously O, # Oh, as desired. In the case of ~o-categoricaltheories with only infinite models, the denumerable model is both No-saturated and elementarily prime. If r is the theory of algebraically closed fields of characteristic 0, its elementarily prime model, the field of algebraic numbers, is different from its No-saturated model. Now we turn to the existence problem for m-saturated structures with m > IFmla91. The main theorem is as follows:
Theorem 28.11. Let 9, 9' be the first-order languages, m and n cardinals, subject to the following conditions: and I" a theory in 9', (i) (ii) (iii) (iv)
IFmla91 < m ; 9' is an expansion of 9,and [FmIapl i n; if p is any nonzero cardinal < m, then np i p; I" is consistent.
Under all of these assumptions it follows that there is a model U of F' of power i n such that U 9is m-saturated.
r
PROOF. Let I? = I?' n Sent2. By extending 64' and r' we may assume that be as in 28.6. Clearly 28.6 will give the desired result, IFmla9,1 = n. Let 9" and only 28.6(vi) remains to be verified. Suppose that B 5 C with IBI < m and with ZBas in 28.6. Now by (i), (Fmla2B( < m. The number of 1-types over I? in % is clearly 1 2 ' ~ " ' ~I~ n~ by ' (iii), so 28.6(vi) holds. 0 The most useful corollaries of this theorem are as follows.
Corollary 28.12. Suppose IFmla2;pl I m, and U is an 9-structure with No 5 IAl I 2m. Then there is an m+-saturated elementary extension 23 of U of power 2m. PROOF. Let 9 * be an A-expansion of $q with new individual constants c, for a E A , and let 9' be an expansion of 9 * by adjoining new individual constants d,, a < 2m.Let I?' = {cp E Sent9, : (U, a),,, k cp} ,> { i d , = do : a < < 2m}.The conditions of 28.1 1 are clearly met with m, n replaced by m+, 2m 0 respectively. Corollary 28.13. Suppose that m is strongly inaccessible, IFmla21 < m, and U is an 2-structure with Xo 5 IAI 5 m. Then U has an m-saturated elementary extension F23 of power m.
Part 4: Model Theory
Chapter 28: Saturated Structures
The proof of 28.13 is similar to that of 28.12. Using GCH we obtain Corollary 28.14 (GCH). Every theory in 9 with infinite models has a saturated model of each regular cardinality > IFmla2ipl. We now want to give different proofs for these corollaries which are perhaps more natural than the above. The proofs are based on the following lemma, which is of course, weaker than 28.12:
(*)
Suppose IFmla21 s m, and U is an 2'-structure with X, I IAI I 2m. Then there is an elementary extension 23 of U such that IBI = 2m, and if X is a subset of A of power i m, 9, is an Xthen A expansion of 9 , and A is a 1-type over Op(U, x),,, in 9,, is realized in (23, x),,,.
We prove (*) by applying the compactness theorem; it can also be proved using ultraproducts (Exercise 28.39). We consider each language $p, as a reduct of a certain A-expansion PA of 9. For each pair (X, A) such that X c A, I XI I m, and A is a 1-type over Op(U, x),,, in Zx, we introduce a new constant c, thus expanding zA to a new language 9'.Let r be the set
Clearly every finite subset of r has a model, so has a model 23 of power I IFmladLp'l. NOWthe number of pairs (X, A) of the above sort is clearly at most 2m, so IBI I 2m. Also, U is elementarily embeddable in 23, so B is infinite. By the upward Lowenheim-Skolem theorem we can assume that (BI = 2m. Clearly 23 1 9 is as desired in (*) (up to isomorphism). On the basis of (*), Corollary 28.12 is established as follows: Assume the hypothesis of 28.12. We define a sequence (23, : cr I m+) of 9-structures. Let 23, = U. Suppose that a < m+ and 23, has been defined so that X, I 1 Bal I2m. By (*), choose 23, + ,to be an elementary extension of 23, of power 2m such that if X is any subset of B, of power s m, 9, is an X-expansion of 9 , and A is a 1-type over Op(B,, x),,~, then A is realized in (23,. ,, x),,,. For X a limit ordinal I m + , let 23, = U, ,,,23,. Then 23, + satisfies the conclusion of 28.12. In fact, it is obviously an elementary extension of U of power 2,. Now suppose that X G B,+, (XI I m, 9, is an X-expansion of 9,and A is a subset of Fmlak, such that (%,+, x),,, 130, A A' for every finite subset A' of A. Extend A to a 1-type A* over 0p(23,+, x),,,. There is an a < m+ such that X s B,, since I XI 5 m and m+ is regular. Clearly A* is also a 1-type over 0p(23,, x),,,. From our construction it follows that A* is realized in (%,+ x),~,. Since 23, 23, +, A* is also realized in (Bm+, x),,,. Thus %+ is m-saturated. Corollary 28.13 can also be easily established in case [A[ < m, on the basis of (*) or-28.12: one simply extends the above construction all the way to m. We leave the details for an exercise.
.
Our hypothesis of 28.16(ii) implies that every finite subset of r has a model which is an expansion of (U, a,) Hence F has a model (8,b,, e),,, of power < m. Thus 2l = ,, 23, so by the m-universality of U we may assume that 23 U . Hence (U, a,),.. =,, (23, b,),,, = ,, (U, b,) Furthermore, e realizes A in (9, b,),,, and hence in (U, b,) ,. From the m-homogeneity of U it follows that there is an x E A with (U, a,, x),,, --,,(U, br, e),,, Hence x realizes A in ( U , a,), ,,. 0
.,
I A1 + IFmla91 such that n < m implies 2" I m. For example, m can be the supremum of the sequence IAl
+ IFmla21, exp ((A1 + IFmlasl), exp exp (1 A1 + IFmlaz;pl), . . . .
Then apply 28.28. On the other hand, without GCH one cannot always find a saturated elementary extension of a structure; see exercise 28.40. Theorem 28.30.. If U and Q are elementary equivalent special 9-structures of the same non-denumerable cardinality, then U 0.
E
"YB,y for each y < a. a': m w A .
For, obviously a' is one-one. Suppose Rng a' # A, and choose 7 minimum such that a, 6 Rng a'. Choose y < a minimum such that a, 6 B,,. For each 7 < 7 there is a 8, < m such that a, = a;,. Let 5 = (U,,, 8, 1) u n,. Let y' be minimum such that [ < n , . Thus y < y', and 7 is minimum such that a, E B,,. {a: : p < 51, since a, = a;, and 8, < 5 for each T < 7. Hence a; = a,, contradiction. So (2) holds. Similarly we can define c': m wt C so that
+
-
Theorem 28.29. Suppose U is an 2'-structure and m is a cardinal. Assume that 2" I m whenever n < m, that IFmlasLpl < m, and that soI IA( I m. Then U has a special elementary extension of power m.
PROOF. If m = n+ for some n, then the assumptions imply that 2" = n + , so the desired result is clear from 28.12. So assume that m is a'limit cardinal. We define the desired sequence (23,: n < m), leading up to the desired structure, by induction on n. Set p = IFmlas\ 3- 1A(. Thus 2q 5 m. By 28.12, let 23, be a p+-saturated elementary extension of U of power 2q, and for 0 < q < p, let 23, = 23,. Now suppose that p I n < m and 23, has been defined for all q < n so that 23,< 2323,for q < r < n, and IB,I I 2p+q. Then IU,,, 23,l I 2", so by 28.12 let 23, be an n+-saturated elementary extension of U, 23, of power 2". This completes the definition of (%,, : n < m). Clearly U, , ,23" is as desired in the theorem. 0
1 n,
C'
r n,
E
"YD,, for each y < a ; c' : m M C .
Now we define two sequences (x, : y < a) and (y, : y < a) by recursion; we want x,: n, -+ B,, and y,: n, + D,, for each y < a. Suppose we have already defined x, and y, for all y < ,6, where ,6 < a, in such a way that
We now consider two cases Case I. = 6 2n for some 6, a limit ordinal or 0, and some n E w . Let x,6 be any function mapping n, onto {aty : y < n,). Thus by (I), x,6: n, -+ B,,. Now
+
Since Q,, is nz-saturated, clearly (Q,,, y,,) ,,,,,,,, is also. Hence from (6) and all of the above we easily infer from 28.18 that there is a y,6: n@-+ D,, , ~ ~(6)~ and , . (7) now hold such that (24 x y v ) y ~ ~ =ee , v 1 and U is elementarily equivalent (without equality) to a one-element 9structure, then U is not primitive. 29.37. Let 9 be a relational language without equality and with only finitely
many non logical constants. Suppose that U is a finite 9-structure, U is elementarily equivalent (without equality) to 23, and I A1 < I B 1. Then 23 is not primitive. 29.38. Formulate Definition 29.18 more precisely. Hint: let Trmfmla be the set of all pairs (7,O), (9, 1) with 7 a term and p) a formula, and define Trmfmla
in a standard set-theoretic way. 29.39. Let ( 9 , T, 0) be a descriptive triple. Take as logical axioms the schemes
10.23(1)-(5) as well as the following two schemes:
=
=
(6) Vul(vi v j w p)) + v j .cvlp), if j is minimum such that vj does not occur in p); p)) + .cvlp) 0, with j as in (6). (7) i3vjVvi(vl
=
=
This gives rise to a notion I? kd p) and the attendant notions, such as d-consistency. Prove the usual versions of the completeness theorem, analogous to 11.19-1 1.20. Hint: reprove 29.20, using td instead of k. 29.40. Show that with descriptions the usual validity 10.61, that CVap) + Subfzp)
under certain conditions, no longer holds. 29.41. The description operator can be made precise in several non-equivalent
,
ways. We indicate briefly another possibility different from the one expounded in this section. It applies to an arbitrary first-order language, without an individual constant 0 being distinguished. But satisfaction is modified as follows. If U is an 9-structure and a E A, we define (U, a) 1 p[x] for x E mA just as in 29.19, except that (~v,p))axis a if there is no unique b E A such that (U, a) k p)[xk]. Show that 29.20 then fails, in genera!.
29.42. The compactness theorem holds for many-sorted logic. Hint: Use 29.28. 29.43. Define the ultraproduct of many-sorted structures and prove the funda-
mental theorem on ultraproducts. 29.44. Formulate and prove a general downward Lowenheim-Skolem theorem
for many-sorted logic.
29.45. Formulate and prove a general upward Lowenheim-Skolem theorem for
many-sorted logic.
r be the theory of vector spaces of infinite dimension over algebraically closed fields, formulated in a two-sorted language. Show how this can be done in a precise way, and show that r is complete.
29.46. Let
Chapter 30: Finitary Extensions
30
+
and for each m E w (proof by induction on m). The function g preserves because R is a subtheory of Q. Suppose that g does not map onto A , and choose a E A g*w. By axiom 14.17(i)(c) of Q we see that it is possible = xi for every to define a sequence ( x i : i E w) such that xo = a and i E w. This clearly contradicts our one weak second-order axiom for Qw. Hence g is onto, so it is an isomorphism from (w, ., a, 0) onto U. Thus the upward Lowenheim-Skolem theorem fails. Furthermore, we can repeat the proofs of 15.20 and 15.21 to obtain
Finitary Extensions
N
+,
Theorem 30.1. The set (p+$: $ is a sentence of pnOs in weak second-order logic and QWC (G} is not elementarily definable in (w, +, ., a, 0), in weak second-order logic.
In this chapter we want to consider various essential extensions of firstorder languages in which the formulas are still of finite length. In particular, we shall consider higher-order logic, w-logic, and cardinality quantifiers.
Weak Second-Order Logic Let a first-order language 9 be augmented by new quantifiable variables
Fo,F,, . . . which in an 9-structure are interpreted to range over finite subsets of the universe: this gives us a formulation of weak second-order logic. Among the atomic formulas are new ones of the form Fin, where o is a term. In a weak second-order logic the compactness theorem fails to hold. Perhaps the simplest example is given by the following set of sentences: 3FoVvoFovo; there are at least n things (a sentence for each n E w). Various other of our theorems in first-order logic fail in weak second-order logic. Two important theorems are the upward Lowenheim-Skolem theorem and the recursive enumerability of the set of validities. To prove that these do not hold here, consider the following set QWof weak second-order sen: knces, formulated in znos
Q
(recall 14.17)
Vvo3Fo[FovoA Vvl(Fosv, + FOvl)] It is clear that U is a model of Qwif and only if U is isomorphic to (w, + , .,0, a). In fact, let U = (A, +, ., 0, f ) be a model of Qw.Define g: w 4 A recursively by setting go = 0 and g(m + 1) = fgm for all rn E w. Thus gm = (Am)%
Now Qw 1 (G iff k A Qw+ $. Hence {y +$ : k(G) is not weak second order elementarily definable in (w, +, ., 0,a) either. Thus by 14.16, {y+$ : k $1 is not recursively enumerable, so there is no hope of finding a reasonable proof theory for this logic. In view of all of these negative results, it is interesting that the downward Lowenheim-Skolem theorem, 19.17, goes over verbatim. The proof of this fact depends upon the following lemma analogous to 19.16 (where we use a rather obvious notation for satisfaction):
Lemma 30.2. Let U and 8 be 9-structures, with U s B. Then the following two conditions are equivalent:
m.
This is easily shown by induction on p,. Now it follows that if U is a model of O, then U* is a model of a.Conversely, it is easily seen that any w-model 93 of is isomorphic to U* for some 9-structure U, so the 9-reduct of 23 is a model of O. 0
Thus ordinary first-order logic is (w, a)-compact. To formulate our main result on compactness for Q-quantifiers we need a certain cardinal number function. For any m 2 KO let
Cardinality Quantifiers Given a first-order language 3,we can convert 3 into a Q-language by adjoining a new symbol Q which is used syntactically just like the universal quantifier V. Thus to the rules of formulas is added the stipulation that Quip,is a formula whenever p, is. Of course, Q can be given many interpretations; some reasonable limitations on the interpretations of Q have been set down in Mostowski [5]. We consider here certain cardinality interpretations. Given an infinite cardinal m, the m-interpretation of Qvi is "there are at least m vi such that." Thus to the other satisfaction rules we add: 2lCmQvip,[x]
nm = the least n such that there is a family (pa : or < n) of pa 2 m. cardinals < m such that
nu,,
m for any cardinal m. We have nx, = No; nX1 = No; Thus KO 5 nm I r m + 5 m; rm = m if m is strongly inaccessible; nm I cf m if m is singular; and ~ ( e x pNo)+ 2 N,. Theorem 30.13 (Fuhrken). Let (ai : i E I) be a system of 9-structures, with 1 1 1 < nm, where m 2 No. Let p, be a Q-formula and x E Ai. Then Pi., ui/F,1 v[[ ] 0 x] zff {i E I : ai Cm p,[pri XI)E F.
iffI{a~A:Ul=p,[xi,])lr m .
0
First we consider the case m = No. Then Qvi is interpreted as "there are infinitely many vi such that" and hence "iQoi" means "there are only finitely many vi such that." Hence in this interpretation the Q-language resembles weak second-order logic. Various negative facts are seen just as in that case. The compactness theorem fails, as is seen from the set
PROOF. The proof is by induction on v, and goes just as in Chapter 18 except for the step from p to Qvjv. Let J Ti
~ Q V O (= VO 00); there are at least n things (a sentence for each n E w). The system set
(w,
+, ., 4,O) is characterized up to isomorphism by the finite the theory Q; Vv, 1 Qu13v,(vl v,
+ = v,).
Hence in the familiar way we see that {g+p,: p, is a Q-sentence in snos and Cay} is not r.e., so that there is no reasonable proof theory for the w-valid Q-sentences. In spite of these discouraging facts, the situation improves considerably for m > No. First consider the compactness theorem. It still fails, for any m r X,. This can be seen from the following set of sentences (where we deal with a language with individual constants ca for each a < m): for a < 3, < m; i ( c a = cB) 1Qvduo = DO). However, a weaker kind of compactness sometimes occurs, depending on m. To encompass some other kinds of weak compactness introduced in the next section, we give a general definition : Definition 30.12. Let m and n be infinite cardinals with n~ < n. We say that a logic 2 ' is (m, n)-compact provided that if I? is a set of sentences
I
i I
= =
{i E I: Ui km Qujp,[pri0 XI), {a E Ai : Ui 1, p,[(pri x):]) 0
for each i E I.
First suppose J E F. Then IT,/ 2 m for each ~ E J so , we can choose y, : m H T,. For each a < m let fa E Pier A, be such that f,, = y,, whenever i E J. Then ([fa] : a < m) is one-one. For suppose that or < 13 < m. Then J G {i E I :fai = Yta and fs, = yls) C { i :fa, # fs,), so [fa] # [fs]. Furthermore, J s {i E I : U, C, ~ [ p r , xj,]), so by the induction hypothesis P,,, %,IF Cm p,[([ 1 0 x)Lm,]. Thus we have shown that Pi,, %,IF 1, 0
Q V , ~I o XI.
-
Second, suppose that J $ F. Thus I J E F. Let K = {c E PI,, A,/F : P,., %,IF C, v[([ ] 0 x):]), and let L consist of one representative from each member of K. Now for each f E L we define Gf E P,,,, (T, u (0)) as follows:
1 I
I
(Gf)i=fi iffi~E, otherwise. (Gf), = 0 Now we claim that G is one-one. For, iff and g are distinct members of L, C, p,[[ ] x!] and so by the induction hypothesis {i E I : then Pi., Ui C, p,[pr, x;]) E F, and hence, arguing similarly for g, the set 0
0
( I - J ) n { i ~ I : f i# g i ) n { i E I : Ui kmp,[priox!]) n { i E I : Ui km cp[pr, xi]} 0
is in F. But for any member of this set we haveJ, gi E Ti, and i E I (Gf), # (Gg),. Thus, indeed, G is one-one. Hence
N
J,
SO
Part 5: Unusual Logics
since lTil < m for i E I Qvj~[xl).
Chapter 30: Finitary Extensions
-
J and [ II < rm. Therefore not(PiSIUi/F 1,
roles of U and 23 interchanged. Show that if U =%23 for every m E w then U is weak second order elementarily equivalent to 23.
+
Recalling from p. 323 our proof of the compactness theorem using ultraproducts, we obtain
30.18. Using 30.17, show that (w0.w.2, (i). This is a straight-forward generalization of the ultraproduct proof of compactness. Indeed, it is routine to check that the proof of 18.29 extends to L,,-languages if F is assumed to be m-complete. In the proof of the compactness theorem on p. 323, we take I = {A : A c F, lAl < m}, and for each A E I set G A = { O : A G O E I). The rest of the proof is similar, replacing "finite'; by "cardinality <m". But here it is necessary to show that m is regular; this was done above in the proof that (iv) * (v). ( i ) => (iv). Let A be the field of all subsets of X, and let F be an m-complete filter over A. Consider a first-order language with a unary relation symbol Pa for each a E A and an individual constant c. Let be the follow,,,,: ing set of sentences of L all sentences holding in (X, a),,,, P,c for each a E F. If A is a subset of I? of power <m, then there is an x E X such that x E {a E F : P,c is in A}. Hence ( X , a, x),,, is a model of A. It follows from (m, a)-compactness that r has a model 23 = ( B , b,, y),,,. Let G = {a E A : y E b,}. Our claim is that G is the desired m-complete ultrafilter extending F. If a E F, then P,c E r and so y E b, since 8 is a model of r. Thus F E G.
n
n
Theorem 31.16. Every strongly compact cardinal is measurable. Now we turn to equivalences for weakly compact cardinals, which we shall only carry through for strongly inaccessible cardinals. One of them concerns a generalization of Ramsey's theorem. Recall that S,S = { X E S : I XI = 2). We shall write m + (n)=provided that whenever S2m = A u B it follows that there is a F E m with = n such that S 2 r E A or S 2 r E B. Thus Ramsey's theorem says that m+(Ko)2 for any m 2 X,. Another equivalence involves the notion of a tree. A tree is a partially ordered set (P, I ) in which { x : x < y ) is well-ordered for each y E P ; its order type is the level of y. A cardinal m has the tree property provided that if ( T , I) is a tree of power m and every level has < m elements, then there is a simply ordered subset of T of power m. The following characterizations of weakly compact cardinals are due to Keisler, Tarski, Erdos, ParoviEenko, Monk, Scott, and Hanf.
Theorem 31.17. Assume that m is strongly inaccessible. Then the following conditions are equivalent;
(i) m is weakly compact; (ii) m has the tree property; (iii) if U is an m-complete, m-distributive Boolean algebra of power <m but > 1 , then U has an m-complete ultrajilter; (iv) if U is an m-complete jield of subsets of m of power m, then any mcomplete proper jilter on U can be extended to an m-complete ultrajilter; ( 0 ) m -+ (mI2; ( v i ) if ( T , I ) is a linear ordering with IT1 = m, then T has a subset of power m which is either well-ordered under I or under 2. PROOF. We shall show ( i ) 3 (ii) 3 (iii) =. (iv)
(v)
=>
(vi) a (ii) * (i).
( i ) a (ii). Assume ( i ) , and let ( T , 5 ) be a tree such that every level La for cx < m has <m elements, while IT1 = m. Clearly then L, # 0 for all cx < m. Let 9 be a language with a binary relation symbol