Class3 - CSC510
Class3 - CSC510
Class3 - CSC510
Lecture 3
Propositional logic
Equivalences
p ¬p
1 0
0 1
Bitwise operations
• Examples:
Bitwise operations
• Examples:
p ¬p p ∨ ¬p
T F T
F T T
p ¬p p ∧ ¬p
T F
F T
Tautology and Contradiction
• Some propositions are interesting since their values in the truth
table are always the same
Definitions:
• A compound proposition that is always true for all possible
truth values of the propositions is called a tautology.
• A compound proposition that is always false is called a
contradiction.
• A proposition that is neither a tautology nor contradiction is
called a contingency.
Example: p ∧ ¬p is a contradiction.
p ¬p p ∧ ¬p
T F F
F T F
Equivalence
• We have seen that some of the propositions are equivalent.
Their truth values in the truth table are the same.
• Example: p → q is equivalent to ¬q → ¬p (contrapositive)
p q p→q ¬q → ¬p
T T
T F
F T
F F
Equivalence
• We have seen that some of the propositions are equivalent.
Their truth values in the truth table are the same.
• Example: p → q is equivalent to ¬q → ¬p (contrapositive)
p q p→q ¬q → ¬p
T T T
T F F
F T T
F F T
• .
Equivalence
• We have seen that some of the propositions are equivalent.
Their truth values in the truth table are the same.
• Example: p → q is equivalent to ¬q → ¬p (contrapositive)
p q p→q ¬q → ¬p
T T T T
T F F F
F T T T
F F T T
Logical equivalence
• Definition: The propositions p and q are called logically
equivalent if p ↔ q is a tautology (alternately, if they have the
same truth table). The notation p <=> q denotes p and q are
logically equivalent.
• p → q is equivalent to ¬q → ¬p (contrapositive)
(p → q) ↔
p q p→q ¬q → ¬p
(¬q → ¬p)
T T T T T
T F F F T
F T T T T
F F T T T
Logical equivalence
• Definition: The propositions p and q are called logically
equivalent if p ↔ q is a tautology (alternately, if they have the
same truth table). The notation p <=> q denotes p and q are
logically equivalent.
Important equivalences:
• DeMorgan's Laws:
• 1) ¬( p ∨ q ) <=> ¬p ∧ ¬q
• 2) ¬( p ∧ q ) <=> ¬p ∨ ¬q
Equivalence
• Definition: The propositions p and q are called logically
equivalent if p ↔ q is a tautology (alternately, if they have the
same truth table). The notation p <=> q denotes p and q are
logically equivalent.
Equivalence
Example of important equivalences
• DeMorgan's Laws:
• 1) ¬( p ∨ q ) <=> ¬p ∧ ¬q
• 2) ¬( p ∧ q ) <=> ¬p ∨ ¬q
Equivalence
Example of important equivalences
• DeMorgan's Laws:
• 1) ¬( p ∨ q ) <=> ¬p ∧ ¬q
• 2) ¬( p ∧ q ) <=> ¬p ∨ ¬q
• Domination
– p ∨ T <=> T
– p ∧ F <=> F
• Idempotent
– p ∨ p <=> p
– p ∧ p <=> p
• Commutative
– p ∨ q <=> q ∨ p
– p ∧ q <=> q ∧ p
• Associative
– (p ∨ q) ∨ r <=> p ∨ (q ∨ r)
– (p ∧ q) ∧ r <=> p ∧ (q ∧ r)
Important logical equivalences
• Distributive
– p ∨ (q ∧ r) <=> (p ∨ q) ∧ (p ∨ r)
– p ∧ (q ∨ r) <=> (p ∧ q) ∨ (p ∧ r)
• De Morgan
– ¬( p ∨ q ) <=> ¬p ∧ ¬q
– ¬( p ∧ q ) <=> ¬p ∨ ¬q
p q p∧q (p ∧ q)→p
T T T T
T F F T
F T F T
F F F T
Using logical equivalences
• Equivalences can be used in proofs. A proposition or its part
can be transformed using equivalences and some conclusion
can be reached.