Functions to expand variables in self-referential sets
