Vous êtes sur la page 1sur 3

Discrete Mathematics – Laws of Logic 4-2

Previous Lecture

Truth tables
Tautologies and contradictions
Logic equivalences
Laws of Logic
Introduction

Discrete Mathematics
Andrei Bulatov

Discrete Mathematics – Laws of Logic 4-3 Discrete Mathematics – Laws of Logic 4-4

Laws of Logic Laws of Logic (cntd)

Double negation DeMorgan’s laws


¬ (p ∧ q) ⇔ ¬p ∨ ¬q
¬¬p ⇔ p
¬ (p ∨ q) ⇔ ¬p ∧ ¬q

p ¬p ¬¬p p q ¬p ¬q p∧q ¬ (p ∧ q) ¬p ∨ ¬q

0 0 0 1 1 0 1 1
0 1
1 0 1 1 0 0 1 1
1 0
1 0 0 1 0 1 1
1 1 0 0 1 0 0

Discrete Mathematics – Laws of Logic 4-5 Discrete Mathematics – Laws of Logic 4-6

Example `Algebraic’ Laws of Logic

Construct the negation of p∧q ⇔ q∧p Commutative laws


p∨q ⇔ q∨p
`Miguel has a cell phone and he has a laptop’
p ∧ (q ∧ r) ⇔ (p ∧ q) ∧ r Associative laws
`Heather will go to the concert or Steve will go to the concert’ p ∨ (q ∨ r) ⇔ (p ∨ q) ∨ r

p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) Distributive laws
p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r)

p∧p ⇔ p Idempotent laws


p∨p ⇔ p

1
Discrete Mathematics – Laws of Logic 4-7 Discrete Mathematics – Laws of Logic 4-8

`Logic’ Laws of Logic Example

p∧T ⇔ p Simplify the statement


Identity laws
p∨F ⇔ p ¬(q ∨ r) ∨ ¬(¬q ∨ p) ∨ r ∨ p

p ∧ ¬p ⇔ F the law of contradiction


Inverse laws
p ∨ ¬p ⇔ T the law of excluded middle

p∧F ⇔ F
Domination laws
p∨T ⇔ T

p ∧ (p ∨ q) ⇔ p
Absorption laws
p ∨ (p ∧ q) ⇔ p

Discrete Mathematics – Laws of Logic 4-9 Discrete Mathematics – Laws of Logic 4-10

Expressing Connectives Example

Some connectives can be expressed through others


``If you are a computer science major or a freshman and you are
 p ⊕ q ⇔ ¬(p ↔ q) not a computer science major or you are granted access to the
Internet, then you are a freshman or have access to the Internet’’
 p ↔ q ⇔ (p → q) ∧ (q → p)
 p → q ⇔ ¬p ∨ q
p - `you can access the Internet from campus’

q - `you are a computer science major’


Theorem Every compound statement is logically equivalent to a
statement that uses only conjunction, disjunction, and negation
r - `you are a freshman’

Discrete Mathematics – Laws of Logic 4-11 Discrete Mathematics – Laws of Logic 4-12

Example First Law of Substitution

Simplify the statement Suppose that the compound statement Φ is a tautology. If p is a


(p ∨ q) ↔ (p → q) primitive statement that appears in Φ and we replace each
occurrence of p by the same statement q, then the resulting
compound statement Ψ is also a tautology.

Let Φ = (p → q) ∨ (q → p), and we substitute p by p ∨ (s ⊕ r)

Therefore ((p ∨ (s ⊕ r)) → q) ∨ (q → (p ∨ (s ⊕ r)) is a tautology

2
Discrete Mathematics – Laws of Logic 4-13 Discrete Mathematics – Laws of Logic 4-14

Second Law of Substitution Homework

Let Φ be a compound statement, p an arbitrary (not necessarily Exercises from the Book:
primitive!) statement that appears in Φ, and let q be a statement No. 1ai, 2, 6a, 6b, 14a (page 66)
such that p ⇔ q. If we replace one or more occurrences of p by
q, then for the resulting compound statement Ψ we have Φ ⇔ Ψ.
- Express conjunction and disjunction through implication and negation
(*)

Let Φ = (p → q) ∨ (q → p), and we substitute the first occurrence


of p by p ∨ (p ∧ q).
Recall that p ⇔ p ∨ (p ∧ q) by Absorption Law.

Therefore
(p → q) ∨ (q → p) ⇔ ((p ∨ (p ∧ q)) → q) ∨ (q → p).

Vous aimerez peut-être aussi