The Facts:: Limitation of Propositional Logic
The Facts:: Limitation of Propositional Logic
The Facts:: Limitation of Propositional Logic
■ The facts:
– “peter is a man”, “paul is a man”, “john is a man” can be symbolized by
P, Q and R respectively in propositional logic,
■ Can’t draw any conclusions about similarities between
P, Q and R.
■ Better to represent these facts as
– MAN(peter), MAN(paul) and MAN(john).
■ Even more difficult to represent sentences like“All men are
mortal” in propositional logic.
• – Such sentences really need quantification.
■ In Predicate Logic, these limitations are removed to great extent.
■ Predicate Logic is logical extension of propositional logic.
■ First Order Predicate Logic is one where the
quantification is over simple variables.
Predicate Calculus
■ It has three more logical notions as comparedto
propositional calculus.
– Terms
– Predicates
– Quantifiers (universal or existential quantifiers i.e. “for all' and
“there exists”)
■ Term is
– a constant (single individual or concept i.e.,5,john etc.),a variable that stands for
different individuals,
– a function: a mapping that maps n terms to a term i.e., if f is n- place function
■ symbol and: a
Predicate t1,relation that maps
…, tn are terms, then f(t1,n…,
terms
tn) is atoterm.
a truth value true (T)
or false (F).
– LOVE (john , mary)
– LOVE(father(john), john)
– LOVE is a predicate. father is a function.
■ Quantifiers: Variables are used in conjunction with quantifiers.
– There are two types of quantifiers viz.., “there exist” (∃) and “for all”
(∀).
– “every man is mortal” can be representedas (∀x) (MAN(x) →
MORTAL(x)).
Examples
■ A statement “x is greater than y” is represented in predicate
calculus as GREATER(x, y).
■ It is defined as follows:
GREATER( x, y) T , if x > y
= = F,
otherwise
■ The predicate names GREATER takes two terms and map to T
or F depending upon the values of their terms
■ A statement “john loves everyone” is represented as
– (∀x) LOVE(john , x) which maps it to true when x gets instantiated to
actual values.
■ A statement “Every father loves his child” is represented as
– (∀x) LOVE(father(x), x).
– Here father is a function that maps x to his father.
■ The predicate name LOVE takes two terms and map to T or F
depending upon the values of their terms.
Example
Example 1: Translate the text "Every man is mortal.
John is a man. Therefore, John is mortal" into a FOPC
formula.
Solution:Let MAN(x), MORTAL(x) represent that x is a man and
x is mortal respectively.
■
■ John
Everyisman is mortal : (∀x) MAN(john)
a man (MAN(x) → MORTAL(x))
■ John is mortal
: MORTAL(john)
The whole text can: be represented by the following formula.
(∀x) ((MAN(x) → MORTAL(x)) Λ MAN(john))→ MORTAL(john)
Example 2. “ John loves everyone”
∀x: loves(John , x)
• some people like reading and hence they gain good
knowledge”
∃ x: { [person(x)∧ like (x , reading)] gain(x, knowledge) }
• “lord Haggins has a crown on his head”
∃ x: {crown(x)∧onhead (x , Haggins)}
Inference Rules in Predicate Logic
Modus Ponen Rule:
Lemma 1: If α : ( P(x) Q(x) )
(∀x) → Q(c) and
β : P(c) are two formulae, then is a logical
consequence of α and β , where c is a constant.
Modus Tollen Rule:
Lemma 2: If α : (∀x) ( P(x) → Q(x) ) and β :~ Q(c) are
two formulae, then ~ P(c) is a logical consequence of α and
β, where c is a constant.
Example
I. Translate the following English sentences into Predicate Logic
– Everyone is loyal to someone.
– All Romans were either loyal to Caesar or hated him.
– For every number, there is one and only one immediate
successor.
– There is no number for which 0 is immediate successor.
Nested Quantifiers
• We can use both ∀ and ∃ seperately
• Ex: “ everybody loves somebody ”
∀x: ∃y: loves ( x , y)
• Connection between ∀ and ∃
• “ everyone dislikes garlic”
∀ x: ¬ like ( x , garlic )
This can be also said as:
“there does not exists someone who likes garlic”
¬ ∃x: like (x, garlic)
substitution.
● Unification will fail if there are two similar variables present in the
expressions.
a/x
f(z)/g(y)
Unification
• It’s a matching procedure that compares two literals and
discovers whether there exists a set of substitutions that can make
them identical.
• E.g.
John/X andy/z
Unification:
UNIFY(p, q) = unifier θ where SUBST(θ, p) = SUBST(θ, q)
(parents bill (father bill) (mother bill)), (parents bill (father bill) mother
bill)
led
f ai
SUBST = {f(a) / X}
io n
a t
if ic
Ψ1 = p(f(a),
n
U g(Y)), and Ψ 2
= p(f(a), f(a))