0% found this document useful (0 votes)
33 views

Inference in FOL

Nothing

Uploaded by

AHMAD BHATTI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Inference in FOL

Nothing

Uploaded by

AHMAD BHATTI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Inference in First-Order Logic

In First-Order Logic, inference is used to derive new facts or sentences from existing ones.
Before we get into the FOL inference rule, it's important to understand some basic FOL
terminology.

Substitution:

Substitution is a basic procedure that is applied to terms and formulations. It can be found in all
first-order logic inference systems. When there are quantifiers in FOL, the substitution becomes
more complicated. When we write F[a/x], we are referring to the substitution of a constant "a"
for the variable "x."

Equality:

In First-Order Logic, atomic sentences are formed not only via the use of predicate and words,
but also through the application of equality. We can do this by using equality symbols, which
indicate that the two terms relate to the same thing.

Example: Brother (John) = Smith.

In the above example, the object referred by the Brother (John) is close to the object referred
by Smith. The equality symbol can be used with negation to portray that two terms are not the
same objects.

Example: ¬(x=y) which is equivalent to x ≠y.

FOL inference rules for quantifier:

First-order logic has inference rules similar to propositional logic, therefore here are some basic
inference rules in FOL:

• Universal Generalization
• Universal Instantiation
• Existential Instantiation
• Existential introduction

1. Universal Generalization:

• Universal generalization is a valid inference rule that states that if premise P(c) is true for
any arbitrary element c in the universe of discourse, we can arrive at the conclusion x P.
(x).
• It can be represented as:
• If we want to prove that every element has a similar property, we can apply this rule.
• x must not be used as a free variable in this rule.

Example: Let's represent, P(c): "A byte contains 8 bits", so "All bytes contain 8 bits."for ∀ x
P(x) , it will also be true.

2. Universal Instantiation:

• A valid inference rule is universal instantiation, often known as universal elimination or


UI. It can be used to add additional sentences many times.
• The new knowledge base is logically equal to the existing knowledge base.
• We can infer any phrase by replacing a ground word for the variable, according to
UI
• The UI rule say 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.
• It can be represented as

3. Existential Instantiation:

• Existential instantiation is also known as Existential Elimination, and it is a legitimate


first-order logic inference rule.
• It can only be used to replace the existential sentence once.
• Although the new KB is not conceptually identical to the old KB, it will be satisfiable if
the old KB was.
• This rule states that for a new constant symbol c, one can deduce P(c) from the formula
given in the form of x P(x).
• The only constraint with this rule is that c must be a new word for which P(c) is true.
• It's written like this:

4. Existential introduction

• An existential generalization is a valid inference rule in first-order logic that is also


known as an existential introduction.
• This rule argues that if some element c in the universe of discourse has the property P, we
can infer that something in the universe has the attribute P.
• It's written like this:

• Example: Let's say that,


"Priyanka got good marks in English."
"Therefore, someone got good marks in English."

What is Unification?
o Unification is a process of making two different logical atomic expressions identical by finding a
substitution. Unification depends on the substitution process.
o It takes two literals as input and makes them identical using substitution.
o Let Ψ1 and Ψ2 be two atomic sentences and 𝜎 be a unifier such that, Ψ1𝜎 = Ψ2𝜎, then it can be
expressed as UNIFY(Ψ1, Ψ2).
o Example: Find the MGU for Unify{King(x), King(John)}

Let Ψ1 = King(x), Ψ2 = King(John),

Substitution θ = {John/x} is a unifier for these atoms and applying this substitution, and both
expressions will be identical.

o The UNIFY algorithm is used for unification, which takes two atomic sentences and returns a
unifier for those sentences (If any exist).
o Unification is a key component of all first-order inference algorithms.
o It returns fail if the expressions do not match with each other.
o The substitution variables are called Most General Unifier or MGU.

You might also like