In Artificial Intelligence (AI), particularly in Knowledge Representation and Reasoning (KRR), inference rules in First Order Logic (FOL) are used to derive new knowledge from existing knowledge (facts and rules). These inference rules enable automated reasoning systems (like logic engines or theorem provers) to simulate intelligent behavior.
FOL extends Propositional Logic by:
Introducing quantifiers:
Universal (∀): "for all"
Existential (∃): "there exists"
Allowing variables, functions, and predicates, enabling expression of more complex statements.
Here are the core inference rules used in FOL:
From a universally quantified statement, infer the statement for a specific individual.
Rule:
∀x P(x) ⟹ P(a)
Example:
∀x Human(x) → Mortal(x)
⟹ Human(Socrates) → Mortal(Socrates)
From an existential statement, introduce a specific but arbitrary constant (Skolem constant).
Rule:
∃x P(x) ⟹ P(c), wherec
is a new constant
Example:
∃x Loves(x, Juliet)
⟹ Loves(Romeo, Juliet) (assuming Romeo is the chosen constant)
From a statement about an arbitrary individual, infer a universal statement.
Rule:
P(x) (for arbitrary x) ⟹ ∀x P(x)
Note: Only valid when x
is not dependent on any assumptions.
From a specific instance, infer that the property holds for at least one element.
Rule:
P(a) ⟹ ∃x P(x)
Example:
Mortal(Socrates) ⟹ ∃x Mortal(x)
Classic inference from propositional logic, also valid in FOL.
Rule:
P, P → Q ⟹ Q
Example:
Human(Socrates), Human(x) → Mortal(x) ⟹ Mortal(Socrates)
Main rule used in automated theorem proving. It requires all statements to be in clause form (Conjunctive Normal Form).
Rule:
From: (A ∨ B), (¬B ∨ C) ⟹ (A ∨ C)
Steps Involved:
Convert statements to prenex form
Eliminate implications, move quantifiers outward
Skolemization (remove existential quantifiers)
Convert to CNF
Apply resolution recursively until contradiction or solution found
Given:
∀x (Human(x) → Mortal(x))
Human(Socrates)
Goal: Prove Mortal(Socrates)
Apply UI on (1): Human(Socrates) → Mortal(Socrates)
Apply MP using (2): ⟹ Mortal(Socrates)
Theorem proving
Expert systems
Natural language understanding
Planning and problem-solving