4 Predicate Logic
4 Predicate Logic
Predicate Logic
Predicate Logic
Logic
•The logical formalism of a language is useful because it
immediately suggests a powerful way of deriving new knowledge
from old using mathematical deduction.
•In this formalism, we can conclude that a new statement is true
by proving that it follows from the statements that are already
known.
Proposition
•A proposition is a statement, or a simple declarative sentence.
•For example, “the book is expensive” is a proposition.
•A proposition can be either true or false.
Propositional logic
•Logical constants: true, false
•Propositional symbols: P, Q, S,... (atomic
sentences)
•Propositions are combined by connectives:
•Propositional logic is a simple language useful for
showing key ideas and definitions.
Thus since each clause is a separate conjunct and since all the
variables are universally quantified, there need be no relationship
between the variables of two clauses, even if they were generated
from the same wff.
Algorithm: Propositional Resolution
1.Convert all the propositions of F to clause form.
2.Negate P and convert the result to clause form. Add it to the
set of clauses obtained in step 1.
3.Repeat until either a contradiction is found or no progress can
be made:
a.Select two clauses. Call these the parent clauses.
b.Resolve them together. The resulting clause, called the resolvent,
will be the disjunction of all of the literals of both of the parent
clauses with the following exception: If there are any pairs of literals L
and ¬ L such that one of the parent clauses contains L and the other
contains ¬L, then select one such pair and eliminate both L and ¬ L
from the resolvent.
c.If the resolvent is the empty clause, then a contradiction has
been found. If it is not, then add it to the set of clauses available to
the procedure.
Algorithm: Propositional Resolution
Let’s look at a simple example.
Suppose we are given the axioms shown in the first column of the
figure and we want to prove R.
First we convert the axioms into clause form, as shown in the second
column of the figure.
Then we negate R, producing ¬R, which is already in the clause form.
Then we begin selecting any pairs of clauses to resolve together.
The unification algorithm
Consider the following predicates:
Man(Jhon) and ¬man(Jhon) Complementary predicates
Man(Jhon) and ¬man(Spot) Not complementary predicates