Sunteți pe pagina 1din 5

Discrete Mathematics 2002 Lecture 11, 15-August-2002

Definition of Logical Equivalence


• End of last lecture: We used a truth table to
show that for every combination of the truth
values of p & q, the truth values of p ∧ q and
q ∧ (p ∨ ¬q) are the same
• The expressions p ∧ q and q ∧ (p ∨ ¬q) are
said to be logically equivalent
• Defn: 2 expressions are logically equivalent if
they have the same truth values for every
combination of the truth values of the variables
1

Example of Logical Equivalence


• Example/Exercise: Consider the proposition
‘Anne is neither happy nor wealthy’
If p = ‘Anne is happy’ & q = ‘Anne is
wealthy’, it seems that the proposition can be
written as either ¬(p ∨ q) or ¬p ∧ ¬q
Use a truth table to show these 2 expressions
are logically equivalent (so it doesn’t matter
which expression is used for the proposition)
2

Truth Table – Basic Connectives

p q p ∧ q p ∨ q ¬p p →q p ↔q
T T T T F T T
T F F T F F
F T F T T T F
F F F F T T
3

1
Discrete Mathematics 2002 Lecture 11, 15-August-2002

Logical Equivalence & Tautology


• If 2 expressions A & B are logically equivalent,
they always have the same truth values, no
matter what truth values the variables have
• This means that A ↔ B is always true
• Therefore A ↔ B is a tautology
• So another way of saying that A & B are
logically equivalent is to say that A ↔ B is a
tautology
4

Implications
• Recall that if-then is also known as implies
• i.e. p → q can be read as ‘if p then q’ or
‘p implies q’
• Expressions of the type p → q are called
implications
• The converse of p → q is q → p
• The contrapositive of p → q is ¬q → ¬p

The Converse and Contrapositive


• Example: Consider the implication ‘If I am
at Lake Weeroona, then I am in Bendigo’
• Its converse is ‘If I am in Bendigo, then I am
at Lake Weeroona’
• Its contrapositive is ‘If I am not in Bendigo,
then I am not at Lake Weeroona’
• In this example, the original proposition is a
true sentence, its converse is false, and its
contrapositive is true
• Now use a truth table to investigate the
expressions p → q, q → p and ¬q → ¬p
6

2
Discrete Mathematics 2002 Lecture 11, 15-August-2002

Truth Table for Converse &


Contrapositive
p q p →q q →p ¬ q ¬ p ¬ q →¬ p
T T T T F F T
T F F T T F F
F T T F F T T
F F T T T T T
7

Converse & Contrapositive (cont)


• The truth table shows (by columns 3 & 7):
an implication and its contrapositive are
logically equivalent
• However (by columns 3 & 4):
an implication and its converse are not
logically equivalent
• Thus the results of the Bendigo example
aren’t surprising
8

4.6 Laws of Logic


• Previous lecture – we showed q ∧ (p ∨ ¬q)
and p ∧ q are logically equivalent
• Thus the more complicated expression can
be replaced by the simpler expression
without affecting the truth value
• A simplification process like this is useful
in computer programming, for instance,
where it’s desirable to simplify code to
make the program more efficient
9

3
Discrete Mathematics 2002 Lecture 11, 15-August-2002

Laws of Logic
• Aim to simplify logical expressions effectively
• To do this, we establish a list of key pairs of
expressions that are logically equivalent
• The symbol ≡ means ‘is logically equivalent to’
• Example: q ∧ (p ∨ ¬q) ≡ p ∧ q
• A statement of the type P ≡ Q (where P & Q are
logical expressions) is termed a law of logic
• The most important laws of logic follow
10

Law(s) of Logic Name


p ↔ q ≡ (p → q) ∧ (q → p) equivalence
p → q ≡ ¬p ∨ q implication
¬¬ p ≡ p double negation
p∧p≡p p∨p≡p idempotent
p∧q≡q∧p p∨q≡q∨p commutative
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) associative
p ∧ (q ∨ r) ≡ p ∨ (q ∧ r) ≡
distributive
(p ∧ q) ∨ (p ∧ r) (p ∨ q) ∧ (p ∨ r)
¬ (p ∧ q) ≡ ¬ p ∨ ¬ q ¬ (p ∨ q) ≡ ¬ p ∧ ¬ q de Morgan’s
p∧T≡p p∨F≡p identity
p∧F≡F p∨T≡T annihilation
p ∧ ¬p ≡ F p ∨ ¬p ≡ T inverse
p ∧ (p ∨ q) ≡ p p ∨ (p ∧ q) ≡ p absorption

The Laws of Logic


• The first 2 laws allow for the connectives ↔
and → to be removed from any expression
• All remaining laws involve just and, or & not
• Apart from the double negation law, all these
remaining laws occur in pairs
• In each pair, the second law is obtained from
the first by interchanging ∧ with ∨ & T with F
• The 2nd law is called the dual of the 1st (and
vice-versa)
12

4
Discrete Mathematics 2002 Lecture 11, 15-August-2002

Verifying the Laws of Logic


• The list of laws isn’t just made up – every law
can be verified by showing the 2 expressions
on either side of the ≡ are logically equivalent
• However, some of the laws are fairly obvious
e.g. ‘It is not the case that it is not Friday’ is
just a complicated way of saying ‘It is Friday’,
which illustrates the double negation law
• Example: Verify the first absorption law
• Question: Why is the term ‘absorption’ used
for this law?
13

S-ar putea să vă placă și