# Singular

##### 7.5.5.0. restrictionModule
Procedure from library `dmodapp.lib` (see dmodapp_lib).

Usage:
restrictionModule(I,w,[,eng,m,G]);
I ideal, w intvec, eng and m optional ints, G optional ideal

Return:
ring (a Weyl algebra) containing a module 'resMod'

Assume:
The basering is the n-th Weyl algebra over a field of characteristic 0
and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
holds, i.e. the sequence of variables is given by
x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
belonging to x(i).
Further, assume that I is holonomic and that w is n-dimensional with
non-negative entries.

Purpose:
computes the restriction module of a holonomic ideal to the subspace
defined by the variables corresponding to the non-zero entries of the
given intvec

Note:
The output ring is the Weyl algebra defined by the zero entries of w.
It contains a module 'resMod' being the restriction module of I wrt w.
If there are no zero entries, the input ring is returned.
If eng<>0, `std` is used for Groebner basis computations,
otherwise, and by default, `slimgb` is used.
The minimal integer root of the b-function of I wrt the weight (-w,w)
can be specified via the optional argument m.
The optional argument G is used for specifying a Groebner Basis of I
wrt the weight (-w,w), that is, the initial form of G generates the
initial ideal of I wrt the weight (-w,w).
Further note, that the assumptions on m and G (if given) are not
checked.

Display:
If printlevel=1, progress debug messages will be printed,
if printlevel>=2, all the debug messages will be printed.

Example:
 ```LIB "dmodapp.lib"; ring r = 0,(a,x,b,Da,Dx,Db),dp; def D3 = Weyl(); setring D3; ideal I = a*Db-Dx+2*Da, x*Db-Da, x*Da+a*Da+b*Db+1, x*Dx-2*x*Da-a*Da, b*Db^2+Dx*Da-Da^2+Db, a*Dx*Da+2*x*Da^2+a*Da^2+b*Dx*Db+Dx+2*Da; intvec w = 1,0,0; def rm = restrictionModule(I,w); setring rm; rm; ==> // coefficients: QQ ==> // number of vars : 4 ==> // block 1 : ordering C ==> // block 2 : ordering dp ==> // : names x b Dx Db ==> // noncommutative relations: ==> // Dxx=x*Dx+1 ==> // Dbb=b*Db+1 print(resMod); ==> 2*x*Db-Dx,x*Dx+2*b*Db+2,4*b*Db^2+Dx^2+6*Db ```