Knowledge Representation Using FOL Inference in FOL
Knowledge Representation Using FOL Inference in FOL
• Elements of FOL
• Complex Sentences:
• Complex sentences are made by combining atomic sentences using
connectives.
12/7/2022 MCSE601L-AI by Dr.Siva Sankari S 6
First Order Logic
•Ex:
•All birds fly
•Every man respects his parent
•Not all students like both Mathematics and Science
•Ex:
•All birds fly : ∀x bird(x) →fly(x).
•Every man respects his parent : ∀x man(x) → respects (x, parent).
•Not all students like both Mathematics and Science :
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)]
• Existential Introduction
Priyanka got good marks in English
Someone got good marks in english
This rule can be used if we want to show that every element has
a similar property
In this rule, x must not appear as a free variable.
Example: Let's represent, P(c): "A byte contains 8 bits",
so for ∀ x P(x) "All bytes contain 8 bits.",
it will also be true.
12/7/2022 MCSE601L-AI by Dr.Siva Sankari S 18
Inference in First Order Logic
Universal Instantiation
• Universal instantiation is also called as universal elimination or UI is a
valid inference rule. It can be applied multiple times to add new
sentences.
• The new KB is logically equivalent to the previous KB.
• As per UI, we can infer any sentence obtained by substituting a ground
term for the variable.
• The UI rule state that we can infer any sentence P(c) by substituting a
ground term c (a constant within domain x) from ∀ x P(x) for any
object in the universe of discourse.
Example:
• IF "Every person like ice-cream"=> ∀x P(x)
so we can infer that "John likes ice-cream" => P(c)
12/7/2022 19
Inference in First Order Logic
Example:
∃x Crown(x) ∧ OnHead(x, John)
can infer:
Crown(K) ∧ OnHead( K, John), as long as K does not appear in the knowledge
12/7/2022 21
base
Inference in First Order Logic
Existential Introduction
• An existential introduction is also known as an existential
generalization, which is a valid inference rule in first-order
logic
• This rule states that if there is some element c in the universe
of discourse which has a property P, then we can infer that
there exists something in the universe which has the property P
Example:
Priyanka got good marks in English
Can infer someone got good marks in English
12/7/2022 MCSE601L-AI by Dr.Siva Sankari S 22
Inference in First Order Logic
Paramodulation
From P(a) and a=b derive P(b)
Generalized Modus Ponens
P implies Q and P is asserted to be true, therefore Q
must be True."
According to Modus Ponens,
for atomic sentences pi, pi', q.
Where there is a substitution θ such that
SUBST (θ, pi',) = SUBST(θ, pi)
12/7/2022 MCSE601L-AI by Dr.Siva Sankari S 23
Inference in First Order Logic