# SINGULAR DEMO¶

## "brnoeth: A Singular library for AG codes"¶

### Introduction to Singular¶

A Computer Algebra System for polynomial computations

Singular online https://www.singular.uni-kl.de:8003/

General remarks:

• Comments: introduced by double slash
• Command lines: always ended by ";"
• Variables: declare type before using
• Booleans: work like in C/C++

This is to save the session (Input and Output) on a local file:

In [1]:
monitor("session.txt","io");


declare an integer variable

In [2]:
int i = 1;


list of existing variables

In [3]:
listvar();

Out[3]:
// i                              [0]  int 1


i is defined if the answer is a positive integer

In [4]:
defined(i);

Out[4]:
1


check the type of a variable

In [5]:
typeof(i);

Out[5]:
int


remove a variable together with its value

In [6]:
kill i;


check that i is removed: answer is zero

In [7]:
defined(i);

Out[7]:
0


Basic types:

• int (integer)
• intvec (vector of integers)
• intmat (matrix of integers)

random integer between 3 and 100

In [8]:
int k = random(3, 100);
k;

Out[8]:
54


intvec by list of integers

In [9]:
intvec v=1,2,4,3;
v;

Out[9]:
1,2,4,3


intvec by a range

In [10]:
intvec w=1..5;
w;

Out[10]:
1,2,3,4,5


In [11]:
v[4];

Out[11]:
3


matrix of integers: declare the dimensions and the entries

In [12]:
intmat A[2][3]=1,2,3,4,5,6;
A;

Out[12]:
1,2,3,
4,5,6


a more pleasant display

In [13]:
print(A);

Out[13]:
     1     2     3
4     5     6


In [14]:
A[2,2];

Out[14]:
5


declare an empty list

In [15]:
list L=list();
L;

Out[15]:
empty list


define the entries of L

In [16]:
L[1]=v;
L[2]=w;
L[3]=A;
L[5]=1;


show the complete list L

In [17]:
L;

Out[17]:
[1]:
1,2,4,3
[2]:
1,2,3,4,5
[3]:
1,2,3,
4,5,6
[5]:
1


redefine an entry

In [18]:
L[5]=0;


check that L is updated

In [19]:
L;

Out[19]:
[1]:
1,2,4,3
[2]:
1,2,3,4,5
[3]:
1,2,3,
4,5,6
[5]:
0


nested indices: the third component of the first component

In [20]:
L[1][3];

Out[20]:
4


the size of L

In [21]:
size(L);

Out[21]:
5


which type is entry in position 5?

In [22]:
typeof(L[5]);

Out[22]:
int


which type is entry in position 4?

In [23]:
typeof(L[4]);

Out[23]:
none


define a list with the function "list"

In [24]:
list LL=list(w,5,list());


show LL

In [25]:
LL;

Out[25]:
[1]:
1,2,3,4,5
[2]:
5
[3]:
empty list


concatenate two lists

In [26]:
L + LL;

Out[26]:
[1]:
1,2,4,3
[2]:
1,2,3,4,5
[3]:
1,2,3,
4,5,6
[5]:
0
[6]:
1,2,3,4,5
[7]:
5
[8]:
empty list


Rings: an example

In [27]:
ring r=(2,a),(x,y),dp;
minpoly=a2+a+1;
basering;

Out[27]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : (a2+a+1)
//   number of vars : 2
//        block   1 : ordering dp
//                  : names    x y
//        block   2 : ordering C


computations in the base (finite) field

In [28]:
a*a;

Out[28]:
(a+1)


characteristic of the basering

In [29]:
char(basering);

Out[29]:
2


number of variables of the basering

In [30]:
nvars(basering);

Out[30]:
2


Important remark: only one ring can be active at a time

clone a ring

In [31]:
def R=basering;


change the active ring (basering)

In [32]:
setring R;


Objects inside a ring:

• numbers
• polynomials
• ideals
• matrices
• modules
• etc.
In [33]:
number b=a2+1;
b;

Out[33]:
(a)

In [34]:
poly f=y-x2;
f;

Out[34]:
x2+y


objects inside a rings are local variables: only accessible when the ring is active

In [35]:
listvar();

Out[35]:
// R                              [0]  *ring
//      f                              [0]  poly
//      b                              [0]  number
// r                              [0]  ring(*)
// LL                             [0]  list, size: 3
// L                              [0]  list, size: 5
// A                              [0]  intmat 2 x 3
// w                              [0]  intvec (5)
// v                              [0]  intvec (4)
// k                              [0]  int 54


Other objects are global:

• int
• intvec
• string
• etc.

Lists are local or global depending on their content

In [36]:
setring r;


objects of R are cloned in r because of the "def" statement

In [37]:
listvar();

Out[37]:
// R                              [0]  ring(*)
// r                              [0]  *ring
//      f                              [0]  poly
//      b                              [0]  number
// LL                             [0]  list, size: 3
// L                              [0]  list, size: 5
// A                              [0]  intmat 2 x 3
// w                              [0]  intvec (5)
// v                              [0]  intvec (4)
// k                              [0]  int 54


another ring: check what is global now

In [38]:
ring s = 2,(x,y),lp;
listvar();

Out[38]:
// s                              [0]  *ring
// R                              [0]  ring
// r                              [0]  ring
// LL                             [0]  list, size: 3
// L                              [0]  list, size: 5
// A                              [0]  intmat 2 x 3
// w                              [0]  intvec (5)
// v                              [0]  intvec (4)
// k                              [0]  int 54


f is not defined now in ring s

In [39]:
defined(f);

Out[39]:
0


this is to obtain reduced standard bases

In [40]:
option(redSB);


compute a standard basis

In [41]:
ideal I=x2,y3+x;
std(I);

Out[41]:
_[1]=y6
_[2]=x+y3


the same again, but assign the result to I

In [42]:
I = std(I);
I;

Out[42]:
I[1]=y6
I[2]=x+y3


number of generators of I

In [43]:
ncols(I);

Out[43]:
2


number of non-zero generators of I

In [44]:
size(I);

Out[44]:
2


import a library

In [45]:
LIB "general.lib";


with "general.lib" we can remove all the existing variables

In [46]:
killall();

Out[46]:
// ** killing the basering for level 0


check that everything is removed

In [47]:
listvar();


obtain help with: help lib/proc;

Remark: you should correctly configure you help browser with: system("--browser", );

Check the online Manual for further types and procedures

### Finite Fields and extensions¶

factorize a cyclotomic polynomial over $F_3$

In [48]:
ring r=3,(x,y),dp;
poly f=x27-x;
factorize(f);

Out[48]:
[1]:
_[1]=1
_[2]=x+1
_[3]=x-1
_[4]=x
_[5]=x3-x+1
_[6]=x3+x2-x+1
_[7]=x3-x-1
_[8]=x3+x2-1
_[9]=x3-x2-x-1
_[10]=x3-x2+x+1
_[11]=x3-x2+1
_[12]=x3+x2+x-1
[2]:
1,1,1,1,1,1,1,1,1,1,1,1


extend the base field to $F_{27}$

In [49]:
ring rr=(3,a),(x,y),dp;
minpoly=a3-a+1;
basering;

Out[49]:
//   characteristic : 3
//   1 parameter    : a
//   minpoly        : (a3-a+1)
//   number of vars : 2
//        block   1 : ordering dp
//                  : names    x y
//        block   2 : ordering C


import f from r with the canonical embedding

In [50]:
poly f=imap(r,f);
f;

Out[50]:
x27-x


factorize now over the extension field

In [51]:
factorize(f,1);

Out[51]:
_[1]=x+(-a)
_[2]=x+(a2+a)
_[3]=x+(a2)
_[4]=x+(a2+a-1)
_[5]=x+(a+1)
_[6]=x+(a2+1)
_[7]=x+(-a2-a-1)
_[8]=x+(-a2+a+1)
_[9]=x+(-a2-1)
_[10]=x+(-a2+1)
_[11]=x+(-a-1)
_[12]=x+(-a2-a)
_[13]=x+(a2-a+1)
_[14]=x+(-a2+a-1)
_[15]=x+(a2-a)
_[16]=x+(-a2+a)
_[17]=x+(a2+a+1)
_[18]=x+(-a2-a+1)
_[19]=x+(a2-1)
_[20]=x+1
_[21]=x-1
_[22]=x+(-a+1)
_[23]=x+(a-1)
_[24]=x+(-a2)
_[25]=x+(a2-a-1)
_[26]=x+(a)
_[27]=x


the Euclidean algorithm for (univariate) polynomials

In [52]:
gcd(f,x4-x);

Out[52]:
x2-x


the extended Euclidean algorithm

In [53]:
extgcd(f,x4-x);

Out[53]:
[1]:
x2-x
[2]:
-x
[3]:
x24+x21+x18+x15+x12+x9+x6+x3+1


further computations over finite fields

In [54]:
ideal I=x2+y2,x2-y2;
I;

Out[54]:
I[1]=x2+y2
I[2]=x2-y2


compute a standard basis (w.r.t. the graded lexico-graphical ordering dp)

In [55]:
ideal J=std(I);
J;

Out[55]:
J[1]=y2
J[2]=x2


for the next computations we need J to be a standard basis

the Krull dimension

In [56]:
dim(J);

Out[56]:
0


the dimension of R/J as a vector space (R is the basering)

In [57]:
vdim(J);

Out[57]:
4


a vector basis of R/J

In [58]:
kbase(J);

Out[58]:
_[1]=xy
_[2]=y
_[3]=x
_[4]=1


the Samuel multiplicity

In [59]:
mult(J);

Out[59]:
4


the Hilbert series

In [60]:
hilb(J);

Out[60]:
//         1 t^0
//        -2 t^2
//         1 t^4

//         1 t^0
//         2 t^1
//         1 t^2
// dimension (affine) = 0
// degree (affine)  = 4


the syzygies

In [61]:
syz(J);

Out[61]:
_[1]=x2*gen(1)-y2*gen(2)


primary decomposition of prime ideals: the primary ideals with their associated primes

In [62]:
LIB "primdec.lib";

Out[62]:
// ** redefining sat1 **
// ** redefining sat2 **
// ** redefining minSat **
// ** redefining minSat **
// ** redefining quotMin **
// ** redefining testFactor **
// ** redefining factor **
// ** redefining idealsEqual **
// ** redefining idealsEqual **
// ** redefining specialIdealsEqual **
// ** redefining stdIdealsEqual **
// ** redefining primaryTest **
// ** redefining primaryTest **
// ** redefining gcdTest **
// ** redefining gcdTest **
// ** redefining splitPrimary **
// ** redefining splitCharp **
// ** redefining zero_decomp **
// ** redefining zero_decomp **
// ** redefining extF **
// ** redefining extF **
// ** redefining zeroSp **
// ** redefining zeroSp **
// ** redefining zeroSepClos **
// ** redefining zeroSepClos **
// ** redefining insepDecomp_i **
// ** redefining insepDecomp_i **
// ** redefining clearSB **
// ** redefining clearSBNeu **
// ** redefining teilt **
// ** redefining independSet **
// ** redefining maxIndependSet **
// ** redefining prepareQuotientring **
// ** redefining cleanPrimary **
// ** redefining minAssPrimesoldE **
// ** redefining minAssPrimesoldE **
// ** redefining minAssPrimesold **
// ** redefining minAssPrimesold **
// ** redefining minAssPrimesold_i **
// ** redefining primT **
// ** redefining minAssPrimesE **
// ** redefining minAssPrimes **
// ** redefining minAssPrimes_i **
// ** redefining union **
// ** redefining equidim **
// ** redefining equidim **
// ** redefining equidimMax **
// ** redefining equidimMax **
// ** redefining islp **
// ** redefining algeDecoE **
// ** redefining algeDecoE **
// ** redefining algeDeco **
// ** redefining algeDeco **
// ** redefining algeDeco_i **
// ** redefining prepare_absprimdec **
// ** redefining decompE **
// ** redefining decomp **
// ** redefining decomp_i **
// ** redefining powerCoeffs **
// ** redefining sep **
// ** redefining sep **
// ** redefining Ann **
// ** redefining Ann **
// ** redefining int_ass_primary_e **
// ** redefining AnnExt_R **
// ** redefining analyze **
// ** redefining simplifyIdeal **
// ** redefining ini_mod **
// ** redefining min_ass_prim_charsets_i **
// ** redefining min_ass_prim_charsets0_i **
// ** redefining min_ass_prim_charsets1_i **
// ** redefining prim_dec_i **
// ** redefining pseudo_prim_dec_charsets_i **
// ** redefining pseudo_prim_dec_special_charsets_i **
// ** redefining pseudo_prim_dec_i_i **
// ** redefining extraction **
// ** redefining minsat **
// ** redefining minsat_ppd **
// ** redefining minquot **
// ** redefining special_ideals_equal **
// ** redefining convList **
// ** redefining reconvList **
// ** redefining primdecGTZE **
// ** redefining primdecGTZE **
// ** redefining primdecGTZ **
// ** redefining primdecGTZ **
// ** redefining primdecGTZ_i **
// ** redefining absPrimdecGTZE **
// ** redefining absPrimdecGTZE **
// ** redefining absPrimdecGTZ **
// ** redefining absPrimdecGTZ **
// ** redefining absPrimdecGTZ_i **
// ** redefining primdecSYE **
// ** redefining primdecSYE **
// ** redefining primdecSY **
// ** redefining primdecSY **
// ** redefining primdecSY_i **
// ** redefining minAssGTZE **
// ** redefining minAssGTZE **
// ** redefining minAssGTZ **
// ** redefining minAssGTZ **
// ** redefining minAssGTZ_i **
// ** redefining minAssCharE **
// ** redefining minAssCharE **
// ** redefining minAssChar **
// ** redefining minAssChar **
// ** redefining minAssChar_i **
// ** redefining minAssChar_i **
// ** redefining newMaxIndependSetDp **
// ** redefining newMaxIndependSetDp **
// ** redefining prepareAss **
// ** redefining prepareAss **
// ** redefining equidimMaxEHV **
// ** redefining equidimMaxEHV **
// ** redefining testPrimaryE **
// ** redefining testPrimaryE **
// ** redefining testPrimary **
// ** redefining testPrimary **
// ** redefining testPrimary_i **
// ** redefining zerodec **
// ** redefining zerodec **
// ** redefining newDecompStepE **
// ** redefining newDecompStep **
// ** redefining newDecompStep_i **
// ** redefining newReduction **
// ** redefining minAssE **
// ** redefining minAssE **
// ** redefining minAss **
// ** redefining minAss **
// ** redefining minAss_i **
// ** redefining minAssSL **
// ** redefining minAssSLIteration **
// ** redefining newMaxIndependSetLp **
// ** redefining newMaxIndependSetLp **
// ** redefining newZero_decomp **
// ** redefining newZero_decomp **


the radical of the ideal J

In [63]:
radical(J);

Out[63]:
_[1]=y
_[2]=x


fetch J into the ring r

In [64]:
setring r;
ideal J=imap(rr,I);
J=std(J);
J;

Out[64]:
J[1]=y2
J[2]=x2


algorithm of Gianni-Trager-Zacharias

In [65]:
primdecGTZ(J);

Out[65]:
[1]:
[1]:
_[1]=y2
_[2]=x2
[2]:
_[1]=x
_[2]=y


algorithm of Shimoyama-Yokoyama

In [66]:
primdecSY(J);

Out[66]:
[1]:
[1]:
_[1]=y2
_[2]=x2
[2]:
_[1]=y
_[2]=x


a harder example in characteristic zero

In [67]:
ring r0 = 0,(x,y,z),lp;
poly p = z2+1;
poly q = z3+2;
ideal i = p*q^2,y-z2;
list pr = primdecGTZ(i);
pr;

Out[67]:
[1]:
[1]:
_[1]=z6+4z3+4
_[2]=y-z2
[2]:
_[1]=z3+2
_[2]=y-z2
[2]:
[1]:
_[1]=z2+1
_[2]=y-z2
[2]:
_[1]=z2+1
_[2]=y-z2


a hard computation of standard basis over $F_2$

In [68]:
ring s=2,(x,y,z,t),lp;
ideal I=x8+y7+z6,y5+z4+t3,x7+z6+t5,x4+y3+t2;


time control ...

In [69]:
timer=1;
print("timer="+string(timer));
ideal J=std(I);
print("timer="+string(timer));

Out[69]:
timer=1


the result ...

In [70]:
J;

Out[70]:
J[1]=t119+t115+t113+t112+t110+t104+t101+t100+t99+t98+t96+t93+t91+t89+t88+t87+t86+t84+t82+t77+t76+t73+t70+t69+t67+t65+t63+t61+t60+t58+t57+t56+t55+t54+t53+t51+t50+t48+t46+t45+t43+t42+t41+t40+t37+t35+t33+t32+t23+t21+t17+t16+t14+t11+t10+t9+t8
J[2]=z2t7+t117+t106+t105+t103+t102+t101+t99+t96+t94+t93+t92+t91+t89+t88+t83+t80+t79+t74+t72+t69+t67+t66+t62+t61+t60+t58+t57+t55+t54+t53+t52+t50+t49+t47+t42+t40+t38+t34+t32+t31+t30+t29+t28+t27+t24+t23+t22+t18+t17+t16+t14+t13+t9+t8
J[3]=z4t5+z2t6+t117+t116+t114+t111+t110+t109+t108+t107+t104+t100+t98+t96+t92+t91+t89+t88+t87+t86+t85+t84+t83+t82+t80+t79+t78+t77+t71+t69+t67+t64+t63+t62+t60+t55+t53+t50+t46+t44+t40+t39+t38+t34+t33+t32+t31+t30+t27+t25+t24+t23+t22+t20+t19+t18+t16+t15+t14+t13+t12+t10
J[4]=z6t3+t118+t114+t111+t110+t108+t107+t102+t101+t95+t94+t93+t90+t89+t88+t87+t85+t84+t82+t81+t78+t75+t74+t71+t70+t69+t68+t67+t66+t62+t61+t60+t58+t54+t53+t51+t50+t49+t44+t42+t39+t36+t34+t33+t32+t31+t30+t27+t26+t25+t24+t23+t22+t21+t20+t18+t13+t12+t11+t10+t9+t8
J[5]=z8t2+t117+t116+t114+t111+t108+t105+t103+t101+t100+t99+t96+t93+t90+t88+t85+t81+t76+t75+t74+t72+t70+t69+t64+t62+t59+t57+t55+t54+t53+t52+t51+t50+t47+t46+t45+t44+t43+t41+t40+t37+t36+t34+t33+t32+t30+t29+t28+t27+t19+t18+t17+t15+t13+t12+t11
J[6]=z10t+t116+t115+t114+t113+t110+t108+t107+t106+t103+t102+t99+t96+t95+t92+t91+t90+t89+t82+t79+t76+t73+t72+t70+t69+t68+t67+t64+t57+t56+t52+t51+t49+t43+t42+t41+t39+t38+t35+t33+t28+t27+t24+t23+t22+t21+t20+t19+t17+t15+t14+t12+t10+t8
J[7]=z12+t118+t117+t116+t115+t114+t113+t112+t111+t107+t105+t103+t102+t101+t100+t99+t98+t95+t94+t92+t90+t89+t86+t85+t84+t81+t75+t71+t70+t69+t67+t64+t63+t57+t55+t53+t50+t47+t44+t43+t41+t39+t38+t37+t34+t33+t32+t28+t27+t26+t24+t21+t20+t16+t15+t13+t10+t8
J[8]=yt7+t116+t112+t107+t106+t105+t104+t102+t101+t100+t99+t97+t95+t91+t90+t88+t85+t82+t79+t78+t77+t75+t73+t71+t70+t69+t68+t66+t65+t63+t58+t57+t56+t54+t47+t45+t42+t41+t36+t35+t34+t33+t32+t30+t29+t22+t20+t19+t17+t16+t14+t13+t12+t10+t9+t8
J[9]=yz2t6+t117+t113+t111+t110+t108+t106+t105+t102+t101+t96+t95+t94+t92+t91+t90+t88+t87+t86+t85+t84+t80+t77+t75+t74+t72+t70+t67+t65+t63+t62+t59+t58+t56+t55+t53+t47+t46+t45+t42+t41+t39+t34+t33+t30+t29+t28+t24+t23+t20+t18+t16+t15+t12+t11+t10
J[10]=yz4t3+yt6+t106+t105+t101+t100+t97+t95+t93+t90+t89+t88+t84+t83+t81+t80+t79+t78+t77+t76+t74+t73+t71+t69+t65+t64+t63+t61+t60+t58+t56+t54+t53+t52+t51+t50+t47+t38+t35+t33+t32+t31+t23+t19+t18+t15+t14+t13+t12+t9+t8+t7
J[11]=yz6t+yz2t5+yz2t4+z8t+z2t5+t118+t117+t115+t114+t112+t110+t108+t105+t104+t103+t102+t101+t100+t99+t96+t95+t94+t93+t92+t91+t88+t83+t80+t78+t77+t74+t73+t72+t70+t69+t64+t62+t61+t56+t53+t49+t46+t45+t44+t43+t42+t41+t39+t38+t35+t34+t30+t28+t25+t24+t23+t22+t21+t20+t13+t12+t11+t10+t9+t8+t7
J[12]=yz8+yt6+z10+z4t4+t117+t116+t115+t114+t113+t108+t107+t104+t103+t100+t99+t97+t95+t94+t93+t92+t91+t88+t87+t85+t84+t82+t81+t78+t77+t76+t75+t74+t69+t68+t67+t63+t60+t53+t52+t51+t49+t45+t44+t43+t41+t39+t38+t36+t35+t34+t32+t30+t29+t28+t26+t25+t22+t21+t17+t16+t15+t14+t12+t11+t8+t7
J[13]=y2t6+yz4t2+yz2t5+yt6+yt5+z10+z6t2+z2t6+t115+t114+t111+t110+t109+t108+t107+t106+t103+t98+t97+t93+t92+t88+t86+t80+t79+t78+t76+t73+t70+t69+t67+t62+t60+t59+t58+t54+t53+t52+t50+t49+t47+t46+t43+t40+t38+t35+t34+t33+t32+t29+t26+t24+t23+t22+t21+t19+t16+t14+t13+t12+t9+t8+t6
J[14]=y2z2t4+yz6+yz2t5+yz2t4+yz2t3+yt6+z8t+z8+z4t4+z2t4+t117+t116+t115+t114+t112+t111+t109+t108+t101+t98+t93+t92+t90+t89+t87+t86+t85+t82+t81+t80+t78+t76+t75+t74+t70+t68+t67+t66+t65+t63+t58+t55+t54+t53+t52+t51+t49+t46+t45+t44+t43+t39+t35+t34+t30+t29+t28+t27+t21+t20+t19+t14+t11+t10+t9
J[15]=y2z4+y2t3+yz4+yt3+z6+t4
J[16]=y3t5+y2t5+yz6+yz4t2+yz4t+yz2t5+yz2t3+yt4+z8+z6t2+z6t+z4t4+z2t5+z2t4+t117+t114+t112+t109+t108+t101+t98+t93+t91+t90+t85+t83+t74+t71+t70+t69+t67+t66+t62+t60+t59+t58+t57+t55+t51+t49+t46+t45+t44+t41+t40+t38+t36+t34+t33+t32+t31+t30+t29+t27+t26+t19+t16+t13+t12+t11+t10+t8+t6+t5
J[17]=y3z2t3+y3t4+y2z2t3+y2t4+yz6+yz4+yz2t4+yt6+yt4+yt3+z10+z8+z6+z4t4+t117+t116+t115+t114+t113+t108+t107+t104+t103+t100+t99+t97+t95+t94+t93+t92+t91+t88+t87+t85+t84+t82+t81+t78+t77+t76+t75+t74+t69+t68+t67+t63+t60+t53+t52+t51+t49+t45+t44+t43+t41+t39+t38+t36+t35+t34+t32+t30+t29+t28+t26+t25+t22+t21+t17+t16+t15+t14+t12+t11+t8+t7+t6+t4
J[18]=y4t4+y2t5+yz4t+yz2t5+yz2t4+yt6+yt5+yt4+z10+z8t+z8+z6t2+z6t+z2t5+t118+t116+t115+t113+t110+t108+t107+t106+t105+t103+t102+t101+t99+t98+t96+t95+t94+t92+t91+t90+t89+t88+t87+t83+t82+t80+t79+t78+t76+t74+t71+t69+t67+t66+t63+t61+t57+t55+t52+t48+t47+t45+t44+t43+t38+t35+t34+t31+t29+t28+t27+t23+t22+t19+t18+t17+t16+t15+t12+t9+t8+t6+t5
J[19]=y5+z4+t3
J[20]=xt7+z10+t116+t112+t110+t109+t108+t107+t106+t104+t103+t101+t100+t99+t92+t91+t90+t89+t88+t86+t85+t83+t81+t80+t79+t77+t76+t75+t73+t72+t68+t67+t66+t65+t64+t62+t61+t60+t59+t58+t56+t53+t49+t48+t46+t39+t38+t37+t36+t35+t32+t28+t26+t25+t22+t21+t18+t15+t13+t12+t10+t8+t7
J[21]=xz2t6+t116+t112+t111+t109+t108+t106+t103+t98+t96+t94+t92+t91+t90+t88+t84+t82+t79+t75+t74+t67+t62+t59+t55+t52+t46+t45+t44+t42+t39+t37+t35+t31+t30+t29+t27+t23+t22+t20+t17+t15+t14+t12+t10+t8+t7
J[22]=xz6+xt5+yz4+yt3+t4
J[23]=xyt6+xz4t4+yz6+yz4t2+yz2t4+yz2t3+yt6+yt5+z8+z6t2+z2t4+t118+t117+t116+t114+t111+t109+t107+t105+t102+t100+t98+t97+t95+t93+t92+t90+t87+t84+t83+t82+t80+t79+t75+t74+t72+t71+t69+t68+t65+t64+t63+t61+t57+t56+t54+t53+t52+t50+t46+t43+t39+t37+t36+t33+t32+t31+t30+t29+t28+t26+t15+t13+t10+t8+t7+t6
J[24]=xyz2t3+xyt5+xz4t4+xz2t4+y2t5+yz6+yz4t2+yz4+yz2t4+yz2t3+yt6+yt5+yt4+yt3+z6t2+z6+z2t5+z2t4+t118+t117+t116+t113+t111+t110+t109+t107+t104+t103+t101+t100+t95+t94+t91+t88+t84+t82+t81+t80+t78+t75+t74+t73+t72+t70+t68+t67+t66+t62+t59+t55+t53+t49+t45+t41+t40+t38+t35+t34+t32+t31+t29+t26+t24+t23+t22+t20+t19+t18+t15+t13+t9+t8+t7+t6+t4
J[25]=xyz4t2+xyt5+xz4t4+xt6+yz6+yz4t2+yz2t5+yz2t4+yz2t3+yt5+z8t+z8+z2t4+t118+t115+t111+t108+t106+t103+t102+t100+t99+t98+t97+t95+t93+t92+t90+t88+t87+t84+t81+t80+t78+t76+t74+t72+t71+t70+t68+t66+t62+t59+t58+t55+t53+t51+t49+t45+t43+t42+t40+t39+t36+t35+t34+t31+t29+t28+t27+t26+t22+t20+t17+t16+t15+t13+t12+t11+t10+t8+t6
J[26]=xy2t5+xyz4t+xyt5+xyt4+xz4t4+xt6+xt5+y2t5+yz4t2+yz4t+yz2t4+yt6+yt5+yt4+z6t2+z2t5+t118+t116+t115+t113+t111+t110+t103+t101+t100+t98+t97+t96+t95+t94+t89+t88+t87+t86+t85+t84+t83+t81+t78+t75+t74+t73+t72+t70+t67+t66+t64+t63+t62+t61+t60+t55+t54+t51+t49+t48+t46+t43+t39+t37+t36+t35+t34+t32+t29+t26+t22+t20+t19+t18+t16+t15+t12+t10+t9+t7+t6+t5
J[27]=xy3t4+xy2t4+xyz4t+xyz4+xyt3+xz4t4+xz2t5+xt4+y3t4+y2z2t3+y2t5+yz6+yz4t+yz2t5+yz2t3+z10+z8t+z6+z2t5+z2t4+t118+t116+t115+t114+t107+t106+t104+t103+t99+t96+t95+t93+t89+t88+t85+t83+t82+t81+t80+t79+t76+t73+t72+t66+t64+t63+t62+t61+t56+t51+t49+t48+t46+t45+t43+t40+t39+t36+t35+t34+t33+t32+t30+t29+t22+t21+t20+t19+t18+t16+t14+t11+t10+t8+t7+t5
J[28]=x2z2t5+x2t6+xz4t4+xz2t5+xt6+y3t4+y2z2t3+y2t4+yz4t2+yz4t+yz4+yz2t3+yt6+yt3+z8+z6t2+z6t+z6+z2t4+t118+t116+t114+t112+t111+t110+t109+t108+t106+t103+t102+t101+t98+t94+t93+t90+t88+t86+t83+t82+t81+t77+t76+t75+t73+t69+t68+t65+t64+t63+t62+t60+t57+t55+t54+t51+t49+t43+t42+t40+t39+t35+t34+t32+t31+t29+t28+t27+t24+t21+t19+t18+t17+t15+t13+t11+t10+t9+t8+t7+t6+t5+t4
J[29]=x2z4t4+xz4t4+y2t5+yz4t2+yz4t+yz2t5+yz2t4+yt4+z10+z8t+z6t+z2t5+t118+t117+t115+t112+t109+t108+t105+t104+t102+t101+t99+t98+t95+t93+t92+t87+t86+t85+t84+t83+t82+t81+t80+t77+t76+t75+t72+t71+t69+t68+t67+t60+t52+t48+t45+t41+t40+t39+t37+t36+t35+t32+t29+t28+t26+t22+t20+t18+t14+t13+t12+t9+t8+t7+t6+t5
J[30]=x2yz4t+x2yt5+x2yt4+x2t6+x2t5+xyt5+xt6+y2t5+yz4t+yz2t5+yt6+yt4+z10+z8t+z8+z6t2+z2t6+z2t5+t118+t116+t110+t109+t105+t103+t102+t99+t98+t97+t96+t95+t94+t89+t88+t87+t86+t81+t76+t73+t71+t70+t69+t68+t60+t58+t56+t54+t52+t50+t48+t47+t46+t43+t42+t38+t37+t36+t33+t32+t28+t27+t24+t23+t22+t20+t19+t18+t17+t15+t14+t12+t10+t5
J[31]=x2y2t4+x2yz4+x2yt5+x2yt4+x2yt3+x2t5+x2t4+xyt4+xt5+yz4+yt3+z10+t118+t113+t111+t109+t108+t106+t99+t98+t96+t94+t93+t91+t90+t88+t87+t86+t85+t84+t83+t77+t75+t74+t69+t68+t65+t64+t62+t61+t60+t57+t56+t55+t51+t50+t49+t46+t43+t42+t41+t38+t36+t34+t31+t30+t28+t23+t22+t19+t18+t17+t15+t12+t9+t4
J[32]=x3t6+xyz4t+xyt5+xyt4+xt6+xt5+y2t5+yz4t+yz2t5+yt6+yt4+z8t+z8+z6t2+z2t5+t118+t116+t114+t113+t112+t111+t110+t108+t107+t106+t105+t104+t100+t97+t96+t95+t94+t92+t91+t90+t89+t88+t86+t85+t84+t83+t80+t79+t77+t74+t70+t68+t67+t65+t61+t57+t55+t54+t53+t51+t50+t49+t48+t47+t46+t45+t43+t42+t34+t33+t27+t24+t22+t20+t18+t14+t12+t10+t7+t5
J[33]=x3z2t4+x2yt5+x2t6+xyz4t+xyt4+xt5+z10+t117+t107+t105+t97+t96+t95+t93+t92+t90+t88+t86+t85+t83+t82+t81+t78+t76+t75+t74+t73+t72+t71+t70+t68+t67+t64+t63+t62+t57+t56+t55+t54+t53+t50+t44+t43+t42+t37+t35+t33+t32+t31+t30+t22+t20+t19+t18+t17+t16+t14+t13+t9+t7
J[34]=x3z4t2+x3t5+x2yz4+x2yt5+x2yt4+x2yt3+x2t6+x2t5+x2t4+xyz4t+xyz4+xyt4+xyt3+xt5+xt4+y2t5+yz4t2+yz4t+yz2t4+yt4+z10+z8t+z6t+z4t4+z2t6+z2t5+t118+t117+t115+t114+t113+t110+t108+t107+t106+t103+t102+t100+t99+t98+t95+t94+t93+t88+t87+t82+t80+t77+t76+t73+t67+t66+t65+t64+t62+t61+t60+t59+t58+t57+t56+t55+t52+t50+t49+t47+t45+t41+t40+t39+t38+t37+t36+t35+t33+t32+t31+t27+t18+t16+t13+t12+t11+t10+t8+t7+t6+t5
J[35]=x3yt4+x3t5+x2yz4+x2yt3+x2t4+y3t4+y2z2t3+y2t4+yz6+yz4t2+yz4+yz2t5+yz2t4+yt6+yt5+yt4+yt3+z10+z8+z6t2+z6+z2t6+t118+t117+t116+t115+t112+t108+t106+t104+t102+t100+t98+t91+t90+t89+t88+t87+t86+t85+t83+t80+t79+t78+t74+t73+t67+t66+t65+t63+t62+t54+t50+t47+t45+t43+t42+t41+t40+t39+t38+t36+t34+t32+t26+t25+t24+t21+t20+t19+t18+t16+t15+t13+t12+t10+t9+t8+t7+t4
J[36]=x3yz4+x3yt3+x3t4+y3t4+y2z2t3+y2t5+y2t4+yz6+yz4t2+yz4t+yz4+yz2t5+yt3+z8+z6t+z6+z4t4+z2t5+t117+t114+t112+t109+t108+t101+t98+t93+t91+t90+t85+t83+t74+t71+t70+t69+t67+t66+t62+t60+t59+t58+t57+t55+t51+t49+t46+t45+t44+t41+t40+t38+t36+t34+t33+t32+t31+t30+t29+t27+t26+t19+t16+t13+t12+t11+t10+t8+t7+t5+t4
J[37]=x3y2t2+x3z4+x3t3+y2z2t3+y2t5+yz6+yz2t3+z8+z2t4
J[38]=x3y3+x3t2+z6+t5
J[39]=x4+y3+t2


Triangulation algorithms for zero-dimensional ideals (Lazard)

• They are used to solve systems of algebraic equations with finitely many solutions
• Input: std with respect to lp
• Output: list of triangular systems
In [71]:
LIB "triang.lib";

Out[71]:
// ** redefining triangL **
// ** redefining triangL **
// ** redefining triangLfak **
// ** redefining triangLfak **
// ** redefining triangLbas **
// ** redefining invertieren **
// ** redefining invertieren_oT **
// ** redefining Erw_ggt_oT **
// ** redefining normieren_oT **
// ** redefining triangM **
// ** redefining triangM **
// ** redefining triangMH **
// ** redefining triangMH **
// ** redefining sort_red **
// ** redefining Listenrest **
// ** redefining Idealrest **
// ** redefining H_anhaengen **
// ** redefining faktorisiere_letzten **
// ** redefining faktorisiere_DB **
// ** redefining degv **
// ** redefining pdiv **
// ** redefining lvar **
// ** redefining lcoef **

In [72]:
triangL(J);

Out[72]:
[1]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[2]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[3]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[4]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[5]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[6]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[7]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[8]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[9]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[10]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[11]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[12]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[13]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[14]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[15]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[16]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[17]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[18]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[19]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
[20]:
_[1]=t
_[2]=z4
_[3]=y2
_[4]=x4
[21]:
_[1]=t
_[2]=z4
_[3]=y3
_[4]=x4
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t80+t79+t78+t76+t74+t69+t68+t65+t62+t61+t59+t57+t55+t53+t52+t50+t49+t48+t47+t46+t45+t43+t42+t40+t38+t37+t35+t34+t33+t32+t29+t27+t25+t24+t15+t13+t9+t8+t6+t3+t2+t+1
_[2]=z2+t110+t99+t98+t96+t95+t94+t92+t89+t87+t86+t85+t84+t82+t81+t76+t73+t72+t67+t65+t62+t60+t59+t55+t54+t53+t51+t50+t48+t47+t46+t45+t43+t42+t40+t35+t33+t31+t27+t25+t24+t23+t22+t21+t20+t17+t16+t15+t11+t10+t9+t7+t6+t2+t
_[3]=y+t109+t105+t100+t99+t98+t97+t95+t94+t93+t92+t90+t88+t84+t83+t81+t78+t75+t72+t71+t70+t68+t66+t64+t63+t62+t61+t59+t58+t56+t51+t50+t49+t47+t40+t38+t35+t34+t29+t28+t27+t26+t25+t23+t22+t15+t13+t12+t10+t9+t7+t6+t5+t3+t2+t
_[4]=x+t109+t108+t107+t106+t103+t101+t98+t97+t96+t95+t93+t92+t91+t88+t87+t85+t79+t78+t76+t73+t72+t71+t70+t69+t66+t64+t62+t58+t57+t56+t55+t54+t53+t52+t51+t48+t46+t44+t43+t42+t39+t35+t34+t33+t32+t29+t28+t27+t21+t20+t18+t16+t13+t12+t9+t8+t7+t5+t4+t3+t2+t


### Hamburger-Noether expansions¶

In [73]:
killall();

Out[73]:
// ** killing the basering for level 0

In [74]:
LIB "hnoether.lib";


local ring for computations (local ordering)

In [75]:
ring r = 2,(x,y),ds;


local equation at the origin

In [76]:
poly f = x10+x3y7+y9+y2;


list of the HN expansions of all the branches at the origin

In [77]:
list H=hnexpansion(f);
H;

Out[77]:
[1]:
[1]:
_[1,1]=0
_[1,2]=0
_[1,3]=0
_[1,4]=0
_[1,5]=1
_[1,6]=0
_[1,7]=0
_[1,8]=0
_[1,9]=0
_[1,10]=0
_[1,11]=0
_[1,12]=0
_[1,13]=0
_[1,14]=0
_[1,15]=0
_[1,16]=0
_[1,17]=0
_[1,18]=0
_[1,19]=1
_[1,20]=0
_[1,21]=0
_[1,22]=0
_[1,23]=x
_[2,1]=0
_[2,2]=1
_[2,3]=0
_[2,4]=0
_[2,5]=0
_[2,6]=0
_[2,7]=0
_[2,8]=0
_[2,9]=0
_[2,10]=0
_[2,11]=0
_[2,12]=0
_[2,13]=0
_[2,14]=0
_[2,15]=0
_[2,16]=1
_[2,17]=0
_[2,18]=0
_[2,19]=0
_[2,20]=0
_[2,21]=0
_[2,22]=0
_[2,23]=0
[2]:
22,-17
[3]:
0
[4]:
y+y8+xy11+x3y10+x5y9+x7y8+y15+x16+x2y14+x4y13+x6y12+x8y11+xy18+x17y3+x10y10+x19y2+x12y9+x5y16+x21y+x14y8+y22+x23+x16y7+x18y6+x4y20+x20y5+x22y4+x8y18+x24y3+x26y2+x12y16+x28y+x30+x2y28+x10y24+x33y2+y36+x37+x32y6+x18y20+x36y4+x8y32+xy39+x3y38+x40y2+x26y16+x5y37+x7y36+x44+x9y35+x2y42+x11y34+x34y12+x13y33+x6y40+x15y32+x3y45+x5y44+x42y8+y50+x18y34+x11y41+x4y48+x13y40+x50y4+x22y32+x19y37+x21y36+x58+x27y33+x29y32+y64+x32y34+x4y62+x64y4+x36y32+x8y60+xy67+x3y66+x12y58+x5y65+x7y64+x72+x65y7+x16y56+x67y6+x69y5+x20y54+x71y4+x73y3+x66y10+x24y52+x75y2+x77y+x70y8+x28y50+y78+x79+x67y13+x32y48+x69y12+x64y18+x36y46+x8y74+x82y2+x75y9+x68y16+x40y44+x5y79+x77y8+x7y78+x86+x44y42+x16y70+x9y77+x2y84+x11y76+x83y5+x48y40+x13y75+x85y4+x15y74+x52y38+x24y66+x17y73+x10y80+x19y72+x91y+x56y36+x21y71+y92+x93+x23y70+x60y34+x25y69+x4y90+x27y68+x64y32+x29y67+xy95+x31y66+x3y94+x96y2+x68y30+x33y65+x5y93+x35y64+x7y92+x100+x72y28+x16y84+x9y91+x2y98+x11y90+x76y26+x34y68+x20y82+x13y89+x15y88+x80y24+x17y87+x3y101+x19y86+x5y100+x84y22+x42y64+x21y85+x23y84+x88y20+x32y76+x25y83+x11y97+x4y104+x27y82+x13y96+x92y18+x36y74+x29y81+x31y80+x96y16+x33y79+x5y107+x35y78+x7y106+y113+x100y14+x37y77+x9y105+x2y112+x39y76+x11y104+x104y12+x48y68+x41y75+x20y96+x6y110+x43y74+x108y10+x52y66+x45y73+x10y108+x47y72+x112y8+x49y71+x21y99+x14y106+x7y113+x51y70+x23y98+x9y112+x116y6+x53y69+x25y97+x18y104+x55y68+x27y96+x120y4+x57y67+x22y102+x59y66+x124y2+x61y65+x26y100+x63y64+y127+x30y98+x2y126+x32y97+x4y125+x6y124+x8y123+xy130+x129y3+x66y66+x10y122+x131y2+x12y121+x5y128+x133y+x14y120+x135+x16y119+x67y69+x39y97+x18y118+x69y68+x41y96+x20y117+x22y116+x24y115+x75y65+x68y72+x26y114+x77y64+x28y113+x128y14+x30y112+x32y111+x69y75+x34y110+x71y74+x64y81+x36y109+x8y137+x136y10+x73y73+x66y80+x38y108+x10y136+x75y72+x40y107+x133y15+x84y64+x70y78+x42y106+x135y14+x44y105+x144y6+x137y13+x130y20+x74y76+x46y104+x139y12+x48y103+x141y11+x85y67+x78y74+x71y81+x50y102+x143y10+x87y66+x73y80+x52y101+x24y129+x152y2+x145y9+x138y16+x89y65+x82y72+x54y100+x26y128+x147y8+x91y64+x56y99+x149y7+x128y28+x86y70+x58y98+x151y6+x60y97+x153y5+x132y26+x90y68+x62y96+x155y4+x64y95+x8y151+x157y3+x129y31+x94y66+x66y94+x10y150+x159y2+x131y30+x96y65+x68y93+x12y149+x161y+x133y29+x70y92+x14y148+x163+x135y28+x72y91+x16y147+x9y154+x144y20+x137y27+x130y34+x74y90+x18y146+x139y26+x76y89+x20y145+x13y152+x162y4+x148y18+x141y25+x78y88+x22y144+x143y24+x80y87+x145y23+x131y37+x103y65+x82y86+x147y22+x133y36+x105y64+x84y85+x170+x149y21+x86y84+x151y20+x88y83+x25y146+x160y12+x153y19+x139y33+x132y40+x90y82+x155y18+x141y32+x92y81+x29y144+x164y10+x157y17+x94y80+x159y16+x96y79+x40y135+x161y15+x133y43+x98y78+x42y134+x163y14+x135y42+x128y49+x100y77+x44y133+x165y13+x137y41+x130y48+x102y76+x46y132+x167y12+x139y40+x104y75+x48y131+x41y138+x176y4+x169y11+x148y32+x134y46+x106y74+x50y130+x171y10+x108y73+x52y129+x45y136+x180y2+x173y9+x138y44+x110y72+x54y128+x175y8+x112y71+x177y7+x149y35+x142y42+x135y49+x114y70+x179y6+x151y34+x137y48+x116y69+x181y5+x153y33+x146y40+x118y68+x183y4+x155y32+x120y67+x57y130+x185y3+x150y38+x122y66+x187y2+x124y65+x61y128+x189y+x154y36+x126y64+x191+x128y63+x158y34+x130y62+x160y33+x132y61+x134y60+x136y59+x194y2+x138y58+x140y57+x142y56+x144y55+x195y5+x167y33+x146y54+x197y4+x169y32+x148y53+x150y52+x152y51+x203y+x196y8+x154y50+x205+x156y49+x158y48+x160y47+x197y11+x162y46+x199y10+x192y17+x164y45+x201y9+x194y16+x166y44+x203y8+x168y43+x212+x198y14+x170y42+x172y41+x202y12+x174y40+x176y39+x213y3+x206y10+x199y17+x178y38+x215y2+x201y16+x180y37+x217y+x210y8+x182y36+x219+x184y35+x214y6+x186y34+x188y33+x218y4+x190y32+x192y31+x222y2+x194y30+x224y+x196y29+x198y28+x200y27+x202y26+x204y25+x206y24+x208y23+x231y+x210y22+x233+x212y21+x214y20+x216y19+x218y18+x220y17+x222y16+x224y15+x226y14+x228y13+x230y12+x232y11+x234y10+x236y9+x238y8+x240y7+x242y6+x244y5+x246y4+x248y3+x250y2+x252y+x254+x257y2+x261+x264y9+x266y8+x280y+x282+x264y23+x266y22+x268y21+x270y20+x272y19+x265y26+x274y18+x276y17+x269y24+x278y16+x281y18+x285y16+x296y7+x298y6+x300y5+x302y4+x304y3+x297y10+x306y2+x308y+x301y8+x310+x313y2+x317


display a summary of the HN expansion

In [78]:
displayHNE(H);

Out[78]:
// Hamburger-Noether development of branch nr.1:
y = x^5+x^19+z(1)*x^22
x = z(1)^2+z(1)^16 + ..... (terms of degree >=17)



parameterization of the (unique) branch

In [79]:
param(H[1]);

Out[79]:
// ** Warning: result is exact up to order 16 in x and 24 in y !
_[1]=x2+x16
_[2]=x10+x24+x38+x45+x52+x73+x101+x129+x262+x269+x276+x290+x297+x304+x325+x353


increase the exactness if necessary

In [80]:
param(extdevelop(H[1], 40));

Out[80]:
// ** Warning: result is exact up to order 44 in x and 52 in y !
_[1]=x2+x16+x23+x30+x44
_[2]=x10+x24+x31+x45+x59+x66+x73+x87+x94+x101+x108+x122+x129+x143+x157+x171+x178+x185+x192+x206+x213+x220+x255+x262+x276+x283+x304+x318+x325+x332+x339+x346+x353+x416+x423+x430+x444+x451+x458+x465+x479+x493+x521+x528+x535+x542+x556+x563+x570+x577+x591+x598+x612+x619+x647+x661+x703+x710+x724+x731+x752+x766+x773+x780+x787+x794+x801+x822+x829+x836+x843+x857+x871+x885+x927+x941+x969


an example with several branches

In [81]:
ring R = 0, (x,y), dp;
list Hne=hnexpansion(x4-y6);
displayHNE(Hne);

Out[81]:
// Hamburger-Noether development of branch nr.1:
x = z(1)*y
y = z(1)^2

// Hamburger-Noether development of branch nr.2:
x = z(1)*y
y = -z(1)^2



parameterization of the first branch

In [82]:
param(Hne[1]);

Out[82]:
_[1]=x3
_[2]=x2


parameterization of the second branch

In [83]:
param(Hne[2]);

Out[83]:
_[1]=-x3
_[2]=-x2


an example where a field extension is necessary for the HNE

In [84]:
list L=hnexpansion((x4-y6)*(y2+x4));
show(L);

Out[84]:
// list, 1 element(s):
[1]:
// ring: (0,a),(x,y),(ls(2),C);
// minpoly = (a2+1)
// objects belonging to this ring:
// f                              [0]  poly
// hne                            [0]  list, size: 4


define the local ring where the computations are stored

In [85]:
def HNring = L[1];
setring HNring;
basering;

Out[85]:
//   characteristic : 0
//   1 parameter    : a
//   minpoly        : (a2+1)
//   number of vars : 2
//        block   1 : ordering ls
//                  : names    x y
//        block   2 : ordering C


show the computations

In [86]:
displayHNE(hne);

Out[86]:
// Hamburger-Noether development of branch nr.1:
y = (a)*x^2

// Hamburger-Noether development of branch nr.2:
y = (-a)*x^2

// Hamburger-Noether development of branch nr.3:
x = z(1)*y
y = z(1)^2

// Hamburger-Noether development of branch nr.4:
x = z(1)*y
y = -z(1)^2



### LIBRARY "brnoeth"¶

Brill-Noether algorithm, Weierstrass semigroups, and AG codes

In [87]:
killall();

Out[87]:
// ** killing the basering for level 0

In [88]:
LIB "brnoeth.lib";


The library works with plane algebraic curves, possibly with singularities.

The basefield must be a prime finite field, and point over extensions can be computed if necessary.

The initial equation must be affine, but the library works with the projective closure.

The computed points are "closed", meaning that only one of the conjugates by the Frobenius map is considered, until we extend the curve over a field extension.

Since points can be singular, for the AG codes we consider branches of the desingularized curve, which are computed by means of Hamburger-Noether expansions.

affine global ring to define the curve

In [89]:
ring s=2,(x,y),lp;


Adjunction Divisor: singular points with their delta invariants, after the resolution of all the singularities

In [90]:
list C=Adj_div(y9+y8+xy6+x2y3+y2+x3);
C;

Out[90]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[2]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[2]:
9,3
[3]:
[1]:
1,1
[2]:
1,2
[3]:
2,1
[4]:
1,3
[4]:
2,2,2,42
[5]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
1,1,1
[2]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
2


define the affine ring

In [91]:
def aff_R=C[1][1];


data stored in aff_R

In [92]:
setring aff_R;
listvar(aff_R);

Out[92]:
// aff_R                          [0]  *ring
// Inf_Points                     [0]  list, size: 2
// Aff_SPoints                    [0]  list, size: 3
// Aff_SLocus                     [0]  ideal (SB), 2 generator(s)
// CHI                            [0]  poly


the affine equation of the curve

In [93]:
CHI;

Out[93]:
x3+x2y3+xy6+y9+y8+y2


the ideal of the affine singular locus

In [94]:
Aff_SLocus;

Out[94]:
Aff_SLocus[1]=y8+y2
Aff_SLocus[2]=x2+y6


affine singular points (numbered from 1 to 3)

In [95]:
Aff_SPoints;

Out[95]:
[1]:
[1]:
_[1]=y+1
_[2]=x+1
[2]:
1
[2]:
[1]:
_[1]=y
_[2]=x
[2]:
2
[3]:
[1]:
_[1]=y2+y+1
_[2]=x+1
[2]:
3


singular point(s) at infinity: (1:0:0) with number 4

In [96]:
Inf_Points[1];

Out[96]:
[1]:
[1]:
y
[2]:
4


non-singular points at infinity (none, in this case)

In [97]:
Inf_Points[2];

Out[97]:
empty list


projective ring (it will be necessary later, to define rational functions)

In [98]:
def proj_R=C[1][2];
setring proj_R;
basering;

Out[98]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C


projective equation of the curve

In [99]:
CHI;

Out[99]:
x3z6+x2y3z4+xy6z2+y9+y8z+y2z7


the degree of the curve

In [100]:
C[2][1];

Out[100]:
9


the genus of the curve

In [101]:
C[2][2];

Out[101]:
3


list of computed (closed) places of the curve, represented with two integers:

• the first integer is the degree of the point
• the second integer is the index of the point in the list of points of this degree, which is in the corresponding local ring (in C[5])

In this example, there are 3 points of degree 1 and one of degree 2

In [102]:
C[3];

Out[102]:
[1]:
1,1
[2]:
1,2
[3]:
2,1
[4]:
1,3


In [103]:
C[4];

Out[103]:
2,2,2,42


local rings for points over extensions, where to find local data

In [104]:
C[5];

Out[104]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
1,1,1
[2]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
2


for example, let us see the places (i.e. branches) of degree 2 (over $F_4$)

In [105]:
def S(2)=C[5][2][1];
setring S(2);
listvar();

Out[105]:
// S(2)                           [0]  *ring
//      PARAMETRIZATIONS               [0]  list, size: 1
//      BRANCHES                       [0]  list, size: 1
//      LOC_EQS                        [0]  list, size: 1
//      POINTS                         [0]  list, size: 1
// proj_R                         [0]  ring
// aff_R                          [0]  ring
// C                              [0]  list, size: 5
// s                              [0]  ring


base points of the places: (1:a:1)

In [106]:
POINTS;

Out[106]:
[1]:
[1]:
1
[2]:
(a)
[3]:
1


local equations (the base point is translated to the origin)

In [107]:
LOC_EQS;

Out[107]:
[1]:
y2+y3+(a+1)*y4+y6+(a+1)*y8+y9+(a)*xy2+(a+1)*xy4+xy6+(a+1)*x2y+(a)*x2y2+x2y3+x3


HNEs of the branches

In [108]:
BRANCHES;

Out[108]:
[1]:
[1]:
_[1,1]=0
_[1,2]=x
_[1,3]=0
_[2,1]=0
_[2,2]=1
_[2,3]=(a+1)
[2]:
1,-4
[3]:
0
[4]:
y+(a+1)*xy+(a)*x2y+(a)*x2y2+(a+1)*x3+x3y+x3y3+(a)*x4+(a+1)*x4y2+(a+1)*x4y3+x5+x5y2+(a)*x6+(a+1)*x6y2+x6y4+x6y5+x7y+(a+1)*x8+(a+1)*x8y+x8y4+(a+1)*x8y6+x9+x9y7+(a+1)*x10+x11y6+(a+1)*x12y4+x13y5+x14+x14y+x15y4+x16+(a+1)*x16y2+x17y3+x19y2+(a+1)*x20+x21y+x23


parameterizations of the branches and their exactness

In [109]:
PARAMETRIZATIONS;

Out[109]:
[1]:
[1]:
_[1]=t2+(a+1)*t3
_[2]=t3+(a+1)*t4
[2]:
3,4


non-singular points of given degrees

In [110]:
C = NSplaces(1..4, C);

Out[110]:
Computing non-singular affine places of degree 1 ...
Computing non-singular affine places of degree 2 ...
Computing non-singular affine places of degree 3 ...
Computing non-singular affine places of degree 4 ...


places are updated: note that we have now 2 points of degree 3 and 3 points of degree 4

In [111]:
C[3];

Out[111]:
[1]:
1,1
[2]:
1,2
[3]:
2,1
[4]:
1,3
[5]:
3,1
[6]:
3,2
[7]:
4,1
[8]:
4,2
[9]:
4,3


Brill-Noether algorithm: to compute a vector basis for a Riemann-Roch space L(G)

define a rational divisor G with the first and third places of C

In [112]:
intvec G=4,0,4;


we need to move to the projective ring

In [113]:
setring proj_R;


the Brill-Noether algorithm

In [114]:
list LG=BrillNoether(G,C);

Out[114]:
Forms of degree 10 :
66

Vector basis successfully computed



the vector basis: each rational function is given by a couple numerator / denominator

In [115]:
LG;

Out[115]:
[1]:
_[1]=x2z4+xy3z2
_[2]=y6+z6
[2]:
_[1]=x2z5+xy3z3
_[2]=y7+yz6
[3]:
_[1]=x2z4+xz5
_[2]=y6+z6
[4]:
_[1]=x2z4+y6
_[2]=y6+z6
[5]:
_[1]=x2z5+y6z
_[2]=y7+yz6
[6]:
_[1]=xyz4+y4z2
_[2]=y6+z6
[7]:
_[1]=x2z4+y3z3
_[2]=y6+z6
[8]:
_[1]=x2z5+y3z4
_[2]=y7+yz6
[9]:
_[1]=xyz4+yz5
_[2]=y6+z6
[10]:
_[1]=x2z4+z6
_[2]=y6+z6


computing the Weierstrass semigroup at the infinity point (number 4), up to m=6 (note that the genus is g=3)

In [116]:
list WS=Weierstrass(4,6,C);

Out[116]:
Forms of degree 10 :
66

Vector basis successfully computed



the first list is the numerical semigroup, and the second one are the associated functions

In [117]:
WS;

Out[117]:
[1]:
[1]:
0
[2]:
3
[3]:
4
[4]:
6
[2]:
[1]:
_[1]=1
_[2]=1
[2]:
_[1]=y
_[2]=z
[3]:
_[1]=xyz+yz2
_[2]=xz2+y3
[4]:
_[1]=y2
_[2]=z2


extend the curve to $F_{16}$ (this is intended to use rational points over extensions)

In [118]:
list C4 = extcurve(4, C);
C4;

Out[118]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[2]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[3]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[4]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[5]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
9,3,17
[3]:
[1]:
1,1
[2]:
1,2
[3]:
2,1
[4]:
1,3
[5]:
3,1
[6]:
3,2
[7]:
4,1
[8]:
4,2
[9]:
4,3
[4]:
2,2,2,42
[5]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
1,1,1
[2]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
2
[3]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
3,3
[4]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
4,4,4


go to the ring where the points over $F_{16}$ are

In [119]:
def f16 = C4[1][5];
setring f16;
listvar();

Out[119]:
// f16                            [0]  *ring
//      PARAMETRIZATIONS               [0]  list, size: 17
//      BRANCHES                       [0]  list, size: 17
//      LOC_EQS                        [0]  list, size: 17
//      POINTS                         [0]  list, size: 17
// C4                             [0]  list, size: 5
// G                              [0]  intvec (3)
// S(2)                           [0]  ring
// proj_R                         [0]  ring
// aff_R                          [0]  ring
// C                              [0]  list, size: 5
// s                              [0]  ring


the rational points over $F_{16}$

In [120]:
POINTS;

Out[120]:
[1]:
[1]:
1
[2]:
1
[3]:
1
[2]:
[1]:
0
[2]:
0
[3]:
1
[3]:
[1]:
1
[2]:
0
[3]:
0
[4]:
[1]:
1
[2]:
(a2+a)
[3]:
1
[5]:
[1]:
1
[2]:
(a2+a+1)
[3]:
1
[6]:
[1]:
(a3+1)
[2]:
(a)
[3]:
1
[7]:
[1]:
(a3+a2+1)
[2]:
(a2)
[3]:
1
[8]:
[1]:
(a3+a2+a)
[2]:
(a+1)
[3]:
1
[9]:
[1]:
(a3+a+1)
[2]:
(a2+1)
[3]:
1
[10]:
[1]:
(a3+a2+a+1)
[2]:
(a)
[3]:
1
[11]:
[1]:
(a3+a)
[2]:
(a2)
[3]:
1
[12]:
[1]:
(a3)
[2]:
(a+1)
[3]:
1
[13]:
[1]:
(a3+a2)
[2]:
(a2+1)
[3]:
1
[14]:
[1]:
(a3+a2+a)
[2]:
(a)
[3]:
1
[15]:
[1]:
(a3+a+1)
[2]:
(a2)
[3]:
1
[16]:
[1]:
(a3+1)
[2]:
(a+1)
[3]:
1
[17]:
[1]:
(a3+a2+1)
[2]:
(a2+1)
[3]:
1


Note that the number of "rational points" over $F_{16}$ is computed in C4[2][3]

Example of AG code: the typical code over the Klein quartic

In [121]:
setring s;
poly f=x3y+y3+x;


first compute "the curve"

In [122]:
list KLEIN=Adj_div(f);
KLEIN;

Out[122]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[2]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[2]:
4,3
[3]:
[1]:
1,1
[2]:
1,2
[4]:
0
[5]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
1,1


define the affine ring

In [123]:
def r=KLEIN[1][1];
setring r;
listvar();

Out[123]:
// r                              [0]  *ring
//      Inf_Points                     [0]  list, size: 2
//      Aff_SLocus                     [0]  ideal (SB), 1 generator(s)
//      CHI                            [0]  poly
// KLEIN                          [0]  list, size: 5
// f16                            [0]  ring
// C4                             [0]  list, size: 5
// G                              [0]  intvec (3)
// S(2)                           [0]  ring
// proj_R                         [0]  ring
// aff_R                          [0]  ring
// C                              [0]  list, size: 5
// s                              [0]  ring


the points at infinity (singular and non-singular)

In [124]:
Inf_Points;

Out[124]:
[1]:
empty list
[2]:
[1]:
[1]:
x
[2]:
1
[2]:
[1]:
y
[2]:
2


the affine singular locus (no singular point)

In [125]:
Aff_SLocus;

Out[125]:
Aff_SLocus[1]=1


degree of the curve = 4 (quartic)

In [126]:
KLEIN[2][1];

Out[126]:
4


genus of the Klein quartic

In [127]:
KLEIN[2][2];

Out[127]:
3


define the projective ring and see the projective equation

In [128]:
def R=KLEIN[1][2];
setring R;
CHI;

Out[128]:
x3y+xz3+y3z


the adjunction divisor (sometimes called the "conductor")

In [129]:
intvec ConductorK=KLEIN[4];
ConductorK;

Out[129]:
0


the list of places

In [130]:
list PlacesK=KLEIN[3];
PlacesK;

Out[130]:
[1]:
1,1
[2]:
1,2


"local ring" for places of degree = 1

In [131]:
def S(1)=KLEIN[5][1][1];
setring S(1);
listvar();

Out[131]:
// S(1)                           [0]  *ring
//      PARAMETRIZATIONS               [0]  list, size: 2
//      BRANCHES                       [0]  list, size: 2
//      LOC_EQS                        [0]  list, size: 2
//      POINTS                         [0]  list, size: 2
// PlacesK                        [0]  list, size: 2
// ConductorK                     [0]  intvec (1)
// R                              [0]  ring
// r                              [0]  ring
// KLEIN                          [0]  list, size: 5
// f16                            [0]  ring
// C4                             [0]  list, size: 5
// G                              [0]  intvec (3)
// S(2)                           [0]  ring
// proj_R                         [0]  ring
// aff_R                          [0]  ring
// C                              [0]  list, size: 5
// s                              [0]  ring


compute places up to degree 3

In [132]:
setring r;
KLEIN=NSplaces(1..3,KLEIN);
KLEIN;

Out[132]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[2]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[2]:
4,3
[3]:
[1]:
1,1
[2]:
1,2
[3]:
1,3
[4]:
2,1
[5]:
3,1
[6]:
3,2
[7]:
3,3
[8]:
3,4
[9]:
3,5
[10]:
3,6
[11]:
3,7
[4]:
0
[5]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
1,1,1
[2]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
2
[3]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
3,3,3,3,3,3,3


check that we have few points of degree 1 (rational over $F_2$)

thus, for coding purposes we have to extend the base field, to get "many" rational points

update the list of places

In [133]:
PlacesK=KLEIN[3];
PlacesK;

Out[133]:
[1]:
1,1
[2]:
1,2
[3]:
1,3
[4]:
2,1
[5]:
3,1
[6]:
3,2
[7]:
3,3
[8]:
3,4
[9]:
3,5
[10]:
3,6
[11]:
3,7


check now the closed points of degree 1, 2 and 3

In [134]:
Aff_Points(1);

Out[134]:
[1]:
[1]:
_[1]=y
_[2]=x
[2]:
3

In [135]:
Aff_Points(2);

Out[135]:
[1]:
[1]:
_[1]=y2+y+1
_[2]=x+y+1
[2]:
4

In [136]:
Aff_Points(3);

Out[136]:
[1]:
[1]:
_[1]=y+1
_[2]=x3+x+1
[2]:
5
[2]:
[1]:
_[1]=y3+y2+1
_[2]=x+y
[2]:
6
[3]:
[1]:
_[1]=y3+y2+1
_[2]=x+y2
[2]:
7
[4]:
[1]:
_[1]=y3+y2+1
_[2]=x+y2+y
[2]:
8
[5]:
[1]:
_[1]=y3+y+1
_[2]=x+y2+y
[2]:
9
[6]:
[1]:
_[1]=y3+y+1
_[2]=x+y2+y+1
[2]:
10
[7]:
[1]:
_[1]=y3+y+1
_[2]=x+1
[2]:
11


Klein quartic over $F_8$

In [137]:
KLEIN=extcurve(3,KLEIN);
KLEIN;

Out[137]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[2]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[3]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    x y
//        block   2 : ordering C
[4]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering lp
//                  : names    x y z
//        block   2 : ordering C
[5]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
4,3,24
[3]:
[1]:
1,1
[2]:
1,2
[3]:
1,3
[4]:
2,1
[5]:
3,1
[6]:
3,2
[7]:
3,3
[8]:
3,4
[9]:
3,5
[10]:
3,6
[11]:
3,7
[4]:
0
[5]:
[1]:
[1]:
//   characteristic : 2
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
1,1,1
[2]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
2
[3]:
[1]:
//   characteristic : 2
//   1 parameter    : a
//   minpoly        : ...
//   number of vars : 3
//        block   1 : ordering ls
//                  : names    x y t
//        block   2 : ordering C
[2]:
3,3,3,3,3,3,3


Input: coefficients of the divisor G (in this case, of degree 14)

In [138]:
intvec G=6,0,0,4;

Out[138]:
// ** redefining G **


compute the AG code L(G) by evaluating at all the rational points over $F_8$ not in the support of G

In [139]:
intvec D=2..24;


ring $F_8[x,y,z]$

In [140]:
def ER=KLEIN[1][4];
setring ER;
matrix CL=AGcode_L(G,D,KLEIN);
print(CL);

Out[140]:
0,0,(a),     (a2),    (a2+a),(a2+a+1),(a+1),   (a2+1),  (a2+a),  (a),
(a2),    (a2+a),(a),     (a2),    (a),     (a2),    (a2+a),  (a2+a+1),
(a+1),   (a2+1),  (a2+1),  (a2+a+1),(a+1),
0,0,1,       1,       1,     (a2+a+1),(a+1),   (a2+1),  (a),     (a2),
(a2+a),  (a+1), (a2+1),  (a2+a+1),(a2+a+1),(a+1),   (a2+1),  (a),
(a2),    (a2+a),  1,       1,       1,
0,0,1,       1,       1,     (a2),    (a2+a),  (a),     (a2+a+1),(a+1),
(a2+1),  1,     1,       1,       (a2+a),  (a),     (a2),    1,
1,       1,       (a2+1),  (a2+a+1),(a+1),
1,0,1,       1,       1,     (a2+1),  (a2+a+1),(a+1),   (a2),    (a2+a),
(a),     (a2+a),(a),     (a2),    (a+1),   (a2+1),  (a2+a+1),(a2+1),
(a2+a+1),(a+1),   (a2+a+1),(a+1),   (a2+1),
0,0,(a2+1),  (a2+a+1),(a+1), (a2+a+1),(a+1),   (a2+1),  (a2+a+1),(a+1),
(a2+1),  (a2),  (a2+a),  (a),     (a2),    (a2+a),  (a),     (a2+a),
(a),     (a2),    (a),     (a2),    (a2+a),
0,0,(a2+1),  (a2+a+1),(a+1), (a2),    (a2+a),  (a),     (a2),    (a2+a),
(a),     (a2+1),(a2+a+1),(a+1),   (a),     (a2),    (a2+a),  (a+1),
(a2+1),  (a2+a+1),1,       1,       1,
0,0,(a2+1),  (a2+a+1),(a+1), (a2+1),  (a2+a+1),(a+1),   (a2+1),  (a2+a+1),
(a+1),   (a+1), (a2+1),  (a2+a+1),1,       1,       1,       (a2),
(a2+a),  (a),     (a2+1),  (a2+a+1),(a+1),
0,0,(a2+1),  (a2+a+1),(a+1), (a+1),   (a2+1),  (a2+a+1),(a+1),   (a2+1),
(a2+a+1),1,     1,       1,       (a2+1),  (a2+a+1),(a+1),   (a),
(a2),    (a2+a),  (a2+a+1),(a+1),   (a2+1),
0,0,(a2+a+1),(a+1),   (a2+1),(a2+a+1),(a+1),   (a2+1),  (a2),    (a2+a),
(a),     (a),   (a2),    (a2+a),  (a2+1),  (a2+a+1),(a+1),   1,
1,       1,       (a2),    (a2+a),  (a),
0,0,(a2+a+1),(a+1),   (a2+1),(a2+1),  (a2+a+1),(a+1),   (a+1),   (a2+1),
(a2+a+1),(a2),  (a2+a),  (a),     (a2+a),  (a),     (a2),    (a2+a+1),
(a+1),   (a2+1),  1,       1,       1,
0,0,(a2+a+1),(a+1),   (a2+1),(a+1),   (a2+1),  (a2+a+1),1,       1,
1,       (a2+1),(a2+a+1),(a+1),   (a+1),   (a2+1),  (a2+a+1),(a2+a),
(a),     (a2),    (a2+1),  (a2+a+1),(a+1),
0,1,(a2+a+1),(a+1),   (a2+1),1,       1,       1,       (a2+a),  (a),
(a2),    (a+1), (a2+1),  (a2+a+1),(a2),    (a2+a),  (a),     (a+1),
(a2+1),  (a2+a+1),(a2+a+1),(a+1),   (a2+1)


dimension of the code

In [141]:
nrows(CL);

Out[141]:
12


length of the code

In [142]:
ncols(CL);

Out[142]:
23


dual code (Omega code)

In [143]:
matrix CO=AGcode_Omega(G,D,KLEIN);
print(CO);

Out[143]:
(a2+1),  0,       (a),     (a2+a),  (a+1), (a2+a),(a2+a),  0,     (a+1),
(a2),  0,       (a2),  1,0,0,0,0,0,0,0,0,0,0,
(a2),    0,       (a),     (a2+a),  (a+1), (a),   0,       (a),   1,
0,     (a2+a),  (a2+1),0,1,0,0,0,0,0,0,0,0,0,
(a2+1),  (a2),    1,       (a2+a+1),(a+1), (a),   (a),     (a2+a),(a),
(a2+a),(a),     (a2+1),0,0,1,0,0,0,0,0,0,0,0,
1,       (a2+a),  0,       (a2+1),  1,     (a2+a),0,       (a2),  (a2+a),
(a2+1),(a),     1,     0,0,0,1,0,0,0,0,0,0,0,
(a2),    (a),     (a+1),   (a2+a),  (a2),  0,     (a2),    0,     (a2+a+1),
(a2+a),(a2+a+1),(a2),  0,0,0,0,1,0,0,0,0,0,0,
(a),     (a+1),   (a2+1),  (a2),    (a2+a),(a2+1),(a),     (a+1), (a),
(a2),  (a2+1),  0,     0,0,0,0,0,1,0,0,0,0,0,
(a2),    (a2+1),  (a),     (a2+a+1),(a2+a),(a2+1),(a2+a+1),(a2),  (a2+a+1),
(a2),  (a2+a),  0,     0,0,0,0,0,0,1,0,0,0,0,
(a2+a),  (a2+a+1),(a),     (a2),    (a+1), (a2+a),(a2+a+1),(a+1), (a),
(a+1), (a2+a),  0,     0,0,0,0,0,0,0,1,0,0,0,
(a2+a),  (a2+a+1),(a2+a+1),(a2+a),  (a),   1,     0,       (a2+1),(a+1),
(a),   (a2+a+1),1,     0,0,0,0,0,0,0,0,1,0,0,
(a2+a+1),(a+1),   (a2+a),  (a2+1),  1,     1,     (a2+a+1),0,     0,
1,     (a2),    (a2),  0,0,0,0,0,0,0,0,0,1,0,
0,       (a2+1),  (a2+a),  0,       (a2+a),(a),   (a+1),   (a+1), (a2+a+1),
(a2+1),1,       (a2+1),0,0,0,0,0,0,0,0,0,0,1


dimension

In [144]:
nrows(CO);

Out[144]:
11


length

In [145]:
ncols(CO);

Out[145]:
23


directly by computing the dual code of CL

In [146]:
dual_code(CL)==CO;

Out[146]:
1


Decoding (preprocessing of the algorithm of Skorobogatov and Vladut): we need a divisor F of degree $\geq 6$

In [147]:
intvec F=6,0,0;
list K=prepSV(G,D,F,KLEIN);
K;

Out[147]:
[1]:
_[1,1]=0
_[1,2]=0
_[1,3]=(a)
_[1,4]=(a2)
_[1,5]=(a2+a)
_[1,6]=(a2+a+1)
_[1,7]=(a+1)
_[1,8]=(a2+1)
_[1,9]=(a2+a)
_[1,10]=(a)
_[1,11]=(a2)
_[1,12]=(a2+a)
_[1,13]=(a)
_[1,14]=(a2)
_[1,15]=(a)
_[1,16]=(a2)
_[1,17]=(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(a+1)
_[4,15]=(a2)
_[4,16]=(a2+a)
_[4,17]=(a)
_[4,18]=(a2)
_[4,19]=(a2+a)
_[4,20]=(a)
_[4,21]=(a2)
_[4,22]=(a2+a)
_[4,23]=(a)
[26]:
3,10


estimated correction capacity

In [148]:
K[size(K)][1];

Out[148]:
3


Coding information of dimension 11 into a codeword of length 23

In [149]:
matrix word[1][11];
word = 1,1,1,1,1,1,1,1,1,1,1;
print(word);

Out[149]:
1,1,1,1,1,1,1,1,1,1,1

In [150]:
def c=word*CO;
print(c);

Out[150]:
0,0,0,0,0,(a2),(a2+a),(a),(a),(a2),(a2+a),1,1,1,1,1,1,1,1,1,1,1,1


error correction: we add 3 errors

In [151]:
matrix e[1][23];
e[1,1]=1;
e[1,10]=a;
e[1,12]=1+a;
print(e);

Out[151]:
1,0,0,0,0,0,0,0,0,(a),0,(a+1),0,0,0,0,0,0,0,0,0,0,0


In [152]:
def y=c+e;
print(y);

Out[152]:
1,0,0,0,0,(a2),(a2+a),(a),(a),(a2+a),(a2+a),(a),1,1,1,1,1,1,1,1,1,1,1


decode

In [153]:
def x=decodeSV(y,K);
print(x);

Out[153]:
0,0,0,0,0,(a2),(a2+a),(a),(a),(a2),(a2+a),1,1,1,1,1,1,1,1,1,1,1,1


check the emitted codeword

In [154]:
x==c;

Out[154]:
1


obtain the error vector

In [155]:
print(x-y);

Out[155]:
1,0,0,0,0,0,0,0,0,(a),0,(a+1),0,0,0,0,0,0,0,0,0,0,0


can we correct 4 errors?

In [156]:
y[1,2]=y[1,2]+1;
def x=decodeSV(y,K);
x==c;

Out[156]:
1


and 5 errors?

In [157]:
y[1,3]=0;
def x=decodeSV(y,K);
x==c;

Out[157]:
1


with 6 errors we fail!

In [158]:
y[1,4]=y[1,4]+1;
decodeSV(y,K);

Out[158]:
? no error-locator found ?
? too many errors occur, 0-matrix returned ?
_[1,1]=0


Final example: Weierstrass semigroup of the Suzuki curve

In [159]:
setring s;
def RR=SUZUKI[1][2];
setring RR;
list WSS = Weierstrass(1,28,SUZUKI);
WSS;

Out[159]:
[1]:
[1]:
0
[2]:
8
[3]:
10
[4]:
12
[5]:
13
[6]:
16
[7]:
18
[8]:
20
[9]:
21
[10]:
22
[11]:
23
[12]:
24
[13]:
25
[14]:
26
[15]:
28
[2]:
[1]:
_[1]=1
_[2]=1
[2]:
_[1]=x
_[2]=z
[3]:
_[1]=y
_[2]=z
[4]:
_[1]=x5+y4z
_[2]=z5
[5]:
_[1]=x6+xy4z+y2z4
_[2]=z6
[6]:
_[1]=x2
_[2]=z2
[7]:
_[1]=xy
_[2]=z2
[8]:
_[1]=y2
_[2]=z2
[9]:
_[1]=x7+x2y4z+xy2z4
_[2]=z7
[10]:
_[1]=x5y+y5z
_[2]=z6
[11]:
_[1]=x6y+xy5z+y3z4
_[2]=z7
[12]:
_[1]=x3
_[2]=z3
[13]:
_[1]=x5y2+x4z3+y6z
_[2]=z7
[14]:
_[1]=x2y
_[2]=z3
[15]:
_[1]=xy2
_[2]=z3

In [ ]:
\$

In [ ]: