Agenda. Propositional Logic. Atomic propositions. References. Truth values. Examples of atomic propositions

Similar documents
CSC Discrete Math I, Spring Propositional Logic

1.3 Propositional Equivalences

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

CSE 311 Lecture 02: Logic, Equivalence, and Circuits. Emina Torlak and Kevin Zatloukal

Consider the following propositions: p: lecture has started q: If I have a banana, then I have a pear r: I finished this problem

The Logic of Compound Statements. CSE 2353 Discrete Computational Structures Spring 2018

Part Two: The Basic Components of the SOFL Specification Language

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

Propositional Equivalence

Sets of Real Numbers

THE LOGIC OF COMPOUND STATEMENTS

Propositional natural deduction

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

CSE 20: Discrete Mathematics

Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017

Topic 1: Propositional logic

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Why Proofs? Proof Techniques. Theorems. Other True Things. Proper Proof Technique. How To Construct A Proof. By Chuck Cusack

2. PROPOSITIONAL LOGIC

EECS 1028 M: Discrete Mathematics for Engineers

1 Propositional Logic

2.2: Logical Equivalence: The Laws of Logic

UNIT-I: Propositional Logic

Truth-Functional Logic

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Distributed Rule-Based Inference in the Presence of Redundant Information

Compound Propositions

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

Section 1.1: Logical Form and Logical Equivalence

CS 173 Lecture 2: Propositional Logic

Introduction to Sets and Logic (MATH 1190)

Propositional logic ( ): Review from Mat 1348

Foundations of Computation

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Tautologies, Contradictions, and Contingencies

Math.3336: Discrete Mathematics. Propositional Equivalences

LECTURE # 3 Laws of Logic

PHIL12A Section answers, 16 February 2011

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Chapter 4, Logic using Propositional Calculus Handout

CITS2211 Discrete Structures. Propositional Logic

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

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

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

PROPOSITIONAL CALCULUS

CISC-102 Winter 2016 Lecture 17

3 The Semantics of the Propositional Calculus

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Chapter 1, Section 1.1 Propositional Logic

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

3 Rules of Inferential Logic

Rational Expressions. Definition: P, is an algebraic expression that can be written as the quotient of two polynomials, P. A rational expression, Q

1.1 Statements and Compound Statements

ICS141: Discrete Mathematics for Computer Science I

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

15414/614 Optional Lecture 1: Propositional Logic

Logic: Propositional Logic (Part I)

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

Symbolic Logic Outline

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

COS 140: Foundations of Computer Science

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

MATH 2710: NOTES FOR ANALYSIS

Mathematics for linguists

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

PUZZLE. You meet A, B, and C in the land of knights and knaves. A says Either B and I are both knights or we are both knaves.

Discrete Mathematics and Its Applications

Propositional Calculus. Problems. Propositional Calculus 3&4. 1&2 Propositional Calculus. Johnson will leave the cabinet, and we ll lose the election.

CSC165 Mathematical Expression and Reasoning for Computer Science

A brief introduction to Logic. (slides from

A CONCRETE EXAMPLE OF PRIME BEHAVIOR IN QUADRATIC FIELDS. 1. Abstract

The Logic of Compound Statements cont.

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

CHAPTER 11. Introduction to Intuitionistic Logic

PL: Truth Trees. Handout Truth Trees: The Setup

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

An Introduction to Classical Propositional Logic: Syntax, Semantics, Sequents

software design & management Gachon University Chulyun Kim

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

A Little Deductive Logic

The statement calculus and logic

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

Comp487/587 - Boolean Formulas

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Computation and Logic Definitions

COMP 2600: Formal Methods for Software Engineeing

ABSTRACT MODEL REPAIR

ABSTRACT MODEL REPAIR

Announcements CompSci 102 Discrete Math for Computer Science

Mathematical Reasoning (Part I) 1

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

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

Boolean Algebra. Philipp Koehn. 9 September 2016

Logic and Propositional Calculus

Propositional Logic. Spring Propositional Logic Spring / 32

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

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

Boolean Logic. CS 231 Dianna Xu

Equivalence and Implication

Transcription:

Proositional Logic Andrew Simson Revised by David Lightfoot Agenda Atomic roositions Logical oerators Truth tables Precedence Tautologies, contradictions and contingencies Euational reasoning 1 2 References Atomic roositions Discrete Mathematics by Examle, Andrew Simson, McGraw Hill, 2002 Formal Secification Using Z, David Lightfoot, Palgrave, 2000 Using Z: Secification, Refinement, Proof, Jim Woodcock and Jim Davies, Prentice Hall, 1996 htt://www.usingz.com/ Often in life we encounter statements which may either be or In discrete mathematics, we refer to such statements as roositions The truth value associated with a roosition may always be or, or it may change according to circumstances Proositions whose truth or falsity may be determined without recourse to other information are referred to as atomic roositions 3 4 Examles of atomic roositions Truth values Tuesday is the day before Wednesday Today is Tuesday Rick is a vegetarian It is raining Becky likes biscuits There is nothing on the television George Boole, hence Boolean algebra Every atomic roosition may be associated with a truth value In our treatment of roositional logic, there are two ossible truth values which may be associated with a roosition: and For examle, the statement Wednesday is the day after Tuesday has the associated truth value, whereas Aril is the month immediately before June is 5 6

Combining roositions Determine whether each of the following statements is or : 0 < 1 1 + 1 = 2 1 * 1 = 2 Atomic roositions, together with the truth values and are the building blocks of roositional logic Just as numbers can be combined via addition or multilication, so roositions can be combined via a variety of roositional oerators ( logical oerators ) 7 8 Negation Examles of negation Given any roosition, we may talk about its negation, denoted (ronounced not ) Here, is also a roosition If the truth value associated with is then the truth value associated with its negation,, is If the truth value associated with is then the truth value associated with its negation,, is (Avoid calling negation oosite ) Given the roosition t, which reresents the statement Today is Tuesday, the roosition t is euivalent to the statement Today is not Tuesday Given the roosition r, which reresents the statement Rick is a vegetarian, the roosition r is euivalent to the statement Rick is not a vegetarian 9 10 Truth tables State the negation of each of the following roositions: It is snowing Jon likes Ali x is greater than y Truth tables rovide us with a means of reresenting the truth or falsity of logical statements The values of all atomic roositions contained in the roosition are enumerated and the truth value of the overall roosition can thus be calculated 11 12

Truth table for negation Conjunction The conjunction ( and ) oerator works by taking two roositions and returning if both roositions are and returning otherwise Given two roositions and, the conjunction of and (or conjoined with ) is written (and ronounced and ) ( looks like A in And ) 13 14 Examle of conjunction The conjunction of Rick is a vegetarian, which is denoted by r, and Rick eats chocolate, denoted by c, is written r c Calculate the truth values of the following roositions: (1 < 0) (2 < 1) (0 < 1) (2 < 1) (0 < 1) (1 < 2) 15 16 Truth table for conjunction Disjunction The disjunction ( or ) oerator works by taking two roositions, and returning if at least one of them is euivalent to,and returning otherwise Given two roositions and, the disjunction of and ( disjoined with ) is written (and ronounced or ) ( does not look like A in And ) 17 18

Examle The disjunction of Rick is a vegetarian, which is denoted by r, and Rick likes chocolate, denoted by c, is written r c Calculate the truth values of the following roositions: (1 < 0) (2 < 1) (0 < 1) (2 < 1) (0 < 1) (1 < 2) (x 2) (x 6) 19 20 Truth table for disjunction Imlication Imlication is the third logical oerator, and, for most eole the least intuitive and most difficult to understand The imlication oerator is written and the roosition is ronounced imlies 21 22 Motivation The statement if it rains this afternoon, then Duncan will stay in may be reresented as r s If we think of this statement as if it were a contract, there is only one circumstance under which the contract has been broken: if it did rain this afternoon and Duncan failed to stay in If it did rain and Duncan stayed in, then the contract was not broken Furthermore, if it failed to rain, then it should not worry us too much what Duncan did with his afternoon, as this is outside the boundaries of the contract As such, r s should only logically be euivalent to (that is, the contract is only broken) if r is and s is Determine the truth or falsity of the following statements: If Marilyn Monroe was a man then elehants can fly If 1 + 1 = 2 then Madrid is the caital of Sain If Marilyn Monroe was a man then 1 + 1 = 2 If Madrid is the caital of Sain then elehants can fly 23 24

Truth table for imlication Euivalence The euivalence oerator works by taking two roositions and returning if the truth values of the two roositions are the same and returning otherwise Give two roositions and, if and only if is written 25 26 Truth table for euivalence Determine the truth or falsity of the following statements: Marilyn Monroe was a man if, and only if, elehants can fly 1 + 1 = 2 if, and only if, Madrid is the caital of Sain Marilyn Monroe was a man if, and only if, 1 + 1 = 2 Madrid is the caital of Sain if, and only if, elehants can fly 27 28 Logical euivalences Some imortant laws 1 The notion of euivalence allows us to identify a number of laws of roositional logic Tyically, these laws state that one roosition is logically euivalent to another Such laws allow us to relace one roosition by a logically euivalent one in any roosition For any roositions and : Commutativity Idemotence Associativity ( r) ( ) r ( r) ( ) r De Morgan s laws ( ) ( ) ( ) ( ) ( ) ( ) Excluded middle Distributativity ( r) ( ) ( r) ( r) ( ) ( r) 29 30

Some imortant laws 2 Precedence For any roositions and : ( ) ( ) elimination of imlication ( ) ( ) and ( ) As we have seen, arentheses ( ) can be used to remove ambiguity from the meaning of a roosition: for examle ( ) has a very different meaning from ( ) Sometimes, esecially if we are dealing with a long roosition, using arentheses in this way can be rather cumbersome T overcome these roblems, we assign an order of recedence to our oerators: has highest riority (and therefore binds tightest), followed by, then, then, then, which has lowest riority and so binds loosest Thus if we were to write, this would have the same meaning as ( ) Furthermore, r means ( ) r, NOT ( r ) 31 32 Tautology Write the fully arenthesised version of each of the following roositions: r r r s A roosition that is always is called tautology Examles: ( ) ( ) ( ) ( ) 33 34 Contradictions and contingencies Establishing tautologies A roosition that is always is called contradiction If a roosition is neither a tautology nor a contradiction then it is called a contingency An easy way to determine whether or not a roosition is a tautology is to substitute truth values for the atomic roositions. For examle, given the roosition, if we substitute for, then the overall roosition is euivalent to and if we substitute for then the overall roosition is euivalent to Therefore we conclude that is a tautology On the other hand, if the atomic roosition takes that value in the roosition ( ), the value of is immaterial: under such circumstances, this roosition is euivalent to 35 36

Drawbacks Which of the following roositions are tautologies? ( ) ( ) ( ) ( ) ( ) ( ) Unfortunately, this method only works for relatively simle roositions More general ways of establishing whether or not a roosition is a tautology are via truth tables, via deduction, or via euational reasoning 37 38 Using truth tables Exercise ( ) Give the truth table for ( ) ( ) 39 40 Solution Drawbacks of truth tables ( ) ( ) The size of a truth table for a roosition is related to the number of atomic roositions contained in that roosition A realistic uer limit for constructing truth tables by hand is three atomic roosition We need a more general techniue 41 42

Euational reasoning Examles of euational reasoning We may determine the truth or falsity of roositions by substituting one logically euivalent roosition for another When conduction this rocess we must, at each stage, aly one of the laws of roositional logic If we are strict about alying them, we have a formal rocess, called euational reasoning At each stage we substitute a logically euivalent roosition for the former roosition; this substitution is justified by the alication of one of the laws of roositional logic ( ) ( ) by elimination of imlication ( ) by de Morgan s law by associativity of disjunction by idemotency of disjunction 43 44 Summary Atomic roositions Logical values:, Logical oerators:,,,, Truth tables Precedence Tautologies, contradictions and contingencies Euational reasoning 45