4 Logic and Proofs
4 Logic and Proofs
. – p.1/14
More Complicated Expressions...
. – p.2/14
Examples
1. Given the three propositions
p : 1+1=2 T
q : 2 × 4 = 10 F
r : 33 = 27 T
the value of the above logical expression is
2. What about (p ∧ q) ⇒ r?
. – p.3/14
...and their Truth Tables
. – p.4/14
Examples
1. Construct the truth table for (p ∧ q) ⇒ r.
p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
. – p.5/14
Notes
. – p.6/14
Operator Precedence
. – p.7/14
Example
1. Evaluate the compound proposition
p ∧ q ⇔ ¬q ∨ r
where the propositions p, r are true and the proposition q is false.
p ∧ q ⇔ ¬q ∨ r = T ∧ F ⇔ ¬F ∨ T
=
=
=
=
2. What is the truth value of p ∧ q ⇔ ¬(q ∨ r) with the same truth values for p, q, r?
. – p.8/14
Logical Equivalence
p q ¬q ¬p ¬q ⇒ ¬p p⇒q
T T T
T F F
F T T
F F T
• The truth values in the two right hand columns are precisely the same, so we can write
p ⇒ q ≡ ¬q ⇒ ¬p
. – p.9/14
Commutativity
. – p.10/14
More Logical Equivalences
. – p.11/14
Negating Compound Propositions
. – p.12/14
Summary
. – p.13/14