%query: at(o,o). /* Folklore. */ at(X,fido) :- at(X,mary),near(X). at(ta,mary). at(jm,mary). near(jm).