This will succeed with X = 3 after some search. In this example, both the member/2 goal and the inequality goal could be considered `constraints on X' because they both restrict the possible values for X. Usually, however, member/2 would not be considered a “constraint” because of its backtracking (search) behaviour:?- member(X, [5,7,3,4]), X =< 4.
Also, the standard Prolog inequality would not be considered a “constraint”, because if invoked on its own it will raise an error:?- member(X, [5, 7, 3, 4]). X = 5 More (0.00s cpu) X = 7 More (0.04s cpu)
In the following, we will call a predicate a constraint only if it?- X =< 4. instantiation fault in X =< 4