A problem on isomorphic sections of locally trivial vector bundles Let $E = (E,\pi, X)$ be a locally trivial vector bundle over a compact Hausdorff space $X$. Let $\Gamma(E)$ be the set of all sections in E. I am trying to prove that $E$ is isomorphic to the trivial bundle $X\times\mathbb{C}^n$ if and only if $\Gamma(E)$ is isomorphic to $C(X)^n$ as $C(X)$-modules.
The first implication is easy. And for the reversal one, my attempt so far is to use the Serre-Swan Theorem to ensure the existence of $k$ and a locally trivial vector bundle $F$ such that $E\oplus F$ is isomorphic to $X \times \mathbb{C}^k$. Hence we get
$$C(X)^n \oplus \Gamma(F) \simeq \Gamma(E) \oplus \Gamma(F) \simeq C(X)^k.$$
Since $C(X)$ is a unital ring ($X$ is compact) and $\Gamma(F)$ is a C(X)-module, there exists an idempotent matrix $p \in M_m(R)$ for some $m$, such that $\Gamma(F) \simeq pC(X)^m$. Therefore, we get
$$(1 \oplus p)C(X)^{n+m} \simeq C(X)^n \oplus pC(X)^m \simeq  C(X)^k.$$
And this can only happen if $(1_n \oplus p) \sim 1_k$, where $\sim$ is a equivalence relation on the set $\mathcal{I}_{\infty}$ of idempotents over $C(X)$ meaning that there exists some matrices $a \in M_{(n+m) \times k}(C(x))$ and $b \in M_{k \times (n+m)}(C(X))$ such that $ab=1_n \oplus p$ and $ba=1_k$.
From this point, I am trying to prove, with no success so far, that $p$ must be $0$ or $m$ must be $0$ and hence $\Gamma(F)=\left\{0\right\}$ allowing me to ensure that $E$ is isomorphic to the trivial bundle $X×C^n$.
Can anyone help me on this or suggest another way to prove the reversal implication? I appreciate any help!
 A: This approach can't possibly work, because of the existence of stably trivial bundles (like, for instance, the tangent bundle to $S^2$). Compact Hausdorff will enter the proof in two places: 1) you need partitions of unity, which gives you 2) you need vector bundles to sum to a trivial bundle.
One way you could prove it is the full theorem: the category of projective finitely generated $C(X)$-modules is equivalent to the category of vector bundles over $X$. Then because equivalences of categories preserve isomorphisms, the isomorphism $\Gamma(E) \cong C(X)^n$ is sent to an isomorphism $E \cong \oplus_n \mathbf 1$.
What we really need is the inverse functor $F: C(X)-\text{Mod}_{proj,fg} \to \text{VB}(X)$ to the obvious functor in the other direction; I don't know an easy way to construct this. If one could, then you see it preserves isomorphisms, as desired. (Here, we're just constructing it by showing that the obvious functor is an equivalence of categories.) But in the absence of this, the theorem itself is not too hard to prove; here's a source.
