Bijection from union of two finite, disjoint sets A, B to {1,2,...,|A| + |B|}

51 Views Asked by At

A and B are disjoint, finite sets. The goal is to prove that $|A\cup B| = |A|+|B|$ using a bijection from $A\cup B$ to $\{1,2,...,|A|+|B|\}$.

Its easy to begin with: let $x \in A\cup B$. However trying to determine a function that takes any value in $A$ or $B$ and outputs ordered natural numbers is proving difficult. My first attempt at the function gave me

$f(x) = \begin{array}{ll} x & x \in A \\ x+|A| & x\in B\\ \end{array} $

But this clearly doesn't yield $\{1,2,3,...,|A|+|B|\}$, but $\{x_{a_1},x_{a_2},x_{a_3},...,x_{a_n},x_{b_1}+|A|,..., x_{b_m}+|A|\} $

Ideally I would just use:

$f(x) = \begin{array}{ll} i & x \in A \\ i+|A| & x\in B\\ \end{array} $

where $i$ is the index location of $x\in A$ or $x\in B$, but I cannot find an example of a similar notation that could apply to any arbitrary finite set.