Solution (source code)

= Solution

Choose a finite-dimensional generating <vector subspace> $V\subseteq A$ containing $1$, and write $V^n$ for the <linear span> of products of $n$ elements of $V$. The <Gelfand–Kirillov dimension> is
$$
\boxed{\operatorname{GKdim}A=\limsup_{n\to\infty}\frac{\log\dim_k V^n}{\log n}.}
$$
For a nonzero <finitely generated module> $M$ considered as a right <module>, choose a finite-dimensional generating <vector subspace> $W\subseteq M$ and define the <Gelfand–Kirillov dimension of a module> by
$$
\boxed{\operatorname{GKdim}_A M=\limsup_{n\to\infty}\frac{\log\dim_k(WV^n)}{\log n}.}
$$
For left <modules>, replace $WV^n$ by $V^nW$. These values are independent of the choices: two algebra-generating <vector subspaces> satisfy $V\subseteq (V')^c$ and $V'\subseteq V^d$ for some positive integers $c,d$, and two module-generating <vector subspaces> are contained in bounded-degree translates of one another. The corresponding growth bounds differ only by a constant rescaling and shift of $n$, which do not change the <limit superior>.

Let $S$ be a nonzero <standard graded algebra>, generated by $r$ elements of degree one. It is a homogeneous <quotient ring> of the <polynomial ring> $k[z_1,\ldots,z_r]$. By the <Hilbert-Serre theorem>, its <Hilbert series> is a rational function whose only possible pole is at $t=1$. After canceling, write it as $P(t)/(1-t)^d$ with $P(1)\ne0$, where $0\leq d\leq r$. The cumulative dimensions are the coefficients of $P(t)/(1-t)^{d+1}$ and are eventually a <polynomial> in $n$ of degree $d$, with positive leading coefficient. With $V=S_0\oplus S_1$, these cumulative dimensions equal $\dim V^n$. Consequently
$$
\boxed{\operatorname{GKdim}S=d\in\{0,1,\ldots,r\}.}
$$
For $d=0$ the <algebra> is finite-dimensional and nonzero, so the cumulative dimension is eventually a positive constant. If the zero <algebra> is allowed, the common convention $\operatorname{GKdim}0=-\infty$ is an exception to the printed assertion; the integer conclusion concerns nonzero unital <algebras>.

For the <Weyl algebra> $A=A_1(k)=k\langle X,D\rangle/(DX-XD-1)$, the total-degree <filtered algebra> structure has <associated graded ring> $\operatorname{gr}A=k[x,\xi]$. Its ordered <monomials> $X^iD^j$ form a <basis>. Every <finitely generated module> has a <good filtration of a module>, and its <associated graded module> is finitely generated over $k[x,\xi]$. The <Hilbert-Serre theorem> therefore shows that its <Gelfand–Kirillov dimension> is an integer in $\{0,1,2\}$.

A nonzero <module> of <Gelfand–Kirillov dimension> zero here would have eventually constant cumulative dimension, hence be finite-dimensional. This is impossible in <characteristic> zero: taking the <trace> of the <endomorphisms> representing $DX-XD=1$ gives $0=\dim_k M$. For right <modules> the right-action operators reverse composition and give the negative identity instead, with the same contradiction. Thus
$$
\boxed{\operatorname{GKdim}_A M\in\{1,2\}.}
$$
Both occur. The regular <module> $A$ has $\dim V^n=\binom{n+2}{2}$, hence <Gelfand–Kirillov dimension> two. For a right <module> of <Gelfand–Kirillov dimension> one, take $M=k[x]$ with $f\cdot X=xf$ and $f\cdot D=-f'$. These actions satisfy the defining relation because $(f\cdot D)\cdot X-(f\cdot X)\cdot D=f$. The <module> is a <cyclic module> generated by $1$, and $\dim(1\cdot V^n)=n+1$. This also gives the lower bound for this particular <Weyl algebra> without invoking a general inequality for higher <Weyl algebras>.