let rec has_var xs bindings hints =
    xs <> [] &&
      match bindings with
        | [] ->
            List.exists (fun h -> h#has_var xs) hints
        | b::others ->
            match b with
              | Forall ys | Exists ys ->
                  let xs = List.fold_right sub ys xs in
                  has_var xs others hints
              | Any(y,p) ->
                  F.pred_has_var xs p || has_var (sub y xs) others hints
              | Let(y,t) ->
                  F.term_has_var xs t || has_var (sub y xs) others hints