Truth Table for implication:
| p | q | p —> q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
If the consequence happens, but the premise doesn’t, the implication truth value is still true!
Demonstration:
p: if you get 100%
q: I will give you an A
if p is true and q is false, p->q is false
if p is false and q is true, p->q is still true(he was feeling generous so you still got an A or whatever)
Converse, Contrapositive, and Inverse
”It raining is a sufficient condition for my not going to town.”
Converse: If I’m not going to town, then it’s raining. (swap the conditions order)
Inverse: If it’s not raining, then I will go to town (negate both of the conditions)
Contrapositive: If I go to town, then it’s not raining (swap the conditions order and negate both of them)
Biconditionals: p ⇔ q
Truth Table for Biconditionals:
| p | q | p⇔ q |
|---|---|---|
| T | T | T |
| F | T | F |
| T | F | F |
| F | F | T |
What makes it different than &&?
Both of them being False actually returns True.
Constructing a truth table
Calculating rows: 2 (cuz either True or False) to the power of propositions.
Ex: p V q -> r
2 to the power of 3 = 8
first column: 8/2 = 4 T/F
second column = 4/2 = 2 T/F
third column = 2/2 = 1 T/F
What does this mean?
**This decides the truth table insertion in a systematic manner (crazy!)
Demonstration:**
| 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 |
Notice the pattern in each column
| p | q | r | ¬r | pVq | pVq -> ¬ r |
|---|---|---|---|---|---|
| T | T | T | F | T | F |
| T | T | F | T | T | T |
| T | F | T | F | T | F |
| T | F | F | T | T | T |
| F | T | T | F | T | F |
| F | T | F | T | T | T |
| F | F | T | F | F | T |
| F | F | F | T | F | T |
Precedence of Logical Operators
¬ > ∧ > ∨ > ⇒ > ⇔
Practice
*“You can access the Internet from campus only if you are a CS major or you are not a freshman.”
Internet from campus = p
CS major = q
freshman = r
p ⇒ (q∨¬r)
Proposition Types
Tautology propositions: always true
Ex: p ∨ ¬p
Contradiction proposition: always false
Ex: p ∧ ¬p