[Math] set theory — union on a collection of sets

elementary-set-theory

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)$$

Best Answer

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.$$

Related Question