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

Usage:
annPoly(f); f a poly

Return:
ring (a Weyl algebra) containing an ideal 'LD'

Purpose:
compute the complete annihilator ideal of f in the corresponding
Weyl algebra

Assume:
basering is commutative and over a field of characteristic 0

Note:
Activate the output ring with the `setring` command.
In the output ring, the ideal 'LD' (in Groebner basis) is the
annihilator.

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,(x,y,z),dp; poly f = x^2*z - y^3; def A = annPoly(f); setring A; // A is the 3rd Weyl algebra in 6 variables LD; // the Groebner basis of annihilator ==> LD=Dz^2 ==> LD=Dy*Dz ==> LD=Dx*Dy ==> LD=y*Dy+3*z*Dz-3 ==> LD=x*Dx-2*z*Dz ==> LD=z*Dx*Dz-Dx ==> LD=Dy^3+3*Dx^2*Dz ==> LD=x*Dy^2+3*y*Dx*Dz ==> LD=x^2*Dy+3*y^2*Dz ==> LD=Dx^3 ==> LD=3*y*Dx^2+z*Dy^2 ==> LD=3*y^2*Dx+2*x*z*Dy ==> LD=y^3*Dz-x^2*z*Dz+x^2 gkdim(LD); // must be 3 = 6/2, since A/LD is holonomic module ==> 3 NF(Dy^4, LD); // must be 0 since Dy^4 clearly annihilates f ==> 0 poly f = imap(r,f); NF(LD*f,std(ideal(Dx,Dy,Dz))); // must be zero if LD indeed annihilates f ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ==> _=0 ``` 