Lecture 2: Propositional Equivalences

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Propositional Equivalences
Propositional Equivalences. L32 Agenda Tautologies Logical Equivalences.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Introduction to Logic Logical Form: general rules
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Review I Rosen , 3.1 Know your definitions!
Propositional Equivalences
Tautologies, contradictions, contingencies
Lecture 1.2: Equivalences, and Predicate Logic* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren, Zeph.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Thinking Mathematically
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
CS203 Discrete Mathematical Structures
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Propositional Equivalence A needed step towards proofs Copyright © 2014 Curt Hill.
Lecture 1.2: Equivalences, and Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
Simple Logic.
2. The Logic of Compound Statements Summary
Lecture 1.2: Equivalences, and Predicate Logic
Propositional Logic.
The Foundations: Logic and Proofs
Thinking Mathematically
Citra Noviyasari, S.Si, MT
Logical Equivalence of Propositions
MATH 245 Spring 2009 This is mathematics for computer science
Classwork/Homework Classwork – Page 90 (11 – 49 odd)
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Discussion #10 Logical Equivalences
Proposition & Predicates
Mathematics for Computing
Discrete Structures for Computer Science
Introduction to Symbolic Logic
Propositional Calculus: Boolean Algebra and Simplification
1.2 Propositional Equivalences
Propositional Equivalences
Information Technology Department
Propositional Equivalence (§1.2)
CS 220: Discrete Structures and their Applications
Propositional Equivalences
CSE 311 Foundations of Computing I
TRUTH TABLES.
TRUTH TABLES continued.
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
CSE 321 Discrete Structures
1.2 Propositional Equivalences
Statements of Symbolic Logic
Foundations of Discrete Mathematics
1.2 Propositional Equivalences
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
1.3 Propositional Equivalences
Discrete Structures Prepositional Logic 2
Presentation transcript:

Lecture 2: Propositional Equivalences

Agenda Tautologies Logical Equivalences

Tautologies, contradictions, contingencies DEF: A compound proposition is called a tautology if no matter what truth values its atomic propositions have, its own truth value is T. EG: p  ¬p (Law of excluded middle) The opposite to a tautology, is a compound proposition that’s always false –a contradiction. EG: p  ¬p On the other hand, a compound proposition whose truth value isn’t constant is called a contingency. EG: p  ¬p Question: why is the last a contingency?

Tautologies and contradictions The easiest way to see if a compound proposition is a tautology/contradiction is to use a truth table. T F p p p p T F p p p p

Tautology example (1.2.8.a) Part 1 Demonstrate that [¬p (p q )]q is a tautology in two ways: Using a truth table – show that [¬p (p q )]q is always true Using a proof (will get to this later).

Tautology by truth table p q ¬p p q ¬p (p q ) [¬p (p q )]q T F

Tautology by truth table p q ¬p p q ¬p (p q ) [¬p (p q )]q T F

Tautology by truth table p q ¬p p q ¬p (p q ) [¬p (p q )]q T F

Tautology by truth table p q ¬p p q ¬p (p q ) [¬p (p q )]q T F

Tautology by truth table p q ¬p p q ¬p (p q ) [¬p (p q )]q T F

Tautologies, contradictions and programming Tautologies and contradictions in your code usually correspond to poor programming design. EG: while(x <= 3 || x > 3) x++; if(x > y) if(x == y) return “never got here”;

Logical Equivalences DEF: Two compound propositions p, q are logically equivalent if their biconditional joining p  q is a tautology. Logical equivalence is denoted by p  q. EG: The contrapositive of a logical implication is the reversal of the implication, while negating both components. I.e. the contrapositive of p q is ¬q ¬p . As we’ll see next: p q  ¬q ¬p

Logical Equivalence of Conditional and Contrapositive The easiest way to check for logical equivalence is to see if the truth tables of both variants have identical last columns: p q q p ¬q¬p p ¬p q ¬q Q: why does this work given definition of  ?

Logical Equivalence of Conditional and Contrapositive The easiest way to check for logical equivalence is to see if the truth tables of both variants have identical last columns: T F p q q p ¬q¬p p ¬p q ¬q Q: why does this work given definition of  ?

Logical Equivalence of Conditional and Contrapositive The easiest way to check for logical equivalence is to see if the truth tables of both variants have identical last columns: T F p q q p T F ¬q¬p p ¬p q ¬q Q: why does this work given definition of  ?

Logical Equivalence of Conditional and Contrapositive The easiest way to check for logical equivalence is to see if the truth tables of both variants have identical last columns: T F p q q p T F ¬q¬p p ¬p q ¬q Q: why does this work given definition of  ?

Logical Equivalence of Conditional and Contrapositive The easiest way to check for logical equivalence is to see if the truth tables of both variants have identical last columns: T F p q q p T F ¬q¬p p ¬p q ¬q Q: why does this work given definition of  ?

Logical Equivalence of Conditional and Contrapositive The easiest way to check for logical equivalence is to see if the truth tables of both variants have identical last columns: T F p q q p T F ¬q¬p p ¬p q ¬q Q: why does this work given definition of  ?

Logical Equivalences A: p q by definition means that p  q is a tautology. Furthermore, the biconditional is true exactly when the truth values of p and of q are identical. So if the last column of truth tables of p and of q is identical, the biconditional join of both is a tautology.

Logical Non-Equivalence of Conditional and Converse The converse of a logical implication is the reversal of the implication. I.e. the converse of p q is q p. EG: The converse of “If Donald is a duck then Donald is a bird.” is “If Donald is a bird then Donald is a duck.” As we’ll see next: p q and q p are not logically equivalent.

Logical Non-Equivalence of Conditional and Converse p q p q q p (p q)  (q p)

Logical Non-Equivalence of Conditional and Converse p q p q q p (p q)  (q p) T F

Logical Non-Equivalence of Conditional and Converse p q p q q p (p q)  (q p) T F

Logical Non-Equivalence of Conditional and Converse p q p q q p (p q)  (q p) T F

Logical Non-Equivalence of Conditional and Converse p q p q q p (p q)  (q p) T F

Derivational Proof Techniques When compound propositions involve more and more atomic components, the size of the truth table for the compound propositions increases Q1: How many rows are required to construct the truth-table of: ( (q(pr ))  ((sr)t) )  (qr ) Q2: How many rows are required to construct the truth-table of a proposition involving n atomic components?

Derivational Proof Techniques A1: 32 rows, each additional variable doubles the number of rows A2: In general, 2n rows Therefore, as compound propositions grow in complexity, truth tables become more and more unwieldy. Checking for tautologies/logical equivalences of complex propositions can become a chore, especially if the problem is obvious.

Derivational Proof Techniques EG: consider the compound proposition (p p )  ((sr)t) )  (qr ) Q: Why is this a tautology?

Derivational Proof Techniques A: Part of it is a tautology (p p ) and the disjunction of True with any other compound proposition is still True: (p p )  ((sr)t ))  (qr ) T  ((sr)t ))  (qr ) T Derivational techniques formalize the intuition of this example.

Tables of Logical Equivalences Identity laws Like adding 0 Domination laws Like multiplying by 0 Idempotent laws Delete redundancies Double negation “I don’t like you, not” Commutativity Like “x+y = y+x” Associativity Like “(x+y)+z = y+(x+z)” Distributivity Like “(x+y)z = xz+yz” De Morgan

Tables of Logical Equivalences Excluded middle Negating creates opposite Definition of implication in terms of Not and Or

DeMorgan Identities DeMorgan’s identities allow for simplification of negations of complex expressions Conjunctional negation: (p1p2…pn)  (p1p2…pn) “It’s not the case that all are true iff one is false.” Disjunctional negation: (p1p2…pn)  (p1p2…pn) “It’s not the case that one is true iff all are false.”

Tautology example (1.2.8.a) Part 2 Demonstrate that [¬p (p q )]q is a tautology in two ways: Using a truth table (did above) Using a proof relying on Tables 5 and 6 of Rosen, section 1.2 to derive True through a series of logical equivalences

Tautology by proof [¬p (p q )]q

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE  [¬(¬p) ¬q ]  q DeMorgan

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE  [¬(¬p) ¬q ]  q DeMorgan  [p  ¬q ]  q Double Negation

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE  [¬(¬p) ¬q ]  q DeMorgan  [p  ¬q ]  q Double Negation  p  [¬q q ] Associative

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE  [¬(¬p) ¬q ]  q DeMorgan  [p  ¬q ]  q Double Negation  p  [¬q q ] Associative  p  [q ¬q ] Commutative

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE  [¬(¬p) ¬q ]  q DeMorgan  [p  ¬q ]  q Double Negation  p  [¬q q ] Associative  p  [q ¬q ] Commutative  p  T ULE

Tautology by proof [¬p (p q )]q  [(¬p p)(¬p q)]q Distributive  [ F  (¬p q)]q ULE  [¬p q ]q Identity  ¬ [¬p q ]  q ULE  [¬(¬p) ¬q ]  q DeMorgan  [p  ¬q ]  q Double Negation  p  [¬q q ] Associative  p  [q ¬q ] Commutative  p  T ULE  T Domination

Examples for section 1.2 Worked out on the black-board. “I don’t drink and drive” is logically equivalent to “If I drink, then I don’t drive” Write a Java method that represents the compound proposition (pq)r