Discrete Math Logical
Discrete Math Logical
3:
Propositional Logic
Richard Mayr
University of Edinburgh, UK
1 / 21
Outline
Propositions
Logical Equivalences
Normal Forms
2 / 21
Propositions
A proposition is a declarative sentence that is either true or false.
Examples of propositions:
The Moon is made of green cheese.
Trenton is the capital of New Jersey.
Toronto is the capital of Canada.
1+0=1
0+0=2
Examples that are not propositions.
Sit down!
What time is it?
x+1=2
x+y=z
3 / 21
Propositional Logic
Constructing Propositions
Propositional Variables: p, q, r , s, . . .
The proposition that is always true is denoted by T and the
proposition that is always false is denoted by F.
Compound Propositions; constructed from logical connectives and
other propositions
Negation
Conjunction
Disjunction
Implication
Biconditional
4 / 21
Disjunction
p q
5 / 21
Conjunction
pq
6 / 21
Implication
If p and q are propositions, then p q is a conditional statement
or implication which is read as if p, then q and has this truth
table:
p
p q
7 / 21
Understanding Implication
8 / 21
if p, then q
if p, q
q unless p
q if p
p is sufficient for q
q is necessary for p
a sufficient condition for q is p
p implies q
p only if q
q when p
q whenever p
q follows from p
a necessary condition for p is q
9 / 21
converse contrapositive ?
converse inverse ?
contrapositive inverse ?
10 / 21
Biconditional
If p and q are propositions, then the biconditional proposition p q
has this truth table
p
p q
p q also reads as
p if and only if q
p iff q.
p is necessary and sufficient for q
if p then q, and conversely
p implies q, and vice-versa
Richard Mayr (University of Edinburgh, UK)
11 / 21
Thus p q r is equivalent to (p q) r .
If the intended meaning is p (q r ) then parentheses must be
used.
12 / 21
A proposition is
satisfiable, if its truth table contains true at least once. Example:
p q.
a tautology, if it is always true. Example: p p.
a contradiction, if it always false. Example: p p.
a contingency, if it is neither a tautology nor a contradiction.
Example: p.
13 / 21
Logical Equivalence
Definition
Two compound propositions p and q are logically equivalent if the
columns in a truth table giving their truth values agree.
This is written as p q.
It is easy to show:
Fact
p q if and only if p q is a tautology.
14 / 21
De Morgans Laws
(p q) p q
(p q) p q
Truth table proving De Morgans second law.
p
(pq)
(pq)
pq
15 / 21
16 / 21
17 / 21
(p (p q))
p (p q)
p ((p) q)
p (p q)
(p p) (p q)
F (p q)
(p q) F
p q
18 / 21
19 / 21
20 / 21
21 / 21