Just a simple question that will help me do the programming homework:
I've got two sets and need to check if they're equal. I've already implemented intersection and union methods, now I've got to implement a method which checks if $S_1$ and $S_2$ are equal. So, instead of repeating the code, I'd like to use intersection and union methods.
Now, a math question: is $$|S_1 \cup S_2| = |S_1|$$ a sufficient condition to say two sets are equal?