You are on page 1of 22

Predicate Logic

First Order Logic(FOL)


Propositional logic lacks the expressive power to describe an
environment with many objects concisely

Consider propositions for several students


P1 : Thabo likes meat
P2 : Limpo Likes meat
P3 : Lerato Likes meat
Lets say students who like ,meat are fat. Then you would have
Thabo is fat
Limpho is fat
Lerato is fat

As propositions
Types of logic
Examples

Thabo likes Lineo

Everybody likes Lineo

Everybody likes someone

Nobody likes Lineo

Dogs like meat

Everybody likes his mother


The Transformation Rules

4. Renaming of variables
5. Skolemisation
6. Rearranging wff in prenex form
Reducing the scope of the negation

Example

Not all animals eat meat


4. Renaming of variables

Rename y to z
5. Skolemisation
Existential elimination

Let that x be S
: S is a skolem constant

Examples

Could be
: f(x,y) is a skolem function

Could be
f(x) is a skolem function

Could be

: C1 is a skolem constant and f(x) is a skolem function


6. Rearranging wff in prenex form
Shift all universal quantifiers to the beginning of the sentence

Could be

Universal elimination

All dogs like meat

Could be just dogs like meat


Rule 7 is applied as the last step toward CNF or DNF. When this rule is applied there are
no quantifiers in the expression.
Inference Rules
Unification

Consider
S1 =P(x,y) and and s2 = P(2,4)
It is possible to have S1 such that

S1σ = S2σ

In this case substitution σ = {2/x,4/y}

Consider

With the substitution {Mpho/x} we can deduce Likes(Mpho, Meat}


Generalised Modus Ponens

Example

Ɵ = {John/x}

We can infer Evil(John)


Two strategies
Backward chaining
Forward Chaining

Backward chaining: we start from the goal and form sub goals then prove them
Forward Chaining: Generate new facts until we generate what we want to prove.
The law says that it is a crime for an American to sell weapons to hostile nations. The
country Nono, an enemy of America, has some missiles, and all of its missiles were sold
to it by Colonel West, who is American
Prove that Col. West is a criminal
Backward chaining
Forward Chaining
Generalised Resolution Rule

Remember in propositional logic

In predicate logic

Note that to apply resolution then the expression or Knowledgebase must be in CNF
which translates into clause form.
Resolution Refutation
The proof procedure has the same meaning as in the propositional logic

Example

Prove that John is Evil


Ie Evil (John)

Converting into clause form

So clauses together with the negation of the goal are


,King(John),Greedy(John), Evil(John)
,King(John),Greedy(John), Evil(John)

𝜎 = 𝐽𝑜h𝑛/ 𝑥
¬ 𝐺𝑟𝑒𝑒𝑑𝑦 ( 𝐽𝑜h𝑛 ) ∨ 𝐸𝑣𝑖𝑙 ( 𝐽𝑜h𝑛 ) Greedy(John)

𝐸𝑣𝑖𝑙 ( 𝐽𝑜h𝑛 ) Evil(John)

Nil

You might also like