spielwiese
Last change
on this file since e36ae54 was
e36ae54,
checked in by Olaf Bachmann <obachman@…>, 25 years ago
|
* regress.cmd: rm .gz file
* added stuff from M. Lamm
git-svn-id: file:///usr/local/Singular/svn/trunk@1438 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | // File: primitiv_s.tst |
---|
2 | // Short tests for primitiv lib |
---|
3 | LIB "tst.lib"; |
---|
4 | tst_init(); |
---|
5 | LIB "primitiv.lib"; |
---|
6 | // ------------ test of primitive: ------------------- |
---|
7 | ring r=0,x,dp; |
---|
8 | primitive(ideal(x2+1)); |
---|
9 | kill r; |
---|
10 | ring r=0,(x,y),dp; |
---|
11 | ideal i=x2-2,y2-3; |
---|
12 | ideal j=primitive(i); |
---|
13 | factorize(j[1]); |
---|
14 | ring r1=(0,a),x,lp; |
---|
15 | map phi=r,x,a; |
---|
16 | string s=string(phi(j)[1]); |
---|
17 | execute("minpoly="+s+";"); |
---|
18 | ideal v=phi(j)[1],phi(j)[2]^2-2,phi(j)[3]^2-3; |
---|
19 | v; |
---|
20 | if (size(v)>0) |
---|
21 | { "ERROR!!! Result of primitive(i) is not a primitive element!"; } |
---|
22 | // else minpoly(a)==0, g_1(a) is squareroot of 2, g_2(a) is squareroot of 3 |
---|
23 | // as it should be |
---|
24 | setring r; |
---|
25 | i=x2-3,y2-x; |
---|
26 | primitive(i); |
---|
27 | kill r; |
---|
28 | ring r=3,(x,y,z),dp; |
---|
29 | ideal i=x2+1,y3-y-1,z2+yz-1; |
---|
30 | primitive(i); |
---|
31 | kill r; |
---|
32 | // ------------ test of splitring: ------------------- |
---|
33 | ring r=0,(x,y),ds; |
---|
34 | splitring(x2-5,"R1"); |
---|
35 | R1; |
---|
36 | list l=splitring(x2-7,"R2",a); |
---|
37 | l[1]^2; |
---|
38 | R2; |
---|
39 | splitring(y2+1,"",a); |
---|
40 | R2; |
---|
41 | kill r,R1,R2; |
---|
42 | ring r=(2003,j),(a,b,c,d),dp; |
---|
43 | minpoly=j2-2; |
---|
44 | list l=splitring(b3+b2+b-2,"R1",list(a,b,c,d,j)); |
---|
45 | l; |
---|
46 | number(l[5])^2; |
---|
47 | factorize(b3+b2+b-2); |
---|
48 | list L=splitring(c2-2j,"",list(a2+ja,j,l[5])); |
---|
49 | L; |
---|
50 | L[3]^2; |
---|
51 | kill R1,r; |
---|
52 | // ------------ test of randomLast: ------------------ |
---|
53 | example randomLast; |
---|
54 | $ |
---|
55 | |
---|
Note: See
TracBrowser
for help on using the repository browser.