Unit2 Propositional Logic
Unit2 Propositional Logic
Propositional Logic
Albert Sung
True or False?
He always He always
tells the truth. lies.
knight knave
3) “God exists.”
Each proposition
has a truth value, 4) “Study logic more often, please.”
either T or F.
Truth table:
1) (p ∧ ~~q)
2) (p ∧ q ∨ r)
3) (p ∨ q) ∧ ~(p ∧ q)
A B
p q
Answer?
Propositional Logic 2-16
Unit 2.2
Logical Equivalence
X ≡ Y,
if they have identical
truth values in all cases.
The bus was not late and Tom’s watch was not slow.
Alternative answer:
Neither was the bus late nor was Tom’s watch slow.
2. −1 < 𝑥𝑥 ≤ 4
𝑥𝑥 ≤ −1 or 𝑥𝑥 > 4.
Example: p ∨ ~p
p ~p p ∨ ~p
T F T
F T T
Example: p ∧ ~p
This course is interesting, and
this course is not interesting.
You can use truth table to
prove that it’s always false.
(3 min) https://www.youtube.com/watch?v=RCg3vMu9boQ
Propositional Logic 2-25
Equivalence involving t and c
If t is a tautology and c is a contradiction, then
𝑝𝑝 ∧ 𝐭𝐭 ≡ 𝑝𝑝 and 𝑝𝑝 ∧ 𝐜𝐜 ≡ 𝐜𝐜.
Commutative law is
often obvious and
may be skipped.
Conditionals
If p is true, then p → q
takes the truth value of q.
If p is false, then p → q is
regarded to be true. (why?)
𝑝𝑝 → 𝑞𝑞 ≡ ~𝑝𝑝 ∨ 𝑞𝑞
p q ~p ~p ∨ q p → q
T T F T T
T F F F F
F T T T T
F F T T T
a) Is it true that p → q ≡ q → p ?
converse
b) Is it true that p → q ≡ ~p → ~q ?
inverse
c) Is it true that p → q ≡ ~q → ~p ?
contrapositive
Propositional Logic 2-36
Converse: q → p
p → q ≡ ∼q → ∼p
Answer:
p q p→q ~p ~q ~q → ~p
Is it true that p → q ≡ q → p ?
converse
Is it true that p → q ≡ ~p → ~q ?
inverse
Propositional Logic 2-41
Only If
“p only if q” means
“If not q then not p”, or equivalently,
“If p then q”.
p only if q p if q p iff q
Is he a knight or
I’m a knave. a knave?