involution<T> static method

bool involution<T>(
  1. CustomSet<T> a,
  2. CustomSet<T> universal
)

Verifies the Involution Law.

Law: (A')' = A

The complement of the complement of a set equals the original set.

Implementation

static bool involution<T>(CustomSet<T> a, CustomSet<T> universal) {
  final complement1 = SetOperations.complement(a, universal);
  final complement2 = SetOperations.complement(complement1, universal);
  return complement2.equals(a);
}