Can you check my proof concerning an invariant subspace under a diagonilizable linear operator and its complementary invariant subspace?

This was an exercise problem from H&K Linear Algebra(sec 7.2, exercise 18). Could you check my proof?

The theorem is as follows:

If $V$ is a finite-dimensional vector space and $W$ is an invariant subspace of a diagonalizable linear operator $T$, then $W$ has a $T$-invariant complementary subspace.

Step 1)

I will first prove that if $W_1$,...,$W_k$ are subspaces obtained from the primary decomposition theorem and if $W$ is an invariant subspace of the linear operator, $T$, then $(W_1\cap W)\oplus ...\oplus (Wk\cap W)=W$.

Suppose $p_1^{r_1}...p_k^{r_k}$ is the primary decomposition of the minimal polynomial of $T$ where each $p_i$ is irreducible. We know that the minimal polynomial of $T_W$, restriction of $T$ on $W$, divides the minimal polynomial of $T$. Therefore, the minimal polynomial of $T_W$ is equal to:

$p_1^{d_1}...p_k^{d_k}$ where $d_i \leq r_i$.

Now, applying the primary decomposition theorem to $T_W$, we get subspaces $U_i=\text{Null}(p^i(T)^{d_i})$ such that their direct sum is $W$. Also, $\text{Null}(p^i(T_W)^{r_i})$ is equal to $(W_i\cap W)$ since $\text{Null}(p^i(T)^{r_i})=W_i$ and $T_W$ is restriction of $T$ on $W$. Since $r_i\geq d_i$, $(W_i\cap W)$ must contain $U_i$. However, supposing that $U_i$ is a proper subset of $(W_i\cap W)$ gives us contradiction because each $(W_i\cap W)$ is independent and the direct sum of $U_i$ forms $W$.

Step 2)

Going back to the original theorem, since $T$ is diagonalizable if and only if the minimal polynomial of $T$ is given by $(x-c_1)...(x-c_k)$ where $c_1,...,c_k$ are distinct characteristic values of $T$, subspaces $W_i$ associated to each characteristic value is equivalent to subspaces obtained by the primary decomposition theorem.

Now, we must show that $T$ is $T$-admissible on the invariant subspace $W$. If $f(T)\beta \in W$ then there are distinct vectors $\beta_1,...,\beta_k$ in $W_1,..,W_k$, respectively, such that $f(T)\beta=f(T)\beta_1+...+f(T)\beta_k$. Since each $\beta_i$ was chosen from each $W_i$, each $\beta_i$ is a characteristic vector of $T$, so we get

$f(T)\beta=f(c_1)\beta_1+...+f(c_k)\beta_k$

Then using step 1, we see that

$(W_1\cap W)\oplus ...\oplus (Wk\cap W)=W$

So each $f(c_i)\beta_i \in (W_i\cap W)$ and since $f(c_i)$ is a scalar, $\beta_i \in (W_i\cap W)$. Having $\gamma=\sum \beta_i$, which is clearly in $W$, we get

$f(T)\gamma=f(T)(\beta_1+...+\beta_k)=f(T)\beta$.

A bit late to the "party", I will try to provide an answer to your actual question before pointing to a duplicate, where an alternative proof can be found. To the question "can you check my proof" I'd say the answer depends on is acquainted with terms used, notably with the (inadmissible, if you'd ask me) terminology "$T$-admissible subspace". Though I found several questions mentioning it on this site, I could not find any that gave a definition. So I was inclined to answer "no we cannot check your proof", but fortunately I stumbled upon an electronic copy of the book by Hoffman & Kunze (which appears to be the only text to define this notion), so I can now reproduce its definition (slightly improved)

Definition. Let $T$ be a linear operator on a vector space $V$ and let $W$ be a subspace of $V$. Then $W$ is $T$-admissible if

(i) $W$ is invariant under $T$;

(ii) if $p[T](v)\in W$ for some $v\in V$ and some polynomial $p$, then there exists a vector $w\in W$ such that $p[T]v = p[T](w)$.

In terms of the $F[X]$-module structure (with $X$ acting as $T$) this says that $W$ is a submodule such that $p.\!V\cap W\subseteq p.\!W$ for every $p\in F[X]$ (the opposite inclusion being true for any submodule).

Being $T$-admissible is clearly a necessary condition for summands in a $T$-invariant direct sum decomposition of$~V$: if $V=\oplus U$ then $p.V\cap W=(p.W\oplus p.U)\cap W=p.W\oplus\{0\}=p.W$. It turns out also to be a sufficient condition, but this direction is less obvious; it is proved as part of the Cyclic Decomposition Theorem.

You wish to prove that for a diagonalisable $T$ any $T$-invariant subspace$~W$ admits a $T$-invariant complement by showing that $W$ is $T$-admissible, which is certainly an option. You step 1) is correct, though it seems to me it could be simplified. You are using the primary decomposition theorem, and its proof is in fact based on the fact that the projections onto the primary factors for$~T$ are given by certain polynomials in$~T$; restricting those to the invariant subspace$~W$ gives projections to the intersections of$~W$ with the primary factors, and step 1 follows immediately.

I don't quite understand what you are doing in step 2. You are apparently taking any $\beta\in V$ with $f[T](\beta)\in W$, and decomposing $\beta$ as sum of elements $\beta_i\in W_i$ (the primary factors, which in spite of their name are unrelated to$~W$). Then on $\beta_i$ the operator $p[T]$ acts as the scalar $p[c_i]$, and you wish to conclude from $p[T](\beta_i)\in W$ that $\beta_i$ is already in$~W$. But the scalar $p[c_i]$ could be zero, and this seems to thwart your attempt at a proof. Indeed in would be strange to prove that $\beta_i\in W$, since $\gamma=\sum_i\beta_i$ is just your original$~\beta$, and you would have proved that it lies in$~W$ even if it were chosen not to.

Given that you proved step 1, I would suggest a much easier continuation Forget $T$ admissibility, and directly choose complements in each$~W_i$ of $W\cap W_i$; since every polynomial in$~T$ acts on each$~W_i$ by a scalar (depending on$~i$), all subspaces of $W_i$ are $T$-invariant, so there is no obstruction here at all. Then the (direct) sum of the complements gives a complement to$~W$ in$~V$.