




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































Department of Mathematics Trent University Peterborough, Ontario Canada K9J 7B E-mail address: [email protected]
1991 Mathematics Subject Classification. 03
Key words and phrases. logic, computability, incompleteness
Abstract. This is a text for a problem-oriented course on math- ematical logic and computability.
Copyright c© 1994-2003 Stefan Bilaniuk. Permission is granted to copy, distribute and/or modify this doc- ument under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the sec- tion entitled “GNU Free Documentation License”.
This work was typeset with LATEX, using the AMS-LATEX and AMSFonts packages of the American Mathematical Society.
This book is a free text intended to be the basis for a problem- oriented course(s) in mathematical logic and computability for students with some degree of mathematical sophistication. Parts I and II cover the basics of propositional and first-order logic respectively, Part III covers the basics of computability using Turing machines and recursive functions, and Part IV covers G¨odel’s Incompleteness Theorems. They can be used in various ways for courses of various lengths and mixes of material. The author typically uses Parts I and II for a one-term course on mathematical logic, Part III for a one-term course on computability, and/or much of Part III together with Part IV for a one-term course on computability and incompleteness. In keeping with the modified Moore-method, this book supplies definitions, problems, and statements of results, along with some ex- planations, examples, and hints. The intent is for the students, indi- vidually or in groups, to learn the material by solving the problems and proving the results for themselves. Besides constructive criticism, it will probably be necessary for the instructor to supply further hints or direct the students to other sources from time to time. Just how this text is used will, of course, depend on the instructor and students in question. However, it is probably not appropriate for a conventional lecture-based course nor for a really large class. The material presented in this text is somewhat stripped-down. Various concepts and topics that are often covered in introductory mathematical logic and computability courses are given very short shrift or omitted entirely.^1 Instructors might consider having students do projects on additional material if they wish to to cover it.
Prerequisites. The material in this text is largely self-contained, though some knowledge of (very basic) set theory and elementary num- ber theory is assumed at several points. A few problems and examples draw on concepts from other parts of mathematics; students who are
(^1) Future versions of both volumes may include more – or less! – material. Feel
free to send suggestions, corrections, criticisms, and the like — I’ll feel free to ignore them or use them.
v
PREFACE vii
particular, a number of the key papers in the development of modern mathematical logic can be found in [ 9 ] and [ 6 ]. Others who should be acknowledged include my teachers and col- leagues; my students at Trent University who suffered, suffer, and will suffer through assorted versions of this text; Trent University and the taxpayers of Ontario, who paid my salary; Ohio University, where I spent my sabbatical in 1995–96; all the people and organizations who developed the software and hardware with which this book was pre- pared. Gregory H. Moore, whose mathematical logic course convinced me that I wanted to do the stuff, deserves particular mention. Any blame properly accrues to the author. Availability. The URL of the home page for A Problem Course In Mathematical Logic, with links to LATEX, PostScript, and Portable Document Format (pdf) files of the latest available release is:
http://euclid.trentu.ca/math/sb/pcml/
Please note that to typeset the LATEX source files, you will need the AMS-LATEX and AMSFonts packages in addition to LATEX. If you have any problems, feel free to contact the author for assis- tance, preferably by e-mail:
Stefan Bilaniuk Department of Mathematics Trent University Peterborough, Ontario K9J 7B e-mail: [email protected] Conditions. See the GNU Free Documentation License in Appen- dix D for what you can do with this text. The gist is that you are free to copy, distribute, and use it unchanged, but there are some restric- tions on what you can do if you wish to make changes. If you wish to use this text in a manner not covered by the GNU Free Documentation License, please contact the author.
Author’s Opinion. It’s not great, but the price is right!
x INTRODUCTION
plus some notion of how to interpret statements in the underlying lan- guage and determine their truth. The real fun lies in the relationship between interpretation of statements, truth, and reasoning. The de facto standard for formalizing mathematical systems is first- order logic, and the main thrust of this text is studying it with a view to understanding some of its basic features and limitations. More specifically, Part I of this text is concerned with propositional logic, developed here as a warm-up for the development of first-order logic proper in Part II. Propositional logic attempts to make precise the relationships that certain connectives like not, and , or , and if... then are used to ex- press in English. While it has uses, propositional logic is not powerful enough to formalize most mathematical discourse. For one thing, it cannot handle the concepts expressed by the quantifiers all and there is. First-order logic adds these notions to those propositional logic handles, and suffices, in principle, to formalize most mathematical rea- soning. The greater flexibility and power of first-order logic makes it a good deal more complicated to work with, both in syntax and seman- tics. However, a number of results about propositional logic carry over to first-order logic with little change. Given that first-order logic can be used to formalize most mathe- matical reasoning it provides a natural context in which to ask whether such reasoning can be automated. This question is the Entschei- dungsproblem^3 :
Entscheidungsproblem. Given a set Σ of hypotheses and some statement ϕ, is there an effective method for determining whether or not the hypotheses in Σ suffice to prove ϕ?
Historically, this question arose out of David Hilbert’s scheme to secure the foundations of mathematics by axiomatizing mathematics in first-order logic, showing that the axioms in question do not give rise to any contradictions, and that they suffice to prove or disprove every statement (which is where the Entscheidungsproblem comes in). If the answer to the Entscheidungsproblem were “yes” in general, the effective method(s) in question might put mathematicians out of busi- ness... Of course, the statement of the problem begs the question of what “effective method” is supposed to mean. In the course of trying to find a suitable formalization of the no- tion of “effective method”, mathematicians developed several different
(^3) Entscheidungsproblem ≡ decision problem.
INTRODUCTION xi
abstract models of computation in the 1930’s, including recursive func- tions, λ-calculus, Turing machines, and grammars^4. Although these models are very different from each other in spirit and formal defini- tion, it turned out that they were all essentially equivalent in what they could do. This suggested the (empirical, not mathematical!) principle:
Church’s Thesis. A function is effectively computable in princi- ple in the real world if and only if it is computable by (any) one of the abstract models mentioned above.
Part III explores two of the standard formalizations of the notion of “effective method”, namely Turing machines and recursive functions, showing, among other things, that these two formalizations are actually equivalent. Part IV then uses the tools developed in Parts II ands III to answer the Entscheidungsproblem for first-order logic. The answer to the general problem is negative, by the way, though decision proce- dures do exist for propositional logic, and for some particular first-order languages and sets of hypotheses in these languages.
Prerequisites. In principle, not much is needed by way of prior mathematical knowledge to define and prove the basic facts about propositional logic and computability. Some knowledge of the natu- ral numbers and a little set theory suffices; the former will be assumed and the latter is very briefly summarized in Appendix A. ([ 10 ] is a good introduction to basic set theory in a style not unlike this book’s; [ 8 ] is a good one in a more conventional mode.) Competence in han- dling abstraction and proofs, especially proofs by induction, will be needed, however. In principle, the experience provided by a rigorous introductory course in algebra, analysis, or discrete mathematics ought to be sufficient.
Other Sources and Further Reading. [ 2 ], [ 5 ], [ 7 ], [ 12 ], and [ 13 ] are texts which go over large parts of the material covered here (and often much more besides), while [ 1 ] and [ 4 ] are good references for more advanced material. A number of the key papers in the development of modern mathematical logic and related topics can be found in [ 9 ] and [ 6 ]. Entertaining accounts of some related topics may be found in [ 11 ],
(^4) The development of the theory of computation thus actually began before the
development of electronic digital computers. In fact, the computers and program- ming languages we use today owe much to the abstract models of computation which preceded them. For example, the standard von Neumann architecture for digital computers was inspired by Turing machines and the programming language LISP borrows much of its structure from λ-calculus.
4 1. LANGUAGE
(A 0 → (¬A 1 )) of LP by using A 0 to represent “The moon is red” and A 1 to represent “The moon is made of cheese.” Note that the truth of the formula depends on the interpretation of the atomic sentences which appear in it. Using the interpretations just given of A 0 and A 1 , the formula (A 0 → (¬A 1 )) is true, but if we instead use A 0 and A 1 to interpret “My telephone is ringing” and “Someone is calling me”, respectively, (A 0 → (¬A 1 )) is false. Definition 1.2 says that that every atomic formula is a formula and every other formula is built from shorter formulas using the connectives and parentheses in particular ways. For example, A 1123 , (A 2 → (¬A 0 )), and (((¬A 1 )^ →^ (A 1 →^ A 7 ))^ →^ A 7 ) are all formulas, but^ X 3 , (A 5 ), ()¬A 41 , A 5 → A 7 , and (A 2 → (¬A 0 ) are not.
Problem 1.1. Why are the following not formulas of LP? There might be more than one reason...
(1) A− 56 (2) (Y → A) (3) (A 7 ← A 4 ) (4) A 7 → (¬A 5 )) (5) (A 8 A 9 → A 1043998 (6) (((¬A 1 ) → (A` → A 7 ) → A 7 ) Problem 1.2. Show that every formula of LP has the same number of left parentheses as it has of right parentheses.
Problem 1.3. Suppose α is any formula of LP. Let (α) be the length of α as a sequence of symbols and let p(α) be the number of parentheses (counting both left and right parentheses) in α. What are the minimum and maximum values of p(α)/(α)?
Problem 1.4. Suppose α is any formula of LP. Let s(α) be the number of atomic formulas in α (counting repetitions) and let c(α) be the number of occurrences of → in α. Show that s(α) = c(α) + 1.
Problem 1.5. What are the possible lengths of formulas of LP? Prove it.
Problem 1.6. Find a way for doing without parentheses or other punctuation symbols in defining a formal language for propositional logic.
Proposition 1.7. Show that the set of formulas of LP is countable. Informal Conventions. At first glance, LP may not seem capable of breaking down English sentences with connectives other than not and if... then. However, the sense of many other connectives can be
captured by these two by using suitable circumlocutions. We will use the symbols ∧, ∨, and ↔ to represent and, or ,^2 and if and only if respectively. Since they are not among the symbols of LP , we will use them as abbreviations for certain constructions involving only ¬ and →. Namely,
Interpreting A 0 and A 1 as before, for example, one could translate the English sentence “The moon is red and made of cheese” as (A 0 ∧ A 1 ). (Of course this is really (¬(A 0 → (¬A 1 ))), i.e. “It is not the case that if the moon is green, it is not made of cheese.”) ∧, ∨, and ↔ were not included among the official symbols of LP partly because we can get by without them and partly because leaving them out makes it easier to prove things about LP.
Problem 1.8. Take a couple of English sentences with several con- nectives and translate them into formulas of LP. You may use ∧, ∨, and ↔ if appropriate.
Problem 1.9. Write out ((α ∨ β) ∧ (β → α)) using only ¬ and →. For the sake of readability, we will occasionally use some informal conventions that let us get away with writing fewer parentheses:
Just like formulas using ∨, ∧, or ¬, formulas in which parentheses have been omitted as above are not official formulas of LP , they are conve- nient abbreviations for official formulas of LP. Note that a precedent for the precedence convention can be found in the way that · commonly takes precedence over + in writing arithmetic formulas.
Problem 1.10. Write out ¬(α ↔ ¬δ) ∧ β → ¬α → γ first with the missing parentheses included and then as an official formula of LP.
(^2) We will use or inclusively, so that “A or B” is still true if both of A and B
are true.
Whether a given formula ϕ of LP is true or false usually depends on how we interpret the atomic formulas which appear in ϕ. For example, if ϕ is the atomic formula A 2 and we interpret it as “2+2 = 4”, it is true, but if we interpret it as “The moon is made of cheese”, it is false. Since we don’t want to commit ourselves to a single interpretation — after all, we’re really interested in general logical relationships — we will define how any assignment of truth values T (“true”) and F (“false”) to atomic formulas of LP can be extended to all other formulas. We will also get a reasonable definition of what it means for a formula of LP to follow logically from other formulas.
Definition 2.1. A truth assignment is a function v whose domain is the set of all formulas of LP and whose range is the set {T, F } of truth values, such that:
(1) v(An) is defined for every atomic formula An. (2) For any formula α,
v( (¬α) ) =
T if v(α) = F F if v(α) = T.
(3) For any formulas α and β,
v( (α → β) ) =
F if v(α) = T and v(β) = F T otherwise.
Given interpretations of all the atomic formulas of LP , the corre- sponding truth assignment would give each atomic formula representing a true statement the value T and every atomic formula representing a false statement the value F. Note that we have not defined how to handle any truth values besides T and F in LP. Logics with other truth values have uses, but are not relevant in most of mathematics. For an example of how non-atomic formulas are given truth values on the basis of the truth values given to their components, suppose v is a truth assignment such that v(A 0 ) = T and v(A 1 ) = F. Then v( ((¬A 1 ) → (A 0 → A 1 )) ) is determined from v( (¬A 1 ) ) and v( (A 0 →
7
8 2. TRUTH ASSIGNMENTS
A 1 ) ) according to clause 3 of Definition 2.1. In turn, v( (¬A 1 ) ) is deter- mined from of v(A 1 ) according to clause 2 and v( (A 0 → A 1 ) ) is deter- mined from v(A 1 ) and v(A 0 ) according to clause 3. Finally, by clause 1, our truth assignment must be defined for all atomic formulas to begin with; in this case, v(A 0 ) = T and v(A 1 ) = F. Thus v( (¬A 1 ) ) = T and v( (A 0 → A 1 ) ) = F , so v( ((¬A 1 ) → (A 0 → A 1 )) ) = F. A convenient way to write out the determination of the truth value of a formula on a given truth assignment is to use a truth table: list all the subformulas of the given formula across the top in order of length and then fill in their truth values on the bottom from left to right. Except for the atomic formulas at the extreme left, the truth value of each subformula will depend on the truth values of the subformulas to its left. For the example above, one gets something like:
A 0 A 1 (¬A 1 ) (A 0 → A 1 ) (¬A 1 ) → (A 0 → A 1 )) T F T F F Problem 2.1. Suppose v is a truth assignment such that v(A 0 ) = v(A 2 ) = T and v(A 1 ) = v(A 3 ) = F. Find v(α) if α is:
(1) ¬A 2 → ¬A 3 (2) ¬A 2 → A 3 (3) ¬(¬A 0 → A 1 ) (4) A 0 ∨ A 1 (5) A 0 ∧ A 1 The use of finite truth tables to determine what truth value a par- ticular truth assignment gives a particular formula is justified by the following proposition, which asserts that only the truth values of the atomic sentences in the formula matter.
Proposition 2.2. Suppose δ is any formula and u and v are truth assignments such that u(An) = v(An) for all atomic formulas An which occur in δ. Then u(δ) = v(δ).
Corollary 2.3. Suppose u and v are truth assignments such that u(An) = v(An) for every atomic formula An. Then u = v, i.e. u(ϕ) = v(ϕ) for every formula ϕ.
Proposition 2.4. If α and β are formulas and v is a truth assign- ment, then:
(1) v(¬α) = T if and only if v(α) = F. (2) v(α → β) = T if and only if v(β) = T whenever v(α) = T ; (3) v(α ∧ β) = T if and only if v(α) = T and v(β) = T ; (4) v(α ∨ β) = T if and only if v(α) = T or v(β) = T ; and (5) v(α ↔ β) = T if and only if v(α) = v(β).