Here are examples of how to use monotonic predicates instead of impure, non-monotonic constructs in your programs:
dif/2 is meant to be used instead of non-monotonic constructs like (\=)/2!/0 almost always leads to non-monotonic programs and should be avoided entirely.