TITLE: On formal solutions to differential equations
QUESTION [7 upvotes]: Let $k$ be a field of characteristic zero. Put $K=k[\![ t]\!]$ and $W=k\langle t,\partial\rangle / ([\partial,t]=1)$. Then $W$ operates on $K$ in the obvious way ($\partial f = \frac{d f}{dt}$), and define 
$$
  K^\text{fin} = \{f\in K:D f=0\text{ for some }D\in W\smallsetminus 0\} .
$$
The question is: 

Is $K^\text{fin}$ a subring of $K$?

Apologies in advance if this question is too elementary. Assuming $K^\text{fin}$ is a ring, I would be interested if anyone knows of somewhere in which arises naturally.

REPLY [8 votes]: These are (more or less) called holonomic functions. They appear in combinatorics as the generating functions of a large class of sequences (those satisfying linear recurrences with polynomial coefficients), and they're known to be closed under addition and multiplication. Here is a proof which is due to Stanley although the result is some decades older:
For $f \in k((t))$ let $L_f$ denote the $k(t)$-span of $\{ f, f', f'', ..., \}$ in $k((t))$. Then $f$ is holonomic iff $L_f$ is finite-dimensional. Since $L_{f+g} \subseteq L_f + L_g$ and $L_{fg} \subseteq L_f L_g$ it follows that if $L_f$ and $L_g$ are both finite-dimensional then so are $L_{f+g}$ and $L_{fg}$. Moreover $\dim L_{f+g} \le \dim L_f + \dim L_g$ and $\dim L_{fg} \le \dim L_f \dim L_g$.