Map between finite projective modules are locally free Context. I am trying to understand the first 4 lines of Proof of Lemma 10.136.10.
The problem can be rephrased as follows.


*

*Let $S$ be a commutative ring. $I \hookrightarrow \bigoplus_1^m Se_i$, is finite projective submodule of the free $S$-module $\bigoplus_1^mSe_i$.

*Suppose $I$ is generated by $m$-elements $i_1, \ldots, i_m$.


It claims that by this lemma (which i copied the relevant part)

Let $P_1\rightarrow P_2$ be a map of finite projective modules. Then The set $V$ of primes $p \in Spec (R)$ such that $\varphi \otimes \kappa(p)$ is an isomoprhism is open. And for any $D(f) \subset V$, $\varphi:P_{1,f} \rightarrow P_{2,f}$ is an isomoprhism.

We can deduce


*

*For every subbset $E \subset \{1.\ldots,m \}$ , we have an open subset $U_E$ where the classes $i_e, e \in E$, freely generate the the finite projective $S$-module $I$.




*

*We may cover $Spec S$ by standard opens wchich are completely contained in one of $U_E$.



Confusion:

*

*How is the deduction made using the lemma?

[Remark] Also it seems for me to make sense of the phrase "freely generate on an open subset"(which was copied from the original argument) we have that for an $S$-module $M$, $M_p$ is free as $S_p$ $p$ implies $M$ is a free $R$ module.
 A: Since the collection of $f_i$ generate $I/I^2,$ they will continue to be a generating set in the residue field $\kappa(\mathfrak{p})$ for any prime $\mathfrak{p}.$ Hence, for all $\mathfrak{p}\in\operatorname{Spec}(S)$ there exists a subset $E(\mathfrak{p})\subseteq\{1,\dots, m\}$ such that $\{f_i\mid i\in E(\mathfrak{p})\}$ is a basis for $I/I^2\otimes_S\kappa(\mathfrak{p})$ (this is just a $\kappa(\mathfrak{p})$ vector space).
Now we invoke lemma 10.78.3: you know that for all $\mathfrak{p}$ there exists some nonempty open $U_{E(\mathfrak{p})}\subseteq\operatorname{Spec}(S)$ such that $I/I^2$ is free over $U_{E(\mathfrak{p})}$, as the set of points at which
\begin{align*}
\varphi : \bigoplus_{i\in E(\mathfrak{p})} S e_i&\to I/I^2\\
e_i&\mapsto f_i
\end{align*}
is an isomorphism contains $\mathfrak{p}$. As such, the collection $\{U_{E(\mathfrak{p})}\}$ covers $\operatorname{Spec}(S).$ Now, standard opens $D(g)$ form a basis for the Zariski topology, so we may cover $\operatorname{Spec}(S)$ by standard opens such that each one is contained in some $U_{E(\mathfrak{p})}.$ (And by the lemma, you can precisely describe which $D(g)$ lie in which $U_{E(\mathfrak{p})}.$)
Remark: I didn't explicitly address the fact that for any $E\subseteq\{1,\dots, m\}$ there exists an open $U_E$ such that $I/I^2$ is freely generated by $\{f_i\mid i\in E\}$ over $U_E.$ However, this is immediate from the lemma: the set of points $\mathfrak{p}$ at which
\begin{align*}
\varphi : \bigoplus_{i\in E} S e_i&\to I/I^2\\
e_i&\mapsto f_i
\end{align*}
is an isomorphism is open (possibly empty). We only need the $E(\mathfrak{p})$'s as above.
