groebner.red 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. module groebner;
  2. % Author: Herbert Melenk
  3. % in cooperation with Winfried Neun, H. Michael Moeller.
  4. % module structure:
  5. % GROEBNER package + GROEBNR2 package
  6. % polynomial arithmetic:
  7. % VDP2DIP package included in DIPOLY package
  8. fluid '(asymplis!* basecount!* bcount!* bczerodivl!* b4count!* current!-modulus
  9. currentvdpmodule!* denominators!* depl!* dipsortmode!* dipvars!* dmode!*
  10. factorlevel!* factortime!* factorlvevel!* fcount!* fourthvalue!* glexdomain!*
  11. global!-dipvars!* gmodule gmodule!* groebabort!* groebactualg!*
  12. groebactualg99!* groebdomain!* groebfabort!* groebmodular!* groebrestriction!*
  13. groebroots!* groecontcount!* groefeedback!* groesfactors!* groesoldb!*
  14. groesoldmode!* groesolvelevel!* groetags!* groetime!* fourthvalue!*
  15. hcount!* hzerocount!* intvdpvars!* mcount!*
  16. pcount!* pairsdone!* powlis!* probcount!* secondvalue!* thirdvalue!*
  17. variables!* vars!* vbccurrentmode!* vdplastvar!* vdpone!* vdpsortmode!*
  18. vdpvars!* vbcmodule!* vdpsortmode!* vdpsortextension!* vdpvars!*
  19. !*arbvars !*complex !*compxroots !*convert !*divisor !*exp !*ezgcd
  20. !*factor !*fullreduction !*gcd !*gltbasis !*greduce !*gsugar !*grmod!*
  21. !*groebcomplex !*groebdivide !*groebfac !*groebfullreduction !*groebheufact
  22. !*groebidqbasis !*groebnumval !*groebopt !*groebprot !*groebprereduce
  23. !*groebreduce !*groebsubs !*groebprot
  24. !*groebrm !*groebstat !*groebweak !*groelterms !*groesolgarbage !*groesolrecurs
  25. !*groebrm !*groebstat !*gsugar !*gtraverso!-sloppy !*msg !*precise !*trgroeb
  26. !*trgroebr !*trgroebr1 !*trgroebs !*trgroebsi !*trgroeb1 !*varopt !*vdpinteger
  27. !*vdpmodular
  28. );
  29. global '(assumptions gltb glterms groebmonfac groebprotfile groebrestriction
  30. groebresmax gvarslast largest!-small!-modulus requirements !*match !*trgroesolv);
  31. currentvdpmodule!*:='vdp2dip;
  32. create!-package('(groebner grinterf grinter2 buchbg groebcri groesolv groebopt
  33. groebsea groebsor groebspa groebfac groebidq kredelw traverso hille),
  34. '(contrib groebner));
  35. put('groebner,'version,3.1);
  36. % Other packages needed.
  37. load!-package ' dipoly;
  38. if(null v or v < 4.1)where v=get('dipoly,'version)
  39. then rederr {"wrong dipoly module",
  40. "(get and compile dipoly, before you compile groebner)"};
  41. smacro procedure tt(s1,s2);
  42. % Lcm of leading terms of s1 and s2 .
  43. vevlcm(vdpevlmon s1,vdpevlmon s2);
  44. smacro procedure vdpnumber f;vdpgetprop(f,'number);
  45. imports a2vdp,a2vbc,dependsl,domainp,eqexpr,f2vdp,fctrf,korder,lc,lpow,
  46. multroot0,
  47. makearbcomplex,mvar,numr,precision,prepcadr,prepf,prepsq,
  48. reorder,rerror,reval,
  49. setkorder, simp,solveeval,torder,
  50. vdp2a,vdp2f,vdpfmon,vdpappendmon,vdpappendvdp,vdplbc,vdpred,vdplastmon,
  51. vdpzero!?,vdpredzero!?,vdpone!?,vevzero!?, vbcplus!?,vbcone!?,vbcnumberp!?,vevdivides!?,
  52. vdpequal,vdpmember,vdpsum,vdpdif,vdpprod,vdpdivmon,vdpcancelvev,
  53. vdplcomb1,vdpcontent, vbcsum,vbcdif,vbcneg,vbcprod,vbcquot,vbcinv,vbcgcd,vbcabs,vbcone!?,
  54. vdpputprop,vdpgetprop,vdplsort,vdplsortin,vdpprint,
  55. vdpprin3t,vdpcondense,vdplcm,vdprectoint,vdpsimpcont,vdpvbcprod,vdpcancelmvev,vdpprin2,
  56. vdplength,vdpilcomb1,vdpinit,vdpinit2,vdpcleanup,
  57. vevcompless!?,vevdif,vevequal,vevsum,vevnth,vevtdeg,vevweightedcomp2,vevzero,
  58. writepri,
  59. !*eqn2a;
  60. exports groebnereval,groesolveeval,groepostsolveeval,idquotienteval,
  61. gdimensioneval,glexconvert,greduce,preduce,preduceeval,groebnert,dd_groebner,
  62. hilbertpolynomial,gsort,gsplit,gspoly,gzerodim!?;
  63. endmodule;;end;