Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Similar documents
Propositional Logic Not Enough

Introduction to Sets and Logic (MATH 1190)

Announcements CompSci 102 Discrete Math for Computer Science

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Proposi'onal Logic Not Enough

CSC Discrete Math I, Spring Propositional Logic

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Section Summary. Section 1.5 9/9/2014

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Boolean Logic. CS 231 Dianna Xu

Introduction to Decision Sciences Lecture 2

2-4: The Use of Quantifiers

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

Compound Propositions

Part I: Propositional Calculus

2.2: Logical Equivalence: The Laws of Logic

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

Discrete Mathematics and Its Applications

The Logic of Compound Statements cont.

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

Tautologies, Contradictions, and Contingencies

Recall that the expression x > 3 is not a proposition. Why?

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

Predicate Calculus lecture 1

PREDICATE LOGIC. Schaum's outline chapter 4 Rosen chapter 1. September 11, ioc.pdf

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

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

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

Logic and Proof. Aiichiro Nakano

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

software design & management Gachon University Chulyun Kim

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

1 The Foundation: Logic and Proofs

Thinking of Nested Quantification

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

Mat 243 Exam 1 Review

1.1 Language and Logic

EECS 1028 M: Discrete Mathematics for Engineers

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

1 The Foundation: Logic and Proofs

Propositional Equivalence

ICS141: Discrete Mathematics for Computer Science I

1.1 Language and Logic

MAT2345 Discrete Math

2. Use quantifiers to express the associative law for multiplication of real numbers.

Chapter 1 Elementary Logic

1.3 Propositional Equivalences

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

Transparencies to accompany Rosen, Discrete Mathematics and Its Applications Section 1.3. Section 1.3 Predicates and Quantifiers

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

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.

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

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

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

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

AMTH140 Lecture 8. Symbolic Logic

Chapter 4, Logic using Propositional Calculus Handout

ICS141: Discrete Mathematics for Computer Science I

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

Logic and Proofs. (A brief summary)

Discrete Structures for Computer Science

Logic and Propositional Calculus

Solutions to Homework I (1.1)

Chapter 1, Section 1.1 Propositional Logic

CSE 20: Discrete Mathematics

Chapter 1, Part II: Predicate Logic

HANDOUT AND SET THEORY. Ariyadi Wijaya

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

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

Learning Goals of CS245 Logic and Computation

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

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Propositional Logic. Spring Propositional Logic Spring / 32

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

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

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

It rains now. (true) The followings are not propositions.

CSC165 Mathematical Expression and Reasoning for Computer Science

Predicates and Quantifiers. CS 231 Dianna Xu

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

First Order Logic (1A) Young W. Lim 11/5/13

Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text)

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

Logic and Proofs. (A brief summary)

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Intro to Logic and Proofs

Logic and Propositional Calculus

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Math 10850, fall 2017, University of Notre Dame

Announcement. Homework 1

THE LOGIC OF QUANTIFIED STATEMENTS

Discrete Mathematical Structures: Theory and Applications

Definition 2. Conjunction of p and q

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

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

Transcription:

Review Propositional Logic Propositions atomic and compound Operators: negation, and, or, xor, implies, biconditional Truth tables A closer look at implies Translating from/ to English Converse, inverse, contrapositive Logical Equivalence Tautology, contradiction, contingency Showing logical equivalence: truth table, or a proof Some key logical equivalences next pages

Key Logical Equivalences 1 Identity Laws: pù T º p, pú F º p Domination Laws: pú T º T, pù F º F Idempotent laws: pú pº p, pù p º p Double Negation Law: ( p) º p Negation Laws: pú pº T, pù pº F

Key Logical Equivalences 2 Commutative Laws: pú qº qú p, pù qº qù p Associative Laws: ( pùq) Ù r º pù( qùr) Distributive Laws: ( ) ( púq) Ú r º pú( qúr) ( pú qù r ) º ( púq) Ù( púr) ( pù( qú r) ) º ( pùq) Ú( pùr) Absorption Laws: pú( pù q) º p pù( pú q) º p

More Logical Equivalences TABLE 7 Logical Equivalences Involving Conditional Statements. p qº pú q p qº q p pú qº p q pù qº ( p q) ( p q) º pù q ( p q) Ù ( p r) º p ( qùr) ( p r) Ù ( q r) º ( pú q) r ( p q) Ú ( p r) º p ( qúr) ( p r) Ú ( q r) º ( pù q) r TABLE 8 Logical Equivalences Involving Biconditional Statements. ( ) ( ) p«qº p q Ù q p p«qº p«q «º ( Ù ) Ú ( Ù ) ( p q) p q p q p q p q «º «

( ) ( ) De Morgan s Laws pù q º pú q pú q º pù q This truth table shows that De Morgan s Second Law holds. p q p q (p q) (p q) p q T T F F T F F T F F T T F F F T T F T F F F F T T F T T

Constructing New Logical Equivalences We can show that two expressions are logically equivalent by developing a series of logically equivalent statements. To prove that A B we produce a series of equivalences beginning with A and ending with B. A º A 1 A n º B

Equivalence Proofs 1 ( ) Example: Show that pú ( pù q) Solution: is logically equivalent to pù q ( p ( p q) ) p ( p q) ë ( ) p ( p q) Ú Ù º Ù Ù by the second De Morgan law º pùé p Ú qù by the first De Morgan law û º Ù Ú by the double negation law º ( pù p) Ú ( pù q) by the second distributive law º FÚ ( pù q) because pù pº F º ( pù q) Ú F by the commutative law for disjunction º ( pù q) By the identity law for F

Equivalence Proofs 2 Example: Show that ( pù q) ( púq) is a tautology. Solution: pù q pú q º pùq Ú púq by truth table for ( ) ( ) ( ) ( ) º ( pú q) Ú( púq) by the first De Morgan law º ( pú p) Ú ( qú q) by associative and commutative laws laws for disjunction º T ÚT by truth tables º T by the domination law

Problem How many rows are there in a truth table with n propositional variables? 2 n, also written as 2^n. (We will see why later, when studying Counting.) With n propositional variables, how many distinct (that is, not equivalent) propositions can we have? 2^(2^n)

Problem Section 1.2 Applications of Propositional Logic not covered in class Read the sub-section Translating English Sentences on your own`

Propositional Satisfiability A compound proposition is satisfiable if there is an assignment of truth values to its variables that make it true. When no such assignments exist, the compound proposition is unsatisfiable. A compound proposition is unsatisfiable if and only if its negation is a tautology.

Propositional Satisfiability Example: Determine the satisfiability of the following: ( pú q) Ù( qú r) Ù( rú p) Solution: Satisfiable. Assign T to p, q, and r. ( púqúr) Ù ( pú qú r) Solution: Satisfiable. Assign T to p and F to q. ( pú q) Ù( qú r) Ù( rú p) Ù( púqúr) Ù ( pú qú r) Solution: Not satisfiable. Check each possible assignment of truth values to the propositional variables and none will make the proposition true.

First-Order Predicate Logic If we have: All men are mortal. and Socrates is a man. Does it follow that Socrates is mortal?

Predicate Logic A predicate is a function from some domain U to the range {T, F} Variables x, y, over the domain. Predicates P(x), Q(x,y), The statement P(x) is said to be the value of the predicate P at x. Note that for a given value of x, P(x) is a proposition. (Hence, predicates are also called propositional functions.) For example, let P(x) denote x > 0 and the domain be the integers. P(-3) is false. P(0) is false. P(3) is true.

Examples of Propositional Functions Let x + y = z be denoted by R(x, y, z) and U (for all three variables) be the integers. Find these truth values: R(2,-1,5) Solution: F R(3,4,7) Solution: T R(x, 3, z) Solution: Not a Proposition Now let x - y = z be denoted by Q(x, y, z), with U as the integers. Find these truth values: Q(2,-1,3) Solution: T Q(3,4,7) Solution: F Q(x, 3, z) Solution: Not a Proposition

Compound Expressions Connectives from propositional logic carry over to predicate logic. If P(x) denotes x > 0, find these truth values: P(3) P(-1) P(3) P(-1) P(3) P(-1) P(3) P(-1) Expressions with variables are not propositions and therefore do not have truth values. For example, P(3) P(y) P(x) P(y)

Quantifiers We need quantifiers to express the meaning of English words including all and some: All men are Mortal. Some cats do not have fur. The two most important quantifiers are: Universal Quantifier, For all, symbol: " Existential Quantifier, There exists, symbol: $ We write as in "x P(x) and $x P(x). "x P(x) asserts P(x) is true for every x in the domain. $x P(x) asserts P(x) is true for some x in the domain. The quantifiers are said to bind the variable x in these expressions.

Universal Quantifier "x P(x) is read as For all x, P(x) or For every x, P(x) Examples: 1) If P(x) denotes x > 0 and U is the integers, then "x P(x) is false. 2) If P(x) denotes x > 0 and U is the positive integers, then "x P(x) is true. 3) If P(x) denotes x is even and U is the integers, then " x P(x) is false.

Existential Quantifier $x P(x) is read as For some x, P(x), or as There is an x such that P(x), or For at least one x, P(x). Examples: 1. If P(x) denotes x > 0 and U is the integers, then $x P(x) is true. It is also true if U is the positive integers. 2. If P(x) denotes x < 0 and U is the positive integers, then $x P(x) is false. 3. If P(x) denotes x is even and U is the integers, then $x P(x) is true.

Thinking about Quantifiers When the domain of discourse is finite, we can think of quantification as looping through the elements of the domain. To evaluate "x P(x) loop through all x in the domain. If at every step P(x) is true, then "x P(x) is true. If at a step P(x) is false, then "x P(x) is false and the loop terminates. To evaluate $x P(x) loop through all x in the domain. If at some step, P(x) is true, then $x P(x) is true and the loop terminates. If the loop ends without finding an x for which P(x) is true, then $x P(x) is false. Even if the domains are infinite, we can still think of the quantifiers this fashion, but the loops will not terminate in some cases.