complementIntersection<T> static method

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

Verifies the Complement Law for Intersection.

Law: A ∩ A' = ∅

The intersection of a set and its complement equals the empty set.

Implementation

static bool complementIntersection<T>(
  CustomSet<T> a,
  CustomSet<T> universal,
) {
  final complement = SetOperations.complement(a, universal);
  return SetOperations.intersection(a, complement).isEmpty;
}