[ library(cardinal) | Reference Manual | Alphabetic Index ]

?SetVar1 `/= ?SetVar2

Set inequality constraint
SetVar1
A set variable.
SetVar2
A set variable.

Description

Constrain sets SetVar1 and SetVar2 to be different.

This constraint is suspended until one of the two sets is bound to another set (variable or ground).

Fail Conditions

Fails if SetVar1 and SetVar2 must be the same set.

Resatisfiable

No.

Examples

?- [] `/= [8], [7] `/= [8], [7,8] `/= [8], [7] `/= [7,8].
yes

?- [] `/= [] ; [a] `/= [a] ; [a,b] `/= [b,a].
no

?- sets([X,Y], [],[8,9], [cardinality:1]), X `/= Y, set_labeling([X,Y]).
X = [8], Y = [9] ;
X = [9], Y = [8] ;
no

?- sets([X,Y], [],[8,9], []), X `/= Y, X=Y.
no

?- X `:: [8]+[8,9], [8,9] `/= X, card_labeling([X]).
X = [8] ;
no

See Also

`$ / 2, complement / 2, complement / 3, `= / 2