# Singular

#### D.15.15.5 warkedPreimageStd

Procedure from library `graal.lib` (see graal_lib).

Usage:
warkedPreimageStd(wM); M warkedModule

Return:
given wM consisting of:
- wM.Gr a graalBearer containing all relevant global structures - wM.modQ0y generating set G of a module M over Q0y - wM.stdmodQ0y empty
- wM.qQ0y empty
- wM.modKy corresponding generating set H of M_in over Ky - wM.stdmodKy empty
- wM.qKy empty
- wM.w weights on M
returns the same warkedModule, except following differences: - wM.stdmodQ0y contains a subset G such that for any standard basis L of the kernel G + L is a standard basis of modQ0y + kernel
- wM.qQ0y contains a transformation matrix such that stdmodAy = QAy*modQ0y
- wM.stdmodKy contains a standardbasis of modKy
- wM.qKy contains a transformation matrix such that stdmodKy = QKy*modKy

Note:
the standard basis of modAy is computed by lifting a corresponding Groebner basis of modKy

Example:
 ```LIB "graal.lib"; ring Q = 0,(x,y,z),dp; ideal H = y2-xz; qring A = std(H); ideal L = x3-yz,x2y-z2; graalBearer Gr = graalMixed(L); def Q0y = Gr.Q0y; setring Q0y; module M = (Y(1)*y+y^2-1)*gen(1)+(Y(2)*z+z^2-1)*gen(2), Y(1)*y*gen(1)+Y(2)*z*gen(2); /* This is M: */ print(matrix(M)); ==> y^2-1+Y(1)*y, Y(1)*y, ==> (z^2-1)+(z)*Y(2),(z)*Y(2) intvec w = 1,1,1; warkedModule wM; wM.Gr = Gr; wM.modQ0y = M; wM.w = w; def Ky = Gr.Ky; setring Ky; module Min = (y^2-1)*gen(1)+(z^2-1)*gen(2),Y(1)*y*gen(1)+Y(2)*z*gen(2); /* This is M_in: */ print(matrix(Min)); ==> y^2-1, Y(1)*y, ==> (z^2-1),(z)*Y(2) wM.modKy = Min; /* warkedPreimageStd yields the same standard basis as std: */ warkedModule wN = warkedPreimageStd(wM); wN; ==> // ** redefining scriptIin ( ideal scriptIin = Gr.scriptIin;) ==> // ** redefining scriptI ( ideal scriptI = Gr.scriptI;) ==> // ** redefining a ( poly a = L[1][1,1];) ==> module over Q^0[Y] = (0,z),(Y(1),Y(2),x,y),(ds(2),c,dp(2)) / <0>: ==> y^2-1+Y(1)*y, Y(1)*y, ==> (z^2-1)+(z)*Y(2),(z)*Y(2) ==> standard basis: ==> _[1,1],_[1,2],0, 0, 0, 0, ==> _[2,1],_[2,2],x^3+(-z)*y-Y(1),x^2*y+(-z^2)-Y(2),y^2+(-z)*x,(z)*Y(1)-Y(2)*\ y ==> module over K[Y] = (0,z),(Y(1),Y(2),y),(c,dp(2),lp(1)) / : ==> y^2-1, Y(1)*y, ==> (z^2-1),(z)*Y(2) ==> weights on the unit vectors: 1,1,1 ==> setring Q0y; module stdM = std(M); print(matrix(stdM)); ==> y^2-1+Y(1)*y, Y(1)-Y(1)^2*y,Y(1)^2*y^2, ==> (z^2-1)+(z)*Y(2),_[2,2], _[2,3] ```