
Sets, Logic, Computation The Open Logic Project Instigator Richard Zach, University of Calgary Editorial Board Aldo Antonelli,y University of California, Davis Andrew Arana, Université Paris I Panthénon–Sorbonne Jeremy Avigad, Carnegie Mellon University Walter Dean, University of Warwick Gillian Russell, University of North Carolina Nicole Wyatt, University of Calgary Audrey Yap, University of Victoria Contributors Samara Burns, University of Calgary Dana Hägg, University of Calgary Sets, Logic, Computation An Open Logic Text Remixed by Richard Zach Winter 2017 The Open Logic Project would like to acknowledge the generous support of the Faculty of Arts and the Taylor Institute of Teaching and Learning of the University of Calgary. This resource was funded by the Alberta Open Educational Re- sources (ABOER) Initiative, which is made possible through an investment from the Alberta government. Illustrations by Matthew Leadbeater, used under a Creative Com- mons Attribution-NonCommercial 4.0 International License. Typeset in Baskervald X and Universalis ADF Standard by LATEX. This version of phil379 is revision f7344c9 (2017-07-18), with content generated from OpenLogicProject revision 977ec76 (2017- 07-18). Sets, Logic, Computation by Richard Zach is licensed under a Creative Commons Attribution 4.0 Interna- tional License. It is based on The Open Logic Text by the Open Logic Project, used under a Creative Commons At- tribution 4.0 International License. Contents Preface xiii I Sets, Relations, Functions 1 1 Sets 2 1.1 Basics . 2 1.2 Some Important Sets . 4 1.3 Subsets . 5 1.4 Unions and Intersections . 6 1.5 Pairs, Tuples, Cartesian Products . 9 1.6 Russell’s Paradox . 11 Summary . 12 Problems . 13 2 Relations 14 2.1 Relations as Sets . 14 2.2 Special Properties of Relations . 16 2.3 Orders . 18 2.4 Graphs . 21 2.5 Operations on Relations . 22 Summary . 23 Problems . 24 v vi CONTENTS 3 Functions 26 3.1 Basics . 26 3.2 Kinds of Functions . 28 3.3 Inverses of Functions . 30 3.4 Composition of Functions . 31 3.5 Isomorphism . 32 3.6 Partial Functions . 33 3.7 Functions and Relations . 34 Summary . 34 Problems . 35 4 The Size of Sets 37 4.1 Introduction . 37 4.2 Countable Sets . 37 4.3 Uncountable Sets . 43 4.4 Reduction . 47 4.5 Equinumerous Sets . 48 4.6 Comparing Sizes of Sets . 50 Summary . 52 Problems . 53 II First-order Logic 57 5 Syntax and Semantics 58 5.1 Introduction . 58 5.2 First-Order Languages . 60 5.3 Terms and Formulas . 62 5.4 Unique Readability . 65 5.5 Main operator of a Formula . 69 5.6 Subformulas . 70 5.7 Free Variables and Sentences . 72 5.8 Substitution . 73 5.9 Structures for First-order Languages . 75 5.10 Covered Structures for First-order Languages . 77 5.11 Satisfaction of a Formula in a Structure . 79 CONTENTS vii 5.12 Variable Assignments . 84 5.13 Extensionality . 88 5.14 Semantic Notions . 90 Summary . 93 Problems . 94 6 Theories and Their Models 97 6.1 Introduction . 97 6.2 Expressing Properties of Structures . 100 6.3 Examples of First-Order Theories . 101 6.4 Expressing Relations in a Structure . 104 6.5 The Theory of Sets . 106 6.6 Expressing the Size of Structures . 109 Summary . 111 Problems . 111 7 Natural Deduction 113 7.1 Introduction . 113 7.2 Rules and Derivations . 115 7.3 Examples of Derivations . 118 7.4 Proof-Theoretic Notions . 127 7.5 Properties of Derivability . 130 7.6 Soundness . 135 7.7 Derivations with Identity predicate . 140 7.8 Soundness with Identity predicate . 142 Summary . 143 Problems . 143 8 The Completeness Theorem 145 8.1 Introduction . 145 8.2 Outline of the Proof . 146 8.3 Complete Consistent Sets of Sentences . 149 8.4 Henkin Expansion . 151 8.5 Lindenbaum’s Lemma . 153 8.6 Construction of a Model . 154 8.7 Identity . 157 viii CONTENTS 8.8 The Completeness Theorem . 160 8.9 The Compactness Theorem . 161 8.10 A Direct Proof of the Compactness Theorem . 164 8.11 The Löwenheim-Skolem Theorem . 166 Summary . 167 Problems . 168 9 Beyond First-order Logic 170 9.1 Overview . 170 9.2 Many-Sorted Logic . 171 9.3 Second-Order logic . 173 9.4 Higher-Order logic . 178 9.5 Intuitionistic Logic . 181 9.6 Modal Logics . 187 9.7 Other Logics . 189 III Turing Machines 193 10 Turing Machine Computations 194 10.1 Introduction . 194 10.2 Representing Turing Machines . 197 10.3 Turing Machines . 202 10.4 Configurations and Computations . 203 10.5 Unary Representation of Numbers . 205 10.6 Halting States . 206 10.7 Combining Turing Machines . 207 10.8 Variants of Turing Machines . 209 10.9 The Church-Turing Thesis . 211 Summary . 212 Problems . 213 11 Undecidability 215 11.1 Introduction . 215 11.2 Enumerating Turing Machines . 217 11.3 The Halting Problem . 219 CONTENTS ix 11.4 The Decision Problem . 221 11.5 Representing Turing Machines . 222 11.6 Verifying the Representation . 226 11.7 The Decision Problem is Unsolvable . 233 Summary . 233 Problems . 234 A Proofs 237 A.1 Introduction . 237 A.2 Starting a Proof . 239 A.3 Using Definitions . 239 A.4 Inference Patterns . 241 A.5 An Example . 248 A.6 Another Example . 253 A.7 Indirect Proof . 255 A.8 Reading Proofs . 259 A.9 I can’t do it! . 261 A.10 Other Resources . 263 Problems . 263 B Induction 265 B.1 Introduction . 265 B.2 Induction on N . 266 B.3 Strong Induction . 269 B.4 Inductive Definitions . 270 B.5 Structural Induction . 273 C Biographies 275 C.1 Georg Cantor . 275 C.2 Alonzo Church . 276 C.3 Gerhard Gentzen . 277 C.4 Kurt Gödel . 279 C.5 Emmy Noether . 281 C.6 Bertrand Russell . 282 C.7 Alfred Tarski . 284 C.8 Alan Turing . 285 x CONTENTS C.9 Ernst Zermelo . 287 Glossary 291 Photo Credits 297 Bibliography 299 About the Open Logic Project 304 Preface This book is an introduction to meta-logic, aimed especially at students of computer science and philosophy. “Meta-logic” is so- called because it is the discipline that studies logic itself. Logic proper is concerned with canons of valid inference, and its sym- bolic or formal version presents these canons using formal lan- guages, such as those of propositional and predicate, a.k.a., first- order logic. Meta-logic investigates the properties of these lan- guage, and of the canons of correct inference that use them. It studies topics such as how to give precise meaning to the ex- pressions of these formal languages, how to justify the canons of valid inference, what the properties of various proof systems are, including their computational properties. These questions are important and interesting in their own right, because the lan- guages and proof systems investigated are applied in many dier- ent areas—in mathematics, philosophy, computer science, and linguistics, especially—but they also serve as examples of how to study formal systems in general. The logical languages we study here are not the only ones people are interested in. For instance, linguists and philosophers are interested in languages that are much more complicated than those of propositional and first-order logic, and computer scientists are interested in other kinds of languages altogether, such as programming languages. And the methods we discuss here—how to give semantics for for- mal languages, how to prove results about formal languages, how xiii xiv PREFACE to investigate the properties of formal languages—are applicable in those cases as well. Like any discipline, meta-logic both has a set of results or facts, and a store of methods and techniques, and this text cov- ers both. Some students won’t need to know some of the results we discuss outside of this course, but they will need and use the methods we use to establish them. The Löwenheim-Skolem the- orem, say, does not often make an appearance in computer sci- ence, but the methods we use to prove it do. On the other hand, many of the results we discuss do have relevance for certain de- bates, say, in the philosophy of science and in metaphysics. Phi- losophy students may not need to be able to prove these results outside this course, but they do need to understand what the results are—and you really only understand these results if you have thought through the definitions and proofs needed to es- tablish them. These.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages325 Page
-
File Size-