Slide 14.6: Examples of Horn clauses Slide 14.8: Resolution Home |
x is a grandparent of y if x is the parent of someone who is the parent of y.Translating this into first-order predicate calculus, we get
for all x, for all y, ( there exists z, parent( x, z ) and parent( z, y ) ) → grandparent(x, y).As a Horn clause this is expressed simply as
parent( x, z ) and parent( z, y ) → grandparent( x, y ).
For all x, if x is a mammal then x has two or four legs.
Translating this into predicate calculus, we get
for all x, mammal( x ) → legs( x, 2 ) or legs( x, 4 ).
This may be approximated by the following Horn clauses:
mammal( x ) and not legs( x, 2 ) → legs( x, 4 ). mammal( x ) and not legs( x, 4 ) → legs( x, 2 ).