dipoly.red 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. module dipoly;% Header module for dipoly package .
  2. % Authors : R . Gebauer,A . C . Hearn,H . Kredel,
  3. %
  4. % Significant modifications : H . Melenk .
  5. %
  6. % Modifications :
  7. %
  8. % 14-Dec-1994(HM): Term order GRADED added .
  9. %
  10. % 17-Sep-1994(HM): The ideal variables are now declared in the TORDER
  11. % statement . The calling conventions can be still
  12. % used,but are removed from the documents .
  13. %
  14. % 12-Sep-1994(HM): Make the base coefficient arithmatic call subs2 if
  15. % the switch *bcsub2 is on . This is turned on if
  16. % there are roots in the coefficient domain . Without
  17. % subs2 the zero detection would be incomplete in
  18. % such cases .
  19. % Term order MATRIX added .
  20. %
  21. % 5-Jun-1994(HM): Introduced zero divisor list for the base
  22. % coefficients . These are polynomial variants of let
  23. % rules which Groebner has found for the parameters .
  24. % For the time being,this contains the smacros that used to be in
  25. % consel,and repeats those in bcoeff .
  26. %----------------------------------------------------------------
  27. % For compatibility with REDUCE 3 . 5 :
  28. fluid'(bczerodivl!* compiled!-orders!* dipevlist!* dipsortmode!* dipsortevcomp!*
  29. dipvars!* dmode!* dipvars!* dipzero global!-dipvars!* intvdpvars!* olddipsortmode!*
  30. intvdpvars!* olddipsortmode!* pcount!* secondvalue!* vdpsfsortmode!* vdpmatrix!*
  31. vdpsortextension!* vdpsortmode!* vdplastvar!* vdpvars!* !*balanced_mod !*bcsubs2
  32. !*gcd !*grmod!* !*groebdivide !*groebsubs !*groebrm !*gsugar !*trgroeb !*trgroebs
  33. !*vdpinteger);
  34. global'(groebmonfac vdpprintmax);
  35. %----------------------------------------------------------------
  36. % Constructors and selectors for a distributed polynomial form .
  37. % A distributive polynomial has the following informal syntax :
  38. %
  39. % <dipoly> ::= dipzero
  40. % | <exponent vector> . <base coefficient> . <dipoly>
  41. % Vdp2dip modules included . They could be in a separate package .
  42. create!-package('(dipoly a2dip bcoeff dip2a dipoly1 dipvars
  43. expvec torder vdp2dip vdpcom condense dipprint),
  44. '(contrib dipoly));
  45. put('dipoly,'version,4.1);
  46. % define dipzero='nil;
  47. fluid'(dipzero pi);
  48. % Until we understand how to define something to nil .
  49. smacro procedure dipzero!? u;null u;
  50. smacro procedure diplbc p;
  51. % Distributive polynomial leading base coefficient.
  52. % p is a distributive polynomial . diplbc(p) returns
  53. % the leading base coefficient of p.
  54. cadr p;
  55. smacro procedure dipmoncomp(a,e,p);
  56. % Distributive polynomial monomial composition . a is a base
  57. % coefficient,e is an exponent vector and p is a
  58. % distributive polynomial . dipmoncomp( a,e,p)returns a dis-
  59. % tributive polynomial with p as monomial reductum,e as
  60. % exponent vector of the leading monomial and a as leading
  61. % base coefficient.
  62. e.a.p;
  63. smacro procedure dipevlmon p;
  64. % Distributive polynomial exponent vector leading monomial .
  65. % p is a distributive polynomial . dipevlmon(p)returns the
  66. % exponent vector of the leading monomial of p.
  67. car p;
  68. smacro procedure dipfmon(a,e);
  69. % Distributive polynomial from monomial . a is a base coefficient
  70. % and e is an exponent vector . dipfmon(a,e)returns a
  71. % distributive polynomial with e as exponent vector and
  72. % a as base coefficient.
  73. e.a.dipzero;
  74. smacro procedure dipnov p;
  75. % Distributive polynomial number of variables . p is a distributive
  76. % polynomial . dipnov(p)returns a digit,the number of variables
  77. % of the distributive polynomial p.
  78. length car p;
  79. smacro procedure dipmred p;
  80. % Distributive polynomial reductum . p is a distributive polynomial
  81. % dipmred(p)returns the reductum of the distributive polynomial p,
  82. % a distributive polynomial.
  83. cddr p;
  84. endmodule;;end;