A Second Course in Logic
Total Page:16
File Type:pdf, Size:1020Kb
A Second Course in Logic Christopher Gauker Version of December 2013 I place no restrictions on the nonprofit use or distribution of this document. I only ask for credit where credit is due. Introduction......................................................................................................................... 1 Lesson 1: First-order Validity............................................................................................ 5 Lesson 2: The Soundness Theorem for First-order Logic ............................................... 28 Lesson 3: The Completeness Theorem for Truth-functional Logic................................. 46 Lesson 4: The Completeness Theorem for First-order Logic.......................................... 54 Lesson 5: Preliminaries Before We Take On Gödel-incompleteness.............................. 71 Lesson 6: Sets of Numbers .............................................................................................. 81 Lesson 7: Diagonalization................................................................................................ 91 Lesson 8: Arithmetization of Syntax and the First Incompleteness Theorem............... 102 Lesson 9: Definability in a Theory ................................................................................ 116 Lesson 10: The Upper Diagonal Lemma and Some Consequences .............................. 127 Lesson 11: The Undecidability of First-order Logic ..................................................... 135 Lesson 12: Gödel’s Second Incompleteness Theorem .................................................. 139 Lesson 13: Second-order Logic ..................................................................................... 143 Lesson 14: Propositional Modal Logic.......................................................................... 152 Lesson 15: Quantified Modal Logic .............................................................................. 162 Introduction These notes are intended for readers who have already had a solid course in contemporary symbolic logic. I assume that readers know how to interpret (informally) the symbols of symbolic logic and have learned how to do proofs in a natural deduction system such as that found in Jon Barwise and John Etchemendy’s textbook, Language, Proof and Logic. The course picks up at the point where students need to learn a precise definition of truth in a structure and learn to use it to demonstrate the validity and invalidity of arguments. At the University of Cincinnati, the Philosophy Department teaches a two-quarter logic course. (Quarters are 11-week terms.) In the first eight weeks of the first quarter, the students study material in the first 13 chapters of the Barwise and Etchemendy’s textbook. (We skip some sections.) These notes pertain to the last two weeks of the first quarter and all of the second quarter. If you, dear reader, discover any errors, typographical or worse, I would be grateful for your feedback. Contact me at: [email protected] Outline of course Here, in outline, is what we will do in this course: I. Define first-order validity precisely. To do that we need definitions of structures, variable assignments, satisfaction by a variable assignment in a structure, and truth in a structure. II. Prove soundness and completeness. That is, we prove that the class of first-order valid arguments exactly coincides with the class of arguments whose conclusions can be derived from their premises using our inference rules. Dividends that we will reap from this include: A. The Löwenheim-Skolem Theorem. If a theory (a set of sentences) has a model (a structure in which all of the sentences in the set are true), then it has a model with a denumerable domain. (So even a theory of the real numbers will be interpretable as true in a model whose domain contains just the positive integers.) Introduction 01/02/07 Page 2 B. The Compactness Theorem. If every finite subset of a set of sentences is consistent, then the whole set is consistent. This does not look very exciting, but it will be exciting to discover, later on, that second-order logic is not compact. III. Prove Gödel’s First Incompleteness Theorem. What this says is that the truths of arithmetic are not axiomatizable. That is, there is no decidable, consistent set of sentences such that all of the truths of arithmetic are first-order consequences of the sentences in that set. Not even if the set of axioms is infinite (so long as it is decidable). Some dividends that we will reap along the way include: A. We will acquire the concepts of decidability and enumerability and will learn how they can be defined in a precise way in terms of the formulas of arithmetic. B. We will prove Tarski’s undefinability theorem, which says that no bivalent language can contain its own truth predicate. Actually, we will prove the Gödel theorem in several different ways and in two importantly different versions. IV. Undecidability of first-order logic. First-order logic is axiomatizable. (For instance, our Fitch inference rules constitute such an axiomatization.) However, it is not decidable. That is, there is no algorithm that will take any argument and tell us whether or not that argument is first-order valid. This will follow pretty quickly from some results that we will have proved on the way to the second version of Gödel’s First Incompleteness Theorem. V. Gödel’s Second Incompleteness Theorem. We will make short schrift of this by starting with some big assumptions that everyone believes but no one bothers to prove. VI. Second-order logic. Second-order logic is just like first-order logic, except that we will have variables that stand in predicate position and we will have quantifiers that bind those variables. The important fact about second-order logic that we will learn is that, like arithmetic, it is not axiomatizable. We can define logical validity for second-order logic, but then we cannot have a set of axioms and inference rules that allow us to give proofs for all and only the second-order valid arguments. Introduction 01/02/07 Page 3 VII. Modal logic. We will define logical validity for a language containing modal operators, such as “necessarily” and “possibly”. This gets a bit tricky and controversial when we try to add quantifiers as well. This last unit will belong to what is called “philosophical logic”, whereas everything prior will belong to (elementary) mathematical logic. Sources Authors of logic books are not very good about telling us where they learned what they know. Maybe they would like us to believe that they made it up themselves! But I certainly did not make this stuff up myself; so here I will list the books from which I have learned the things that I explain in these notes: Jon Barwise and John Etchemendy, Language, Proof and Logic, CSLI (1999-2002). I have taught elementary logic from countless textbooks over the years; this is clearly the best. The computer programs that come with the textbook are an excellent teaching tool. My proof of the completeness theorem (i.e., the proof of the completeness of the Fitch- style natural deduction system with respect to the definition of logical validity) comes from chapters 17 and 19 of this book. However, I have filled in many details that they omit. Strangely, they do not prove a soundness theorem at all (contenting themselves with only the most hand-waving sketch); so I have had to construct that from scratch. With axiomatic proof theories, the proof of soundness is quite trivial; it’s not quite so trivial for natural deduction systems. (Page numbers refer to the first edition; a second edition listing David Barker-Plummer as the primary author is now available.) Raymond Smullyan, Gödel’s Incompleteness Proofs, Oxford University Press (1992). This is a brilliant book. Although I had previously taught the proofs of Gödel’s theorems in Enderton and Boolos & Jeffrey, I probably never really understood Gödel’s theorems until I read this book. Smullyan avoids a great deal of complexity by defining recursively enumerable sets and relations as Σ1 sets and relations. (I will explain these concepts below.) The proofs of incompleteness that I have given below follow certain threads that I have picked out of this book. In one place I refer the reader to this book for a detail that I do not myself provide (but which the reader will probably be content to grant without proof). Strangely, Smullyan goes almost right up to, but then does not actually prove the very general version of Gödel’s Theorem proved in Enderton and Boolos & Jeffrey, which I prove in Lesson 10 below. I don’t understand why Oxford cannot bring out an inexpensive paperback edition of this book. Maybe it’s not Smullyan’s fault, but somebody did a very bad job with the index and references. Introduction 01/02/07 Page 4 George Boolos and Richard Jeffrey, Computability and Logic, 2nd edition (or 3rd edition), Cambridge University Press. My proof of the more general version of Gödel’s Theorem borrows some final steps from this book. Also, my proof of the undecidability of first-order logic is based on the one in this book. This book is widely used in Philosophy, but it’s a little strange since it starts out with chapters on computability and then does everything else in terms of that. There is a fourth edition, which adds another author, John Burgess. That one looks significantly different (the type has been completely re-set), but I have never read it. Herbert Enderton, Introduction to Mathematical Logic, Academic