% the murderer had brown hair: murderer(X) :- hair(X, brown). % mr_holman had a ring: attire(mr_holman, ring). % mr_pope had a watch: attire(mr_pope, watch). % If sir_raymond had tattered cuffs then mr_woodley had the pincenez: attire(mr_woodley, pincenez) :- attire(sir_raymond, tattered_cuffs). % and vice versa: attire(sir_raymond,pincenez) :- attire(mr_woodley, tattered_cuffs). % A person has tattered cuffs if he is in room 16: attire(X, tattered_cuffs) :- room(X, 16). % A person has black hair if he is in room 14, etc: hair(X, black) :- room(X, 14). hair(X, grey) :- room(X, 12). hair(X, brown) :- attire(X, pincenez). hair(X, red) :- attire(X, tattered_cuffs). % mr_holman was in room 12, etc: room(mr_holman, 12). room(sir_raymond, 10). room(mr_woodley, 16). room(X, 14) :- attire(X, watch).