# Intersection, union, and subtraction of nested sets?

So our book for class only talks about sets-within-sets for only a brief moment, and only gives the example of the empty set being an element of a set of the empty set (If A = {$\phi$} and B = {{$\phi$}} then A $\in$ B but A $\nsubseteq$ B).

But let's say that A = { 3, {4, 5}, 7, 8 } and B = {4, {5, 7}, 6, 8}.

What would A $\cap$ B be? A $\cup$ B? A - B?

My personal guesses - Intersection: {8} ; Union: {3, {4,5}, {5,7}, 6, 7, 8} ; A - B: {3, {4,5}, 7}

• Missed a $4$ in your union but looks good otherwise. – John Habert Feb 27 '14 at 18:20
• The important thing to remember is that, for example, $4$ and $\{4,5\}$ are completely different elements of the sets, and they appear (or not) in the unions and differences independently of each other. For the purpose of these operations you can choose to write $*$ instead of $\{4,5,\}$ and completely forget that it happens to have a $4$ somewhere inside of it. – hmakholm left over Monica Feb 27 '14 at 18:35
• @HenningMakholm I really like the substitution for a symbol idea. Thanks for the insight! – dopps Feb 27 '14 at 18:45

Recall that $$A \cap B = \{x : x \in A \;\text{ and }\; x\in B \} \\ A \cup B = \{x : x \in A \;\text{ or }\; x\in B \} \\ A - B = \{x: x \in A \; \text{and} \; x\not\in B \}.$$
In particular, if $A = \{ 3, \{4, 5\}, 7, 8 \}$ and $B = \{4, \{5, 7\}, 6, 8\}$, then we have that $$A \cap B = \{8\} \\ A \cup B = \{3,4,6,7,8,\{4,5\},\{5,7\}\} \\ A - B = \{3,\{4,5\},7\}.$$
• @dopps You don't. As I mention in comment to OP, you missed a $4$ (from the set $B$) in the union. – John Habert Feb 27 '14 at 18:32