Solution (source code)

= Solution

If $\alpha\ne\beta$, the operator $f-\beta I$ is invertible on $W_{\alpha,n}$. Indeed, there it equals
$$
(\alpha-\beta)I+N,
\qquad N=f-\alpha I,\qquad N^n=0,
$$
whose inverse is the finite <geometric series>
$$
\frac1{\alpha-\beta}
\sum_{k=0}^{n-1}
\left(-\frac{N}{\alpha-\beta}\right)^k.
$$

Now use induction on $d$. If $\sum_{i=1}^dv_i=0$, apply $(f-\alpha_dI)^n$. The $v_d$ term vanishes, while every transformed vector
$$
(f-\alpha_dI)^nv_i,\qquad i<d,
$$
is nonzero by the invertibility just proved and still lies in $W_{\alpha_i,n}$. The induction hypothesis rules out the resulting relation. Allowing scalar coefficients, and omitting zero terms, gives the same argument. Hence the <generalized eigenspaces for distinct eigenvalues form a direct sum>, so $v_1,\ldots,v_d$ are linearly independent.