# Re: disjunctive constraints, use of ~= ?

From: Ulrich Scholz <scholz_at_inferenzsysteme.informatik.tu-darmstadt.de>
Date: Fri 25 Apr 2003 02:17:29 PM GMT
```Sorry.

Of course you are right in that set-disequality and set-disjointness are not
the same.

I forgot to say that in my case, I solely consider interger sets with
cardinality one, thus all variables are variables of integer sets with
cardinality one, ie

Y subset [1,2,3], #(Y,1).

In this special case, set-disequality and set-disjointness are the same.  But
of course you can generalize my question on general disjunctive constraints.

Uli

On Fri, Apr 25, 2003 at 02:08:53PM +0100, Joachim Schimpf wrote:
> Ulrich Scholz wrote:
> >
> > I would like to formulate disjunctive constraints with set variables
> > (fd_sets).  An example is
> >
> > either X1 disjoint X1 or Y1 disjoint Y2
> >
> > where X1 .. Y2 are interger sets.  Currently, I'm simulating this with ~=
> > (notinstance), eg
> >
> > [X1, Y1] ~= [X2, Y2].
> >
> > This works quite well.
>
> But set-disequality and set-disjointness are not the same!?
>
> ?- X1=[1,2],X2=[1,2],Y1=[1,2],Y2=[1,3],
>    [X1, Y1] ~= [X2, Y2].
>
> X1 = [1, 2]
> Y1 = [1, 2]
> X2 = [1, 2]
> Y2 = [1, 3]
> Yes (0.00s cpu)
>
> ?- X1=[1,2],X2=[1,2],Y1=[1,2],Y2=[1,3],
>    ( X1 disjoint Y1 ; X2 disjoint Y2 ).
>
> No (0.00s cpu)
>

--
Ulrich Scholz