# Package implementing NX-book, Chapter 5.4 fgn := function(F) return [AlffGenus(F), AlffPlacesDegOneNum(F,1)]; end; # fgn := function(F) return 0; end; KEinit:=function(p,r) q := p^r; AlffInit(FF(p,2*r)); K := [ Alff(y+T), Alff((y^q+y)*(T^(q-1)+1)+T^q) ]; E := [ Alff(y+T), Alff(y^q+y+T^(q+1)) ]; end; eest := function(n) return [ Floor(q^n+q^(n-1)-q^((n+1)/2)-2*q^((n-1)/2)+1), (q^2-1)*q^(n-1)+1 ]; end; Ktower:=function(itop) i := 2; Print("K[",1,"] : ",fgn(K[1]),"\n"); Print("K[",i,"] : ",fgn(K[i]),"\n"); while i1 ! Finit:=function(p,e) q := p^e; m := (q-1)/(p-1); AlffInit(FF(p,e)); F := [ Alff(y+T) ]; end; Ftower:=function(itop) i:=1; Print("F[",i,"] : ",fgn(F[i]),"\n"); while i2 ! F2init:=function(p,e) r := p^e; AlffInit(FF(p,2*e)); F2 := [ Alff(y+T) ]; end; F2tower:=function(itop) i:=1; Print("F2[",i,"] : ",fgn(F2[i]),"\n"); while igenK^i); powlist:=[genK^0]; coeff:=[]; i:=1; repeat Append(powlist,[powlist[i]*genK]); krnl:=MatKernel( Mat(kT, List(powlist,pow->AlffEltToList(pow)[1]) ) ); if MatRows(krnl)>0 then coeff:=MatToRowList( krnl)[1]; fi; until Length(coeff)>0; powlist := List(powlist, e->AlffEltToList(e)[2]); powlist := Sum([0..Length(coeff)-1],i->coeff[i+1]*powlist[i+1]*y^i); return powlist/Gcd(PolyToList(powlist)); end;