[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10 Functions for Groebner basis computation


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.1 gr, hgr, gr_mod, dgr

gr(plist,vlist,order)
hgr(plist,vlist,order)
gr_mod(plist,vlist,order,p)
dgr(plist,vlist,order,procs)

:: Groebner basis computation

return

list

plist vlist procs

list

order

number, list or matrix

p

prime less than 2^27

[0] load("gr")$
[64] load("cyclic")$
[74] G=gr(cyclic(5),[c0,c1,c2,c3,c4],2);
[c4^15+122*c4^10-122*c4^5-1,...]
[75] GM=gr_mod(cyclic(5),[c0,c1,c2,c3,c4],2,31991)$
24628*c4^15+29453*c4^10+2538*c4^5+7363
[76] (G[0]*24628-GM[0])%31991;
0
References

dp_gr_main, dp_gr_mod_main, dp_gr_f_main, dp_weyl_gr_main, dp_weyl_gr_mod_main, dp_weyl_gr_f_main, dp_ord.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.2 lex_hensel, lex_tl, tolex, tolex_d, tolex_tl

lex_hensel(plist,vlist1,order,vlist2,homo)
lex_tl(plist,vlist1,order,vlist2,homo)

: Groebner basis computation with respect to a lex order by change of ordering

tolex(plist,vlist1,order,vlist2)
tolex_d(plist,vlist1,order,vlist2,procs)
tolex_tl(plist,vlist1,order,vlist2,homo)

:: Groebner basis computation with respect to a lex order by change of ordering, starting from a Groebner basis

return

list

plist vlist1 vlist2 procs

list

order

number, list or matrix

homo

flag

[78] K=katsura(5)$ 
30msec + gc : 20msec
[79] V=[u5,u4,u3,u2,u1,u0]$
0msec
[80] G0=hgr(K,V,2)$
91.558sec + gc : 15.583sec
[81] G1=lex_hensel(K,V,0,V,0)$
49.049sec + gc : 9.961sec
[82] G2=lex_tl(K,V,0,V,1)$
31.186sec + gc : 3.500sec
[83] gb_comp(G0,G1);
1
10msec
[84] gb_comp(G0,G2);
1
References

dp_gr_main, dp_gr_mod_main, dp_gr_f_main, dp_weyl_gr_main, dp_weyl_gr_mod_main, dp_weyl_gr_f_main, dp_ord, Distributed computation


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.3 lex_hensel_gsl, tolex_gsl, tolex_gsl_d

lex_hensel_gsl(plist,vlist1,order,vlist2,homo)

::Computation of an GSL form ideal basis

tolex_gsl(plist,vlist1,order,vlist2)
tolex_gsl_d(plist,vlist1,order,vlist2,procs)

:: Computation of an GSL form ideal basis stating from a Groebner basis

return

list

plist vlist1 vlist2 procs

list

order

number, list or matrix

homo

flag

[103] K=katsura(5)$
[104] V=[u5,u4,u3,u2,u1,u0]$
[105] G0=gr(K,V,0)$
[106] GSL=tolex_gsl(G0,V,0,V)$ 
[107] GSL[0];
[u1,8635837421130477667200000000*u0^31-...]
[108] GSL[1];
[u2,10352277157007342793600000000*u0^31-...]
[109] GSL[5];
[u0,11771021876193064124640000000*u0^32-...,
376672700038178051988480000000*u0^31-...]
References

lex_hensel, lex_tl, tolex, tolex_d, tolex_tl, Distributed computation


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.4 gr_minipoly, minipoly

gr_minipoly(plist,vlist,order,poly,v,homo)

:: Computation of the minimal polynomial of a polynomial modulo an ideal

minipoly(plist,vlist,order,poly,v)

:: Computation of the minimal polynomial of a polynomial modulo an ideal

return

polynomial

plist vlist

list

order

number, list or matrix

poly

polynomial

v

indeterminate

homo

flag

[117] G=tolex(G0,V,0,V)$      
43.818sec + gc : 11.202sec
[118] GSL=tolex_gsl(G0,V,0,V)$
17.123sec + gc : 2.590sec
[119] MP=minipoly(G0,V,0,u0,z)$
4.370sec + gc : 780msec
References

lex_hensel, lex_tl, tolex, tolex_d, tolex_tl.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.5 tolexm, minipolym

tolexm(plist,vlist1,order,vlist2,mod)

:: Groebner basis computation modulo mod by change of ordering.

minipolym(plist,vlist1,order,poly,v,mod)

:: Minimal polynomial computation modulo mod the same method as

return

tolexm() : list, minipolym() : polynomial

plist vlist1 vlist2

list

order

number, list or matrix

mod

prime

[197] tolexm(G0,V,0,V,31991);
[8271*u0^31+10435*u0^30+816*u0^29+26809*u0^28+...,...]
[198] minipolym(G0,V,0,u0,z,31991);
z^32+11405*z^31+20868*z^30+21602*z^29+...
References

lex_hensel, lex_tl, tolex, tolex_d, tolex_tl, gr_minipoly, minipoly.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.6 dp_gr_main, dp_gr_mod_main, dp_gr_f_main, dp_weyl_gr_main, dp_weyl_gr_mod_main, dp_weyl_gr_f_main

dp_gr_main(plist,vlist,homo,modular,order)
dp_gr_mod_main(plist,vlist,homo,modular,order)
dp_gr_f_main(plist,vlist,homo,order)
dp_weyl_gr_main(plist,vlist,homo,modular,order)
dp_weyl_gr_mod_main(plist,vlist,homo,modular,order)
dp_weyl_gr_f_main(plist,vlist,homo,order)

:: Groebner basis computation (built-in functions)

return

list

plist vlist

list

order

number, list or matrix

homo

flag

modular

flag or prime

References

dp_ord, dp_gr_flags, dp_gr_print, gr, hgr, gr_mod, dgr, setmod_ff, Controlling Groebner basis computations


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.7 dp_f4_main, dp_f4_mod_main, dp_weyl_f4_main, dp_weyl_f4_mod_main

dp_f4_main(plist,vlist,order)
dp_f4_mod_main(plist,vlist,order)
dp_weyl_f4_main(plist,vlist,order)
dp_weyl_f4_mod_main(plist,vlist,order)

:: Groebner basis computation by F4 algorithm (built-in functions)

return

list

plist vlist

list

order

number, list or matrix

References

dp_ord, dp_gr_flags, dp_gr_print, gr, hgr, gr_mod, dgr, Controlling Groebner basis computations


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.8 nd_gr, nd_gr_trace, nd_f4, nd_f4_trace, nd_weyl_gr, nd_weyl_gr_trace

nd_gr(plist,vlist,p,order[|option=value,...])
nd_gr_trace(plist,vlist,homo,p,order[|option=value,...])
nd_f4(plist,vlist,modular,order[|option=value,...])
nd_f4_trace(plist,vlist,homo,p,order[|option=value,...])
nd_weyl_gr(plist,vlist,p,order[|option=value,...])
nd_weyl_gr_trace(plist,vlist,homo,p,order[|option=value,...])

:: Groebner basis computation (built-in functions)

return

list

plist vlist

list

order

number, list or matrix

homo

flag

modular

flag or prime

[38] load("cyclic")$
[49] C=cyclic(7)$
[50] V=vars(C)$
[51] cputime(1)$
[52] dp_gr_mod_main(C,V,0,31991,0)$
26.06sec + gc : 0.313sec(26.4sec)
[53] nd_gr(C,V,31991,0)$
ndv_alloc=1477188
5.737sec + gc : 0.1837sec(5.921sec)
[54] dp_f4_mod_main(C,V,31991,0)$  
3.51sec + gc : 0.7109sec(4.221sec)
[55] nd_f4(C,V,31991,0)$
1.906sec + gc : 0.126sec(2.032sec)
References

dp_ord, dp_gr_flags, dp_gr_print, Controlling Groebner basis computations


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.9 nd_gr_postproc, nd_weyl_gr_postproc

nd_gr_postproc(plist,vlist,p,order,check)
nd_weyl_gr_postproc(plist,vlist,p,order,check)

:: Check of Groebner basis candidate and inter-reduction

return

list or 0

plist vlist

list

p

prime or 0

order

number, list or matrix

check

0 or 1

afo

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.10 dp_gr_flags, dp_gr_print

dp_gr_flags([list])
dp_gr_print([i])

and showing information.

return

value currently set

list

list

i

integer

References

Controlling Groebner basis computations


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.11 dp_ord

dp_ord([order])

:: Set and show the ordering type.

return

ordering type (number, list or matrix)

order

number, list or matrix

[19] dp_ord(0)$          
[20] <<1,2,3>>+<<3,1,1>>;
(1)*<<1,2,3>>+(1)*<<3,1,1>>
[21] dp_ord(2)$          
[22] <<1,2,3>>+<<3,1,1>>;
(1)*<<3,1,1>>+(1)*<<1,2,3>>
References

Setting term orderings


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.12 dp_set_weight, dp_set_top_weight, dp_weyl_set_weight

dp_set_weight([weight])

:: Set and show the sugar weight.

dp_set_top_weight([weight])

:: Set and show the top weight.

dp_weyl_set_weight([weight])

:: Set and show the weyl weight.

return

a vector

weight

a list or vector of integers

References

Weight


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.13 dp_ptod

dp_ptod(poly,vlist)

:: Converts an ordinary polynomial into a distributed polynomial.

return

distributed polynomial

poly

polynomial

vlist

list

[50] dp_ord(0);
1
[51] dp_ptod((x+y+z)^2,[x,y,z]);
(1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>>
+(1)*<<0,0,2>>
[52] dp_ptod((x+y+z)^2,[x,y]);  
(1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>
+(z^2)*<<0,0>>
References

dp_dtop, dp_ord.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.14 dpm_dptodpm

dpm_dptodpm(dpoly,pos)

:: Converts a distributed polynomial into a module polynomial.

return

module polynomial

dpoly

distributed polynomial

pos

positive integer

[50] dp_ord([0,0])$
[51] D=dp_ptod((x+y+z)^2,[x,y,z]);
(1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>>
+(1)*<<0,0,2>>
[52] dp_dptodpm(D,2);
(1)*<<2,0,0:2>>+(2)*<<1,1,0:2>>+(1)*<<0,2,0:2>>+(2)*<<1,0,1:2>>
+(2)*<<0,1,1:2>>+(1)*<<0,0,2:2>>
References

dp_ptod, dp_ord.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.15 dpm_ltod

dpm_dptodpm(plist,vlist)

:: Converts a list of polynomials into a module polynomial.

return

module polynomial

plist

list of polynomials

vlist

list of variables

[2126] dp_ord([0,0])$
[2127] dpm_ltod([x^2+y^2,x,y-z],[x,y,z]);
(1)*<<2,0,0:1>>+(1)*<<0,2,0:1>>+(1)*<<1,0,0:2>>+(1)*<<0,1,0:3>>
+(-1)*<<0,0,1:3>>
References

dpm_dtol, dp_ord.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.16 dpm_dtol

dpm_dptodpm(poly,vlist)

:: Converts a module polynomial into a list of polynomials.

return

list of polynomials

poly

module polynomial

vlist

list of variables

[2126] dp_ord([0,0])$
[2127] D=(1)*<<2,0,0:1>>+(1)*<<0,2,0:1>>+(1)*<<1,0,0:2>>+(1)*<<0,1,0:3>>
+(-1)*<<0,0,1:3>>$
[2128] dpm_dtol(D,[x,y,z]);
[x^2+y^2,x,y-z]
References

dpm_ltod, dp_ord.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.17 dp_dtop

dp_dtop(dpoly,vlist)

:: Converts a distributed polynomial into an ordinary polynomial.

return

polynomial

dpoly

distributed polynomial

vlist

list

[53] T=dp_ptod((x+y+z)^2,[x,y]);
(1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>
+(z^2)*<<0,0>>
[54] P=dp_dtop(T,[a,b]);
z^2+(2*a+2*b)*z+a^2+2*b*a+b^2

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.18 dp_mod, dp_rat

dp_mod(p,mod,subst)

:: Converts a distributed polynomial into one with coefficients in a finite field.

dp_rat(p)

:: Converts a distributed polynomial with coefficients in a finite field into one with coefficients in the rationals.

return

distributed polynomial

p

distributed polynomial

mod

prime

subst

list

References

dp_nf, dp_nf_mod, dp_true_nf, dp_true_nf_mod, dp_weyl_nf, dp_weyl_nf_mod, subst, psubst, setmod.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.19 dp_homo, dp_dehomo

dp_homo(dpoly)

:: Homogenize a distributed polynomial

dp_dehomo(dpoly)

:: Dehomogenize a homogeneous distributed polynomial

return

distributed polynomial

dpoly

distributed polynomial

[202] X=<<1,2,3>>+3*<<1,2,1>>;
(1)*<<1,2,3>>+(3)*<<1,2,1>>
[203] dp_homo(X);
(1)*<<1,2,3,0>>+(3)*<<1,2,1,2>>
[204] dp_dehomo(@);
(1)*<<1,2,3>>+(3)*<<1,2,1>>
References

gr, hgr, gr_mod, dgr.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.20 dp_ptozp, dp_prim

dp_ptozp(dpoly)

:: Converts a distributed polynomial poly with rational coefficients into an integral distributed polynomial such that GCD of all its coefficients is 1.

dp_prim(dpoly)

:: Converts a distributed polynomial poly with rational function coefficients into an integral distributed polynomial such that polynomial GCD of all its coefficients is 1.

return

distributed polynomial

dpoly

distributed polynomial

[208] X=dp_ptod(3*(x-y)*(y-z)*(z-x),[x]);
(-3*y+3*z)*<<2>>+(3*y^2-3*z^2)*<<1>>+(-3*z*y^2+3*z^2*y)*<<0>>
[209] dp_ptozp(X);                       
(-y+z)*<<2>>+(y^2-z^2)*<<1>>+(-z*y^2+z^2*y)*<<0>>
[210] dp_prim(X);                        
(1)*<<2>>+(-y-z)*<<1>>+(z*y)*<<0>>
References

ptozp.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.21 dp_nf, dp_nf_mod, dp_true_nf, dp_true_nf_mod, dp_weyl_nf, dp_weyl_nf_mod

dp_nf(indexlist,dpoly,dpolyarray,fullreduce)
dp_weyl_nf(indexlist,dpoly,dpolyarray,fullreduce)
dp_nf_mod(indexlist,dpoly,dpolyarray,fullreduce,mod)
dp_weyl_nf_mod(indexlist,dpoly,dpolyarray,fullreduce,mod)

:: Computes the normal form of a distributed polynomial. (The result may be multiplied by a constant in the ground field.)

dp_true_nf(indexlist,dpoly,dpolyarray,fullreduce)
dp_true_nf_mod(indexlist,dpoly,dpolyarray,fullreduce,mod)

:: Computes the normal form of a distributed polynomial. (The true result is returned in such a list as [numerator, denominator])

return

dp_nf() : distributed polynomial, dp_true_nf() : list

indexlist

list

dpoly

distributed polynomial

dpolyarray

array of distributed polynomial

fullreduce

flag

mod

prime

[0] load("gr")$
[64] load("katsura")$
[69] K=katsura(4)$
[70] dp_ord(2)$
[71] V=[u0,u1,u2,u3,u4]$
[72] DP1=newvect(length(K),map(dp_ptod,K,V))$
[73] G=gr(K,V,2)$
[74] DP2=newvect(length(G),map(dp_ptod,G,V))$
[75] T=dp_ptod((u0-u1+u2-u3+u4)^2,V)$
[76] dp_dtop(dp_nf([0,1,2,3,4],T,DP1,1),V);
u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2^2
+(6*u1-2)*u2+9*u1^2-6*u1+1
[77] dp_dtop(dp_nf([4,3,2,1,0],T,DP1,1),V);
-5*u4^2+(-4*u3-4*u2-4*u1)*u4-u3^2-3*u3-u2^2+(2*u1-1)*u2-2*u1^2-3*u1+1
[78] dp_dtop(dp_nf([0,1,2,3,4],T,DP2,1),V);
-11380879768451657780886122972730785203470970010204714556333530492210
456775930005716505560062087150928400876150217079820311439477560587583
488*u4^15+...
[79] dp_dtop(dp_nf([4,3,2,1,0],T,DP2,1),V);
-11380879768451657780886122972730785203470970010204714556333530492210
456775930005716505560062087150928400876150217079820311439477560587583
488*u4^15+...
[80] @78==@79;
1
References

dp_dtop, dp_ord, dp_mod, dp_rat, p_nf, p_nf_mod, p_true_nf, p_true_nf_mod.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.22 dpm_nf, dpm_nf_and_quotient

dpm_nf([indexlist,]dpoly,dpolyarray,fullreduce)

:: Computes the normal form of a module polynomial. (The result may be multiplied by a constant in the ground field.)

dpm_nf_and_quotient([indexlist,]dpoly,dpolyarray)

:: Computes the normal form of a module polynomial and the quotient.

return

dpm_nf() : module polynomial, dpm_nf_and_quotient() : list

indexlist

list

dpoly

module polynomial

dpolyarray

array of module polynomial

[2126] dp_ord([1,0])$
[2127] S=ltov([(1)*<<0,0,2,0:1>>+(1)*<<0,0,1,1:1>>+(1)*<<0,0,0,2:1>>
+(-1)*<<3,0,0,0:2>>+(-1)*<<0,0,2,1:2>>+(-1)*<<0,0,1,2:2>>
+(1)*<<3,0,1,0:3>>+(1)*<<3,0,0,1:3>>+(1)*<<0,0,2,2:3>>,
(-1)*<<0,1,0,0:1>>+(-1)*<<0,0,1,0:1>>+(-1)*<<0,0,0,1:1>>
+(-1)*<<3,0,0,0:3>>+(1)*<<0,1,1,1:3>>,(1)*<<0,1,0,0:2>>
+(1)*<<0,0,1,0:2>>+(1)*<<0,0,0,1:2>>+(-1)*<<0,1,1,0:3>>
+(-1)*<<0,1,0,1:3>>+(-1)*<<0,0,1,1:3>>])$
[2128] U=dpm_sp(S[0],S[1]);
(1)*<<0,0,3,0:1>>+(-1)*<<0,1,1,1:1>>+(1)*<<0,0,2,1:1>>
+(-1)*<<0,1,0,2:1>>+(1)*<<3,1,0,0:2>>+(1)*<<0,1,2,1:2>>
+(1)*<<0,1,1,2:2>>+(-1)*<<3,1,1,0:3>>+(1)*<<3,0,2,0:3>>
+(-1)*<<3,1,0,1:3>>+(-1)*<<0,1,3,1:3>>+(-1)*<<0,1,2,2:3>>
[2129] dpm_nf(U,S,1);
0
[2130] L=dpm_nf_and_quotient(U,S)$
[2131] Q=L[2]$
[2132] D=L[1]$
[2133] D*U-(Q[1]*S[1]+Q[2]*S[2]);
0
References

@ref{dpm_sp}, dp_ord.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.23 dp_hm, dp_ht, dp_hc, dp_rest

dp_hm(dpoly)

:: Gets the head monomial.

dp_ht(dpoly)

:: Gets the head term.

dp_hc(dpoly)

:: Gets the head coefficient.

dp_rest(dpoly)

:: Gets the remainder of the polynomial where the head monomial is removed.

return

dp_hm(), dp_ht(), dp_rest() : distributed polynomial dp_hc() : number or polynomial

dpoly

distributed polynomial

[87] dp_ord(0)$
[88] X=ptozp((a46^2+7/10*a46+7/48)*u3^4-50/27*a46^2-35/27*a46-49/216)$
[89] T=dp_ptod(X,[u3,u4,a46])$                                        
[90] dp_hm(T);                                                        
(2160)*<<4,0,2>>
[91] dp_ht(T);
(1)*<<4,0,2>>
[92] dp_hc(T);
2160
[93] dp_rest(T);
(1512)*<<4,0,1>>+(315)*<<4,0,0>>+(-4000)*<<0,0,2>>+(-2800)*<<0,0,1>>
+(-490)*<<0,0,0>>

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.24 dpm_hm, dpm_ht, dpm_hc, dpm_hp, dpm_rest

dpm_hm(dpoly)

:: Gets the head monomial of a module polynomial.

dpm_ht(dpoly)

:: Gets the head term of a module polynomial.

dpm_hc(dpoly)

:: Gets the head coefficient of a module polynomial.

dpm_hp(dpoly)

:: Gets the head position of a module polynomial.

dpm_rest(dpoly)

:: Gets the remainder of a module polynomial where the head monomial is removed.

return

dpm_hm(), dpm_ht(), dpm_rest() : module polynomial dpm_hc() : monomial

dpoly

distributed polynomial

[2126] dp_ord([1,0]); 
[1,0]
[2127] F=2*<<1,2,0:2>>-3*<<1,0,2:3>>+<<2,1,0:2>>;
(1)*<<2,1,0:2>>+(2)*<<1,2,0:2>>+(-3)*<<1,0,2:3>>
[2128] M=dpm_hm(F);
(1)*<<2,1,0:2>>
[2129] C=dpm_hc(F);
(1)*<<2,1,0>>
[2130] R=dpm_rest(F);
(2)*<<1,2,0:2>>+(-3)*<<1,0,2:3>>
[2131] dpm_hp(F);
2

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.25 dp_td, dp_sugar

dp_td(dpoly)

:: Gets the total degree of the head term.

dp_sugar(dpoly)

:: Gets the sugar of a polynomial.

return

non-negative integer

dpoly

distributed polynomial

onoff

flag

[74] dp_ord(0)$
[75] X=<<1,2>>+<<0,1>>$
[76] Y=<<1,2>>+<<1,0>>$
[77] Z=X-Y;
(-1)*<<1,0>>+(1)*<<0,1>>
[78] dp_sugar(T);
3

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.26 dp_lcm

dp_lcm(dpoly1,dpoly2)

:: Returns the least common multiple of the head terms of the given two polynomials.

return

distributed polynomial

dpoly1 dpoly2

distributed polynomial

[100] dp_lcm(<<1,2,3,4,5>>,<<5,4,3,2,1>>);
(1)*<<5,4,3,4,5>>
References

p_nf, p_nf_mod, p_true_nf, p_true_nf_mod.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.27 dp_redble

dp_redble(dpoly1,dpoly2)

:: Checks whether one head term is divisible by the other head term.

return

integer

dpoly1 dpoly2

distributed polynomial

[148] C;
(1)*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>+(1)*<<1,0,0,1,1>>
[149] T;
(3)*<<2,1,0,0,0>>+(3)*<<1,2,0,0,0>>+(1)*<<0,3,0,0,0>>+(6)*<<1,1,1,0,0>>
[150] for ( ; T; T = dp_rest(T)) print(dp_redble(T,C));
0
0
0
1
References

dp_red, dp_red_mod.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.28 dpm_redble

dpm_redble(dpoly1,dpoly2)

:: Checks whether one head term is divisible by the other head term.

return

integer

dpoly1 dpoly2

module polynomial


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.29 dp_subd

dp_subd(dpoly1,dpoly2)

:: Returns the quotient monomial of the head terms.

return

distributed polynomial

dpoly1 dpoly2

distributed polynomial

[162] dp_subd(<<1,2,3,4,5>>,<<1,1,2,3,4>>);
(1)*<<0,1,1,1,1>>
References

dp_red, dp_red_mod.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.30 dp_vtoe, dp_etov

dp_vtoe(vect)

:: Converts an exponent vector into a term.

dp_etov(dpoly)

:: Convert the head term of a distributed polynomial into an exponent vector.

return

dp_vtoe : distributed polynomial, dp_etov : vector

vect

vector

dpoly

distributed polynomial

[211] X=<<1,2,3>>;
(1)*<<1,2,3>>
[212] V=dp_etov(X);
[ 1 2 3 ]
[213] V[2]++$
[214] Y=dp_vtoe(V);
(1)*<<1,2,4>>

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.31 dp_mbase

dp_mbase(dplist)

:: Computes the monomial basis

return

list of distributed polynomial

dplist

list of distributed polynomial

[215] K=katsura(5)$
[216] V=[u5,u4,u3,u2,u1,u0]$
[217] G0=gr(K,V,0)$
[218] H=map(dp_ptod,G0,V)$
[219] map(dp_ptod,dp_mbase(H),V)$
[u0^5,u4*u0^3,u3*u0^3,u2*u0^3,u1*u0^3,u0^4,u3^2*u0,u2*u3*u0,u1*u3*u0,
u1*u2*u0,u1^2*u0,u4*u0^2,u3*u0^2,u2*u0^2,u1*u0^2,u0^3,u3^2,u2*u3,u1*u3,
u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0,1]
References

gr, hgr, gr_mod, dgr.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.32 dp_mag

dp_mag(p)

:: Computes the sum of bit lengths of coefficients of a distributed polynomial.

return

integer

p

distributed polynomial

[221] X=dp_ptod((x+2*y)^10,[x,y])$
[222] dp_mag(X);
115
References

dp_gr_flags, dp_gr_print.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.33 dp_red, dp_red_mod

dp_red(dpoly1,dpoly2,dpoly3)
dp_red_mod(dpoly1,dpoly2,dpoly3,mod)

:: Single reduction operation

return

list

dpoly1 dpoly2 dpoly3

distributed polynomial

vlist

list

mod

prime

[157] D=(3)*<<2,1,0,0,0>>+(3)*<<1,2,0,0,0>>+(1)*<<0,3,0,0,0>>;
(3)*<<2,1,0,0,0>>+(3)*<<1,2,0,0,0>>+(1)*<<0,3,0,0,0>>
[158] R=(6)*<<1,1,1,0,0>>;                                    
(6)*<<1,1,1,0,0>>
[159] C=12*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>; 
(12)*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>
[160] dp_red(D,R,C);                                         
[(6)*<<2,1,0,0,0>>+(6)*<<1,2,0,0,0>>+(2)*<<0,3,0,0,0>>,
(-1)*<<0,1,1,1,0>>+(-1)*<<1,1,0,0,1>>]
References

dp_mod, dp_rat.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.34 dp_sp, dp_sp_mod

dp_sp(dpoly1,dpoly2)
dp_sp_mod(dpoly1,dpoly2,mod)

:: Computation of an S-polynomial

return

distributed polynomial

dpoly1 dpoly2

distributed polynomial

mod

prime

[227] X=dp_ptod(x^2*y+x*y,[x,y]);
(1)*<<2,1>>+(1)*<<1,1>>
[228] Y=dp_ptod(x*y^2+x*y,[x,y]);
(1)*<<1,2>>+(1)*<<1,1>>
[229] dp_sp(X,Y);
(-1)*<<2,1>>+(1)*<<1,2>>
References

dp_mod, dp_rat.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.35 dpm_sp

dpm_sp(dpoly1,dpoly2[|coef=1])

:: Computation of an S-polynomial

return

module polynomial or list

dpoly1 dpoly2

module polynomial


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.36 dpm_schreyer_base

dpm_schreyer_base(G)

:: Computation of a Groebner basis of the syzygy module

return

list of module polynomials

G

list of module polynomials


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.37 dpm_schreyer_frame

dpm_schreyer_frame(G)

:: Computation of the Schreyer frame

return

a list of lists of module monomials

G

list of module polynomials


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.38 dpm_set_schreyer_level

dpm_set_schreyer_level(L)

:: Setting the Schreyer ordering of a specified level

return

a non-negative integer

G

a non-negative integer


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.39 dpm_sp_nf

dpm_sp_nf(C,Z,P,Q)

:: Computation of a remainder of an S-polynomial modulo a polynomial array

return

a list of module monomials

C

an array of module polynomials

Z

an array of integer lists

P
Q

integers


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.40 p_nf, p_nf_mod, p_true_nf, p_true_nf_mod

p_nf(poly,plist,vlist,order)
p_nf_mod(poly,plist,vlist,order,mod)

:: Computes the normal form of the given polynomial. (The result may be multiplied by a constant.)

p_true_nf(poly,plist,vlist,order)
p_true_nf_mod(poly,plist,vlist,order,mod)

:: Computes the normal form of the given polynomial. (The result is returned as a form of [numerator, denominator])

return

p_nf : polynomial, p_true_nf : list

poly

polynomial

plist vlist

list

order

number, list or matrix

mod

prime

[79] K = katsura(5)$
[80] V = [u5,u4,u3,u2,u1,u0]$
[81] G = hgr(K,V,2)$
[82] p_nf(K[1],G,V,2);
0
[83] L = p_true_nf(K[1]+1,G,V,2);
[-1503...,-1503...]
[84] L[0]/L[1];
1
References

dp_ptod, dp_dtop, dp_ord, dp_nf, dp_nf_mod, dp_true_nf, dp_true_nf_mod, dp_weyl_nf, dp_weyl_nf_mod.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.41 p_terms

p_terms(poly,vlist,order)

:: Monomials appearing in the given polynomial is collected into a list.

return

list

poly

polynomial

vlist

list

order

number, list or matrix

[233] G=gr(katsura(5),[u5,u4,u3,u2,u1,u0],2)$
[234] p_terms(G[0],[u5,u4,u3,u2,u1,u0],2);
[u5,u0^31,u0^30,u0^29,u0^28,u0^27,u0^26,u0^25,u0^24,u0^23,u0^22,
u0^21,u0^20,u0^19,u0^18,u0^17,u0^16,u0^15,u0^14,u0^13,u0^12,u0^11,
u0^10,u0^9,u0^8,u0^7,u0^6,u0^5,u0^4,u0^3,u0^2,u0,1]

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.42 gb_comp

gb_comp(plist1, plist2)

:: Checks whether two polynomial lists are equal or not as a set

return 0 or 1
plist1 plist2
[243] C=cyclic(6)$
[244] V=[c0,c1,c2,c3,c4,c5]$
[245] G0=gr(C,V,0)$
[246] G=tolex(G0,V,0,V)$
[247] GG=lex_tl(C,V,0,V,0)$
[248] gb_comp(G,GG);
1

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.43 katsura, hkatsura, cyclic, hcyclic

katsura(n)
hkatsura(n)
cyclic(n)
hcyclic(n)

:: Generates a polynomial list of standard benchmark.

return

list

n

integer

[74] load("katsura")$
[79] load("cyclic")$ 
[89] katsura(5);
[u0+2*u4+2*u3+2*u2+2*u1+2*u5-1,2*u4*u0-u4+2*u1*u3+u2^2+2*u5*u1,
2*u3*u0+2*u1*u4-u3+(2*u1+2*u5)*u2,2*u2*u0+2*u2*u4+(2*u1+2*u5)*u3
-u2+u1^2,2*u1*u0+(2*u3+2*u5)*u4+2*u2*u3+2*u1*u2-u1,
u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
[90] hkatsura(5);
[-t+u0+2*u4+2*u3+2*u2+2*u1+2*u5,
-u4*t+2*u4*u0+2*u1*u3+u2^2+2*u5*u1,-u3*t+2*u3*u0+2*u1*u4+(2*u1+2*u5)*u2,
-u2*t+2*u2*u0+2*u2*u4+(2*u1+2*u5)*u3+u1^2,
-u1*t+2*u1*u0+(2*u3+2*u5)*u4+2*u2*u3+2*u1*u2,
-u0*t+u0^2+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
[91] cyclic(6);
[c5*c4*c3*c2*c1*c0-1,
((((c4+c5)*c3+c5*c4)*c2+c5*c4*c3)*c1+c5*c4*c3*c2)*c0+c5*c4*c3*c2*c1,
(((c3+c5)*c2+c5*c4)*c1+c5*c4*c3)*c0+c4*c3*c2*c1+c5*c4*c3*c2,
((c2+c5)*c1+c5*c4)*c0+c3*c2*c1+c4*c3*c2+c5*c4*c3,
(c1+c5)*c0+c2*c1+c3*c2+c4*c3+c5*c4,c0+c1+c2+c3+c4+c5]
[92] hcyclic(6);
[-c^6+c5*c4*c3*c2*c1*c0,
((((c4+c5)*c3+c5*c4)*c2+c5*c4*c3)*c1+c5*c4*c3*c2)*c0+c5*c4*c3*c2*c1,
(((c3+c5)*c2+c5*c4)*c1+c5*c4*c3)*c0+c4*c3*c2*c1+c5*c4*c3*c2,
((c2+c5)*c1+c5*c4)*c0+c3*c2*c1+c4*c3*c2+c5*c4*c3,
(c1+c5)*c0+c2*c1+c3*c2+c4*c3+c5*c4,c0+c1+c2+c3+c4+c5]
References

dp_dtop.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.44 primadec, primedec

primadec(plist,vlist)
primedec(plist,vlist)

:: Computes decompositions of ideals.

return
plist

list of polynomials

vlist

list of variables

[84] load("primdec")$
[102] primedec([p*q*x-q^2*y^2+q^2*y,-p^2*x^2+p^2*x+p*q*y,
(q^3*y^4-2*q^3*y^3+q^3*y^2)*x-q^3*y^4+q^3*y^3,
-q^3*y^4+2*q^3*y^3+(-q^3+p*q^2)*y^2],[p,q,x,y]);
[[y,x],[y,p],[x,q],[q,p],[x-1,q],[y-1,p],[(y-1)*x-y,q*y^2-2*q*y-p+q]]
[103] primadec([x,z*y,w*y^2,w^2*y-z^3,y^3],[x,y,z,w]);
[[[x,z*y,y^2,w^2*y-z^3],[z,y,x]],[[w,x,z*y,z^3,y^3],[w,z,y,x]]]
References

fctr, sqfr, Setting term orderings.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.45 primedec_mod

primedec_mod(plist,vlist,ord,mod,strategy)

:: Computes decompositions of ideals over small finite fields.

return
plist

list of polynomials

vlist

list of variables

ord

number, list or matrix

mod

positive integer

strategy

integer

[0] load("primdec_mod")$
[246] PP444=[x^8+x^2+t,y^8+y^2+t,z^8+z^2+t]$
[247] primedec_mod(PP444,[x,y,z,t],0,2,1);
[[y+z,x+z,z^8+z^2+t],[x+y,y^2+y+z^2+z+1,z^8+z^2+t],
[y+z+1,x+z+1,z^8+z^2+t],[x+z,y^2+y+z^2+z+1,z^8+z^2+t],
[y+z,x^2+x+z^2+z+1,z^8+z^2+t],[y+z+1,x^2+x+z^2+z+1,z^8+z^2+t],
[x+z+1,y^2+y+z^2+z+1,z^8+z^2+t],[y+z+1,x+z,z^8+z^2+t],
[x+y+1,y^2+y+z^2+z+1,z^8+z^2+t],[y+z,x+z+1,z^8+z^2+t]]
[248] 
References

modfctr, dp_gr_main, dp_gr_mod_main, dp_gr_f_main, dp_weyl_gr_main, dp_weyl_gr_mod_main, dp_weyl_gr_f_main, Setting term orderings, dp_gr_flags, dp_gr_print.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10.46 bfunction, bfct, generic_bfct, ann, ann0

bfunction(f)
bfct(f)
generic_bfct(plist,vlist,dvlist,weight)

:: Computes the global b function of a polynomial or an ideal

ann(f)
ann0(f)

:: Computes the annihilator of a power of polynomial

return

polynomial or list

f

polynomial

plist

list of polynomials

vlist dvlist

list of variables

[0] load("bfct")$
[216] bfunction(x^3+y^3+z^3+x^2*y^2*z^2+x*y*z);
-9*s^5-63*s^4-173*s^3-233*s^2-154*s-40
[217] fctr(@);
[[-1,1],[s+2,1],[3*s+4,1],[3*s+5,1],[s+1,2]]
[218] F = [4*x^3*dt+y*z*dt+dx,x*z*dt+4*y^3*dt+dy,
x*y*dt+5*z^4*dt+dz,-x^4-z*y*x-y^4-z^5+t]$
[219] generic_bfct(F,[t,z,y,x],[dt,dz,dy,dx],[1,0,0,0]);
20000*s^10-70000*s^9+101750*s^8-79375*s^7+35768*s^6-9277*s^5
+1278*s^4-72*s^3
[220] P=x^3-y^2$
[221] ann(P);
[2*dy*x+3*dx*y^2,-3*dx*x-2*dy*y+6*s]
[222] ann0(P);
[-1,[2*dy*x+3*dx*y^2,-3*dx*x-2*dy*y-6]]
References

Weyl algebra.


[ << ] [ < ] [ Up ] [ > ] [ >> ]

This document was generated on December 22, 2024 using texi2html 5.0.