Mathematical Logic. Introduction. by Vilnis Detlovs and Karlis Podnieks
Total Page:16
File Type:pdf, Size:1020Kb
See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/349104699 Introduction to Mathematical Logic, Edition 2021 Book · February 2021 CITATIONS READ 0 1 2 authors, including: Karlis Podnieks University of Latvia 75 PUBLICATIONS 273 CITATIONS SEE PROFILE Some of the authors of this publication are also working on these related projects: Truth Demystified View project Philosophy of Modeling in 1870s: a Tribute to Hans Vaihinger View project All content following this page was uploaded by Karlis Podnieks on 07 February 2021. The user has requested enhancement of the downloaded file. 1 Version released: February 7, 2021 This edition is dedicated to the memory of Professor Elliott Mendelson, 1931-2020 Introduction to Mathematical Logic Textbook for students Edition 2021 by Vilnis Detlovs, Dr. math., and Karlis Podnieks, Dr. math. University of Latvia This work is licensed under a Creative Commons License and is copyrighted © 2000-2021 by us, Vilnis Detlovs and Karlis Podnieks. Sections 1, 2, 3 of this book represent an extended translation of the corresponding chapters of the book: V. Detlovs, Elements of Mathematical Logic, Riga, University of Latvia, 1964, 252 pp. (in Latvian). With kind permission of Dr. Detlovs. Vilnis Detlovs, 1923-2007. Memorial Page This textbook contains links to: Wikipedia, the free encyclopedia; MacTutor History of Mathematics archive of the University of St Andrews; MathWorld of Wolfram Research. 2 Table of Contents References..........................................................................................................3 1. Introduction. What Is Logic, Really?.............................................................4 1.1. Total Formalization is Possible!..............................................................4 1.2. Predicate Languages.............................................................................11 1.3. Axioms of Logic: Minimal System, Constructive System and Classical System..........................................................................................................27 1.4. The Flavor of Proving Directly.............................................................40 1.5. Deduction Theorems.............................................................................44 2. Propositional Logic......................................................................................52 2.1. Proving Formulas Containing Implication only...................................52 2.2. Proving Formulas Containing Conjunction..........................................53 2.3. Proving Formulas Containing Disjunction...........................................56 2.4. Formulas Containing Negation – Minimal Logic.................................58 2.5. Formulas Containing Negation – Constructive Logic..........................63 2.6. Formulas Containing Negation – Classical Logic................................65 2.7. Constructive Embedding: Glivenko's Theorem....................................69 2.8. Axiom Independence. Using Computers in Mathematical Proofs........71 3. Predicate Logic.............................................................................................87 3.1. Proving Formulas Containing Quantifiers and Implication only..........87 3.2. Formulas Containing Negations and a Single Quantifier.....................91 3.3. Proving Formulas Containing Conjunction and Disjunction..............100 3.4. Replacement Theorems.......................................................................101 3.5. Constructive Embedding.....................................................................107 4. Completeness Theorems (Model Theory)..................................................116 4.1. Interpretations and models..................................................................116 4.2. Completeness of Classical Propositional Logic..................................132 4.3. Classical Predicate Logic − Gödel's Completeness Theorem.............143 4.4. Constructive Propositional Logic – Kripke Semantics.......................164 5. Normal Forms.............................................................................................184 5.1. Negation Normal Form.......................................................................184 5.2. Conjunctive and Disjunctive Normal Forms......................................186 5.3. Prenex Normal Form..........................................................................190 5.4. Skolem Normal Form.........................................................................198 5.5. Clause Form........................................................................................202 6. Tableaux Method........................................................................................209 6.1. Tableaux Method for Propositional Formulas....................................210 6.2. Tableaux Method for Pure Predicate Formulas..................................217 7. Resolution Method.....................................................................................227 7.1. Resolution Method for Propositional Formulas..................................230 7.2. Resolution Method for Predicate Formulas........................................235 3 8. Miscellaneous.............................................................................................247 8.1. Negation as Contradiction or Absurdity.............................................247 8.2. Herbrand's Theorem............................................................................254 References Detlovs V. [1964] Elements of Mathematical Logic, University of Latvia, 1964, 252 pp. (in Latvian). Hilbert D., Bernays P. [1934] Grundlagen der Mathematik. Vol. I, Berlin, 1934, 471 pp. (Russian translation available) Kleene S.C. [1952] Introduction to Metamathematics. Van Nostrand, 1952 (Russian translation available) Kleene S.C. [1967] Mathematical Logic. John Wiley & Sons, 1967 (Russian translation available) Mendelson E. [1997] Introduction to Mathematical Logic. Fourth Edition. International Thomson Publishing, 1997, 440 pp. (Russian translation available) Podnieks K. [1997] What is Mathematics: Gödel's Theorem and Around. 1997-2015 (see ResearchGate for English and Russian online versions). 4 1. Introduction. What Is Logic, Really? Attention! In this book, predicate language is used as a synonym of first order language, formal theory – as a synonym of formal system, deductive system, predicate logic – as a synonym of first order logic without equality. constructive logic – as a synonym of intuitionistic logic, algorithmically solvable – as a synonym of recursively solvable, algorithmically enumerable – as a synonym of recursively enumerable. 1.1. Total Formalization is Possible! What is logic? Of course, logic is “about reasoning”. Parts of our knowledge may be inter-dependent, so, one part may be derived from some other ones. A trivial example: All fathers are male persons. No person can be male and female simultaneously. Miranda is a female person. Hence, Miranda is not a father. Of course, we knew the latter “fact” in advance. But imagine, we are trying to teach this kind of reasoning to a computer. A computer may know in advance only that part of our knowledge that is stored in its knowledge base. But, it is impossible to store all of our knowledge. Thus, we must avoid storing of the knowledge that is easily derivable from the one already stored. For example, if the first three of the above propositions have been already stored, then we need not to store the fourth one – it can be derived by reasoning: Assume, Miranda is a father. Then Miranda is a male person. But Miranda is a female person. Hence, Miranda is male and female simultaneously. This is impossible. Hence, Miranda is not a father. Therefore, we must implement on our computer not only the knowledge base, but also the necessary means of reasoning (an advanced kind of query processing). Hence, today, we have a very fundamental reason to formulate our knowledge 5 and means of reasoning explicitly: only in this way we can transmit the knowledge and the ability of reasoning to computers. Of course, explicit reasoning started long before computers – probably, in the 6th century BC when Greeks proved the first mathematical theorems. Let us consider one of them: Theorem. There are more prime numbers than any prescribed amount. (In modern terms: there are infinitely many prime numbers.) Proof (modern notation is used). Assume the contrary, that p1 ,..., pk is the complete list of all primes, and consider the number N= p1⋅...⋅pk +1 . We know that such N is divisible by none of p1 ,..., pk . But we know also that any (natural) number is divisible by a prime. So, N must be divisible by a prime that does not belong to the alleged “complete” list. Q.E.D. Here, the statement of Theorem is derived from other statements that “we know”. How do we know them? Either we or other people have proved these statements earlier – by deriving them from some other statements, or, they were forced to adopt them without proof, for example, as “obvious” ones. Indeed, asking for proofs over and again indefinitely long time is hopeless. At some moment, such a process must be stopped – by a decision to adopt some of the statements without proof, as “axioms”. Additional stimulus to explicit reasoning was a contradiction found in geometrical reasoning. The early Pythagoreans arrived at an implicit belief that any two line segments must possess a common measure. Namely (in modern