A={a,b,b} and
B={b,b,c,c,d}.
Except for subset, equivalent,
and disjoint, the result of any set-like
operation is a collection, in this case a bag.
Using the collections A and
B, the different set-like
operators produce the following: A and
B are united:
A UNION B = {a,b,b,b,b,c,c,d}
A DIFFERENCE B = {a}
B DIFFERENCE A = {c,c,d}
A XOR B = {a,c,c,d}
A INTERSECTION B = {b,b}
.true
if the first set contains only elements that also appear in the second set,
otherwise it returns .false:
A SUBSET B = .false B SUBSET A = .false
.true
if the first set contains only elements that also appear in the second set
and the two sets have the same number of elements,
otherwise it returns .false:
A EQUIVALENT B = .false B EQUIVALENT A = .false
.true
if there are no elements that appear in both sets,
otherwise it returns .false:
A DISJOINT B = .false B DISJOINT A = .false