supp.red 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. %###############################################################
  2. %
  3. % FILE: supp.red
  4. % AUTHOR: graebe
  5. % CREATED: 2/2002
  6. % PURPOSE: Interface for the extended GEO syntax to Reduce
  7. % VERSION: $Id: supp.red,v 1.1 2002/12/26 16:27:22 compalg Exp $
  8. algebraic procedure geo_simplify u; u;
  9. algebraic procedure geo_normal u; u;
  10. algebraic procedure geo_subs(a,b,c); sub(a=b,c);
  11. algebraic procedure geo_gbasis(polys,vars);
  12. begin
  13. setring(vars,{},lex);
  14. setideal(uhu,polys);
  15. return gbasis uhu;
  16. end;
  17. algebraic procedure geo_groebfactor(polys,vars,nondeg);
  18. begin
  19. setring(vars,{},lex);
  20. return groebfactor(polys,nondeg);
  21. end;
  22. algebraic procedure geo_normalf(p,polys,vars);
  23. begin
  24. setring(vars,{},lex);
  25. return p mod polys;
  26. end;
  27. algebraic procedure geo_eliminate(polys,vars,elivars);
  28. begin
  29. setring(vars,{},lex);
  30. return eliminate(polys,elivars);
  31. end;
  32. algebraic procedure geo_solve(polys,vars);
  33. solve(polys,vars);
  34. algebraic procedure geo_solveconstrained(polys,vars,nondegs);
  35. begin scalar u;
  36. setring(vars,{},lex);
  37. u:=groebfactor(polys,nondegs);
  38. return for each x in u join solve(x,vars);
  39. end;
  40. algebraic procedure geo_eval(con,sol);
  41. for each x in sol collect sub(x,con);
  42. end;