I am a Prolog newbie. I'm attending an AI course at my university, so we can't use advanced Prolog features: just simple facts and super-simple rules.
I'm having some trouble converting this two sentences to Prolog clauses:
- Everyone who loves all animals is loved by someone.
- Anyone who kills an animal is loved by no one.
I somehow managed to write the second one like this:
loves(X, Y) :- animal(A), \+killed(Y, A).
but even for this one, I'm quite sure it isn't quite right: this rule tells that everyone who didn't kill an animal is loved by everyone, which is the opposite of what I wanted to express.
Any help?