Function representation of sets