Propositional Logic. Spring Propositional Logic Spring / 32

Similar documents
Propositional Logic. Fall () Propositional Logic Fall / 30

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

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

CSC Discrete Math I, Spring Propositional Logic

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

The Logic of Compound Statements cont.

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

PROPOSITIONAL CALCULUS

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

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

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

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.

Compound Propositions

2.2: Logical Equivalence: The Laws of Logic

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

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

1.1 Statements and Compound Statements

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

Logic and Proofs. (A brief summary)

THE LOGIC OF COMPOUND STATEMENTS

Section 1.2: Propositional Logic

Packet #1: Logic & Proofs. Applied Discrete Mathematics

A. Propositional Logic

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

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

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

Propositional Equivalence

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

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

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

Chapter 1 Elementary Logic

3 The Semantics of the Propositional Calculus

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Mat 243 Exam 1 Review

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

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

Language of Propositional Logic

HANDOUT AND SET THEORY. Ariyadi Wijaya

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

ICS141: Discrete Mathematics for Computer Science I

Chapter 1, Section 1.1 Propositional Logic

Logic. Propositional Logic: Syntax

software design & management Gachon University Chulyun Kim

Equivalence and Implication

Manual of Logical Style

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

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

Advanced Topics in LP and FP

Logic and Proofs. (A brief summary)

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

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

A Little Deductive Logic

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

1 The Foundation: Logic and Proofs

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

Learning Goals of CS245 Logic and Computation

Logic and Proof. Aiichiro Nakano

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

Truth-Functional Logic

Definition 2. Conjunction of p and q

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Logic, Sets, 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.

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

1 The Foundation: Logic and Proofs

Introduction to Decision Sciences Lecture 2

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

A Little Deductive Logic

1.1 Language and Logic

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

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

EECS 1028 M: Discrete Mathematics for Engineers

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

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Math.3336: Discrete Mathematics. Propositional Equivalences

Boolean Logic. CS 231 Dianna Xu

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

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

EECS 1028 M: Discrete Mathematics for Engineers

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

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

Intro to Logic and Proofs

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

The statement calculus and logic

Propositional logic ( ): Review from Mat 1348

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logic: Propositional Logic (Part I)

Chapter 4, Logic using Propositional Calculus Handout

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

15414/614 Optional Lecture 1: Propositional Logic

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

CSE 20 DISCRETE MATH. Winter

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

First-Degree Entailment

Propositional natural deduction

DISCRETE MATHEMATICS BA202

Transcription:

Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32

Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements of propositional logic: statements and operations, including implication, and its converse, inverse, and negation. Translate English expressions into logical statements. Use both truth tables and derivations to demonstrate equivalence of logical statements. Define common tautologies, contradictions, and equivalences. Recognize and employ modus ponens and modus tollens and other forms of valid argumentation. Propositional Logic Spring 2016 2 / 32

Introduction Learning Outcomes for this Presentation It s difficult, and possibly counterproductive, to provide a concise description of logic... What is logic? Why is it important? How will we use it in this class? Propositional Logic Spring 2016 3 / 32

Introduction Learning Outcomes for this Presentation It s difficult, and possibly counterproductive, to provide a concise description of logic... What is logic? A formal system for expressing truth and falsity. Why is it important? How will we use it in this class? Propositional Logic Spring 2016 3 / 32

Introduction Learning Outcomes for this Presentation It s difficult, and possibly counterproductive, to provide a concise description of logic... What is logic? A formal system for expressing truth and falsity. Why is it important? Provides a method of reasoning from given truths (called axioms) to new truths (called propositions or theorems). How will we use it in this class? Propositional Logic Spring 2016 3 / 32

Introduction Learning Outcomes for this Presentation It s difficult, and possibly counterproductive, to provide a concise description of logic... What is logic? A formal system for expressing truth and falsity. Why is it important? Provides a method of reasoning from given truths (called axioms) to new truths (called propositions or theorems). How will we use it in this class? Logic is the skeleton that supports mathematical truth-making, i.e., proof-reading and proof-writing. Propositional Logic Spring 2016 3 / 32

Introduction Learning Outcomes for this Presentation It s difficult, and possibly counterproductive, to provide a concise description of logic... What is logic? A formal system for expressing truth and falsity. Why is it important? Provides a method of reasoning from given truths (called axioms) to new truths (called propositions or theorems). How will we use it in this class? Logic is the skeleton that supports mathematical truth-making, i.e., proof-reading and proof-writing. Logic is the glue that holds computers and programs together. Propositional Logic Spring 2016 3 / 32

Definitions Statements Propositional statements Definition A statement is a declaration in a language that is either true or false. Example It is raining is an atomic statement, as is The sun in shining. Two compound statements can for formed from these: (1) It is raining or the sun is shining ; and (2) It is raining and the sun is shining. Propositional Logic Spring 2016 4 / 32

Definitions Logical connectives Making new statements by connecting propositions Three fundamental operators are adequate to create the spectrum of logical possibilities. Operator And (conjunction) Or (disjunction) Negation Description Written s t: true when s and t are true. Written s t: true when s or t are true. Written s (or sometimes s): true only when s is false, and vice versa. Keep in mind that s and t may be atomic or compound propositions themselves! Propositional Logic Spring 2016 5 / 32

Definitions Logical connectives Truth tables... The meaning of a logical operation can be expressed as its truth table. Construct the truth-table for conjunction: Construct the truth-table for disjunction; Construct the truth-table for negation. Do in class Propositional Logic Spring 2016 6 / 32

Definitions Interpretations, contexts,... Truth, falsity, and interpretations Example The truth or falsity of any statement depends upon its context. Context can be visualized as the values that are associated with each variable in a statement. Is a b true? Well, if either a = true or b = true, then the statement a b is true. Ask now if a b is true, and you will see that it is true, but under fewer interpretations or, its context is different. Propositional Logic Spring 2016 7 / 32

Definitions Logically equivalent statements Logical equivalences How could we show if two logical statements are equivalent? Construct truth tables for each. We will demonstrate other methods shortly but these methods depend upon the truth tables of the underlying operations. Propositional Logic Spring 2016 8 / 32

Definitions Logically equivalent statements A worked example Example Let s be The sun is shining and t be It is raining. Join these into the compound statement: ( s t) t. 1 Try to phrase the compound statement in English: 2 Construct the truth table for ( s t) t Example to be done in class. Propositional Logic Spring 2016 9 / 32

Definitions Logically equivalent statements Using a truth table to illustrate a common usage... The word or is often used to mean one or the other, but this is not the same meaning of or in logic! Definition The exclusive-or of two statements p and q (written p q), is true only when either p is true or q is true, but not both. Use instead: (p q) (p q) p q and (p q) (q p) p q Show in class Propositional Logic Spring 2016 10 / 32

Definitions Logically equivalent statements De Morgan s laws... A well-known and often-used pair of laws based upon the distributive and the negation properties from your text: Definition De Morgan s Laws state that for any statements p and q: (p q) p q (p q) p q. and De Morgan s laws simplify computer programs. De Morgan s laws simplify circuit designs. Propositional Logic Spring 2016 11 / 32

Definitions Logically equivalent statements Because it s that important! How do we know that DeMorgan s laws (or any laws) are valid? Thought experiment: Apart from the truth table just constructed, can you think of any other mathematically sound way to prove or show that De Morgan s laws are always valid? Propositional Logic Spring 2016 12 / 32

Definitions Logically equivalent statements Because it s that important! How do we know that DeMorgan s laws (or any laws) are valid? Construct the truth-tables and verify on your own! Thought experiment: Apart from the truth table just constructed, can you think of any other mathematically sound way to prove or show that De Morgan s laws are always valid? Propositional Logic Spring 2016 12 / 32

Logical implication Introducing logical implication Example Arguably, logical implication is the most useful operator in predicate logic. Logical implication is expressible using only two of the operators introduced in the last slide. Implication captures the notion of an action depending upon the success (or failure) of another action. Unlike primitive connectors, implication is directional! If it rains, then Richard brings an umbrella. We would like a way of assigning truth or falsity to these kinds of statements. Propositional Logic Spring 2016 13 / 32

Logical implication Implication, cont d. Examine the truth table for the implication a b: a b a b T T T F T T T F F F F T Note two important qualities of implication: 1 We see only one case where the implication is false. 2 Compare rows 2 and 3: implication is sensitive to direction!. Propositional Logic Spring 2016 14 / 32

Logical implication Implications of implication... Everything to the left of the implication symbol is called either the antecedent, or the hypothesis. Everything to the right of the implication symbol is called the consequent, or the conclusion, Propositional Logic Spring 2016 15 / 32

Logical implication Implications of implication... Everything to the left of the implication symbol is called either the antecedent, or the hypothesis. Everything to the right of the implication symbol is called the consequent, or the conclusion, Unlike in common speech, no relationship need exist between the hypothesis and the conclusion. 1 If the sky is blue then 5 is prime 2 If the moon is made of cheese, then then 5 is prime. and, 3 If the moon is made of cheese, then 5 is not prime. Propositional Logic Spring 2016 15 / 32

Logical implication Trying on a few implications... See how well you do with these: Identify the hypotheses and the conclusions. State under which circumstances these implications are true and under which they are false: 1 If oxygen is present, then rust will form. 2 Only if I study hard will I pass this course. (Read this as p, only if q.) 3 If f (x) = f (y) then x = y. 4 If x y then f (x) f (y). Propositional Logic Spring 2016 16 / 32

Logical implication Variations on implication Some important variations of implications We will consider the following variations of implication: Define the negation of an implication: Define the converse of an implication. Define the inverse of an implication. Define the contrapositive. Example We will use this statement for all of our examples: If I live in College Park, then I live in Maryland. Propositional Logic Spring 2016 17 / 32

Logical implication Variations on implication Negating an implication Definition The negation of an implication p q is obtained by negating it. Example Given p q, its negation is p q. The negation of an implication is not another implication. Show this now. Propositional Logic Spring 2016 18 / 32

Logical implication Variations on implication The converse of an implication Definition The converse of an implication is obtained by transposing its conclusion with its premise. Example Given p q, its converse is q p. Propositional Logic Spring 2016 19 / 32

Logical implication Variations on implication The inverse of an implication Definition The inverse of an implication is obtained by negating both its premise and its conclusion. Example Given p q, its inverse is ( p) ( q). (Parentheses added for emphasis.) Propositional Logic Spring 2016 20 / 32

Logical implication Variations on implication The Contrapositive form of an implication Definition The contrapositive is formed by inverting its converse. Given p q, form its contrapositive as q p. Do in class Propositional Logic Spring 2016 21 / 32

Bidirectional implication Bidirectional implication Definition The biconditional statement is an implication that is true only when its antecedent and its consequent have the same truth values; it is false otherwise. In symbols, p q is true only when p q and q p. p q p q T T T T F F F T F F F T Propositional Logic Spring 2016 22 / 32

Bidirectional implication Experimenting with bi-conditionals... The bi-conditional, arguably, corresponds to the common use of the word if in English sentences. The bi-conditional sometimes appears in scientific or technical text as iff or as a necessary and sufficient condition. What do the converse, inverse, and negations of a bi-conditional look like? What is the relationship between the exclusive-or (discussed above) and the bi-conditional? Propositional Logic Spring 2016 23 / 32

Valid and Invalid Arguments Definition Validity, as a matter of form. Definition An argument is a sequence of statements terminating with a conclusion. Validity is based upon formal properties, not content. Mastery of logical argumentation translates into a deeper understanding of, and facility for, constructing mathematical proof. Propositional Logic Spring 2016 24 / 32

Forms of Argumentation Truth in logic... What does it mean for the logical statements that interest this class to be true? Example If the sum the digits of a number is divisible by 3, then the number itself is divisible by 3. For the moment: we will restrict our attention to propositional logic. We have a method for determining the truth of these kinds of propositional statements. Propositional Logic Spring 2016 25 / 32

Forms of Argumentation Truth in logic... Example What does it mean for the logical statements that interest this class to be true? They commonly appear as a set of assumptions (hypotheses) and a conclusion that we wish to show follows from these. If the sum the digits of a number is divisible by 3, then the number itself is divisible by 3. For the moment: we will restrict our attention to propositional logic. We have a method for determining the truth of these kinds of propositional statements. Propositional Logic Spring 2016 25 / 32

Forms of Argumentation A complete example Valid Statement : If p q, p r, and q r then p. p q r p q p r q r p T T T T T T T T T F T T F T T F T T T T T T F F T T T T F T T T F T F F T F T T F F F F T F F T F F F F F T T F Propositional Logic Spring 2016 26 / 32

Forms of Argumentation Slightly modified... Invalid Statement : If p q, p r, and q r then r. p q r p q p r q r r T T T T T T T T T F T T F F T F T T T T T T F F T T T F F T T T F T T F T F T T F F F F T F F T T F F F F T T F Propositional Logic Spring 2016 27 / 32

Forms of Argumentation Common forms of argument Proofs: Using inference... Here are some common patterns from your text: Modus ponens (To prove by asserting.) p q, p. q p q, q Modus tollens (To prove by denying.). p p q, q p q, p Disjunctive syllogism ; likewise. p q Rule of contradiction Let c be a contradiction: p c. p The remaining rules can be derived by systematically applying the rules above with the basic properties of a boolean algebra, i.e., associativity, commutativity, idempotence, etc. Propositional Logic Spring 2016 28 / 32

Forms of Argumentation Common forms of argument General Laws of Propositional Statements Given any statement variables p, q, and r, a tautology t and a contradiction c, the following logical equivalences hold: 1. Commutative laws: p q q p p q q p 2. Associative laws: (p q) r p (q r) (p q) r p (q r) 3. Distributive laws: p (q r) (p q) (p r) p (q r) (p q) (p r) 4. Identity laws: p t p p c p 5. Negation laws: p p t p p c 6. Double Negative law: ( p) p 7. Idempotent laws: p p p p p p 8. DeMorgan s laws: (p q) p q (p q) p q 9. Universal bounds laws: p t t p c c 10. Absorption laws: p (p q) p p (p q) p 11. Negations of t and c: t c c t Propositional Logic Spring 2016 29 / 32

Forms of Argumentation Common forms of argument Common forms of argumentation Modus Ponens Modus Tollens Disjunctive p q p q p q p q Syllogism q p p q Therefore p Therefore q Therefore q Therefore p Conjunctive p Hypothetical p q Addition q Syllogism q r Therefore p q Therefore p r Disjunctive p q Dilemma: p q Addition Therefore p q Therefore p q Proof by p r Division q r into Cases Therefore r Conjunctive p q p q Rule of p c Simplification Therefore p Therefore q Contradiction Therefore p Closing C.W. p Assumed Closing C.W. p Assumed without q derived with x x derived contradiction Therefore p q contradiction Therefore p Propositional Logic Spring 2016 30 / 32

Summary & Moving Forward Reviewing & moving forward Statements may be atomic or compound. Their syntax is unambiguous. Propositional Logic Spring 2016 31 / 32

Summary & Moving Forward Reviewing & moving forward Statements may be atomic or compound. Their syntax is unambiguous. Statements are combined by logical operators: three primitive operators are negation, disjunction, and conjunction. Propositional Logic Spring 2016 31 / 32

Summary & Moving Forward Reviewing & moving forward Statements may be atomic or compound. Their syntax is unambiguous. Statements are combined by logical operators: three primitive operators are negation, disjunction, and conjunction. These operators have certain properties: they are commutative, associative,..., directionless. Propositional Logic Spring 2016 31 / 32

Summary & Moving Forward Reviewing & moving forward Statements may be atomic or compound. Their syntax is unambiguous. Statements are combined by logical operators: three primitive operators are negation, disjunction, and conjunction. These operators have certain properties: they are commutative, associative,..., directionless. Logical implication is constructed. Unlike its components, implications have direction. Propositional Logic Spring 2016 31 / 32

Summary & Moving Forward Reviewing & moving forward Statements may be atomic or compound. Their syntax is unambiguous. Statements are combined by logical operators: three primitive operators are negation, disjunction, and conjunction. These operators have certain properties: they are commutative, associative,..., directionless. Logical implication is constructed. Unlike its components, implications have direction. Arguments are patterns of reasoning that incorporate these operators over a particular domain of discourse, e.g., numbers, objects, etc. Propositional Logic Spring 2016 31 / 32

Summary & Moving Forward Reviewing & moving forward Statements may be atomic or compound. Their syntax is unambiguous. Statements are combined by logical operators: three primitive operators are negation, disjunction, and conjunction. These operators have certain properties: they are commutative, associative,..., directionless. Logical implication is constructed. Unlike its components, implications have direction. Arguments are patterns of reasoning that incorporate these operators over a particular domain of discourse, e.g., numbers, objects, etc. Most importantly: truth is formal in these sytems. Propositional Logic Spring 2016 31 / 32

Summary & Moving Forward Applications of logic Logic is everywhere. Shortly, we will examine how logic is used in several areas relevant to computer science. Logical primitives & switching circuits. Logical statements & sequential circuits. Later in this semester, perhaps Logical constructions in combinatorial circuits. Propositional Logic Spring 2016 32 / 32