Comparing the size of the sets Let $A, B, C, D$ be sets. Prove that if $|A|=|B|$ and $|C|=|D|$, then $|A^C|=|B^D|$
I am asking for help in solving the task.
 A: You have that $|A^C| = |A|^{|C|}$ and $|B^D| = |B|^{|D|}$ so, because $|A| = |B|$ and $|C| = |D|$, is trivial that $|A|^{|C|} = |B|^{|D|}$, meaning that $|A^C| = |B^D|$
Check: https://en.wikipedia.org/wiki/Cardinal_number#Cardinal_exponentiation
A: HINT: Since $|A|=|B|$, there is a bijection $f:A\to B$. Similarly, there is a bijection $g:C\to D$. Define a function $h:A^C\to B^D$ as follows: for each $\varphi\in A^C$ let
$$h(\varphi)=\{\langle g(c),f(a)\rangle:\varphi(c)=a\}\,.$$
Verify that $h(\varphi)$ is indeed a function from $D$ to $B$, and show that $h$ is a bijection. It may help to realize (or even prove) that $h(\varphi)=f\circ\varphi\circ g^{-1}$.
Added: Suppose that $\varphi,\psi\in A^C$, and $\varphi\ne\psi$; then there is a $c\in C$ such that $\varphi(c)\ne\psi(c)$. Let $a=\varphi(c)$; then $\langle g(c),f(a)\rangle\in h(\varphi)$, but $\langle g(c),f(a)\rangle\in h(\psi)$, since $\psi(c)\ne a$, so $h(\varphi)\ne h(\psi)$, and $h$ is injective.
Now let $\psi\in B^D$; we want to find a $\varphi\in A^C$ such that $h(\varphi)=\psi$. In other words, we want to find a $\varphi\in A^C$ such that
$$\psi=\{\langle g(c),f(a)\rangle:\varphi(c)=a\}\,.\tag{1}$$
Let $c\in C$; then $g(c)\in D$, and $\psi\big(g(c)\big)\in B$. The map $f$ is a bijection, so there is a unique $a\in A$ such that $f(a)=\psi\big(g(c)\big)$; let $\varphi(c)=a$. Then $\varphi(c)=a$ if and only if $f(a)=\psi\big(g(c)\big)$, which is true if and only if $\langle g(c),f(a)\rangle\in\psi$, so $(1)$ holds, i.e., $h(\varphi)=\psi. Thus, $h$ is also surjective and hence a bijection.
