Prove that the set of all functions from $A$ to $B$, where $|A| = \alpha$ is in a bijective correspondence with $B^{\alpha}$ 
Prove that the set of all functions from a set $A$ to $B$, where $|A| = \alpha$ (where $\alpha \in \mathbb{Z_+}$ if $A$ is finite, or $\alpha = \mathcal{w}$ is $A$ is countably infinie) is in a bijective correspondence with $B^{\alpha}$


My attempted proof:
Put $\gamma = \{ f \ | \ f: A \to B \}$ to be the set of all functions $f$ from $A$ to $B$.
Now the only condition that we need for $f$ to be a function from $A$ to $B$, is that every $a \in A$ must be mapped to any $b \in B$.
In other words $f \in \gamma$ if for every $a \in A$, there exists a $b \in B$, such that $f(a) = b$.
So we associate with each $a \in A$ an $f$ , since for each possible $a \in A$, there are $|B|$ many $b$'s that satisfy $f(a) = b$. And since there are $|A| = \alpha$ many $a$'s in $A$, there must be $$ \underbrace{|B| \cdot |B| \cdot \ ... \ \cdot |B|}_\text{$\alpha$ times}  = |B|^{\alpha}$$
possible functions from $A$ to $B$. 
Thus $|\gamma| = |B|^{\alpha}$, and since $|B^{\alpha}| = |B|^{\alpha}$, we have $|\gamma| = |B^{\alpha}|$, and by the definition of cardinality of sets, there must exist a bijection between $\gamma$ and $B^{\alpha}$.

Is this proof correct? If so how rigorous is it? Any comments and criticism on my proof writing and proof style are greatly appreciated!
 A: As it is mentioned in the comment, you need to handle the "$\alpha$-times" argument carefully when $A$ is not finite. 
What you want to prove is the following,   

there exists a bijection between $B^A$ and $B^{|A|}$ where $A$ is at most countable and $B^A$ denotes the set of all functions from $A$ to $B$. 

If one looks carefully the definition of Cartisian products, one could find that an element $f\in B^{|A|}$ is exactly a function 
$$
f:\{1,2,\cdots,n\}\to B
$$
where $|A|=n$ and
$$
f:\mathbb{Z}_+\to B
$$
where $|A|=\omega$. (Yes, the notation is $\omega$, not $w$.)
Now considering the definition of $|A|=\alpha$, ($\alpha=n$ or $\omega$), you would get the bijection between $B^A$ and $B^{|A|}$. 
A: Just to expand on Jack's answer, note that the argument is more general. Let $A$ have cardinality $\alpha$. Then, since $\vert A\vert =\alpha,\ $ there is a bijection $\phi: A\to \alpha$, and since $B^{\alpha}=\left \{ \gamma:\alpha\to B \right \}=\prod _{i\in \alpha}B_i$, the map $f\mapsto \left ( f(a) \right )_{\phi (a)}$ will do the job. 
