Propositional Logic Flashcards
How to construct truth table?
- Create table with 2^n rows with n columns
- Fill in the first n columns with all the possible combinations
What is Disjunction?
p ∨ q
p ∨ q is True
when
BOTH p AND q are False
What is Conjunction?
p ∧ q
p ∧ q is True
when
BOTH p AND q are True
What is Negation?
¬p
¬p is not p
p → q
If p, then q
E.g.
p (T) , q (T) then p → q (T)
p (T) , q (F) then p → q (F)
p (F) , q (ANY) then p → q (T)
What is XOR (Exclusive-OR)
p ⊕ q
p ⊕ q is True
when
EITHER p OR q is true
p ↔ q
p if and only q
p → q AND q → p
p ≡ q
p and q have same truth value
Let p,q be propositions
A be conditional statement,
p → q
What is the converse of A?
q → p
Let p,q be propositions
A be conditional statement,
p → q
What is the contrapositive of A?
¬q → p
Contrapositive:
Negate second, then Negate first
(basically negate both then change position)
Let p,q be propositions
A be conditional statement,
p → q
What is the inverse of A?
¬p → ¬q
Inverse:
Just negate both. Don’t switch position.