Logic and Proof Release 3.18.4

Total Page:16

File Type:pdf, Size:1020Kb

Logic and Proof Release 3.18.4 Logic and Proof Release 3.18.4 Jeremy Avigad, Robert Y. Lewis, and Floris van Doorn Sep 10, 2021 CONTENTS 1 Introduction 1 1.1 Mathematical Proof ............................................ 1 1.2 Symbolic Logic .............................................. 2 1.3 Interactive Theorem Proving ....................................... 4 1.4 The Semantic Point of View ....................................... 5 1.5 Goals Summarized ............................................ 6 1.6 About this Textbook ........................................... 6 2 Propositional Logic 7 2.1 A Puzzle ................................................. 7 2.2 A Solution ................................................ 7 2.3 Rules of Inference ............................................ 8 2.4 The Language of Propositional Logic ................................... 15 2.5 Exercises ................................................. 16 3 Natural Deduction for Propositional Logic 17 3.1 Derivations in Natural Deduction ..................................... 17 3.2 Examples ................................................. 19 3.3 Forward and Backward Reasoning .................................... 20 3.4 Reasoning by Cases ............................................ 22 3.5 Some Logical Identities .......................................... 23 3.6 Exercises ................................................. 24 4 Propositional Logic in Lean 25 4.1 Expressions for Propositions and Proofs ................................. 25 4.2 More commands ............................................. 28 4.3 Building Natural Deduction Proofs .................................... 30 4.4 Forward Reasoning ............................................ 34 4.5 Definitions and Theorems ......................................... 36 4.6 Additional Syntax ............................................. 38 4.7 Exercises ................................................. 39 5 Classical Reasoning 41 5.1 Proof by Contradiction .......................................... 41 5.2 Some Classical Principles ......................................... 43 5.3 Exercises ................................................. 45 6 Semantics of Propositional Logic 47 6.1 Truth Values and Assignments ...................................... 47 6.2 Truth Tables ............................................... 50 6.3 Soundness and Completeness ....................................... 51 i 6.4 Exercises ................................................. 52 7 First Order Logic 55 7.1 Functions, Predicates, and Relations ................................... 55 7.2 The Universal Quantifier ......................................... 57 7.3 The Existential Quantifier ........................................ 59 7.4 Relativization and Sorts .......................................... 60 7.5 Equality .................................................. 61 7.6 Exercises ................................................. 62 8 Natural Deduction for First Order Logic 65 8.1 Rules of Inference ............................................ 65 8.2 The Universal Quantifier ......................................... 65 8.3 The Existential Quantifier ........................................ 67 8.4 Equality .................................................. 68 8.5 Counterexamples and Relativized Quantifiers .............................. 69 8.6 Exercises ................................................. 71 9 First Order Logic in Lean 73 9.1 Functions, Predicates, and Relations ................................... 73 9.2 Using the Universal Quantifier ...................................... 76 9.3 Using the Existential Quantifier ...................................... 78 9.4 Equality and calculational proofs ..................................... 81 9.5 Exercises ................................................. 85 10 Semantics of First Order Logic 89 10.1 Interpretations .............................................. 89 10.2 Truth in a Model ............................................. 90 10.3 Examples ................................................. 91 10.4 Validity and Logical Consequence .................................... 93 10.5 Soundness and Completeness ....................................... 93 10.6 Exercises ................................................. 94 11 Sets 97 11.1 Elementary Set Theory .......................................... 97 11.2 Calculations with Sets ........................................... 100 11.3 Indexed Families of Sets ......................................... 104 11.4 Cartesian Product and Power Set ..................................... 105 11.5 Exercises ................................................. 106 12 Sets in Lean 109 12.1 Basics ................................................... 109 12.2 Some Identities .............................................. 113 12.3 Indexed Families ............................................. 114 12.4 Power Sets ................................................ 118 12.5 Exercises ................................................. 118 13 Relations 121 13.1 Order Relations .............................................. 121 13.2 More on Orderings ............................................ 123 13.3 Equivalence Relations and Equality .................................... 124 13.4 Exercises ................................................. 125 14 Relations in Lean 127 14.1 Order Relations .............................................. 127 ii 14.2 Orderings on Numbers .......................................... 130 14.3 Equivalence Relations ........................................... 131 14.4 Exercises ................................................. 133 15 Functions 135 15.1 The Function Concept .......................................... 135 15.2 Injective, Surjective, and Bijective Functions ............................... 137 15.3 Functions and Subsets of the Domain .................................. 139 15.4 Functions and Relations .......................................... 140 15.5 Exercises ................................................. 141 16 Functions in Lean 143 16.1 Functions and Symbolic Logic ...................................... 143 16.2 Second- and Higher-Order Logic ..................................... 144 16.3 Functions in Lean ............................................. 145 16.4 Defining the Inverse Classically ...................................... 148 16.5 Functions and Sets in Lean ........................................ 149 16.6 Exercises ................................................. 151 17 The Natural Numbers and Induction 155 17.1 The Principle of Induction ........................................ 155 17.2 Variants of Induction ........................................... 157 17.3 Recursive Definitions ........................................... 160 17.4 Defining Arithmetic Operations ..................................... 162 17.5 Arithmetic on the Natural Numbers ................................... 164 17.6 The Integers ............................................... 166 17.7 Exercises ................................................. 167 18 The Natural Numbers and Induction in Lean 169 18.1 Induction and Recursion in Lean ..................................... 169 18.2 Defining the Arithmetic Operations in Lean ............................... 172 18.3 Exercises ................................................. 173 19 Elementary Number Theory 175 19.1 The Quotient-Remainder Theorem .................................... 175 19.2 Divisibility ................................................ 176 19.3 Prime Numbers .............................................. 179 19.4 Modular Arithmetic ........................................... 180 19.5 Properties of Squares ........................................... 182 19.6 Exercises ................................................. 183 20 Combinatorics 185 20.1 Finite Sets and Cardinality ........................................ 185 20.2 Counting Principles ............................................ 186 20.3 Ordered Selections ............................................ 188 20.4 Combinations and Binomial Coefficients ................................. 189 20.5 The Inclusion-Exclusion Principle .................................... 191 20.6 Exercises ................................................. 192 21 The Real Numbers 195 21.1 The Number Systems ........................................... 195 21.2 Quotient Constructions .......................................... 196 21.3 Constructing the Real Numbers ..................................... 198 21.4 The Completeness of the Real Numbers ................................. 199 21.5 An Alternative Construction ....................................... 200 iii 21.6 Exercises ................................................. 201 22 The Infinite 203 22.1 Equinumerosity .............................................. 203 22.2 Countably Infinite Sets .......................................... 204 22.3 Cantor’s Theorem ............................................. 207 22.4 An Alternative Definition of Finiteness .................................. 208 22.5 The Cantor-Bernstein Theorem ...................................... 209 22.6 Exercises ................................................. 209 23 Axiomatic Foundations 211 23.1 Basic Axioms for Sets .......................................... 211 23.2 The Axiom of Infinity .......................................... 213 23.3 The Remaining Axioms ......................................... 215 23.4 Type Theory ..............................................
Recommended publications
  • Ling 130 Notes: a Guide to Natural Deduction Proofs
    Ling 130 Notes: A guide to Natural Deduction proofs Sophia A. Malamud February 7, 2018 1 Strategy summary Given a set of premises, ∆, and the goal you are trying to prove, Γ, there are some simple rules of thumb that will be helpful in finding ND proofs for problems. These are not complete, but will get you through our problem sets. Here goes: Given Delta, prove Γ: 1. Apply the premises, pi in ∆, to prove Γ. Do any other obvious steps. 2. If you need to use a premise (or an assumption, or another resource formula) which is a disjunction (_-premise), then apply Proof By Cases (Disjunction Elimination, _E) rule and prove Γ for each disjunct. 3. Otherwise, work backwards from the type of goal you are proving: (a) If the goal Γ is a conditional (A ! B), then assume A and prove B; use arrow-introduction (Conditional Introduction, ! I) rule. (b) If the goal Γ is a a negative (:A), then assume ::A (or just assume A) and prove con- tradiction; use Reductio Ad Absurdum (RAA, proof by contradiction, Negation Intro- duction, :I) rule. (c) If the goal Γ is a conjunction (A ^ B), then prove A and prove B; use Conjunction Introduction (^I) rule. (d) If the goal Γ is a disjunction (A _ B), then prove one of A or B; use Disjunction Intro- duction (_I) rule. 4. If all else fails, use RAA (proof by contradiction). 2 Using rules for conditionals • Conditional Elimination (modus ponens) (! E) φ ! , φ ` This rule requires a conditional and its antecedent.
    [Show full text]
  • Tt-Satisfiable
    CMPSCI 601: Recall From Last Time Lecture 6 Boolean Syntax: ¡ ¢¤£¦¥¨§¨£ © §¨£ § Boolean variables: A boolean variable represents an atomic statement that may be either true or false. There may be infinitely many of these available. Boolean expressions: £ atomic: , (“top”), (“bottom”) § ! " # $ , , , , , for Boolean expressions Note that any particular expression is a finite string, and thus may use only finitely many variables. £ £ A literal is an atomic expression or its negation: , , , . As you may know, the choice of operators is somewhat arbitary as long as we have a complete set, one that suf- fices to simulate all boolean functions. On HW#1 we ¢ § § ! argued that is already a complete set. 1 CMPSCI 601: Boolean Logic: Semantics Lecture 6 A boolean expression has a meaning, a truth value of true or false, once we know the truth values of all the individual variables. ¢ £ # ¡ A truth assignment is a function ¢ true § false , where is the set of all variables. An as- signment is appropriate to an expression ¤ if it assigns a value to all variables used in ¤ . ¡ The double-turnstile symbol ¥ (read as “models”) de- notes the relationship between a truth assignment and an ¡ ¥ ¤ expression. The statement “ ” (read as “ models ¤ ¤ ”) simply says “ is true under ”. 2 ¡ ¤ ¥ ¤ If is appropriate to , we define when is true by induction on the structure of ¤ : is true and is false for any , £ A variable is true iff says that it is, ¡ ¡ ¡ ¡ " ! ¥ ¤ ¥ ¥ If ¤ , iff both and , ¡ ¡ ¡ ¡ " ¥ ¤ ¥ ¥ If ¤ , iff either or or both, ¡ ¡ ¡ ¡ " # ¥ ¤ ¥ ¥ If ¤ , unless and , ¡ ¡ ¡ ¡ $ ¥ ¤ ¥ ¥ If ¤ , iff and are both true or both false. 3 Definition 6.1 A boolean expression ¤ is satisfiable iff ¡ ¥ ¤ there exists .
    [Show full text]
  • Classifying Material Implications Over Minimal Logic
    Classifying Material Implications over Minimal Logic Hannes Diener and Maarten McKubre-Jordens March 28, 2018 Abstract The so-called paradoxes of material implication have motivated the development of many non- classical logics over the years [2–5, 11]. In this note, we investigate some of these paradoxes and classify them, over minimal logic. We provide proofs of equivalence and semantic models separating the paradoxes where appropriate. A number of equivalent groups arise, all of which collapse with unrestricted use of double negation elimination. Interestingly, the principle ex falso quodlibet, and several weaker principles, turn out to be distinguishable, giving perhaps supporting motivation for adopting minimal logic as the ambient logic for reasoning in the possible presence of inconsistency. Keywords: reverse mathematics; minimal logic; ex falso quodlibet; implication; paraconsistent logic; Peirce’s principle. 1 Introduction The project of constructive reverse mathematics [6] has given rise to a wide literature where various the- orems of mathematics and principles of logic have been classified over intuitionistic logic. What is less well-known is that the subtle difference that arises when the principle of explosion, ex falso quodlibet, is dropped from intuitionistic logic (thus giving (Johansson’s) minimal logic) enables the distinction of many more principles. The focus of the present paper are a range of principles known collectively (but not exhaustively) as the paradoxes of material implication; paradoxes because they illustrate that the usual interpretation of formal statements of the form “. → . .” as informal statements of the form “if. then. ” produces counter-intuitive results. Some of these principles were hinted at in [9]. Here we present a carefully worked-out chart, classifying a number of such principles over minimal logic.
    [Show full text]
  • Arguments Vs. Explanations
    Arguments vs. Explanations Arguments and explanations share a lot of common features. In fact, it can be hard to tell the difference between them if you look just at the structure. Sometimes, the exact same structure can function as an argument or as an explanation depending on the context. At the same time, arguments are very different in terms of what they try to accomplish. Explaining and arguing are very different activities even though they use the same types of structures. In a similar vein, building something and taking it apart are two very different activities, but we typically use the same tools for both. Arguments and explanations both have a single sentence as their primary focus. In an argument, we call that sentence the “conclusion”, it’s what’s being argued for. In an explanation, that sentence is called the “explanandum”, it’s what’s being explained. All of the other sentences in an argument or explanation are focused on the conclusion or explanandum. In an argument, these other sentences are called “premises” and they provide basic reasons for thinking that the conclusion is true. In an explanation, these other sentences are called the “explanans” and provide information about how or why the explanandum is true. So in both cases we have a bunch of sentences all focused on one single sentence. That’s why it’s easy to confuse arguments and explanations, they have a similar structure. Premises/Explanans Conclusion/Explanandum What is an argument? An argument is an attempt to provide support for a claim. One useful way of thinking about this is that an argument is, at least potentially, something that could be used to persuade someone about the truth of the argument’s conclusion.
    [Show full text]
  • Relative Interpretations and Substitutional Definitions of Logical
    Relative Interpretations and Substitutional Definitions of Logical Truth and Consequence MIRKO ENGLER Abstract: This paper proposes substitutional definitions of logical truth and consequence in terms of relative interpretations that are extensionally equivalent to the model-theoretic definitions for any relational first-order language. Our philosophical motivation to consider substitutional definitions is based on the hope to simplify the meta-theory of logical consequence. We discuss to what extent our definitions can contribute to that. Keywords: substitutional definitions of logical consequence, Quine, meta- theory of logical consequence 1 Introduction This paper investigates the applicability of relative interpretations in a substi- tutional account of logical truth and consequence. We introduce definitions of logical truth and consequence in terms of relative interpretations and demonstrate that they are extensionally equivalent to the model-theoretic definitions as developed in (Tarski & Vaught, 1956) for any first-order lan- guage (including equality). The benefit of such a definition is that it could be given in a meta-theoretic framework that only requires arithmetic as ax- iomatized by PA. Furthermore, we investigate how intensional constraints on logical truth and consequence force us to extend our framework to an arithmetical meta-theory that itself interprets set-theory. We will argue that such an arithmetical framework still might be in favor over a set-theoretical one. The basic idea behind our definition is both to generate and evaluate substitution instances of a sentence ' by relative interpretations. A relative interpretation rests on a function f that translates all formulae ' of a language L into formulae f(') of a language L0 by mapping the primitive predicates 0 P of ' to formulae P of L while preserving the logical structure of ' 1 Mirko Engler and relativizing its quantifiers by an L0-definable formula.
    [Show full text]
  • Section 2.1: Proof Techniques
    Section 2.1: Proof Techniques January 25, 2021 Abstract Sometimes we see patterns in nature and wonder if they hold in general: in such situations we are demonstrating the appli- cation of inductive reasoning to propose a conjecture, which may become a theorem which we attempt to prove via deduc- tive reasoning. From our work in Chapter 1, we conceive of a theorem as an argument of the form P → Q, whose validity we seek to demonstrate. Example: A student was doing a proof and suddenly specu- lated “Couldn’t we just say (A → (B → C)) ∧ B → (A → C)?” Can she? It’s a theorem – either we prove it, or we provide a counterexample. This section outlines a variety of proof techniques, including direct proofs, proofs by contraposition, proofs by contradiction, proofs by exhaustion, and proofs by dumb luck or genius! You have already seen each of these in Chapter 1 (with the exception of “dumb luck or genius”, perhaps). 1 Theorems and Informal Proofs The theorem-forming process is one in which we • make observations about nature, about a system under study, etc.; • discover patterns which appear to hold in general; • state the rule; and then • attempt to prove it (or disprove it). This process is formalized in the following definitions: • inductive reasoning - drawing a conclusion based on experi- ence, which one might state as a conjecture or theorem; but al- mostalwaysas If(hypotheses)then(conclusion). • deductive reasoning - application of a logic system to investi- gate a proposed conclusion based on hypotheses (hence proving, disproving, or, failing either, holding in limbo the conclusion).
    [Show full text]
  • Two Sources of Explosion
    Two sources of explosion Eric Kao Computer Science Department Stanford University Stanford, CA 94305 United States of America Abstract. In pursuit of enhancing the deductive power of Direct Logic while avoiding explosiveness, Hewitt has proposed including the law of excluded middle and proof by self-refutation. In this paper, I show that the inclusion of either one of these inference patterns causes paracon- sistent logics such as Hewitt's Direct Logic and Besnard and Hunter's quasi-classical logic to become explosive. 1 Introduction A central goal of a paraconsistent logic is to avoid explosiveness { the inference of any arbitrary sentence β from an inconsistent premise set fp; :pg (ex falso quodlibet). Hewitt [2] Direct Logic and Besnard and Hunter's quasi-classical logic (QC) [1, 5, 4] both seek to preserve the deductive power of classical logic \as much as pos- sible" while still avoiding explosiveness. Their work fits into the ongoing research program of identifying some \reasonable" and \maximal" subsets of classically valid rules and axioms that do not lead to explosiveness. To this end, it is natural to consider which classically sound deductive rules and axioms one can introduce into a paraconsistent logic without causing explo- siveness. Hewitt [3] proposed including the law of excluded middle and the proof by self-refutation rule (a very special case of proof by contradiction) but did not show whether the resulting logic would be explosive. In this paper, I show that for quasi-classical logic and its variant, the addition of either the law of excluded middle or the proof by self-refutation rule in fact leads to explosiveness.
    [Show full text]
  • Notes on Pragmatism and Scientific Realism Author(S): Cleo H
    Notes on Pragmatism and Scientific Realism Author(s): Cleo H. Cherryholmes Source: Educational Researcher, Vol. 21, No. 6, (Aug. - Sep., 1992), pp. 13-17 Published by: American Educational Research Association Stable URL: http://www.jstor.org/stable/1176502 Accessed: 02/05/2008 14:02 Your use of the JSTOR archive indicates your acceptance of JSTOR's Terms and Conditions of Use, available at http://www.jstor.org/page/info/about/policies/terms.jsp. JSTOR's Terms and Conditions of Use provides, in part, that unless you have obtained prior permission, you may not download an entire issue of a journal or multiple copies of articles, and you may use content in the JSTOR archive only for your personal, non-commercial use. Please contact the publisher regarding any further use of this work. Publisher contact information may be obtained at http://www.jstor.org/action/showPublisher?publisherCode=aera. Each copy of any part of a JSTOR transmission must contain the same copyright notice that appears on the screen or printed page of such transmission. JSTOR is a not-for-profit organization founded in 1995 to build trusted digital archives for scholarship. We enable the scholarly community to preserve their work and the materials they rely upon, and to build a common research platform that promotes the discovery and use of these resources. For more information about JSTOR, please contact [email protected]. http://www.jstor.org Notes on Pragmatismand Scientific Realism CLEOH. CHERRYHOLMES Ernest R. House's article "Realism in plicit declarationof pragmatism. Here is his 1905 statement ProfessorResearch" (1991) is informative for the overview it of it: of scientificrealism.
    [Show full text]
  • Fallacies Are Deceptive Errors of Thinking
    Fallacies are deceptive errors of thinking. A good argument should: 1. be deductively valid (or inductively strong) and have all true premises; 2. have its validity and truth-of-premises be as evident as possible to the parties involved; 3. be clearly stated (using understandable language and making clear what the premises and conclusion are); 4. avoid circularity, ambiguity, and emotional language; and 5. be relevant to the issue at hand. LogiCola R Pages 51–60 List of fallacies Circular (question begging): Assuming the truth of what has to be proved – or using A to prove B and then B to prove A. Ambiguous: Changing the meaning of a term or phrase within the argument. Appeal to emotion: Stirring up emotions instead of arguing in a logical manner. Beside the point: Arguing for a conclusion irrelevant to the issue at hand. Straw man: Misrepresenting an opponent’s views. LogiCola R Pages 51–60 Appeal to the crowd: Arguing that a view must be true because most people believe it. Opposition: Arguing that a view must be false because our opponents believe it. Genetic fallacy: Arguing that your view must be false because we can explain why you hold it. Appeal to ignorance: Arguing that a view must be false because no one has proved it. Post hoc ergo propter hoc: Arguing that, since A happened after B, thus A was caused by B. Part-whole: Arguing that what applies to the parts must apply to the whole – or vice versa. LogiCola R Pages 51–60 Appeal to authority: Appealing in an improper way to expert opinion.
    [Show full text]
  • Chapter 9: Initial Theorems About Axiom System
    Initial Theorems about Axiom 9 System AS1 1. Theorems in Axiom Systems versus Theorems about Axiom Systems ..................................2 2. Proofs about Axiom Systems ................................................................................................3 3. Initial Examples of Proofs in the Metalanguage about AS1 ..................................................4 4. The Deduction Theorem.......................................................................................................7 5. Using Mathematical Induction to do Proofs about Derivations .............................................8 6. Setting up the Proof of the Deduction Theorem.....................................................................9 7. Informal Proof of the Deduction Theorem..........................................................................10 8. The Lemmas Supporting the Deduction Theorem................................................................11 9. Rules R1 and R2 are Required for any DT-MP-Logic........................................................12 10. The Converse of the Deduction Theorem and Modus Ponens .............................................14 11. Some General Theorems About ......................................................................................15 12. Further Theorems About AS1.............................................................................................16 13. Appendix: Summary of Theorems about AS1.....................................................................18 2 Hardegree,
    [Show full text]
  • The Substitutional Analysis of Logical Consequence
    THE SUBSTITUTIONAL ANALYSIS OF LOGICAL CONSEQUENCE Volker Halbach∗ dra version ⋅ please don’t quote ónd June óþÕä Consequentia ‘formalis’ vocatur quae in omnibus terminis valet retenta forma consimili. Vel si vis expresse loqui de vi sermonis, consequentia formalis est cui omnis propositio similis in forma quae formaretur esset bona consequentia [...] Iohannes Buridanus, Tractatus de Consequentiis (Hubien ÕÉßä, .ì, p.óóf) Zf«±§Zh± A substitutional account of logical truth and consequence is developed and defended. Roughly, a substitution instance of a sentence is dened to be the result of uniformly substituting nonlogical expressions in the sentence with expressions of the same grammatical category. In particular atomic formulae can be replaced with any formulae containing. e denition of logical truth is then as follows: A sentence is logically true i all its substitution instances are always satised. Logical consequence is dened analogously. e substitutional denition of validity is put forward as a conceptual analysis of logical validity at least for suciently rich rst-order settings. In Kreisel’s squeezing argument the formal notion of substitutional validity naturally slots in to the place of informal intuitive validity. ∗I am grateful to Beau Mount, Albert Visser, and Timothy Williamson for discussions about the themes of this paper. Õ §Z êZo±í At the origin of logic is the observation that arguments sharing certain forms never have true premisses and a false conclusion. Similarly, all sentences of certain forms are always true. Arguments and sentences of this kind are for- mally valid. From the outset logicians have been concerned with the study and systematization of these arguments, sentences and their forms.
    [Show full text]
  • Starting the Dismantling of Classical Mathematics
    Australasian Journal of Logic Starting the Dismantling of Classical Mathematics Ross T. Brady La Trobe University Melbourne, Australia [email protected] Dedicated to Richard Routley/Sylvan, on the occasion of the 20th anniversary of his untimely death. 1 Introduction Richard Sylvan (n´eRoutley) has been the greatest influence on my career in logic. We met at the University of New England in 1966, when I was a Master's student and he was one of my lecturers in the M.A. course in Formal Logic. He was an inspirational leader, who thought his own thoughts and was not afraid to speak his mind. I hold him in the highest regard. He was very critical of the standard Anglo-American way of doing logic, the so-called classical logic, which can be seen in everything he wrote. One of his many critical comments was: “G¨odel's(First) Theorem would not be provable using a decent logic". This contribution, written to honour him and his works, will examine this point among some others. Hilbert referred to non-constructive set theory based on classical logic as \Cantor's paradise". In this historical setting, the constructive logic and mathematics concerned was that of intuitionism. (The Preface of Mendelson [2010] refers to this.) We wish to start the process of dismantling this classi- cal paradise, and more generally classical mathematics. Our starting point will be the various diagonal-style arguments, where we examine whether the Law of Excluded Middle (LEM) is implicitly used in carrying them out. This will include the proof of G¨odel'sFirst Theorem, and also the proof of the undecidability of Turing's Halting Problem.
    [Show full text]