oct 18
resolution in FOL
Here are the steps, as described in the text, pg 296 and following,
to convert a first order logic sentence to CNF form and then apply
our resolution procedure.
(1) eliminate implications.
- as in predicate logic, (A => B) becomes ((not A) or B)
(2) move "not" inwards
- rules are
- (not (forall (x) S)) becomes (exists (x) (not S))
- (not (exists (x) S)) becomes (forall (x) (not S))
- and from predicate logic
- (not (A and B)) becomes ((not A) or (not B))
- (not (A or B)) becomes ((not A) and (not B))
(3) make sure there are no duplicate dummy variable names in sentences
- this ((forall (x) funky(x)) or (forall (x) weird(x)))
- becomes ((forall (x) funky(x)) or (forall (y) weird(y)))
(4) skolemize
- replace all "exists" variables with a newly-invented function that depends on the "forall" variables around it. If there are no forall's around it, replace with a newly-invented constant.
(exists (x) P(x)) becomes P(A)
where A is a newly-invented constant.
(forall (y) (exists (x) P(x))) becomes (forall (y) P(A(y)))
where A(y) is the newly-invented function
(5) drop all the universal quantification.
- (forall (y) P(A(y))) becomes P(A(y))
(6) distribute "and", "or" so its (... or ... or ...) and (... or ...)
A or (B and C) becomes (A or B) and (A or C)
"The sentence is now in CNF."
"It is quite unreadable."
Given all this, how do we prove something?
As before:
- add the negation of the proposition to the logic base, and
- try to infer a contradiction.
What are the inference rules?
Again, pretty much as before, we want add new "facts" by combining
existing ones where one term is the negation of the other.
So if our knowldge base has
(A or B) and
(C or not B)
then we want to add a new conclusion
(A or C)
The complication is now that these terms may contain variables and
skolemization functions - the procedure needs to recognize that they
may be unified, find the subsitution that unifies them, apply the substitution,
and then add the new "fact". The variable substitution (the "unification")
must be applied to the whole line.
For example, if the database is
Animal(F(x)) or Loves(G(x),x)
not Kills(u,v) or not Loves(u,v)
then the unification is (u -> G(x), v -> x)
and the new sentence to add to the database is
Animal(F(x)) or not Kills(G(x), x))
Be clear that doing this means looping over all pairs in two different lines
and searching for any possible unification - this is in general a big search.
book example - page 299
run through this example
forward, backward, and resolution
- forward chaining
- only works for "A and B => C" forms with universal quantification.
- start from assumptions and draw conclusions
- problem: number of things known blows up
- backward chaining
- start from goal
- "unify" with statements in database to produce new goals
- depth-first; may get stuck
- prolog
- proud example, in both prolog and clisp+snark
- discuss infinite loop issue described on pg 292
- resolution
- any FOL
- complete
- ... but how quickly it gets there is another issue
- lots of tricks (some described in text) for improving efficiency
chap 10 - knowledge representation in the large
- lots of specifics about trying to encode "real-life" information
- categories
- time
- space
- events
- semantics - see pg 351
- closed world vs open world
- truth maintence
- maintain proof of every derived fact
- ... so you can remove once that are no longer true when assumptions change
examples in the wild
- open cyc notes
- semantic web notes