Post on 08-Apr-2018
transcript
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 1/47
Lecture 5: PropositionalEquivalences
Andrew Katumba2011
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 2/47
2
Announcements
CAT I is on Thursday 24th March :
8am 10 am
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 3/47
3
Agenda
Tautologies
Logical Equivalences
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 4/47
Readings
Sections 4.5, 4.6, 4.7 and 4.8 of Schaums Outline of Discrete
Mathematics (pg 77)
Solved problems are on page 82
4
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 5/47
5
Tautologies, contradictions,contingenciesDEF: A compound proposition is called a tautology if
no matter what truth values its atomic propositionshave, its own truth value is T.
EG: p � ¬p (Law of excluded middle)
The opp osite to a tautology, is a comp ound p rop ositionthat ¶s always false ± a c ontradi c tion .
EG: p � ¬p
On the other hand, a comp ound p rop osition whose
truth value isn¶t constant is called a
c
ontingen c
y.EG: p p ¬p
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 6/47
6
Tautologies and contradictions
The easiest way to see if a compoundproposition is a tautology/contradiction
is to use a truth table.
T
F
F
T
�pp
T
T
p ��p
T
F
F
T
�pp
F
F
p ��p
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 7/47
7
Tautology example Part 1
Demonstrate that
[¬p �(p �q )]pq
is a tautology in two ways:
1. Using a truth table ± show that [¬p �(p �q )]pq is always true
2. Using a p roof (will get to this later).
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 8/47
8
Tautology by truth table
p q ¬p p �q ¬p �(p �q ) [¬p �(p �q )]pq
T T
T F
F T
F F
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 9/47
9
Tautology by truth table
p q ¬p p �q ¬p �(p �q ) [¬p �(p �q )]pq
T T F
T F F
F T T
F F T
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 10/47
10
Tautology by truth table
p q ¬p p �q ¬p �(p �q ) [¬p �(p �q )]pq
T T F T
T F F T
F T T T
F F T F
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 11/47
11
Tautology by truth table
p q ¬p p �q ¬p �(p �q ) [¬p �(p �q )]pq
T T F T F
T F F T F
F T T T T
F F T F F
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 12/47
12
Tautology by truth table
p q ¬p p �q ¬p �(p �q ) [¬p �(p �q )]pq
T T F T F T
T F F T F T
F T T T T T
F F T F F T
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 13/47
13
Tautologies, contradictionsand programming
Tautologies and contradictions in yourcode usually correspond to poor
programming design. EG: while(x <= 3 || x > 3)
x++;
if(x > y)
if(x == y)
return ³never got here´;
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 14/47
14
Logical Equivalences
DEF: Two compound propositions p, q arelogi c ally equivalent if their biconditional
joining p q is a tautology. Logicaleq uivalence is denoted by p � q .
EG: The c ontrapositive of a logical implicationis the reversal of the implication, while
negating both components. I.e. thecontrapositive of p pq is ¬q p¬p . As we¶llsee next: p pq � ¬q p¬p
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 15/47
15
Logical Equivalence of Conditional and Contrapositive
The easiest way to check for logical equivalenceis to see if the truth tables of both variantshave identical last columns:
p pqqp
Q: why does this work given definition of � ?
¬q p¬p p ¬p q ¬q
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 16/47
16
Logical Equivalence of Conditional and Contrapositive
The easiest way to check for logical equivalenceis to see if the truth tables of both variantshave identical last columns:
T
F
T
T
T
F
T
F
T
T
F
F
p pq q p
Q: why does this work given definition of � ?
¬q p¬p p ¬p q ¬q
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 17/47
17
Logical Equivalence of Conditional and Contrapositive
The easiest way to check for logical equivalenceis to see if the truth tables of both variantshave identical last columns:
T
F
T
T
T
F
T
F
T
T
F
F
p pq q p
Q: why does this work given definition of � ?
T
T
F
F
¬q p¬p p ¬p
T
F
T
F
q ¬q
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 18/47
18
Logical Equivalence of Conditional and Contrapositive
The easiest way to check for logical equivalenceis to see if the truth tables of both variantshave identical last columns:
T
F
T
T
T
F
T
F
T
T
F
F
p pq q p
Q: why does this work given definition of � ?
T
T
F
F
¬q p¬p p ¬p
T
F
T
F
q
F
T
F
T
¬q
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 19/47
L3 19
Logical Equivalence of Conditional and Contrapositive
The easiest way to check for logical equivalenceis to see if the truth tables of both variantshave identical last columns:
T
F
T
T
T
F
T
F
T
T
F
F
p pq q p
Q: why does this work given definition of � ?
T
T
F
F
¬q p¬p p
F
F
T
T
¬p
T
F
T
F
q
F
T
F
T
¬q
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 20/47
20
Logical Equivalence of Conditional and Contrapositive
The easiest way to check for logical equivalenceis to see if the truth tables of both variantshave identical last columns:
T
F
T
T
T
F
T
F
T
T
F
F
p pq q p
Q: why does this work given definition of � ?
T
F
T
T
T
T
F
F
¬q p¬p p
F
F
T
T
¬p
T
F
T
F
q
F
T
F
T
¬q
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 21/47
21
Logical Equivalences
A: p �q by definition means that p m qis a tautology. Furthermore, the
biconditional is true exactly when thetruth 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.
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 22/47
22
Logical Non-Equivalence of Conditional and Converse
The c onverse of a logical implication is thereversal of the implication. I.e. the converseof ppq is q pp .
EG: The converse of ³If Donald is a duck thenDonald is a bird.´ is ³If Donald is a bird thenDonald is a duck.´
As we¶ll see next: p pq and q pp are not logically eq uivalent.
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 23/47
23
Logical Non-Equivalence of Conditional and Converse
p q p pq q pp (p pq) m (q pp )
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 24/47
24
Logical Non-Equivalence of Conditional and Converse
p q p pq q pp (p pq) m (q pp )
T
TF
F
T
FT
F
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 25/47
25
Logical Non-Equivalence of Conditional and Converse
p q p pq q pp (p pq) m (q pp )
T
TF
F
T
FT
F
T
FT
T
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 26/47
26
Logical Non-Equivalence of Conditional and Converse
p q p pq q pp (p pq) m (q pp )
T
TF
F
T
FT
F
T
FT
T
T
TF
T
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 27/47
27
Logical Non-Equivalence of Conditional and Converse
p q p pq q pp (p pq) m (q pp )
T
TF
F
T
FT
F
T
FT
T
T
TF
T
T
FF
T
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 28/47
28
Derivational Proof Techniques
When compound propositions involve more andmore atomic components, the size of thetruth table for the compound propositionsincreases
Q1: How many rows are required to construct the truth-table of:( (qm(ppr )) � (�(s�r)��t) ) p (�qpr )
Q2: How many rows are required to construct the truth-table of a proposition involving natomic components?
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 29/47
29
Derivational Proof Techniques
A1: 32 rows, each additional variable doublesthe number of rows
A2: In general, 2n rowsTherefore, as compound propositions grow in
complexity, truth tables become more andmore unwieldy. Checking for
tautologies/logical equivalences of complexpropositions can become a chore, especially if the problem is obvious.
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 30/47
30
Derivational Proof Techniques
EG: consider the compound proposition
(p pp ) � (�(s�r)��t) ) � (�qpr )
Q: Why is this a tautology?
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 31/47
31
Derivational Proof Techniques
A: Part of it is a tautology (p pp ) andthe disjunction of True with any other
comp ound p rop osition is still True:(p pp ) � (�(s�r)��t )) � (�qpr )
� T � (�(s�r)��t )) � (�qpr )
�TDerivational techniques formalize the
intuition of this examp le.
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 32/47
L3 32
Tables of Logical Equival ences
Ident i ty la ws
Li ke a dding 0
Domina t ion la ws
Li ke mul t i pl ying by 0
Idempo ten t la wsDel ete redun danci es
Dou bl e n ega t ion
³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
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 33/47
33
Ta bl es of Logical Equival enc es
Exclu ded mi ddl e
Nega t ing c rea tes o pposi te
Defini t ion of i mplica t ion in terms of No t an d Or
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 34/47
34
DeMorgan Identities
DeMorgan¶s identities allow for simplification of negations of complex expressions
Conjunctional negation:�(p 1�p 2�«�p n ) � (�p 1��p 2�«��p n )
³It ¶s n ot the case that all are true iff on e is false.´
Disjun ction al n egation :
�(p 1�p 2�«�p n ) � (�p 1��p 2�«��p n )
³It ¶s n ot the case that on e is true iff all are false.´
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 35/47
35
Tautology example Part 2
Demonstrate that
[¬p �(p �q )]pq
is a tautology in two ways:1. Using a truth table (did above)
2. Using a p roof relying on Tables 5 and
6 of Rosen, section 1.2 to derive Truethrough a series of logicalequivalences
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 36/47
36
Tautology by proof [¬p �(p �q )]pq
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 37/47
37
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 38/47
38
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 39/47
39
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq Identity
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 40/47
40
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq Identity
�¬
[¬
p �q ] � q ULE
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 41/47
41
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq Identity
�¬
[¬
p �q ] � q ULE� [¬(¬p )� ¬q ] � q DeMorgan
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 42/47
42
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq Identity
�¬
[¬
p �q ] � q ULE� [¬(¬p )� ¬q ] � q DeMorgan
� [p � ¬q ] � q Double Negation
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 43/47
43
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq Identity
�¬
[¬
p �q ] � q ULE� [¬(¬p )� ¬q ] � q DeMorgan
� [p � ¬q ] � q Double Negation
� p � [¬q �q ] Associative
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 44/47
44
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq Identity
� ¬
[¬
p �
q ] � q ULE� [¬(¬p )� ¬q ] � q DeMorgan
� [p � ¬q ] � q Double Negation
� p � [¬q �q ] Associative
� p � [q �¬q ] Commutative
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 45/47
45
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq 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
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 46/47
46
Tautology by proof [¬p �(p �q )]pq
� [(¬p �p )�(¬p �q )]pq Distributive
� [ F � (¬p �q )]pq ULE
� [¬p �q ]pq 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
8/7/2019 Lecture v Propositional Equivalencies
http://slidepdf.com/reader/full/lecture-v-propositional-equivalencies 47/47
47
Exercise
1. ³I don¶t drink and drive´ is logicallyequivalent to ³If I drink, then I don¶t
drive´