Characterising spaces of linear recurrent sequences. Let $K$ be a field and $\def\N{\mathbf N}K^\N$ the infinite dimensional space of all sequences of elements of$~K$. Any linear recurrence relation of order $d$ with constant coefficients
$$
a_{i+d} = c_0a_i+c_1a_{i+1}+\cdots c_{d-1}a_{i+d-1}
  \qquad\text{for all $i\in\N$,}
$$
defines a $d$-dimensional subspace $V$ of $K^\N$. In studying these sequences one introduces the shift operator $T:(a_0,a_1,a_2,\ldots)\mapsto(a_1,a_2,a_3,\ldots)$, which defines an endomorphism of $V$, and whose (generalised) eigenspace decomposition is useful for describing linear recurrent sequences explicitly.
The shift operator $T$ is actually well defined on all of $K^\N$, and can be used for instance to characterise geometric sequences as its eigenvectors. For the indicated application to linear recurrences, it is of vital importance that each space$~V$ defined by a specific recurrence relation is $T$-stable, and this is indeed always the case for the recurrence relations considered (the fact that the coefficients of the recurrence relation are constant is essential for this). Now I was just wondering if this precisely describes the finite dimensional $T$-stable subspaces of $K^\N$:

If $V$ is a finite dimensional $T$-stable subspace of $K^\N$, does there exist a linear recurrence relation$~R$ of order $\dim V$ with constant coefficients such that $V$ consists of all sequences in$~K^\N$ satisfying$~R$?

I think the answer should be affirmative; maybe there is some elegant way to see this easily.
 A: In fact, thinking about this it turns out to be relatively easy. One needs a simple
Lemma. Let $P\in K[X]$ be any monic polynomial, and denote by $P[T]\in\operatorname{End}(K^\N)$ the corresponding polynomial in$~T$. Then $\dim\ker(P[T])=\deg P$.
The proof consists simply of observing that our recurrence relation amounts to saying $(a_i)_{i\in\N}\in\ker(-c_oT^0-c_1T^1-\cdots-c_{n-1}T^{n-1}+T^n)$, and that any $P[T]$ is of this form.
Now let $V$ be a finite dimensional $T$-stable subpace of $K^\N$, and let $P$ by the minimal polynomial of the restriction of $T$ to $V$. Then $V\subseteq\ker(P[T])$ by definition, and $\deg P\leq\dim V$ by the Cayley-Hamilton theorem. Therefore the lemma gives $V=\ker(P[T])$, and $V$ consists of the solutions of the linear recurrence encoded by$~P$.
Equivalently, following Jyrki Lahtonen's suggestion, one could take $P$ to be the characteristic polynomial of the restriction of $T$ to$~V$; then $\deg P=\dim V$ is obvious and $V\subseteq\ker(P[T])$ follows from the Cayley-Hamilton theorem.
Incidentally this shows that the restriction of $T$ to any finite dimensional $T$-stable subspace has its minimal and characteristic polynomials equal (and therefore $V$ has a cyclic vector for$~T$, and the centraliser in $L(V,V)$ of the restriction of $T$ is limited to the polynomials in that restriction).
