this repo has no description
at develop 965 B view raw
1%-----------------------------------------------------------------------------% 2% Requires that the array 'x' is strictly lexicographically less than array 'y'. 3% Compares them from first to last element, regardless of indices 4%-----------------------------------------------------------------------------% 5 6predicate fzn_lex_less_float(array[int] of var float: x, 7 array[int] of var float: y) = 8 let { int: lx = min(index_set(x)), 9 int: ux = max(index_set(x)), 10 int: ly = min(index_set(y)), 11 int: uy = max(index_set(y)), 12 int: size = max(ux - lx, uy - ly), 13 array[0..size+1] of var bool: b } 14 in 15 b[0] 16 /\ 17 forall(i in 0..size) ( 18 b[i] = ( x[lx + i] <= y[ly + i] 19 /\ 20 (x[lx + i] < y[ly + i] \/ b[i+1]) ) 21 ) 22 /\ 23 b[size + 1] = (ux - lx < uy - ly); 24 25%-----------------------------------------------------------------------------%