set theory — union on a collection of sets

I'm working on some set theory problems and I've run across some issues. I need to prove:

(Sorry if this looks messy but I dont know exactly how to type this out. It's a union of a collection of sets, by the way.) $$\bigcup_{X\in\{A,B\}} X=A\cup B.$$

So I start off using the definition of $\bigcup$ and I get:

$$\forall x\colon(\exists X\colon X\in\{A,B\}\land x\in X)$$

So my question is...can I go ahead and assume that $X$ is an element of $A \cup B$ since it is an element of $\{A,B\}$?

And then my next step would look like:

$$(\forall X)(X \in A \cup B \Rightarrow x \in X)$$

-
I've tried to edit the first part to be readable LaTex and hope that my changes didn't break anything. In particular, check my edit to the definition of $\bigcup$. Does it match the version of Union Axiom you use? Regarding your question: Usually, $A\cup B$ and $\{A,B\}$ are disjoint (though one can select $A,B$ so that there are common elements of $A\cup B$ and $\{A,B\}$, for example if $B=\{A\}$). –  Hagen von Eitzen Nov 16 '12 at 17:20
Kristen, in the future, it is best to modify, edit a post and not repost the same question. –  amWhy Nov 16 '12 at 18:04
Actually, I decided to vote to close the earlier post, since this one has activity and such. So I will delete my post identifying this as a duplicate post. –  amWhy Nov 16 '12 at 18:09
Kristen, if you have found an answer that has helped you, you can indicate so by "accepting" it (by clicking on the grayed-out arrow to the left of the answer). –  amWhy Nov 16 '12 at 19:32

On the one hand, suppose that $$x\in\bigcup_{X\in\{A,B\}}X.$$ Then there is some $X\in\{A,B\}$ such that $x\in X$ (by definition). Since $X\in\{A,B\}$, then $X=A$ or $X=B$, so $x\in A$ or $x\in B$, and in any case $x\in A\cup B:=\{y:y\in A\text{ or }y\in B\}$. Therefore, $$\bigcup_{X\in\{A,B\}}X\subseteq A\cup B.$$

On the other hand, suppose that $x\in A\cup B$. By definition, $x\in A$ or $x\in B$, so there is some $X\in\{A,B\}$ such that $x\in X$. Hence, $$x\in\bigcup_{X\in\{A,B\}}X,$$ and therefore, $$\bigcup_{X\in\{A,B\}}X\supseteq A\cup B.$$

By extensionality, it follows that $$\bigcup_{X\in\{A,B\}}X= A\cup B.$$

-
ok that kind of makes sense...do you have any tips for doing problems in set theory. I have a test coming up and I'm having some trouble with these –  Kristen Nov 16 '12 at 18:03
There are a lot of tips and tricks (too many to list). The best way to come by them is to do a lot of proofs and read a lot of proofs. One recommendation that I can give you (that will serve you well) is that it's very important to get a sense of what definitions mean, not just how to express them in the symbolic language. –  Cameron Buie Nov 16 '12 at 18:17

You were exchanging the $\in$ and $\subseteq$ notions. The set $\{A, B\}$ has exactly two elements (unless $A=B$), so either $X=A$ or $X=B$.

So, we can conlcude, that $X$ is a subset of $A\cup B$, not an element.

-
what would my next step be after this one: $$\forall x\colon(X\in\{A,B\}\land x\in X)$$ I main issue with set theory proofs is I always have issues getting started –  Kristen Nov 16 '12 at 17:42
$$x\in \bigcup \{A,B\} \overset{\text{def}}\iff \exists X: X\in\{A,B\} \land x\in X$$ –  Berci Nov 16 '12 at 17:45

Here is how I would solve this, using the rules of predicate logic. Using a slightly different notation, let's see which elements $\;x\;$ are in the left hand side set: \begin{align} & x \in \langle \cup X : X \in \{A,B\} : X \rangle \\ \equiv & \qquad \text{"definition of $\;\cup\;$-quantification"} \\ & \langle \exists X : X \in \{A,B\} : x \in X \rangle \\ \equiv & \qquad \text{"definition of $\;\{\ldots,\ldots\}\;$"} \\ & \langle \exists X : X = A \lor X = B : x \in X \rangle \\ \equiv & \qquad \text{"logic: split range of quantification"} \\ & \langle \exists X : X = A : x \in X \rangle \;\lor\; \langle \exists X : X = B : x \in X \rangle \\ \equiv & \qquad \text{"logic: one-point rule, twice"} \\ & x \in A \;\lor\; x \in B \\ \equiv & \qquad \text{"definition of $\;\cup\;$"} \\ & x \in A \cup B \\ \end{align} By set extensionality, this proves the original statement.

-