source: git/Tst/Short/jmbtest.tst @ 1ebec3

spielwiese
Last change on this file since 1ebec3 was 8f296a, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Updated 'Singular/singular-libs' (for tested libs only) + The rest of updated tests due to master [mmm]! fix: corrected some wrong library names in tests (TODO: update test results afterwards) TODO/NOTE: some of LIB/*.lib are not installed and not yet tested in Tst/ NOTE: some more changes to Interpreter are needed for several further (incompatible with master) tests !!!
  • Property mode set to 100644
File size: 5.9 KB
Line 
1LIB "tst.lib";
2tst_init();
3
4//EXAMPLES SHEET
5LIB"JMBTest.lib";
6
7//Example 1
8
9ring r=0, (x,y,z),rp;
10jmp r1;
11r1.h=z^5;
12r1.t=poly(0);
13jmp r2;
14r2.h=z^4*y;
15r2.t=poly(0);
16jmp r3;
17r3.h=z^3*y^2;
18r3.t= poly(0) ;
19jmp r4;
20r4.h=z^2*y^3;
21r4.t= poly(0) ;
22jmp r5;
23r5.h=z^4*x;
24r5.t= poly(0) ;
25jmp r6;
26r6.h=z^3*y*x  ;
27r6.t= poly(0) ;
28jmp r7;
29r7.h=  z^2*y^2*x;
30r7.t= poly(0) ;
31jmp r8;
32r8.h= z*y^4 ;
33r8.t= poly(0) ;
34jmp r9;
35r9.h=z*y^3*x  ;
36r9.t= poly(0) ;
37jmp r10;
38r10.h= z^3*x^2 ;
39r10.t=poly(0)  ;
40jmp r11;
41r11.h= z^2*y*x^2 ;
42r11.t=poly(0)  ;
43jmp r12;
44r12.h=z*y^2*x^2;
45r12.t=-y^4*x-z^2*x^3;
46jmp r13;
47r13.h= y^5;
48r13.t=poly(0);
49list G1V=list(list(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13));
50TestJMark(G1V,r);
51//Result 1
52//=>1
53
54
55
56//Example 2
57ring r=0, (x,y,z),rp;
58jmp r1;
59r1.h=z^3;
60r1.t=poly(0);
61jmp r2;
62r2.h=z^2*y;
63r2.t=poly(0);
64jmp r3;
65r3.h=z*y^2 ;
66r3.t=-x^2*y;
67jmp r4;
68r4.h=y^5;
69r4.t=poly(0);
70list G2F=list(list(r1,r2,r3),list(r4));
71TestJMark(G2F,r);
72//Result 2
73//=> NOT A BASIS
74//0
75
76
77
78//Example 3
79ring r=0, (x(0..3)), rp;
80jmp r1;
81r1.h=x(3)^2;
82r1.t=-4*x(0)*x(2)+x(1)^2;
83jmp r2;
84r2.h=x(3)*x(2);
85r2.t=-x(1)*x(0);
86jmp r3;
87r3.h=x(2)^2;
88r3.t=-5*x(0)*x(2);
89jmp r4;
90r4.h=x(3)*x(1);
91r4.t=poly(0) ;
92jmp r5;
93r5.h=x(2)*x(1);
94r5.t=-x(0)^2;
95jmp r6;
96r6.h=x(1)^3;
97r6.t=-x(0)*x(1)^2;
98list G3F=list(list(r1, r2, r3, r4, r5),list(r6));
99TestJMark(G3F,r);
100//Result 3
101//=> NOT A BASIS
102//0
103
104
105
106//Example 4
107ring r=31991, (x(0..3)), rp;
108jmp r1;
109r1.h=x(3)^2;
110r1.t=11415*x(1)*x(2) + 12545*x(0)*x(2) + 5551*x(1)^2 + 2052*x(0)*x(1) - 5996*x(0)^2;
111jmp r2;
112r2.h=x(2)*x(3);
113r2.t= 9738*x(1)*x(2) + 4702*x(0)*x(2) + 1299*x(1)^2 - 9258*x(0)*x(1) - 660*x(0)^2;
114jmp r3;
115r3.h=x(1)*x(3);
116r3.t= - 499*x(1)*x(2) + 15889*x(0)*x(2) - 7174*x(1)^2 + 14455*x(0)*x(1) + 9142*x(0)^2;
117jmp r4;
118r4.h=x(0)*x(3);
119r4.t= - 7284*x(1)*x(2) - 252*x(0)*x(2) + 14903*x(1)^2 + 3168*x(0)*x(1) - 7681*x(0)^2;
120jmp r5;
121r5.h=x(2)^2;
122r5.t= - 966*x(1)*x(2) - 3371*x(0)*x(2) - 7034*x(1)^2 + 13657*x(0)*x(1) - 7337*x(0)^2;
123jmp r6;
124r6.h=x(0)*x(1)*x(2);
125r6.t= 15317*x(0)^2*x(2) - 15115*x(1)^3 + 7262*x(0)*x(1)^2 - 5022*x(0)^2*x(1) + 9052*x(0)^3;
126jmp r7;
127r7.h= x(1)^2*x(2);
128r7.t=- 2219*x(0)^2*x(2) + 7022*x(1)^3 - 8908*x(0)*x(1)^2 - 14283*x(0)^2*x(1) + 6536*x(0)^3 ;
129jmp r8;
130r8.h=x(0)^3*x(2);
131r8.t=570*x(1)^4 - 5548*x(0)*x(1)^3 - 5727*x(0)^2*x(1)^2 - 12284*x(0)^3*x(1) + 5207*x(0)^4 ;
132jmp r9;
133r9.h=x(1)^5;
134r9.t= -14551*x(0)*x(1)^4+11335*x(0)^2*x(1)^3+11357*x(0)^3*x(1)^2-5733*x(0)^4*x(1)-3043*x(0)^5;
135list G4V=list(list(r1, r2, r3,  r4, r5), list(r6,r7),list(r8),list(r9));
136TestJMark(G4V,r);
137//Result 4
138//=>1
139
140
141
142//Example 5
143ring r=0, (x,y,z),rp;
144jmp r1;
145r1.h=xy;
146r1.t=poly(0);
147jmp r2;
148r2.h=y^2;
149r2.t=poly(0);
150jmp r3;
151r3.h=xz;
152r3.t= poly(0) ;
153jmp r4;
154r4.h=yz;
155r4.t= poly(0) ;
156jmp r5;
157r5.h=z^2;
158r5.t= poly(0) ;
159list G5V=list(list(r1,r2,r3,r4,r5));
160TestJMark(G5V,r);
161//Result 5
162//=>1
163
164
165
166//Example 6
167ring r=0, (x,y,z),rp;
168jmp r1;
169r1.h=xy;
170r1.t=poly(0);
171jmp r2;
172r2.h=y^2;
173r2.t=3*x^2;
174jmp r3;
175r3.h=xz;
176r3.t= poly(0) ;
177jmp r4;
178r4.h=yz;
179r4.t= poly(0) ;
180jmp r5;
181r5.h=z^2;
182r5.t= poly(0) ;
183list G6F=list(list(r1,r2,r3,r4,r5));
184TestJMark(G6F,r);
185//Result 6
186//=> NOT A BASIS
187//0
188
189
190
191//Example 7
192ring r=0, (z,y,x),rp;
193jmp r1;
194r1.h=x^4;
195r1.t=poly(0);
196jmp r2;
197r2.h=x^3*y;
198r2.t=poly(0);
199jmp r3;
200r3.h=x^2*y^2;
201r3.t= poly(0) ;
202jmp r4;
203r4.h=x*y^3;
204r4.t= poly(0) ;
205jmp r5;
206r5.h=z*x^3;
207r5.t= poly(0) ;
208jmp r6;
209r6.h=x^2*y*z ;
210r6.t= y^4 ;
211jmp r7;
212r7.h=  x*y^2*z;
213r7.t= poly(0) ;
214jmp r8;
215r8.h= y^5 ;
216r8.t= poly(0) ;
217list G7V=list(list(r1,r2,r3,r4,r5,r6,r7),list(r8));
218TestJMark(G7V,r);
219
220//Result 7
221//=>1
222
223
224
225//Example 8
226ring r=0, (z,y,x),rp;
227jmp r1;
228r1.h=x^4;
229r1.t=poly(0);
230jmp r2;
231r2.h=x^3*y;
232r2.t=poly(0);
233jmp r3;
234r3.h=x^2*y^2;
235r3.t= poly(0) ;
236jmp r4;
237r4.h=x*y^3;
238r4.t= y^4 ;
239jmp r5;
240r5.h=z*x^3;
241r5.t= poly(0) ;
242jmp r6;
243r6.h=x^2*y*z ;
244r6.t= poly(0) ;
245jmp r7;
246r7.h=  x*y^2*z;
247r7.t= z*y^3 ;
248jmp r8;
249r8.h= y^5 ;
250r8.t= poly(0) ;
251list G8F=list(list(r1,r2,r3,r4,r5,r6,r7),list(r8));
252TestJMark(G8F,r);
253//Result 8
254//=> NOT A BASIS
255//0
256
257
258
259//Example 9
260ring r=0, (x,y,z),rp;
261jmp r1;
262r1.h=z;
263r1.t=poly(0);
264jmp r2;
265r2.h=y^6;
266r2.t=poly(0);
267jmp r3;
268r3.h=x^3*y^5;
269r3.t=poly(0);
270list G9V=list( list(r1),list(),list(),list(),list(),list(r2),list(),list(r3));
271TestJMark(G9V,r);
272//Result 9
273//=>1
274
275
276
277
278//Example 10
279ring r=0, (x,y,z), rp;
280jmp r1;
281r1.h=z;
282r1.t=poly(0);
283jmp r2;
284r2.h=y^6;
285r2.t=poly(0);
286jmp r3;
287r3.h=x^3*y^5;
288r3.t=x^8;
289list G10F=list( list(r1),list(),list(),list(),list(),list(r2),list(),list(r3));
290TestJMark(G10F,r);
291//Result 10
292//=> NOT A BASIS
293//0
294
295
296
297//Example 11
298ring r=0, (x,y,z), rp;
299jmp r1;
300r1.h=z;
301r1.t=poly(0);
302jmp r2;
303r2.h=y^6;
304r2.t=x*y^5;
305jmp r3;
306r3.h=x^3*y^5;
307r3.t=poly(0);
308list G11V=list( list(r1),list(),list(),list(),list(),list(r2),list(),list(r3));
309TestJMark(G11V,r);
310//Result 11
311//=>1
312
313
314
315//Example 12
316ring r=0, (x,y,z), rp;
317jmp r1;
318r1.h=z;
319r1.t=poly(0);
320jmp r2;
321r2.h=y^6;
322r2.t=x*y^5+x^2*y^4+x^3*y^3+x^4*y^2+x^5*y;
323jmp r3;
324r3.h=x^5*y^3+x^7*y;
325r3.t=poly(0);
326list G12V=list( list(r1),list(),list(),list(),list(),list(r2),list(),list(r3));
327TestJMark(G12V,r);
328//Result 12
329//=>1
330
331//Example 13
332ring r=0, (x,y,z), rp;
333jmp r1;
334r1.h=z;
335r1.t=x+y;
336jmp r2;
337r2.h=y^6;
338r2.t=x*y^5+x^2*y^4+x^3*y^3+x^4*y^2+x^5*y;
339jmp r3;
340r3.h=x^5*y^3+x^7*y;
341r3.t=poly(0);
342list G13F=list( list(r1),list(),list(),list(),list(),list(r2),list(),list(r3));
343TestJMark(G13F,r);
344//Result 13
345//=>NOT A BASIS
346//0
347 
348//Example 14
349ring r=0, (x,y,z),rp;
350jmp r1;
351r1.h=yz;
352r1.t=y^2;
353jmp r2;
354r2.h=z^2;
355r2.t=xy+xz+y^2;
356jmp r3;
357r3.h=x*y^2;
358r3.t= poly(0) ;
359jmp r4;
360r4.h=y^3;
361r4.t=poly(0);
362jmp r5;
363r5.h=x^4;
364r5.t= poly(0) ;
365jmp r6;
366r6.h=x^3*y  ;
367r6.t= poly(0) ;
368jmp r7;
369r7.h=  x^3*z;
370r7.t= poly(0) ;
371list G14V=list(list(r1,r2),list(r3,r4),list(r5,r6,r7));
372TestJMark(G14V,r);
373//Result 14
374//=>1
375
376
377
378//Example 15
379ring r=0, (x,y,z),rp;
380jmp r1;
381r1.h=yz;
382r1.t=y^2;
383jmp r2;
384r2.h=z^2;
385r2.t=xy+xz+y^2;
386jmp r3;
387r3.h=x*y^2;
388r3.t= poly(0) ;
389jmp r4;
390r4.h=y^3;
391r4.t=x^3;
392jmp r5;
393r5.h=x^4;
394r5.t= poly(0) ;
395jmp r6;
396r6.h=x^3*y  ;
397r6.t= poly(0) ;
398jmp r7;
399r7.h= x^3*z;
400r7.t= poly(0) ;
401list G15F=list(list(r1,r2),list(r3,r4),list(r5,r6,r7));
402TestJMark(G15F,r);
403//Result 15
404//=>NOT A BASIS
405
406tst_status(1);$
Note: See TracBrowser for help on using the repository browser.