Lecture 2
Lecture 2
2
Tautologies and contradictions
The easiest way to see if a compound
proposition is a tautology/contradiction is to
use a truth table.
p p p p p p p p
F T T F T F
T F T T F F
L3 3
Tautology example
Demonstrate that
[¬p (p q )]q
is a tautology in two ways:
1. Using a truth table – show that
[¬p (p q )]q is always true
2. Using a proof .
L3 4
Tautology by truth table
T F
F T
F F
L3 5
Tautology by truth table
T F F
F T T
F F T
L3 6
Tautology by truth table
T F F T
F T T T
F F T F
L3 7
Tautology by truth table
T F F T F
F T T T T
F F T F F
L3 8
Tautology by truth table
T F F T F T
F T T T T T
F F T F F T
L3 9
Logical Equivalences: Definition
• Definition: Propositions p and q are logically
equivalent if p q is a tautology.
• Informally, p and q are equivalent if whenever
p is true, q is true, and vice versa
• Notation: p q (p is equivalent to q), p q,
and p q
• Alert: is not a logical connective
Logical Equivalence of Conditional and
Contrapositive
p q p q p q ¬q ¬p ¬q¬p
T T T T T F F T
T F F T F T F F
F T T F T F T T
F F T F F T T T
L3 11
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 = x+
(y+z)”
Distributivity
Like “(x+y)z =
xz+yz”
L3 12
De Morgan
Logical Equivalences
13
Logical Equivalences
14
Using Logical Equivalences: Example 1
• Logical equivalences can be used to construct
additional logical equivalences
• Example: Show that (p q) q is a tautology
0. (p q) q
1. (p q) q Implication Law
on 0
2. (p q) q De Morgan’s Law (1st) on 1
3. p (q q) Associative Law on 2
4. p T Negation Law on 3
5. T Domination Law on 4
Using Logical Equivalences: Example 2
• Example (Exercise 17)*: Show that (p q) (p q)
• Sometimes it helps to start with the second proposition (p q)
0. (p q)
1. (p q) (q p) Equivalence Law on 0
2. (p q) (q p) Implication Law on 1
3. (((p q) (q p))) Double negation on 2
4. ((p q) (q p)) De Morgan’s Law…
5. ((p q) (q p)) De Morgan’s Law
6. ((p q) (p p) (q q) (q p)) Distribution Law
7. ((p q) (q p)) Identity Law
8. ((q p ) (p q)) Implication Law
9. (p q) Equivalence Law
*See Table 8 (p 25) but you are not allowed to use the table for the proof
Using Logical Equivalences: Example 3
• Show that (q p) (p q) q
0. (q p) (p q)
1. (q p) (p q) Implication Law
2. (q p) (p q) De Morgan’s
& Double negation
3. (q p) (q p) Commutative Law
4. q (p p) Distributive Law
5. q 1 Identity Law
q Identity Law
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
pT ULE
T Domination
L3 18