XIDEAL.TST 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. % Test file for XIDEAL package (Groebner bases for exterior algebra)
  2. % Just make sure excalc has been loaded
  3. load_package excalc$
  4. % Declare exterior form variables
  5. pform x=0,y=0,z=0,t=0,u=1,v=1,w=1,f(i)=1,h=0,hx=0,ht=0;
  6. % Set switches for reduced Groebner bases in graded ideals
  7. on xfullreduce;
  8. % Reductions with xmodulo (all should be zero)
  9. d x^d y xmodulo {d x - d y};
  10. d x^d y^d z xmodulo {d x^d y - d z^d t};
  11. d x^d z^d t xmodulo {d x^d y - d z^d t};
  12. v^d x^d y xmodulo {d t^u - v^w,
  13. w^u - d x^d y};
  14. d t^u^d z xmodulo {d t^u - v^w,
  15. u^d z - d x^d y,
  16. d t^d y - d x^v};
  17. f(3)^f(4)^f(5)^f(6)
  18. xmodulo {f(1)^f(2) + f(3)^f(4) + f(5)^f(6)};
  19. f(1)^f(4)^f(5)^f(6)
  20. xmodulo {f(1)^f(2) + f(2)^f(3) + f(3)^f(4) + f(4)^f(5) + f(5)^f(6)};
  21. % Exterior system for heat equation on 1st jet bundle
  22. S := {d h - ht*d t - hx*d x,
  23. d ht^d t + d hx^d x,
  24. d hx^d t - ht*d x^d t};
  25. % Check that it's closed.
  26. dS := (for each a in S collect d a) xmodulo S;
  27. % Some Groebner bases (0-forms generate the trivial ideal)
  28. gb := xideal {x, d y};
  29. gb := xideal {f(1)^f(2) + f(3)^f(4)};
  30. gb := xideal {f(1)^f(2), f(1)^f(3)+f(2)^f(4)+f(5)^f(6)};
  31. % The same again, but not reduced
  32. off xfullreduce;
  33. gb := xideal {x, d y};
  34. gb := xideal {f(1)^f(2) + f(3)^f(4)};
  35. gb := xideal {f(1)^f(2), f(1)^f(3)+f(2)^f(4)+f(5)^f(6)};
  36. % Reductions with a ready Groebner basis (not all zero)
  37. on xfullreduce;
  38. gb := xideal {f(1)^f(2) + f(3)^f(4) + f(5)^f(6)};
  39. f(1)^f(3)^f(4) xmodulop gb;
  40. f(3)^f(4)^f(5)^f(6) xmodulop gb;
  41. % Non-graded ideals
  42. on xfullreduce;
  43. % Left and right ideals are no longer the same
  44. d t^(d z+d x^d y) xmodulo {d z+d x^d y};
  45. (d z+d x^d y)^d t xmodulo {d z+d x^d y};
  46. % Higher order forms can now reduce lower order ones
  47. d x xmodulo {d y^d z + d x,d x^d y + d z};
  48. % Anything with a 0-form term generates the trivial ideal!!
  49. gb := xideal {x + d y};
  50. gb := xideal {1 + f(1) + f(1)^f(2) + f(2)^f(3)^f(4) + f(3)^f(4)^f(5)^f(6)};
  51. end;