let is_allowed vi (n : int) (m : int) (neg_ctrs, _ : t_vi_ctrs) =
let rec is_allowed_rec = function
| (nn,mm)::tail ->
(* TODO:
* could be done faster, by looking up nn and mm at the same time *)
let nn = rep vi nn in
let mm = rep vi mm in
if (nn=n && mm=m) || (nn=m && mm=n) then
false
else
is_allowed_rec tail
| [] -> true
in
is_allowed_rec neg_ctrs