I'm new to prolog. The idea of my project is to say "The room X is free if none is a guest of X, while X is taken if a family lives in X". I use a predicate
guest(FamilySurname,RoomTaken)
So this mean that a family has taken that room.
taken(X) :- guest(_,X).
So if a family lives in room X, then X is taken.
My problem is how could i say that the room X is free? I should use a kind of NOT, like:
free(X) :- "NOT EXIST" guest(_,X).
How could i translate that "NOT EXIST" in prolog? I have tried with ! but it doesn't work properly... maybe I'm placing it in the wrong way.
Sorry for my english.