# Singular

##### 7.7.5.0. charVariety
Procedure from library `dmodapp.lib` (see dmodapp_lib).

Usage:
charVariety(I [,eng]); I an ideal, eng an optional int

Return:
ring (commutative) containing an ideal 'charVar'

Purpose:
computes an ideal whose zero set is the characteristic variety of I in
the sense of D-module theory

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).

Note:
The output ring is commutative. It contains an ideal 'charVar'.
If eng<>0, `std` is used for Groebner basis computations,
otherwise, and by default, `slimgb` is used.

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),Dp; poly F = x3-y2; printlevel = 0; def A = annfs(F); setring A; // Weyl algebra LD; // the annihilator of F ==> LD[1]=2*x*Dx+3*y*Dy+6 ==> LD[2]=3*x^2*Dy+2*y*Dx ==> LD[3]=9*x*y*Dy^2-4*y*Dx^2+15*x*Dy ==> LD[4]=27*y^2*Dy^3+8*y*Dx^3+135*y*Dy^2+105*Dy def CA = charVariety(LD); setring CA; CA; // commutative ring ==> // coefficients: QQ ==> // number of vars : 4 ==> // block 1 : ordering dp ==> // : names x y Dx Dy ==> // block 2 : ordering C charVar; ==> charVar[1]=2*x*Dx+3*y*Dy ==> charVar[2]=3*x^2*Dy+2*y*Dx ==> charVar[3]=9*x*y*Dy^2-4*y*Dx^2 ==> charVar[4]=27*y^2*Dy^3+8*y*Dx^3 dim(std(charVar)); // hence I is holonomic ==> 2 ```