“Not equal” sign in Visual Prolog? I don’t know what do you mean by “not equal” (does not unify?), but you could try these: X \= Y not(X = Y) \+ (X = Y) Related Posts: What does \+ mean in Prolog? singleton variables in prolog Prolog – Arguments are not sufficiently instantiated ‘if’ in prolog? “Syntax error: Operator expected” in Prolog The SQL OVER() clause – when and why is it useful? How to override equals method in Java How do I append lists in Prolog? How to check if my string is equal to null? Reversing a List in Prolog difference between equals() and hashCode() Why are two empty ArrayLists with different generic types equal? List Length in Prolog Prolog “or” operator, query