[ library(ic_global_gac) | Reference Manual | Alphabetic Index ]
# lex_le(+List1, +List2)

List1 is lexicographically less or equal to List2
*List1*
- List of integers or domain variables
*List2*
- List of integers or domain variables

## Description

Imposes a lexicographic ordering between the two lists.
I.e. either is the first element of List1 strictly smaller
than the first element of List2, or the first elements are
equal and the lexicographic order holds between the two list
tails. A non-existing element (i.e. when the end of list is
reached)is strictly smaller than any existing element.
This is currently a prototype -- the constraint has not been tested
very extensively and little effort has been spent to optimise performance.
We welcome any feedback on using this constraint.

This constraint is known as lex_lesseq in the global constraint
catalog. The implementation here maintains generalised arc
consistency and uses the algorithm described in:
Z. Kiziltan, 'Symmetry Breaking Ordering Constraints, Ph.D thesis,
Uppsala University, 2004.