# Singular

##### 7.7.12.0. CenCharDec
Procedure from library `ncdecomp.lib` (see ncdecomp_lib).

Usage:
CenCharDec(I, C); I a module, C an ideal

Assume:
C consists of generators of the center of the base ring

Return:
a list L, where each entry consists of three records (if a finite decomposition exists)
L[*][1] ('ideal' type), the central character as a maximal ideal in the center,
L[*][2] ('module' type), the Groebner basis of the weight module, corresponding to the character in L[*][1],
L[*][3] ('int' type) is the vector space dimension of the weight module (-1 in case of infinite dimension);

Purpose:
compute a finite decomposition of C into central characters or determine that there is no finite decomposition

Note:
actual decomposition is the sum of L[i][2] above;
some modules have no finite decomposition (in such case one gets warning message)
The function `central` in `central.lib` may be used to obtain C, when needed.

Example:
 ```LIB "ncdecomp.lib"; printlevel=0; option(returnSB); def a = makeUsl2(); // U(sl_2) in characteristic 0 setring a; ideal I = e3,f3,h3-4*h; I = twostd(I); // two-sided ideal generated by I vdim(I); // it is finite-dimensional ==> 10 ideal Cn = 4*e*f+h^2-2*h; // the only central element list T = CenCharDec(I,Cn); T; ==> [1]: ==> [1]: ==> _[1]=4ef+h2-2h-8 ==> [2]: ==> _[1]=h ==> _[2]=f ==> _[3]=e ==> [3]: ==> 1 ==> [2]: ==> [1]: ==> _[1]=4ef+h2-2h ==> [2]: ==> _[1]=4ef+h2-2h-8 ==> _[2]=h3-4h ==> _[3]=fh2-2fh ==> _[4]=eh2+2eh ==> _[5]=f2h-2f2 ==> _[6]=e2h+2e2 ==> _[7]=f3 ==> _[8]=e3 ==> [3]: ==> 9 // consider another example ideal J = e*f*h; CenCharDec(J,Cn); ==> There is no finite decomposition ==> 0 ```