1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
Jip J. Dekker f2a1c4e389 Squashed 'software/mza/' content from commit f970a59b17
git-subtree-dir: software/mza
git-subtree-split: f970a59b177c13ca3dd8aaef8cc6681d83b7e813
2021-07-11 16:34:30 +10:00

22 lines
671 B
MiniZinc

include "lex_lesseq.mzn";
predicate fzn_lex2(array[int, int] of var int: x) =
let {
int: lbx1 = min(index_set_1of2(x)),
int: ubx1 = max(index_set_1of2(x)),
int: lbx2 = min(index_set_2of2(x)),
int: ubx2 = max(index_set_2of2(x))
} in (
forall(i in lbx1 + 1 .. ubx1) (
lex_lesseq([x[i - 1, j] | j in index_set_2of2(x)],
[x[i, j] | j in index_set_2of2(x)]
)
)
/\
forall(j in lbx2 + 1 .. ubx2) (
lex_lesseq([x[i, j - 1] | i in index_set_1of2(x)],
[x[i, j ] | i in index_set_1of2(x)]
)
)
);