The following constraints implement the basic relationships between two domain values. The constraints require their arguments to come from identical domains, otherwise an error is raised.
For example
?- [X, Y] &:: weekday, X &< Y. X = X{[mo, tu, we, th, fr, sa]} Y = Y{[tu, we, th, fr, sa, su]} Yes (0.00s cpu) ?- X &:: weekday, X &=< we. X = X{[mo, tu, we]} Yes (0.00s cpu)