buffalo(bob).
pig(pat).
faster(X,Y) :- buffalo(X), pig(Y).
?- faster(bob, pat).