ideals.rlg 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. Mon Jan 4 00:02:39 MET 1999
  2. REDUCE 3.7, 15-Jan-99 ...
  3. 1: 1:
  4. 2: 2: 2: 2: 2: 2: 2: 2: 2:
  5. 3: 3: I_setting(x,y,z);
  6. torder revgradlex;
  7. {{},lex}
  8. u := I(x*z-y**2, x**3-y*z);
  9. 2 3
  10. u := i(x*z - y ,x - y*z)
  11. y member I(x,y^2);
  12. 0
  13. x member I(x,y^2);
  14. 1
  15. I(x,y^2) subset I(x,y);
  16. 1
  17. % yes
  18. I(x,y) subset I(x,y^2);
  19. 0
  20. % no
  21. % examples taken from Cox, Little, O'Shea: "Ideals, Varieties and Algorithms"
  22. q1 := u .: I(x);
  23. 3 2 2 2
  24. q1 := i(x - y*z,x *y - z , - x*z + y )
  25. % quotient ideal
  26. q2 := u .+ I(x^2 * y - z^2);
  27. 3 2 2 2
  28. q2 := i(x - y*z,x *y - z , - x*z + y )
  29. % sum ideal
  30. if q1 .= q2 then write "same ideal";
  31. same ideal
  32. % test equality
  33. intersection(u,I(y));
  34. 3 2 2 2 2 3
  35. i(x *y - y *z,x *y - y*z , - x*y*z + y )
  36. % ideal intersection
  37. u .: I(y);
  38. 3 2 2 2
  39. i(x - y*z,x *y - z , - x*z + y )
  40. u .: I(x,y);
  41. 3 2 2 2
  42. i(x - y*z,x *y - z , - x*z + y )
  43. %-----------------------------------------------------
  44. u1 := I(x,y^2);
  45. 2
  46. u1 := i(x,y )
  47. u1u1:= u1 .* u1;
  48. 4 2 2
  49. u1u1 := i(y ,x*y ,x )
  50. % square ideal
  51. u0 :=I(x,y);
  52. u0 := i(x,y)
  53. % test equality/inclusion for u1,u1u1,u0
  54. u1 .= u1u1;
  55. 0
  56. % no
  57. u1 subset u1u1;
  58. 0
  59. % no
  60. u1u1 subset u1;
  61. 1
  62. % yes
  63. u1 .= u0;
  64. 0
  65. % no
  66. u1 subset u0;
  67. 1
  68. % yes
  69. intersection (I(x) , I(x^2,x*y,y^2)) .= intersection(I(x) , I(x^2,y));
  70. 1
  71. end;
  72. 4: 4: 4: 4: 4: 4: 4: 4: 4:
  73. Time for test: 70 ms
  74. 5: 5:
  75. Quitting
  76. Mon Jan 4 00:02:44 MET 1999