# Singular          #### D.7.4.1 prepMat

Procedure from library `stratify.lib` (see stratify_lib).

Usage:
prepMat(M,wr,ws,step);
where M is a matrix, wr is an intvec of size ncols(M), ws an intvec of size nrows(M) and step is an integer

Return:
2 lists of submatrices corresponding to the filtrations specified by wr and ws:
the first list corresponds to the list for the filtration of AdA, i.e. the ranks of these matrices will be the r_i, the second one to the list for the filtration of L, i.e. the ranks of these matrices will be the s_i

Note:
* the entries of the matrix M are M_ij=delta_i(x_j),
* wr is used to determine what subset of the set of all dx_i is generating AdF^l(A):
if (k-1)*step <= wr[i] < k*step, then dx_i is in the set of generators of AdF^l(A) for all l>=k and the i-th column of M appears in each submatrix starting from the k-th
* ws is used to determine what subset of the set of all delta_i is generating Z_l(L):
if (k-1)*step <= ws[i] < k*step, then delta_i is in the set of generators of Z_l(A) for l < k and the i-th row of M appears in each submatrix up to the (k-1)th
* the entries of wr and ws as well as step should be positive integers

Example:
 ```LIB "stratify.lib"; ring r=0,(t(1..3)),dp; matrix M=0,t(1),3*t(2),0,0,t(1); print(M); ==> 0,t(1),3*t(2), ==> 0,0, t(1) intvec wr=1,3,5; intvec ws=2,4; int step=2; prepMat(M,wr,ws,step); ==> : ==> : ==> _[1,1]=0 ==> _[2,1]=0 ==> : ==> _[1,1]=0 ==> _[1,2]=t(1) ==> _[2,1]=0 ==> _[2,2]=0 ==> : ==> _[1,1]=0 ==> _[1,2]=t(1) ==> _[1,3]=3*t(2) ==> _[2,1]=0 ==> _[2,2]=0 ==> _[2,3]=t(1) ==> : ==> : ==> _[1,1]=0 ==> _[1,2]=t(1) ==> _[1,3]=3*t(2) ==> _[2,1]=0 ==> _[2,2]=0 ==> _[2,3]=t(1) ==> : ==> _[1,1]=0 ==> _[1,2]=0 ==> _[1,3]=t(1) ```

### Misc 