Minimal polynomial is irreducible if the only $T$-invariant subspaces of $V$ are $V$ and $0$ 
Let $V$ be a finite dimensional vector space over $F$ and $T:V \rightarrow V$ linear. Suppose the only $T$-invariant subspace of $V$ are $V$ and $0$, show that the minimal polynomial $q_T$ is irreducible over $F[t]$.

Attempt: Suppose not and write $q_T=p_1^{e_1}\ldots p_r^{e_r}$ with $p_i$ monic irreducible polynomials. By primary decomposition theorem, we know that $V=\ker(p_1^{e_1}(T)) \oplus \ldots \oplus \ker(p_r^{e_r}(T))$. Since $\ker(p_i^{e_i}(T))$ is $T$-invariant, by assumption, $\ker(p_j^{e_j}(T))=V$ for some $1 \leq j \leq r$. So $p_j^{e_j}=0 \Rightarrow p_j=0$, a contradiction. Is my proof correct?
 A: One can state more generally that distinct monic divisors $D\in F[X]$ of the minimal polynomial$~\mu_T$ correspond to distinct $T$-invariant subspaces of$~V$, via the correspondence $D\mapsto \ker(D[T])$; the reason this correspondence is injective being that from $W=\ker(D[T])$ one can recover $D$ as the minimal polynomial of the restriction$~T|_W$. It then easily follows that inclusion among these subspaces corresponds to divisibility among those divisors. This statement gives in particular that any such divisor other than $1$ and $~\mu_T$ implies the existence of at least one non-trivial $T$-invariant subspace.
The crucial claim above is that if $D\mid \mu_T$ then $D$ is the minimal polynomial of$~T|_W$ for $W=\ker(D[T])$; since $D$ certainly annihilates$~T|_W$ by definition of$~W$, the point here is to show that no strict divisor of$~D$ annihilates$~T|_W$. Putting $Q=\mu_T/D$, one has $0=\mu_T[T]=D[T]\circ Q[T]$, so the image $W'$ of $Q[T]$ is contained in$~W$. This implies the stronger claim that already no strict divisor $d\mid D$ can annihilate $T|_{W'}$ (which would be implied by annihilating$~T|_W$): it would mean that $d[T]\circ Q[T]=0$ so $(dQ)[T]=0$, but since $\deg(dQ)<\deg(DQ)=\deg(\mu_T)$, this would contradict the minimality of$~\mu_T$.

The proof you sketched in the question does break the question down to the case where $\mu_T$ has only one distinct irreducible factor, but does not really advance with dealing with that case ($\mu_T=p^e$ with $p$ an irreducible polynomial). You need to use something like that the image of$~p[T]$ is contained in $\ker(p^{e-1}[T])$ and thus gives a non-trivial $T$-invariant subspace.
