Proving part of the Wedderburn Structure Theorem I'm having trouble with an exercise from "Noncommutative Algebra," by Farb & Dennis proving part of the Wedderburn structure theorem for semisimple rings.
If $R$ is a semisimple ring and $\{M_1,\ldots,M_n\}$ is a set of representatives for the isomorphism classes of simple $R$-modules, let $D_i=End_R(M_i).$ We want to show that $R$ is isomorphic to $\prod_{i=1}^nEnd_{D_i}M_i,$ and to do this we would like to show that $M_i$ is finite-dimensional over $D_i$. (In particular, if the decomposition of $R$ as a left $R$-module is $\bigoplus M_i^{n_i},$ then it will turn out that $n_i=dim_{D_i}(M_i)$).
Hoever, I've been having difficulties proving why $M_i$ is finite-dimensional over $D_i$, although I see why it should be. What exactly are the details of the proof that $dim_{D_i}(M_i)$ is finite? Is there some trick involved that I'm missing, or does the proof just consist in following all the definitions of semisimple rings and simple modules?
 A: Here is an explanation of the relevant theory, including the fact you're looking for. The thing is that the way I see it, I learn the structure of the $M_i$ modules after I prove Wedderburn's result. So I wrote the entire thing down:
Let $R$ be a semisimple ring. That is, we have equality of $R$-modules $R=\oplus_{i\in I}M_i$.
First, we claim that $I$ is a finite set. This is true because:

  
*
  
*$R$ is generated by $1_R$ over $R$.  
  
*By definition of a direct sum, the element $1_R$ (as any other element of $R$) has a finite number of nonzero components in the decomposition $R=\oplus_{i\in I}M_i$.
  

So, from now on we will write: $R=\oplus_{i=1}^r M_i^{n_i}$  with each $M_i$ being a simple $R$-module and with $M_i\not\cong M_j$ for $i\neq j$..
Next, we claim that all simple $R$-modules are isomorphic to one of the $M_i$.

Let $M$ be a simple $R$-module. Fix $0\neq m\in M$. The map $\varphi:R\rightarrow M$ defined by $\varphi(r)=rm$ is a nonzero homomorphism of $R$-modules (verify). Now look at $\varphi:\oplus_{i=1}^r M_i^{n_i}\rightarrow M$ again. By Schur's lemma, the simplicity of $M$ implies that the restriction of $\varphi$ to each $M_i$ is either zero or an isomorphism. But it can't be zero for all those restrictions because $\varphi$ is not the zero map. Thus, at least one of the $M_i$ is mapped isomorphically onto $M$.

We now prove Wedderburn's theorem (this is independent of the previous discussion) which gives a ring isomorphism $R\cong \prod_{i=1}^r M_{n_i}(\text{End}_R(M_i)^{op})
= \prod_{i=1}^r M_{n_i}(D_i)$:

$R^{op}\cong \text{End}_R(R)$ (because $\text{End}_R(R)$ is exactly multiplication on the right by elements of $R$).
  So, $R^{op}\cong \text{End}_R(\oplus_{i=1}^r M_i^{n_i}) \cong\prod_{i=1}^r\text{End}_R(M_i^{n_i})$ (this follows from Schur's lemma)
  So, $R^{op}\cong\prod_{i=1}^rM_{n_i}(\text{End}_R(M_i))$.
  Taking $-^{op}$ on both sides now yields the desired result.

Note that by Schur's lemma, each $D_i=\text{End}_R(M_i)^{op}$ is a division ring.
Now that we know that as a ring we have $R\cong \prod_{i=1}^r M_{n_i}(D_i)$, we deduce that as an $R$-module we have $R\cong \oplus_{i=1}^r(D_i^{n_i})^{n_i}$. It is easy to see that each $D_i^{n_i}$ is a simple $R$-module. Thus, these are the simple $R$-modules. That is - the $M_i$ modules are the $D_i^{n_i}$ modules. We also see that the dimension of $M_i$ over $D_i$ equals the number of times it appears in the decomposition of $R$ as a semisimple $R$-module.
