Propositional Logic (PDF)

Total Page:16

File Type:pdf, Size:1020Kb

Propositional Logic (PDF) Mathematics for Computer Science Proving Validity 6.042J/18.062J Instead of truth tables, The Logic of can try to prove valid formulas symbolically using Propositions axioms and deduction rules Albert R Meyer February 14, 2014 propositional logic.1 Albert R Meyer February 14, 2014 propositional logic.2 Proving Validity Algebra for Equivalence The text describes a for example, bunch of algebraic rules to the distributive law prove that propositional P AND (Q OR R) ≡ formulas are equivalent (P AND Q) OR (P AND R) Albert R Meyer February 14, 2014 propositional logic.3 Albert R Meyer February 14, 2014 propositional logic.4 1 Algebra for Equivalence Algebra for Equivalence for example, The set of rules for ≡ in DeMorgan’s law the text are complete: ≡ NOT(P AND Q) ≡ if two formulas are , these rules can prove it. NOT(P) OR NOT(Q) Albert R Meyer February 14, 2014 propositional logic.5 Albert R Meyer February 14, 2014 propositional logic.6 A Proof System A Proof System Another approach is to Lukasiewicz’ proof system is a start with some valid particularly elegant example of this idea. formulas (axioms) and deduce more valid formulas using proof rules Albert R Meyer February 14, 2014 propositional logic.7 Albert R Meyer February 14, 2014 propositional logic.8 2 A Proof System Lukasiewicz’ Proof System Lukasiewicz’ proof system is a Axioms: particularly elegant example of 1) (¬P → P) → P this idea. It covers formulas 2) P → (¬P → Q) whose only logical operators are 3) (P → Q) → ((Q → R) → (P → R)) IMPLIES (→) and NOT. The only rule: modus ponens Albert R Meyer February 14, 2014 propositional logic.9 Albert R Meyer February 14, 2014 propositional logic.10 Lukasiewicz’ Proof System Lukasiewicz’ Proof System Prove formulas by starting with Prove formulas by starting with axioms and repeatedly applying axioms and repeatedly applying the inference rule. the inference rule. To illustrate the proof system For example, to prove: we’ll do an example, which you P→ P may safely skip. Albert R Meyer February 14, 2014 propositional logic.12 Albert R Meyer February 14, 2014 propositional logic.13 3 A Lukasiewicz’ Proof A Lukasiewicz’ Proof 3rd axiom: 3rd axiom: (P → Q ) → (P → Q ) → (( Q → R) → (P → R)) (( Q → P) → (P → P)) replace R by P replace Q by ( P → P) Albert R Meyer February 14, 2014 propositional logic.14 Albert R Meyer February 14, 2014 propositional logic.15 A Lukasiewicz’ Proof A Lukasiewicz’ Proof 3rd axiom: so apply modus ponens: Axiom 2) Axiom 2) (P → (P → P) ) → (P → (P → P) ) → (((P → P) → P) → (P → P)) (((P → P) → P) → (P → P)) Albert R Meyer February 14, 2014 propositional logic.16 Albert R Meyer February 14, 2014 propositional logic.17 4 A Lukasiewicz’ Proof A Lukasiewicz’ Proof so apply modus ponens: so apply modus ponens: Axiom 1) (((P → P) → P) → (P → P)) (P → P) QED Albert R Meyer February 14, 2014 propositional logic.18 Albert R Meyer February 14, 2014 propositional logic.19 LukaLukasiewsiieczw’ icProofz is SSystemound Lukasiewicz is Complete The 3 Axioms are all valid Conversely, every valid (verify by truth table). (NOT,→)-formula is provable: We know modus ponens is system is “complete” Not hard to verify but would take s ound . So every provable a full lecture; we omit it. formula is also valid. Albert R Meyer February 14, 2014 propositional logic.20 Albert R Meyer February 14, 2014 propositional logic.21 5 validity checking still inefficient Algebraic & deduction proofs in general are no better than truth tables. No efficient method for verifying validity is known. Albert R Meyer February 14, 2014 propositional logic.22 6 MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 2015 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms..
Recommended publications
  • 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]
  • The Validities of Pep and Some Characteristic Formulas in Modal Logic
    THE VALIDITIES OF PEP AND SOME CHARACTERISTIC FORMULAS IN MODAL LOGIC Hong Zhang, Huacan He School of Computer Science, Northwestern Polytechnical University,Xi'an, Shaanxi 710032, P.R. China Abstract: In this paper, we discuss the relationships between some characteristic formulas in normal modal logic with their frames. We find that the validities of the modal formulas are conditional even though some of them are intuitively valid. Finally, we prove the validities of two formulas of Position- Exchange-Principle (PEP) proposed by papers 1 to 3 by using of modal logic and Kripke's semantics of possible worlds. Key words: Characteristic Formulas, Validity, PEP, Frame 1. INTRODUCTION Reasoning about knowledge and belief is an important issue in the research of multi-agent systems, and reasoning, which is set up from the main ideas of situational calculus, about other agents' states and actions is one of the most important directions in Al^^'^\ Papers [1-3] put forward an axiom scheme in reasoning about others(RAO) in multi-agent systems, and a rule called Position-Exchange-Principle (PEP), which is shown as following, was abstracted . C{(p^y/)^{C(p->Cy/) (Ce{5f',...,5f-}) When the length of C is at least 2, it reflects the mechanism of an agent reasoning about knowledge of others. For example, if C is replaced with Bf B^/, then it should be B':'B]'{(p^y/)-^iBf'B]'(p^Bf'B]'y/) 872 Hong Zhang, Huacan He The axiom schema plays a useful role as that of modus ponens and axiom K when simplifying proof. Though examples were demonstrated as proofs in papers [1-3], from the perspectives both in semantics and in syntax, the rule is not so compellent.
    [Show full text]
  • On Basic Probability Logic Inequalities †
    mathematics Article On Basic Probability Logic Inequalities † Marija Boriˇci´cJoksimovi´c Faculty of Organizational Sciences, University of Belgrade, Jove Ili´ca154, 11000 Belgrade, Serbia; [email protected] † The conclusions given in this paper were partially presented at the European Summer Meetings of the Association for Symbolic Logic, Logic Colloquium 2012, held in Manchester on 12–18 July 2012. Abstract: We give some simple examples of applying some of the well-known elementary probability theory inequalities and properties in the field of logical argumentation. A probabilistic version of the hypothetical syllogism inference rule is as follows: if propositions A, B, C, A ! B, and B ! C have probabilities a, b, c, r, and s, respectively, then for probability p of A ! C, we have f (a, b, c, r, s) ≤ p ≤ g(a, b, c, r, s), for some functions f and g of given parameters. In this paper, after a short overview of known rules related to conjunction and disjunction, we proposed some probabilized forms of the hypothetical syllogism inference rule, with the best possible bounds for the probability of conclusion, covering simultaneously the probabilistic versions of both modus ponens and modus tollens rules, as already considered by Suppes, Hailperin, and Wagner. Keywords: inequality; probability logic; inference rule MSC: 03B48; 03B05; 60E15; 26D20; 60A05 1. Introduction The main part of probabilization of logical inference rules is defining the correspond- Citation: Boriˇci´cJoksimovi´c,M. On ing best possible bounds for probabilities of propositions. Some of them, connected with Basic Probability Logic Inequalities. conjunction and disjunction, can be obtained immediately from the well-known Boole’s Mathematics 2021, 9, 1409.
    [Show full text]
  • 7.1 Rules of Implication I
    Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic. The method consists of using sets of Rules of Inference (valid argument forms) to derive either a conclusion or a series of intermediate conclusions that link the premises of an argument with the stated conclusion. The First Four Rules of Inference: ◦ Modus Ponens (MP): p q p q ◦ Modus Tollens (MT): p q ~q ~p ◦ Pure Hypothetical Syllogism (HS): p q q r p r ◦ Disjunctive Syllogism (DS): p v q ~p q Common strategies for constructing a proof involving the first four rules: ◦ Always begin by attempting to find the conclusion in the premises. If the conclusion is not present in its entirely in the premises, look at the main operator of the conclusion. This will provide a clue as to how the conclusion should be derived. ◦ If the conclusion contains a letter that appears in the consequent of a conditional statement in the premises, consider obtaining that letter via modus ponens. ◦ If the conclusion contains a negated letter and that letter appears in the antecedent of a conditional statement in the premises, consider obtaining the negated letter via modus tollens. ◦ If the conclusion is a conditional statement, consider obtaining it via pure hypothetical syllogism. ◦ If the conclusion contains a letter that appears in a disjunctive statement in the premises, consider obtaining that letter via disjunctive syllogism. Four Additional Rules of Inference: ◦ Constructive Dilemma (CD): (p q) • (r s) p v r q v s ◦ Simplification (Simp): p • q p ◦ Conjunction (Conj): p q p • q ◦ Addition (Add): p p v q Common Misapplications Common strategies involving the additional rules of inference: ◦ If the conclusion contains a letter that appears in a conjunctive statement in the premises, consider obtaining that letter via simplification.
    [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]
  • Sets, Propositional Logic, Predicates, and Quantifiers
    COMP 182 Algorithmic Thinking Sets, Propositional Logic, Luay Nakhleh Computer Science Predicates, and Quantifiers Rice University !1 Reading Material ❖ Chapter 1, Sections 1, 4, 5 ❖ Chapter 2, Sections 1, 2 !2 ❖ Mathematics is about statements that are either true or false. ❖ Such statements are called propositions. ❖ We use logic to describe them, and proof techniques to prove whether they are true or false. !3 Propositions ❖ 5>7 ❖ The square root of 2 is irrational. ❖ A graph is bipartite if and only if it doesn’t have a cycle of odd length. ❖ For n>1, the sum of the numbers 1,2,3,…,n is n2. !4 Propositions? ❖ E=mc2 ❖ The sun rises from the East every day. ❖ All species on Earth evolved from a common ancestor. ❖ God does not exist. ❖ Everyone eventually dies. !5 ❖ And some of you might already be wondering: “If I wanted to study mathematics, I would have majored in Math. I came here to study computer science.” !6 ❖ Computer Science is mathematics, but we almost exclusively focus on aspects of mathematics that relate to computation (that can be implemented in software and/or hardware). !7 ❖Logic is the language of computer science and, mathematics is the computer scientist’s most essential toolbox. !8 Examples of “CS-relevant” Math ❖ Algorithm A correctly solves problem P. ❖ Algorithm A has a worst-case running time of O(n3). ❖ Problem P has no solution. ❖ Using comparison between two elements as the basic operation, we cannot sort a list of n elements in less than O(n log n) time. ❖ Problem A is NP-Complete.
    [Show full text]
  • Chapter 9: Answers and Comments Step 1 Exercises 1. Simplification. 2. Absorption. 3. See Textbook. 4. Modus Tollens. 5. Modus P
    Chapter 9: Answers and Comments Step 1 Exercises 1. Simplification. 2. Absorption. 3. See textbook. 4. Modus Tollens. 5. Modus Ponens. 6. Simplification. 7. X -- A very common student mistake; can't use Simplification unless the major con- nective of the premise is a conjunction. 8. Disjunctive Syllogism. 9. X -- Fallacy of Denying the Antecedent. 10. X 11. Constructive Dilemma. 12. See textbook. 13. Hypothetical Syllogism. 14. Hypothetical Syllogism. 15. Conjunction. 16. See textbook. 17. Addition. 18. Modus Ponens. 19. X -- Fallacy of Affirming the Consequent. 20. Disjunctive Syllogism. 21. X -- not HS, the (D v G) does not match (D v C). This is deliberate to make sure you don't just focus on generalities, and make sure the entire form fits. 22. Constructive Dilemma. 23. See textbook. 24. Simplification. 25. Modus Ponens. 26. Modus Tollens. 27. See textbook. 28. Disjunctive Syllogism. 29. Modus Ponens. 30. Disjunctive Syllogism. Step 2 Exercises #1 1 Z A 2. (Z v B) C / Z C 3. Z (1)Simp. 4. Z v B (3) Add. 5. C (2)(4)MP 6. Z C (3)(5) Conj. For line 4 it is easy to get locked into line 2 and strategy 1. But they do not work. #2 1. K (B v I) 2. K 3. ~B 4. I (~T N) 5. N T / ~N 6. B v I (1)(2) MP 7. I (6)(3) DS 8. ~T N (4)(7) MP 9. ~T (8) Simp. 10. ~N (5)(9) MT #3 See textbook. #4 1. H I 2. I J 3.
    [Show full text]
  • Argument Forms and Fallacies
    6.6 Common Argument Forms and Fallacies 1. Common Valid Argument Forms: In the previous section (6.4), we learned how to determine whether or not an argument is valid using truth tables. There are certain forms of valid and invalid argument that are extremely common. If we memorize some of these common argument forms, it will save us time because we will be able to immediately recognize whether or not certain arguments are valid or invalid without having to draw out a truth table. Let’s begin: 1. Disjunctive Syllogism: The following argument is valid: “The coin is either in my right hand or my left hand. It’s not in my right hand. So, it must be in my left hand.” Let “R”=”The coin is in my right hand” and let “L”=”The coin is in my left hand”. The argument in symbolic form is this: R ˅ L ~R __________________________________________________ L Any argument with the form just stated is valid. This form of argument is called a disjunctive syllogism. Basically, the argument gives you two options and says that, since one option is FALSE, the other option must be TRUE. 2. Pure Hypothetical Syllogism: The following argument is valid: “If you hit the ball in on this turn, you’ll get a hole in one; and if you get a hole in one you’ll win the game. So, if you hit the ball in on this turn, you’ll win the game.” Let “B”=”You hit the ball in on this turn”, “H”=”You get a hole in one”, and “W”=”you win the game”.
    [Show full text]
  • A Validity Framework for the Use and Development of Exported Assessments
    A Validity Framework for the Use and Development of Exported Assessments By María Elena Oliveri, René Lawless, and John W. Young A Validity Framework for the Use and Development of Exported Assessments María Elena Oliveri, René Lawless, and John W. Young1 1 The authors would like to acknowledge Bob Mislevy, Michael Kane, Kadriye Ercikan, and Maurice Hauck for their valuable input and expertise in reviewing various iterations of the framework as well as Priya Kannan, Don Powers, and James Carlson for their input throughout the technical review process. Copyright © 2015 Educational Testing Service. All Rights Reserved. ETS, the ETS logo, GRADUATE RECORD EXAMINATIONS, GRE, LISTENTING. LEARNING. LEADING, TOEIC, and TOEFL are registered trademarks of Educational Testing Service (ETS). EXADEP and EXAMEN DE ADMISIÓN A ESTUDIOS DE POSGRADO are trademarks of ETS. 1 Abstract In this document, we present a framework that outlines the key considerations relevant to the fair development and use of exported assessments. Exported assessments are developed in one country and are used in countries with a population that differs from the one for which the assessment was developed. Examples of these assessments include the Graduate Record Examinations® (GRE®) and el Examen de Admisión a Estudios de Posgrado™ (EXADEP™), among others. Exported assessments can be used to make inferences about performance in the exporting country or in the receiving country. To illustrate, the GRE can be administered in India and be used to predict success at a graduate school in the United States, or similarly it can be administered in India to predict success in graduate school at a graduate school in India.
    [Show full text]
  • From Fuzzy Sets to Crisp Truth Tables1 Charles C. Ragin
    From Fuzzy Sets to Crisp Truth Tables1 Charles C. Ragin Department of Sociology University of Arizona Tucson, AZ 85721 USA [email protected] Version: April 2005 1. Overview One limitation of the truth table approach is that it is designed for causal conditions are simple presence/absence dichotomies (i.e., Boolean or "crisp" sets). Many of the causal conditions that interest social scientists, however, vary by level or degree. For example, while it is clear that some countries are democracies and some are not, there are many in-between cases. These countries are not fully in the set of democracies, nor are they fully excluded from this set. Fortunately, there is a well-developed mathematical system for addressing partial membership in sets, fuzzy-set theory. Section 2 of this paper provides a brief introduction to the fuzzy-set approach, building on Ragin (2000). Fuzzy sets are especially powerful because they allow researchers to calibrate partial membership in sets using values in the interval between 0 (nonmembership) and 1 (full membership) without abandoning core set theoretic principles, for example, the subset relation. Ragin (2000) demonstrates that the subset relation is central to the analysis of multiple conjunctural causation, where several different combinations of conditions are sufficient for the same outcome. While fuzzy sets solve the problem of trying to force-fit cases into one of two categories (membership versus nonmembership in a set), they are not well suited for conventional truth table analysis. With fuzzy sets, there is no simple way to sort cases according to the combinations of causal conditions they display because each case's array of membership scores may be unique.
    [Show full text]
  • 12 Propositional Logic
    CHAPTER 12 ✦ ✦ ✦ ✦ Propositional Logic In this chapter, we introduce propositional logic, an algebra whose original purpose, dating back to Aristotle, was to model reasoning. In more recent times, this algebra, like many algebras, has proved useful as a design tool. For example, Chapter 13 shows how propositional logic can be used in computer circuit design. A third use of logic is as a data model for programming languages and systems, such as the language Prolog. Many systems for reasoning by computer, including theorem provers, program verifiers, and applications in the field of artificial intelligence, have been implemented in logic-based programming languages. These languages generally use “predicate logic,” a more powerful form of logic that extends the capabilities of propositional logic. We shall meet predicate logic in Chapter 14. ✦ ✦ ✦ ✦ 12.1 What This Chapter Is About Section 12.2 gives an intuitive explanation of what propositional logic is, and why it is useful. The next section, 12,3, introduces an algebra for logical expressions with Boolean-valued operands and with logical operators such as AND, OR, and NOT that Boolean algebra operate on Boolean (true/false) values. This algebra is often called Boolean algebra after George Boole, the logician who first framed logic as an algebra. We then learn the following ideas. ✦ Truth tables are a useful way to represent the meaning of an expression in logic (Section 12.4). ✦ We can convert a truth table to a logical expression for the same logical function (Section 12.5). ✦ The Karnaugh map is a useful tabular technique for simplifying logical expres- sions (Section 12.6).
    [Show full text]
  • Lecture 1: Propositional Logic
    Lecture 1: Propositional Logic Syntax Semantics Truth tables Implications and Equivalences Valid and Invalid arguments Normal forms Davis-Putnam Algorithm 1 Atomic propositions and logical connectives An atomic proposition is a statement or assertion that must be true or false. Examples of atomic propositions are: “5 is a prime” and “program terminates”. Propositional formulas are constructed from atomic propositions by using logical connectives. Connectives false true not and or conditional (implies) biconditional (equivalent) A typical propositional formula is The truth value of a propositional formula can be calculated from the truth values of the atomic propositions it contains. 2 Well-formed propositional formulas The well-formed formulas of propositional logic are obtained by using the construction rules below: An atomic proposition is a well-formed formula. If is a well-formed formula, then so is . If and are well-formed formulas, then so are , , , and . If is a well-formed formula, then so is . Alternatively, can use Backus-Naur Form (BNF) : formula ::= Atomic Proposition formula formula formula formula formula formula formula formula formula formula 3 Truth functions The truth of a propositional formula is a function of the truth values of the atomic propositions it contains. A truth assignment is a mapping that associates a truth value with each of the atomic propositions . Let be a truth assignment for . If we identify with false and with true, we can easily determine the truth value of under . The other logical connectives can be handled in a similar manner. Truth functions are sometimes called Boolean functions. 4 Truth tables for basic logical connectives A truth table shows whether a propositional formula is true or false for each possible truth assignment.
    [Show full text]