Discrete Maths Set Theory: Prove that $\left|(X^Y)^ Z\right|=\left|X ^{Y \times Z}\right|$. I need to prove that $(X^Y)^ Z$ and $X ^{Y \times Z}$ are in bijective correspondence.
Can anyone please help?
EDIT: Chuks's version said: prove that $(X\times Y)\times Z\sim X\times(Y\times Z)$.  However, this is not the OP's request.
 A: There is not just any bijection $f : (A\times B) \times C \to A \times (B \times C)$, there is a canonical bijection like this. You have a tuple: $((a,b),c)$ and you want to turn it into a tuple $(a',(b',c'))$. There is only one reasonable way to do this: set $a' = a, b' = b, c'= c$ (this is meant by 'canonical'). So we set:
$$f((a,b),c) = (a,(b,c))$$
It's easy to check, that $f$ is bijective.

EDIT: Basically, the same idea as above (there is a canonical bijection $f$). You have a function $\varphi : Z \to X^Y$ and you want a function $f(\varphi) : Y\times Z \to X$. Just define:
$$f(\varphi) : (y,z) \mapsto f(\varphi)((y,z)) = \varphi(z)(y)$$
Note, that $\varphi(z)$ is a function $Y\to X$, so it makes perfect sense to evaluate it at $y$. Now, it's easy to check that $f : (X^Y)^Z \to X^{Y\times Z}, \varphi \mapsto f(\varphi)$ is a bijection.
A: Rigorously speaking, if $A$ is an index set and $X_{\alpha}$ is a set for each $\alpha\in A$, then the generic element of the Cartesian product $f\in\prod_{\alpha\in A} X_{\alpha}$ is actually a function $f:A\to\bigcup_{\alpha\in A}X_{\alpha}$ such that $f(\alpha)\in X_{\alpha}$ for each $\alpha \in A$.

Correspondingly, if $f\in (X\times Y)\times Z$, then $f$ is a function from the two-element set $\{1,2\}$ such that


*

*$f(2)\in Z$; and

*$f(1)\in X\times Y$, so that $f(1)$ is another function from the two-element set $\{1,2\}$ such that $f(1)(1)\in X$ and $f(1)(2)\in Y$.



The generic element of $g\in X\times (Y\times Z)$ can be described similarly:


*

*$g(1)\in X$;

*$g(2)(1)\in Y$ and $g(2)(2)\in Z$.



Now, define a mapping $\phi: (X\times Y)\times Z\to X\times (Y\times Z)$ as follows: for any $f\in (X\times Y)\times Z$, define $g\equiv \phi(f)$ as 


*

*$g(1)\equiv f(1)(1)$;

*$g(2)(1)\equiv f(1)(2)$; and

*$g(2)(2)\equiv f(2)$.


Then, $\phi$ is injective, because if $\phi(f')=\phi(f'')$ for some $f',f''\in (X\times Y)\times Z$, then $f'(1)(1)=f''(1)(1)$, $f'(1)(2)=f''(1)(2)$, and $f'(2)=f''(2)$, which implies that $f'=f''$.
Moreover, $\phi$ is also surjective, because any $g\in X\times (Y\times Z)$ can be recovered as $g=\phi(f)$, where $f\in (X\times Y)\times Z$ is defined as $f(1)(1)\equiv g(1)$, $f(1)(2)\equiv g(2)(1)$, and $f(2)\equiv g(2)(2)$.
A: Consider $\psi:\left(X^Y\right)^Z \to X^{Y\times Z}$ sending each $f:Z\to X^Y$ to $\psi(f):Y\times Z\to X$ such that $\psi(f)$ sends $(y,z)\in Y\times Z$ to $\big(f(z)\big)(y)$.  That is, $\big(\psi(f)\big)(y,z)=\big(f(z)\big)(y)$ for every $f\in \left(X^Y\right)^Z$, $y\in Y$, and $z\in Z$.
Consider $\varphi:X^{Y\times Z}\to \left(X^Y\right)^Z$ sending every $g:Y\times Z\to X$ to the function $\varphi(g):Z\to X^Y$ sending each $z\in Z$ to the function $y\mapsto g(y,z)$ for all $y\in Y$.  That is, $\Big(\big(\varphi(g)\big)(z)\Big)(y)=g(y,z)$ for all $g\in X^{Y\times Z}$, $y\in Y$, and $z\in Z$.
What are $\varphi\circ\psi$ and $\psi\circ\varphi$?
