source: git/Tst/Old/barei.tst @ e64eae5

fieker-DuValspielwiese
Last change on this file since e64eae5 was 6d1466, checked in by Wilfred Pohl <pohl@…>, 25 years ago
new bareiss git-svn-id: file:///usr/local/Singular/svn/trunk@2868 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.0 KB
Line 
1//
2// test script for bareiss command
3//
4pagelength = 10000;
5ring r = 0,(x,y,z),dp;
6r;
7matrix m1[3][3]=x,2,3,2,3x,4,1,3,2x;
8m1;
9list mm1=bareiss(m1);
10mm1;
11vector vdet=mm1[1][3];
12poly pdet=det(m1);
13if(leadcoef(pdet)!=leadcoef(vdet))
14{
15  vdet+pdet*gen(3);
16}
17else
18{
19  "error";
20  vdet-pdet*gen(3);
21}
22"------------------------------------";
23//
24matrix m2[5][6]=0,2,1,-3,12,-9,1,2,5,3,6,-1,2,4,10,6,12,-2,-3,2,1;
25list mm2=bareiss(m2);
26print(mm2[1]);
27"------------------------------------";
28//
29matrix m3[3][4]=xy,0,x2z,1,z2y,y2z21,0,1,zx3,1,0,z3y3;
30list mm3=bareiss(m3);
31mm3;
32print(mm3[1]);
33"-------------------------------------";
34 //
35poly s1 = 2x3y2+23x5y+104xy6+56z2x;
36poly s2 = 3/2x3y2-2/3z6y4+12x2z4;
37poly s3 = -2x4y5+x4z5;
38poly s4 = 7/8x7y3z-1;
39poly s5 = 4x2y3-2x2y2;
40poly s6 = 1/2y2x3+4x2z2;
41poly s7 = x+y+z;
42poly s8 = x2+y2+z2;
43poly s9 = xz+xy+yz;
44matrix m4[3][3]=s1,0,s3,1,s5,0,s7,s8,s9;
45m4;
46list mm4=bareiss(m4);
47mm4;
48vector vdet=mm4[1][3];
49poly pdet=det(m4);
50if(leadcoef(pdet)!=leadcoef(vdet))
51{
52  vdet+pdet*gen(3);
53}
54else
55{
56  "error";
57  vdet-pdet*gen(3);
58}
59"---------------------------------------";
60//
61matrix m5[3][2]=s8,s7,s9,s6,s5,0;
62module mm=m5;
63list mm5=bareiss(mm);
64print(mm5[1]);
65kill r;
66"-------------------------------------";
67ring r1=0,(x(1..9)),(dp);
68matrix m6[3][3]=maxideal(1);
69list mm6=bareiss(m6);
70print(mm6[1]);
71vector p1=mm6[1][3];
72poly p2=det(m6);
73if(leadcoef(p1)!=leadcoef(p2))
74{
75  p1+p2*gen(3);
76}
77else
78{
79  p1-p2*gen(3);
80}
81"--------------------------------------";
82ring r2=0,(x(1..12)),ds;
83matrix m7[3][4]= maxideal(1);
84print(m7);
85list mm7=bareiss(m7);
86print(mm7[1]);
87"--------------------------------------";
88matrix m8[4][3]=maxideal(1);
89print(m8);
90list mm8=bareiss(m8);
91print(mm8[1]);
92"--------------------------------------";
93matrix m9[4][4]=maxideal(2);
94print(m9);
95list mm9=bareiss(m9);
96mm9;
97"------------------------------------";
98matrix m11[5][5]=maxideal(1),maxideal(1);
99print(m11);
100list mm11=bareiss(m11);
101mm11;
102"-------------------------------------";
103listvar(all);
104LIB "tst.lib";tst_status(1);$
Note: See TracBrowser for help on using the repository browser.