Intermediate Logic
Total Page:16
File Type:pdf, Size:1020Kb
Intermediate Logic Richard Zach Philosophy 310 Winter Term 2015 McGill University Intermediate Logic by Richard Zach is licensed under a Creative Commons Attribution 4.0 International License. It is based on The Open Logic Text by the Open Logic Project, used under a Creative Commons Attribution 4.0 In- ternational License. Contents Prefacev I Sets, Relations, Functions1 1 Sets2 1.1 Basics ................................. 2 1.2 Some Important Sets......................... 3 1.3 Subsets ................................ 4 1.4 Unions and Intersections...................... 5 1.5 Pairs, Tuples, Cartesian Products ................. 7 1.6 Russell’s Paradox .......................... 9 2 Relations 10 2.1 Relations as Sets........................... 10 2.2 Special Properties of Relations................... 11 2.3 Orders................................. 12 2.4 Graphs ................................ 14 2.5 Operations on Relations....................... 15 3 Functions 17 3.1 Basics ................................. 17 3.2 Kinds of Functions.......................... 19 3.3 Inverses of Functions ........................ 20 3.4 Composition of Functions ..................... 21 3.5 Isomorphism............................. 22 3.6 Partial Functions........................... 22 3.7 Functions and Relations....................... 23 4 The Size of Sets 24 4.1 Introduction ............................. 24 4.2 Enumerable Sets........................... 24 4.3 Non-enumerable Sets........................ 28 i CONTENTS 4.4 Reduction............................... 31 4.5 Equinumerous Sets ......................... 32 4.6 Comparing Sizes of Sets....................... 33 II First-Order Logic 35 5 Syntax and Semantics 36 5.1 Introduction ............................. 36 5.2 First-Order Languages ....................... 37 5.3 Terms and Formulas......................... 39 5.4 Unique Readability ......................... 41 5.5 Main operator of a Formula .................... 43 5.6 Subformulas ............................. 44 5.7 Free Variables and Sentences.................... 45 5.8 Substitution.............................. 46 5.9 Structures for First-order Languages ............... 48 5.10 Covered Structures for First-order Languages.......... 49 5.11 Satisfaction of a Formula in a Structure.............. 50 5.12 Variable Assignments........................ 54 5.13 Extensionality ............................ 57 5.14 Semantic Notions .......................... 58 6 Theories and Their Models 60 6.1 Introduction ............................. 60 6.2 Expressing Properties of Structures................ 62 6.3 Examples of First-Order Theories................. 62 6.4 Expressing Relations in a Structure ................ 65 6.5 The Theory of Sets.......................... 66 6.6 Expressing the Size of Structures.................. 68 III Proofs and Completeness 70 7 The Sequent Calculus 71 7.1 Rules and Derivations........................ 71 7.2 Examples of Derivations ...................... 73 7.3 Proof-Theoretic Notions....................... 77 7.4 Properties of Derivability...................... 78 7.5 Soundness .............................. 81 7.6 Derivations with Identity predicate................ 85 8 The Completeness Theorem 87 8.1 Introduction ............................. 87 8.2 Outline of the Proof......................... 87 ii Contents 8.3 Maximally Consistent Sets of Sentences.............. 89 8.4 Henkin Expansion.......................... 91 8.5 Lindenbaum’s Lemma ....................... 92 8.6 Construction of a Model ...................... 93 8.7 Identity................................ 94 8.8 The Completeness Theorem .................... 96 8.9 The Compactness Theorem..................... 97 8.10 The Lowenheim-Skolem¨ Theorem................. 99 8.11 Overspill ...............................100 IV Computability and Incompleteness 101 9 Recursive Functions 102 9.1 Introduction .............................102 9.2 Primitive Recursion.........................103 9.3 Primitive Recursive Functions are Computable . 106 9.4 Examples of Primitive Recursive Functions . 107 9.5 Primitive Recursive Relations ...................108 9.6 Bounded Minimization.......................110 9.7 Primes.................................111 9.8 Sequences...............................112 9.9 Other Recursions...........................114 9.10 Non-Primitive Recursive Functions . 115 9.11 Partial Recursive Functions.....................117 9.12 The Normal Form Theorem ....................119 9.13 The Halting Problem ........................119 9.14 General Recursive Functions....................121 10 Arithmetization of Syntax 122 10.1 Introduction .............................122 10.2 Coding Symbols...........................123 10.3 Coding Terms ............................125 10.4 Coding Formulas ..........................127 10.5 Substitution..............................128 10.6 Derivations in LK . 129 11 Representability in Q 133 11.1 Introduction .............................133 11.2 Functions Representable in Q are Computable . 135 11.3 The Beta Function Lemma .....................136 11.4 Simulating Primitive Recursion ..................139 11.5 Basic Functions are Representable in Q . 140 11.6 Composition is Representable in Q . 142 iii CONTENTS 11.7 Regular Minimization is Representable in Q . 144 11.8 Computable Functions are Representable in Q . 147 11.9 Representing Relations .......................147 11.10 Undecidability............................148 12 Incompleteness and Provability 150 12.1 Introduction .............................150 12.2 The Fixed-Point Lemma.......................151 12.3 The First Incompleteness Theorem . 153 12.4 Rosser’s Theorem ..........................154 12.5 Comparison with Godel’s¨ Original Paper . 156 12.6 The Provability Conditions for PA . 156 12.7 The Second Incompleteness Theorem . 157 12.8 Lob’s¨ Theorem............................160 12.9 The Undefinability of Truth.....................163 Problems 165 iv Preface Formal logic has many applications both within philosophy and outside (es- pecially in mathematics, computer science, and linguistics). This second course will introduce you to the concepts, results, and methods of formal logic neces- sary to understand and appreciate these applications as well as the limitations of formal logic. It will be mathematical in that you will be required to master abstract formal concepts and to prove theorems about logic (not just in logic the way you did in Phil 210); but it does not presuppose any advanced knowledge of mathematics. We will begin by studying some basic formal concepts: sets, relations, and functions and sizes of infinite sets. We will then consider the language, seman- tics, and proof theory of first-order logic (FOL), and ways in which we can use first-order logic to formalize facts and reasoning abouts some domains of in- terest to philosophers and logicians. In the second part of the course, we will begin to investigate the meta- theory of first-order logic. We will concentrate on a few central results: the completeness theorem, which relates the proof theory and semantics of first- order logic, and the compactness theorem and Lowenheim-Skolem¨ theorems, which concern the existence and size of first-order interpretations. In the third part of the course, we will discuss a particular way of mak- ing precise what it means for a function to be computable, namely, when it is recursive. This will enable us to prove important results in the metatheory of logic and of formal systems formulated in first-order logic: Godel’s¨ incom- pleteness theorem, the Church-Turing undecidability theorem, and Tarski’s theorem about the undefinability of truth. Week 1 (Jan 5, 7). Introduction. Sets and Relations. Week 2 (Jan 12, 14). Functions. Enumerability. Week 3 (Jan 19, 21). Syntax and Semantics of FOL. Week 4 (Jan 26, 28). Structures and Theories. Week 5 (Feb 2, 5). Sequent Calculus and Proofs in FOL. Week 6 (Feb 9, 12). The Completeness Theorem. v PREFACE Week 7 (Feb 16, 18). Compactness and Lowenheim-Skolem¨ Theorems Week 8 (Mar 23, 25). Recursive Functions Week 9 (Mar 9, 11). Arithmetization of Syntax Week 10 (Mar 16, 18). Theories and Computability Week 11 (Mar 23, 25). Godel’s¨ Incompleteness Theorems Week 12 (Mar 30, Apr 1). The Undefinability of Truth. Week 13, 14 (Apr 8, 13). Applications. vi Part I Sets, Relations, Functions 1 Chapter 1 Sets 1.1 Basics Sets are the most fundamental building blocks of mathematical objects. In fact, almost every mathematical object can be seen as a set of some kind. In logic, as in other parts of mathematics, sets and set-theoretical talk is ubiquitous. So it will be important to discuss what sets are, and introduce the notations necessary to talk about sets and operations on sets in a standard way. Definition 1.1 (Set). A set is a collection of objects, considered independently of the way it is specified, of the order of the objects in the set, or of their multiplicity. The objects making up the set are called elements or members of the set. If a is an element of a set X, we write a 2 X (otherwise, a 2/ X). The set which has no elements is called the empty set and denoted by the symbol Æ. Example 1.2. Whenever you have a bunch of objects, you can collect them together in a set. The set of Richard’s siblings, for instance, is a set that con- tains one person, and we could write it as S = fRuthg. In general, when we have some objects a1,..., an, then the set consisting of exactly those ob- jects is written fa1,..., ang. Frequently we’ll