Propositional Logic
Propositional Logic
Propositional Equivalences
Normal forms
Propositional Logic
Lucia Moura
Winter 2010
Lucia Moura
Propositional Equivalences
Normal forms
Proposition
A proposition is a declarative sentence that is either true or false.
Which ones of the following sentences are propositions?
Ottawa is the capital of Canada.
Buenos Aires is the capital of Brazil.
2+2=4
2+2=5
if it rains, we dont need to bring an umbrella.
x+2=4
x+y =z
When does the bus come?
Do the right thing.
CSI2101 Discrete Structures Winter 2010: Propositional Logic
Lucia Moura
Propositional Equivalences
Normal forms
conjunction
AND
disjunction
OR
exclusive-OR XOR
implication
implies
Lucia Moura
Propositional Equivalences
Normal forms
Meaning of connectives
p
T
T
F
F
q
T
F
T
F
p
F
F
T
T
pq
T
F
F
F
pq
T
T
T
F
pq
F
T
T
F
pq
T
F
T
T
pq
T
F
F
T
WARNING:
Implication (p q) causes confusion, specially in line 3: F T is true.
One way to remember is that the rule to be obeyed is
if the premise p is true then the consequence q must be true.
The only truth assignment that falsifies this is p = T and q = F .
Lucia Moura
Propositional Equivalences
Normal forms
q
T
F
T
F
q
F
T
F
T
p q
pq
(p q) (p q)
Lucia Moura
Propositional Equivalences
Normal forms
Propositional Equivalences
A basic step is math is to replace a statement with another with
the same truth value (equivalent).
This is also useful in order to reason about sentences.
Negate the following phrase:
Miguel has a cell phone and he has a laptop computer.
p=Miguel has a cell phone
q=Miguel has a laptop computer.
The phrase above is written as (p q).
Its negation is (p q), which is logically equivalent to p q.
(De Morgans law)
This negation therefore translates to:
Miguel does not have a cell phone or he does not have a laptop
computer.
CSI2101 Discrete Structures Winter 2010: Propositional Logic
Lucia Moura
Propositional Equivalences
Normal forms
Lucia Moura
Propositional Equivalences
Normal forms
Lucia Moura
Propositional Equivalences
Normal forms
Theorem
Two compound propositions p and q are logically equivalent if and only if
p logically implies q and q logically implies p.
In other words: two compound propositions are logically equivalent if and
only if they have the same truth table.
Lucia Moura
Propositional Equivalences
Normal forms
p
T
T
F
F
q
T
F
T
F
p
F
F
T
T
p q
T
F
T
T
pq
T
F
T
T
Lucia Moura
Propositional Equivalences
Normal forms
Lucia Moura
Propositional Equivalences
Normal forms
Note T is the compound composition that is always true, and F is the compound composition that is always false.
CSI2101 Discrete Structures Winter 2010: Propositional Logic
Lucia Moura
Propositional Equivalences
Normal forms
Lucia Moura
Propositional Equivalences
Normal forms
Prove that (p q) p q.
Lucia Moura
Propositional Equivalences
Normal forms
Definition
A compound proposition is in disjunctive normal form (DNF) if it is a
term or a disjunction of two or more terms. (i.e. an OR of ANDs).
A compound proposition is in conjunctive normal form (CNF) if it is a
clause or a conjunction of two or more clauses. (i.e. and AND of ORs)
Lucia Moura
Propositional Equivalences
Normal forms
1
2
3
4
5
6
7
8
x
F
F
F
F
T
T
T
T
y
F
F
T
T
F
F
T
T
z
F
T
F
T
F
T
F
T
x y x z
T
T
F
T
F
F
F
F
Lucia Moura
Propositional Equivalences
Normal forms
x
F
F
F
F
T
T
T
T
y
F
F
T
T
F
F
T
T
z
F
T
F
T
F
T
F
T
x y x z
T
T
F
T
F
F
F
F
Lucia Moura
Propositional Equivalences
Normal forms
Definition
A compound proposition P with propositions x1 , x2 , . . . , xn represents a
Boolean function f with arguments x1 , x2 , . . . , xn if for any truth
assignment , satisfies P if and only if
f ( (x1 ), (x2 ), . . . , (xn )) = true.
Theorem
Let P be a compound proposition that represents a boolean function f .
Then, a compound proposition Q also represents f if and only if Q is
logically equivalent to P .
Lucia Moura
Propositional Equivalences
Normal forms
Lucia Moura
Propositional Equivalences
Normal forms
Lucia Moura