I'm new to Prolog and need some guidance *(not answers) to get in the right direction. Firstly, I'm trying to solve a logic puzzle. There are triples in the logic. I know how to create negations and members like the following:
member ([_, X, _], Triples ),
\+ member([_, X, Y], Triples).
Where I am stuck and not quite understanding Prolog is how to compare members (using inequalities) based on their relationships. For example, X was eaten later in the week than the Y.
Given an unknown "_" [_,X,_], I want to make sure [_,X,_] is greater than [_,Y,_].
So I have tried
([_,X,_], Triple) > ([_,Y,_], Triple),
But it doesn't seem to work?
Thanks for the guidance!