To prove sibling(clara, X)
, you first need to prove clara \= x
. But that doesn't work because it reduces to \+ clara = X
, were \+
is the infamous negation as failure: Prolog tries to prove clara = X
, which succeeds, and concludes that clara \= X
must therefore be false.
You should either reorder your program to do the \=
check last instead of first, or use dif(clara, X)
.