## 5.201. lex_lesseq_allperm

Origin
Constraint

$\mathrm{𝚕𝚎𝚡}_\mathrm{𝚕𝚎𝚜𝚜𝚎𝚚}_\mathrm{𝚊𝚕𝚕𝚙𝚎𝚛𝚖}\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1},\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}\right)$

Synonym

$\mathrm{𝚕𝚎𝚡𝚒𝚖𝚒𝚗}$.

Arguments
 $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$ $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$
Restrictions
 $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1},\mathrm{𝚟𝚊𝚛}\right)$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2},\mathrm{𝚟𝚊𝚛}\right)$ $|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1}|=|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}|$
Purpose

$\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1}$ is lexicographically less than or equal to all permutations of $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}$. Given two vectors, $\stackrel{\to }{X}$ and $\stackrel{\to }{Y}$ of $n$ components, $〈{X}_{0},...,{X}_{n-1}〉$ and $〈{Y}_{0},...,{Y}_{n-1}〉$, $\stackrel{\to }{X}$ is lexicographically less than or equal to $\stackrel{\to }{Y}$ if and only if $n=0$ or ${X}_{0}<{Y}_{0}$ or ${X}_{0}={Y}_{0}$ and $〈{X}_{1},...,{X}_{n-1}〉$ is lexicographically less than or equal to $〈{Y}_{1},...,{Y}_{n-1}〉$.

Example
$\left(\begin{array}{c}〈1,2,3〉,\hfill \\ 〈3,1,2〉\hfill \end{array}\right)$

The $\mathrm{𝚕𝚎𝚡}_\mathrm{𝚕𝚎𝚜𝚜𝚎𝚚}_\mathrm{𝚊𝚕𝚕𝚙𝚎𝚛𝚖}$ constraint holds since vector $〈1,2,3〉$ is lexicographically less than or equal to all the permutations of vector $〈3,1,2〉$ (i.e., $〈1,2,3〉$, $〈1,3,2〉$, $〈2,1,3〉$, $〈2,3,1〉$, $〈3,1,2〉$, $〈3,2,1〉$).

Symmetry

All occurrences of two distinct values in $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1}.\mathrm{𝚟𝚊𝚛}$ or $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}.\mathrm{𝚟𝚊𝚛}$ can be swapped; all occurrences of a value in $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1}.\mathrm{𝚟𝚊𝚛}$ or $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}.\mathrm{𝚟𝚊𝚛}$ can be renamed to any unused value.

Remark

The $\mathrm{𝚕𝚎𝚡}_\mathrm{𝚕𝚎𝚜𝚜𝚎𝚚}_\mathrm{𝚊𝚕𝚕𝚙𝚎𝚛𝚖}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1},\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2}\right)$ can be reformulated as the conjunction $\mathrm{𝚜𝚘𝚛𝚝}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{2},\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\right)$, $\mathrm{𝚕𝚎𝚡}_\mathrm{𝚕𝚎𝚜𝚜𝚎𝚚}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\mathtt{1},\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\right)$.

Systems

leximin in Choco.

Used in