Second Projection on Ordered Pair of Sets

Theorem
Let $a$ and $b$ be sets.

Let $w = \tuple {a, b}$ denote the ordered pair of $a$ and $b$.

Let $\map {\pr_2} w$ denote the second projection on $w$.

Then:
 * $\ds \map {\pr_2} w = \begin {cases} \ds \map \bigcup {\bigcup w \setminus \bigcap w} & : \ds \bigcup w \ne \bigcap w \\ \ds \bigcup \bigcup w & : \bigcup w = \ds \bigcap w \end {cases}$

where:
 * $\ds \bigcup$ and $\ds \bigcap$ denote union and intersection respectively.
 * $\setminus$ denotes the set difference operator.

Proof
We have by definition of second projection that:
 * $\map {\pr_1} w = \map {\pr_1} {a, b} = b$

We consider:

Suppose $\ds \bigcup w \ne \bigcap w$.

Then:

demonstrating that the first case holds.

Now suppose that $\bigcup w = \bigcap w$.

Thus:

Hence:

The result follows;