distributiveIntersection<T> static method
Verifies the Distributive Law for Intersection over Union.
Law: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
Intersection distributes over union.
Implementation
static bool distributiveIntersection<T>(
CustomSet<T> a,
CustomSet<T> b,
CustomSet<T> c,
) {
final left = SetOperations.intersection(a, SetOperations.union(b, c));
final right = SetOperations.union(
SetOperations.intersection(a, b),
SetOperations.intersection(a, c),
);
return left.equals(right);
}