Open-Logic-Enderton Rev: C8c9782 (2021-09-28) by OLP/ CC–BY
Total Page:16
File Type:pdf, Size:1020Kb
An Open Mathematical Introduction to Logic Example OLP Text `ala Enderton Open Logic Project open-logic-enderton rev: c8c9782 (2021-09-28) by OLP/ CC{BY Contents I Propositional Logic7 1 Syntax and Semantics9 1.0 Introduction............................ 9 1.1 Propositional Wffs......................... 10 1.2 Preliminaries............................ 11 1.3 Valuations and Satisfaction.................... 12 1.4 Semantic Notions ......................... 14 Problems ................................. 14 2 Derivation Systems 17 2.0 Introduction............................ 17 2.1 The Sequent Calculus....................... 18 2.2 Natural Deduction......................... 19 2.3 Tableaux.............................. 20 2.4 Axiomatic Derivations ...................... 22 3 Axiomatic Derivations 25 3.0 Rules and Derivations....................... 25 3.1 Axiom and Rules for the Propositional Connectives . 26 3.2 Examples of Derivations ..................... 27 3.3 Proof-Theoretic Notions ..................... 29 3.4 The Deduction Theorem ..................... 30 1 Contents 3.5 Derivability and Consistency................... 32 3.6 Derivability and the Propositional Connectives......... 32 3.7 Soundness ............................. 33 Problems ................................. 34 4 The Completeness Theorem 35 4.0 Introduction............................ 35 4.1 Outline of the Proof........................ 36 4.2 Complete Consistent Sets of Sentences ............. 37 4.3 Lindenbaum's Lemma....................... 38 4.4 Construction of a Model ..................... 39 4.5 The Completeness Theorem ................... 39 4.6 The Compactness Theorem.................... 40 4.7 A Direct Proof of the Compactness Theorem.......... 40 Problems ................................. 41 II First-order Logic 43 5 Introduction to First-Order Logic 45 5.0 First-Order Logic ......................... 45 5.1 Syntax ............................... 46 5.2 Wffs................................. 47 5.3 Satisfaction............................. 48 5.4 Sentences.............................. 49 5.5 Semantic Notions ......................... 50 5.6 Substitution ............................ 51 5.7 Models and Theories ....................... 51 5.8 Soundness and Completeness................... 52 6 Syntax of First-Order Logic 55 6.0 Introduction............................ 55 6.1 First-Order Languages ...................... 55 6.2 Terms and Wffs.......................... 57 6.3 Unique Readability ........................ 59 6.4 Main operator of a Formula ................... 61 6.5 Subformulas ............................ 62 6.6 Free Variables and Sentences................... 63 6.7 Substitution ............................ 64 Problems ................................. 65 7 Semantics of First-Order Logic 67 7.0 Introduction............................ 67 7.1 Structures for First-order Languages............... 68 7.2 Covered Structures for First-order Languages.......... 69 7.3 Satisfaction of a Wff in a Structure ............... 70 2 Release : c8c9782 (2021-09-28) Contents 7.4 Variable Assignments....................... 74 7.5 Extensionality........................... 77 7.6 Semantic Notions ......................... 78 Problems ................................. 80 8 Theories and Their Models 83 8.0 Introduction............................ 83 8.1 Expressing Properties of Structures............... 84 8.2 Examples of First-Order Theories................ 85 8.3 Expressing Relations in a Structure............... 88 8.4 The Theory of Sets ........................ 88 8.5 Expressing the Size of Structures ................ 91 Problems ................................. 92 9 Derivation Systems 93 9.0 Introduction............................ 93 9.1 The Sequent Calculus....................... 94 9.2 Natural Deduction......................... 95 9.3 Tableaux.............................. 96 9.4 Axiomatic Derivations ...................... 98 10 Axiomatic Derivations 101 10.0 Rules and Derivations....................... 101 10.1 Axiom and Rules for the Propositional Connectives . 102 10.2 Axioms and Rules for Quantifiers . 103 10.3 Examples of Derivations ..................... 104 10.4 Derivations with Quantifiers ................... 105 10.5 Proof-Theoretic Notions ..................... 106 10.6 The Deduction Theorem ..................... 107 10.7 The Deduction Theorem with Quantifiers . 109 10.8 Derivability and Consistency................... 110 10.9 Derivability and the Propositional Connectives . 110 10.10 Derivability and the Quantifiers ................. 111 10.11 Soundness ............................. 112 10.12 Derivations with Equality symbol ................ 113 Problems ................................. 114 11 The Completeness Theorem 115 11.0 Introduction............................ 115 11.1 Outline of the Proof........................ 116 11.2 Complete Consistent Sets of Sentences . 118 11.3 Henkin Expansion......................... 119 11.4 Lindenbaum's Lemma....................... 121 11.5 Construction of a Model ..................... 121 11.6 Identity............................... 123 11.7 The Completeness Theorem ................... 125 Release : c8c9782 (2021-09-28) 3 Contents 11.8 The Compactness Theorem.................... 126 11.9 A Direct Proof of the Compactness Theorem . 128 11.10 The L¨owenheim-Skolem Theorem . 128 Problems ................................. 129 12 Beyond First-order Logic 131 12.0 Overview.............................. 131 12.1 Many-Sorted Logic ........................ 132 12.2 Second-Order logic ........................ 133 12.3 Higher-Order logic......................... 136 12.4 Intuitionistic Logic ........................ 139 12.5 Modal Logics............................ 142 12.6 Other Logics............................ 144 III Computability 145 13 Recursive Functions 147 13.0 Introduction............................ 147 13.1 Primitive Recursion........................ 148 13.2 Composition............................ 150 13.3 Primitive Recursion Functions.................. 151 13.4 Primitive Recursion Notations.................. 154 13.5 Primitive Recursive Functions are Computable . 154 13.6 Examples of Primitive Recursive Functions . 155 13.7 Primitive Recursive Relations .................. 158 13.8 Bounded Minimization ...................... 160 13.9 Primes ............................... 161 13.10 Sequences ............................. 162 13.11 Trees ................................ 164 13.12 Other Recursions ......................... 165 13.13 Non-Primitive Recursive Functions . 166 13.14 Partial Recursive Functions.................... 167 13.15 The Normal Form Theorem ................... 169 13.16 The Halting Problem....................... 170 13.17 General Recursive Functions................... 171 Problems ................................. 171 14 Computability Theory 173 14.0 Introduction............................ 173 14.1 Coding Computations....................... 174 14.2 The Normal Form Theorem ................... 175 14.3 The s-m-n Theorem........................ 176 14.4 The Universal Partial Computable Function . 176 14.5 No Universal Computable Function . 176 14.6 The Halting Problem....................... 177 4 Release : c8c9782 (2021-09-28) Contents 14.7 Comparison with Russell's Paradox . 178 14.8 Computable Sets.......................... 179 14.9 Computably Enumerable Sets .................. 180 14.10 Definitions of C. E. Sets ..................... 180 14.11 Union and Intersection of C.E. Sets . 183 14.12 Computably Enumerable Sets not Closed under Complement . 184 14.13 Reducibility ............................ 184 14.14 Properties of Reducibility..................... 185 14.15 Complete Computably Enumerable Sets . 187 14.16 An Example of Reducibility ................... 187 14.17 Totality is Undecidable...................... 188 14.18 Rice's Theorem .......................... 189 14.19 The Fixed-Point Theorem .................... 191 14.20 Applying the Fixed-Point Theorem . 194 14.21 Defining Functions using Self-Reference . 195 14.22 Minimization with Lambda Terms . 196 Problems ................................. 197 IV Incompleteness 199 15 Introduction to Incompleteness 201 15.0 Historical Background....................... 201 15.1 Definitions............................. 205 15.2 Overview of Incompleteness Results . 209 15.3 Undecidability and Incompleteness . 211 Problems ................................. 212 16 Arithmetization of Syntax 213 16.0 Introduction............................ 213 16.1 Coding Symbols.......................... 214 16.2 Coding Terms ........................... 216 16.3 Coding Wffs............................ 217 16.4 Substitution ............................ 218 16.5 Axiomatic Derivations ...................... 219 Problems ................................. 222 17 Representability in Q 223 17.0 Introduction............................ 223 17.1 Functions Representable in Q are Computable . 225 17.2 The Beta Function Lemma.................... 226 17.3 Simulating Primitive Recursion . 229 17.4 Basic Functions are Representable in Q . 230 17.5 Composition is Representable in Q . 232 17.6 Regular Minimization is Representable in Q . 234 17.7 Computable Functions are Representable in Q . 237 Release : c8c9782 (2021-09-28) 5 Contents 17.8 Representing Relations ...................... 238 17.9 Undecidability........................... 238 Problems ................................. 239 18 Theories and Computability 241 18.0 Introduction............................ 241 18.1 Q is C.e.-Complete