[ library(COLIBRI_DOC) | ]

X #\= Y

X is not equal to Y.
X
An integer term.
Y
An integer term.

Description

This constraints exists also in a reified form, (X #\= Y) #= Bool, where Bool is an int variable ranging in 0..1.

Fail Conditions

Fails if the domains of the two terms cannot satisfy the inequality.

Resatisfiable

no

Examples

Success:
    int_vars(int,X), X #: 2 .. 10, X #\= 5.
    (gives X = _436{[2 .. 4, 6 .. 10]})

    int_vars(int,[X,Y]), X #: 1 .. 10, Y #: 15 .. 20, X #\= Y.
    (domains intersection is empty)

Fail:
    int_vars(int,[X,Y]), X #: 1 .. 10, Y #: 15 .. 20, X #= Y, X #\= Y.

See Also

#= / 2