Implement empty, in-set-p and intersection.