Mathematical Logic for Mathematicians
Total Page:16
File Type:pdf, Size:1020Kb
Mathematical Logic for Mathematicians Joseph R. Mileti May 5, 2016 2 Contents 1 Introduction 5 1.1 The Nature of Mathematical Logic . 5 1.2 The Language of Mathematics . 6 1.3 Syntax and Semantics . 10 1.4 The Point of It All . 11 1.5 Terminology, Notation, and Countable Sets . 12 2 Induction and Recursion 13 2.1 Induction and Recursion on N .................................... 13 2.2 Generation . 15 2.2.1 From Above . 17 2.2.2 From Below: Building by Levels . 18 2.2.3 From Below: Witnessing Sequences . 20 2.2.4 Equivalence of the Definitions . 21 2.3 Step Induction . 22 2.4 Freeness and Step Recursion . 23 2.5 An Illustrative Example . 26 2.5.1 Proving Freeness . 27 2.5.2 The Result . 29 2.5.3 An Alternate Syntax - Polish Notation . 31 3 Propositional Logic 35 3.1 The Syntax of Propositional Logic . 35 3.1.1 Standard Syntax . 35 3.1.2 Polish Notation . 37 3.1.3 Official Syntax and Our Abuses of It . 39 3.1.4 Recursive Definitions . 39 3.2 Truth Assignments and Semantic Implication . 41 3.3 Boolean Functions and Connectives . 47 3.4 Syntactic Implication . 49 3.5 Soundness and Completeness . 55 3.6 Compactness and Applications . 61 4 First-Order Logic: Languages and Structures 67 4.1 Terms and Formulas . 67 4.2 Structures . 73 4.3 Substructures and Homomorphisms . 81 4.4 Definability . 87 3 4 CONTENTS 4.5 Elementary Substructures . 91 4.6 Substitution . 95 5 Theories and Models 99 5.1 Semantic Implication and Theories . 99 5.2 Counting Models of Theories . 103 5.3 Equivalent Formulas . 108 5.4 Quantifier Elimination . 109 5.5 Algebraically Closed Fields . 115 6 Soundness, Completeness, and Compactness 119 6.1 Syntactic Implication and Soundness . 119 6.2 Completeness . 126 6.3 Compactness and Applications . 136 6.4 Random Graphs . 142 6.5 Nonstandard Models of Arithmetic . 148 6.6 Nonstandard Models of Analysis . 154 7 Introduction to Axiomatic Set Theory 161 7.1 Why Set Theory? . 161 7.2 Motivating the Axioms . 162 7.3 Formal Axiomatic Set Theory . 166 7.4 Working from the Axioms . 167 7.5 ZFC as a Foundation for Mathematics . 169 8 Developing Basic Set Theory 171 8.1 First Steps . 171 8.2 The Natural Numbers and Induction . 176 8.3 Sets and Classes . 180 8.4 Finite Sets and Finite Powers . 182 8.5 Definitions by Recursion . 185 8.6 Infinite Sets and Infinite Powers . 188 9 Well-Orderings, Ordinals, and Cardinals 191 9.1 Well-Orderings . 191 9.2 Ordinals . 195 9.3 Arithmetic on Ordinals . 200 9.4 Cardinals . 203 9.5 Addition and Multiplication Of Cardinals . 204 10 The Axiom Of Choice 207 10.1 The Axiom of Choice in Mathematics . 207 10.2 Equivalents of the Axiom of Choice . 209 10.3 The Axiom of Choice and Cardinal Arithmetic . 210 11 Set-theoretic Methods in Analysis and Model Theory 213 11.1 Subsets of R ..............................................213 11.2 The Size of Models . 216 11.3 Ultraproducts and Compactness . 218 Chapter 1 Introduction 1.1 The Nature of Mathematical Logic Mathematical logic originated as an attempt to codify and formalize the following: 1. The language of mathematics. 2. The basic assumptions of mathematics. 3. The permissible rules of proof. One of the successful results of this program is the ability to study mathematical language and reasoning using mathematics itself. For example, we will eventually give a precise mathematical definition of a formal proof, and to avoid confusion with our current intuitive understanding of what a proof is, we will call these objects deductions. You should think of our eventual definition of a deduction as analogous to the precise mathematical definition of continuity, which replaces the fuzzy \a graph that can be drawn without lifting your pencil". Once we have codified the notion in this way, we will have turned deductions into precise mathematical objects, allowing us to prove mathematical theorems about deductions using normal mathematical reasoning. For example, we will open up the possibility of proving that there is no deduction of certain mathematical statements. Some newcomers to mathematical logic find the whole enterprise perplexing. For instance, if you come to the subject with the belief that the role of mathematical logic is to serve as a foundation to make mathematics more precise and secure, then the description above probably sounds rather circular, and this will almost certainly lead to a great deal of confusion. You may ask yourself: Okay, we've just given a decent definition of a deduction. However, instead of proving things about deductions following this formal definition, we're proving things about deductions using the usual informal proof style that I've grown accustomed to in other math courses. Why should I trust these informal proofs about deductions? How can we formally prove things (using deductions) about deductions? Isn't that circular? Is that why we are only giving informal proofs? I thought that I would come away from this subject feeling better about the philosophical foundations of mathematics, but we have just added a new layer to mathematics, so we now have both informal proofs and deductions, which makes the whole thing even more dubious. Other newcomers do not see a problem. After all, mathematics is the most reliable method we have to establish truth, and there was never any serious question as to its validity. Such a person might react to the above thoughts as follows: 5 6 CHAPTER 1. INTRODUCTION We gave a mathematical definition of a deduction, so what's wrong with using mathematics to prove things about deductions? There's obviously a \real world" of true mathematics, and we are just working in that world to build a certain model of mathematical reasoning that is susceptible to mathematical analysis. It's quite cool, really, that we can subject mathematical proofs to a mathematical study by building this internal model. All of this philosophical speculation and worry about secure foundations is tiresome, and probably meaningless. Let's get on with the subject! Should we be so dismissive of the first, philosophically inclined, student? The answer, of course, depends on your own philosophical views, but I will give my views as a mathematician specializing in logic with a definite interest in foundational questions. It is my firm belief that you should put all philosophical questions out of your mind during a first reading of the material (and perhaps forever, if you're so inclined), and come to the subject with a point of view that accepts an independent mathematical reality susceptible to the mathematical analysis you've grown accustomed to. In your mind, you should keep a careful distinction between normal \real" mathematical reasoning and the formal precise model of mathematical reasoning we are developing. Some people like to give this distinction a name by calling the normal mathematical realm we're working in the metatheory. We will eventually give examples of formal theories, such as first-order set theory, which are able to support the entire enterprise of mathematics, including mathematical logic itself. Once we have developed set theory in this way, we will be able to give reasonable answers to the first student, and provide other respectable philosophical accounts of the nature of mathematics. The ideas and techniques that were developed with philosophical goals in mind have now found application in other branches of mathematics and in computer science. The subject, like all mature areas of mathematics, has also developed its own very interesting internal questions which are often (for better or worse) divorced from its roots. Most of the subject developed after the 1930s is concerned with these internal and tangential questions, along with applications to other areas, and now foundational work is just one small (but still important) part of.