Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 16, Mathematical Expression and Reasoning 1

Similar documents
Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 09, Mathematical Expression and Reasoning 1

Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 09, Mathematical Expression and Reasoning 1

CSC165 Mathematical Expression and Reasoning for Computer Science

3.1 Universal quantification and implication again. Claim 1: If an employee is male, then he makes less than 55,000.

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

Introduction to Sets and Logic (MATH 1190)

Direct Proof and Proof by Contrapositive

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

Quantifiers. P. Danziger

2-4: The Use of Quantifiers

Propositional Logic Not Enough

Homework assignment 1: Solutions

MAT2345 Discrete Math

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

Propositional Logic and Semantics

MAT 243 Test 1 SOLUTIONS, FORM A

A statement is a sentence that is definitely either true or false but not both.

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

THE LOGIC OF QUANTIFIED STATEMENTS

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

Chapter 2: The Logic of Quantified Statements. January 22, 2010

Predicate Calculus lecture 1

Lecture 7. Logic. Section1: Statement Logic.

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Solutions to Exercises (Sections )

2 Truth Tables, Equivalences and the Contrapositive

Mat 243 Exam 1 Review

Discrete Mathematics and Its Applications

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

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.

22c:145 Artificial Intelligence

Propositional Logic: Syntax

A Logic Primer. Stavros Tripakis University of California, Berkeley

Lecture 3 : Predicates and Sets DRAFT

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

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

Today s Topic: Propositional Logic

Announcement. Homework 1

Truth-Functional Logic

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Chapter 1: Formal Logic

Propositional logic ( ): Review from Mat 1348

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

THE LOGIC OF COMPOUND STATEMENTS

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Logic. Propositional Logic: Syntax

Announcements CompSci 102 Discrete Math for Computer Science

Propositional Logic: Part II - Syntax & Proofs 0-0

ICS141: Discrete Mathematics for Computer Science I

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

1 Predicates and Quantifiers

Logic. Def. A Proposition is a statement that is either true or false.

Quantifiers. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, 2018

cis32-ai lecture # 18 mon-3-apr-2006

CITS2211 Discrete Structures. Propositional Logic

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

Compound Propositions

Chapter 2: The Logic of Quantified Statements

Discrete Structures for Computer Science

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

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

1 Propositional Logic

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Predicate Logic: Sematics Part 1

Exclusive Disjunction

Logic: Propositional Logic (Part I)

Logic. Propositional Logic: Syntax. Wffs

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

Section Summary. Section 1.5 9/9/2014

Sets and Logic Linear Algebra, Spring 2012

Introduction to Decision Sciences Lecture 2

Propositional and Predicate Logic

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

Logic and Propositional Calculus

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Chapter 1 Elementary Logic

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 (revision) & semantic entailment. p. 1/34

Introduction to Metalogic 1

Propositional and Predicate Logic

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Math 3336: Discrete Mathematics Practice Problems for Exam I

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Introduction to Metalogic

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

York University. Faculty of Science and Engineering MATH 1090, Section M Final Examination, April NAME (print, in ink): Instructions, remarks:

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

1.1 Language and Logic

Propositional Logic: Models and Proofs

CSE 20: Discrete Mathematics

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

Math 3320 Foundations of Mathematics

ICS141: Discrete Mathematics for Computer Science I

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

Transcription:

Chapter 2 Logical Notation Bahar Aameri Department of Computer Science University of Toronto Jan 16, 2015 Mathematical Expression and Reasoning 1

Announcements Assignment 1: Assignment 1 will be posted by Saturday. Due date: Jan 30, before midnight on MarkUs. You won t be able to log into MarkUs and submit the assignment before Jan 24. Assignments may be submitted in groups of up to two students. You may choose your group-mate from students in the other section. Submissions must be typed. LATEX is strongly recommended. Some usefule resources and links for LATEX will be posted on the web page. Recommendation: work on all questions individually! Then discuss your answers with your group-mate and prepare the final submission together. Mathematical Expression and Reasoning 2

Today s Topics Review: Implication, Contrapositive, Converse More symbols: Equivalence Logical Grammar Mathematical Expression and Reasoning 3

Review: Implication Implication An implication is a sentence that joins two other sentences and claims that if the first part is true then the second part is also true. P Q: P implies Q, where P and Q are logical sentences. Example Implication Symbol:. if an employee is male, then he makes less than $55,000. x E, M(x) L(x) Mathematical Expression and Reasoning 4

Review: Evaluating Implication Important: P Q is equivalent to P Q P Q is True if P is True or Q is True. P Q is False if P is False and Q is False. Evaluating Implication To prove, verify that at least one of P and Q is True. To disprove, show that both P and Q are False. Mathematical Expression and Reasoning 5

Review: Contrapositive and Converse Contrapositive of an Implication The contrapositive of an implication P Q is: Q P an employee is female that employee makes less than $55,000 Contrapositive: an employee doesn t make less than $55,000 that employee is not female. Converse of an Implication The Converse of an implication P Q is: Q P an employee is female that employee makes less than $55,000. Converse: an employee make less than $55,000 that employee is female. Mathematical Expression and Reasoning 6

Vacuous Truth Assume for all elements x in a domain U, T (x) is False, i.e. x U, T (x). Evaluate the following claim: S 1 : x U, T (x) R(x). S 1 : is True, because T (x) R(x) is equivalent to T (x) R(x). T (x) is True for all x U. S 1 is vacuously true. Vacuously True Statements A statement is vacuously true if it specifies some properties for all members of an empty set! Mathematical Expression and Reasoning 7

Vacuous Truth Vacuously True Statements A statement is vacuously true if it specifies some properties for all members of an empty set! Exercise #1 Evaluate the following claims: 1 x N, (x < 0) (x > x + 1). 2 x R, (x 2 + 1 = 0) (x = 1). (R is the set of real numbers) Mathematical Expression and Reasoning 8

Vacuous Truth Vacuously True Statements A statement is vacuously true if it specifies some properties for all members of an empty set! Exercise #1: solution Evaluate the following claims: 1 x N, (x < 0) (x > x + 1). Vacuously true, all numbers in N are greater than or equal to 0. 2 x R, (x 2 + 1 = 0) (x = 1). Vacuously true, there is no number in R that satisfies x 2 + 1 = 0. Mathematical Expression and Reasoning 9

Chapter 2 Logical Notation Equivalence Mathematical Expression and Reasoning 10

Equivalence Equivalence An equivalence is a sentence that joins two other sentences and claims that the first part is true exactly when the second part is true. x 2 + 4x + 4 = 0 exactly when x = 2. Equivalence Symbol:. Equivalence in logical notation: P Q, where P and Q are logical sentences. x R, (x 2 + 4x + 4 = 0) (x = 2). Mathematical Expression and Reasoning 11

Equivalence Example Employee Gender Salary Al male $60,000 Betty female $500 Carlos male $40,000 Doug male $30,000 Ellen female $15,000 Flo female $20,000 E: the set of all employees. M(x): x is male. L(x): x earns between $25,000 and $65,000. Every male employee earns between $25,000 and $65,000. x E, M(x) L(x) Every employee earning between $25,000 and $65,000 is male. x E, L(x) M(x) In this domain, The employee is male is equivalent to the employee earns between $25,000 and $65,000. x E, M(x) L(x) Mathematical Expression and Reasoning 12

Equivalence Important Notes about Equivalence An equivalence P Q can be written as the conjunction of two implications (we will verify this shortly): (P Q) (Q P ) Other ways of expressing equivalence in English: P Q, and conversely. P iff Q (iff is an abbreviation for if and only if). P is necessary and sufficient for Q. sufficient: P Q. necessary: P Q. Mathematical Expression and Reasoning 13

Evaluating Equivalence P Q is True if both P and Q are True or both P and Q are False. P Q is False if P is True and Q is False or P is False and Q is True. Evaluating Equivalence To prove, verify that the boolean values of P and Q are equal. To disprove, show that the boolean values of P and Q are not equal. Mathematical Expression and Reasoning 14

Chapter 2 Logical Notation Logical Grammar Mathematical Expression and Reasoning 15

Why do we need a grammar? There are seven different logical symbols:,,,,,, Combinations of these symbols can form very complex statements. To write unambitious statements we need to impose conditions on what expressions are allowed. In other words, we need a grammar. Important Notes Grammatic (syntactic) correctness has nothing to do with logical correctness: a syntacticly correct sentence might be True or False. A syntacticly correct sentence might be open or closed. Mathematical Expression and Reasoning 16

Well-Formed Formulas A grammatically correct sentence is called a Well-Formed Formula (wff) Any predicate is a wff. If P is a wff, so is P. If P and Q are wffs, so is (P Q). If P and Q are wffs, so is (P Q). If P and Q are wffs, so is (P Q). If P and Q are wffs, so is (P Q). If P is a wff (possibly open in variable x) and D is a set, then ( x D, P ) is a wff. If P is a wff (possibly open in variable x) and D is a set, then ( x D, P ) is a wff. Nothing else is a wff. Mathematical Expression and Reasoning 17

Well-Formed Formulas Any predicate is a wff. The base rule. If P is a wff, so is P. If P and Q are wffs, so is (P Q). If P and Q are wffs, so is (P Q). If P and Q are wffs, so is (P Q). If P and Q are wffs, so is (P Q). If P is a wff and D is a set, then ( x D, P ) is a wff. If P is a wff and D is a set, then ( x D, P ) is a wff. Nothing else is a wff. The closure rule. Mathematical Expression and Reasoning 18

Order of Precedence for Logical Symbols Just like in arithmetic, we want to avoid writing expressions with many parentheses; too many parentheses make a sentence hard to read: ( x D, ( (P (x) ( Q(x))) R(x) )) Precedence Rules Precedence decreases from top to bottom: 1 2 3 4 5 6 7 x D, P (x) Q(x) R(x) Mathematical Expression and Reasoning 19

Logical Grammar Order of Precedence: (1), (2), (3), (4), (5), (6), (7) Exercise #2: Remove as many parentheses as possible: 1 ( x D, P (x) ( ( Q(x)) R(x))). 2 (( x D, P (x) ) ( ( Q(x)) R(x))). Mathematical Expression and Reasoning 20

Logical Grammar Order of Precedence: (1), (2), (3), (4), (5), (6), (7) Exercise #2: solution Remove as many parentheses as possible: 1 ( x D, P (x) ( ( Q(x)) R(x))). x D, P (x) ( Q(x) R(x)). 2 (( x D, P (x) ) ( ( Q(x)) R(x))). ( x D, P (x) ) ( Q(x) R(x)). Mathematical Expression and Reasoning 21

Logical Grammar Exercise #3: Are the following sentences wff? 1 R( x E, y). 2 x E, y E. 3 x E y E. 4 R(x, y). 5 x E, R(x), S(x). 6 x U, y E, z U, R(x, y) S(x, z). Mathematical Expression and Reasoning 22

Logical Grammar Exercise #3: solution Are the following sentences wff? 1 R( x E, y). No 2 x E, y E. No 3 x E y E. No 4 R(x, y). Yes 5 x E, R(x), S(x). No 6 x U, y E, z U, R(x, y) S(x, z). Yes Mathematical Expression and Reasoning 23