A. Propositional Logic

Similar documents
Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Logic, Sets, and Proofs

PROPOSITIONAL CALCULUS

Propositional Logic. Spring Propositional Logic Spring / 32

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

The Logic of Compound Statements cont.

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

DISCRETE MATH: FINAL REVIEW

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Logic and Proofs. (A brief summary)

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

software design & management Gachon University Chulyun Kim

Intro to Logic and Proofs

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Chapter 1: The Logic of Compound Statements. January 7, 2008

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Logic Overview, I. and T T T T F F F T F F F F

Chapter 1 Elementary Logic

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Logic and Proof. Aiichiro Nakano

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

CSC Discrete Math I, Spring Propositional Logic

2.2: Logical Equivalence: The Laws of Logic

CSC 125 :: Final Exam May 3 & 5, 2010

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

DISCRETE MATHEMATICS BA202

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Logic and Proofs. (A brief summary)

CSE 20 DISCRETE MATH. Winter

1 The Foundation: Logic and Proofs

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

(Refer Slide Time: 02:20)

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Rules Build Arguments Rules Building Arguments

PHI Propositional Logic Lecture 2. Truth Tables

CSE 20 DISCRETE MATH. Fall

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Supplementary Logic Notes CSE 321 Winter 2009

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Readings: Conjecture. Theorem. Rosen Section 1.5

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Math 3336: Discrete Mathematics Practice Problems for Exam I

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Section 1.2: Propositional Logic

MAT 243 Test 1 SOLUTIONS, FORM A

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

1 The Foundation: Logic and Proofs

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

HANDOUT AND SET THEORY. Ariyadi Wijaya

Chapter 4, Logic using Propositional Calculus Handout

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Discrete Mathematics. Instructor: Sourav Chakraborty. Lecture 4: Propositional Logic and Predicate Lo

Introduction to Sets and Logic (MATH 1190)

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

Mat 243 Exam 1 Review

Chapter 3. The Logic of Quantified Statements

Compound Propositions

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

Rules of Inference. Arguments and Validity

1.1 Statements and Compound Statements

ICS141: Discrete Mathematics for Computer Science I

1.1 Language and Logic

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Propositional Logic. Fall () Propositional Logic Fall / 30

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

CS 2336 Discrete Mathematics

ECOM Discrete Mathematics

Formal Logic. Critical Thinking

THE LOGIC OF COMPOUND STATEMENTS

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

1.1 Language and Logic

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

3 The Semantics of the Propositional Calculus

Discrete Mathematical Structures: Theory and Applications

First order Logic ( Predicate Logic) and Methods of Proof

Introduction to Decision Sciences Lecture 2

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

CSE 20: Discrete Mathematics

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

Predicate Logic. Andreas Klappenecker

Transcription:

CmSc 175 Discrete Mathematics A. Propositional Logic 1. Statements (Propositions ): Statements are sentences that claim certain things. Can be either true or false, but not both. Propositional logic deals with propositions Propositional constants: T true; F - false Propositional variables can have T or F value. Atomic propositions: they cannot be further subdivided e.g. The sun is shining Compound propositions: Not atomic, contain at least one logical connective The sun is shining and the sky is blue 2. Basic logical connectives: AND, OR, NOT Truth Tables a. Negation (NOT, ~, ) P ~P ------------------ T F F T ~P is true if and only if P is false b. Conjunction (AND, Λ) P Q P Λ Q ------------------------ T T T T F F F T F F F F P Λ Q is true iff both P and Q are true. In all other cases P Λ Q is false c. Inclusive or (OR, V) P Q P V Q ------------------------ T T T T F T F T T F F F P V Q is true iff P is true or Q is true or both are true. P V Q is false iff both P and Q are false 1

d. Conditional, known also as implication ( ) P Q P Q ------------------------ T T T T F F F T T F F T The implication P Q is false iff P is true however Q is false. In all other cases the implication is true Logical equivalences Commutative laws P v Q Q v P P ^ Q Q ^ P Associative laws (P v Q) v R P v (Q v R) Distributive laws: Identity (P ^ Q) ^ R P ^v (Q ^ R) (P v Q) ^ (P v R) P v (Q ^ R) (P ^ Q) v (P ^ R) P ^ (Q v R) P v F P, P ^ T P Negation P v ~P T (excluded middle) P ^ ~P F Double negation ~(~P) P Idempotent laws P v P P De Morgan's Laws Universal bound laws (Domination) Absorption Laws P ^ P P ~(P v Q) ~P ^ ~Q ~(P ^ Q) ~P v ~Q P v T T P ^ F F (contradiction) P v (P ^ Q) P, P ^ (P v Q) P Negation of T and F ~T F, ~F T 2

3. Conditionals P Q False only when P = T and Q = F True for all other values of P and Q Representing the conditional by means of disjunction P Q P V Q Rewrite P V Q as a conditional: ~P Q If the book is not in the library then it is in the bookstore. Negation of conditional statements ~(P Q) = ~( ~ P V Q) = P Λ ~Q Example: If the book is not in the library then it is in the bookstore. Negation: The book is not in the library and it is not in the bookstore. Comments: P Q means: if P is true then Q is also true. The negation is: P is true, however Q is false. The negation of a conditional statement is a conjunction, not another if-then statement Which expressions when negated will result in conditional statements? Answer: conjunctions. Why? - the negation of a conjunction is a disjunction (De Morgan laws) Any disjunction is equivalent to an if-then statement. P Q Converse: Q P (Change position) Inverse: ~P ~Q (Change sign) Contrapositive: ~Q ~P (Change both position and sign) The conditional is equivalent to its contrapositive. The inverse is equivalent to the converse. 3

Necessary and sufficient conditions P Q P is a sufficient condition for Q Q is a necessary condition for P P only if Q : P Q P unless Q : Q P 4. Syllogisms (Patterns of arguments, inference rules) 4.1. Modus Ponens and Modus Tollens Modus ponens (method of affirming) (1) If P then Q (2) P Therefore (3) Q Example: If it is Sunday we go fishing. It is Sunday Therefore we go fishing Modus Tollens (method of denying) (1) If P then Q (2) ~Q Therefore (3) ~P Example: If it is Sunday we go fishing. We do not go fishing Therefore it is not Sunday Examples of invalid arguments: Inverse error If it is Sunday we go fishing It is not Sunday Therefore we do not go fishing Converse error If it is Sunday we go fishing We go fishing Therefore it is Sunday 4.2. Disjunctive syllogism Therefore (1) P V Q (2) ~P (3) Q 4

Example: During the weekend we either go fishing or we play cards This weekend we did not go fishing Therefore, this weekend we were playing cards 4.3. Hypothetical syllogism Therefore (1) P Q (2) Q R (3) P R Example: If we win the game we will get much money. If we have money we will go on a trip to China. Therefore, if we win the game we will go on a trip to China Inference rules A B, A, therefore B A B, ~B, therefore ~A Modus ponens Modus tollens A, therefore A V B Disjunctive addition A, B, therefore A Λ B Conjunctive addition A Λ B, therefore A A Λ B, therefore B A V B, ~A, therefore B Conjunctive simplification Disjunctive syllogism A V B, ~B, therefore A A B, B C, therefore A C Hypothetical syllogism A V B, A R, B R, therefore R Dilemma, proof by division into cases A B, ~A B, therefore B ~P F, therefore P Law of contradiction A B, therefore A B, B A Equivalence elimination A B, B A, therefore A B Equivalence introduction A, ~A, therefore B Inconsistency law 5

B. Predicate logic General: Predicates describe properties and relations. A predicate is a sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variables. Predicates may have one or more variables, e.g. student(x), mother(x,y) QUANTIFIERS IN PREDICATE LOGIC A. Universally quantified statements "for all, "all" denoted by the symbol: a. general form: x D, P(x) all objects in the set D have the property P e.g. x humans, has_two_legs(x) b. If - then form x, D(x) P(x) all objects that have the property D have also the property P e.g. x, human(x) has_two_legs (x) note: objects in set D have property D c. compound statements The predicate P(x) may be a compound expression, e.g. odd(x) V even(x) as in the statement: x, integer(x) odd(x) V even(x) x, human(x) has_two_legs (x) has_two_arms(x) Example: x, prime_number(x) integer(x) Meaning: (1) Prime numbers are integers. (2) If a number is a prime number then it is an integer. (3) All prime numbers are integers (4) Any prime number is an integer 6

B. Existentially quantified statements Existential quantifier:, "there exists" (there is, we can find, there is at least one, for some, for at least one) a. general form: x D, P(x) There exists an object in the set D with the property P b. represented as a conjunction: x, D(x) Λ P(x) There is an objects that has the property D and the property P c. compound statements The predicate P(x) may be a compound expression, e.g. odd(x) V even(x) as in the statement: x, odd(x) V even(x) C. Negation of quantifiers 1. Negation of universally quantified statements: ~( x P(x)), x є D is equivalent to: x (~P(x)), x є D ~( x, D(x) P(x)) x,~(d(x) P(x)) x, D(x) ~ P(x) Important to remember: 1. The negation of "for all" is "there is" 2. The negation of an implication is a conjunction, (obtained by applying the laws of De Morgan to negate the implication, represented as a disjunction) 2. Negation of existentially quantified statements: ~( x P(x)), x є D is equivalent to: x (~ P(x)), x є D ~( x, D(x) P(x)) x, D(x) P(x) Example: There are perfect people: x, person(x) perfect(x) Nobody is perfect: ~( x person(x) perfect(x)) x, ~( person(x) perfect(x)) x, person(x) ~perfect(x) The statement: "It is not true that there is an x with the property P" is equivalent to: "No x in D has the property P" or "All x in D have the property ~P." 7

To negate a quantified expression do the following: 1. change the quantifier 2. negate the predicate expression that follows the quantifier. It is preferred to include the domain in the predicate expression using an appropriate predicate: All horses fly: x (horse (x) fly(x)) Some horses fly: x (horse(x) Λ fly(x)) No horses fly: x (horse (x) ~ fly(x)) C. Mathematical Induction Inductive base: Show that P(1) or P(0) is true Inductive step: Prove that P(k) P(k+1) is true Example: Let S(n) = 1 + 3 + 5 +. (2n 1) Prove by mathematical induction the statement P(n): S(n) = n 2, n = 1, 2, 3, 1. Base step: Show P(1) is true P(1) : S(1) = 1 2 = 1 By the definition of S(n), S(1) = (2*1 1) = 1. Therefore P(1) is true 2. Inductive step: Show that P(k) P(k+1) is true P(k) : S(k) = k 2, P(k+1): S(k+1) = (k+1) 2 Assume that P(k) is true, show that P(k+1) is true, i.e. show that S(k+1) = (k+1) 2 S(k+1) = S(k) + (2(k+1) 1) = k 2 + (2k+1) = (k+1) 2 Therefore P(k+1) is true, therefore P(k) P(k+1) is true By the principle of mathematical induction, S(n) = n 2 for all n = 1, 2, 3, 8