predicates
% pair(symbol,symbol)
iskiller(symbol,symbol)
male(symbol)
female(symbol)
isvictim(symbol)
not_at_bar(symbol,symbol)
not_at_beach(symbol,symbol)
not_alone(symbol)
twin(symbol,symbol)
younger(symbol,symbol)
child(symbol)
clauses
male(husband).
male(brother).
male(son).
female(alice).
female(daughter).
twin(brother,alice).
twin(son,daughter).
child(son).
child(daughter).
not_alone(
not_alone(alice).
not_alone(brother).
not_alone(X):-
child(X),child(Y)
not_at_beach(husband,alice).
not_at_beach(son,daughter).
not_at_bar(son,daughter).
not_at_bar(husband,alice).
not_at_bar(X,Y):-
male(X),male(Y).
not_at_bar(X,Y):-
female(X),female(Y).
isvictim(X):-
twin(X,Y),not(iskiller(Y,X)).
isvictim(X):-
twin(Y,X),not(iskiller(Y,X)).
younger(son,alice).
younger(son,husband).
younger(daughter,alice).
younger(daughter,husband).
iskiller(X,Y):-
not(alone(X)),
younger(X,Y),
not(not_at_beach(X,Y)),
not(not_at_bar(X,Y)).