The constraints in/2, #=/2, #\=/2, #</2, #>/2, #=</2, and #>=/2 can be reified, which means reflecting their truth values into Boolean values represented by the integers 0 and 1. Let P and Q denote reifiable constraints or Boolean variables, then:
#\
QTrue iff Q is false P #\/
QTrue iff either P or Q P #/\
QTrue iff both P and Q P #\
QTrue iff either P or Q, but not both P #<==>
QTrue iff P and Q are equivalent P #==>
QTrue iff P implies Q P #<==
QTrue iff Q implies P
The constraints of this table are reifiable as well.
When reasoning over Boolean variables, also consider using CLP(B)
constraints as provided by
library(clpb)
.