How to prove $|{^A}{(K \times L)}| =_c |{^A}{K} \times {^A}{L}|$? 
How to prove $|{^A}{(K \times L)}| =_c |{^A}{K} \times {^A}{L}|$?

Definitions:

*

*$|X|=_c|Y|$ means that there is a function $f:X \rightarrow Y$ that is one-to-one and onto $Y$. When $X$ and $Y$ are finite sets, then $|X|=|Y|$ if and only if $|X|=_c|Y|$. $X$ has the same cardinality as $Y$.

*Let $X$ and $Y$ be sets. The set of all functions from $X$ to $Y$, denoted ${^X}{Y}$, is defined by ${^X}{Y}$={$F$:$F$ is a function from $X$ to $Y$}.

Here is what I did:
Let $f:A \rightarrow A \times A$ and $g:K \times L \rightarrow K \times L$ be bijections. Let $l:A \rightarrow K \times L$ and define $G:{^A}{(K \times L)} \rightarrow {^A}{K} \times {^A}{L}$ by $G(l)=g \circ l \circ f^{-1}$, for each $l \in {^A}{(K \times L)}$. We prove that $G$ is one-to-one. Let $l \in {^A}{(K \times L)}$ and $l^{\ast} \in {^A}{(K \times L)}$. Assume that $G(l)=G(l^{\ast})$, thus $(g \circ l \circ f^{-1})(x)=(g \circ l^{\ast} \circ f^{-1})(x)$ for all $x \in A \times A$. Hence $g((l \circ f^{-1})(x))=g((l^{\ast} \circ f^{-1})(x))$ for all $x \in A \times A$. Since $g$ is one-to-one, we conclude that $(l \circ f^{-1})(x)=(l^{\ast} \circ f^{-1})(x)$ for all $x \in A \times A$.
We now show that $l(a)=l^{\ast}(a)$ for all $a \in A$, thus $f(a) \in A \times A$. Letting $x=f(a)$, we obtain $l(a)=l^{\ast}(a)$ since $f^{-1}(f(a))=a$, so $l=l^{\ast}$ and $G$ is hence one-to-one.
To prove that $G$ is onto ${^A}{K} \times {^A}{L}$, let $h \in {^A}{K} \times {^A}{L}$, then $g^{-1} \circ h \circ f \in {^A}{(K \times L)}$ and $G(g^{-1} \circ h \circ f)=h$. Therefore, the function $G:{^A}{(K \times L)} \rightarrow {^A}{K} \times {^A}{L}$ is a bijection.
I would appreciate if someone could help me with this one as I do not know what I did wrong. Thanks!
 A: I shall use a more standard notation: for sets $X$ and $Y$, the notation $Y^X$ represents the set of all functions $f:X\to Y$.  Furthermore, $|X|=|Y|$ usually means that there exists a bijection between $X$ and $Y$.
Let $\pi_1:(K\times L)\to K$ and $\pi_2:(K\times L)\to L$ be the projection maps defined by
$$\pi_1(k,l):=k\text{ and }\pi_2(k,l):=l$$
for all $k\in K$ and $l\in L$.  Define $\phi:(K\times L)^A\to (K^A\times L^A)$ to be the function sending each $f:A\to (K\times L)$ to $\left(\pi_1\circ f,\pi_2\circ f\right)$, and define $\psi: (K^A\times L^A)\to (K\times L)^A$ to be the function sending pairs of functions $(g,h)$ where $g:A\to K$ and $h:A\to L$ to the function $\psi_{g,h}:A\to (K\times L)$ defined by
$$\psi_{g,h}(a):=\big(g(a),h(a)\big)$$
for all $a\in A$.  Prove that $\phi$ and $\psi$ are inverse functions of one another, which means $\phi$ and $\psi$ are bijections.

On the other hand, $\left|A^{K\times L}\right|=\left|\left(A^K\right)^L\right|$.  If you want to show this, define $\rho:A^{K\times L}\to \left(A^K\right)^L$ to be the map sending $f:(K\times L)\to A$ to the map $\rho_f:L\to A^K$ defined by
$$\big(\rho_f(l)\big)(k):=f(k,l)$$
for all $k\in K$ and $l\in L$.  Conversely, define $\sigma:\left(A^K\right)^L\to A^{K\times L}$ to be the map sending each $g:L\to A^K$ to the map $\sigma_g:(K\times L)\to A$ defined by
$$\sigma_g(k,l):=\big(g(l)\big)(k)$$
for all $k\in K$ and $l\in L$.  Prove that $\sigma$ and $\rho$ are inverse functions of one another.
