# Singular

##### 7.7.8.0. fullSerreRelations
Procedure from library `freegb.lib` (see freegb_lib).

Usage:
fullSerreRelations(A,N,C,P,d); A an intmat, N,C,P ideals, d an int

Return:
ring (and ideal)

Purpose:
compute the inhomogeneous Serre's relations associated to A in given
variable names

Assume:
three ideals in the input are of the same sizes and contain merely
variables which are interpreted as follows: N resp. P stand for negative
resp. positive roots, C stand for Cartan elements. d is the degree bound for
letterplace ring, which will be returned.
The matrix A is a generalized Cartan matrix with integer entries
The result is the ideal called 'fsRel' in the returned ring.

Example:
 ```LIB "freegb.lib"; intmat A[2][2] = 2, -1, -1, 2; // A_2 = sl_3 Cartan matrix ring r = 0,(f1,f2,h1,h2,e1,e2),dp; ideal negroots = f1,f2; ideal cartans = h1,h2; ideal posroots = e1,e2; int uptodeg = 5; def RS = fullSerreRelations(A,negroots,cartans,posroots,uptodeg); setring RS; fsRel; ==> fsRel[1]=f1(1)*f2(2)*f2(3)-2*f2(1)*f1(2)*f2(3)+f2(1)*f2(2)*f1(3) ==> fsRel[2]=f1(1)*f1(2)*f2(3)-2*f1(1)*f2(2)*f1(3)+f2(1)*f1(2)*f1(3) ==> fsRel[3]=e1(1)*e2(2)*e2(3)-2*e2(1)*e1(2)*e2(3)+e2(1)*e2(2)*e1(3) ==> fsRel[4]=e1(1)*e1(2)*e2(3)-2*e1(1)*e2(2)*e1(3)+e2(1)*e1(2)*e1(3) ==> fsRel[5]=f2(1)*e1(2)-e1(1)*f2(2) ==> fsRel[6]=f1(1)*e2(2)-e2(1)*f1(2) ==> fsRel[7]=-f1(1)*e1(2)+e1(1)*f1(2)-h1(1) ==> fsRel[8]=-f2(1)*e2(2)+e2(1)*f2(2)-h2(1) ==> fsRel[9]=h1(1)*h2(2)-h2(1)*h1(2) ==> fsRel[10]=h1(1)*e1(2)-e1(1)*h1(2)-2*e1(1) ==> fsRel[11]=f1(1)*h1(2)-h1(1)*f1(2)-2*f1(1) ==> fsRel[12]=h1(1)*e2(2)-e2(1)*h1(2)+e2(1) ==> fsRel[13]=f2(1)*h1(2)-h1(1)*f2(2)+f2(1) ==> fsRel[14]=h2(1)*e1(2)-e1(1)*h2(2)+e1(1) ==> fsRel[15]=f1(1)*h2(2)-h2(1)*f1(2)+f1(1) ==> fsRel[16]=h2(1)*e2(2)-e2(1)*h2(2)-2*e2(1) ==> fsRel[17]=f2(1)*h2(2)-h2(1)*f2(2)-2*f2(1) ```