# Singular          #### D.4.14.16 primdecMon

Procedure from library `monomialideal.lib` (see monomialideal_lib).

Usage:
primdecMon (I[,alg]); I ideal, alg string

Return:
list, the components in a minimal primary decomposition of I. (returns -1 if I is not a monomial ideal).

Assume:
I is a monomial ideal of the basering k[x(1)..x(n)].

Note:
This procesure returns a minimal primary decomposition of I. One may call the procedure with different algorithms using the optional argument 'alg':
- the direct method for a primary decomposition following Vasconcelos' book (alg=vp),
- from the irreducible decomposition obtained via the direct method following Vasconcelos' book (alg=vi),
- from the irreducible decomposition obtained via the
Alexander dual and using doble dual (alg=add),
- from the irreducible decomposition obtained via the
Alexander dual and quotients following E. Miller (alg=ad), - from the irreducible decomposition obtained
via ........ (alg=for),
- from the irreducible decomposition obtained via the Scarf complex following Milowski (alg=mil),
- from the irreducible decomposition obtained using the label algorihtm of Roune (alg=lr),
- from the irreducible decomposition obtained using the algorithm of Gao-Zhu (alg=gz),
- from the irreducible decomposition obtained using the slice algorithm of Roune (alg=sr).

Example:
 ```LIB "monomialideal.lib"; ring R = 0,(w,x,y,z),Dp; ideal I = w^3*x*y,w*x*y*z,x^2*y^2*z^2,x^2*z^4,y^3*z; // Vasconcelos para primaria primdecMon(I,"vp"); ==> : ==> _=x2 ==> _=y3 ==> _=wxy ==> _=w3 ==> : ==> _=xy ==> _=x2 ==> _=y3 ==> : ==> _=z ==> _=x ==> : ==> _=y3 ==> _=wyz ==> _=w3 ==> _=z4 ==> _=y2z2 ==> : ==> _=y ==> _=z4 ==> : ==> _=z ==> _=w3 // Alexander dual primdecMon(I,"add"); ==> : ==> _=y ==> _=z4 ==> : ==> _=xy ==> _=x2 ==> _=y3 ==> : ==> _=w3 ==> _=z ==> : ==> _=w ==> _=x2 ==> _=y3 ==> : ==> _=x ==> _=z ==> : ==> _=w ==> _=y3 ==> _=z4 ==> _=y2z2 // label algorithm primdecMon(I,"lr"); ==> : ==> _=w ==> _=x2 ==> _=y3 ==> : ==> _=w ==> _=y3 ==> _=z4 ==> _=y2z2 ==> : ==> _=w3 ==> _=z ==> : ==> _=x ==> _=z ==> : ==> _=xy ==> _=x2 ==> _=y3 ==> : ==> _=y ==> _=z4 //slice algorithm primdecMon(I,"sr"); ==> : ==> _=w ==> _=x2 ==> _=y3 ==> : ==> _=w ==> _=y3 ==> _=z4 ==> _=y2z2 ==> : ==> _=w3 ==> _=z ==> : ==> _=x ==> _=z ==> : ==> _=xy ==> _=x2 ==> _=y3 ==> : ==> _=y ==> _=z4 ```

### Misc 