Necessary and sufficient conditions for a module to have finitely many invariant subspaces I have had trouble answering the following question which is from a study guide to a qualifying exam I will be taking later this summer. I am thinking this question has something to do with cyclic vectors but I have not been  able to put the two definitions together.
Definition:  If $\alpha$ is any vector in $V$, the $T$-cyclic subspace generated by $\alpha$ is the subspace $Z(\alpha;T)$ of all vectors of the form $g(T) \alpha$, $g \in F[x]$.  If $Z(\alpha; T) = V$, then $\alpha$ is called a cyclic vector for $T$.
Let $V$ be a finite-dimensional vector space over an infinite field $F$ and let $T:V\rightarrow V$ be a linear operator.  Give to each $V$ the structure of a module over the polynomial ring $F[x]$ by defining $x \alpha = T(\alpha)$ for each $\alpha \in V$

  
*
  
*In terms of the expression for $V$ as a direct sum of cyclic $F[x]$-modules, what are necessary and sufficient conditions in order that $V$ have only finitely many $T$-invariant $F$-subspaces?
  
*Every linear operator I have encountered has finitely many $T$-invariant subspaces.  Is there a good example of one that has infinitely  $T$-invariant $F$-subspaces?

I was thinking that one direction might require $T$ not to have any cyclic vectors but I dont think this is the only hypothesis we need in order to answer even one direction for part 1. 
 A: We claim that necessary and sufficient condition that $V$ has only finitely many $T$-invariant $F$-subspaces is that $V$ has a cyclic vector for $T$.
Let $A = F[X]$.
$V$ is regarded as an $A$-module as explained by the OP.
A $T$-invariant $F$-subspace of $V$ is none other than an $A$-submodule of $V$. 
Suppose $V$ has a cyclic vector $v$ for $T$.
This is equivalent to saying that $V = Av$.
Define an $A$-homomorphism $\psi:A \rightarrow V$ by $\psi(g) = gv$.
Let $I$ = Ker($\psi$) = {$g \in A$; $gv = 0$}.
$I$ is an ideal of $A$.
Hence $I$ is generated by a polynomial $f(X)$.
$V = Av$ is isomorphic to $A/(f(X))$ as an $A$-module.
Let $n$ be the dimension of $V$ over $F$.
Since $1, Tv, T^2v, \dots T^nv$ are linearly dependent, 
there exists a polynomial $g(X)$ of degree $n$ such that $g(X)v = 0$. 
Hence $f(X)$ is not zero.
Every $A$-submodule of $A/(f(X))$ is of a form $(g(X))/(f(X))$, where $g(X)$ is a factor of $f(X)$.
Since the number of monic factor polynomials of $f(X)$ is finite,
the number of $A$-submodule of $A/(f(X))$ is finite.
Hence $V$ has only finitely many $T$-invariant $F$-subspaces.
Conversely suppose that $V$ has only finitely many $T$-invariant $F$-subspaces.
Let $v$ and $w$ be vectors of $V$.
We consider the set $\Gamma$ = {$A(v + tw)$; $t \in F$}.
Since $V$ has only finitely many $A$-submodules, $\Gamma$ is finite.
Let $\sigma:F \rightarrow \Gamma$ be the map $\sigma(t) = A(v + tw)$.
Since $F$ is infinite, $\sigma$ cannot be injective. 
Hence there exist distinct elements $s$, $t$ of $F$ such that $A(v + sw) = A(v + tw)$.
Since $(s - t)w = v + sw - (v + tw) \in A(v + sw)$, $w \in A(v + sw)$.
Hence $v \in A(v + sw)$.
Hence $Av + Aw = A(v + sw)$.
Inductively, if $v_1, ..., v_n \in V$, 
there exist $t_2, ..., t_n \in F$ such that $Av_1 + ... + Av_n = A(v_1 + t_2v_2 + ... + t_nv_n)$.
Since $V$ is finitely generated over $A$, $V = Av$ for some $v \in V$.
Hence we are done.
