public static function cardinalityEqualsVariety($set) {
		$tonesInSet = \ianring\BitmaskUtils::countOnBits($set);

		// this is every possible way that a set of N things can be arranged, excluding rotational duplicates.
		$patterns = self::getUniqueSubsetPatterns($tonesInSet);

		foreach ($patterns as $pattern) {
			$cardinality = \ianring\BitmaskUtils::countOnBits($pattern);

			if ($pattern == 0) {
				continue;
			}
			$mapped = \ianring\BitmaskUtils::mapTo($pattern, $set); // using the pattern like [0,1,2], we map it to tones in the set, like [C,D,E]

			// this fancy method does a lot of work to get the number of different interval patterns
			$variety = self::getVariety($set, $mapped);

			// does cardinality equal variety? Here's where we find out.
			if ($cardinality !== $variety) {
				return false;
			}
		}

		// if we've tried every pattern and CV is true for them all, then we have a winner!
		return true;
	}