CS103
HO#5
Quantifiers
3/30/11
1
CS103
Mathematical Foundations of Computing
3/30/11
Policy for hard copy handouts:
Lecture slides will be provided in hard copy form; most other handouts
(including assignments) will be on CourseWork only.
Please pick up a copy of the slides only if you plan to use it. We will
adjust the number printed accordingly.
Conditionals
p q
p
q
¬
p
q
T T
T
T
T F
F
F
F T
T
T
F F
T
T
The best rendering of
p
q
in English is "
if
p
, then
q
"
p q
p
q
¬
p
q
T T
T
T
T F
F
F
F T
T
T
F F
T
T
If the moon is not made of cheese, then triangles have three sides.
If the moon is made of cheese, then triangles have three sides.
If the moon is made of cheese, then triangles are round.
If the moon is made of cheese, then the moon is not made of cheese.
It will snow only if it is cold.
Cold is a necessary condition for snow.
Snow
Cold
If it's not cold, it will not snow.
¬Cold
¬Snow
p
only if
q
is translated as
p
q
If
p
is true, then
q
must be true, because
that is the only way p can be true.
Contrapositive
Biconditional
: true when p and q have the same truth value
p q
p
q
(
q
p
)
(
p
q
)
T T
T
T
T F
F
F
F T
F
F
F F
T
T
iff
p
only if
q
is translated as
p
q
p
if
q
is translated as
q
p
p
if and only if
q
is translated as
(
q
p
)
(
p
q
)
p
q
is equivalent to
(
q
p
)
(
p
q
)
p
q
≡
(
q
p
)
(
p
q
)
Biconditional
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
CS103
HO#5
Quantifiers
3/30/11
2
p
q
r
.................................
T
T
T
T
T
T
F
T
T
F
T
T
T
F
F
T
F
T
T
T
F
T
F
T
F
F
T
T
F
F
F
T
Main connective
What if everything under the main connective is a T?
p
q
r
.................................
T
T
T
T
T
T
F
T
T
F
T
T
T
F
F
T
F
T
T
T
F
T
F
T
F
F
T
T
F
F
F
T
Tautology
Main connective
A
tautology
is a compound proposition that
cannot be false
, due to its
structure and the meanings of the truthfunctional connectives it contains.
This tautology is know as the "
Law of the Excluded Middle
".
It says that every proposition is either true or false.
In first
order logic, there is no "maybe".
Tautology
p
p
p
T
T
F
F
T
T
Contradiction
p
p
p
T
F
F
F
F
T
A
contradiction
is a compound proposition that
cannot be true
, due to its
structure and the meanings of the truthfunctional connectives it contains.
When would
p
q
be false?
Answer 1: when it is not true
Answer 2: when
both
p
and
q
are false.
So
(
p
q)
≡
p
q
Similarly
(
p
q)
≡
p
q
De Morgan's Laws
Idempotent Laws
p
p
≡
p
p
p
≡
p
Double Negation
(
p
)
≡
p
Commutative Laws
p
q
≡
q
p
p
q
≡
q
p
Associative Laws
(
p
q
)
r
≡
p
(
q
r
)
(
p
q
)
r
≡
p
(
q
r
)
Distributive Laws
p
(
q
r)
≡
(
p
q
)
(
p
r
)
p
(
q
r
)
≡
(
p
q
)
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 PLUMMER
 Logic, ........., Quantification

Click to edit the document details