I am trying to learn how to prove things. Is the following proof correct? Any guidance / tips are appreciated.
Problem:
If $A$ and $B$ are nonempty, finite, disjoint sets with $ |A| = n $ and $ |B| = m $, then there exists a bijection $f: I_{n + m} \rightarrow A \cup B $
Attempt at Proof:
Let $A$ and $B$ be denote the sets described above. Then $|A| = n$ and $|B| = m$.
We can rewrite the two sets as $A = \{a_1, ..., a_n\} $ and $B = \{b_1, ..., b_m\} $.
Construct another set $I_{m + n} = \{j \in \mathbb{N}| 1 \leq j \leq n + m \} $.
Now consider $A \cup B = \{a_1,...,a_n, b_1,..., b_m \} $.
Define a function $f(x)$ that maps each of the first $n$ elements in $I_{n+m}$ to $ \{a_1,..., a_n\}$ in $A \cup B$. Similarly it maps the next $m$ elements of $I_{n+m}$ to each of $ \{b_1, ...b_m\}$ in $A \cup B$.
Therefore $f: I_{n + m} \rightarrow A \cup B $.
Your proof is correct; however, do verify that this is indeed a bijection: show it is injective ($f(x)=f(y)\implies x=y$) and surjective (for all $t\in A\cup B$ there exists $s\in I_{n+m}$ such that $f(s)=t$).