[ library(COLIBRI_DOC) | ]
X and Y
X is true and Y is true.
- X
- A "boolean" integer term (range 0..1).
- Y
- A "boolean" integer term (range 0..1).
Description
This constraints exists also in a reified form, (X and 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 logical operator.
Resatisfiable
no
Examples
Success:
int_vars(int,[X,Y]), X and Y.
(gives X = 1, Y = 1)
int_vars(int,[X,Y,B]), X and Y #= B, X #\= B.
(gives X = 1, Y = 0, B = 0)
Fail:
int_vars(int,[X,Y,B]), X and Y #= B, X #= Y, X #\= B.
See Also
neg / 1, or / 2, xor / 2, => / 2, ite / 3