This is problem 5E from the 4th edition of Linear Algebra Done Right:
Suppose $\mathcal{E}$ is a subset of $\mathcal{L}(V)$ and every element of $\mathcal{E}$ is diagonalizable. Prove that there exists a basis of $V$ with respect to which every element of $\mathcal{E}$ has a diagonal matrix if and only if every pair of elements of $\mathcal{E}$ commutes.
I'm having some trouble extending the result to $|\mathcal{E}|$ infinite and I'd like some help.
My attempt: The if direction is trivial so I omit it. We first show the result for $|\mathcal{E}|$ finite. The case $|\mathcal{E}|=2$ is easy to show: if $S,T \in \mathcal{E}$, note $$V=E(\lambda_1, T) \oplus \cdots \oplus E(\lambda_m,T)$$ and so since $S|_{E(\lambda_j, T)}$ is invariant under $E(\lambda_j,T)$ we can get bases of each $E(\lambda_j,T)$ that diagonalize each $S|_{E(\lambda_j,T)}$ and we get our result. Inducting on $|\mathcal{E}|=p$, for all $S \in \mathcal{E}/\{T\}$, we note since those $S$ commute pairwise, we can find a basis of each $E(\lambda_j,T)$ that diagonalizes each $S$ simultaneously and combining we again get a basis.
Now where I'm getting stuck with the infinite case. Let $\mathcal{U} = \text{span}_{e \in \mathcal{E}}(e)$. We have $\mathcal{E} \subset \mathcal{U}$ and $\mathcal{U}$ is finite dimensional.
I'm pretty sure $\mathcal{E}$ (being a spanning set of $\mathcal{U}$) must contain a finite basis $\phi_1,\cdots,\phi_m$ of $\mathcal{U}$ which would finish the proof since then $\{\phi_1,\cdots,\phi_m\} \subset \mathcal{E} \subset \mathcal{L}(V)$ has finite cardinality and the elements pairwise commute we can find a basis of $V$, say $v_1,\cdots,v_n$ for which each $\phi_j$ has a diagonal matrix. Then, for any $T \in \mathcal{E}$, we have since the $\phi_j$ span $\mathcal{U}$ that $T=a_1\phi_1+ \cdots + a_m\phi_m$ for some $a_j \in \mathbb{F}$ and thus the matrix of $T$ is diagonal with respect to the $v_j$.
However, I'm not 100% sure if this is true: does an infinite spanning set of a finite vector space always contain a finite basis?