Rewrite symmetrical functions and predicates.