Horn Clauses
Horn clause: at most one unnegated literal
(X V Y) is not a Horn clause.
(Y V ~Z) is a Horn clause.
“If X is the mother of Y and Y is a parent of Z, then
X is a grandmother of Z.”
(m(X,Y) & p(Y, Z)) -> g(X,Z).
grandmother(X, Z) provided mother(X, Y) and parent (Y, Z)
g(X,Z) :- m(X,Y), p(Y,Z). ; Edinburgh Prolog syntax
grandmother(X, Z) :- % head
mother(X, Y), % subgoal 1
parent(Y, Z). % subgoal 2