The Weyl Algebra and $\mathfrak{sl}_2$
I’ve been away from this blog for quite a while - almost a year, in fact! My excuses are my wedding and the prelims (a.k.a. quals), as well as all the preparation that had to go into them (although, to be honest, those things only occupied me till September last year!).
Looking back at my previous posts, I’ve realized that in attempting to teach both math and code, I probably ended up doing neither. This is really not the best place to learn representation theory (for example) - there are better books and blogs out there. Also, most of the code that I wrote to illustrate those posts feels contrived, and neither highlights Sage’s strengths nor reflects how I normally use Sage for my assignments and projects.
I’ve thus decided to write shorter posts with code that I actually use (on SageMathCloud), along with some explanations of the code. Lately, I’ve been writing code for non-commutative algebra and combinatorics, so today I’ll start with a simple example of a non-commutative algebra.
The Weyl Algebra
The $1$-dim. Weyl algebra is the (non-commutative) algebra generated by $x, \partial_x$ subject to the relations
\[x \partial_x = \partial_x x - 1.\]If we treat $x$ as “multiplication by $x$” and $\partial_x$ as “differentiation w.r.t. $x$”, this relation is really just an application of the chain rule:
\[\partial_x (x (f(x)) = f(x) + x \partial_x f(x)\]We can generalize to higher dimensions: the $n$-dim. Weyl algebra is the algebra generated by $x_1,\dots,x_n,\partial_{x_1},\dots,\partial_{x_n}$ quotiented by the relations that arise from treating them as the obvious operators on $\mathbb{F}[x_1,\dots,x_n]$.
Weyl algebras in Sage
It’s easy to define the Weyl algebra in Sage:
Calling inject_variables
allows us to use the operators x,y,z,dx,dy,dz
in subsequent code (where dx
denotes $\partial_x$, etc).
One can do rather complicated computations:
By default, Sage chooses to represent monomials with x,y,z
in front of dx,dy,dz
:
Keep in mind that x
does not refer to the polynomial $x \in \mathbb{F}[x]$, so one should not expect dx*x
to be 1
.
(For some reason show
does not give the right output. Try show(x)
or show(x*dx)
, for example.)
Representations of $\mathfrak{sl}_2$
It turns out that the $1$-dim. Weyl algebra gives a representation of $\mathfrak{sl}_2(\mathbb{F})$.
The Lie algebra $\mathfrak{sl}_2(\mathbb{F})$ is generated by $E,F,H$ subject to the relations
\[[H,E] = 2E, \qquad [H,F] = -2F, \qquad [E,F] = H.\]Define the following elements of the $1$-dim. Weyl algebra:
\[E = x \partial_x^2,\qquad F = -x,\qquad H = -2x\partial_x.\]We can use Sage to quickly verify that these elements indeed satisfy the relations for $\mathfrak{sl}_2$ (using the commutator as the Lie bracket i.e. $[A,B] = AB - BA$):
Working over $\mathbb{C}$, this action of $\mathfrak{sl}_2(\mathbb{C})$ makes $\mathbb{C}[x]$ a Verma module of highest weight $0$.
In fact, we can make $\mathbb{C}[x]$ a Verma module of highest weight $c$ for any $c \in \mathbb{C}$ by using:
\[E = (x \partial_x - c)\partial_x,\qquad F = -x,\qquad H = -2x\partial_x + c.\]We verify this again in Sage:
In subsequent posts, I’ll talk more about defining other non-commutative algebras in Sage and Singular.