The rank of a D-module is defined algebraically as follows. Let D denote the Weyl algebra C<x_1,....,x_n,d_1,...,d_n> and let R denote the ring of differential operators C(x_1,...,x_n)<d_1,...,d_n> with rational function coefficients. Then the rank of M = D^r/N is equal to the dimension of R^r/RN as a vector space over C(x_1,...,x_n).
See the book 'Groebner deformations of hypergeometric differential equations' by Saito-Sturmfels-Takayama (1999) for more details of the algorithm.
i1 : W = QQ[x,y,Dx,Dy, WeylAlgebra => {x=>Dx,y=>Dy}] o1 = W o1 : PolynomialRing |
i2 : I = ideal (x*Dx+2*y*Dy-3, Dx^2-Dy) 2 o2 = ideal (x*Dx + 2y*Dy - 3, Dx - Dy) o2 : Ideal of W |
i3 : holonomicRank I o3 = 2 |