Can every $T$-stable subspace be realised as the kernel of another linear operator that commutes with$~T$? This is inspired by the question Is Every Invariant Subspace the Kernel of an polynomial applied in the operator?, where "invariant subspace" and "polynomial in" are relative to a given linear operator$~T$ on a finite dimensional vectors space. The answer to that question is a simple "no", because of simple examples like scalar operators, which are rich in invariant subspaces but poor in polynomials. However, these are precisely the same kind of operators that are counterexamples to the in general false statement that any operator commuting with $T$ must be a polynomial in$~T$. Now it happens that for the kernel of another operator $U$ to be automatically $T$-stable, the natural sufficient condition is that $T$ and $U$ commute. So a refinement of the initial question, one that might be true, is obtained by allowing any operator that commutes with$~T$ instead of just polynomials in$~T$. Whence my actual question:

Given a linear operator $T$ on a finite dimensional $K$-vector space $V$, and a $T$-stable subspace $W$ of$~V$, does there always exist a linear operator$~U$ commuting with$~T$ such that $W=\ker U$?

This is certainly true in easy cases like when $T$ is diagonalisable with distinct eigenvalues (where all $T$-stable subspaces are sums of eigenspaces, and taking for$~U$ a product of operators $T-\lambda_i I$ will do) or at the opposite extreme scalar operators (since everything commutes with them, we can just have $U$ project parallel to$~W$ to a complementary subspace). What about the general case?
And an additional question (although I know I shouldn't be asking two questions at once): does the answer change if we allow $V$ to be infinite dimensional?
 A: Edit This answer is not (entirely) correct. The "fact that the primary decomposition can be adapted to an arbitrary submodule" referred to  below is neither obvious, nor (I am now convinced) true.
The result is true in finite dimension. My proof involves the structure theory for finitely generated modules over $K[X]$, as special case of a Principal Ideal Domain.
As usual view $V$ as a finitely generated (torsion) module over $K[X]$, with constants acting by their scalar multiplication, and $X$ as $T$. Then endomorphisms of this module are precisely $K$-linear operators that commute with$~T$. Given $W$, which being $T$-stable is a $K[X]$-submodule of$~V$, one has the quotient $V/W$ as $K[X]$-module, and the canonical projection $V\to V/W$ obviously has $W$ as kernel. If we can find any injective $K[X]$-module morphism $V/W\to V$, then we are done: the composite map $V\to V/W\to V$ will be our linear operator$~U$. This brings us to the following equivalent formulation

If $M$ is any finitely generated torsion $K[X]$-module, then any quotient of$~M$ is isomorphic to some submodule of$~M$.

Here and above "torsion" is what finite dimensionality gives us in addition to being finitely generated as $K[X]$-module: for every vector$~v$ there is some nonzero polynomial $P\in K[X]$ with $P[T](v)=0$. In fact the (global) minimal polynomial of$~T$ will do as$~P$ for all$~v$ at once.
Now the structure theory of finitely generated modules over a PID gives us, among other statements, the primary decomposition theorem: every such module can be decomposed as a finite direct sum of cyclic modules, each annihilated by some power of an prime element (in the case of $K[X]$, of an irreducible polynomial). It is easy to see that these primary cyclic modules $K[X]/(P^k)$ have the property that all its quotients are isomorphic to submodules (indeed for $K[X]/(P^l)$ with $l\leq k$ one has the submodule $P^{k-l}K[X]/(P^k)$ of $K[X]/(P^k)$).
However this does not quite settle the question. One needs the fact that the primary decomposition can be adapted to an arbitrary submodule$~N$ of$~M$, in the sense that $N$ is realised as the direct sum of a submodule chosen in each primary factor. This is indeed the case, although it does not follow easily from the primary decomposition theorem itself.
The construction now runs as follows: choose a primary decomposition adapted to the submodule $W$ of $V$; find for each primary factor a submodule isomorphic to its quotient by its submodule contributing to$~W$, then the direct sum of those submodules will be isomorphic to the $K[X]$-module $V/W$.
One sees also that this fails miserably if $V$ can be infinite dimensional, even in the limited case where $V$ remains finitely generate as $K[X]$-module. In this situation we can have non-torsion cyclic factors. Indeed for such a factor isomorphic (as module) to $K[X]$, the submodules correspond to the ideals of $K[X]$, and quotients by them are torsion modules; no submodules of $K[X]$ however have any torsion.
