let do_forall xs p =
    if F.pred_has_var xs p
    then
      let ys = List.filter (fun y -> F.pred_has_var [y] p) xs in
      if ys = [] then p
      else
        F.p_forall ys (guards_with F.p_implies p ys)
    else p