First, you can see from the definition of a subset and from the definition of the union of two sets that for any sets A and B, and
Now, to prove our "if and only if" statement, we break it up into the two direction if-then statements:
1. If then .
As noted above, for any sets A and B. Thus, if , then .
2. If then .
Assume opposite: we have , . As , if , then there must be at least one element x in not in A. By definition of the union of sets, every element of must be an element of A or of B (or both). Thus if and , then . Thus there must be at least one element in B not in A. But this contradicts . Thus, we show that if then .
With (1) and (2), we have proved that if and only if .