Trace ideal of generator Let $R$ be a unital ring. In Lam's "Lectures on modules on rings" (Theorem 18.8, p483), the following implication is stated for a right $R$-module $P$:
$$\mathrm{tr}(P) = R \implies R \text{ is a direct summand of a finite direct sum } \bigoplus_i P$$
Here $\mathrm{tr}(P) = \sum gP$, where $g$ ranges over $P^* = \hom_R(P, R)$. 
It is stated that if $\mathrm{tr}(P) = R$, then there must exist $g_1, \ldots, g_n \in P^*$ such that $g_1P + \ldots g_n P = R$.
My question: how do we know that we only need finitely many $g_i$?
My understanding is that $\sum gP = R$ means that for every $r \in R$, there are finitely many $h_1, \ldots, h_m \in P^*$ and $p_1, \ldots, p_m \in P$ such that $r = \sum_{i=1}^m h_ip_i$. But how do we know that we only need finitely many elements of $P^*$ to write every element of $R$?
 A: I don't have access to the book you cite, but I would argue as follows.
We can consider $R$ as a right $R$-module. This is also called the "right regular representation". Let's denote this $R$-module by $R_R$. Then we can write more specifically $P^* = hom_R(P,R_R)$. So for $g \in P^*$, $gP$ is an $R$-submodule of $R_R$, i.e. a right ideal of $R$.
Now, $tr(P)$ is the right ideal in $R$ generated by all the right ideals $gP$ for $g \in P^*$. Here, the term generated means "the smallest ideal containing all the $gP$". Let's define the set
 $J = \{r_1 + \cdots + r_m\ |\ m \in \mathbb N_0,\ r_1 \in g_1P,\ldots,r_m\in g_mP\ for\ some\ g_1,\ldots\ g_m \in P^*\} \subseteq R$. It is easy to see that $J$ is a right ideal and that $J$ must be contained in every right ideal which contains all the $gP$ with $g \in P^*$. So $J$ is the right ideal generated by the $gP$ with $g \in P^*$. This construction of the "generated" object via finite "combinations" (here: sums) is frequent in algebra where we (generally) don't have a notion of limit.
Take vector spaces as another example. If you have a vector space $V$ and a subset $M \subseteq V$, $M$ finite or infinite, then the (algebraic) span of $M$ in $V$ consists of all finite linear combinations of elements of $M$.
Back to $tr(R)$. Now we know what that is, and we can argue as follows. If $tr(R) = R$, then in particular $1_R \in tr(R)$ (recall $R$ is unital). So there are finitely many $g_1,\ldots,g_M \in P^*$ such that $1_R = r_1 + \cdots +r_m$ with $r_1 \in g_1P,\ldots,r_m \in g_mP$. But then $R = 1_R R \subseteq r_1R + \cdots + r_mR \subseteq g_1P + \cdots + g_mP \subseteq R$. So we have $g_1P + \cdots + g_mP = R$, and the $g_1,\ldots,g_m$ are the elements we seek.
