TITLE: Notation on proving injectivity of a function $f:A^{B\;\cup\; C}\to A^B\times A^C$
QUESTION [6 upvotes]: I'm trying to prove that for any cardinal numbers $a,b,c$, the following holds:
$a ^ {b + c} = a ^ b a ^ c$ i.e. that there exists a bijective function $ f : A ^ {B \:\: \cup \:\: C} \rightarrow A^B \times A^C $
This is only part of the proof sketch I have (proving $f$ is injective), and I'd like to know if is well written, since I believe it has flaws.

Let $f: \{ g \:\:\: | g:B \cup C \rightarrow A \} \rightarrow \{ \langle g,h\rangle  | \:\:\: g: B \rightarrow A \wedge h : C \rightarrow A \}$ such that
$f ( g_{b} \cup g_{c}) = \langle g_{b},g_{c}\rangle$.
Now,
$f( g_{b1} \cup g_{c1}) = f ( g_{b2} \cup g_{c2} ) \implies \langle g_{b1},g_{c1}\rangle = \langle g_{b2},g_{c2}\rangle$ and therefore $f$ is injective.

Questions:

Does that prove that $f$ is injective? I think it does not, since 
$f ( g_{b} \cup g_{c} ) = f ( g_{c} \cup g_{b}) \implies \langle g_{b},g_{c}\rangle  = \langle g_{c},g_{b}\rangle (\bot)$
Is there an alternative way to define $f$? It's difficult for me to define it in terms of properties of elements of its domain.

Side note:
The title says "kinds" because the function domain and image sets are sets of sets, but I may be mistaken using that word, if so, please edit accordingly.

REPLY [3 votes]: I’m going to assume that I’ve guessed correctly that you want to define $$f:A^{B\;\cup\;C}\to A^B\times A^C:g\mapsto \langle g\upharpoonright B,g\upharpoonright C\rangle\;.$$ If you express it this way, it’s easy to see that $f$ is injective. Suppose that $f(g_0)=f(g_1)$. Then $g_0\upharpoonright B=g_1\upharpoonright B$ and $g_0\upharpoonright C=g_1\upharpoonright C$. Now let $x\in B\cup C$ be arbitrary. If $x\in B$, then $$g_0(x)=(g_0\upharpoonright B)(x)=(g_1\upharpoonright B)(x)=g_1(x)\;,$$ and if $x\in C$, then $$g_0(x)=(g_0\upharpoonright C)(x)=(g_1\upharpoonright C)(x)=g_1(x)\;,$$ so $g_0(x)=g_1(x)$ for all $x\in B\cup C$, and hence $g_0=g_1$. It was the clumsy way in which you expressed an arbitrary element of $A^{B\;\cup\;C}$ that led you to doubt the injectivity of $f$.
Note that although this $f$ is injective, it is not surjective if $B\cap C\ne\varnothing$ and $A$ has at least two elements. To see this, suppose that $B\cap C\ne \varnothing$, and fix $x\in B\cap C$. Let $g_0\in A^B$ be arbitrary, and let $g_1\in A^C$ be any function such that $g_1(x)\ne g_0(x)$. Then $\langle g_0,g_1\rangle \ne f(h)$ for any $h\in A^{B\;\cup \;C}$.
To get bijectivity, you must assume that $B\cap C=\varnothing$. In that case $f$ as defined above is a bijection, and $$f^{-1}:A^B\times A^C\to A^{B\;\cup\;C}:\langle g,h\rangle\mapsto g\cup h\;.$$