let rec for_all p a  =
  p a && 
  match a with
    | Var _ -> true
    | App(_, l) -> List.for_all (for_all p) l