gbI = gbw(I, w)
gbM = gbw(M, w)
This routine computes a Gröbner basis of a left ideal I of the Weyl algebra with respect to a weight vector w = (u,v) where u+v >= 0. In the case where u_i+v_i > 0 for all i, the ordinary Buchberger algorithm works for any term order refining the weight order. If there exists i so that u_i+v_i = 0 the Buchberger algorithm needs to be adapted to guarantee termination. There are two strategies for doing this. One is to homogenize to an ideal of the homogeneous Weyl algebra.



The other is to homogenize with respect to the weight vector w. More details can be found in [SST, Sections 1.1 and 1.2].

The weight vector w = (u,v) must have u+v>=0.
The object gbw is a method function with options.