home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e031 / 3.ddi / MATHZIP2 / STARTUP / GROEBNER.M < prev    next >
Encoding:
Text File  |  1991-09-23  |  677 b   |  34 lines

  1.  
  2.  
  3. Begin[ "System`"]
  4.  
  5. Unprotect[GroebnerBasis]
  6.  
  7. Clear[GroebnerBasis]
  8.  
  9. GroebnerBasis::usage = "GroebnerBasis[{poly1, poly2, ...}, {x1, x2, ...}]
  10. gives a list of polynomials which form a Groebner basis for the ideal
  11. generated by the polyi."
  12.  
  13. Begin["`Private`"]
  14.  
  15. GroebnerBasis[polys_And, args___] := 
  16.         GroebnerBasis[List @@ polys, args]
  17.  
  18. GroebnerBasis[{eqn__Equal}, args___] := 
  19.         GroebnerBasis[Apply[#1-#2&, {eqn}, {1}], args]
  20.  
  21. GroebnerBasis[polys_List, args___] := Block[{v},
  22.         Map[ #[[1]]-#[[2]]&, v[[6]] ]
  23.         /; ( v = AlgebraicRules[Map[(#==0)&,polys],args];
  24.             Head[v] == AlgebraicRulesData
  25.            )]
  26.  
  27. End[]
  28.  
  29. Protect[GroebnerBasis]
  30.  
  31. End[]
  32.  
  33. Null
  34.