I am trying to create a predicate able to list every possible couple from a set of man and woman. But my trials return me true even if the man or woman does not belong to my knowledge base.
man(al).
man(john).
woman(elsa).
woman(julia).
couple(man(_),woman(_)).
Query:
?- couple(X,Y).
Answer:
X: al
Y: elsa
X: al
Y: julia
X: john
Y: elsa
...
NOTE: I'm using SWI-Prolog.