1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | // |
---|
4 | // test script for intersect command |
---|
5 | // |
---|
6 | pagelength = 10000; |
---|
7 | ring r1 = 32003,(x,y,z),(c,ds); |
---|
8 | r1; |
---|
9 | "-------------------------------"; |
---|
10 | poly s1=x2y3+45x6y3+68x4z5+80y6x8; |
---|
11 | poly s2=6x5+3y6+8z6; |
---|
12 | poly s3=12xyz3+2y3z6; |
---|
13 | ideal i1=s1,s2,s3; |
---|
14 | ideal i2=s1+s2,s2,s1; |
---|
15 | vector v1=[s1,s2,s2*s3]+s1*gen(5); |
---|
16 | vector v2=[s1-s2,s3,s2]+s1*gen(5); |
---|
17 | module m1=v1,v2; |
---|
18 | module m2=v2,2*v1; |
---|
19 | intersect(i1,i2); |
---|
20 | "-------------------------"; |
---|
21 | intersect(m1,m2); |
---|
22 | "-------------------------"; |
---|
23 | listvar(all); |
---|
24 | kill r1; |
---|
25 | "--------------------------"; |
---|
26 | ring r1=0,(x,y,z),(c,ds); |
---|
27 | poly s1=x2y3+45x6y3+68x4z5+80y6x8; |
---|
28 | poly s2=6x5+3y6+8z6; |
---|
29 | poly s3=12xyz3+2y3z6; |
---|
30 | ideal i1=s1,s2,s3; |
---|
31 | ideal i2=s1+s2,s2,s1; |
---|
32 | vector v1=[s1,s2,s2*s3]+s1*gen(5); |
---|
33 | vector v2=[s1-s2,s3,s2]+s1*gen(5); |
---|
34 | module m1=v1,v2; |
---|
35 | module m2=v2,2*v1; |
---|
36 | intersect(i1,i2); |
---|
37 | "-------------------------"; |
---|
38 | intersect(m1,m2); |
---|
39 | "-------------------------"; |
---|
40 | listvar(all); |
---|
41 | intersect(x,y,z); |
---|
42 | intersect(ideal(x),ideal(y),ideal(z2),ideal(z)); |
---|
43 | intersect(x,y,z2,z); |
---|
44 | kill r1; |
---|
45 | // |
---|
46 | // test script for intersect command |
---|
47 | // |
---|
48 | pagelength = 10000; |
---|
49 | ring r1 = 32003,(x,y,z),(c,ds); |
---|
50 | r1; |
---|
51 | "-------------------------------"; |
---|
52 | poly s1=x2y3+45x6y3+68x4z5+80y6x8; |
---|
53 | poly s2=6x5+3y6+8z6; |
---|
54 | poly s3=12xyz3+2y3z6; |
---|
55 | ideal i1=s1,s2,s3; |
---|
56 | ideal i2=s1+s2,s2,s1; |
---|
57 | vector v1=[s1,s2,s2*s3]+s1*gen(5); |
---|
58 | vector v2=[s1-s2,s3,s2]+s1*gen(5); |
---|
59 | module m1=v1,v2; |
---|
60 | module m2=v2,2*v1; |
---|
61 | intersect(i1,i2,1); |
---|
62 | "-------------------------"; |
---|
63 | intersect(m2,freemodule(5),m1); |
---|
64 | intersect(m2); |
---|
65 | "-------------------------"; |
---|
66 | listvar(all); |
---|
67 | kill r1; |
---|
68 | "--------------------------"; |
---|
69 | ring r1=0,(x,y,z),(c,ds); |
---|
70 | poly s1=x2y3+45x6y3+68x4z5+80y6x8; |
---|
71 | poly s2=6x5+3y6+8z6; |
---|
72 | poly s3=12xyz3+2y3z6; |
---|
73 | ideal i1=s1,s2,s3; |
---|
74 | ideal i2=s1+s2,s2,s1; |
---|
75 | vector v1=[s1,s2,s2*s3]+s1*gen(5); |
---|
76 | vector v2=[s1-s2,s3,s2]+s1*gen(5); |
---|
77 | module m1=v1,v2; |
---|
78 | module m2=v2,2*v1; |
---|
79 | intersect(1,i1,i2); |
---|
80 | "-------------------------"; |
---|
81 | intersect(m1,m2,freemodule(5)); |
---|
82 | "-------------------------"; |
---|
83 | listvar(all); |
---|
84 | kill r1; |
---|
85 | ring r=181,(x,y,z),(c,ls); |
---|
86 | ideal id1=maxideal(3); |
---|
87 | id1; |
---|
88 | ideal id2=x2+xyz,y2-z3y,z3+y5xz; |
---|
89 | id2; |
---|
90 | ideal id3=intersect(id1,id2); |
---|
91 | id3; |
---|
92 | ring rr=32003 ,(x, y),dp; |
---|
93 | ideal i=x; |
---|
94 | ideal j=y; |
---|
95 | ideal k=intersect(i,j); |
---|
96 | k; |
---|
97 | kill rr; |
---|
98 | ring r=0,(x,y,z),(c,lp); |
---|
99 | vector v(1)=[xy+y2,x,1]; |
---|
100 | vector v(2)=[x2+z2,x-y,0,1]; |
---|
101 | vector v(3)=[xz,y,0,0,1]; |
---|
102 | module M=v(1),v(2),v(3); |
---|
103 | module Ms=std(M); |
---|
104 | Ms; |
---|
105 | module N=gen(3),gen(4),gen(5); |
---|
106 | module NN; |
---|
107 | intersect(Ms,N); |
---|
108 | intersect(Ms,NN); |
---|
109 | intersect(Ms,NN,N); |
---|
110 | kill r; |
---|
111 | |
---|
112 | $; |
---|