# Singular

##### 7.7.19.0. purityFiltration
Procedure from library `purityfiltration.lib` (see purityfiltration_lib).

Usage:
purityFiltration(S), S matrix with entries of an Auslander regular ring D

Return:
a list T of two lists, purity filtration of the module M=D^q/D^p(S^t)

Purpose:
the first list T[1] gives a filtration {M_i} of M,
where the i-th entry of T[1] gives the representation matrix of M_(i-1).
the second list T[2] gives representations of the factor Modules,
i.e. T[2][i] gives the repr. matrix for M_(i-1)/M_i

Example:
 ```LIB "purityfiltration.lib"; ring D = 0,(x1,x2,d1,d2),dp; def S=Weyl(); setring S; int i; matrix R[3][3]=0,d2-d1,d2-d1,d2,-d1,-d1-d2,d1,-d1,-2*d1; print(R); ==> 0, -d1+d2,-d1+d2, ==> d2,-d1, -d1-d2, ==> d1,-d1, -2*d1 list T=purityFiltration(transpose(R)); // the purity filtration of coker(M) print(T[1][1]); ==> 0, -d1+d2,-d1+d2, ==> d2,-d1, -d1-d2, ==> d1,-d1, -2*d1 print(T[1][2]); ==> d2, d2, ==> d1-d2,0, ==> d2, d1 print(T[1][3]); ==> 1,0, ==> 0,d2, ==> 0,d1 // factor modules of the filtration print(T[2][1]); ==> 0, 1,1, ==> -1,0,1 print(T[2][2]); ==> 1, 1, ==> d1-d2,0 print(T[2][3]); ==> 1,0, ==> 0,d2, ==> 0,d1 ```