Unit 1
Part 2
Logical Equivalence
• Identity Laws • Associative Laws
• (p ˅q) ˅ r =p v (q ˅ r)
• (p ˄ q) ˄ r = p ˄ (q ˄ r)
• Domination Laws • Distributive Laws
• P ˅(q ˄r)= (p ˅ q) ˄(p ˅ r)
• p ˄ (q ˅r)= (p ˄q) ˅(p ˄r)
• Idempotent Laws • DeMorgan’s Law
• ~(p ˄q) =~p ˅ ~q
• ~(p ˅ q)= ~p ˄ ~q
• Double Negation Law • Absorption Law
• ~~p = p • p ˅(p ˄ q) = p
• p ˄(p ˅q)=p
• Commutative Law
• p˅ q =q ˅ p • Negation Laws
• p ˅ ~p = T
• p ˄ q = q˄ p • p ˄~p =F
• Show that ~(p->q ) and p ˄ ~q are logically equivalent.
• Solution
• First Method, using truth table
• Second method, using Laws
• ~(p->q) = ~(~p ˅q) ----- De Morgan’s law
• =~ ~p ˄ ~q -----Double Negation Law
• = p ˄ ~q ---- equivalent to RHS
Predicate Logic ---FOPL (First Order Predicate
Logic )
• Proposition Logic is not adequate to express the meaning of the statements in
maths and in natural language.
• For example : computer1 is functioning properly. -- p
• Statements involving variables like : “x> 3” , “x = y+3”
• Consider the following set of statements :
• Siya likes Mango. Siya likes Apple. Siya likes Almonds.
• p q r
SiyaLikes or Likes or P
where P or Likes or SiyaLikes ----- Predicates
P(Mango) P(Apple) P(Almonds)
• Siya likes Mango. Ram likes Apple. Tarun likes Almonds.
• Likes (Siya,Mango)
• Likes (Ram, Apple)
• Likes (Tarun, Almonds)
• “x is greater than 3”
• ∃ x : P(x) ----P is “is greater than 3”
• P(4) ---- True
• P(2) --False
• “x is greater than y”
• P(x,y) --- P is the predicate “is greater than “
• P(2,3) --- False
• P(6,2) --- true
• “x = = y+3”
• Q(x,y)
• Q(1,2) “1= 2+3” --False
• “x=y+z “
• R(x,y,z)
Quantifiers
• All even numbers are divisible by two. ---- ∀x : Even(x) ˄ P(x)
• P(x)--- x is Divisible by two
• Even(x) --- x is even number
• Some even numbers are prime. -- ∃ x : Even(x) ˄ Prime(x)
• There are fruits in the basket. -- ∃ x : Fruit(x) ˄ Basket (x)
• Universal Quantifier -----
• Existential Quantifier ------
• Precedence of Quantifiers
• ∀x P(x) ˅ Q(x) = (∀x P(x)) ˅ Q(x) in place of ∀x (P(x) ˅ Q(x) )
• Binding Variable or Scope of Quantifiers
• (∀x P(x)) ˅ Q(x)
• ∀x (P(x) ˅ Q(x) )
Logical equivalence in Predicate Logic
• ∀x (P(x) ˅ Q(x) ) =∀x P(x) ˅ ∀ x Q(x)
• ~∀x P(x) = ∃x ~P(x) ----there is an x such that P(x) is false. ----True
• ∀x P(x) = for all x, P(x) is true.
• ~ ∃x P(x) = ∀x ~P(x)
• ∃x P(x) --- there is an x such that P(x) is true -----False
• ~ ∃x P(x) --- True ------ For all x, P(x) is false.