The real *individual* distinct constraint. x is a var that now is bound to
a single value. y* were the non-singleton bound vars that existed at the
construction of the constraint. n* is the set of singleton domain values
that existed at the construction of the constraint. We use categorize to
determine the current non-singleton bound vars and singleton vlaues. if x
is in n* or the new singletons we have failed. If not we simply remove
the value of x from the remaining non-singleton domains bound to vars.
A finite domain constraint that will guarantee that
all vars that occur in v* will be unified with unique
values. v* need not be ground. Any vars in v* should
eventually be given a domain.
The real distinct constraint. v* can be seq of logic vars and
values or it can be a logic var itself. This constraint does not
run until v* has become ground. When it has become ground we group
v* into a set of logic vars and a sorted set of known singleton
values. We then construct the individual constraint for each var.
Construct a domain for assignment to a var. Arguments should
be integers given in sorted order. domains may be more efficient
than intervals when only a few values are possible.
If x is a var we update its domain. If it's an integer
we check that it's a member of the given domain. dom is
then new domain, it should have already been calculated from
domp which was the previous domain.