Added complement function (designed for relations) and several helper methods involving conversion between ProductSet tuples and sets.