## 5.224. neq

Origin

Arithmetic.

Constraint

$\mathrm{𝚗𝚎𝚚}\left(\mathrm{𝚅𝙰𝚁}\mathtt{1},\mathrm{𝚅𝙰𝚁}\mathtt{2}\right)$

Synonym

$\mathrm{𝚛𝚎𝚕}$.

Arguments
 $\mathrm{𝚅𝙰𝚁}\mathtt{1}$ $\mathrm{𝚍𝚟𝚊𝚛}$ $\mathrm{𝚅𝙰𝚁}\mathtt{2}$ $\mathrm{𝚍𝚟𝚊𝚛}$
Purpose

Enforce the fact that two variables are not equal.

Example
$\left(1,8\right)$

The $\mathrm{𝚗𝚎𝚚}$ constraint holds since 1 is not equal to 8.

Symmetries
• Arguments are permutable w.r.t. permutation $\left(\mathrm{𝚅𝙰𝚁}\mathtt{1},\mathrm{𝚅𝙰𝚁}\mathtt{2}\right)$.

• A value in $\mathrm{𝚅𝙰𝚁}\mathtt{1}$ or $\mathrm{𝚅𝙰𝚁}\mathtt{2}$ can be renamed to any unused value.

Systems

neq in Choco, rel in Gecode, #\= in SICStus.

generalisation: $\mathrm{𝚗𝚎𝚚}_\mathrm{𝚌𝚜𝚝}$ ($\mathrm{𝚌𝚘𝚗𝚜𝚝𝚊𝚗𝚝}$ added), $\mathrm{𝚗𝚘𝚝}_\mathrm{𝚊𝚕𝚕}_\mathrm{𝚎𝚚𝚞𝚊𝚕}$.