# Singular

#### D.6.16.9 KSpencerKernel

Procedure from library `spcurve.lib` (see spcurve_lib).

Usage:
KSpencerKernel(M[,s][,v]); M matrix, s string, v intvec
optional parameters (please specify in this order, if both are present):
* s = first of the names of the new rings
e.g. "R" leads to ring names R and R1
* v of size n(n+1) leads to the following module ordering
gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)]) where the matrix entry ij corresponds to gen((i-1)*n+j)

Assume:
M is a quasihomogeneous n x (n+1) matrix where the n minors define an isolated space curve singularity

Return:
new ring containing the coefficient matrix KS representing the kernel of the Kodaira-Spencer map of the family of non-negative deformations having the given singularity as special fibre

Note:
* the initial basering should not contain variables with name e(i) or T(i), since those variable names will internally be used by the script
* setting an intvec with 5 entries and name watchProgress shows the progress of the computations:
watchProgress[1]>0 => option(prot) in groebner commands
watchProgress[2]>0 => trace output for highcorner
watchProgress[3]>0 => output of deformed matrix
watchProgress[4]>0 => result of elimination step
watchProgress[4]>1 => trace output of multiplications with xyz and subsequent reductions
watchProgress[5]>0 => matrix representing the kernel using print

Example:
 ```LIB "spcurve.lib"; ring r=0,(x,y,z),ds; matrix M[3][2]=z-x^7,0,y^2,z,x^9,y; def rneu=KSpencerKernel(M,"ar"); setring rneu; basering; ==> // characteristic : 0 ==> // number of vars : 17 ==> // block 1 : ordering Ws ==> // : names e(1) e(2) e(3) e(4) e(5) e(6) x y z ==> // : weights -21 -10 -32 -21 -27 -16 3 16 21 ==> // block 2 : ordering wp ==> // : names T(1) T(2) T(3) T(4) T(5) T(6) T(7) T(8) ==> // : weights 8 5 2 10 7 4 1 2 ==> // block 3 : ordering C print(KS); ==> T(7), 0, 0, 0, 0, 0, 0, 0, ==> KS[2,1],6*T(3), 3*T(7), 0, 0, 0, 0, 0, ==> KS[3,1],KS[3,2],KS[3,3],6*T(3),3*T(7),0, 0, 0, ==> 10*T(4),8*T(1), 7*T(5), 5*T(2),4*T(6),2*T(8),2*T(3),T(7) ```