Propositional Logic. Fall () Propositional Logic Fall / 30

Similar documents
Propositional Logic. Spring Propositional Logic Spring / 32

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)

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CSC Discrete Math I, Spring Propositional Logic

Compound Propositions

A Little Deductive Logic

A Little Deductive Logic

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

PROPOSITIONAL CALCULUS

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

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

15414/614 Optional Lecture 1: Propositional Logic

The Logic of Compound Statements cont.

3 The Semantics of the Propositional Calculus

Advanced Topics in LP and FP

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

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.

1.1 Statements and Compound Statements

THE LOGIC OF COMPOUND STATEMENTS

Section 1.1: Logical Form and Logical Equivalence

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

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

Chapter 1 Elementary Logic

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

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

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.

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Mat 243 Exam 1 Review

Proving simple set properties...

2.2: Logical Equivalence: The Laws of Logic

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

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

Logic. Propositional Logic: Syntax

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

Where are my glasses?

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

HANDOUT AND SET THEORY. Ariyadi Wijaya

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

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

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

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

Manual of Logical Style

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

AMTH140 Lecture 8. Symbolic Logic

CITS2211 Discrete Structures Proofs

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Logic (3A) Young W. Lim 11/2/13

Logic, Sets, and Proofs

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

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Lecture 11: Measuring the Complexity of Proofs

Logic (3A) Young W. Lim 10/31/13

Mathematical Logic Part One

4 Derivations in the Propositional Calculus

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:

Logic for Computer Science - Week 4 Natural Deduction

Truth-Functional Logic

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

The statement calculus and logic

PS10.3 Logical implications

Proof Worksheet 2, Math 187 Fall 2017 (with solutions)

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

PHIL 50 - Introduction to Logic

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

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

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Section 1.2: Propositional Logic

Glossary of Logical Terms

Formal Logic. Critical Thinking

Propositional logic ( ): Review from Mat 1348

(p == train arrives late) (q == there are taxis) (r == If p and not q, then r. Not r. p. Therefore, q. Propositional Logic

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

A Guide to Proof-Writing

Mathematical Logic Part One

Natural deduction for truth-functional logic

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

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

Propositional Logic Review

Deductive Systems. Lecture - 3

A. Propositional Logic

Manual of Logical Style (fresh version 2018)

Logic. Propositional Logic: Syntax. Wffs

In this chapter, we specify a deductive apparatus for PL.

Propositional Equivalence

Formal (natural) deduction in propositional logic

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

Supplementary Logic Notes CSE 321 Winter 2009

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

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

Notes on Inference and Deduction

Lecture 7. Logic. Section1: Statement Logic.

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Transcription:

Propositional Logic Fall 2013 () Propositional Logic Fall 2013 1 / 30

1 Introduction Learning Outcomes for this Presentation 2 Definitions Statements Logical connectives Interpretations, contexts,... Logically equivalent statements Exclusive versus Inclusive Ors and Equivalence De Morgan s Laws... 3 Logical implication Variations on implication 4 Bidirectional implication 5 Validities & Contradictions 6 Valid and Invalid Arguments Definition Two forms of argument... () Propositional Logic Fall 2013 2 / 30

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. Use both truth tables and derivations to demonstrate equivalence of logical statements. Translate English expressions into logical statements. Define common tautologies, contradictions, and equivalences. Recognize and employ modus ponens and modus tollens and other forms of valid argumentation. () Propositional Logic Fall 2013 3 / 30

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 Fall 2013 4 / 30

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 Fall 2013 4 / 30

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 systematic, tractable method of reasoning from given truths (called axiomata or axioms) to new truths (called propositions or theorems). How will we use it in this class? () Propositional Logic Fall 2013 4 / 30

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 systematic, tractable method of reasoning from given truths (called axiomata or 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. Logic is the glue that holds programs together. () Propositional Logic Fall 2013 4 / 30

Definitions Statements Propositional statements Definition A statement is a declarative utterance in a language that is either true or false. A statement is either atomic, meaning that it contain a single element of truth or falsity, or it is compound, meaning that it consists of statements that are composed with various logical operators. Example Let s := it is raining and t := the sun is shining. Clearly, s and t are atomic statements. These may be combined in a variety of manners, to be described shortly, but s or t, written (s t) is certainly one conceivable compound statement: it is raining or the sun is shining. () Propositional Logic Fall 2013 5 / 30

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 or 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 Fall 2013 6 / 30

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 Fall 2013 7 / 30

Definitions Logically equivalent statements Logical equivalences How might we determine if two logical statements were equivalent? Construct truth tables for each. Show that one can be transformed into the other through the systematic application of operations this is sometimes called a derivation. Your textbook emphasizes constructing truth tables, but mastery of derivations will prove helpful in reading and writing proofs later in this course. () Propositional Logic Fall 2013 8 / 30

Definitions Logically equivalent statements Patterns in truth tables Truth tables contain rows and columns. The number of necessary rows is determined by the number of variables (this is a homework question!) Read rows (horizontal values) as products. (Assuming that columns are arranged as they appear in your text: from variables to final forms.) Read columns (vertical values) as co-products (sums). This means that we (generally) care about rows whose terminal values (products) are True. () Propositional Logic Fall 2013 9 / 30

Definitions Exclusive versus Inclusive Ors and Equivalence Apples or Oranges... or both! Example Observe that the or operator is inclusive, meaning a b is true exactly when either a, b or both are true. In common English, sometimes, we mean either a or b, but not both. Let s construct a new operator, called the exclusive or, and use both truth tables and derivations (equivalence) to explore its properties. () Propositional Logic Fall 2013 10 / 30

Definitions Exclusive versus Inclusive Ors and Equivalence An important property... Visualize an exclusive-or machine that takes two inputs and outputs either a 0 for false and a 1 for true (note: these values are arbitrary). If the machine outputs a 1, what do we know about its last input? If the machine outputs a 0...? () Propositional Logic Fall 2013 11 / 30

Definitions Exclusive versus Inclusive Ors and Equivalence An important property... Visualize an exclusive-or machine that takes two inputs and outputs either a 0 for false and a 1 for true (note: these values are arbitrary). If the machine outputs a 1, what do we know about its last input? If the machine outputs a 0...? Would you say that the machine remembers? () Propositional Logic Fall 2013 11 / 30

Definitions Exclusive versus Inclusive Ors and Equivalence An important property... Visualize an exclusive-or machine that takes two inputs and outputs either a 0 for false and a 1 for true (note: these values are arbitrary). If the machine outputs a 1, what do we know about its last input? If the machine outputs a 0...? Would you say that the machine remembers? Would you say that the machine computes? Hint: consider the behavior of our machine on a string of 0 and 1 s. If it returns a 0 what might we know about that string, etc. () Propositional Logic Fall 2013 11 / 30

Definitions De Morgan s Laws... An effect of negation... De Morgan s Laws Alphonse De Morgan identified a fundamental property that we will find extremely helpful: Let a and b be logical statements, then and (a b) = a b (a b) = a b Construct a Truth Table showing De Morgan s Laws What property does this Law exhibit? () Propositional Logic Fall 2013 12 / 30

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 Fall 2013 13 / 30

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 Fall 2013 14 / 30

Logical implication Implications of implication... Everything to the left of the implication symbol is called either the antecedent, the hypothesis, or the sufficient condition. Everything to the right of the implication symbol is called the consequent, the conclusion, or the necessary condition. An implication is false just in the case that its hypothesis is true, but its conclusion is false. Said another way: an implication is false when its necessary condition is not satisfied. () Propositional Logic Fall 2013 15 / 30

Logical implication Implications of implication... Everything to the left of the implication symbol is called either the antecedent, the hypothesis, or the sufficient condition. Everything to the right of the implication symbol is called the consequent, the conclusion, or the necessary condition. An implication is false just in the case that its hypothesis is true, but its conclusion is false. Said another way: an implication is false when its necessary condition is not satisfied. Unlike in common speech, no relationship need exist between the hypothesis and the conclusion. Thus, implications such as If the moon is made of cheese, then the empty set is the subset of all sets. are true. () Propositional Logic Fall 2013 15 / 30

Logical implication Trying on an implication... Consider the following implication: if x > 2, then x 2 > 4. Using our understanding of implication, let s see how different interpretations (bindings) for x play out: 1 What happens when x > 2? In other words: how does the implication behave when its hypothesis is satisfied? () Propositional Logic Fall 2013 16 / 30

Logical implication Trying on an implication... Consider the following implication: if x > 2, then x 2 > 4. Using our understanding of implication, let s see how different interpretations (bindings) for x play out: 1 What happens when x > 2? In other words: how does the implication behave when its hypothesis is satisfied? 2 What happens when x 2? How does the implication behave when its hypothesis is not satisfied? () Propositional Logic Fall 2013 16 / 30

Logical implication Trying on an implication... Consider the following implication: if x > 2, then x 2 > 4. Using our understanding of implication, let s see how different interpretations (bindings) for x play out: 1 What happens when x > 2? In other words: how does the implication behave when its hypothesis is satisfied? 2 What happens when x 2? How does the implication behave when its hypothesis is not satisfied? 3 Under what circumstances would the implication ever be false? () Propositional Logic Fall 2013 16 / 30

Logical implication Implications, expressed in terms of primitives The implication is a composite expression built from disjunction and negation: Try it... right now! p = q has the same truth table as p q It is crucial that you remember this equivalence because it will prove helpful throughout this (and subsequent) course(s). () Propositional Logic Fall 2013 17 / 30

Logical implication Variations on implication Some important variations of implications We will define the following variations of the implication: The negation of an implication: (a = b). The converse of an implication? The inverse of an implication? The contrapositive of an implication, and show that it is equivalent. Discuss equivalences of other forms. () Propositional Logic Fall 2013 18 / 30

Negating an implication Logical implication Variations on implication Simply negating each component of an implication does not negate the implication. Why? Because the negation of p = q is p and not q! In other words, we need to show that the conclusion does not follow from the premise: in symbols: (p = q) p q. Show this now by derivation and/or truth-table. Negate x > 2 = x 2 > 4. () Propositional Logic Fall 2013 19 / 30

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. Construct and evaluate the converse of x > 2 = x 2 > 4. () Propositional Logic Fall 2013 20 / 30

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.) Construct and evaluate the inverse of x > 2 = x 2 > 4. () Propositional Logic Fall 2013 21 / 30

Logical implication Variations on implication The Contrapositive form of an implication Definition The contrapositive form of an implication is an equivalent statement formed by inverting its converse. Given a = b, form its contrapositive as a = b. Explore the contrapostitive of x > 2 = x 2 > 4. () Propositional Logic Fall 2013 22 / 30

Logical implication Variations on implication Working through an example on your own... Construct truth tables and convince yourself that If an object is a square, then it is a closed polygon comprising exactly 4 sides. is equivalent to its contrapositive. Show that the original implication is not equivalent to either its converse or its inverse, or their negations. Is there a relationship between the inverse and the converse of an implication? () Propositional Logic Fall 2013 23 / 30

Bidirectional implication Bidirectional implication Often, we want to state the something happens or that something is true only when or only if something else is also true. 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. The biconditional is written p iff q. In colloquial speech, if is often used when iff is logically intended. See if you can construct its truth table. () Propositional Logic Fall 2013 24 / 30

Validities & Contradictions Validities & contradictions Certain statements are true or false under any interpretation. For example: a a, is true no matter what truth value is assigned to a. Likewise, a a is never true, regardless of the truth value assigned to a. A statement that is true under any interpretation is called a tautology or a validity. A statement that is false under any interpretation is called a contradiction. Said another way: certain statements are true (or false) by virtue of their logical structure alone such statements are formally true (or formally false). () Propositional Logic Fall 2013 25 / 30

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 Fall 2013 26 / 30

Valid and Invalid Arguments Two forms of argument... Definition (Modus Ponens) Modus ponens ( To affirm by affirming ) is a valid form of inference that appears in symbols as: p = q, p q Informally: if p implies q and we know that p is true, then we may conclude q. Commonsense observation: seen in forward-chaining production systems. Observe that computationally we can view modus ponens as a law of substitution or replacement. () Propositional Logic Fall 2013 27 / 30

Valid and Invalid Arguments Two forms of argument... Modus Tollens... Applying the contrapositive, we obtain another form of argumentation: Definition (Modus Tollens) Modus tollens ( To affirm by denying ) is a valid form of inference that appears in symbols as: p = q, q p Informally: if p implies q and we show q is not the case, then we may conclude that p is not true. Example Construct an argument using Modus Tollens using x > 2 = x 2 > 4. () Propositional Logic Fall 2013 28 / 30

Valid and Invalid Arguments Two forms of argument... Recapitulating... Logic is a system composed of discrete statements which are either true or false, but not both. Logical Implication (p = q) is directional. Bidirectional implication is bidirectional: for example, p q means (p = q) (q = p). Consistent forms are exactly those logical constructions that are true for at least one set of bindings. A contradiction is a logical statement that is false under any interpretation. A tautology is a logical statement that is true under any interpretation. () Propositional Logic Fall 2013 29 / 30

Valid and Invalid Arguments Two forms of argument... Additional forms commonly used in proofs... Suppose that we know p is true, then we can argue p q. (Generalization) Example (Time permitting) Show each of these using our class example. () Propositional Logic Fall 2013 30 / 30

Valid and Invalid Arguments Two forms of argument... Additional forms commonly used in proofs... Suppose that we know p is true, then we can argue p q. (Generalization) Suppose that we know p q holds, then was can affirm p, we can also conclude q. (Specialization) Example (Time permitting) Show each of these using our class example. () Propositional Logic Fall 2013 30 / 30

Valid and Invalid Arguments Two forms of argument... Additional forms commonly used in proofs... Suppose that we know p is true, then we can argue p q. (Generalization) Suppose that we know p q holds, then was can affirm p, we can also conclude q. (Specialization) Suppose that we know p q holds, and we show that p, then we can conclude q, and... (Elimination) Example (Time permitting) Show each of these using our class example. () Propositional Logic Fall 2013 30 / 30

Valid and Invalid Arguments Two forms of argument... Additional forms commonly used in proofs... Example Suppose that we know p is true, then we can argue p q. (Generalization) Suppose that we know p q holds, then was can affirm p, we can also conclude q. (Specialization) Suppose that we know p q holds, and we show that p, then we can conclude q, and... (Elimination) Suppose that we know p = q and q = r, then we may conclude p = r. (Transitivity) (Time permitting) Show each of these using our class example. () Propositional Logic Fall 2013 30 / 30

Summary & next steps... How logic fits in Your success in this class depends upon your ability to construct proofs: A proof is a collection of definitions, axioms, and conclusions (results of other proofs and lemmas) that convinces the audience of the truth of a proposition (theorem, lemma). Logic is the glue that hold these statements together. Next, we will explore how simple logic underlies programming behaviors, such as flow of control, and arithmetic. () Propositional Logic Fall 2013 31 / 30