idexf.red 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. module idexf;
  2. % Author: Eberhard Schruefer
  3. global '(exfideal!*);
  4. symbolic procedure exterior!-ideal u;
  5. begin scalar x,y;
  6. rmsubs();
  7. for each j in u do
  8. if indexvp j then
  9. for each k in mkaindxc(y := flatindxl cdr j,nil) do
  10. x := partitsq(simpindexvar(car j . subla(pair(y,k),cdr j)),
  11. 'wedgefp) . x
  12. else x := partitsq(simp!* j,'wedgefp) . x;
  13. exfideal!* := append(x,exfideal!*);
  14. end;
  15. rlistat '(exterior!-ideal);
  16. symbolic procedure remexf(u,v);
  17. begin scalar lu,lv,x,y,z;
  18. lv := ldpf v;
  19. a: if null u or domainp(lu := ldpf u) then
  20. return u;
  21. if x := divexf(lu,lv) then
  22. <<y := partitsq(simp list('wedge,prepf v,x),'wedgefp);
  23. z := negsq quotsq(lc u,lc y);
  24. u := addpsf(u,multpsf(1 .* z .+ nil,y))>>
  25. else return u;
  26. go to a
  27. end;
  28. symbolic procedure divexf(u,v);
  29. begin scalar x,y;
  30. x := prepf u;
  31. y := prepf v;
  32. if atom x then x := list x
  33. else if car x eq 'wedge then x := cdr x;
  34. if atom y then y := list y
  35. else if car y eq 'wedge then y := cdr y;
  36. a: if null y then return 'wedge . x;
  37. if null(x := delform(car y,x)) then return nil;
  38. y := cdr y;
  39. go to a
  40. end;
  41. symbolic procedure delform(u,v);
  42. delform1(u,v,nil);
  43. symbolic procedure delform1(u,v,w);
  44. if null v then nil
  45. else if u = car v then if w or cdr v
  46. then append(reverse w,cdr v)
  47. else list 1
  48. else delform1(u,cdr v,car v . w);
  49. symbolic procedure exf!-mod!-ideal u;
  50. begin
  51. for each j in exfideal!* do u := remexf(u,j);
  52. return u
  53. end;
  54. endmodule;
  55. end;