let p_exists x p =
  match val_of p with
    | Ptrue | Pfalse | Papp ("dummy",_) -> p
    | _ -> Pexists(x,p)