A Weyl algebra is the non-commutative algebra of algebraic differential operators on a polynomial ring. To each variable x corresponds the operator dx that differentiates with respect to that variable. The evident commutation relation takes the form dx*x == x*dx + 1.
We can give any names we like to the variables in a Weyl algebra, provided we specify the correspondence between the variables and the derivatives, with the WeylAlgebra option, as follows.
i1 : R = QQ[x,y,dx,dy,t,WeylAlgebra => {x=>dx, y=>dy}] |
i2 : dx*dy*x*y |
i3 : dx*x^5 |
All modules over Weyl algebras are, in Macaulay 2, right modules. This means that multiplication of matrices is from the opposite side:
i4 : dx*x |
i5 : matrix{{dx}} * matrix{{x}} |
All Groebner basis and related computations work over this ring. For an extensive collection of D-module routines (A D-module is a module over a Weyl algebra), see D-modules.