let pp fmt s =
if not(is_empty s) then
let m = partition s in
let l = Map.fold
(fun x ys acc ->
match Set.elements ys with
| [_] -> acc (* restrict may lead to singleton sets. *)
| yl -> (x, yl) :: acc)
m []
in
Pretty.string fmt "\nv:";
Pretty.list
(fun fmt (x, ys) ->
Term.pp fmt x;
Pretty.string fmt ":";
Pretty.set Term.pp fmt ys)
fmt l