Two common rules for reasoning over predicate logic representations rely on a simple rule from propositional logic involving implication, extended for reasoning with variables:
man(Marcus) p
x
man(x) implies person(x)
p -> q
person(Marcus) q
not( person(Lassie) ) q'
x
man(x) implies person(x) p -> q
not( man(Lassie) ) not p
Universal Instantiation (UI) states that we can infer any sentence obtained by substituting a ground term for the variable
Thus, the reason we can conclude likes(Margaret,March) is not immediately related to the demonstration we on Monday, but instead is related to:
likes( Schafer, Basketball ) [mp 1,S1]
childOf( Margaret, Schafer ) [mp 5,S4]
likes( Margaret, Basketball ) [mp 8,7,S2]
likes( Margaret, March ) [mp 9,S4]
What is the problem with UI? Well, if there are too many ground terms, you end up with too much information...
The fact is, with the 7 ground terms we have above (Schafer, Margaret, Wallingford, Sarah, Letterman, March, Basketball), 2 unary universal rules, and 2 binary universal rules, we end up with
2x7 + 2x72 = 112 derived rules
The forward chaining of this is fairly straightforward and is not reproduced here.
Conclude
likes(Margaret,March)
In 4, bind "y=Margaret"
This is valid if we can prove that likes(Margaret,Basketball) is true.
We could arrive at this by either showing
We are unable to use any rule/fact to show the first part.
We can arrive at childOf(Margaret,z) if we can show DaugherOf(Margaret,z) (rule #7).
We can arrive at likes(z,Basketball) if we can show hoosier(z) (rule #2)
Rule #1 allows us to bind (z=Schafer).
Rule #5 allows us to bind (z=Schafer).
Thus, we can conclude likes(Schafer,Basketball) and childOf(Margaret,Schafer).
Thus, we can conclude likes(Margaret,Basketball).
Thus, we can conclude likes(Margaret,March).
Related to UI is Existential Instantiation (EI). This is more complicated. It states that we can infer any sentence obtained by substituting a constant symbol k that does not appear elsewhere in the knowledge base for the variable:
As long as K does not exist somewhere else in the KB