03 Logic3
03 Logic3
03 Logic3
2
Logical Equivalence
3
Logical Equivalence: Proof via Truth Table
¬ ¬ ¬( ∧ ) ¬ ∨¬
4
Equivalence Laws
5
Equivalence Laws
• Commutative: ∨ ≡ ∨ and ∧ ≡ ∧
• Associative:
• ∨ ∨ ≡ ∨ ∨
• ∧ ∧ ≡ ∧ ∧
• Distributive
• ∨ ∧ ≡ ∨ ∧ ∨
• ∧ ∨ ≡ ∧ ∨ ∧
• De Morgan’s: ¬ ∨ ≡ ¬ ∧ ¬ and ¬ ∧ ≡¬ ∨¬
• Absorption: ∨ ∧ ≡ and ∧ ∨ ≡
• Trivial tautology/contradiction: ∨ ¬ ≡ ∧¬ ≡
6
Operator Definitions via Equivalence
7
Defining Operators via Equivalences
• Implication: → ≡ ¬ ∨
• Biconditional implication: ↔ ≡ → ∧ →
• Also, ↔ ≡ ¬ ⊕
• The above three equivalences have already been proved using truth
table
• You can use any of the equivalence laws and the equivalences proved
through truth table to simplify/solve your expressions
8
Example Problem
• Prove that ¬ → ≡ ∧¬
•¬ → ≡ ¬ ¬ ∨ By expanding implication
• ≡ ¬ ¬ ∧ ¬ De Morgan’s Law
• ≡ ∧ ¬ Double negation
9
Example Problem
10
Example Problem
•≡ ∨ ¬ ∨ ∨ ∧¬ ∧ copy over
•≡ ∨ ¬ ∨ ∨ ∧ (¬ ∨ ¬ ∧ Distributive
•≡ ∨ ∨ ∧ (¬ ∨ ¬ ∨ ¬ Tautology and De Morgan
•≡ ∨ ∧ ¬ ∨¬ Domination
• ≡ ∨ ¬ ∨ ¬ Identity
• ≡ ¬ ∨ ¬ ∨ Commutative
• ≡ ¬ ∨ ∨ ¬ Open brackets and re-arrange for same operator (OR)
11
Predicate Logic
• Consider the statement, “Every student of this class has visited Mexico”
• How can we translate this statement into proposition(s)
• Suppose, we have only three students in the class namely Ahmed, Ali and
Yasir
• We can make propositions like
• = Ahmed has visited Mexico
• = Ali has visited Mexico
• = Yasir has visited Mexico
• And the above statement would translate to
• ∧ ∧
• What if class has 50 students?
• Do we make 50 propositions to translate a simple sentence?
12
Predicate Logic
13
Predicate Logic
14
Propositional Functions
15
Examples
16
What Next
17