I'm studying representation theory and in the book (Fulton and Harris) the author makes the following proposition with the following proof:
Proposition: For any representation $V$ of a finite group $G$, there is a decomposition $$V = V_1^{\oplus a_1}\oplus\cdots \oplus V_k^{\oplus a_k},$$ where the $V_i$ are distinct irreducible representations. The decomposition of $V$ into a direct sum of the $k$ factors is unique, as are the $V_i$ that occur and their multiplicities.
Proof: It follows from Schur's lemma that if $W$ is another representation of $G$, with a decomposition $W = \bigoplus W_j^{\oplus b_j}$, and $\varphi : V\to W$ is a map of representations, then $\varphi$ must map the factor $V_i^{\oplus a_i}$ into the factor $W_j^{\oplus b_j}$ for which $W_j\simeq V_i$; when applied to the identity map of $V$ to $V$, the stated uniqueness follows.
I must confess I didn't understand. The fact that we can decompose $V$ like this I do understand that follows from the fact that if $V$ has a proper nonzero subrepresentation $W$ then there is another subrepresentation $W'$ such that $V = W\oplus W'$. In that case, if either $W$ or $W'$ are not irreducible we can apply the same idea to them, until we have the desired decomposition.
Now, this proof of uniqueness I really can't understand. I mean, uniqueness means that if we have
$$V = V_1^{\oplus a_1}\oplus\cdots \oplus V_k^{\oplus a_k}\simeq W_1^{\oplus b_1}\oplus\cdots \oplus W_{r}^{\oplus b_r},$$
then we have $k = r$, $a_i = b_i$ and $W_i\simeq V_i$. I can't understand how this argument the author presents shows all of this.
Indeed the whole point is that $V$ has these two decompositions then they are isomorphic, so that there exists one isomorphism
$$\varphi : V_1^{\oplus a_1}\oplus\cdots \oplus V_k^{\oplus a_k}\to W_1^{\oplus b_1}\oplus\cdots \oplus W_r^{\oplus b_r}.$$
If we restrict it to $V_i$ we get one isomorphism $\varphi : V_i\to \varphi(V_i)$. But why $\varphi(V_i)=W_j$ for some $j$? I mean, couldn't $\varphi(V_i)$ be some other subspace of the direct sum of the $W_i$ which is not one of the $W_i$ themselves?
So how to understand this proof about the decomposition of a representation? What really is the argument used in this proof?